From owner-svn-ports-all@freebsd.org Sun Nov 1 20:46:32 2020 Return-Path: Delivered-To: svn-ports-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D292B459B07; Sun, 1 Nov 2020 20:46:32 +0000 (UTC) (envelope-from se@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CPSkw5DGQz4ZD7; Sun, 1 Nov 2020 20:46:32 +0000 (UTC) (envelope-from se@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 977161E2BF; Sun, 1 Nov 2020 20:46:32 +0000 (UTC) (envelope-from se@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0A1KkWx7082652; Sun, 1 Nov 2020 20:46:32 GMT (envelope-from se@FreeBSD.org) Received: (from se@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0A1KkVK1082648; Sun, 1 Nov 2020 20:46:31 GMT (envelope-from se@FreeBSD.org) Message-Id: <202011012046.0A1KkVK1082648@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: se set sender to se@FreeBSD.org using -f From: =?UTF-8?Q?Stefan_E=c3=9fer?= Date: Sun, 1 Nov 2020 20:46:31 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r553859 - in head/deskutils/calendar: . files X-SVN-Group: ports-head X-SVN-Commit-Author: se X-SVN-Commit-Paths: in head/deskutils/calendar: . files X-SVN-Commit-Revision: 553859 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Nov 2020 20:46:32 -0000 Author: se Date: Sun Nov 1 20:46:31 2020 New Revision: 553859 URL: https://svnweb.freebsd.org/changeset/ports/553859 Log: Update to -CURRENT SVN rev. r367255 Fix error position reporting for calendar data files in system directories Modified: head/deskutils/calendar/Makefile head/deskutils/calendar/distinfo head/deskutils/calendar/files/patch-io.c head/deskutils/calendar/files/patch-pathnames.h Modified: head/deskutils/calendar/Makefile ============================================================================== --- head/deskutils/calendar/Makefile Sun Nov 1 20:25:01 2020 (r553858) +++ head/deskutils/calendar/Makefile Sun Nov 1 20:46:31 2020 (r553859) @@ -1,7 +1,7 @@ # $FreeBSD$ PORTNAME= calendar -DISTVERSION= 0.7.1 +DISTVERSION= 0.7.2 CATEGORIES= deskutils MAINTAINER= se@FreeBSD.org Modified: head/deskutils/calendar/distinfo ============================================================================== --- head/deskutils/calendar/distinfo Sun Nov 1 20:25:01 2020 (r553858) +++ head/deskutils/calendar/distinfo Sun Nov 1 20:46:31 2020 (r553859) @@ -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 Modified: head/deskutils/calendar/files/patch-io.c ============================================================================== --- head/deskutils/calendar/files/patch-io.c Sun Nov 1 20:25:01 2020 (r553858) +++ head/deskutils/calendar/files/patch-io.c Sun Nov 1 20:46:31 2020 (r553859) @@ -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) Modified: head/deskutils/calendar/files/patch-pathnames.h ============================================================================== --- head/deskutils/calendar/files/patch-pathnames.h Sun Nov 1 20:25:01 2020 (r553858) +++ head/deskutils/calendar/files/patch-pathnames.h Sun Nov 1 20:46:31 2020 (r553859) @@ -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 #define _PATH_INCLUDE "/usr/share/calendar"