From c43b80e61df1aeb6d7872d89baa35a28dd05bd40 Mon Sep 17 00:00:00 2001 From: Claudio Fontana Date: Tue, 1 Nov 2005 09:38:51 +0000 Subject: *** empty log message *** --- src/fid.c | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) (limited to 'src/fid.c') diff --git a/src/fid.c b/src/fid.c index 398c7c2..0e77a28 100644 --- a/src/fid.c +++ b/src/fid.c @@ -19,20 +19,23 @@ #include #include #include -#include "xstring.h" -#include "xunistd.h" +#include +#include +#include +#include #include "xnls.h" #include "idfile.h" #include "error.h" #include "pathmax.h" -#include "xmalloc.h" -#include "xalloca.h" +#include "xalloc.h" +#include "alloca.h" +#include "iduglobal.h" -int get_file_index __P((char *file_name)); -int is_hit __P((unsigned char const *hits, int file_number)); -int is_hit_1 __P((unsigned char const **hits, int level, int file_number)); -void skip_hits __P((unsigned char const **hits, int level)); -void usage __P((void)); +int get_file_index (char *file_name); +int is_hit (unsigned char const *hits, int file_number); +int is_hit_1 (unsigned char const **hits, int level, int file_number); +void skip_hits (unsigned char const **hits, int level); +void usage (void); struct idhead idh; int tree8_levels; @@ -97,13 +100,16 @@ main (int argc, char **argv) program_name = argv[0]; idh.idh_file_name = 0; + +#if ENABLE_NLS /* Set locale according to user's wishes. */ setlocale (LC_ALL, ""); /* Tell program which translations to use and where to find. */ bindtextdomain (PACKAGE, LOCALEDIR); textdomain (PACKAGE); +#endif for (;;) { @@ -203,7 +209,7 @@ get_file_index (char *file_name) struct file_link **members; struct file_link **end = &members_0[idh.idh_files]; struct file_link *fn_flink = 0; - char *file_name_buf = ALLOCA (char, PATH_MAX); + char *file_name_buf = alloca (PATH_MAX); int has_slash = (strchr (file_name, '/') != 0); int file_name_length = strlen (file_name); int idx = -1; -- cgit v1.2.3