/[global]/global/htags/fileindex.c
ViewVC logotype

Diff of /global/htags/fileindex.c

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

revision 1.31 by shigio, Sun Apr 3 10:54:51 2005 UTC revision 1.32 by shigio, Mon Apr 4 01:05:08 2005 UTC
# Line 936  makeincludeindex() Line 936  makeincludeindex()
936          strbuf_reset(input);          strbuf_reset(input);
937          while ((_ = strbuf_fgets(input, PIPE, STRBUF_NOCRLF)) != NULL) {          while ((_ = strbuf_fgets(input, PIPE, STRBUF_NOCRLF)) != NULL) {
938                  SPLIT ptable;                  SPLIT ptable;
                 char *nouse, *lno, *filename, *image;  
939                  char *last, buf[MAXBUFLEN];                  char *last, buf[MAXBUFLEN];
940                  int is_php = 0;                  int is_php = 0;
941                  const char *lang, *suffix;                  const char *lang, *suffix;
# Line 945  makeincludeindex() Line 944  makeincludeindex()
944                          recover(&ptable);                          recover(&ptable);
945                          die("too small number of parts in makefileindex().");                          die("too small number of parts in makefileindex().");
946                  }                  }
947                  nouse = ptable.part[0].start;                  if ((suffix = locatestring(ptable.part[PART_PATH].start, ".", MATCH_LAST)) != NULL
                 lno = ptable.part[1].start;  
                 filename = ptable.part[2].start;  
                 image = ptable.part[3].start;  
   
                 if ((suffix = locatestring(filename, ".", MATCH_LAST)) != NULL  
948                      && (lang = decide_lang(suffix)) != NULL                      && (lang = decide_lang(suffix)) != NULL
949                      && strcmp(lang, "php") == 0)                      && strcmp(lang, "php") == 0)
950                          is_php = 1;                          is_php = 1;
951                  last = extract_lastname(image, is_php);                  last = extract_lastname(ptable.part[PART_LINE].start, is_php);
952                  if (last == NULL || get_inc(last) == NULL)                  if (last == NULL || get_inc(last) == NULL)
953                          continue;                          continue;
954                  recover(&ptable);                  recover(&ptable);
# Line 1017  makeincludeindex() Line 1011  makeincludeindex()
1011                          continue;                          continue;
1012                  if (data->count == 1) {                  if (data->count == 1) {
1013                          SPLIT ptable;                          SPLIT ptable;
                         char *nouse, *lno, *filename;  
1014                          char buf[1024];                          char buf[1024];
1015    
1016                          if (split(strbuf_value(data->contents), 4, &ptable) < 4) {                          if (split(strbuf_value(data->contents), 4, &ptable) < 4) {
1017                                  recover(&ptable);                                  recover(&ptable);
1018                                  die("too small number of parts in makefileindex().");                                  die("too small number of parts in makefileindex().");
1019                          }                          }
1020                          nouse = ptable.part[0].start;                          snprintf(buf, sizeof(buf), "%s %s", ptable.part[PART_LNO].start, ptable.part[PART_PATH].start);
                         lno = ptable.part[1].start;  
                         filename = ptable.part[2].start;  
                         snprintf(buf, sizeof(buf), "%s %s", lno, filename);  
1021                          recover(&ptable);                          recover(&ptable);
1022                          strbuf_reset(data->contents);                          strbuf_reset(data->contents);
1023                          strbuf_puts(data->contents, buf);                          strbuf_puts(data->contents, buf);

Legend:
Removed from v.1.31  
changed lines
  Added in v.1.32

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