diff options
-rw-r--r-- | bootstrap.conf | 1 | ||||
-rw-r--r-- | src/fid.c | 7 | ||||
-rw-r--r-- | src/fnid.c | 4 | ||||
-rw-r--r-- | src/lid.c | 7 | ||||
-rw-r--r-- | src/mkid.c | 5 | ||||
-rw-r--r-- | src/xtokid.c | 4 |
6 files changed, 11 insertions, 17 deletions
diff --git a/bootstrap.conf b/bootstrap.conf index 02267ba..07fbc36 100644 --- a/bootstrap.conf +++ b/bootstrap.conf @@ -72,6 +72,7 @@ gnulib_modules=" memset obstack pathmax + progname quotearg realloc regex @@ -32,6 +32,7 @@ #include "xnls.h" #include "idfile.h" #include "iduglobal.h" +#include "progname.h" static int get_file_index (char *file_name); static int is_hit (unsigned char const *hits, int file_number); @@ -42,10 +43,6 @@ void usage (void); struct idhead idh; static int tree8_levels; -/* The name this program was run with. */ - -char const *program_name; - /* If nonzero, display usage information and exit. */ static int show_help; @@ -101,7 +98,7 @@ main (int argc, char **argv) int index_1 = -1; int index_2 = -1; - program_name = argv[0]; + set_program_name (argv[0]); idh.idh_file_name = 0; @@ -33,10 +33,10 @@ #include "xnls.h" #include "idfile.h" #include "iduglobal.h" +#include "progname.h" void usage (void); -char const *program_name; static int show_version = 0; static int show_help = 0; static struct file_link *cw_dlink; @@ -86,7 +86,7 @@ using shell-style wildcards.\n\ int main (int argc, char **argv) { - program_name = argv[0]; + set_program_name (argv[0]); idh.idh_file_name = 0; #if ENABLE_NLS @@ -43,6 +43,7 @@ #include "idfile.h" #include "iduglobal.h" #include "lid.h" +#include "progname.h" typedef void (*report_func_t) (char const *name, struct file_link **flinkv); typedef int (*query_func_t) (char const *arg, report_func_t); @@ -153,10 +154,6 @@ static char *hits_buf_1; static char *hits_buf_2; static unsigned char *bits_vec; -/* The name this program was run with. */ - -char const *program_name; - /* If nonzero, display usage information and exit. */ static int show_help; @@ -294,7 +291,7 @@ matched identifier followed by the list of file names in which it occurs.\n\ int main (int argc, char **argv) { - program_name = argv[0]; + set_program_name (argv[0]); idh.idh_file_name = 0; #if ENABLE_NLS @@ -40,6 +40,7 @@ #include "hash.h" #include "scanners.h" #include "iduglobal.h" +#include "progname.h" struct summary { @@ -113,8 +114,6 @@ static unsigned char *current_hits_signature; static struct summary *summary_root; static struct summary *summary_leaf; -char const *program_name; - static char *lang_map_file_name = 0; static int show_version = 0; static int show_help = 0; @@ -196,7 +195,7 @@ static void *get_process_heap(void) int main (int argc, char **argv) { - program_name = argv[0]; + set_program_name (argv[0]); heap_initial = get_process_heap(); idh.idh_file_name = DEFAULT_ID_FILE_NAME; diff --git a/src/xtokid.c b/src/xtokid.c index 3ee8e92..36aa356 100644 --- a/src/xtokid.c +++ b/src/xtokid.c @@ -31,12 +31,12 @@ #include "scanners.h" #include "idfile.h" #include "iduglobal.h" +#include "progname.h" static void scan_files (struct idhead *idhp); static void scan_member_file (struct member_file const *member); void usage (void); -char const *program_name; static char *lang_map_file_name = 0; static int show_version = 0; static int show_help = 0; @@ -92,7 +92,7 @@ The following arguments apply to the language-specific scanners:\n\ int main (int argc, char **argv) { - program_name = argv[0]; + set_program_name (argv[0]); #if ENABLE_NLS /* Set locale according to user's wishes. */ |