8c0a7ca984
a problem with basename(); bump PKGREVISION. Closes PR 20978 and PR 25733 by Jim Bernard.
92 lines
2.5 KiB
Text
92 lines
2.5 KiB
Text
$NetBSD: patch-aj,v 1.1 2004/05/28 01:09:01 wiz Exp $
|
|
|
|
--- log.c.orig 1999-12-01 19:16:21.000000000 -0700
|
|
+++ log.c 2004-05-27 10:54:45.000000000 -0600
|
|
@@ -58,7 +58,7 @@
|
|
if (!dryrun && exists(f_logfile))
|
|
{
|
|
t_logfile = tempfile();
|
|
- if ((log = ftcreate(t_logfile)) == NULL)
|
|
+ if ((logfile = ftcreate(t_logfile)) == NULL)
|
|
syserr("can't create %s", t_logfile);
|
|
}
|
|
#endif
|
|
@@ -85,17 +85,17 @@
|
|
void
|
|
savelogs()
|
|
{
|
|
- if (!log && !errlog)
|
|
+ if (!logfile && !errlog)
|
|
return;
|
|
|
|
/* If temporary logs contain anything, append them to real logs. */
|
|
|
|
- if (logsize(log) || logsize(errlog))
|
|
+ if (logsize(logfile) || logsize(errlog))
|
|
{
|
|
if (log_lock() == 0)
|
|
{
|
|
if (t_logfile)
|
|
- applog(&log, f_logfile);
|
|
+ applog(&logfile, f_logfile);
|
|
errdone();
|
|
if (t_errlogfile)
|
|
applog(&errlog, f_errlogfile);
|
|
@@ -201,27 +201,27 @@
|
|
{
|
|
int a;
|
|
|
|
- if (!log)
|
|
+ if (!logfile)
|
|
return;
|
|
|
|
- logstart(log);
|
|
+ logstart(logfile);
|
|
|
|
if (local_sender)
|
|
- (void) fprintf(log, "local sender: %s\n", local_sender);
|
|
+ (void) fprintf(logfile, "local sender: %s\n", local_sender);
|
|
if (orig_sender)
|
|
- (void) fprintf(log, "original sender: %s\n", orig_sender);
|
|
+ (void) fprintf(logfile, "original sender: %s\n", orig_sender);
|
|
if (boxdelivery)
|
|
- (void) fprintf(log, "mailbox%s:", (ac > 1) ? "es" : "");
|
|
+ (void) fprintf(logfile, "mailbox%s:", (ac > 1) ? "es" : "");
|
|
else
|
|
- (void) fprintf(log, "destination%s:", (ac > 1) ? "s" : "");
|
|
+ (void) fprintf(logfile, "destination%s:", (ac > 1) ? "s" : "");
|
|
for (a = 0; a < ac; ++a)
|
|
- (void) fprintf(log, " \"%s\"", av[a]);
|
|
- (void) fputc('\n', log);
|
|
+ (void) fprintf(logfile, " \"%s\"", av[a]);
|
|
+ (void) fputc('\n', logfile);
|
|
|
|
logstate("delivered", ST_DONE);
|
|
logstate("failed", ST_ERROR);
|
|
|
|
- logdone(log);
|
|
+ logdone(logfile);
|
|
}
|
|
|
|
/*----------------------------------------------------------------------
|
|
@@ -244,15 +244,15 @@
|
|
continue;
|
|
|
|
if (++dcount == 1)
|
|
- (void) fprintf(log, "%s:", desc);
|
|
- (void) fprintf(log, " %s", d->d_name);
|
|
+ (void) fprintf(logfile, "%s:", desc);
|
|
+ (void) fprintf(logfile, " %s", d->d_name);
|
|
if (d->d_class == CL_MBOX)
|
|
- (void) fprintf(log, ":%s", d->d_param);
|
|
+ (void) fprintf(logfile, ":%s", d->d_param);
|
|
else if (d->d_class == CL_PROG)
|
|
- (void) fprintf(log, "|\"%s\"", d->d_param);
|
|
+ (void) fprintf(logfile, "|\"%s\"", d->d_param);
|
|
}
|
|
if (dcount)
|
|
- (void) fputc('\n', log);
|
|
+ (void) fputc('\n', logfile);
|
|
}
|
|
|
|
/*----------------------------------------------------------------------
|