Upgrade to to FreeBSD base SVN revision r367173

The order of events printed was reversed due to the way a link list was
updated. This version prints the events in the order they appear in in
the data file.
This commit is contained in:
Stefan Eßer 2020-10-30 18:23:58 +00:00
parent 1b8f14c12b
commit aa905f6b03
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=553710
4 changed files with 47 additions and 5 deletions

View file

@ -1,7 +1,7 @@
# $FreeBSD$
PORTNAME= calendar
DISTVERSION= 0.5
DISTVERSION= 0.6
CATEGORIES= deskutils
MAINTAINER= se@FreeBSD.org
@ -15,7 +15,7 @@ USE_GITHUB= yes
GH_ACCOUNT= bsdimp
GH_TAGNAME= fcc5d31
CFLAGS+= -D_PATH_LOCALBASE=\"${LOCALBASE}\" -g -O0 # -DDEBUG
CFLAGS+= -D_PATH_LOCALBASE=\"${LOCALBASE}\"
LDFLAGS+= -lm -lutil
PLIST_FILES= bin/calendar \

View file

@ -1,3 +1,3 @@
TIMESTAMP = 1604068556
SHA256 (bsdimp-calendar-0.5-fcc5d31_GH0.tar.gz) = ad7d0b51c4b834241aebbf6c50d187e5720f6c46c02615b27841a923e082aebc
SIZE (bsdimp-calendar-0.5-fcc5d31_GH0.tar.gz) = 132824
TIMESTAMP = 1604081560
SHA256 (bsdimp-calendar-0.6-fcc5d31_GH0.tar.gz) = ad7d0b51c4b834241aebbf6c50d187e5720f6c46c02615b27841a923e082aebc
SIZE (bsdimp-calendar-0.6-fcc5d31_GH0.tar.gz) = 132824

View file

@ -0,0 +1,35 @@
--- dates.c.orig 2020-10-18 03:01:26 UTC
+++ dates.c
@@ -28,7 +28,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
+__FBSDID("$FreeBSD: head/usr.bin/calendar/dates.c 367173 2020-10-30 15:43:52Z se $");
#include <stdio.h>
#include <stdlib.h>
@@ -64,6 +64,7 @@ struct cal_day {
struct cal_month *month; /* points back */
struct cal_year *year; /* points back */
struct event *events;
+ struct event *lastevent;
};
int debug_remember = 0;
@@ -446,8 +447,13 @@ void
addtodate(struct event *e, int year, int month, int day)
{
struct cal_day *d;
+ struct event *ee;
d = find_day(year, month, day);
- e->next = d->events;
- d->events = e;
+ ee = d->lastevent;
+ if (ee != NULL)
+ ee->next = e;
+ else
+ d->events = e;
+ d->lastevent = e;
}

View file

@ -0,0 +1,7 @@
--- tests/regress.s5.out.orig 2020-10-18 03:01:26 UTC
+++ tests/regress.s5.out
@@ -1,3 +1,3 @@
-Jun 21* sunthird
Jun 21 jun 21
+Jun 21* sunthird
Jun 22 jun 22