diff options
author | Roland McGrath <roland@gnu.org> | 1996-03-28 08:30:38 +0000 |
---|---|---|
committer | Roland McGrath <roland@gnu.org> | 1996-03-28 08:30:38 +0000 |
commit | 19bc17a90548ee427035994bbc4b14395723ff1f (patch) | |
tree | e7a17eda196c2610ca4be26c9e7985815162eafb /locale/keyword.h | |
parent | 53f770e0f9d405ea8d1888254c6f7ce431b04c6e (diff) | |
download | glibc-19bc17a90548ee427035994bbc4b14395723ff1f.tar.gz glibc-19bc17a90548ee427035994bbc4b14395723ff1f.tar.xz glibc-19bc17a90548ee427035994bbc4b14395723ff1f.zip |
Thu Mar 28 03:25:10 1996 Roland McGrath <roland@charlie-brown.gnu.ai.mit.edu>
* intl/Makefile (copysrc): Add missing > in sed cmd. Sat Mar 23 17:52:49 1996 Ulrich Drepper <drepper@gnu.ai.mit.edu> * Makeconfig: Rename Makefile variable nlsdir to i18ndir and change value to $(datadir)/i18n. `nls' is not an appropriate name. * Makefile (subdirs): Add new subdir wctype. * ctype/ctype-info.c: Add new global variable __ctype_names and initialize from _nl_C_LC_CTYPE. * ctype/ctype.h: In P1003.3b/D11 `alnum' is a separate character class. Use bit 11. [_ISbit]: Protect definition of bitmasks because they are also used in wctype.h. * libio/genops.c (_IO_sputbackc, _IO_sungetc): Clear EOF flag after successfully pushing back a character. Fundamental changes in locale implementation. Almost nothing from the old code is used anymore. * locale/charmap.c, locale/collate.c, locale/config.h, locale/ctypedump.c, locale/hash.h, locale/keyword.gperf, locale/keyword.h, locale/loadlocale.c, locale/locale-ctype.c, locale/locale.c locale/localeconv.c, locale/localedef.c, locale/localedef.h, locale/locfile-hash.c, locale/locfile-lex.c, locale/locfile-parse.c, locale/messages.c, locale/monetary.c, locale/numeric.c, locale/setlocale.c, locale/token.h, locale/xmalloc.c: Removed. * locale/Makefile: Update for new locale implementation with program source code distributed in subdir. * locale/categories.def, locale/iso-4217.def: Updated file for new locale implementation. * locale/langinfo.h: Updated for new locale implementation. (ERA_D_T_FMT, ERA_T_FMT): New official values according to P1003.2b/D11. (_NL_COLLATE_NRULES, _NL_COLLATE_RULES, _NL_COLLATE_HASH_SIZE, _NL_COLLATE_HASH_LAYERS, _NL_COLLATE_TABLE_EB, _NL_COLLATE_TABLE_EL, _NL_COLLATE_UNDEFINED, _NL_COLLATE_EXTRA_EB, _NL_COLLATE_EXTRA_EL, _NL_CTYPE_NAMES_EB, _NL_CTYPE_NAMES_EL, _NL_CTYPE_HASH_SIZE, _NL_CTYPE_HASH_LAYERS, _NL_CTYPE_CLASS_NAMES, _NL_CTYPE_MAP_NAMES, _NL_CTYPE_WIDTH): New internal values for extended LC_CTYPE and LC_COLLATE implementation. * locale/simple-hash.c, locale/simple-hash.h, locale/xmalloc.c, locale/xstrdup.c: Helper functions for locale related programs. * locale/C-collate.c, locale/C-ctype.c, locale/C-messages.c, locale/C-monetary.c, locale/C-numeric.c, locale/C-time.c, locale/lc-collate.c, locale/lc-ctype.c, locale/lc-messages.c, locale/lc-monetary.c, locale/lc-numeric.c, locale/lc-time.c: New implementation of locale functions, and new generated "C" locale data. * locale/loadlocale.c: Now handles word fields in locale binary automatically by changing the endianess if necessary. * locale/localeinfo.h (LIMAGIC): Changed magic number because of incompatible changes. (locale_data): Changed definition to allow word as a value type. (coll_sort_rule): Values for collation sorting mode. (_NL_CURRENT_WORD): New macro to access word value of locale entry. (__collate_table, __collate_extra): Declare new global variables for collation tables. * locale/programs/charmap-kw.gperf, locale/programs/charmap-kw.h, 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. * locale/weight.h: Functions to access collation tables. * posix/unistd.h: Define _POSIX2_LOCALEDEF. * stdio-common/printf_fp.c: Fix bug with printing certain numbers < 10^-1. Reported by Bill Metzenthen. * stdio-common/tfformat.c: Add new test for above bug. * string/strcoll.c, string/strxfrm.c: Real implementation of string collation according to ISO C. * wctype/Makefile, wctype/cname-lookup.h, wctype/iswctype.c, wctype/test_wctype.c, wctype/towctrans.c, wctype/wcfuncs.c, wctype/wctrans.c, wctype/wctype.c, wctype/wctype.h: New files. Implementation of wide character classes and mapping.
Diffstat (limited to 'locale/keyword.h')
-rw-r--r-- | locale/keyword.h | 180 |
1 files changed, 0 insertions, 180 deletions
diff --git a/locale/keyword.h b/locale/keyword.h deleted file mode 100644 index 1dc442aee5..0000000000 --- a/locale/keyword.h +++ /dev/null @@ -1,180 +0,0 @@ -/* C code produced by gperf version 2.5 (GNU C++ version) */ -/* Command-line: gperf -acCgopt -k1,2,5, keyword.gperf */ -/* `strncmp' is used for comparison. */ -#include <string.h> - -/* This file defines `enum token'. */ -#include "token.h" -struct locale_keyword { char *name; enum token token_id; }; - -#define TOTAL_KEYWORDS 68 -#define MIN_WORD_LENGTH 3 -#define MAX_WORD_LENGTH 17 -#define MIN_HASH_VALUE 4 -#define MAX_HASH_VALUE 140 -/* maximum key range = 137, duplicates = 0 */ - -#ifdef __GNUC__ -inline -#endif -static unsigned int -hash (register const char *str, register int len) -{ - static const unsigned char asso_values[] = - { - 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, - 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, - 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, - 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, - 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, - 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, - 141, 141, 141, 141, 141, 141, 141, 0, 141, 65, - 5, 0, 141, 30, 141, 141, 0, 141, 0, 95, - 141, 141, 0, 141, 45, 10, 141, 141, 141, 141, - 141, 141, 141, 141, 141, 5, 141, 10, 85, 0, - 20, 0, 40, 35, 30, 10, 141, 0, 30, 15, - 15, 0, 0, 141, 55, 0, 0, 80, 141, 15, - 10, 0, 141, 141, 141, 141, 141, 141, - }; - register int hval = len; - - switch (hval) - { - default: - case 5: - hval += asso_values[str[4]]; - case 4: - case 3: - case 2: - hval += asso_values[str[1]]; - case 1: - hval += asso_values[str[0]]; - } - return hval; -} - -#ifdef __GNUC__ -inline -#endif -const struct locale_keyword * -in_word_set (register const char *str, register int len) -{ - static const struct locale_keyword wordlist[] = - { - {"",}, {"",}, {"",}, {"",}, - {"copy", TOK_COPY}, - {"space", TOK_SPACE}, - {"yesstr", YESSTR}, - {"toupper", TOK_TOUPPER}, - {"position", TOK_POSITION}, - {"",}, - {"t_fmt", T_FMT}, - {"escape_char", TOK_ESCAPE_CHAR}, - {"comment_char", TOK_COMMENT_CHAR}, - {"positive_sign", POSITIVE_SIGN}, - {"",}, - {"t_fmt_ampm", T_FMT_AMPM}, - {"",}, - {"yesexpr", YESEXPR}, - {"mon", MON_1}, - {"p_sep_by_space", P_SEP_BY_SPACE}, - {"LC_NUMERIC", _NL_NUM_LC_NUMERIC}, - {"noexpr", NOEXPR}, - {"tolower", TOK_TOLOWER}, - {"p_cs_precedes", P_CS_PRECEDES}, - {"UNDEFINED", TOK_UNDEFINED}, - {"",}, - {"collating_symbol", TOK_COLLATING_SYMBOL}, - {"collating_element", TOK_COLLATING_ELEMENT}, - {"negative_sign", NEGATIVE_SIGN}, - {"",}, - {"d_fmt", D_FMT}, - {"",}, - {"mon_thousands_sep", MON_THOUSANDS_SEP}, - {"day", DAY_1}, - {"n_sep_by_space", N_SEP_BY_SPACE}, - {"digit", TOK_DIGIT}, - {"IGNORE", TOK_IGNORE}, - {"LC_TIME", _NL_NUM_LC_TIME}, - {"n_cs_precedes", N_CS_PRECEDES}, - {"",}, - {"int_curr_symbol", INT_CURR_SYMBOL}, - {"",}, {"",}, - {"thousands_sep", THOUSANDS_SEP}, - {"",}, - {"am_pm", AM_STR}, - {"xdigit", TOK_XDIGIT}, - {"",}, - {"decimal_point", DECIMAL_POINT}, - {"",}, - {"cntrl", TOK_CNTRL}, - {"p_sign_posn", P_SIGN_POSN}, - {"mon_decimal_point", MON_DECIMAL_POINT}, - {"LC_CTYPE", _NL_NUM_LC_CTYPE}, - {"",}, - {"alpha", TOK_ALPHA}, - {"",}, - {"forward", TOK_FORWARD}, - {"era", ERA}, - {"",}, - {"print", TOK_PRINT}, - {"",}, - {"mon_grouping", MON_GROUPING}, - {"era_year", ERA_YEAR}, - {"",}, {"",}, - {"n_sign_posn", N_SIGN_POSN}, - {"",}, - {"END", TOK_END}, - {"",}, - {"alt_digits", ALT_DIGITS}, - {"",}, - {"d_t_fmt", D_T_FMT}, - {"",}, {"",}, - {"nostr", NOSTR}, - {"LC_MESSAGES", _NL_NUM_LC_MESSAGES}, - {"",}, {"",}, {"",}, - {"int_frac_digits", INT_FRAC_DIGITS}, - {"",}, {"",}, {"",}, - {"era_d_fmt", ERA_D_FMT}, - {"punct", TOK_PUNCT}, - {"",}, {"",}, {"",}, {"",}, - {"lower", TOK_LOWER}, - {"",}, {"",}, {"",}, {"",}, - {"currency_symbol", CURRENCY_SYMBOL}, - {"",}, {"",}, - {"grouping", GROUPING}, - {"from", TOK_FROM}, - {"abday", ABDAY_1}, - {"",}, {"",}, {"",}, {"",}, - {"LC_COLLATE", _NL_NUM_LC_COLLATE}, - {"LC_MONETARY", _NL_NUM_LC_MONETARY}, - {"",}, {"",}, {"",}, {"",}, - {"frac_digits", FRAC_DIGITS}, - {"",}, {"",}, {"",}, - {"abmon", ABMON_1}, - {"",}, {"",}, - {"backward", TOK_BACKWARD}, - {"order_end", TOK_ORDER_END}, - {"blank", TOK_BLANK}, - {"order_start", TOK_ORDER_START}, - {"",}, {"",}, {"",}, - {"graph", TOK_GRAPH}, - {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, - {"",}, {"",}, {"",}, {"",}, {"",}, - {"upper", TOK_UPPER}, - }; - - if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH) - { - register int key = hash (str, len); - - if (key <= MAX_HASH_VALUE && key >= 0) - { - register const char *s = wordlist[key].name; - - if (*s == *str && !strncmp (str + 1, s + 1, len - 1)) - return &wordlist[key]; - } - } - return 0; -} |