2 * $Id: structs.h,v 1.1 1998/08/14 00:31:24 vixie Exp $
6 * Copyright (c) 1997 by Internet Software Consortium
8 * Permission to use, copy, modify, and distribute this software for any
9 * purpose with or without fee is hereby granted, provided that the above
10 * copyright notice and this permission notice appear in all copies.
12 * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
13 * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
14 * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
15 * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
16 * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
17 * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
18 * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
22 typedef struct _entry {
33 bitstr_t bit_decl(second, SECOND_COUNT);
34 bitstr_t bit_decl(minute, MINUTE_COUNT);
35 bitstr_t bit_decl(hour, HOUR_COUNT);
36 bitstr_t bit_decl(dom, DOM_COUNT);
37 bitstr_t bit_decl(month, MONTH_COUNT);
38 bitstr_t bit_decl(dow, DOW_COUNT);
49 #define WHEN_REBOOT 0x04
51 #define NOT_UNTIL 0x10
55 #define MAIL_WHEN_ERR 0x100
59 /* the crontab database will be a list of the
60 * following structure, one element per user
61 * plus one for the system.
63 * These are the crontabs.
66 typedef struct _user {
67 struct _user *next, *prev; /* links */
69 time_t mtime; /* last modtime of crontab */
70 entry *crontab; /* this person's crontab */
73 typedef struct _cron_db {
74 user *head, *tail; /* links */
75 time_t mtime; /* last modtime on spooldir */
77 /* in the C tradition, we only create
78 * variables for the main program, just
79 * extern them elsewhere.