- {"version", no_argument, (int *) 0, LA_VERSION },
- {"all", no_argument, (int *) 0, LA_ALL },
- {"kill", no_argument, (int *) 0, LA_KILL },
- {"keep", no_argument, (int *) 0, LA_KEEP },
- {"verbose", no_argument, (int *) 0, LA_VERBOSE },
- {"silent", no_argument, (int *) 0, LA_SILENT },
- {"flush", no_argument, (int *) 0, LA_FLUSH },
- {"protocol", required_argument, (int *) 0, LA_PROTOCOL },
- {"proto", required_argument, (int *) 0, LA_PROTOCOL },
- {"daemon", required_argument, (int *) 0, LA_DAEMON },
- {"fetchmailrc",required_argument,(int *) 0, LA_RCFILE },
- {"user", required_argument, (int *) 0, LA_USERNAME },
- {"username", required_argument, (int *) 0, LA_USERNAME },
- {"remote", required_argument, (int *) 0, LA_REMOTEFILE },
- {"port", required_argument, (int *) 0, LA_PORT },
- {"smtphost", required_argument, (int *) 0, LA_SMTPHOST },
- {"logfile", required_argument, (int *) 0, LA_LOGFILE },
- {"quit", no_argument, (int *) 0, LA_QUIT },
- {"norewrite", no_argument, (int *) 0, LA_NOREWRITE },
- {"yydebug", no_argument, (int *) 0, LA_YYDEBUG },
- {(char *) 0, no_argument, (int *) 0, 0 }
-};
-
-
-/*********************************************************************
- function: parsecmdline
- description: parse/validate the command line options.
- arguments:
- argc argument count.
- argv argument strings.
- queryctl pointer to a struct hostrec to receive the parsed
- options.
-
- return value: if positive, argv index of last parsed option + 1
- (presumes one or more server names follows).
- if zero, the command line switches are such that
- no server names are required (e.g. --version).
- if negative, the command line is has one or more
- syntax errors.
- calls: none.
- globals: writes outlevel, versioninfo, yydebug, logfile,
- poll_interval, quitmode, rcfile, idfile.
- *********************************************************************/
-
-int parsecmdline (argc,argv,queryctl)
-int argc;
-char **argv;
-struct hostrec *queryctl;
-{
- int c,i;
- int fflag = 0; /* TRUE when -o or -c has been specified */
- int errflag = 0; /* TRUE when a syntax error is detected */
- int option_index;
- int got_kill = 0; /* TRUE when --kill is specified */
-
- extern int optind, opterr; /* defined in getopt(2) */
- extern char *optarg; /* defined in getopt(2) */
+ {"help", no_argument, (int *) 0, LA_HELP },
+ {"version", no_argument, (int *) 0, LA_VERSION },
+ {"check", no_argument, (int *) 0, LA_CHECK },
+ {"silent", no_argument, (int *) 0, LA_SILENT },
+ {"verbose", no_argument, (int *) 0, LA_VERBOSE },
+ {"daemon", required_argument, (int *) 0, LA_DAEMON },
+ {"nodetach", no_argument, (int *) 0, LA_NODETACH },
+ {"quit", no_argument, (int *) 0, LA_QUIT },
+ {"logfile", required_argument, (int *) 0, LA_LOGFILE },
+ {"syslog", no_argument, (int *) 0, LA_SYSLOG },
+ {"fetchmailrc",required_argument,(int *) 0, LA_RCFILE },
+ {"idfile", required_argument, (int *) 0, LA_IDFILE },
+#ifdef linux
+ {"interface", required_argument, (int *) 0, LA_INTERFACE },
+ {"monitor", required_argument, (int *) 0, LA_MONITOR },
+#endif