Fri Apr 2 06:31:53 2021 UTC ()
Add an XXX reminder to convert at(1) to use parsedate(3) in <util.h>.


(simonb)
diff -r1.31 -r1.32 src/usr.bin/at/at.c

cvs diff -r1.31 -r1.32 src/usr.bin/at/at.c (expand / switch to unified diff)

--- src/usr.bin/at/at.c 2016/03/13 00:32:09 1.31
+++ src/usr.bin/at/at.c 2021/04/02 06:31:53 1.32
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: at.c,v 1.31 2016/03/13 00:32:09 dholland Exp $ */ 1/* $NetBSD: at.c,v 1.32 2021/04/02 06:31:53 simonb Exp $ */
2 2
3/* 3/*
4 * at.c : Put file into atrun queue 4 * at.c : Put file into atrun queue
5 * Copyright (C) 1993, 1994 Thomas Koenig 5 * Copyright (C) 1993, 1994 Thomas Koenig
6 * 6 *
7 * Atrun & Atq modifications 7 * Atrun & Atq modifications
8 * Copyright (C) 1993 David Parsons 8 * Copyright (C) 1993 David Parsons
9 * 9 *
10 * Redistribution and use in source and binary forms, with or without 10 * Redistribution and use in source and binary forms, with or without
11 * modification, are permitted provided that the following conditions 11 * modification, are permitted provided that the following conditions
12 * are met: 12 * are met:
13 * 1. Redistributions of source code must retain the above copyright 13 * 1. Redistributions of source code must retain the above copyright
14 * notice, this list of conditions and the following disclaimer. 14 * notice, this list of conditions and the following disclaimer.
@@ -43,45 +43,45 @@ @@ -43,45 +43,45 @@
43#include <signal.h> 43#include <signal.h>
44#include <stdbool.h> 44#include <stdbool.h>
45#include <stddef.h> 45#include <stddef.h>
46#include <stdio.h> 46#include <stdio.h>
47#include <stdlib.h> 47#include <stdlib.h>
48#include <string.h> 48#include <string.h>
49#include <time.h> 49#include <time.h>
50#include <unistd.h> 50#include <unistd.h>
51#include <util.h> 51#include <util.h>
52 52
53/* Local headers */ 53/* Local headers */
54#include "at.h" 54#include "at.h"
55#include "panic.h" 55#include "panic.h"
56#include "parsetime.h" 56#include "parsetime.h" /* XXX should use parsedate(3) in <util.h> */
57#include "perm.h" 57#include "perm.h"
58#include "pathnames.h" 58#include "pathnames.h"
59#include "stime.h" 59#include "stime.h"
60#include "privs.h" 60#include "privs.h"
61 61
62/* Macros */ 62/* Macros */
63#define ALARMC 10 /* Number of seconds to wait for timeout */ 63#define ALARMC 10 /* Number of seconds to wait for timeout */
64 64
65#define TIMESIZE 50 65#define TIMESIZE 50
66 66
67enum { ATQ, ATRM, AT, BATCH, CAT }; /* what program we want to run */ 67enum { ATQ, ATRM, AT, BATCH, CAT }; /* what program we want to run */
68 68
69/* File scope variables */ 69/* File scope variables */
70#ifndef lint 70#ifndef lint
71#if 0 71#if 0
72static char rcsid[] = "$OpenBSD: at.c,v 1.15 1998/06/03 16:20:26 deraadt Exp $"; 72static char rcsid[] = "$OpenBSD: at.c,v 1.15 1998/06/03 16:20:26 deraadt Exp $";
73#else 73#else
74__RCSID("$NetBSD: at.c,v 1.31 2016/03/13 00:32:09 dholland Exp $"); 74__RCSID("$NetBSD: at.c,v 1.32 2021/04/02 06:31:53 simonb Exp $");
75#endif 75#endif
76#endif 76#endif
77 77
78const char *no_export[] = {"TERM", "TERMCAP", "DISPLAY", "_"}; 78const char *no_export[] = {"TERM", "TERMCAP", "DISPLAY", "_"};
79static int send_mail = 0; 79static int send_mail = 0;
80 80
81/* External variables */ 81/* External variables */
82 82
83extern char **environ; 83extern char **environ;
84bool fcreated = false; 84bool fcreated = false;
85char atfile[FILENAME_MAX]; 85char atfile[FILENAME_MAX];
86 86
87char *atinput = NULL; /* where to get input from */ 87char *atinput = NULL; /* where to get input from */