diff options
author | Stefan Eßer <se@FreeBSD.org> | 2020-11-01 20:46:31 +0000 |
---|---|---|
committer | Stefan Eßer <se@FreeBSD.org> | 2020-11-01 20:46:31 +0000 |
commit | 1626014679684941489d4593a8942ca8b9b8764f (patch) | |
tree | 129e7f96ef920da8eea7c2989e62634efdbadb10 /deskutils/calendar | |
parent | 52b5bedc242a24db06cb0280a10b74fd223b360c (diff) |
Notes
Diffstat (limited to 'deskutils/calendar')
-rw-r--r-- | deskutils/calendar/Makefile | 2 | ||||
-rw-r--r-- | deskutils/calendar/distinfo | 6 | ||||
-rw-r--r-- | deskutils/calendar/files/patch-io.c | 30 | ||||
-rw-r--r-- | deskutils/calendar/files/patch-pathnames.h | 3 |
4 files changed, 26 insertions, 15 deletions
diff --git a/deskutils/calendar/Makefile b/deskutils/calendar/Makefile index c73dab9c8068..5e3a26c31a5e 100644 --- a/deskutils/calendar/Makefile +++ b/deskutils/calendar/Makefile @@ -1,7 +1,7 @@ # $FreeBSD$ PORTNAME= calendar -DISTVERSION= 0.7.1 +DISTVERSION= 0.7.2 CATEGORIES= deskutils MAINTAINER= se@FreeBSD.org diff --git a/deskutils/calendar/distinfo b/deskutils/calendar/distinfo index 32032670ea4d..485b97618d13 100644 --- a/deskutils/calendar/distinfo +++ b/deskutils/calendar/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1604223089 -SHA256 (bsdimp-calendar-0.7.1-fcc5d31_GH0.tar.gz) = ad7d0b51c4b834241aebbf6c50d187e5720f6c46c02615b27841a923e082aebc -SIZE (bsdimp-calendar-0.7.1-fcc5d31_GH0.tar.gz) = 132824 +TIMESTAMP = 1604263248 +SHA256 (bsdimp-calendar-0.7.2-fcc5d31_GH0.tar.gz) = ad7d0b51c4b834241aebbf6c50d187e5720f6c46c02615b27841a923e082aebc +SIZE (bsdimp-calendar-0.7.2-fcc5d31_GH0.tar.gz) = 132824 diff --git a/deskutils/calendar/files/patch-io.c b/deskutils/calendar/files/patch-io.c index e5a860ce8404..83b32dce3d15 100644 --- a/deskutils/calendar/files/patch-io.c +++ b/deskutils/calendar/files/patch-io.c @@ -39,14 +39,26 @@ } warnx("can't open calendar file \"%s\"", file); -@@ -133,60 +141,130 @@ cal_fopen(const char *file) +@@ -133,60 +141,142 @@ cal_fopen(const char *file) return (NULL); } ++static char* ++cal_path(void) ++{ ++ static char buffer[MAXPATHLEN + 10]; ++ ++ if (cal_dir[0] == '/') ++ snprintf(buffer, sizeof(buffer), "%s/%s", cal_dir, cal_file); ++ else ++ snprintf(buffer, sizeof(buffer), "%s/%s/%s", cal_home, cal_dir, cal_file); ++ return (buffer); ++} ++ +#define WARN0(format) \ -+ warnx(format " in %s/%s/%s line %d", cal_home, cal_dir, cal_file, cal_line) ++ warnx(format " in %s line %d", cal_path(), cal_line) +#define WARN1(format, arg1) \ -+ warnx(format " in %s/%s/%s line %d", arg1, cal_home, cal_dir, cal_file, cal_line) ++ warnx(format " in %s line %d", arg1, cal_path(), cal_line) + static int -token(char *line, FILE *out, bool *skip) @@ -192,7 +204,7 @@ return (T_OK); } -@@ -198,26 +276,29 @@ token(char *line, FILE *out, bool *skip) +@@ -198,26 +288,29 @@ token(char *line, FILE *out, bool *skip) trimlr(&walk); if (*walk == '\0') { @@ -234,7 +246,7 @@ return (T_OK); } -@@ -248,11 +329,14 @@ cal_parse(FILE *in, FILE *out) +@@ -248,11 +341,14 @@ cal_parse(FILE *in, FILE *out) int month[MAXCOUNT]; int day[MAXCOUNT]; int year[MAXCOUNT]; @@ -250,7 +262,7 @@ /* Unused */ tm.tm_sec = 0; -@@ -263,9 +347,61 @@ cal_parse(FILE *in, FILE *out) +@@ -263,9 +359,61 @@ cal_parse(FILE *in, FILE *out) if (in == NULL) return (1); @@ -314,7 +326,7 @@ case T_ERR: free(line); return (1); -@@ -278,18 +414,9 @@ cal_parse(FILE *in, FILE *out) +@@ -278,18 +426,9 @@ cal_parse(FILE *in, FILE *out) } } @@ -334,7 +346,7 @@ /* * Setting LANG in user's calendar was an old workaround * for 'calendar -a' being run with C locale to properly -@@ -353,7 +480,7 @@ cal_parse(FILE *in, FILE *out) +@@ -353,7 +492,7 @@ cal_parse(FILE *in, FILE *out) if (count < 0) { /* Show error status based on return value */ if (debug) @@ -343,7 +355,7 @@ if (count == -1) continue; count = -count + 1; -@@ -373,11 +500,15 @@ cal_parse(FILE *in, FILE *out) +@@ -373,11 +512,15 @@ cal_parse(FILE *in, FILE *out) (void)strftime(dbuf, sizeof(dbuf), d_first ? "%e %b" : "%b %e", &tm); if (debug) diff --git a/deskutils/calendar/files/patch-pathnames.h b/deskutils/calendar/files/patch-pathnames.h index 0f91ca48f130..ee9eb685c152 100644 --- a/deskutils/calendar/files/patch-pathnames.h +++ b/deskutils/calendar/files/patch-pathnames.h @@ -1,7 +1,6 @@ --- pathnames.h.orig 2020-10-18 03:01:26 UTC +++ pathnames.h -@@ -34,4 +34,5 @@ - +@@ -35,3 +35,4 @@ #include <paths.h> #define _PATH_INCLUDE "/usr/share/calendar" |