#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:
@@ -16,8 +16,8 @@
|
|||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
extern char *optarg;
|
|
||||||
extern int optind, optopt, opterr;
|
#include "getopt.h"
|
||||||
|
|
||||||
#include "shared/str.h"
|
#include "shared/str.h"
|
||||||
#include "shared/report.h"
|
#include "shared/report.h"
|
||||||
@@ -27,8 +27,13 @@ extern int optind, optopt, opterr;
|
|||||||
#include "vc_link.h"
|
#include "vc_link.h"
|
||||||
#include "lcdvc.h"
|
#include "lcdvc.h"
|
||||||
|
|
||||||
|
#if !defined(SYSCONFDIR)
|
||||||
|
# define SYSCONFDIR "/etc"
|
||||||
|
#endif
|
||||||
|
|
||||||
#define DEFAULT_CONFIGFILE SYSCONFDIR "/lcdvc.conf"
|
#define DEFAULT_CONFIGFILE SYSCONFDIR "/lcdvc.conf"
|
||||||
|
|
||||||
|
|
||||||
char * help_text =
|
char * help_text =
|
||||||
"lcdvc - LCDproc virtual console displayer.\n"
|
"lcdvc - LCDproc virtual console displayer.\n"
|
||||||
"Copyright (c) 2002, Joris Robijn\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 )
|
int process_command_line( int argc, char ** argv )
|
||||||
{
|
{
|
||||||
char c;
|
int c;
|
||||||
int error = 0;
|
int error = 0;
|
||||||
|
|
||||||
/* No error output from getopt */
|
/* No error output from getopt */
|
||||||
|
|||||||
Reference in New Issue
Block a user