summaryrefslogtreecommitdiff
path: root/usr/src/cmd/cron/cron.h
diff options
context:
space:
mode:
Diffstat (limited to 'usr/src/cmd/cron/cron.h')
-rw-r--r--usr/src/cmd/cron/cron.h20
1 files changed, 19 insertions, 1 deletions
diff --git a/usr/src/cmd/cron/cron.h b/usr/src/cmd/cron/cron.h
index 93e21e7b41..0620572f8c 100644
--- a/usr/src/cmd/cron/cron.h
+++ b/usr/src/cmd/cron/cron.h
@@ -23,13 +23,17 @@
* Use is subject to license terms.
*/
+/*
+ * Copyright 2019 OmniOS Community Edition (OmniOSce) Association.
+ */
+
#ifndef _CRON_H
#define _CRON_H
#include <unistd.h>
/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
-/* All Rights Reserved */
+/* All Rights Reserved */
#ifdef __cplusplus
extern "C" {
@@ -74,6 +78,19 @@ struct message {
/* anything below here can be changed */
#define SYSCRONDIR "/etc/cron.d/crontabs"
+
+/*
+ * Errors from the crontab field parser.
+ */
+typedef enum {
+ CFOK = 0,
+ CFEOLN,
+ CFUNEXPECT,
+ CFOUTOFBOUND,
+ CFEOVERFLOW,
+ CFENOMEM
+} cferror_t;
+
#define CRONDIR "/var/spool/cron/crontabs"
#define ATDIR "/var/spool/cron/atjobs"
#define ACCTFILE "/var/cron/log"
@@ -107,6 +124,7 @@ extern int isvalid_shell(const char *shell);
extern int isvalid_dir(const char *dir);
extern int cron_admin(const char *);
+extern cferror_t next_field(uint_t, uint_t, char *, int *, char **);
#ifdef __cplusplus
}