Show
Ignore:
Timestamp:
2006年07月16日 08時36分52秒 (2 years ago)
Author:
miyoshi
Message:

Sync up with Emacs CVS HEAD.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/lib-src/etags.c

    r4073 r4111  
    4242 */ 
    4343 
    44 char pot_etags_version[] = "@(#) pot revision number is 17.17"; 
     44char pot_etags_version[] = "@(#) pot revision number is 17.18"; 
    4545 
    4646#define TRUE    1 
     
    24582458typedef,        0,                      st_C_typedef 
    24592459define,         0,                      st_C_define 
     2460undef,          0,                      st_C_define 
    24602461operator,       C_PLPL,                 st_C_operator 
    24612462template,       0,                      st_C_template 
     
    24762477/* C code produced by gperf version 3.0.1 */ 
    24772478/* Command-line: gperf -m 5  */ 
    2478 /* Computed positions: -k'1-2' */ 
     2479/* Computed positions: -k'2-3' */ 
    24792480 
    24802481struct C_stab_entry { char *name; int c_ext; enum sym_type type; }; 
    2481 /* maximum key range = 31, duplicates = 0 */ 
     2482/* maximum key range = 33, duplicates = 0 */ 
    24822483 
    24832484#ifdef __GNUC__ 
     
    24952496  static unsigned char asso_values[] = 
    24962497    { 
    2497       34, 34, 34, 34, 34, 34, 34, 34, 34, 34
    2498       34, 34, 34, 34, 34, 34, 34, 34, 34, 34
    2499       34, 34, 34, 34, 34, 34, 34, 34, 34, 34
    2500       34, 34, 34, 34, 34, 34, 34, 34, 34, 34
    2501       34, 34, 34, 34, 34, 34, 34, 34, 34, 34
    2502       34, 34, 34, 34, 34, 34, 34, 34, 34, 34
    2503       34, 34, 34, 34,  1, 34, 34, 34, 14, 14
    2504       34, 34, 34, 34, 34, 34, 34, 34, 13, 34
    2505       13, 34, 34, 12, 34, 34, 34, 34, 34, 11
    2506       34, 34, 34, 34, 34,  8, 34, 11, 34, 12
    2507       11,  0,  1, 34,  7,  0, 34, 34, 11,  9
    2508        0, 4,  0, 34,  7,  4, 14, 21, 34, 15
    2509        0,  2, 34, 34, 34, 34, 34, 34, 34, 34
    2510       34, 34, 34, 34, 34, 34, 34, 34, 34, 34
    2511       34, 34, 34, 34, 34, 34, 34, 34, 34, 34
    2512       34, 34, 34, 34, 34, 34, 34, 34, 34, 34
    2513       34, 34, 34, 34, 34, 34, 34, 34, 34, 34
    2514       34, 34, 34, 34, 34, 34, 34, 34, 34, 34
    2515       34, 34, 34, 34, 34, 34, 34, 34, 34, 34
    2516       34, 34, 34, 34, 34, 34, 34, 34, 34, 34
    2517       34, 34, 34, 34, 34, 34, 34, 34, 34, 34
    2518       34, 34, 34, 34, 34, 34, 34, 34, 34, 34
    2519       34, 34, 34, 34, 34, 34, 34, 34, 34, 34
    2520       34, 34, 34, 34, 34, 34, 34, 34, 34, 34
    2521       34, 34, 34, 34, 34, 34, 34, 34, 34, 34
    2522       34, 34, 34, 34, 34, 34 
     2498      35, 35, 35, 35, 35, 35, 35, 35, 35, 35
     2499      35, 35, 35, 35, 35, 35, 35, 35, 35, 35
     2500      35, 35, 35, 35, 35, 35, 35, 35, 35, 35
     2501      35, 35, 35, 35, 35, 35, 35, 35, 35, 35
     2502      35, 35, 35, 35, 35, 35, 35, 35, 35, 35
     2503      35, 35, 35, 35, 35, 35, 35, 35, 35, 35
     2504      35, 35, 35, 35, 35, 35, 35, 35, 35, 15
     2505      14, 35, 35, 35, 35, 35, 35, 35, 14, 35
     2506      35, 35, 35, 12, 13, 35, 35, 35, 35, 12
     2507      35, 35, 35, 35, 35,  1, 35, 16, 35,  6
     2508      23,  0,  0, 35, 22,  0, 35, 35,  5,  0
     2509       0, 15,  1, 35,  6, 35,  8, 19, 35, 16
     2510       4,  5, 35, 35, 35, 35, 35, 35, 35, 35
     2511      35, 35, 35, 35, 35, 35, 35, 35, 35, 35
     2512      35, 35, 35, 35, 35, 35, 35, 35, 35, 35
     2513      35, 35, 35, 35, 35, 35, 35, 35, 35, 35
     2514      35, 35, 35, 35, 35, 35, 35, 35, 35, 35
     2515      35, 35, 35, 35, 35, 35, 35, 35, 35, 35
     2516      35, 35, 35, 35, 35, 35, 35, 35, 35, 35
     2517      35, 35, 35, 35, 35, 35, 35, 35, 35, 35
     2518      35, 35, 35, 35, 35, 35, 35, 35, 35, 35
     2519      35, 35, 35, 35, 35, 35, 35, 35, 35, 35
     2520      35, 35, 35, 35, 35, 35, 35, 35, 35, 35
     2521      35, 35, 35, 35, 35, 35, 35, 35, 35, 35
     2522      35, 35, 35, 35, 35, 35, 35, 35, 35, 35
     2523      35, 35, 35, 35, 35, 35 
    25232524    }; 
    2524   return len + asso_values[(unsigned char)str[1]] + asso_values[(unsigned char)str[0]]; 
     2525  register int hval = len; 
     2526 
     2527  switch (hval) 
     2528    { 
     2529      default: 
     2530        hval += asso_values[(unsigned char)str[2]]; 
     2531      /*FALLTHROUGH*/ 
     2532      case 2: 
     2533        hval += asso_values[(unsigned char)str[1]]; 
     2534        break; 
     2535    } 
     2536  return hval; 
    25252537} 
    25262538 
     
    25322544  enum 
    25332545    { 
    2534       TOTAL_KEYWORDS = 31
     2546      TOTAL_KEYWORDS = 32
    25352547      MIN_WORD_LENGTH = 2, 
    25362548      MAX_WORD_LENGTH = 15, 
    2537       MIN_HASH_VALUE = 3
    2538       MAX_HASH_VALUE = 33 
     2549      MIN_HASH_VALUE = 2
     2550      MAX_HASH_VALUE = 34 
    25392551    }; 
    25402552 
    25412553  static struct C_stab_entry wordlist[] = 
    25422554    { 
    2543       {""}, {""}, {""}, 
     2555      {""}, {""}, 
    25442556      {"if",            0,                      st_C_ignore}, 
    2545       {"enum",         0,                      st_C_enum}, 
     2557      {""}, 
    25462558      {"@end",          0,                      st_C_objend}, 
     2559      {"union",         0,                      st_C_struct}, 
     2560      {"define",                0,                      st_C_define}, 
     2561      {"import",                (C_JAVA & !C_PLPL),     st_C_ignore}, 
     2562      {"template",      0,                      st_C_template}, 
     2563      {"operator",      C_PLPL,                 st_C_operator}, 
     2564      {"@interface",    0,                      st_C_objprot}, 
     2565      {"implements",    (C_JAVA & !C_PLPL),     st_C_javastruct}, 
     2566      {"friend",                C_PLPL,                 st_C_ignore}, 
     2567      {"typedef",       0,                      st_C_typedef}, 
     2568      {"return",                0,                      st_C_ignore}, 
     2569      {"@implementation",0,                     st_C_objimpl}, 
     2570      {"@protocol",     0,                      st_C_objprot}, 
     2571      {"interface",     (C_JAVA & !C_PLPL),     st_C_struct}, 
    25472572      {"extern",                0,                      st_C_extern}, 
    25482573      {"extends",       (C_JAVA & !C_PLPL),     st_C_javastruct}, 
     2574      {"struct",                0,                      st_C_struct}, 
     2575      {"domain",                C_STAR,                 st_C_struct}, 
     2576      {"switch",                0,                      st_C_ignore}, 
     2577      {"enum",          0,                      st_C_enum}, 
    25492578      {"for",           0,                      st_C_ignore}, 
    2550       {"interface",     (C_JAVA & !C_PLPL),     st_C_struct}, 
    2551       {"@protocol",     0,                      st_C_objprot}, 
    2552       {"@interface",    0,                      st_C_objprot}, 
    2553       {"operator",      C_PLPL,                 st_C_operator}, 
    2554       {"return",                0,                      st_C_ignore}, 
    2555       {"friend",                C_PLPL,                 st_C_ignore}, 
    2556       {"import",                (C_JAVA & !C_PLPL),     st_C_ignore}, 
    2557       {"@implementation",0,                     st_C_objimpl}, 
    2558       {"define",                0,                      st_C_define}, 
     2579      {"namespace",     C_PLPL,                 st_C_struct}, 
     2580      {"class",         0,                      st_C_class}, 
     2581      {"while",         0,                      st_C_ignore}, 
     2582      {"undef",         0,                      st_C_define}, 
    25592583      {"package",       (C_JAVA & !C_PLPL),     st_C_ignore}, 
    2560       {"implements",    (C_JAVA & !C_PLPL),     st_C_javastruct}, 
    2561       {"namespace",     C_PLPL,                 st_C_struct}, 
    2562       {"domain",                C_STAR,                 st_C_struct}, 
    2563       {"template",      0,                      st_C_template}, 
    2564       {"typedef",       0,                      st_C_typedef}, 
    2565       {"struct",                0,                      st_C_struct}, 
    2566       {"switch",                0,                      st_C_ignore}, 
    2567       {"union",         0,                      st_C_struct}, 
    2568       {"while",         0,                      st_C_ignore}, 
    2569       {"class",         0,                      st_C_class}, 
    25702584      {"__attribute__", 0,                      st_C_attribute}, 
    25712585      {"SYSCALL",       0,                      st_C_gnumacro}, 
     2586      {"ENTRY",         0,                      st_C_gnumacro}, 
    25722587      {"PSEUDO",                0,                      st_C_gnumacro}, 
    2573       {"ENTRY",         0,                      st_C_gnumacro}, 
    25742588      {"DEFUN",         0,                      st_C_gnumacro} 
    25752589    }; 
     
    67876801    } 
    67886802 
    6789   if (res[0] == '\0') 
    6790     return savestr ("/"); 
     6803  if (res[0] == '\0')           /* just a safety net: should never happen */ 
     6804    { 
     6805      free (res); 
     6806      return savestr ("/"); 
     6807    } 
    67916808  else 
    67926809    return res;