53 |
|
|
54 |
/* compare routine for qsort(3) */ |
/* compare routine for qsort(3) */ |
55 |
static int |
static int |
56 |
cmp(s1, s2) |
cmp(const void *s1, const void *s2) |
|
const void *s1, *s2; |
|
57 |
{ |
{ |
58 |
return ((struct anchor *)s1)->lineno - ((struct anchor *)s2)->lineno; |
return ((struct anchor *)s1)->lineno - ((struct anchor *)s2)->lineno; |
59 |
} |
} |
70 |
* i) path_list \0 separated list of paths |
* i) path_list \0 separated list of paths |
71 |
*/ |
*/ |
72 |
void |
void |
73 |
anchor_prepare(path_list) |
anchor_prepare(STRBUF *path_list) |
|
STRBUF *path_list; |
|
74 |
{ |
{ |
75 |
int db; |
int db; |
76 |
struct anchor_input *input; |
struct anchor_input *input; |
126 |
* i) file file name |
* i) file file name |
127 |
*/ |
*/ |
128 |
void |
void |
129 |
anchor_load(file) |
anchor_load(const char *file) |
|
const char *file; |
|
130 |
{ |
{ |
131 |
struct anchor_input *input; |
struct anchor_input *input; |
132 |
int i, db; |
int i, db; |
288 |
* !=0: D, M, T, R, Y |
* !=0: D, M, T, R, Y |
289 |
*/ |
*/ |
290 |
struct anchor * |
struct anchor * |
291 |
anchor_get(name, length, type, lineno) |
anchor_get(const char *name, int length, int type, int lineno) |
|
const char *name; |
|
|
int length; |
|
|
int type; |
|
|
int lineno; |
|
292 |
{ |
{ |
293 |
struct anchor *p = curp ? curp : start; |
struct anchor *p = curp ? curp : start; |
294 |
|
|
318 |
* r) 1: definition, 0: not definition |
* r) 1: definition, 0: not definition |
319 |
*/ |
*/ |
320 |
int |
int |
321 |
define_line(lineno) |
define_line(int lineno) |
|
int lineno; |
|
322 |
{ |
{ |
323 |
struct anchor *p = curp ? curp : start; |
struct anchor *p = curp ? curp : start; |
324 |
|
|
344 |
* (previous, next, first, last, top, bottom) |
* (previous, next, first, last, top, bottom) |
345 |
*/ |
*/ |
346 |
int * |
int * |
347 |
anchor_getlinks(lineno) |
anchor_getlinks(int lineno) |
|
int lineno; |
|
348 |
{ |
{ |
349 |
static int ref[A_SIZE]; |
static int ref[A_SIZE]; |
350 |
int i; |
int i; |
392 |
return ref; |
return ref; |
393 |
} |
} |
394 |
void |
void |
395 |
anchor_dump(op, lineno) |
anchor_dump(FILE *op, int lineno) |
|
FILE *op; |
|
|
int lineno; |
|
396 |
{ |
{ |
397 |
struct anchor *a; |
struct anchor *a; |
398 |
|
|