Received: by mail.netbsd.org (Postfix, from userid 605) id F3CC884D87; Sun, 5 Jul 2020 13:35:32 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by mail.netbsd.org (Postfix) with ESMTP id 7BAC884D82 for ; Sun, 5 Jul 2020 13:35:32 +0000 (UTC) X-Virus-Scanned: amavisd-new at netbsd.org Received: from mail.netbsd.org ([IPv6:::1]) by localhost (mail.netbsd.org [IPv6:::1]) (amavisd-new, port 10025) with ESMTP id 8JyN_-PrO190 for ; Sun, 5 Jul 2020 13:35:31 +0000 (UTC) Received: from cvs.NetBSD.org (ivanova.NetBSD.org [IPv6:2001:470:a085:999:28c:faff:fe03:5984]) by mail.netbsd.org (Postfix) with ESMTP id BB51284CE2 for ; Sun, 5 Jul 2020 13:35:31 +0000 (UTC) Received: by cvs.NetBSD.org (Postfix, from userid 500) id B5356FB28; Sun, 5 Jul 2020 13:35:31 +0000 (UTC) Content-Transfer-Encoding: 7bit Content-Type: multipart/mixed; boundary="_----------=_159395613115950" MIME-Version: 1.0 Date: Sun, 5 Jul 2020 13:35:31 +0000 From: "Olaf Seibert" Subject: CVS commit: pkgsrc/news/trn To: pkgsrc-changes@NetBSD.org Reply-To: rhialto@netbsd.org X-Mailer: log_accum Message-Id: <20200705133531.B5356FB28@cvs.NetBSD.org> Sender: pkgsrc-changes-owner@NetBSD.org List-Id: pkgsrc-changes.NetBSD.org Precedence: bulk List-Unsubscribe: This is a multi-part message in MIME format. --_----------=_159395613115950 Content-Disposition: inline Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII" Module Name: pkgsrc Committed By: rhialto Date: Sun Jul 5 13:35:31 UTC 2020 Modified Files: pkgsrc/news/trn: Makefile distinfo Added Files: pkgsrc/news/trn/patches: patch-parsedate.y Log Message: news/trn: Add patch with date grammar rules for old articles from olduse.net. To generate a diff of this commit: cvs rdiff -u -r1.47 -r1.48 pkgsrc/news/trn/Makefile cvs rdiff -u -r1.15 -r1.16 pkgsrc/news/trn/distinfo cvs rdiff -u -r0 -r1.1 pkgsrc/news/trn/patches/patch-parsedate.y Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. --_----------=_159395613115950 Content-Disposition: inline Content-Length: 4130 Content-Transfer-Encoding: binary Content-Type: text/x-diff; charset=us-ascii Modified files: Index: pkgsrc/news/trn/Makefile diff -u pkgsrc/news/trn/Makefile:1.47 pkgsrc/news/trn/Makefile:1.48 --- pkgsrc/news/trn/Makefile:1.47 Fri Mar 20 11:58:13 2020 +++ pkgsrc/news/trn/Makefile Sun Jul 5 13:35:31 2020 @@ -1,8 +1,8 @@ -# $NetBSD: Makefile,v 1.47 2020/03/20 11:58:13 nia Exp $ +# $NetBSD: Makefile,v 1.48 2020/07/05 13:35:31 rhialto Exp $ DISTNAME= trn-4.0-test77 PKGNAME= trn-4.77 -PKGREVISION= 3 +PKGREVISION= 4 CATEGORIES= news MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=trn/} Index: pkgsrc/news/trn/distinfo diff -u pkgsrc/news/trn/distinfo:1.15 pkgsrc/news/trn/distinfo:1.16 --- pkgsrc/news/trn/distinfo:1.15 Mon Nov 2 23:49:48 2015 +++ pkgsrc/news/trn/distinfo Sun Jul 5 13:35:31 2020 @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.15 2015/11/02 23:49:48 agc Exp $ +$NetBSD: distinfo,v 1.16 2020/07/05 13:35:31 rhialto Exp $ SHA1 (trn-4.0-test77.tar.gz) = de43b0ac38e6d921c6f3fa55c8b5b948ac034e8e RMD160 (trn-4.0-test77.tar.gz) = 291a8ded5ebbf2724f132e52b77db84b3079371d @@ -7,3 +7,4 @@ Size (trn-4.0-test77.tar.gz) = 564694 by SHA1 (patch-ac) = b6e06444f55242c1fe0dac194e04cd2c5f6a4c53 SHA1 (patch-ad) = f6d102af2b6e3095ea765f622085464193d94835 SHA1 (patch-ae) = 6cc777ff94540345a433e88ab355fe18a23d60d1 +SHA1 (patch-parsedate.y) = 99213bd37f0708b65276a1f920b757a65ba29b33 Added files: Index: pkgsrc/news/trn/patches/patch-parsedate.y diff -u /dev/null pkgsrc/news/trn/patches/patch-parsedate.y:1.1 --- /dev/null Sun Jul 5 13:35:31 2020 +++ pkgsrc/news/trn/patches/patch-parsedate.y Sun Jul 5 13:35:31 2020 @@ -0,0 +1,109 @@ +$NetBSD: patch-parsedate.y,v 1.1 2020/07/05 13:35:31 rhialto Exp $ + +Add date grammar rules for old articles from olduse.net. + +--- parsedate.y.orig 2000-05-27 00:31:17.000000000 +0000 ++++ parsedate.y +@@ -134,6 +134,10 @@ item : time { + | rel { + yyHaveRel = 1; + } ++ | unixdatestamp { ++ yyHaveTime++; ++ yyHaveDate++; ++ } + ; + + time : tUNUMBER o_merid { +@@ -259,6 +263,24 @@ date : tUNUMBER '/' tUNUMBER { + yyMonth = $4; + yyYear = $5; + } ++ /* Sun, 5-May-85 13:39:01 EDT */ ++ | tDAY ',' tUNUMBER tMONTH tSNUMBER { ++ /* a loose '-' disappears, and -85 becomes a single number */ ++ yyDay = $3; ++ yyMonth = $4; ++ yyYear = -$5; ++ if (yyYear < 0) ++ yyYear = -yyYear; ++ } ++ /* 5-May-85 13:39:01 EDT */ ++ | tUNUMBER tMONTH tSNUMBER { ++ /* a loose '-' disappears, and -85 becomes a single number */ ++ yyDay = $1; ++ yyMonth = $2; ++ yyYear = -$3; ++ if (yyYear < 0) ++ yyYear = -yyYear; ++ } + ; + + rel : tSNUMBER tSEC_UNIT { +@@ -283,6 +305,21 @@ o_merid : /* NULL */ { + } + ; + ++ /* Sat Apr 24 10:49:30 1982 */ ++unixdatestamp: tDAY tMONTH tUNUMBER udtime tUNUMBER { ++ yyDay = $3; ++ yyMonth = $2; ++ yyYear = $5; ++ } ++ ; ++ ++udtime : tUNUMBER ':' tUNUMBER ':' tUNUMBER { ++ yyHour = $1; ++ yyMinutes = $3; ++ yySeconds = $5; ++ yyMeridian = MER24; ++ yyDSTmode = DSToff; ++ } + %% + + /* Month and day table. */ +@@ -692,6 +729,9 @@ date_lex() + if (isdigit(c) || c == '-' || c == '+') { + if (c == '-' || c == '+') { + sign = c == '-' ? -1 : 1; ++#ifdef TEST ++ printf(" A number? %s\n", yyInput); ++#endif + yyInput++; + if (!isdigit(*yyInput)) + /* Skip the plus or minus sign. */ +@@ -703,6 +743,9 @@ date_lex() + i = 10 * i + c - '0'; + yyInput--; + yylval.Number = sign < 0 ? -i : i; ++#ifdef TEST ++ printf(" A number? => %d %s\n", yylval.Number, yyInput); ++#endif + return sign ? tSNUMBER : tUNUMBER; + } + +@@ -713,9 +756,15 @@ date_lex() + *p++ = isupper(c) ? tolower(c) : c; + *p = '\0'; + yyInput--; ++#ifdef TEST ++ printf(" A word: %s %s\n", buff, yyInput); ++#endif + return LookupWord(buff, p - buff); + } + ++#ifdef TEST ++ printf(" A char: %s\n", yyInput); ++#endif + return *yyInput++; + } + } +@@ -799,7 +848,7 @@ main(ac, av) + continue; + } + #endif /* YYDEBUG */ +- d = parsedate(buff, (TIMEINFO *)NULL); ++ d = parsedate(buff); + if (d == -1) + (void)printf("Bad format - couldn't convert.\n"); + else --_----------=_159395613115950--