version 1.7, 2001/09/27 18:19:20 |
version 1.14, 2015/03/15 00:41:28 |
|
|
* 2. Redistributions in binary form must reproduce the above copyright |
* 2. Redistributions in binary form must reproduce the above copyright |
* notice, this list of conditions and the following disclaimer in the |
* notice, this list of conditions and the following disclaimer in the |
* documentation and/or other materials provided with the distribution. |
* documentation and/or other materials provided with the distribution. |
* 3. All advertising materials mentioning features or use of this software |
* 3. Neither the name of the University nor the names of its contributors |
* must display the following acknowledgement: |
|
* This product includes software developed by the University of |
|
* California, Berkeley and its contributors. |
|
* 4. Neither the name of the University nor the names of its contributors |
|
* may be used to endorse or promote products derived from this software |
* may be used to endorse or promote products derived from this software |
* without specific prior written permission. |
* without specific prior written permission. |
* |
* |
|
|
extern int doall; |
extern int doall; |
extern int bodun_always; |
extern int bodun_always; |
extern time_t f_time; |
extern time_t f_time; |
extern struct iovec header[]; |
|
extern struct tm *tp; |
extern struct tm *tp; |
extern char *calendarFile; |
extern char *calendarFile; |
extern char *calendarHome; |
extern char *calendarHome; |
|
|
int nlen; |
int nlen; |
char *uname; |
char *uname; |
int ulen; |
int ulen; |
int (*getev) __P((int)); |
int (*getev)(int); |
}; |
}; |
|
|
void cal __P((void)); |
void cal(void); |
void closecal __P((FILE *)); |
void closecal(FILE *); |
int getday __P((char *)); |
int getday(char *); |
int getdayvar __P((char *)); |
int getdayvar(char *); |
int getfield __P((char *, char **, int *)); |
int getfield(char *, char **, int *); |
int getmonth __P((char *)); |
int getmonth(char *); |
int easter __P((int)); |
int pesach(int); |
int paskha __P((int)); |
int easter(int); |
void insert __P((struct event **, struct event *)); |
int paskha(int); |
struct match *isnow __P((char *, int)); |
void insert(struct event **, struct event *); |
FILE *opencal __P((void)); |
struct match *isnow(char *, int); |
void settime __P((time_t *)); |
FILE *opencal(void); |
time_t Mktime __P((char *)); |
void settime(time_t *); |
void usage __P((void)); |
time_t Mktime(char *); |
int foy __P((int)); |
void usage(void); |
void variable_weekday __P((int *, int, int)); |
int foy(int); |
void setnnames __P((void)); |
void variable_weekday(int *, int, int); |
|
void setnnames(void); |
|
|
/* some flags */ |
/* some flags */ |
#define F_ISMONTH 0x01 /* month (Januar ...) */ |
#define F_ISMONTH 0x01 /* month (Januar ...) */ |
|
|
* calendar time--e.g. Easter or easter depending |
* calendar time--e.g. Easter or easter depending |
* days */ |
* days */ |
|
|
|
#define SECSPERDAY (24 * 60 * 60) |
|
#define isleap(y) (((y) % 4) == 0 && (((y) % 100) != 0 || ((y) % 400) == 0)) |
|
|
extern int f_dayAfter; /* days after current date */ |
extern int f_dayAfter; /* days after current date */ |
extern int f_dayBefore; /* days before current date */ |
extern int f_dayBefore; /* days before current date */ |
|
extern int f_SetdayAfter; /* calendar invoked with -A */ |
|
|
/* Special events; see also setnnames() in day.c */ |
/* Special events; see also setnnames() in day.c */ |
/* '=' is not a valid character in a special event name */ |
/* '=' is not a valid character in a special event name */ |
|
#define PESACH "pesach" |
|
#define PESACHLEN (sizeof(PESACH) - 1) |
#define EASTER "easter" |
#define EASTER "easter" |
#define EASTERNAMELEN (sizeof(EASTER) - 1) |
#define EASTERNAMELEN (sizeof(EASTER) - 1) |
#define PASKHA "paskha" |
#define PASKHA "paskha" |
#define PASKHALEN (sizeof(PASKHA) - 1) |
#define PASKHALEN (sizeof(PASKHA) - 1) |
|
|
#define NUMEV 2 /* Total number of such special events */ |
/* calendars */ |
|
extern enum calendars { GREGORIAN = 0, JULIAN, LUNAR } calendar; |
|
extern u_long julian; |
|
|
|
#define NUMEV 3 /* Total number of such special events */ |
extern struct specialev spev[NUMEV]; |
extern struct specialev spev[NUMEV]; |
|
|
/* For calendar -a, specify a maximum time (in seconds) to spend parsing |
/* For calendar -a, specify a maximum time (in seconds) to spend parsing |