- if (define)
- found = 0;
- else
- found++;
- if (found >= 2) {
- gotone = TRUE;
-badone: bad = TRUE;
- goto ret;
- }
- }
- if (c != '(')
- goto badone;
- firsttok = FALSE;
- while ((*++sp=c=getc(inf)) != ')') {
- if (c == '\n') {
- lineno++;
- if (sp > &line[sizeof (line) - BUFSIZ])
- goto ret;
- }
- /*
- * This line used to confuse ctags:
- * int (*oldhup)();
- * This fixes it. A nonwhite char before the first
- * token, other than a / (in case of a comment in there)
- * makes this not a declaration.
- */
- if (begtoken(c) || c=='/') firsttok++;
- else if (!iswhite(c) && !firsttok) goto badone;
- }
- while (iswhite(*++sp=c=getc(inf)))
- if (c == '\n') {
- lineno++;
- if (sp > &line[sizeof (line) - BUFSIZ])
- break;
- }
-ret:
- *lp = --sp;
- if (c == '\n')
- lineno--;
- ungetc(c,inf);
- return !bad && isgood(c);
-}
-
-getline()
-{
- long saveftell = ftell( inf );
- register char *cp;
-
- fseek( inf , lineftell , 0 );
- fgets(lbuf, sizeof lbuf, inf);
- cp = rindex(lbuf, '\n');
- if (cp)
- *cp = 0;
- fseek(inf, saveftell, 0);
-}
-
-free_tree(node)
-NODE *node;
-{
-
- while (node) {
- free_tree(node->right);
- cfree(node);
- node = node->left;
- }
-}
-
-add_node(node, cur_node)
- NODE *node,*cur_node;
-{
- register int dif;
-
- dif = strcmp(node->func,cur_node->func);
- if (dif == 0) {
- if (node->file == cur_node->file) {
- if (!wflag) {
-fprintf(stderr,"Duplicate function in file %s, line %d: %s\n",
- node->file,lineno,node->func);
-fprintf(stderr,"Second entry ignored\n");
+/* lex */ else {
+ /*
+ * we search all 3 parts of a lex file
+ * for C references. This may be wrong.
+ */
+ toss_yysec();
+ (void)strcpy(lbuf, "%%$");
+ pfnote("yylex", lineno);
+ rewind(inf);