formatting cont.

Removes all leading whitespace
Converts the tabs in headers
This commit is contained in:
Emil 2023-08-04 12:34:51 -06:00
parent ff21fa6438
commit e672fc4f57
37 changed files with 651 additions and 652 deletions

View File

@ -735,4 +735,3 @@ fetch_include_from_dbase(char *s, size_t length)
fetch_string_from_dbase(s, length);
incfile(s + 1, s);
}

View File

@ -33,30 +33,30 @@
#ifndef CSCOPE_BUILD_H
#define CSCOPE_BUILD_H
#include "global.h" /* FIXME: temp. only */
#include "global.h" /* FIXME: temp. only */
#include "invlib.h"
/* types and macros of build.c to be used by other modules */
/* database output macros that update its offset */
#define dbputc(c) (++dboffset, (void) putc(c, newrefs))
#define dbfputs(s) (dboffset += strlen(s), fputs(s, newrefs))
#define dbputc(c) (++dboffset, (void) putc(c, newrefs))
#define dbfputs(s) (dboffset += strlen(s), fputs(s, newrefs))
/* declarations for globals defined in build.c */
extern BOOL buildonly; /* only build the database */
extern BOOL unconditional; /* unconditionally build database */
extern BOOL fileschanged; /* assume some files changed */
extern BOOL buildonly; /* only build the database */
extern BOOL unconditional; /* unconditionally build database */
extern BOOL fileschanged; /* assume some files changed */
extern char *reffile; /* cross-reference file path name */
extern char *invname; /* inverted index to the database */
extern char *invpost; /* inverted index postings */
extern char *newreffile; /* new cross-reference file name */
extern FILE *newrefs; /* new cross-reference */
extern FILE *postings; /* new inverted index postings */
extern int symrefs; /* cross-reference file */
extern char *reffile; /* cross-reference file path name */
extern char *invname; /* inverted index to the database */
extern char *invpost; /* inverted index postings */
extern char *newreffile; /* new cross-reference file name */
extern FILE *newrefs; /* new cross-reference */
extern FILE *postings; /* new inverted index postings */
extern int symrefs; /* cross-reference file */
extern INVCONTROL invcontrol; /* inverted file control structure */
extern INVCONTROL invcontrol; /* inverted file control structure */
/* Prototypes of external functions defined by build.c */

View File

