-/* $OpenBSD: at.c,v 1.9 1997/03/03 00:30:02 millert Exp $ */
+/* $OpenBSD: at.c,v 1.10 1997/03/03 03:31:10 millert Exp $ */
/* $NetBSD: at.c,v 1.4 1995/03/25 18:13:31 glass Exp $ */
/*
/* File scope variables */
#ifndef lint
-static char rcsid[] = "$OpenBSD: at.c,v 1.9 1997/03/03 00:30:02 millert Exp $";
+static char rcsid[] = "$OpenBSD: at.c,v 1.10 1997/03/03 03:31:10 millert Exp $";
#endif
char *no_export[] =
char queue;
int jobno;
- if (optind == argc && (what == ATRM || what == CAT))
- usage();
-
PRIV_START
if (chdir(_PATH_ATJOBS) != 0)
/* select our program */
switch (program) {
case ATQ:
+ if (optind != argc)
+ usage();
list_jobs();
break;
case ATRM:
+ if (optind == argc)
+ usage();
process_jobs(argc, argv, ATRM);
break;
case CAT:
+ if (optind == argc)
+ usage();
process_jobs(argc, argv, CAT);
break;