/[global]/global/libutil/langmap.c
ViewVC logotype

Diff of /global/libutil/langmap.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.6 by shigio, Tue May 10 05:17:52 2005 UTC revision 1.7 by shigio, Tue Oct 4 07:59:04 2005 UTC
# Line 48  static STRBUF *active_map; Line 48  static STRBUF *active_map;
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 */
# Line 76  setup_langmap(map) Line 75  setup_langmap(map)
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    
# Line 100  decide_lang(suffix) Line 98  decide_lang(suffix)
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
# Line 121  match_suffix_list(suffix, list) Line 117  match_suffix_list(suffix, list)
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 */

Legend:
Removed from v.1.6  
changed lines
  Added in v.1.7

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26