@ -38,43 +38,43 @@
#ifndef CSCOPE_CONSTANTS_H
#define CSCOPE_CONSTANTS_H
#define ctrl(x) (x & 037) /* control character macro */
#define ctrl(x) (x & 037) /* control character macro */
/* fast string equality tests (avoids most strcmp() calls) */
#define strequal(s1, s2) (*(s1) == *(s2) && strcmp(s1, s2) == 0)
#define strnotequal(s1, s2) (*(s1) != *(s2) || strcmp(s1, s2) != 0)
#define strequal(s1, s2) (*(s1) == *(s2) && strcmp(s1, s2) == 0)
#define strnotequal(s1, s2) (*(s1) != *(s2) || strcmp(s1, s2) != 0)
/* set the mark character for searching the cross-reference file */
#define setmark(c) (blockmark = c, block[blocklen] = blockmark)
#define setmark(c) (blockmark = c, block[blocklen] = blockmark)
/* get the next character in the cross-reference */
/* note that blockp is assumed not to be null */
#define getrefchar() (*(++blockp + 1) != '\0' ? *blockp : \
(read_block() != NULL ? *blockp : '\0'))
#define getrefchar() (*(++blockp + 1) != '\0' ? *blockp : \
(read_block() != NULL ? *blockp : '\0'))
/* skip the next character in the cross-reference */
/* note that blockp is assumed not to be null and that
this macro will always be in a statement by itself */
#define skiprefchar() if (*(++blockp + 1) == '\0') (void) read_block()
#define skiprefchar() if (*(++blockp + 1) == '\0') (void) read_block()
#ifndef ESC
# define ESC '\033' /* escape character */
# define ESC '\033' /* escape character */
#endif
#define DEL '\177' /* delete character */
#define DUMMYCHAR ' ' /* use space as a dummy character */
#define MSGLEN ((PATLEN) + 80) /* displayed message length */
#define NUMLEN 10 /* line number length */
#define PATHLEN 250 /* file pathname length */
#define PATLEN 250 /* symbol pattern length */
#define DEL '\177' /* delete character */
#define DUMMYCHAR ' ' /* use space as a dummy character */
#define MSGLEN ((PATLEN) + 80) /* displayed message length */
#define NUMLEN 10 /* line number length */
#define PATHLEN 250 /* file pathname length */
#define PATLEN 250 /* symbol pattern length */
#define TEMPSTRING_LEN 8191 /* max strlen() of the global temp string */
#define REFFILE "cscope.out" /* cross-reference output file */
#define NAMEFILE "cscope.files" /* default list-of-files file */
#define INVNAME "cscope.in.out" /* inverted index to the database */
#define INVPOST "cscope.po.out" /* inverted index postings */
#define REFFILE "cscope.out" /* cross-reference output file */
#define NAMEFILE "cscope.files" /* default list-of-files file */
#define INVNAME "cscope.in.out" /* inverted index to the database */
#define INVPOST "cscope.po.out" /* inverted index postings */
#define INVNAME2 "cscope.out.in"/* follows correct naming convention */
#define INVPOST2 "cscope.out.po"/* follows correct naming convention */
#define STMTMAX 10000 /* maximum source statement length */
#define STMTMAX 10000 /* maximum source statement length */
#define STR2(x) #x
#define STRINGIZE(x) STR2(x)
@ -84,32 +84,32 @@
#define TEMPSTRING_LEN_STR STRINGIZE(TEMPSTRING_LEN)
/* screen lines */
#define FLDLINE (LINES - FIELDS - 1 - 1) /* first input field line */
#define MSGLINE 0 /* message line */
#define PRLINE (LINES - 1) /* input prompt line */
#define FLDLINE (LINES - FIELDS - 1 - 1) /* first input field line */
#define MSGLINE 0 /* message line */
#define PRLINE (LINES - 1) /* input prompt line */
/* input fields (value matches field order on screen) */
#define SYMBOL 0
#define SYMBOL 0
#define DEFINITION 1
#define CALLEDBY 2
#define CALLING 3
#define STRING 4
#define CHANGE 5
#define REGEXP 6
#define CALLEDBY 2
#define CALLING 3
#define STRING 4
#define CHANGE 5
#define REGEXP 6
#define FILENAME 7
#define INCLUDES 8
#define FIELDS 10
#define FIELDS 10
/* file open modes */
#ifndef R_OK
# define READ R_OK
# define READ R_OK
#else
# define READ 4
# define READ 4
#endif
#ifdef W_OK
# define WRITE W_OK
# define WRITE W_OK
#else
# define WRITE 2
# define WRITE 2
#endif
#define O_TEXT 0x00
@ -159,7 +159,7 @@
/**/
#if (BSD || V9) && !__NetBSD__ && !__FreeBSD__ && !__APPLE__
# define TERMINFO 0 /* no terminfo curses */
# define TERMINFO 0 /* no terminfo curses */
#else
# define TERMINFO 1
#endif
@ -167,25 +167,25 @@
#if !TERMINFO
# ifndef KEY_BREAK
# define KEY_BREAK 0400 /* easier to define than to add #if around the use */
# define KEY_BREAK 0400 /* easier to define than to add #if around the use */
# endif
# ifndef KEY_ENTER
# define KEY_ENTER 0401
# define KEY_ENTER 0401
# endif
# ifndef KEY_BACKSPACE
# define KEY_BACKSPACE 0402
# define KEY_BACKSPACE 0402
# endif
# if !sun
# define cbreak() crmode() /* name change */
# define cbreak() crmode() /* name change */
# endif
# if UNIXPC
# define erasechar() (_tty.c_cc[VERASE]) /* equivalent */
# define killchar() (_tty.c_cc[VKILL]) /* equivalent */
# define erasechar() (_tty.c_cc[VERASE]) /* equivalent */
# define killchar() (_tty.c_cc[VKILL]) /* equivalent */
# else
# define erasechar() (_tty.sg_erase) /* equivalent */
# define killchar() (_tty.sg_kill) /* equivalent */
# define erasechar() (_tty.sg_erase) /* equivalent */
# define killchar() (_tty.sg_kill) /* equivalent */
# endif /* if UNIXPC */
#endif /* if !TERMINFO */

