From 4d406730a2dc4610a98f3abeed9296c8932774d7 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Wed, 4 Jun 2008 14:40:56 +0200 Subject: use gnulib's progname module * bootstrap.conf (gnulib_modules): Add progname. * src/mkid.c: Include "progname.h". (program_name): Remove declaration. (main): Call set_program_name rather than setting program_name. * src/fid.c: Likewise. * src/fnid.c: Likewise. * src/lid.c: Likewise. * src/xtokid.c: Likewise. --- src/lid.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'src/lid.c') diff --git a/src/lid.c b/src/lid.c index a97529b..7db355e 100644 --- a/src/lid.c +++ b/src/lid.c @@ -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 -- cgit v1.2.3