rename DFLT_INCDIR to DEFAULT_INCLUDE_DIRECTORY

This commit is contained in:
anon
2024-11-13 13:09:14 +01:00
parent 6af91a787a
commit b20a3fcdc5
4 changed files with 7 additions and 7 deletions

View File

@ -123,7 +123,7 @@ void read_listfile(FILE * names) {
case 'c': /* ASCII characters only in crossref */ case 'c': /* ASCII characters only in crossref */
compress = false; compress = false;
break; break;
case 'k': /* ignore DFLT_INCDIR */ case 'k': /* ignore DEFAULT_INCLUDE_DIRECTORY */
kernelmode = true; kernelmode = true;
break; break;
case 'q': /* quick search */ case 'q': /* quick search */

View File

@ -90,7 +90,7 @@ enum {
}; };
extern int input_mode; extern int input_mode;
#define DFLT_INCDIR "/usr/include" #define DEFAULT_INCLUDE_DIRECTORY "/usr/include"
extern const char * incdir; extern const char * incdir;
/* digraph data for text compression */ /* digraph data for text compression */
@ -122,7 +122,7 @@ extern int fileversion; /* cross-reference file version */
extern bool incurses; /* in curses */ extern bool incurses; /* in curses */
extern bool invertedindex; /* the database has an inverted index */ extern bool invertedindex; /* the database has an inverted index */
extern bool preserve_database; /* consider the crossref up-to-date */ extern bool preserve_database; /* consider the crossref up-to-date */
extern bool kernelmode; /* don't use DFLT_INCDIR - bad for kernels */ extern bool kernelmode; /* don't use DEFAULT_INCLUDE_DIRECTORY - bad for kernels */
extern bool linemode; /* use line oriented user interface */ extern bool linemode; /* use line oriented user interface */
extern bool verbosemode; /* print extra information on line mode */ extern bool verbosemode; /* print extra information on line mode */
extern bool recurse_dir; /* recurse dirs when searching for src files */ extern bool recurse_dir; /* recurse dirs when searching for src files */

View File

@ -144,7 +144,7 @@ void longusage(void) {
fprintf(stderr, fprintf(stderr,
"\ "\
-k Kernel Mode - don't use %s for #include files.\n", -k Kernel Mode - don't use %s for #include files.\n",
DFLT_INCDIR); DEFAULT_INCLUDE_DIRECTORY);
fputs("\ fputs("\
-L Do a single search with line-oriented output.\n\ -L Do a single search with line-oriented output.\n\
-l Line-oriented interface.\n\ -l Line-oriented interface.\n\

View File

@ -33,7 +33,7 @@ bool onesearch; /* one search only in line mode */
char *reflines; /* symbol reference lines file */ char *reflines; /* symbol reference lines file */
bool invertedindex; /* the database has an inverted index */ bool invertedindex; /* the database has an inverted index */
bool preserve_database = false; /* consider the crossref up-to-date */ bool preserve_database = false; /* consider the crossref up-to-date */
bool kernelmode; /* don't use DFLT_INCDIR - bad for kernels */ bool kernelmode; /* don't use DEFAULT_INCLUDE_DIRECTORY - bad for kernels */
bool linemode = false; /* use line oriented user interface */ bool linemode = false; /* use line oriented user interface */
bool verbosemode = false; /* print extra information on line mode */ bool verbosemode = false; /* print extra information on line mode */
bool recurse_dir = false; /* recurse dirs when searching for src files */ bool recurse_dir = false; /* recurse dirs when searching for src files */
@ -79,7 +79,7 @@ void readenv(bool preserve_database) {
lineflagafterfile = getenv("CSCOPE_LINEFLAG_AFTER_FILE") ? 1 : 0; lineflagafterfile = getenv("CSCOPE_LINEFLAG_AFTER_FILE") ? 1 : 0;
if (!preserve_database) { if (!preserve_database) {
incdir = coalesce_env(DFLT_INCDIR, "INCDIR"); incdir = coalesce_env(DEFAULT_INCLUDE_DIRECTORY, "INCDIR");
/* get source directories from the environment */ /* get source directories from the environment */
const char * const my_source_dirs = getenv("SOURCEDIRS"); const char * const my_source_dirs = getenv("SOURCEDIRS");
if(my_source_dirs) { sourcedir(my_source_dirs); } if(my_source_dirs) { sourcedir(my_source_dirs); }
@ -158,7 +158,7 @@ char * * parse_options(const int argc, const char * const * const argv) {
case 'e': /* suppress ^E prompt between files */ case 'e': /* suppress ^E prompt between files */
editallprompt = false; editallprompt = false;
break; break;
case 'k': /* ignore DFLT_INCDIR */ case 'k': /* ignore DEFAULT_INCLUDE_DIRECTORY */
kernelmode = true; kernelmode = true;
break; break;
case 'L': case 'L':