View File

@ -58,30 +58,30 @@ typedef void (*sighandler_t)(int);
#include <fcntl.h>
typedef enum { /* boolean data type */
typedef enum { /* boolean data type */
NO,
YES
} BOOL;
typedef enum { /* findinit return code */
typedef enum { /* findinit return code */
NOERROR,
NOTSYMBOL,
REGCMPERROR
} FINDINIT;
typedef struct { /* mouse action */
int button;
int percent;
int x1;
int y1;
int x2;
int y2;
typedef struct { /* mouse action */
int button;
int percent;
int x1;
int y1;
int x2;
int y2;
} MOUSE;
struct cmd { /* command history struct */
struct cmd *prev, *next; /* list ptrs */
int field; /* input field number */
char *text; /* input field text */
struct cmd { /* command history struct */
struct cmd *prev, *next; /* list ptrs */
int field; /* input field number */
char *text; /* input field text */
};
enum {
@ -100,113 +100,113 @@ enum {
/* digraph data for text compression */
extern char dichar1[]; /* 16 most frequent first chars */
extern char dichar2[]; /* 8 most frequent second chars
using the above as first chars */
extern char dicode1[]; /* digraph first character code */
extern char dicode2[]; /* digraph second character code */
extern char dichar1[]; /* 16 most frequent first chars */
extern char dichar2[]; /* 8 most frequent second chars
using the above as first chars */
extern char dicode1[]; /* digraph first character code */
extern char dicode2[]; /* digraph second character code */
/* and some macros to help using dicodes: */
/* Check if a given pair of chars is compressable as a dicode: */
#define IS_A_DICODE(inchar1, inchar2) \
#define IS_A_DICODE(inchar1, inchar2) \
(dicode1[(unsigned char)(inchar1)] && dicode2[(unsigned char)(inchar2)])
/* Combine the pair into a dicode */
#define DICODE_COMPRESS(inchar1, inchar2) \
#define DICODE_COMPRESS(inchar1, inchar2) \
((0200 - 2) + dicode1[(unsigned char)(inchar1)] \
+ dicode2[(unsigned char)(inchar2)])
/* main.c global data */
extern char *editor, *home, *shell, *lineflag; /* environment variables */
extern char *home; /* Home directory */
extern BOOL lineflagafterfile;
extern char *argv0; /* command name */
extern BOOL compress; /* compress the characters in the crossref */
extern BOOL dbtruncated; /* database symbols truncated to 8 chars */
extern int dispcomponents; /* file path components to display */
extern char *editor, *home, *shell, *lineflag; /* environment variables */
extern char *home; /* Home directory */
extern BOOL lineflagafterfile;
extern char *argv0; /* command name */
extern BOOL compress; /* compress the characters in the crossref */
extern BOOL dbtruncated; /* database symbols truncated to 8 chars */
extern int dispcomponents; /* file path components to display */
#if CCS
extern BOOL displayversion; /* display the C Compilation System version */
extern BOOL displayversion; /* display the C Compilation System version */
#endif
extern BOOL editallprompt; /* prompt between editing files */
extern unsigned int fileargc; /* file argument count */
extern char **fileargv; /* file argument values */
extern int fileversion; /* cross-reference file version */
extern BOOL incurses; /* in curses */
extern BOOL invertedindex; /* the database has an inverted index */
extern BOOL isuptodate; /* consider the crossref up-to-date */
extern BOOL kernelmode; /* don't use DFLT_INCDIR - bad for kernels */
extern BOOL linemode; /* use line oriented user interface */
extern BOOL verbosemode; /* print extra information on line mode */
extern BOOL recurse_dir; /* recurse dirs when searching for src files */
extern char *namefile; /* file of file names */
extern BOOL ogs; /* display OGS book and subsystem names */
extern char *prependpath; /* prepend path to file names */
extern FILE *refsfound; /* references found file */
extern char temp1[]; /* temporary file name */
extern char temp2[]; /* temporary file name */
extern long totalterms; /* total inverted index terms */
extern BOOL trun_syms; /* truncate symbols to 8 characters */
extern char tempstring[TEMPSTRING_LEN + 1]; /* global dummy string buffer */
extern char *tmpdir; /* temporary directory */
extern BOOL editallprompt; /* prompt between editing files */
extern unsigned int fileargc; /* file argument count */
extern char **fileargv; /* file argument values */
extern int fileversion; /* cross-reference file version */
extern BOOL incurses; /* in curses */
extern BOOL invertedindex; /* the database has an inverted index */
extern BOOL isuptodate; /* consider the crossref up-to-date */
extern BOOL kernelmode; /* don't use DFLT_INCDIR - bad for kernels */
extern BOOL linemode; /* use line oriented user interface */
extern BOOL verbosemode; /* print extra information on line mode */
extern BOOL recurse_dir; /* recurse dirs when searching for src files */
extern char *namefile; /* file of file names */
extern BOOL ogs; /* display OGS book and subsystem names */
extern char *prependpath; /* prepend path to file names */
extern FILE *refsfound; /* references found file */
extern char temp1[]; /* temporary file name */
extern char temp2[]; /* temporary file name */
extern long totalterms; /* total inverted index terms */
extern BOOL trun_syms; /* truncate symbols to 8 characters */
extern char tempstring[TEMPSTRING_LEN + 1]; /* global dummy string buffer */
extern char *tmpdir; /* temporary directory */
/* command.c global data */
extern BOOL caseless; /* ignore letter case when searching */
extern BOOL *change; /* change this line */
extern BOOL changing; /* changing text */
extern BOOL caseless; /* ignore letter case when searching */
extern BOOL *change; /* change this line */
extern BOOL changing; /* changing text */
extern unsigned int curdispline;
extern char newpat[]; /* new pattern */
extern char newpat[]; /* new pattern */
/* crossref.c global data */
extern long dboffset; /* new database offset */
extern BOOL errorsfound; /* prompt before clearing error messages */
extern long lineoffset; /* source line database offset */
extern long npostings; /* number of postings */
extern unsigned long symbols; /* number of symbols */
extern long dboffset; /* new database offset */
extern BOOL errorsfound; /* prompt before clearing error messages */
extern long lineoffset; /* source line database offset */
extern long npostings; /* number of postings */
extern unsigned long symbols; /* number of symbols */
/* dir.c global data */
extern char currentdir[]; /* current directory */
extern char **incdirs; /* #include directories */
extern char **srcdirs; /* source directories */
extern char **srcfiles; /* source files */
extern unsigned long nincdirs; /* number of #include directories */
extern unsigned long nsrcdirs; /* number of source directories */
extern char currentdir[]; /* current directory */
extern char **incdirs; /* #include directories */
extern char **srcdirs; /* source directories */
extern char **srcfiles; /* source files */
extern unsigned long nincdirs; /* number of #include directories */
extern unsigned long nsrcdirs; /* number of source directories */
extern unsigned long nsrcfiles; /* number of source files */
extern unsigned long msrcfiles; /* maximum number of source files */
/* display.c global data */
extern int subsystemlen; /* OGS subsystem name display field length */
extern int booklen; /* OGS book name display field length */
extern int filelen; /* file name display field length */
extern int fcnlen; /* function name display field length */
extern int numlen; /* line number display field length */
extern int *displine; /* screen line of displayed reference */
extern unsigned int disprefs; /* displayed references */
extern int field; /* input field */
extern unsigned fldcolumn; /* input field column */
extern unsigned int mdisprefs; /* maximum displayed references */
extern unsigned int nextline; /* next line to be shown */
extern FILE *nonglobalrefs; /* non-global references file */
extern unsigned int topline; /* top line of page */
extern long searchcount; /* count of files searched */
extern unsigned int totallines; /* total reference lines */
extern const char dispchars[]; /* display chars for jumping to lines */
extern int subsystemlen; /* OGS subsystem name display field length */
extern int booklen; /* OGS book name display field length */
extern int filelen; /* file name display field length */
extern int fcnlen; /* function name display field length */
extern int numlen; /* line number display field length */
extern int *displine; /* screen line of displayed reference */
extern unsigned int disprefs; /* displayed references */
extern int field; /* input field */
extern unsigned fldcolumn; /* input field column */
extern unsigned int mdisprefs; /* maximum displayed references */
extern unsigned int nextline; /* next line to be shown */
extern FILE *nonglobalrefs; /* non-global references file */
extern unsigned int topline; /* top line of page */
extern long searchcount; /* count of files searched */
extern unsigned int totallines; /* total reference lines */
extern const char dispchars[]; /* display chars for jumping to lines */
extern int window_change;
/* find.c global data */
extern char block[]; /* cross-reference file block */
extern char blockmark; /* mark character to be searched for */
extern long blocknumber; /* block number */
extern char *blockp; /* pointer to current character in block */
extern int blocklen; /* length of disk block read */
extern char block[]; /* cross-reference file block */
extern char blockmark; /* mark character to be searched for */
extern long blocknumber; /* block number */
extern char *blockp; /* pointer to current character in block */
extern int blocklen; /* length of disk block read */
/* lookup.c global data */
extern struct keystruct {
char *text;
char delim;
struct keystruct *next;
extern struct keystruct {
char *text;
char delim;
struct keystruct *next;
} keyword[];
/* mouse.c global data */
extern BOOL mouse; /* mouse interface */
extern BOOL mouse; /* mouse interface */
/* readline.c global data */
extern char* rl_line_buffer;
@ -214,7 +214,7 @@ extern char input_line[PATLEN + 1];
extern int rl_point;
#if UNIXPC
extern BOOL unixpcmouse; /* UNIX PC mouse interface */
extern BOOL unixpcmouse; /* UNIX PC mouse interface */
#endif
/* cscope functions called from more than one function or between files */
@ -241,8 +241,8 @@ void error_usage(void);
void longusage(void);
void usage(void);
extern BOOL remove_symfile_onexit;
extern BOOL onesearch; /* one search only in line mode */
extern char *reflines; /* symbol reference lines file */
extern BOOL onesearch; /* one search only in line mode */
extern char *reflines; /* symbol reference lines file */
void verswp_field(void);
void horswp_field(void);
BOOL interpret(int c); // XXX: probably rename

View File

@ -33,19 +33,19 @@
#ifndef CSCOPE_INVLIB_H
#define CSCOPE_INVLIB_H
#include <stdio.h> /* need definition of FILE* */
#include <stdio.h> /* need definition of FILE* */
#include <limits.h> /* need definition of CHAR_MAX */
/* inverted index definitions */
/* postings temporary file long number coding into characters */
#if CHAR_MAX==255
# define BASE 223 /* 255 - ' ' */
# define PRECISION 4 /* maximum digits after converting a long */
# define BASE 223 /* 255 - ' ' */
# define PRECISION 4 /* maximum digits after converting a long */
#else
# if CHAR_MAX==127 /* assume sign-extension of a char when converted to an int */
# define BASE 95 /* 127 - ' ' */
# define PRECISION 5 /* maximum digits after converting a long */
# define BASE 95 /* 127 - ' ' */
# define PRECISION 5 /* maximum digits after converting a long */
# else
#error Need a platform with 8 bits in a char value
# endif
@ -53,34 +53,34 @@
/* inverted index access parameters */
#define INVAVAIL 0
#define INVBUSY 1
#define INVBUSY 1
#define INVALONE 2
/* boolean set operations */
#define BOOL_OR 3
#define AND 4
#define NOT 5
#define REVERSENOT 6
#define BOOL_OR 3
#define AND 4
#define NOT 5
#define REVERSENOT 6
/* note that the entire first block is for parameters */
typedef struct {
long version; /* inverted index format version */
long filestat; /* file status word */
long sizeblk; /* size of logical block in bytes */
long startbyte; /* first byte of superfinger */
long supsize; /* size of superfinger in bytes */
long cntlsize; /* size of max cntl space (should be a multiple of BUFSIZ) */
long share; /* flag whether to use shared memory */
typedef struct {
long version; /* inverted index format version */
long filestat; /* file status word */
long sizeblk; /* size of logical block in bytes */
long startbyte; /* first byte of superfinger */
long supsize; /* size of superfinger in bytes */
long cntlsize; /* size of max cntl space (should be a multiple of BUFSIZ) */
long share; /* flag whether to use shared memory */
} PARAM;
typedef struct {
FILE *invfile; /* the inverted file ptr */
FILE *postfile; /* posting file ptr */
PARAM param; /* control parameters for the file */
char *iindex; /* ptr to space for superindex */
union logicalblk *logblk; /* ptr to space for a logical block */
long numblk; /* number of block presently at *logblk */
long keypnt; /* number item in present block found */
FILE *invfile; /* the inverted file ptr */
FILE *postfile; /* posting file ptr */
PARAM param; /* control parameters for the file */
char *iindex; /* ptr to space for superindex */
union logicalblk *logblk; /* ptr to space for a logical block */
long numblk; /* number of block presently at *logblk */
long keypnt; /* number item in present block found */
} INVCONTROL;
typedef struct {
@ -91,14 +91,14 @@ typedef struct {
} ENTRY;
typedef struct {
long lineoffset; /* source line database offset */
long fcnoffset; /* function name database offset */
long fileindex : 24; /* source file name index */
long type : 8; /* reference type (mark character) */
long lineoffset; /* source line database offset */
long fcnoffset; /* function name database offset */
long fileindex : 24; /* source file name index */
long type : 8; /* reference type (mark character) */
} POSTING;
extern long *srcoffset; /* source file name database offsets */
extern int nsrcoffset; /* number of file name database offsets */
extern long *srcoffset; /* source file name database offsets */
extern int nsrcoffset; /* number of file name database offsets */
void boolclear(void);

View File

@ -33,7 +33,7 @@
#ifndef CSCOPE_LIBRARY_H
#define CSCOPE_LIBRARY_H
#include <stdio.h> /* need FILE* type def. */
#include <stdio.h> /* need FILE* type def. */
/* private library */
char *compath(char *pathname);

View File

@ -36,10 +36,10 @@
/* declarations for objects defined in lookup.c */
/* keyword text for fast testing of keywords in the scanner */
extern char enumtext[];
extern char externtext[];
extern char structtext[];
extern char typedeftext[];
extern char uniontext[];
extern char enumtext[];
extern char externtext[];
extern char structtext[];
extern char typedeftext[];
extern char uniontext[];
#endif /* CSCOPE_LOOKUP_H */

View File

@ -36,55 +36,55 @@
#include <stdio.h>
#undef YYLMAX
#define YYLMAX STMTMAX + PATLEN + 1 /* scanner line buffer size */
#define YYLMAX STMTMAX + PATLEN + 1 /* scanner line buffer size */
/* cross-reference database mark characters (when new ones are added,
* update the cscope.out format description in cscope.1)
*/
#define CLASSDEF 'c'
#define DEFINE '#'
#define DEFINEEND ')'
#define ENUMDEF 'e'
#define FCNCALL '`'
#define FCNDEF '$'
#define FCNEND '}'
#define DEFINE '#'
#define DEFINEEND ')'
#define ENUMDEF 'e'
#define FCNCALL '`'
#define FCNDEF '$'
#define FCNEND '}'
#define GLOBALDEF 'g'
#define INCLUDE '~'
#define INCLUDE '~'
#define MEMBERDEF 'm'
#define NEWFILE '@'
#define NEWFILE '@'
#define STRUCTDEF 's'
#define TYPEDEF 't'
#define TYPEDEF 't'
#define UNIONDEF 'u'
/* other scanner token types */
#define LEXEOF 0
#define LEXERR 1
#define IDENT 2
#define NEWLINE 3
#define LEXEOF 0
#define LEXERR 1
#define IDENT 2
#define NEWLINE 3
/* scanner.l global data */
extern int first; /* buffer index for first char of symbol */
extern int last; /* buffer index for last char of symbol */
extern int lineno; /* symbol line number */
extern FILE *yyin; /* input file descriptor */
extern FILE *yyout; /* output file */
extern int myylineno; /* input line number */
extern int first; /* buffer index for first char of symbol */
extern int last; /* buffer index for last char of symbol */
extern int lineno; /* symbol line number */
extern FILE *yyin; /* input file descriptor */
extern FILE *yyout; /* output file */
extern int myylineno; /* input line number */
#ifdef USING_LEX
/* HBB 20010430: if lex is used instead of flex, have to simulate the
* private copies of yytext and yytext for the world outside scanner.l: */
/* FIXME: there should be a feature test for this! */
#if defined(__OSF1__) || defined(__sun) || defined(_AIX)
extern char yytext[];
extern char yytext[];
#else
extern unsigned char yytext[];
extern unsigned char yytext[];
#endif
extern int yyleng;
extern int yyleng;
# define my_yytext yytext
# define my_yyleng yyleng
#else
extern char *my_yytext; /* private copy of input line */
extern size_t my_yyleng; /* ... and current length of it */
extern char *my_yytext; /* private copy of input line */
extern size_t my_yyleng; /* ... and current length of it */
#endif
/* The master function exported by scanner.l */

View File

@ -39,7 +39,7 @@
#ifndef CSCOPE_VERSION_H
#define CSCOPE_VERSION_H
#define FILEVERSION 15 /* Initial Open Source and Linux Port */
#define FIXVERSION ".9" /* feature and bug fix version */
#define FILEVERSION 15 /* Initial Open Source and Linux Port */
#define FIXVERSION ".9" /* feature and bug fix version */
#endif /* CSCOPE_VERSION_H */

View File

@ -32,36 +32,36 @@
/*
* VPATH assumptions:
* VPATH is the environment variable containing the view path
* where each path name is followed by ':', '\n', or '\0'.
* Embedded blanks are considered part of the path.
* VPATH is the environment variable containing the view path
* where each path name is followed by ':', '\n', or '\0'.
* Embedded blanks are considered part of the path.
*/
#ifndef CSCOPE_VP_H
#define CSCOPE_VP_H
#define MAXPATH 200 /* max length for entire name */
#define MAXPATH 200 /* max length for entire name */
#ifdef HAVE_CONFIG_H
# include "config.h"
#else
# define HAVE_FCNTL_H 1 /* in case of doubt, assume it's there */
# define HAVE_FCNTL_H 1 /* in case of doubt, assume it's there */
#endif
#ifdef HAVE_FCNTL_H
# include <fcntl.h> /* needed for O_... open flags */
# include <fcntl.h> /* needed for O_... open flags */
#endif
#include <sys/types.h>
#include <sys/stat.h>
#if !NOMALLOC
extern char **vpdirs; /* directories (including current) in view path */
extern char **vpdirs; /* directories (including current) in view path */
#else
#define MAXDIR 25 /* same as libVP */
#define DIRLEN 80 /* same as libVP */
extern char vpdirs[MAXDIR][DIRLEN + 1];
#define MAXDIR 25 /* same as libVP */
#define DIRLEN 80 /* same as libVP */
extern char vpdirs[MAXDIR][DIRLEN + 1];
#endif
extern int vpndirs; /* number of directories in view path */
extern int vpndirs; /* number of directories in view path */
void vpinit(char *current_dir);
int vpopen(char *path, int oflag);