From 86e31ecae02c2ad1791b5753bcce60a549643456 Mon Sep 17 00:00:00 2001 From: Keith Bostic Date: Tue, 17 Mar 1987 01:57:34 -0800 Subject: [PATCH] date and time created 87/03/16 17:57:34 by bostic SCCS-vsn: usr.bin/ctags/lisp.c 5.1 --- usr/src/usr.bin/ctags/lisp.c | 69 ++++++++++++++++++++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 usr/src/usr.bin/ctags/lisp.c diff --git a/usr/src/usr.bin/ctags/lisp.c b/usr/src/usr.bin/ctags/lisp.c new file mode 100644 index 0000000000..597049efb8 --- /dev/null +++ b/usr/src/usr.bin/ctags/lisp.c @@ -0,0 +1,69 @@ +/* + * Copyright (c) 1987 Regents of the University of California. + * All rights reserved. The Berkeley software License Agreement + * specifies the terms and conditions for redistribution. + */ + +#ifndef lint +static char sccsid[] = "@(#)lisp.c 5.1 (Berkeley) %G%"; +#endif not lint + +#include +#include + +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*/ +} -- 2.20.1