lucy-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Karman <pe...@peknet.com>
Subject Re: 64-bit linux errors with t/core/032-string_helper.t
Date Tue, 19 Jan 2010 19:46:19 GMT
Marvin Humphrey wrote on 01/19/2010 01:35 PM:

> I think the next step is to isolate the behavior of this platform in a minimal
> test app.  

Here's another one.

#include <stdio.h>


typedef unsigned char u8_t;



const u8_t StrHelp_UTF8_SKIP[] = {

    1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
    1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
    1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
    1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
    1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
    1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
    1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
    3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,5,5,5,5,6,6,7,7
};

const u8_t StrHelp_UTF8_TRAILING[] = {
    0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
    0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
    0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
    0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
    7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,
    7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,
    7,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
    2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,3,3,3,3,3,7,7,7,7,7,7,7,7,7,7,7
};

int main() {

    u8_t i, max;

    for (i=127, max=255; i<max; i++) {
        printf("[%d] TRAILING[%d] SKIP[%d]\n",
               i, StrHelp_UTF8_TRAILING[i], StrHelp_UTF8_SKIP[i]);
    }

}

// eof

output:
[127] TRAILING[0] SKIP[1]

[128] TRAILING[7] SKIP[1]

[129] TRAILING[7] SKIP[1]

[130] TRAILING[7] SKIP[1]

[131] TRAILING[7] SKIP[1]

[132] TRAILING[7] SKIP[1]

[133] TRAILING[7] SKIP[1]

[134] TRAILING[7] SKIP[1]

[135] TRAILING[7] SKIP[1]

[136] TRAILING[7] SKIP[1]

[137] TRAILING[7] SKIP[1]

[138] TRAILING[7] SKIP[1]

[139] TRAILING[7] SKIP[1]

[140] TRAILING[7] SKIP[1]

[141] TRAILING[7] SKIP[1]

[142] TRAILING[7] SKIP[1]

[143] TRAILING[7] SKIP[1]

[144] TRAILING[7] SKIP[1]

[145] TRAILING[7] SKIP[1]

[146] TRAILING[7] SKIP[1]

[147] TRAILING[7] SKIP[1]

[148] TRAILING[7] SKIP[1]

[149] TRAILING[7] SKIP[1]

[150] TRAILING[7] SKIP[1]

[151] TRAILING[7] SKIP[1]

[152] TRAILING[7] SKIP[1]

[153] TRAILING[7] SKIP[1]

[154] TRAILING[7] SKIP[1]

[155] TRAILING[7] SKIP[1]

[156] TRAILING[7] SKIP[1]

[157] TRAILING[7] SKIP[1]

[158] TRAILING[7] SKIP[1]

[159] TRAILING[7] SKIP[1]

[160] TRAILING[7] SKIP[1]

[161] TRAILING[7] SKIP[1]

[162] TRAILING[7] SKIP[1]

[163] TRAILING[7] SKIP[1]

[164] TRAILING[7] SKIP[1]

[165] TRAILING[7] SKIP[1]

[166] TRAILING[7] SKIP[1]

[167] TRAILING[7] SKIP[1]

[168] TRAILING[7] SKIP[1]

[169] TRAILING[7] SKIP[1]

[170] TRAILING[7] SKIP[1]

[171] TRAILING[7] SKIP[1]

[172] TRAILING[7] SKIP[1]

[173] TRAILING[7] SKIP[1]

[174] TRAILING[7] SKIP[1]

[175] TRAILING[7] SKIP[1]

[176] TRAILING[7] SKIP[1]

[177] TRAILING[7] SKIP[1]

[178] TRAILING[7] SKIP[1]

[179] TRAILING[7] SKIP[1]

[180] TRAILING[7] SKIP[1]

[181] TRAILING[7] SKIP[1]

[182] TRAILING[7] SKIP[1]

[183] TRAILING[7] SKIP[1]

[184] TRAILING[7] SKIP[1]

[185] TRAILING[7] SKIP[1]

[186] TRAILING[7] SKIP[1]

[187] TRAILING[7] SKIP[1]

[188] TRAILING[7] SKIP[1]

[189] TRAILING[7] SKIP[1]

[190] TRAILING[7] SKIP[1]

[191] TRAILING[7] SKIP[1]

[192] TRAILING[7] SKIP[1]

[193] TRAILING[1] SKIP[2]

[194] TRAILING[1] SKIP[2]

[195] TRAILING[1] SKIP[2]

[196] TRAILING[1] SKIP[2]

[197] TRAILING[1] SKIP[2]

[198] TRAILING[1] SKIP[2]

[199] TRAILING[1] SKIP[2]

[200] TRAILING[1] SKIP[2]

[201] TRAILING[1] SKIP[2]

[202] TRAILING[1] SKIP[2]

[203] TRAILING[1] SKIP[2]

[204] TRAILING[1] SKIP[2]

[205] TRAILING[1] SKIP[2]

[206] TRAILING[1] SKIP[2]

[207] TRAILING[1] SKIP[2]

[208] TRAILING[1] SKIP[2]

[209] TRAILING[1] SKIP[2]

[210] TRAILING[1] SKIP[2]

[211] TRAILING[1] SKIP[2]

[212] TRAILING[1] SKIP[2]

[213] TRAILING[1] SKIP[2]

[214] TRAILING[1] SKIP[2]

[215] TRAILING[1] SKIP[2]

[216] TRAILING[1] SKIP[2]

[217] TRAILING[1] SKIP[2]

[218] TRAILING[1] SKIP[2]

[219] TRAILING[1] SKIP[2]

[220] TRAILING[1] SKIP[2]

[221] TRAILING[1] SKIP[2]

[222] TRAILING[1] SKIP[2]

[223] TRAILING[1] SKIP[2]

[224] TRAILING[2] SKIP[3]
[225] TRAILING[2] SKIP[3]
[226] TRAILING[2] SKIP[3]
[227] TRAILING[2] SKIP[3]
[228] TRAILING[2] SKIP[3]
[229] TRAILING[2] SKIP[3]
[230] TRAILING[2] SKIP[3]
[231] TRAILING[2] SKIP[3]
[232] TRAILING[2] SKIP[3]
[233] TRAILING[2] SKIP[3]
[234] TRAILING[2] SKIP[3]
[235] TRAILING[2] SKIP[3]
[236] TRAILING[2] SKIP[3]
[237] TRAILING[2] SKIP[3]
[238] TRAILING[2] SKIP[3]
[239] TRAILING[2] SKIP[3]
[240] TRAILING[3] SKIP[4]
[241] TRAILING[3] SKIP[4]
[242] TRAILING[3] SKIP[4]
[243] TRAILING[3] SKIP[4]
[244] TRAILING[3] SKIP[4]
[245] TRAILING[7] SKIP[4]
[246] TRAILING[7] SKIP[4]
[247] TRAILING[7] SKIP[4]
[248] TRAILING[7] SKIP[5]
[249] TRAILING[7] SKIP[5]
[250] TRAILING[7] SKIP[5]
[251] TRAILING[7] SKIP[5]
[252] TRAILING[7] SKIP[6]
[253] TRAILING[7] SKIP[6]
[254] TRAILING[7] SKIP[7]

-- 
Peter Karman  .  http://peknet.com/  .  peter@peknet.com

Mime
View raw message