#include "getopt.h" instead of declaring external variabls, make sure

SYSCONFDIR is defined; use correct type to hold getopt() return values
This commit is contained in:
marschap
2006-09-19 08:01:19 +00:00
parent 36622dcf8f
commit b8dd87a35b
+8 -3
View File
@@ -16,8 +16,8 @@
#include <sys/stat.h>
#include <fcntl.h>
#include <errno.h>
extern char *optarg;
extern int optind, optopt, opterr;
#include "getopt.h"
#include "shared/str.h"
#include "shared/report.h"
@@ -27,8 +27,13 @@ extern int optind, optopt, opterr;
#include "vc_link.h"
#include "lcdvc.h"
#if !defined(SYSCONFDIR)
# define SYSCONFDIR "/etc"
#endif
#define DEFAULT_CONFIGFILE SYSCONFDIR "/lcdvc.conf"
char * help_text =
"lcdvc - LCDproc virtual console displayer.\n"
"Copyright (c) 2002, Joris Robijn\n"
@@ -94,7 +99,7 @@ int main( int argc, char ** argv )
int process_command_line( int argc, char ** argv )
{
char c;
int c;
int error = 0;
/* No error output from getopt */