From eb0c61e4812ab19973df9b588f06c9d50a2d038c Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Wed, 3 Jul 1996 12:45:18 +0000 Subject: Got rid of line limit member. svn path=/trunk/; revision=31 --- fetchmail.c | 23 +++++++++++++---------- fetchmail.h | 10 ++++++---- options.c | 8 ++++---- pop2.c | 2 +- pop3.c | 4 ++-- 5 files changed, 26 insertions(+), 21 deletions(-) diff --git a/fetchmail.c b/fetchmail.c index b99e8d30..94929549 100644 --- a/fetchmail.c +++ b/fetchmail.c @@ -50,16 +50,19 @@ int dump_options (struct optrec *options); int query_host(struct optrec *options); #endif -/* Controls the detail of status/progress messages written to stderr */ -int outlevel; /* see the O_.* constants in popclient.h */ -int versioninfo; /* emit only version info */ +/* controls the detail level of status/progress messages written to stderr */ +int outlevel; /* see the O_.* constants above */ +int yydebug; /* enable parse debugging */ -/* Daemon-mode control */ -int poll_interval; /* polling interval for daemon mode */ -char *logfile; /* logfile to ship progress reports to */ -int quitmode; /* if -quit was set */ +/* daemon mode control */ +int poll_interval; /* poll interval in seconds */ +char *logfile; /* log file for daemon mode */ +int quitmode; /* if --quit was set */ +/* miscellaneous global controls */ char *poprcfile; /* path name of rc file */ +int linelimit; /* limit # lines retrieved per site */ +int versioninfo; /* emit only version info */ /* args for the MDA, parsed out in the usual fashion by parseMDAargs() */ char *mda_argv [32]; @@ -265,7 +268,7 @@ int showversioninfo() return value: none. calls: none. - globals: none. + globals: linelimit, outlimit. *********************************************************************/ int dump_options (options) @@ -316,11 +319,11 @@ struct optrec *options; printf(" (MDA would have been '%s')\n", options->mda); } - if (options->limit == 0) + if (linelimit == 0) printf(" No limit on retrieved message length.\n"); else printf(" Text retrieved per message will be at most %d bytes.\n", - options->limit); + linelimit); } /********************************************************************* diff --git a/fetchmail.h b/fetchmail.h index d3a09299..7f70e9a4 100644 --- a/fetchmail.h +++ b/fetchmail.h @@ -81,17 +81,19 @@ struct prc_server { }; -/* Controls the detail of status/progress messages written to stderr */ -extern int outlevel; /* see the O_.* constants above */ -extern int yydebug; /* enable parse debugging */ -extern int versioninfo; /* emit only version info */ +/* controls the detail level of status/progress messages written to stderr */ +extern int outlevel; /* see the O_.* constants above */ +extern int yydebug; /* enable parse debugging */ /* daemon mode control */ extern int poll_interval; /* poll interval in seconds */ extern char *logfile; /* log file for daemon mode */ extern int quitmode; /* if --quit was set */ +/* miscellaneous global controls */ extern char *poprcfile; /* path name of rc file */ +extern int linelimit; /* limit # lines retrieved per site */ +extern int versioninfo; /* emit only version info */ #ifdef HAVE_PROTOTYPES diff --git a/options.c b/options.c index cd10d138..f669f49c 100644 --- a/options.c +++ b/options.c @@ -85,7 +85,7 @@ static struct option longoptions[] = { syntax errors. calls: none. globals: writes outlevel, versioninfo, yydebug, logfile, - poll_interval, quitmode, poprcfile. + poll_interval, quitmode, poprcfile, linelimit. *********************************************************************/ int parsecmdline (argc,argv,options) @@ -152,8 +152,8 @@ struct optrec *options; break; case 'l': case LA_LIMIT: - options->limit = atoi(optarg); - if (options->limit < 0) { + linelimit = atoi(optarg); + if (linelimit < 0) { fprintf(stderr,"Line count limit must be non-negative"); errflag++; } @@ -254,7 +254,7 @@ struct optrec *options; return(-1); } else { - if (options->limit && !got_kill) + if (linelimit && !got_kill) options->keep = !0; else ; diff --git a/pop2.c b/pop2.c index 9c7ae378..dc9c2e7c 100644 --- a/pop2.c +++ b/pop2.c @@ -72,7 +72,7 @@ struct optrec *options; int status = PS_UNDEFINED; /* check for unsupported options */ - if (options->limit) { + if (linelimit) { fprintf(stderr,"Option --limit is not supported in POP2\n"); return(PS_SYNTAX); } diff --git a/pop3.c b/pop3.c index a0241c6f..fccf1e73 100644 --- a/pop3.c +++ b/pop3.c @@ -157,8 +157,8 @@ struct optrec *options; if (options->flush && number < first && !options->fetchall) ok = 0; /* no command to send here, will delete message below */ - else if (options->limit) - ok = POP3_sendTOP(number,options->limit,socket); + else if (linelimit) + ok = POP3_sendTOP(number,linelimit,socket); else ok = POP3_sendRETR(number,socket); if (ok != 0) -- cgit v1.2.3