diff options
author | ache <ache@FreeBSD.org> | 1996-05-10 17:32:06 +0000 |
---|---|---|
committer | ache <ache@FreeBSD.org> | 1996-05-10 17:32:06 +0000 |
commit | df58ec580d62b91cdd59aa7806163c0bb3e9fa8e (patch) | |
tree | 35650da73c5ea4db017c33335e7f268ed8fdb6bf /usr.bin/calendar/io.c | |
parent | 02fead7e055f8da6555c29a488d8a0b2569cf17c (diff) | |
download | FreeBSD-src-df58ec580d62b91cdd59aa7806163c0bb3e9fa8e.zip FreeBSD-src-df58ec580d62b91cdd59aa7806163c0bb3e9fa8e.tar.gz |
Allow to configure national Easter names.
Speedup my national months/days handling code.
Diffstat (limited to 'usr.bin/calendar/io.c')
-rw-r--r-- | usr.bin/calendar/io.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/usr.bin/calendar/io.c b/usr.bin/calendar/io.c index 3f69a00..8b2a676 100644 --- a/usr.bin/calendar/io.c +++ b/usr.bin/calendar/io.c @@ -65,6 +65,8 @@ char *calendarFile = "calendar"; /* default calendar file */ char *calendarHome = ".calendar"; /* HOME */ char *calendarNoMail = "nomail"; /* don't sent mail if this file exist */ +struct fixs neaster, npaskha; + struct iovec header[] = { {"From: ", 6}, {NULL, 0}, @@ -107,6 +109,20 @@ cal() setnnames(); continue; } + if (strncasecmp(buf, "Easter=", 7) == 0 && buf[7]) { + if (neaster.name != NULL) + free(neaster.name); + neaster.name = strdup(buf + 7); + neaster.len = strlen(buf + 7); + continue; + } + if (strncasecmp(buf, "Paskha=", 7) == 0 && buf[7]) { + if (npaskha.name != NULL) + free(npaskha.name); + npaskha.name = strdup(buf + 7); + npaskha.len = strlen(buf + 7); + continue; + } if (buf[0] != '\t') { printing = isnow(buf, &month, &day, &var) ? 1 : 0; if ((p = strchr(buf, '\t')) == NULL) |