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

Diff of /global/htags/anchor.c

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

revision 1.10 by shigio, Sun Nov 28 01:04:57 2004 UTC revision 1.11 by shigio, Mon Apr 4 01:05:08 2005 UTC
# Line 93  anchor_load(file) Line 93  anchor_load(file)
93                          die("cannot execute command '%s'.", command);                          die("cannot execute command '%s'.", command);
94                  while ((_ = strbuf_fgets(sb, ip, STRBUF_NOCRLF)) != NULL) {                  while ((_ = strbuf_fgets(sb, ip, STRBUF_NOCRLF)) != NULL) {
95                          SPLIT ptable;                          SPLIT ptable;
                         char *tag, *lineno, *path, *image;  
96                          struct anchor *a;                          struct anchor *a;
97                          int type;                          int type;
98    
# Line 101  anchor_load(file) Line 100  anchor_load(file)
100                                  recover(&ptable);                                  recover(&ptable);
101                                  die("too small number of parts in anchor_load().\n'%s'", _);                                  die("too small number of parts in anchor_load().\n'%s'", _);
102                          }                          }
                         tag = ptable.part[0].start;  
                         lineno = ptable.part[1].start;  
                         path = ptable.part[2].start;  
                         image = ptable.part[3].start;  
   
103                          if (db == GTAGS) {                          if (db == GTAGS) {
104                                  char *p;                                  char *p;
105    
106                                  for (p = image; *p && isspace((unsigned char)*p); p++)                                  for (p = ptable.part[PART_LINE].start; *p && isspace((unsigned char)*p); p++)
107                                          ;                                          ;
108                                  if (!*p) {                                  if (!*p) {
109                                          recover(&ptable);                                          recover(&ptable);
# Line 133  anchor_load(file) Line 127  anchor_load(file)
127                                  type = 'Y';                                  type = 'Y';
128                          /* allocate an entry */                          /* allocate an entry */
129                          a = varray_append(vb);                          a = varray_append(vb);
130                          a->lineno = atoi(lineno);                          a->lineno = atoi(ptable.part[PART_LNO].start);
131                          a->type = type;                          a->type = type;
132                          a->done = 0;                          a->done = 0;
133                          settag(a, tag);                          settag(a, ptable.part[PART_TAG].start);
134                          recover(&ptable);                          recover(&ptable);
135                  }                  }
136                  if (pclose(ip) != 0)                  if (pclose(ip) != 0)

Legend:
Removed from v.1.10  
changed lines
  Added in v.1.11

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