diff options
author | Eric S. Raymond <esr@thyrsus.com> | 1996-07-02 21:52:18 +0000 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 1996-07-02 21:52:18 +0000 |
commit | 1a9213a862e2b7c2b3e918d7700a82f014004b08 (patch) | |
tree | e4a60219ff568f53f6f2853cf68a75694c0878c8 | |
parent | 971a363228832ae0210491c2629f964b8bb7aea7 (diff) | |
download | fetchmail-1a9213a862e2b7c2b3e918d7700a82f014004b08.tar.gz fetchmail-1a9213a862e2b7c2b3e918d7700a82f014004b08.tar.bz2 fetchmail-1a9213a862e2b7c2b3e918d7700a82f014004b08.zip |
Eliminated options->silent field.
svn path=/trunk/; revision=25
-rw-r--r-- | Makefile.in | 9 | ||||
-rw-r--r-- | fetchmail.c | 31 | ||||
-rw-r--r-- | fetchmail.h | 1 | ||||
-rw-r--r-- | options.c | 8 |
4 files changed, 14 insertions, 35 deletions
diff --git a/Makefile.in b/Makefile.in index 2581b953..c3f6b409 100644 --- a/Makefile.in +++ b/Makefile.in @@ -62,9 +62,10 @@ TEXI2DVI = texi2dvi ETAGS = etags -tw CTAGS = ctags -tw -objs = socket.o getpass.o pop2.o pop3.o popclient.o options.o \ - poprc_l.o poprc_y.o poprc.o daemon.o xmalloc.o \ - $(EXTRAOBJ) $(extras) +popobjs = socket.o getpass.o pop2.o pop3.o popclient.o options.o \ + poprc_l.o poprc_y.o poprc.o daemon.o xmalloc.o + +objs = $(popobjs) $(EXTRAOBJ) $(extras) srcs = $(srcdir)/socket.c $(srcdir)/getpass.c $(srcdir)/pop2.c \ $(srcdir)/pop3.c $(srcdir)/popclient.c $(srcdir)/options.c \ @@ -84,6 +85,8 @@ depend: # Some makes apparently use .PHONY as the default goal is it is before `all'. .PHONY: all check +$(popobjs): popclient.h + popclient: $(srcdir)/poprc_l.c $(srcdir)/poprc_y.c $(objs) $(CC) $(LDFLAGS) $(objs) $(LOADLIBS) -o popclient diff --git a/fetchmail.c b/fetchmail.c index 9d39d904..dc9d39cb 100644 --- a/fetchmail.c +++ b/fetchmail.c @@ -96,16 +96,15 @@ char **argv; FILE *tmpfp; pid_t pid; + if (setdefaults(&def_opts) != 0) + exit(PS_UNDEFINED); + if ((parsestatus = parsecmdline(argc,argv,&cmd_opts)) < 0) exit(PS_SYNTAX); - setoutlevel(&cmd_opts); if (cmd_opts.versioninfo) showversioninfo(); - if (setdefaults(&def_opts) != 0) - exit(PS_UNDEFINED); - if (prc_parse_file(prc_getpathname(&cmd_opts,&def_opts)) != 0) exit(PS_SYNTAX); @@ -329,30 +328,6 @@ struct optrec *options; options->limit); } -/****************************************************************** - function: setoutlevel - description: set output verbosity level. - arguments: - options command-line options. - - ret. value: none. - globals: writes outlevel. - calls: none. - *****************************************************************/ - -int setoutlevel (options) -struct optrec *options; -{ - if (options->verbose) - outlevel = O_VERBOSE; - else if (options->silent) - outlevel = O_SILENT; - else - outlevel = O_NORMAL; -} - - - /********************************************************************* function: openuserfolder description: open the file to which the retrieved messages will diff --git a/fetchmail.h b/fetchmail.h index a73689de..0a97272c 100644 --- a/fetchmail.h +++ b/fetchmail.h @@ -51,7 +51,6 @@ struct optrec { int keep; int verbose; int whichpop; - int silent; int limit; int fetchall; int flush; @@ -84,7 +84,7 @@ static struct option longoptions[] = { if negative, the command line is has one or more syntax errors. calls: none. - globals: none. + globals: outlevel. *********************************************************************/ int parsecmdline (argc,argv,options) @@ -134,11 +134,11 @@ struct optrec *options; break; case 'v': case LA_VERBOSE: - options->verbose = !0; + outlevel = O_VERBOSE; break; case 's': case LA_SILENT: - options->silent = !0; + outlevel = O_SILENT; break; case 'c': case LA_STDOUT: @@ -316,6 +316,8 @@ struct optrec *options; strcat(options->poprcfile, "/"); strcat(options->poprcfile, POPRC_NAME); + outlevel = O_NORMAL; + return(0); } |