Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 1 Nov 2020 20:46:31 +0000 (UTC)
From:      =?UTF-8?Q?Stefan_E=c3=9fer?= <se@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r553859 - in head/deskutils/calendar: . files
Message-ID:  <202011012046.0A1KkVK1082648@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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 <paths.h>
  
  #define	_PATH_INCLUDE	"/usr/share/calendar"



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202011012046.0A1KkVK1082648>