ROBOhdrs/parseCtagsXLine [ Functions ]
NAME
parseCtagsXLine
SYNOPSIS
* static int parseCtagsXLine(char *buf, char *fname, char *name, char *decl, char *type, int *linenum)
SOURCE
static int parseCtagsXLine( char *buf, char *fname, char *name, char *decl, char *type, int *linenum ) { char *t, *s; /* ctags -x output is: */ /* usage function 56 test.c void usage(void) */ sscanf( buf, "%s%s%d%s", name, type, linenum, fname ); s = strstr( buf, fname ); while ( *s++ != ' ' ) { } while ( *s == ' ' ) { ++s; } t = decl; while ( ( *t = *s++ ) != '\n' ) { ++t; } *t = '\0'; return 0; }