From b20a3fcdc56cdba0b74a47bc6098fbccc0023ec8 Mon Sep 17 00:00:00 2001 From: anon Date: Wed, 13 Nov 2024 13:09:14 +0100 Subject: [PATCH] rename DFLT_INCDIR to DEFAULT_INCLUDE_DIRECTORY --- source/dir.c | 2 +- source/global.h | 4 ++-- source/help.c | 2 +- source/opt.c | 6 +++--- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/source/dir.c b/source/dir.c index fdcde37..8bd5c8d 100644 --- a/source/dir.c +++ b/source/dir.c @@ -123,7 +123,7 @@ void read_listfile(FILE * names) { case 'c': /* ASCII characters only in crossref */ compress = false; break; - case 'k': /* ignore DFLT_INCDIR */ + case 'k': /* ignore DEFAULT_INCLUDE_DIRECTORY */ kernelmode = true; break; case 'q': /* quick search */ diff --git a/source/global.h b/source/global.h index 1d8153f..250cbab 100644 --- a/source/global.h +++ b/source/global.h @@ -90,7 +90,7 @@ enum { }; extern int input_mode; -#define DFLT_INCDIR "/usr/include" +#define DEFAULT_INCLUDE_DIRECTORY "/usr/include" extern const char * incdir; /* digraph data for text compression */ @@ -122,7 +122,7 @@ extern int fileversion; /* cross-reference file version */ extern bool incurses; /* in curses */ extern bool invertedindex; /* the database has an inverted index */ 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 verbosemode; /* print extra information on line mode */ extern bool recurse_dir; /* recurse dirs when searching for src files */ diff --git a/source/help.c b/source/help.c index 590f95f..4407364 100644 --- a/source/help.c +++ b/source/help.c @@ -144,7 +144,7 @@ void longusage(void) { fprintf(stderr, "\ -k Kernel Mode - don't use %s for #include files.\n", - DFLT_INCDIR); + DEFAULT_INCLUDE_DIRECTORY); fputs("\ -L Do a single search with line-oriented output.\n\ -l Line-oriented interface.\n\ diff --git a/source/opt.c b/source/opt.c index 4d259ed..7f4a6cc 100644 --- a/source/opt.c +++ b/source/opt.c @@ -33,7 +33,7 @@ bool onesearch; /* one search only in line mode */ char *reflines; /* symbol reference lines file */ bool invertedindex; /* the database has an inverted index */ 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 verbosemode = false; /* print extra information on line mode */ 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; if (!preserve_database) { - incdir = coalesce_env(DFLT_INCDIR, "INCDIR"); + incdir = coalesce_env(DEFAULT_INCLUDE_DIRECTORY, "INCDIR"); /* get source directories from the environment */ const char * const my_source_dirs = getenv("SOURCEDIRS"); 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 */ editallprompt = false; break; - case 'k': /* ignore DFLT_INCDIR */ + case 'k': /* ignore DEFAULT_INCLUDE_DIRECTORY */ kernelmode = true; break; case 'L':