summary |
tags |
clone url |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
ec14f23)
SCCS-vsn: usr.sbin/sendmail/src/envelope.c 8.15
-static char sccsid[] = "@(#)envelope.c 8.14 (Berkeley) %G%";
+static char sccsid[] = "@(#)envelope.c 8.15 (Berkeley) %G%";
#endif /* not lint */
#include "sendmail.h"
#endif /* not lint */
#include "sendmail.h"
initsys(e)
register ENVELOPE *e;
{
initsys(e)
register ENVELOPE *e;
{
- static char cbuf[5]; /* holds hop count */
- static char pbuf[10]; /* holds pid */
+ char cbuf[5]; /* holds hop count */
+ char pbuf[10]; /* holds pid */
#ifdef TTYNAME
static char ybuf[60]; /* holds tty id */
register char *p;
#ifdef TTYNAME
static char ybuf[60]; /* holds tty id */
register char *p;
/* process id */
(void) sprintf(pbuf, "%d", getpid());
/* process id */
(void) sprintf(pbuf, "%d", getpid());
+ define('p', newstr(pbuf), e);
/* hop count */
(void) sprintf(cbuf, "%d", e->e_hopcount);
/* hop count */
(void) sprintf(cbuf, "%d", e->e_hopcount);
+ define('c', newstr(cbuf), e);
/* time as integer, unix time, arpa time */
settime(e);
/* time as integer, unix time, arpa time */
settime(e);
{
register char *p;
auto time_t now;
{
register char *p;
auto time_t now;
- static char tbuf[20]; /* holds "current" time */
- static char dbuf[30]; /* holds ctime(tbuf) */
+ char tbuf[20]; /* holds "current" time */
+ char dbuf[30]; /* holds ctime(tbuf) */
register struct tm *tm;
extern char *arpadate();
extern struct tm *gmtime();
register struct tm *tm;
extern char *arpadate();
extern struct tm *gmtime();
tm = gmtime(&now);
(void) sprintf(tbuf, "%04d%02d%02d%02d%02d", tm->tm_year + 1900,
tm->tm_mon+1, tm->tm_mday, tm->tm_hour, tm->tm_min);
tm = gmtime(&now);
(void) sprintf(tbuf, "%04d%02d%02d%02d%02d", tm->tm_year + 1900,
tm->tm_mon+1, tm->tm_mday, tm->tm_hour, tm->tm_min);
+ define('t', newstr(tbuf), e);
(void) strcpy(dbuf, ctime(&now));
p = strchr(dbuf, '\n');
if (p != NULL)
*p = '\0';
(void) strcpy(dbuf, ctime(&now));
p = strchr(dbuf, '\n');
if (p != NULL)
*p = '\0';
+ define('d', newstr(dbuf), e);
p = arpadate(dbuf);
p = newstr(p);
if (macvalue('a', e) == NULL)
p = arpadate(dbuf);
p = newstr(p);
if (macvalue('a', e) == NULL)