summaryrefslogtreecommitdiff
path: root/mail/deliver/patches/patch-aj
blob: dc3274a455cc4862da918309cddd3740b846426a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
$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);
 }
 
 /*----------------------------------------------------------------------