48 |
* language map c\0.c.h\0java\0.java\0cpp\0.C.H\0 |
* language map c\0.c.h\0java\0.java\0cpp\0.C.H\0 |
49 |
*/ |
*/ |
50 |
void |
void |
51 |
setup_langmap(map) |
setup_langmap(const char *map) |
|
const char *map; |
|
52 |
{ |
{ |
53 |
char *p; |
char *p; |
54 |
int onsuffix = 0; /* not on suffix string */ |
int onsuffix = 0; /* not on suffix string */ |
75 |
* decide the language of the suffix. |
* decide the language of the suffix. |
76 |
*/ |
*/ |
77 |
const char * |
const char * |
78 |
decide_lang(suffix) |
decide_lang(const char *suffix) |
|
const char *suffix; |
|
79 |
{ |
{ |
80 |
const char *lang, *list, *tail; |
const char *lang, *list, *tail; |
81 |
|
|
98 |
* return true if suffix matches with one in suffix list. |
* return true if suffix matches with one in suffix list. |
99 |
*/ |
*/ |
100 |
static int |
static int |
101 |
match_suffix_list(suffix, list) |
match_suffix_list(const char *suffix, const char *list) |
|
const char *suffix; |
|
|
const char *list; |
|
102 |
{ |
{ |
103 |
while (*list) { |
while (*list) { |
104 |
if (locatestring(list, suffix, MATCH_AT_FIRST |
if (locatestring(list, suffix, MATCH_AT_FIRST |
117 |
* make the suffixes value from langmap value. |
* make the suffixes value from langmap value. |
118 |
*/ |
*/ |
119 |
void |
void |
120 |
make_suffixes(langmap, sb) |
make_suffixes(const char *langmap, STRBUF *sb) |
|
const char *langmap; |
|
|
STRBUF *sb; |
|
121 |
{ |
{ |
122 |
const char *p; |
const char *p; |
123 |
int onsuffix = 0; /* not on suffix string */ |
int onsuffix = 0; /* not on suffix string */ |