version 1.77, 2015/11/16 16:43:06 |
version 1.78, 2016/10/31 17:22:07 |
|
|
#include <errno.h> |
#include <errno.h> |
#include <fcntl.h> |
#include <fcntl.h> |
#include <limits.h> |
#include <limits.h> |
#include <locale.h> |
|
#include <pwd.h> |
#include <pwd.h> |
#include <signal.h> |
#include <signal.h> |
#include <stdarg.h> |
#include <stdarg.h> |
|
|
mode_t cmask; |
mode_t cmask; |
extern char **environ; |
extern char **environ; |
|
|
(void)setlocale(LC_TIME, ""); |
|
|
|
/* |
/* |
* Install the signal handler for SIGINT; terminate after removing the |
* Install the signal handler for SIGINT; terminate after removing the |
* spool file if necessary |
* spool file if necessary |
|
|
case CAT: |
case CAT: |
if ((aflag && argc) || (!aflag && !argc)) |
if ((aflag && argc) || (!aflag && !argc)) |
usage(); |
usage(); |
exit(process_jobs(argc, argv, program)); |
return process_jobs(argc, argv, program); |
break; |
break; |
|
|
case AT: |
case AT: |
|
|
if (argc == 0) |
if (argc == 0) |
usage(); |
usage(); |
else if ((timer = parsetime(argc, argv)) == -1) |
else if ((timer = parsetime(argc, argv)) == -1) |
exit(EXIT_FAILURE); |
return EXIT_FAILURE; |
} |
} |
writefile(cwd, timer, queue); |
writefile(cwd, timer, queue); |
break; |
break; |
|
|
if (argc == 0) |
if (argc == 0) |
timer = time(NULL); |
timer = time(NULL); |
else if ((timer = parsetime(argc, argv)) == -1) |
else if ((timer = parsetime(argc, argv)) == -1) |
exit(EXIT_FAILURE); |
return EXIT_FAILURE; |
|
|
writefile(cwd, timer, queue); |
writefile(cwd, timer, queue); |
break; |
break; |
|
|
fatalx("internal error"); |
fatalx("internal error"); |
break; |
break; |
} |
} |
exit(EXIT_SUCCESS); |
return EXIT_SUCCESS; |
} |
} |