Esempio n. 1
0
__inline
#else
#ifdef __cplusplus
inline
#endif
#endif
/*ARGSUSED*/
static unsigned int
hash(OnigCodePoint codes[])
{
  static const unsigned short asso_values[] =
    {
         7,    5,   93,    4,    1,   16,  893, 1162,  891, 1085,
       889,  380,    8,  376, 1101,  332, 1100,  329, 1099,    3,
       874,  943,  870,  914,   87,  322, 1095,  317, 1093,  579,
         2,   11, 1054,   13,  956,  902,   31,  775,  632,  343,
       619,  330,  611,  323,    0,   27,  850,  311,  599,  309,
       849, 1240,  862, 1226,  445, 1220,  591,  888,  583, 1253,
      1091, 1217, 1087, 1079, 1074,  419,  858,  845,  441,  304,
       400,  842,  394, 1067,  389, 1053,  383, 1211,  218, 1206,
       202,  436,  194, 1202,  181, 1183,  153, 1177,  376, 1166,
       166,   56,  323,    0,  571,  112,  834,  877, 1035,  609,
       123,  901,  145,  684,  115,  933,  364, 1163,  345,  603,
       311,  144,  573,  162,  563, 1188,  260,  964,  240, 1174,
       476, 1034,  453,  814,  669,  454,  815,  799,  656, 1242,
       963,  113,  806,  270,  561,  304,  795,  268, 1031,  581,
      1157,  182,   44,  467, 1154, 1305, 1042, 1305, 1028,  387,
       869, 1305,  362, 1305, 1142, 1305,  639,  234, 1060, 1305,
      1131,  381,  190,  194,  780,  185,  140,   34,  209,  173,
      1021,  369, 1017,  145, 1150,  834,  788,  820, 1011,  116,
       773,  658, 1004, 1241,  767,   64,  762,  648,  756,  510,
       999,  487,  750,  254,  740,  625,  733,  662,  728,  992,
       720,  713,  533,  986,  515,  169,  427,  702,  266,  693,
       687,  644,  337,  963,  556,  954,  524,  947,  329,  942,
       288,  931,  229,  925,  104, 1143,   80,  908,   48, 1138,
        71, 1133,   59, 1131,  295,  605,  276,  525,  547, 1107,
       540,  406,  504,  156,  920,   93,  493,   84,  676,   34,
       247,    4, 1128,   14,   18,   32,  220,    2,  131
    };
  return asso_values[(unsigned char)onig_codes_byte_at(codes, 2)+3] + asso_values[(unsigned char)onig_codes_byte_at(codes, 1)] + asso_values[(unsigned char)onig_codes_byte_at(codes, 0)];
}
Esempio n. 2
0
__inline
#else
#ifdef __cplusplus
inline
#endif
#endif
/*ARGSUSED*/
static unsigned int
hash(OnigCodePoint codes[])
{
  static const unsigned char asso_values[] =
    {
       6,  3, 14, 14, 14, 14, 14, 14,  1, 14,
      14, 14, 14, 14, 14, 14, 14, 14, 14,  0,
      14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
      14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
      14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
      14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
      14, 14, 14, 14, 14, 14,  0, 14, 14, 14,
      14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
      14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
      14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
      14, 14,  4, 14, 14,  5, 14, 14,  4, 14,
      14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
      14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
      14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
      14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
      14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
      14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
      14, 14, 14, 14, 14, 14, 14, 10, 14, 14,
      14, 14, 14,  9, 14,  1, 14, 14, 14, 14,
      14, 14, 14, 14, 14, 14, 14,  0, 14, 14,
      14,  8, 14, 14, 14, 14, 14, 14, 14, 14,
      14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
      14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
      14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
      14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
      14, 14, 14, 14, 14, 14
    };
  return asso_values[(unsigned char)onig_codes_byte_at(codes, 8)] + asso_values[(unsigned char)onig_codes_byte_at(codes, 5)] + asso_values[(unsigned char)onig_codes_byte_at(codes, 2)];
}