예제 #1
0
파일: htmltags.c 프로젝트: Fat-Zer/tdelibs
__inline
#endif
const struct tags *
findTag (register const char *str, register unsigned int len)
{
  enum
    {
      TOTAL_KEYWORDS = 105,
      MIN_WORD_LENGTH = 1,
      MAX_WORD_LENGTH = 10,
      MIN_HASH_VALUE = 1,
      MAX_HASH_VALUE = 345
    };

  static const unsigned char lengthtable[] =
    {
       1,  2,  1,  2,  1,  2,  3,  1,  2,  2,  3,  4,  3,  4,
       5,  2,  4,  5,  1,  2,  3,  4,  3,  4,  5,  1,  3,  4,
       2,  8,  4,  5,  6,  7,  3,  4,  5,  6,  2,  3,  4,  5,
       2,  3,  5,  2,  3,  5,  6,  2,  3,  4,  5,  6,  7,  8,
       1,  2,  3,  4,  5,  2,  4,  6,  2,  3,  5,  6,  2,  8,
       2,  8,  4,  6,  2,  7,  8,  2,  3,  3,  9,  5,  6,  4,
       5,  8,  7,  4,  7,  3,  4,  7,  7,  5,  6,  6,  6,  7,
       3,  6,  8,  6,  6,  8, 10
    };
  static const struct tags wordlist_tag[] =
    {
#line 87 "htmltags.gperf"
      {(int)(long)&((struct spool_Tag_t *)0)->spool_Tag_str0, ID_S},
#line 106 "htmltags.gperf"
      {(int)(long)&((struct spool_Tag_t *)0)->spool_Tag_str1, ID_TR},
#line 82 "htmltags.gperf"
      {(int)(long)&((struct spool_Tag_t *)0)->spool_Tag_str2, ID_P},
#line 100 "htmltags.gperf"
      {(int)(long)&((struct spool_Tag_t *)0)->spool_Tag_str3, ID_TD},
#line 17 "htmltags.gperf"
      {(int)(long)&((struct spool_Tag_t *)0)->spool_Tag_str4, ID_B},
#line 24 "htmltags.gperf"
      {(int)(long)&((struct spool_Tag_t *)0)->spool_Tag_str5, ID_BR},
#line 85 "htmltags.gperf"
      {(int)(long)&((struct spool_Tag_t *)0)->spool_Tag_str6, ID_PRE},
#line 11 "htmltags.gperf"
      {(int)(long)&((struct spool_Tag_t *)0)->spool_Tag_str7, ID_A},
#line 32 "htmltags.gperf"
      {(int)(long)&((struct spool_Tag_t *)0)->spool_Tag_str8, ID_DD},
#line 37 "htmltags.gperf"
      {(int)(long)&((struct spool_Tag_t *)0)->spool_Tag_str9, ID_DL},
#line 33 "htmltags.gperf"
      {(int)(long)&((struct spool_Tag_t *)0)->spool_Tag_str10, ID_DEL},
#line 18 "htmltags.gperf"
      {(int)(long)&((struct spool_Tag_t *)0)->spool_Tag_str11, ID_BASE},
#line 69 "htmltags.gperf"
      {(int)(long)&((struct spool_Tag_t *)0)->spool_Tag_str12, ID_MAP},
#line 88 "htmltags.gperf"
      {(int)(long)&((struct spool_Tag_t *)0)->spool_Tag_str13, ID_SAMP},
#line 98 "htmltags.gperf"
      {(int)(long)&((struct spool_Tag_t *)0)->spool_Tag_str14, ID_TABLE},
#line 39 "htmltags.gperf"
      {(int)(long)&((struct spool_Tag_t *)0)->spool_Tag_str15, ID_EM},
#line 16 "htmltags.gperf"
      {(int)(long)&((struct spool_Tag_t *)0)->spool_Tag_str16, ID_AREA},
#line 64 "htmltags.gperf"
      {(int)(long)&((struct spool_Tag_t *)0)->spool_Tag_str17, ID_LABEL},
#line 55 "htmltags.gperf"
      {(int)(long)&((struct spool_Tag_t *)0)->spool_Tag_str18, ID_I},
#line 103 "htmltags.gperf"
      {(int)(long)&((struct spool_Tag_t *)0)->spool_Tag_str19, ID_TH},
#line 34 "htmltags.gperf"
      {(int)(long)&((struct spool_Tag_t *)0)->spool_Tag_str20, ID_DFN},
#line 72 "htmltags.gperf"
      {(int)(long)&((struct spool_Tag_t *)0)->spool_Tag_str21, ID_META},
#line 30 "htmltags.gperf"
      {(int)(long)&((struct spool_Tag_t *)0)->spool_Tag_str22, ID_COL},
#line 42 "htmltags.gperf"
      {(int)(long)&((struct spool_Tag_t *)0)->spool_Tag_str23, ID_FONT},
#line 44 "htmltags.gperf"
      {(int)(long)&((struct spool_Tag_t *)0)->spool_Tag_str24, ID_FRAME},
#line 86 "htmltags.gperf"
      {(int)(long)&((struct spool_Tag_t *)0)->spool_Tag_str25, ID_Q},
#line 112 "htmltags.gperf"
      {(int)(long)&((struct spool_Tag_t *)0)->spool_Tag_str26, ID_XMP},
#line 43 "htmltags.gperf"
      {(int)(long)&((struct spool_Tag_t *)0)->spool_Tag_str27, ID_FORM},
#line 53 "htmltags.gperf"
      {(int)(long)&((struct spool_Tag_t *)0)->spool_Tag_str28, ID_HR},
#line 45 "htmltags.gperf"
      {(int)(long)&((struct spool_Tag_t *)0)->spool_Tag_str29, ID_FRAMESET},
#line 29 "htmltags.gperf"
      {(int)(long)&((struct spool_Tag_t *)0)->spool_Tag_str30, ID_CODE},
#line 91 "htmltags.gperf"
      {(int)(long)&((struct spool_Tag_t *)0)->spool_Tag_str31, ID_SMALL},
#line 90 "htmltags.gperf"
      {(int)(long)&((struct spool_Tag_t *)0)->spool_Tag_str32, ID_SELECT},
#line 14 "htmltags.gperf"
      {(int)(long)&((struct spool_Tag_t *)0)->spool_Tag_str33, ID_ADDRESS},
#line 111 "htmltags.gperf"
      {(int)(long)&((struct spool_Tag_t *)0)->spool_Tag_str34, ID_WBR},
#line 23 "htmltags.gperf"
      {(int)(long)&((struct spool_Tag_t *)0)->spool_Tag_str35, ID_BODY},
#line 40 "htmltags.gperf"
      {(int)(long)&((struct spool_Tag_t *)0)->spool_Tag_str36, ID_EMBED},
#line 66 "htmltags.gperf"
      {(int)(long)&((struct spool_Tag_t *)0)->spool_Tag_str37, ID_LEGEND},
#line 79 "htmltags.gperf"
      {(int)(long)&((struct spool_Tag_t *)0)->spool_Tag_str38, ID_OL},
#line 20 "htmltags.gperf"
      {(int)(long)&((struct spool_Tag_t *)0)->spool_Tag_str39, ID_BDO},
#line 73 "htmltags.gperf"
      {(int)(long)&((struct spool_Tag_t *)0)->spool_Tag_str40, ID_NOBR},
#line 83 "htmltags.gperf"
      {(int)(long)&((struct spool_Tag_t *)0)->spool_Tag_str41, ID_PARAM},
#line 51 "htmltags.gperf"
      {(int)(long)&((struct spool_Tag_t *)0)->spool_Tag_str42, ID_H6},
#line 58 "htmltags.gperf"
      {(int)(long)&((struct spool_Tag_t *)0)->spool_Tag_str43, ID_IMG},
#line 104 "htmltags.gperf"
      {(int)(long)&((struct spool_Tag_t *)0)->spool_Tag_str44, ID_THEAD},
#line 67 "htmltags.gperf"
      {(int)(long)&((struct spool_Tag_t *)0)->spool_Tag_str45, ID_LI},
#line 62 "htmltags.gperf"
      {(int)(long)&((struct spool_Tag_t *)0)->spool_Tag_str46, ID_KBD},
#line 65 "htmltags.gperf"
      {(int)(long)&((struct spool_Tag_t *)0)->spool_Tag_str47, ID_LAYER},
#line 89 "htmltags.gperf"
      {(int)(long)&((struct spool_Tag_t *)0)->spool_Tag_str48, ID_SCRIPT},
#line 50 "htmltags.gperf"
      {(int)(long)&((struct spool_Tag_t *)0)->spool_Tag_str49, ID_H5},
#line 21 "htmltags.gperf"
      {(int)(long)&((struct spool_Tag_t *)0)->spool_Tag_str50, ID_BIG},
#line 12 "htmltags.gperf"
      {(int)(long)&((struct spool_Tag_t *)0)->spool_Tag_str51, ID_ABBR},
#line 105 "htmltags.gperf"
      {(int)(long)&((struct spool_Tag_t *)0)->spool_Tag_str52, ID_TITLE},
#line 15 "htmltags.gperf"
      {(int)(long)&((struct spool_Tag_t *)0)->spool_Tag_str53, ID_APPLET},
#line 74 "htmltags.gperf"
      {(int)(long)&((struct spool_Tag_t *)0)->spool_Tag_str54, ID_NOEMBED},
#line 101 "htmltags.gperf"
      {(int)(long)&((struct spool_Tag_t *)0)->spool_Tag_str55, ID_TEXTAREA},
#line 108 "htmltags.gperf"
      {(int)(long)&((struct spool_Tag_t *)0)->spool_Tag_str56, ID_U},
#line 107 "htmltags.gperf"
      {(int)(long)&((struct spool_Tag_t *)0)->spool_Tag_str57, ID_TT},
#line 60 "htmltags.gperf"
      {(int)(long)&((struct spool_Tag_t *)0)->spool_Tag_str58, ID_INS},
#line 52 "htmltags.gperf"
      {(int)(long)&((struct spool_Tag_t *)0)->spool_Tag_str59, ID_HEAD},
#line 114 "htmltags.gperf"
      {(int)(long)&((struct spool_Tag_t *)0)->spool_Tag_str60, ID_IMG},
#line 49 "htmltags.gperf"
      {(int)(long)&((struct spool_Tag_t *)0)->spool_Tag_str61, ID_H4},
#line 92 "htmltags.gperf"
      {(int)(long)&((struct spool_Tag_t *)0)->spool_Tag_str62, ID_SPAN},
#line 56 "htmltags.gperf"
      {(int)(long)&((struct spool_Tag_t *)0)->spool_Tag_str63, ID_IFRAME},
#line 38 "htmltags.gperf"
      {(int)(long)&((struct spool_Tag_t *)0)->spool_Tag_str64, ID_DT},
#line 35 "htmltags.gperf"
      {(int)(long)&((struct spool_Tag_t *)0)->spool_Tag_str65, ID_DIR},
#line 102 "htmltags.gperf"
      {(int)(long)&((struct spool_Tag_t *)0)->spool_Tag_str66, ID_TFOOT},
#line 27 "htmltags.gperf"
      {(int)(long)&((struct spool_Tag_t *)0)->spool_Tag_str67, ID_CENTER},
#line 109 "htmltags.gperf"
      {(int)(long)&((struct spool_Tag_t *)0)->spool_Tag_str68, ID_UL},
#line 75 "htmltags.gperf"
      {(int)(long)&((struct spool_Tag_t *)0)->spool_Tag_str69, ID_NOFRAMES},
#line 48 "htmltags.gperf"
      {(int)(long)&((struct spool_Tag_t *)0)->spool_Tag_str70, ID_H3},
#line 41 "htmltags.gperf"
      {(int)(long)&((struct spool_Tag_t *)0)->spool_Tag_str71, ID_FIELDSET},
#line 28 "htmltags.gperf"
      {(int)(long)&((struct spool_Tag_t *)0)->spool_Tag_str72, ID_CITE},
#line 63 "htmltags.gperf"
      {(int)(long)&((struct spool_Tag_t *)0)->spool_Tag_str73, ID_KEYGEN},
#line 47 "htmltags.gperf"
      {(int)(long)&((struct spool_Tag_t *)0)->spool_Tag_str74, ID_H2},
#line 77 "htmltags.gperf"
      {(int)(long)&((struct spool_Tag_t *)0)->spool_Tag_str75, ID_NOLAYER},
#line 19 "htmltags.gperf"
      {(int)(long)&((struct spool_Tag_t *)0)->spool_Tag_str76, ID_BASEFONT},
#line 46 "htmltags.gperf"
      {(int)(long)&((struct spool_Tag_t *)0)->spool_Tag_str77, ID_H1},
#line 97 "htmltags.gperf"
      {(int)(long)&((struct spool_Tag_t *)0)->spool_Tag_str78, ID_SUP},
#line 96 "htmltags.gperf"
      {(int)(long)&((struct spool_Tag_t *)0)->spool_Tag_str79, ID_SUB},
#line 84 "htmltags.gperf"
      {(int)(long)&((struct spool_Tag_t *)0)->spool_Tag_str80, ID_PLAINTEXT},
#line 99 "htmltags.gperf"
      {(int)(long)&((struct spool_Tag_t *)0)->spool_Tag_str81, ID_TBODY},
#line 57 "htmltags.gperf"
      {(int)(long)&((struct spool_Tag_t *)0)->spool_Tag_str82, ID_ILAYER},
#line 68 "htmltags.gperf"
      {(int)(long)&((struct spool_Tag_t *)0)->spool_Tag_str83, ID_LINK},
#line 95 "htmltags.gperf"
      {(int)(long)&((struct spool_Tag_t *)0)->spool_Tag_str84, ID_STYLE},
#line 76 "htmltags.gperf"
      {(int)(long)&((struct spool_Tag_t *)0)->spool_Tag_str85, ID_NOSCRIPT},
#line 61 "htmltags.gperf"
      {(int)(long)&((struct spool_Tag_t *)0)->spool_Tag_str86, ID_ISINDEX},
#line 71 "htmltags.gperf"
      {(int)(long)&((struct spool_Tag_t *)0)->spool_Tag_str87, ID_MENU},
#line 115 "htmltags.gperf"
      {(int)(long)&((struct spool_Tag_t *)0)->spool_Tag_str88, ID_PRE},
#line 110 "htmltags.gperf"
      {(int)(long)&((struct spool_Tag_t *)0)->spool_Tag_str89, ID_VAR},
#line 54 "htmltags.gperf"
      {(int)(long)&((struct spool_Tag_t *)0)->spool_Tag_str90, ID_HTML},
#line 26 "htmltags.gperf"
      {(int)(long)&((struct spool_Tag_t *)0)->spool_Tag_str91, ID_CAPTION},
#line 13 "htmltags.gperf"
      {(int)(long)&((struct spool_Tag_t *)0)->spool_Tag_str92, ID_ACRONYM},
#line 59 "htmltags.gperf"
      {(int)(long)&((struct spool_Tag_t *)0)->spool_Tag_str93, ID_INPUT},
#line 93 "htmltags.gperf"
      {(int)(long)&((struct spool_Tag_t *)0)->spool_Tag_str94, ID_STRIKE},
#line 94 "htmltags.gperf"
      {(int)(long)&((struct spool_Tag_t *)0)->spool_Tag_str95, ID_STRONG},
#line 78 "htmltags.gperf"
      {(int)(long)&((struct spool_Tag_t *)0)->spool_Tag_str96, ID_OBJECT},
#line 70 "htmltags.gperf"
      {(int)(long)&((struct spool_Tag_t *)0)->spool_Tag_str97, ID_MARQUEE},
#line 36 "htmltags.gperf"
      {(int)(long)&((struct spool_Tag_t *)0)->spool_Tag_str98, ID_DIV},
#line 25 "htmltags.gperf"
      {(int)(long)&((struct spool_Tag_t *)0)->spool_Tag_str99, ID_BUTTON},
#line 31 "htmltags.gperf"
      {(int)(long)&((struct spool_Tag_t *)0)->spool_Tag_str100, ID_COLGROUP},
#line 81 "htmltags.gperf"
      {(int)(long)&((struct spool_Tag_t *)0)->spool_Tag_str101, ID_OPTION},
#line 113 "htmltags.gperf"
      {(int)(long)&((struct spool_Tag_t *)0)->spool_Tag_str102, ID_A},
#line 80 "htmltags.gperf"
      {(int)(long)&((struct spool_Tag_t *)0)->spool_Tag_str103, ID_OPTGROUP},
#line 22 "htmltags.gperf"
      {(int)(long)&((struct spool_Tag_t *)0)->spool_Tag_str104, ID_BLOCKQUOTE}
    };

  static const signed char lookup[] =
    {
       -1,   0,   1,  -1,  -1,  -1,   2,   3,  -1,  -1,
       -1,   4,   5,   6,  -1,  -1,   7,   8,  -1,  -1,
       -1,  -1,  -1,  -1,  -1,  -1,  -1,   9,  10,  11,
       -1,  -1,  -1,  12,  13,  14,  -1,  15,  -1,  16,
       17,  18,  19,  20,  21,  -1,  -1,  -1,  22,  23,
       24,  25,  -1,  26,  27,  -1,  -1,  28,  29,  30,
       31,  32,  33,  34,  35,  36,  37,  38,  39,  40,
       41,  -1,  42,  43,  -1,  44,  -1,  45,  46,  -1,
       47,  48,  49,  50,  51,  52,  53,  54,  55,  -1,
       -1,  56,  57,  58,  59,  60,  -1,  61,  -1,  62,
       -1,  63,  64,  65,  -1,  66,  67,  68,  69,  -1,
       -1,  -1,  70,  71,  72,  -1,  73,  74,  -1,  -1,
       -1,  -1,  75,  76,  -1,  -1,  -1,  77,  78,  -1,
       -1,  -1,  -1,  79,  80,  81,  82,  -1,  -1,  83,
       84,  -1,  -1,  85,  -1,  -1,  -1,  86,  -1,  87,
       -1,  -1,  88,  89,  -1,  -1,  -1,  -1,  -1,  -1,
       -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  90,
       -1,  -1,  -1,  -1,  -1,  -1,  -1,  91,  -1,  -1,
       -1,  -1,  92,  -1,  -1,  -1,  -1,  -1,  -1,  -1,
       93,  94,  -1,  -1,  -1,  -1,  95,  -1,  -1,  -1,
       -1,  96,  97,  98,  -1,  -1,  -1,  -1,  -1,  -1,
       -1,  -1,  -1,  -1,  -1,  -1,  99,  -1, 100,  -1,
       -1,  -1,  -1,  -1,  -1,  -1, 101,  -1,  -1,  -1,
       -1, 102,  -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, 103,  -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, 104
    };

  if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH)
    {
      register int key = hash_tag (str, len);

      if (key <= MAX_HASH_VALUE && key >= 0)
        {
          register int index = lookup[key];

          if (index >= 0)
            {
              if (len == lengthtable[index])
                {
                  register const char *s = wordlist_tag[index].name + spool_Tag;

                  if (*str == *s && !memcmp (str + 1, s + 1, len - 1))
                    return &wordlist_tag[index];
                }
            }
        }
    }
  return 0;
}
예제 #2
0
__inline
#endif
const struct tags *
findTag (register const char *str, register unsigned int len)
{
  enum
    {
      TOTAL_KEYWORDS = 97,
      MIN_WORD_LENGTH = 1,
      MAX_WORD_LENGTH = 10,
      MIN_HASH_VALUE = 1,
      MAX_HASH_VALUE = 295
    };

  static const unsigned char lengthtable[] =
    {
       1,  2,  2,  4,  1,  2,  3,  1,  2,  2,  8,  1,  2,  2,
       3,  5,  6,  2,  3,  5,  6,  2,  3,  5,  6,  3,  4,  5,
       1,  3,  4,  5,  2,  4,  5,  1,  7,  3,  2,  3,  5,  3,
       3,  4,  5,  6,  8,  3,  4,  5,  3,  5,  6,  7,  4,  5,
       4,  1,  4,  6,  2,  4,  2,  6,  2,  4,  6,  7,  4,  2,
       4,  5,  2,  3,  2,  2,  2,  5,  8,  4,  7,  3,  4,  8,
       5,  3,  7,  6,  7,  6,  8,  8,  8,  6,  8,  7, 10
    };
  static const struct tags wordlist_tag[] =
    {
      {"a", ID_A},
      {"tt", ID_TT},
      {"tr", ID_TR},
      {"area", ID_AREA},
      {"p", ID_P},
      {"ol", ID_OL},
      {"pre", ID_PRE},
      {"b", ID_B},
      {"dt", ID_DT},
      {"td", ID_TD},
      {"textarea", ID_TEXTAREA},
      {"i", ID_I},
      {"br", ID_BR},
      {"dl", ID_DL},
      {"del", ID_DEL},
      {"table", ID_TABLE},
      {"applet", ID_APPLET},
      {"li", ID_LI},
      {"var", ID_VAR},
      {"title", ID_TITLE},
      {"legend", ID_LEGEND},
      {"dd", ID_DD},
      {"bdo", ID_BDO},
      {"label", ID_LABEL},
      {"option", ID_OPTION},
      {"big", ID_BIG},
      {"abbr", ID_ABBR},
      {"tfoot", ID_TFOOT},
      {"q", ID_Q},
      {"dir", ID_DIR},
      {"font", ID_FONT},
      {"plain", ID_PLAIN},
      {"em", ID_EM},
      {"meta", ID_META},
      {"layer", ID_LAYER},
      {"u", ID_U},
      {"nolayer", ID_NOLAYER},
      {"map", ID_MAP},
      {"ul", ID_UL},
      {"dfn", ID_DFN},
      {"param", ID_PARAM},
      {"div", ID_DIV},
      {"img", ID_IMG},
      {"body", ID_BODY},
      {"tbody", ID_TBODY},
      {"button", ID_BUTTON},
      {"optgroup", ID_OPTGROUP},
      {"kbd", ID_KBD},
      {"link", ID_LINK},
      {"embed", ID_EMBED},
      {"col", ID_COL},
      {"input", ID_INPUT},
      {"center", ID_CENTER},
      {"noembed", ID_NOEMBED},
      {"form", ID_FORM},
      {"frame", ID_FRAME},
      {"code", ID_CODE},
      {"s", ID_S},
      {"cite", ID_CITE},
      {"object", ID_OBJECT},
      {"th", ID_TH},
      {"menu", ID_MENU},
      {"hr", ID_HR},
      {"strong", ID_STRONG},
      {"h5", ID_H5},
      {"span", ID_SPAN},
      {"iframe", ID_IFRAME},
      {"caption", ID_CAPTION},
      {"base", ID_BASE},
      {"h6", ID_H6},
      {"head", ID_HEAD},
      {"thead", ID_THEAD},
      {"h2", ID_H2},
      {"ins", ID_INS},
      {"h3", ID_H3},
      {"h4", ID_H4},
      {"h1", ID_H1},
      {"style", ID_STYLE},
      {"colgroup", ID_COLGROUP},
      {"samp", ID_SAMP},
      {"listing", ID_LISTING},
      {"sup", ID_SUP},
      {"html", ID_HTML},
      {"basefont", ID_BASEFONT},
      {"small", ID_SMALL},
      {"sub", ID_SUB},
      {"acronym", ID_ACRONYM},
      {"strike", ID_STRIKE},
      {"isindex", ID_ISINDEX},
      {"select", ID_SELECT},
      {"fieldset", ID_FIELDSET},
      {"frameset", ID_FRAMESET},
      {"noframes", ID_NOFRAMES},
      {"script", ID_SCRIPT},
      {"noscript", ID_NOSCRIPT},
      {"address", ID_ADDRESS},
      {"blockquote", ID_BLOCKQUOTE}
    };

  static const signed char lookup[] =
    {
        -1,    0,    1,   -1,   -1,   -1,   -1,    2,
        -1,    3,   -1,    4,    5,   -1,   -1,   -1,
        -1,   -1,    6,   -1,   -1,    7, -122,   10,
       -89,   -2,   11,   12,   -1,   -1,   -1,   -1,
        13,   14,   -1,   15,   16,   17,   18,   -1,
        19,   20,   21,   22,   -1,   23,   24,   -1,
        25,   26,   27,   28,   -1,   29,   30,   31,
        -1,   32,   -1,   33,   34,   35,   -1,   -1,
        -1,   -1,   -1,   36,   37,   -1,   -1,   -1,
        38,   39,   -1,   40,   -1,   -1,   41,   -1,
        -1,   -1,   -1,   42,   43,   44,   -1,   -1,
        -1,   -1,   -1,   45,   -1,   46,   -1,   -1,
        -1,   -1,   47,   48,   49,   -1,   -1,   50,
        -1,   51,   52,   53,   -1,   54,   55,   -1,
        -1,   -1,   56,   -1,   57,   -1,   -1,   58,
        -1,   59,   60,   -1,   61,   -1,   -1,   62,
        -1,   -1,   -1,   63,   64,   -1,   65,   -1,
        66,   67,   -1,   68,   -1,   -1,   69,   -1,
        70,   71,   -1,   72,   73,   -1,   -1,   -1,
        74,   -1,   -1,   -1,   -1,   75,   -1,   -1,
        -1,   -1,   76,   -1,   -1,   -1,   -1,   -1,
        -1,   -1,   77,   -1,   -1,   -1,   -1,   -1,
        -1,   -1,   -1,   -1,   -1,   -1,   -1,   78,
        79,   -1,   -1,   80,   81,   82,   -1,   -1,
        -1,   83,   -1,   84,   -1,   -1,   85,   -1,
        -1,   -1,   86,   -1,   -1,   -1,   87,   88,
        -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
        -1,   -1,   -1,   -1,   -1,   89,   -1,   90,
        -1,   -1,   -1,   -1,   91,   -1,   -1,   -1,
        -1,   92,   -1,   -1,   -1,   -1,   -1,   -1,
        -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
        -1,   -1,   -1,   93,   -1,   -1,   -1,   -1,
        -1,   -1,   94,   -1,   -1,   -1,   -1,   -1,
        -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
        -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
        -1,   -1,   95,   -1,   -1,   -1,   -1,   -1,
        -1,   -1,   -1,   -1,   -1,   -1,   -1,   96
    };

  if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH)
    {
      register int key = hash_tag (str, len);

      if (key <= MAX_HASH_VALUE && key >= 0)
        {
          register int index = lookup[key];

          if (index >= 0)
            {
              if (len == lengthtable[index])
                {
                  register const char *s = wordlist_tag[index].name;

                  if (*str == *s && !strcmp (str + 1, s + 1))
                    return &wordlist_tag[index];
                }
            }
          else if (index < -TOTAL_KEYWORDS)
            {
              register int offset = - 1 - TOTAL_KEYWORDS - index;
              register const unsigned char *lengthptr = &lengthtable[TOTAL_KEYWORDS + lookup[offset]];
              register const struct tags *wordptr = &wordlist_tag[TOTAL_KEYWORDS + lookup[offset]];
              register const struct tags *wordendptr = wordptr + -lookup[offset + 1];

              while (wordptr < wordendptr)
                {
                  if (len == *lengthptr)
                    {
                      register const char *s = wordptr->name;

                      if (*str == *s && !strcmp (str + 1, s + 1))
                        return wordptr;
                    }
                  lengthptr++;
                  wordptr++;
                }
            }
        }
    }
  return 0;
}