Article View: news.software.readers
Article #48331Re: [slrn] [repost] Command-line option request for slrnpull
From: da... John E. Davis
Date: Sun, 02 May 1999 00:00
Date: Sun, 02 May 1999 00:00
83 lines
2797 bytes
2797 bytes
On 02 May 1999 15:00:44 -0400, Lloyd Zusman <l...@asfast.com>
wrote:
>I'd be happy to supply a patch, if no one else wants to do this.
Here is a patch:
--- slrnpull.c~ Sun Apr 25 03:03:22 1999
+++ slrnpull.c Sun May 2 16:56:03 1999
@@ -1695,16 +1695,16 @@
static void init_signals (void);
-static void open_log_files (void) /*{{{*/
+static void open_log_files (char *logfile) /*{{{*/
{
char file [SLRN_MAX_PATH_LEN + 1];
ELog_Fp = stderr;
MLog_Fp = stdout;
- if (-1 == slrn_dircat (SlrnPull_Dir, SLRNPULL_LOGFILE, file))
+ if (-1 == slrn_dircat (SlrnPull_Dir, logfile, file))
return;
-
+
MLog_Fp = fopen (file, "a");
if (MLog_Fp == NULL)
{
@@ -1743,6 +1743,7 @@
--no-post Do not post news\n\
--new-groups Get new groups\n\
--version Show version number\n\
+ --logfile FILE Use FILE as the log file\n\
",
pgm, pgm);
close_log_files ();
@@ -1783,7 +1784,8 @@
int post_mode;
int check_new_groups = 0;
char *dir;
-
+ char *logfile;
+
pgm = argv[0];
argv++; argc--;
@@ -1793,6 +1795,7 @@
MLog_Fp = stdout;
ELog_Fp = stderr;
+ logfile = SLRNPULL_LOGFILE;
dir = getenv ("SLRNPULL_ROOT");
@@ -1825,6 +1828,11 @@
check_new_groups = 1;
else if (!strcmp (arg, "--version"))
show_version (pgm);
+ else if (!strcmp (arg, "--logfile") && (argc > 0))
+ {
+ logfile = *argv;
+ argv++; argc--;
+ }
else usage (pgm);
}
@@ -1837,7 +1845,7 @@
return 1;
}
- open_log_files ();
+ open_log_files (logfile);
if (expire_mode)
log_message ("slrnpull started in expire mode.");
--
John E. Davis Center for Space Research/AXAF Science Center
617-258-8119 One Hampshire St., Building NE80-6019
http://space.mit.edu/~davis Cambridge, MA 02139-4307
Technical Details
Message-ID:
<slrn7ipf4m.ba5.davis@aluche.mit.edu>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!mbox2nntp!not-for-mailReferences:
<lt4slvqotf.fsf@asfast.com>Show Full Headers
Complete Article Headers
Message-ID: <slrn7ipf4m.ba5.davis@aluche.mit.edu> Subject: Re: [slrn] [repost] Command-line option request for slrnpull Date: Sun, 02 May 1999 00:00:00 +0000 From: da...@space.mit.edu (John E. Davis) References: <lt4slvqotf.fsf@asfast.com> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!mbox2nntp!not-for-mail X-Deja-AN: 473282198 X-Complaints-To: use...@eecs-usenet-02.mit.edu X-Trace: eecs-usenet-02.mit.edu 925678744 28586 18.75.2.45 (2 May 1999 20:59:04 GMT) Organization: Center for Space Research User-Agent: slrn/0.9.5.5 (UNIX) Reply-To: da...@space.mit.edu NNTP-Posting-Date: 2 May 1999 20:59:04 GMT Newsgroups: news.software.readers,alt.lang.s-lang