Mercurial > bday
comparison birthday.h @ 5:5af6bf2cb271
reads only stdin now, no files anymore; removed -f option aswell; code beatifing
author | meillo@marmaro.de |
---|---|
date | Mon, 17 Dec 2007 15:09:03 +0100 |
parents | 5326c222cd4e |
children | fc6e40f7bd5a |
comparison
equal
deleted
inserted
replaced
4:5326c222cd4e | 5:5af6bf2cb271 |
---|---|
23 this program. | 23 this program. |
24 | 24 |
25 $Id: birthday.h,v 1.6 1999/04/25 14:01:29 andy Exp $ | 25 $Id: birthday.h,v 1.6 1999/04/25 14:01:29 andy Exp $ |
26 */ | 26 */ |
27 | 27 |
28 #include <stdio.h> | |
29 | |
28 /* ========== Configuration section */ | 30 /* ========== Configuration section */ |
29 | 31 |
30 #define DEFAULT_FILE ".birthdays" | 32 /* standard time to warn in advance, when no explicit w flag is given. */ |
33 #define DEF_WARN 14 | |
31 | 34 |
32 /* standard time to warn in advance, when no explicit w flag is given. */ | |
33 #define DEF_WARN 21 | |
34 | 35 |
35 /* ========== Required includes */ | |
36 | |
37 #include <stdio.h> | |
38 | 36 |
39 /* ========== Global constants and data types */ | 37 /* ========== Global constants and data types */ |
40 | 38 |
41 | 39 |
42 /* month lengths etc */ | 40 /* month lengths etc */ |
79 | 77 |
80 typedef int (*prnfunc)(const char *); | 78 typedef int (*prnfunc)(const char *); |
81 | 79 |
82 /* ========== */ | 80 /* ========== */ |
83 | 81 |
84 struct event *readlist(char *fname); | 82 struct event* readlist(void); |
85 void gettoday(void); | 83 void gettoday(void); |
86 unsigned delta(struct date *); | 84 unsigned delta(struct date *); |
87 unsigned ddiff(struct date *D1, struct date *D2); | 85 unsigned ddiff(struct date *D1, struct date *D2); |
88 void liststrings(struct event *evl, prnfunc outf); | 86 void liststrings(struct event *evl, prnfunc outf); |
89 char *tdelta(struct date *d); | 87 char *tdelta(struct date *d); |