[Bug 6228] SMBC_open_ctx failure due to path resolve failure doesn't set errno
[Samba.git] / source / script / makeunicodecasemap.awk
blob8424b6c6725dd418bca3824429f62d3ca05709a0
1 function reset_vals() {
2 upperstr = "";
3 lowerstr = "";
4 flagstr = "0";
7 function print_val() {
8 upperstr = $13;
9 lowerstr = $14;
10 if ( upperstr == "" )
11 upperstr = strval;
12 if ( lowerstr == "" )
13 lowerstr = strval;
15 if ( $3 == "Lu" )
16 flagstr = sprintf("%s|%s", flagstr, "UNI_UPPER");
17 if ( $3 == "Ll" )
18 flagstr = sprintf("%s|%s", flagstr, "UNI_LOWER");
19 if ( val >= 48 && val <= 57)
20 flagstr = sprintf("%s|%s", flagstr, "UNI_DIGIT");
21 if ((val >= 48 && val <= 57) || (val >= 65 && val <= 70) || (val >=97 && val <= 102))
22 flagstr = sprintf("%s|%s", flagstr, "UNI_XDIGIT");
23 if ( val == 32 || (val >=9 && val <= 13))
24 flagstr = sprintf("%s|%s", flagstr, "UNI_SPACE");
25 if( index(flagstr, "0|") == 1)
26 flagstr = substr(flagstr, 3, length(flagstr) - 2);
27 printf("{ 0x%s, 0x%s, %s }, \t\t\t/* %s %s */\n", lowerstr, upperstr, flagstr, strval, $2);
28 val++;
29 strval=sprintf("%04X", val);
30 reset_vals();
33 BEGIN {
34 val=0
35 FS=";"
36 strval=sprintf("%04X", val);
37 reset_vals();
41 if ( $1 == strval ) {
42 print_val();
43 } else {
44 while ( $1 != strval) {
45 printf("{ 0x%04X, 0x%04X, 0 }, \t\t\t/* %s NOMAP */\n", val, val, strval);
46 val++;
47 strval=sprintf("%04X", val);
49 print_val();
53 END {
54 while ( val < 65536 ) {
55 printf("{ 0x%04X, 0x%04X, 0 }, \t\t\t/* %s NOMAP */\n", val, val, strval);
56 val++;
57 strval=sprintf("%04X", val);