(root)/
bison-3.8.2/
lib/
iconv_open-zos.h
       1  /* ANSI-C code produced by gperf version 3.0.3 */
       2  /* Command-line: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/gperf -m 10 /Users/akim/src/gnu/bison/lib/iconv_open-zos.gperf  */
       3  /* Computed positions: -k'4,$' */
       4  
       5  #if !((' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \
       6        && ('%' == 37) && ('&' == 38) && ('\'' == 39) && ('(' == 40) \
       7        && (')' == 41) && ('*' == 42) && ('+' == 43) && (',' == 44) \
       8        && ('-' == 45) && ('.' == 46) && ('/' == 47) && ('0' == 48) \
       9        && ('1' == 49) && ('2' == 50) && ('3' == 51) && ('4' == 52) \
      10        && ('5' == 53) && ('6' == 54) && ('7' == 55) && ('8' == 56) \
      11        && ('9' == 57) && (':' == 58) && (';' == 59) && ('<' == 60) \
      12        && ('=' == 61) && ('>' == 62) && ('?' == 63) && ('A' == 65) \
      13        && ('B' == 66) && ('C' == 67) && ('D' == 68) && ('E' == 69) \
      14        && ('F' == 70) && ('G' == 71) && ('H' == 72) && ('I' == 73) \
      15        && ('J' == 74) && ('K' == 75) && ('L' == 76) && ('M' == 77) \
      16        && ('N' == 78) && ('O' == 79) && ('P' == 80) && ('Q' == 81) \
      17        && ('R' == 82) && ('S' == 83) && ('T' == 84) && ('U' == 85) \
      18        && ('V' == 86) && ('W' == 87) && ('X' == 88) && ('Y' == 89) \
      19        && ('Z' == 90) && ('[' == 91) && ('\\' == 92) && (']' == 93) \
      20        && ('^' == 94) && ('_' == 95) && ('a' == 97) && ('b' == 98) \
      21        && ('c' == 99) && ('d' == 100) && ('e' == 101) && ('f' == 102) \
      22        && ('g' == 103) && ('h' == 104) && ('i' == 105) && ('j' == 106) \
      23        && ('k' == 107) && ('l' == 108) && ('m' == 109) && ('n' == 110) \
      24        && ('o' == 111) && ('p' == 112) && ('q' == 113) && ('r' == 114) \
      25        && ('s' == 115) && ('t' == 116) && ('u' == 117) && ('v' == 118) \
      26        && ('w' == 119) && ('x' == 120) && ('y' == 121) && ('z' == 122) \
      27        && ('{' == 123) && ('|' == 124) && ('}' == 125) && ('~' == 126))
      28  /* The character set is not based on ISO-646.  */
      29  #error "gperf generated tables don't work with this execution character set. Please report a bug to <bug-gnu-gperf@gnu.org>."
      30  #endif
      31  
      32  #line 17 "/Users/akim/src/gnu/bison/lib/iconv_open-zos.gperf"
      33  struct mapping { int standard_name; const char vendor_name[10 + 1]; };
      34  
      35  #define TOTAL_KEYWORDS 49
      36  #define MIN_WORD_LENGTH 3
      37  #define MAX_WORD_LENGTH 11
      38  #define MIN_HASH_VALUE 3
      39  #define MAX_HASH_VALUE 64
      40  /* maximum key range = 62, duplicates = 0 */
      41  
      42  #ifdef __GNUC__
      43  __inline
      44  #else
      45  #ifdef __cplusplus
      46  inline
      47  #endif
      48  #endif
      49  static unsigned int
      50  mapping_hash (register const char *str, register unsigned int len)
      51  {
      52    static const unsigned char asso_values[] =
      53      {
      54        65, 65, 65, 65, 65, 65, 65, 65, 65, 65,
      55        65, 65, 65, 65, 65, 65, 65, 65, 65, 65,
      56        65, 65, 65, 65, 65, 65, 65, 65, 65, 65,
      57        65, 65, 65, 65, 65, 65, 65, 65, 65, 65,
      58        65, 65, 65, 65, 65, 65, 65, 65, 16, 38,
      59        14,  1, 32, 22, 29,  3,  0,  7, 40,  2,
      60         5, 18, 23, 65, 65, 65, 65, 65, 65, 65,
      61        65, 65, 65,  0, 65,  0, 65, 65, 65,  0,
      62        43, 65,  1, 65, 65,  8, 65, 65, 65, 65,
      63        65, 65, 65, 65, 65, 65, 65, 65, 65, 65,
      64        65, 65, 65, 65, 65, 65, 65, 65, 65, 65,
      65        65, 65, 65, 65, 65, 65, 65, 65, 65, 65,
      66        65, 65, 65, 65, 65, 65, 65, 65, 65, 65,
      67        65, 65, 65, 65, 65, 65, 65, 65, 65, 65,
      68        65, 65, 65, 65, 65, 65, 65, 65, 65, 65,
      69        65, 65, 65, 65, 65, 65, 65, 65, 65, 65,
      70        65, 65, 65, 65, 65, 65, 65, 65, 65, 65,
      71        65, 65, 65, 65, 65, 65, 65, 65, 65, 65,
      72        65, 65, 65, 65, 65, 65, 65, 65, 65, 65,
      73        65, 65, 65, 65, 65, 65, 65, 65, 65, 65,
      74        65, 65, 65, 65, 65, 65, 65, 65, 65, 65,
      75        65, 65, 65, 65, 65, 65, 65, 65, 65, 65,
      76        65, 65, 65, 65, 65, 65, 65, 65, 65, 65,
      77        65, 65, 65, 65, 65, 65, 65, 65, 65, 65,
      78        65, 65, 65, 65, 65, 65, 65, 65, 65, 65,
      79        65, 65, 65, 65, 65, 65, 65, 65, 65, 65,
      80        65, 65
      81      };
      82    register unsigned int hval = len;
      83  
      84    switch (hval)
      85      {
      86        default:
      87          hval += asso_values[(unsigned char)str[3]+6];
      88        /*FALLTHROUGH*/
      89        case 3:
      90          break;
      91      }
      92    return hval + asso_values[(unsigned char)str[len - 1]];
      93  }
      94  
      95  struct stringpool_t
      96    {
      97      char stringpool_str3[sizeof("GBK")];
      98      char stringpool_str5[sizeof("ASCII")];
      99      char stringpool_str7[sizeof("CP1253")];
     100      char stringpool_str8[sizeof("EUC-KR")];
     101      char stringpool_str9[sizeof("CP1257")];
     102      char stringpool_str10[sizeof("CP857")];
     103      char stringpool_str11[sizeof("ISO-8859-8")];
     104      char stringpool_str12[sizeof("ISO-8859-3")];
     105      char stringpool_str13[sizeof("ISO-8859-13")];
     106      char stringpool_str14[sizeof("ISO-8859-7")];
     107      char stringpool_str15[sizeof("CP437")];
     108      char stringpool_str16[sizeof("CP1129")];
     109      char stringpool_str17[sizeof("CP869")];
     110      char stringpool_str18[sizeof("ISO-8859-9")];
     111      char stringpool_str19[sizeof("CP922")];
     112      char stringpool_str20[sizeof("CP1252")];
     113      char stringpool_str21[sizeof("CP852")];
     114      char stringpool_str22[sizeof("CP1250")];
     115      char stringpool_str23[sizeof("CP850")];
     116      char stringpool_str24[sizeof("CP862")];
     117      char stringpool_str25[sizeof("ISO-8859-2")];
     118      char stringpool_str26[sizeof("CP932")];
     119      char stringpool_str27[sizeof("GB2312")];
     120      char stringpool_str28[sizeof("CP1255")];
     121      char stringpool_str29[sizeof("CP855")];
     122      char stringpool_str30[sizeof("KOI8-R")];
     123      char stringpool_str31[sizeof("CP1125")];
     124      char stringpool_str32[sizeof("CP865")];
     125      char stringpool_str33[sizeof("ISO-8859-5")];
     126      char stringpool_str34[sizeof("ISO-8859-15")];
     127      char stringpool_str35[sizeof("CP1256")];
     128      char stringpool_str36[sizeof("CP856")];
     129      char stringpool_str37[sizeof("KOI8-U")];
     130      char stringpool_str38[sizeof("CP1254")];
     131      char stringpool_str39[sizeof("CP866")];
     132      char stringpool_str40[sizeof("ISO-8859-6")];
     133      char stringpool_str41[sizeof("CP1124")];
     134      char stringpool_str42[sizeof("CP864")];
     135      char stringpool_str43[sizeof("ISO-8859-4")];
     136      char stringpool_str44[sizeof("CP1251")];
     137      char stringpool_str45[sizeof("CP775")];
     138      char stringpool_str46[sizeof("CP943")];
     139      char stringpool_str47[sizeof("CP1131")];
     140      char stringpool_str48[sizeof("CP861")];
     141      char stringpool_str49[sizeof("ISO-8859-1")];
     142      char stringpool_str50[sizeof("EUC-JP")];
     143      char stringpool_str52[sizeof("CP949")];
     144      char stringpool_str55[sizeof("CP874")];
     145      char stringpool_str64[sizeof("CP1046")];
     146    };
     147  static const struct stringpool_t stringpool_contents =
     148    {
     149      "GBK",
     150      "ASCII",
     151      "CP1253",
     152      "EUC-KR",
     153      "CP1257",
     154      "CP857",
     155      "ISO-8859-8",
     156      "ISO-8859-3",
     157      "ISO-8859-13",
     158      "ISO-8859-7",
     159      "CP437",
     160      "CP1129",
     161      "CP869",
     162      "ISO-8859-9",
     163      "CP922",
     164      "CP1252",
     165      "CP852",
     166      "CP1250",
     167      "CP850",
     168      "CP862",
     169      "ISO-8859-2",
     170      "CP932",
     171      "GB2312",
     172      "CP1255",
     173      "CP855",
     174      "KOI8-R",
     175      "CP1125",
     176      "CP865",
     177      "ISO-8859-5",
     178      "ISO-8859-15",
     179      "CP1256",
     180      "CP856",
     181      "KOI8-U",
     182      "CP1254",
     183      "CP866",
     184      "ISO-8859-6",
     185      "CP1124",
     186      "CP864",
     187      "ISO-8859-4",
     188      "CP1251",
     189      "CP775",
     190      "CP943",
     191      "CP1131",
     192      "CP861",
     193      "ISO-8859-1",
     194      "EUC-JP",
     195      "CP949",
     196      "CP874",
     197      "CP1046"
     198    };
     199  #define stringpool ((const char *) &stringpool_contents)
     200  
     201  static const struct mapping mappings[] =
     202    {
     203      {-1}, {-1}, {-1},
     204  #line 76 "/Users/akim/src/gnu/bison/lib/iconv_open-zos.gperf"
     205      {offsetof(struct stringpool_t, stringpool_str3), "IBM-1386"},
     206      {-1},
     207  #line 28 "/Users/akim/src/gnu/bison/lib/iconv_open-zos.gperf"
     208      {offsetof(struct stringpool_t, stringpool_str5), "00367"},
     209      {-1},
     210  #line 68 "/Users/akim/src/gnu/bison/lib/iconv_open-zos.gperf"
     211      {offsetof(struct stringpool_t, stringpool_str7), "IBM-5349"},
     212  #line 75 "/Users/akim/src/gnu/bison/lib/iconv_open-zos.gperf"
     213      {offsetof(struct stringpool_t, stringpool_str8), "IBM-eucKR"},
     214  #line 72 "/Users/akim/src/gnu/bison/lib/iconv_open-zos.gperf"
     215      {offsetof(struct stringpool_t, stringpool_str9), "09449"},
     216  #line 48 "/Users/akim/src/gnu/bison/lib/iconv_open-zos.gperf"
     217      {offsetof(struct stringpool_t, stringpool_str10), "00857"},
     218  #line 36 "/Users/akim/src/gnu/bison/lib/iconv_open-zos.gperf"
     219      {offsetof(struct stringpool_t, stringpool_str11), "05012"},
     220  #line 31 "/Users/akim/src/gnu/bison/lib/iconv_open-zos.gperf"
     221      {offsetof(struct stringpool_t, stringpool_str12), "00913"},
     222  #line 38 "/Users/akim/src/gnu/bison/lib/iconv_open-zos.gperf"
     223      {offsetof(struct stringpool_t, stringpool_str13), "ISO8859-13"},
     224  #line 35 "/Users/akim/src/gnu/bison/lib/iconv_open-zos.gperf"
     225      {offsetof(struct stringpool_t, stringpool_str14), "ISO8859-7"},
     226  #line 42 "/Users/akim/src/gnu/bison/lib/iconv_open-zos.gperf"
     227      {offsetof(struct stringpool_t, stringpool_str15), "IBM-437"},
     228  #line 63 "/Users/akim/src/gnu/bison/lib/iconv_open-zos.gperf"
     229      {offsetof(struct stringpool_t, stringpool_str16), "01129"},
     230  #line 54 "/Users/akim/src/gnu/bison/lib/iconv_open-zos.gperf"
     231      {offsetof(struct stringpool_t, stringpool_str17), "IBM-869"},
     232  #line 37 "/Users/akim/src/gnu/bison/lib/iconv_open-zos.gperf"
     233      {offsetof(struct stringpool_t, stringpool_str18), "ISO8859-9"},
     234  #line 56 "/Users/akim/src/gnu/bison/lib/iconv_open-zos.gperf"
     235      {offsetof(struct stringpool_t, stringpool_str19), "IBM-922"},
     236  #line 67 "/Users/akim/src/gnu/bison/lib/iconv_open-zos.gperf"
     237      {offsetof(struct stringpool_t, stringpool_str20), "IBM-5348"},
     238  #line 45 "/Users/akim/src/gnu/bison/lib/iconv_open-zos.gperf"
     239      {offsetof(struct stringpool_t, stringpool_str21), "IBM-852"},
     240  #line 65 "/Users/akim/src/gnu/bison/lib/iconv_open-zos.gperf"
     241      {offsetof(struct stringpool_t, stringpool_str22), "IBM-5346"},
     242  #line 44 "/Users/akim/src/gnu/bison/lib/iconv_open-zos.gperf"
     243      {offsetof(struct stringpool_t, stringpool_str23), "09042"},
     244  #line 50 "/Users/akim/src/gnu/bison/lib/iconv_open-zos.gperf"
     245      {offsetof(struct stringpool_t, stringpool_str24), "IBM-862"},
     246  #line 30 "/Users/akim/src/gnu/bison/lib/iconv_open-zos.gperf"
     247      {offsetof(struct stringpool_t, stringpool_str25), "ISO8859-2"},
     248  #line 57 "/Users/akim/src/gnu/bison/lib/iconv_open-zos.gperf"
     249      {offsetof(struct stringpool_t, stringpool_str26), "IBM-943"},
     250  #line 73 "/Users/akim/src/gnu/bison/lib/iconv_open-zos.gperf"
     251      {offsetof(struct stringpool_t, stringpool_str27), "IBM-eucCN"},
     252  #line 70 "/Users/akim/src/gnu/bison/lib/iconv_open-zos.gperf"
     253      {offsetof(struct stringpool_t, stringpool_str28), "09447"},
     254  #line 46 "/Users/akim/src/gnu/bison/lib/iconv_open-zos.gperf"
     255      {offsetof(struct stringpool_t, stringpool_str29), "13143"},
     256  #line 40 "/Users/akim/src/gnu/bison/lib/iconv_open-zos.gperf"
     257      {offsetof(struct stringpool_t, stringpool_str30), "00878"},
     258  #line 62 "/Users/akim/src/gnu/bison/lib/iconv_open-zos.gperf"
     259      {offsetof(struct stringpool_t, stringpool_str31), "IBM-1125"},
     260  #line 52 "/Users/akim/src/gnu/bison/lib/iconv_open-zos.gperf"
     261      {offsetof(struct stringpool_t, stringpool_str32), "00865"},
     262  #line 33 "/Users/akim/src/gnu/bison/lib/iconv_open-zos.gperf"
     263      {offsetof(struct stringpool_t, stringpool_str33), "ISO8859-5"},
     264  #line 39 "/Users/akim/src/gnu/bison/lib/iconv_open-zos.gperf"
     265      {offsetof(struct stringpool_t, stringpool_str34), "ISO8859-15"},
     266  #line 71 "/Users/akim/src/gnu/bison/lib/iconv_open-zos.gperf"
     267      {offsetof(struct stringpool_t, stringpool_str35), "09448"},
     268  #line 47 "/Users/akim/src/gnu/bison/lib/iconv_open-zos.gperf"
     269      {offsetof(struct stringpool_t, stringpool_str36), "IBM-856"},
     270  #line 41 "/Users/akim/src/gnu/bison/lib/iconv_open-zos.gperf"
     271      {offsetof(struct stringpool_t, stringpool_str37), "01168"},
     272  #line 69 "/Users/akim/src/gnu/bison/lib/iconv_open-zos.gperf"
     273      {offsetof(struct stringpool_t, stringpool_str38), "IBM-5350"},
     274  #line 53 "/Users/akim/src/gnu/bison/lib/iconv_open-zos.gperf"
     275      {offsetof(struct stringpool_t, stringpool_str39), "04962"},
     276  #line 34 "/Users/akim/src/gnu/bison/lib/iconv_open-zos.gperf"
     277      {offsetof(struct stringpool_t, stringpool_str40), "ISO8859-6"},
     278  #line 61 "/Users/akim/src/gnu/bison/lib/iconv_open-zos.gperf"
     279      {offsetof(struct stringpool_t, stringpool_str41), "IBM-1124"},
     280  #line 51 "/Users/akim/src/gnu/bison/lib/iconv_open-zos.gperf"
     281      {offsetof(struct stringpool_t, stringpool_str42), "IBM-864"},
     282  #line 32 "/Users/akim/src/gnu/bison/lib/iconv_open-zos.gperf"
     283      {offsetof(struct stringpool_t, stringpool_str43), "ISO8859-4"},
     284  #line 66 "/Users/akim/src/gnu/bison/lib/iconv_open-zos.gperf"
     285      {offsetof(struct stringpool_t, stringpool_str44), "IBM-5347"},
     286  #line 43 "/Users/akim/src/gnu/bison/lib/iconv_open-zos.gperf"
     287      {offsetof(struct stringpool_t, stringpool_str45), "00775"},
     288  #line 58 "/Users/akim/src/gnu/bison/lib/iconv_open-zos.gperf"
     289      {offsetof(struct stringpool_t, stringpool_str46), "IBM-943"},
     290  #line 64 "/Users/akim/src/gnu/bison/lib/iconv_open-zos.gperf"
     291      {offsetof(struct stringpool_t, stringpool_str47), "01131"},
     292  #line 49 "/Users/akim/src/gnu/bison/lib/iconv_open-zos.gperf"
     293      {offsetof(struct stringpool_t, stringpool_str48), "IBM-861"},
     294  #line 29 "/Users/akim/src/gnu/bison/lib/iconv_open-zos.gperf"
     295      {offsetof(struct stringpool_t, stringpool_str49), "ISO8859-1"},
     296  #line 74 "/Users/akim/src/gnu/bison/lib/iconv_open-zos.gperf"
     297      {offsetof(struct stringpool_t, stringpool_str50), "01350"},
     298      {-1},
     299  #line 59 "/Users/akim/src/gnu/bison/lib/iconv_open-zos.gperf"
     300      {offsetof(struct stringpool_t, stringpool_str52), "IBM-1363"},
     301      {-1}, {-1},
     302  #line 55 "/Users/akim/src/gnu/bison/lib/iconv_open-zos.gperf"
     303      {offsetof(struct stringpool_t, stringpool_str55), "TIS-620"},
     304      {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
     305  #line 60 "/Users/akim/src/gnu/bison/lib/iconv_open-zos.gperf"
     306      {offsetof(struct stringpool_t, stringpool_str64), "IBM-1046"}
     307    };
     308  
     309  const struct mapping *
     310  mapping_lookup (register const char *str, register unsigned int len)
     311  {
     312    if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH)
     313      {
     314        unsigned int key = mapping_hash (str, len);
     315  
     316        if (key <= MAX_HASH_VALUE)
     317          {
     318            register int o = mappings[key].standard_name;
     319            if (o >= 0)
     320              {
     321                register const char *s = o + stringpool;
     322  
     323                if (*str == *s && !strcmp (str + 1, s + 1))
     324                  return &mappings[key];
     325              }
     326          }
     327      }
     328    return 0;
     329  }