meillo@0: /* meillo@0: birthday meillo@0: meillo@0: Birthday/Anniversary display on login meillo@0: meillo@0: (c) 1996 AS Mortimer meillo@0: meillo@0: This program is free software; you can redistribute it and/or meillo@0: modify it under the terms of the GNU General Public License as meillo@0: published by the Free Software Foundation; either version 2 of the meillo@0: License, or (at your option) any later version. You may also meillo@0: distribute it under the Artistic License, as comes with Perl. meillo@0: meillo@0: This program is distributed in the hope that it will be useful, meillo@0: but WITHOUT ANY WARRANTY; without even the implied warranty of meillo@0: MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. meillo@0: meillo@0: You should have received a copy of the GNU General Public License meillo@0: along with this program; if not, write to the Free Software meillo@0: Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA meillo@0: meillo@0: You should also have recieved a copy of the Artistic license with meillo@0: this program. meillo@0: meillo@0: $Id: birthday.c,v 1.5 1999/04/25 14:01:29 andy Exp $ meillo@0: */ meillo@0: meillo@0: #include meillo@0: #include meillo@0: #include meillo@0: meillo@0: #include "birthday.h" meillo@0: meillo@0: meillo@0: int main(int argc, char* argv[]) meillo@0: { meillo@0: char* fname = NULL; meillo@0: struct event *evl; /* evl => event list */ meillo@0: meillo@0: while (--argc > 0 && (*++argv)[0] == '-') { meillo@0: if (strcmp(argv[0], "-f") == 0) { meillo@0: fname = strdup((++argv)[0]); meillo@0: argc--; meillo@0: } else if (strcmp(argv[0], "-W") == 0) { meillo@0: iDWarn = atoi((++argv)[0]); meillo@0: argc--; meillo@0: } else { meillo@3: fprintf(stderr, "unknown option %s\n", argv[0]); meillo@0: exit(1); meillo@0: } meillo@0: } meillo@0: meillo@0: evl = readlist(fname); /* read and format entries */ meillo@0: meillo@0: liststrings(evl, puts); meillo@0: meillo@0: return 0; meillo@0: }