Changeset 4111 for trunk/lib-src/etags.c
- Timestamp:
- 2006年07月16日 08時36分52秒 (2 years ago)
- Files:
-
- trunk/lib-src/etags.c (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/lib-src/etags.c
r4073 r4111 42 42 */ 43 43 44 char pot_etags_version[] = "@(#) pot revision number is 17.1 7";44 char pot_etags_version[] = "@(#) pot revision number is 17.18"; 45 45 46 46 #define TRUE 1 … … 2458 2458 typedef, 0, st_C_typedef 2459 2459 define, 0, st_C_define 2460 undef, 0, st_C_define 2460 2461 operator, C_PLPL, st_C_operator 2461 2462 template, 0, st_C_template … … 2476 2477 /* C code produced by gperf version 3.0.1 */ 2477 2478 /* Command-line: gperf -m 5 */ 2478 /* Computed positions: -k' 1-2' */2479 /* Computed positions: -k'2-3' */ 2479 2480 2480 2481 struct C_stab_entry { char *name; int c_ext; enum sym_type type; }; 2481 /* maximum key range = 3 1, duplicates = 0 */2482 /* maximum key range = 33, duplicates = 0 */ 2482 2483 2483 2484 #ifdef __GNUC__ … … 2495 2496 static unsigned char asso_values[] = 2496 2497 { 2497 3 4, 34, 34, 34, 34, 34, 34, 34, 34, 34,2498 3 4, 34, 34, 34, 34, 34, 34, 34, 34, 34,2499 3 4, 34, 34, 34, 34, 34, 34, 34, 34, 34,2500 3 4, 34, 34, 34, 34, 34, 34, 34, 34, 34,2501 3 4, 34, 34, 34, 34, 34, 34, 34, 34, 34,2502 3 4, 34, 34, 34, 34, 34, 34, 34, 34, 34,2503 3 4, 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 3 4, 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 3 4, 34, 34, 34, 34, 34, 34, 34, 34, 34,2511 3 4, 34, 34, 34, 34, 34, 34, 34, 34, 34,2512 3 4, 34, 34, 34, 34, 34, 34, 34, 34, 34,2513 3 4, 34, 34, 34, 34, 34, 34, 34, 34, 34,2514 3 4, 34, 34, 34, 34, 34, 34, 34, 34, 34,2515 3 4, 34, 34, 34, 34, 34, 34, 34, 34, 34,2516 3 4, 34, 34, 34, 34, 34, 34, 34, 34, 34,2517 3 4, 34, 34, 34, 34, 34, 34, 34, 34, 34,2518 3 4, 34, 34, 34, 34, 34, 34, 34, 34, 34,2519 3 4, 34, 34, 34, 34, 34, 34, 34, 34, 34,2520 3 4, 34, 34, 34, 34, 34, 34, 34, 34, 34,2521 3 4, 34, 34, 34, 34, 34, 34, 34, 34, 34,2522 3 4, 34, 34, 34, 34, 342498 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 2523 2524 }; 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; 2525 2537 } 2526 2538 … … 2532 2544 enum 2533 2545 { 2534 TOTAL_KEYWORDS = 3 1,2546 TOTAL_KEYWORDS = 32, 2535 2547 MIN_WORD_LENGTH = 2, 2536 2548 MAX_WORD_LENGTH = 15, 2537 MIN_HASH_VALUE = 3,2538 MAX_HASH_VALUE = 3 32549 MIN_HASH_VALUE = 2, 2550 MAX_HASH_VALUE = 34 2539 2551 }; 2540 2552 2541 2553 static struct C_stab_entry wordlist[] = 2542 2554 { 2543 {""}, {""}, {""},2555 {""}, {""}, 2544 2556 {"if", 0, st_C_ignore}, 2545 {" enum", 0, st_C_enum},2557 {""}, 2546 2558 {"@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}, 2547 2572 {"extern", 0, st_C_extern}, 2548 2573 {"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}, 2549 2578 {"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}, 2559 2583 {"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},2570 2584 {"__attribute__", 0, st_C_attribute}, 2571 2585 {"SYSCALL", 0, st_C_gnumacro}, 2586 {"ENTRY", 0, st_C_gnumacro}, 2572 2587 {"PSEUDO", 0, st_C_gnumacro}, 2573 {"ENTRY", 0, st_C_gnumacro},2574 2588 {"DEFUN", 0, st_C_gnumacro} 2575 2589 }; … … 6787 6801 } 6788 6802 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 } 6791 6808 else 6792 6809 return res;
