version 1.9, 1998/11/19 03:09:16 |
version 1.10, 1998/12/16 01:20:14 |
|
|
time_t now, time(); |
time_t now, time(); |
FILE *fp; |
FILE *fp; |
int fd; |
int fd; |
char *p, *whom, hostname[MAXHOSTNAMELEN], lbuf[100], tmpname[15]; |
char *p, *whom, hostname[MAXHOSTNAMELEN], lbuf[100], tmpname[64]; |
char tmpbuf[5]; |
char tmpbuf[5]; |
|
|
(void)strcpy(tmpname, _PATH_TMP); |
snprintf(tmpname, sizeof(tmpname), "%s/wall.XXXXXX", _PATH_TMP); |
(void)strcat(tmpname, "wall.XXXXXX"); |
|
if (!(fd = mkstemp(tmpname)) || !(fp = fdopen(fd, "r+"))) |
if (!(fd = mkstemp(tmpname)) || !(fp = fdopen(fd, "r+"))) |
errx(1, "can't open temporary file.\n"); |
errx(1, "can't open temporary file.\n"); |
(void)unlink(tmpname); |
(void)unlink(tmpname); |