diff options
author | Roland McGrath <roland@gnu.org> | 1996-03-28 09:16:15 +0000 |
---|---|---|
committer | Roland McGrath <roland@gnu.org> | 1996-03-28 09:16:15 +0000 |
commit | 0393dfd6c22d4f3bb61c4650e4c22e87026b19bd (patch) | |
tree | 6191705921900f148158c834b1a9cb095ffc8475 /locale/weight.h | |
parent | 19bc17a90548ee427035994bbc4b14395723ff1f (diff) | |
download | glibc-0393dfd6c22d4f3bb61c4650e4c22e87026b19bd.zip glibc-0393dfd6c22d4f3bb61c4650e4c22e87026b19bd.tar.gz glibc-0393dfd6c22d4f3bb61c4650e4c22e87026b19bd.tar.bz2 |
* locale/programs/xmalloc.c: Test _LIBC as well as STDC_HEADERS.
* locale/programs/ld-collate.c (collate_finish): Use error_at_line
instead of error_with_loc.
* locale/weight.h: Use u_int32_t instead of u32_t.
* string/strxfrm.c: Likewise.
* string/strxfrm.c: Find weight.h in ../locale; don't #include
"localeinfo.h".
* string/strcoll.c: Likewise.
* locale/programs/simple-hash.c, locale/programs/simple-hash.h,
locale/programs/xmalloc.c, locale/programs/xstrdup.c: Helper functions
for locale related programs.
locale/programs/charmap.c, locale/programs/charset.c,
locale/programs/charset.h, locale/programs/config.h,
locale/programs/ctypedump.c, locale/programs/ld-collate.c,
locale/programs/ld-ctype.c, locale/programs/ld-messages.c,
locale/programs/ld-monetary.c, locale/programs/ld-numeric.c,
locale/programs/ld-time.c, locale/programs/linereader.c,
locale/programs/linereader.h, locale/programs/locale.c,
locale/programs/localedef.c, locale/programs/locales.h,
locale/programs/locfile-kw.gperf, locale/programs/locfile-kw.h,
locale/programs/locfile-token.h, locale/programs/locfile.c,
locale/programs/locfile.h, locale/programs/stringtrans.c,
locale/programs/stringtrans.h: Implementation of locale related
programs.
Diffstat (limited to 'locale/weight.h')
-rw-r--r-- | locale/weight.h | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/locale/weight.h b/locale/weight.h index 5a9bcd7..128b631 100644 --- a/locale/weight.h +++ b/locale/weight.h @@ -18,7 +18,8 @@ not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include <alloca.h> - +#include <langinfo.h> +#include "localeinfo.h" #ifndef STRING_TYPE # error STRING_TYPE not defined @@ -32,10 +33,11 @@ typedef struct weight_t { struct weight_t *prev; struct weight_t *next; - struct data_pair { - size_t number; - u32_t *value; - } data[0]; + struct data_pair + { + size_t number; + const u_int32_t *value; + } data[0]; } weight_t; @@ -70,7 +72,7 @@ get_weight (const STRING_TYPE **str, weight_t *result) slot = (ch * (collate_nrules + 1)) % collate_hash_size; level = 0; - while (__collate_table[slot] != (u32_t) ch) + while (__collate_table[slot] != (u_int32_t) ch) { if (__collate_table[slot + 1] == 0 || ++level >= collate_hash_layers) @@ -116,7 +118,7 @@ get_weight (const STRING_TYPE **str, weight_t *result) /* This is a comparison between a u32_t array (aka wchar_t) and an 8-bit string. */ for (idx = 0; __collate_extra[slot + 2 + idx] != 0; ++idx) - if (__collate_extra[slot + 2 + idx] != (u32_t) str[idx]) + if (__collate_extra[slot + 2 + idx] != (u_int32_t) str[idx]) break; /* When the loop finished with all character of the collation |