use defines for file descriptors
[unix-history] / usr / src / usr.bin / ctags / lisp.c
/*
* Copyright (c) 1987 The Regents of the University of California.
* All rights reserved.
*
* %sccs.include.redist.c%
*/
#ifndef lint
static char sccsid[] = "@(#)lisp.c 5.4 (Berkeley) %G%";
#endif /* not lint */
#include <ctags.h>
#include <string.h>
extern char *lbp; /* pointer shared with fortran */
/*
* lisp tag functions
* just look for (def or (DEF
*/
l_entries()
{
register int special;
register char *cp,
savedc;
char tok[MAXTOKEN];
for (;;) {
lineftell = ftell(inf);
if (!fgets(lbuf,sizeof(lbuf),inf))
return;
++lineno;
lbp = lbuf;
if (!cicmp("(def"))
continue;
special = NO;
switch(*lbp | ' ') {
case 'm':
if (cicmp("method"))
special = YES;
break;
case 'w':
if (cicmp("wrapper") || cicmp("whopper"))
special = YES;
}
for (;!isspace(*lbp);++lbp);
for (;isspace(*lbp);++lbp);
for (cp = lbp;*cp && *cp != '\n';++cp);
*cp = EOS;
if (special) {
if (!(cp = index(lbp,')')))
continue;
for (;cp >= lbp && *cp != ':';--cp);
if (cp < lbp)
continue;
lbp = cp;
for (;*cp && *cp != ')' && *cp != ' ';++cp);
}
else
for (cp = lbp + 1;
*cp && *cp != '(' && *cp != ' ';++cp);
savedc = *cp;
*cp = EOS;
(void)strcpy(tok,lbp);
*cp = savedc;
getline();
pfnote(tok,lineno);
}
/*NOTREACHED*/
}