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 |
|
|
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); |
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) |