Return to tree.c CVS log | Up to [local] / src / usr.bin / ctags |
version 1.2, 1996/06/26 05:32:31 | version 1.3, 2000/07/25 19:28:30 | ||
---|---|---|---|
|
|
||
#include <stdio.h> | #include <stdio.h> | ||
#include <stdlib.h> | #include <stdlib.h> | ||
#include <string.h> | #include <string.h> | ||
#include <sys/dirent.h> | |||
#include "ctags.h" | #include "ctags.h" | ||
|
|
||
{ | { | ||
NODE *np; | NODE *np; | ||
char *fp; | char *fp; | ||
char nbuf[MAXTOKEN]; | char nbuf[1+MAXNAMLEN+1]; | ||
/*NOSTRICT*/ | /*NOSTRICT*/ | ||
if (!(np = (NODE *)malloc(sizeof(NODE)))) { | if (!(np = (NODE *)malloc(sizeof(NODE)))) { | ||
|
|
||
fp = curfile; | fp = curfile; | ||
else | else | ||
++fp; | ++fp; | ||
(void)sprintf(nbuf, "M%s", fp); | (void)snprintf(nbuf, sizeof nbuf, "M%s", fp); | ||
fp = strrchr(nbuf, '.'); | fp = strrchr(nbuf, '.'); | ||
if (fp && !fp[2]) | if (fp && !fp[2]) | ||
*fp = EOS; | *fp = EOS; |