Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.bin/calendar Add option to remove escape character befor...



details:   https://anonhg.NetBSD.org/src/rev/a5679c6232ae
branches:  trunk
changeset: 552693:a5679c6232ae
user:      briggs <briggs%NetBSD.org@localhost>
date:      Tue Sep 30 15:00:18 2003 +0000

description:
Add option to remove escape character before comment character in
fparseln().  Add escape characters before comment characters in the
few places those appear in the calendar data files.

diffstat:

 usr.bin/calendar/calendar.c                 |  7 ++++---
 usr.bin/calendar/calendars/calendar.history |  2 +-
 usr.bin/calendar/calendars/calendar.music   |  4 ++--
 3 files changed, 7 insertions(+), 6 deletions(-)

diffs (61 lines):

diff -r 53a15683cd63 -r a5679c6232ae usr.bin/calendar/calendar.c
--- a/usr.bin/calendar/calendar.c       Tue Sep 30 12:34:16 2003 +0000
+++ b/usr.bin/calendar/calendar.c       Tue Sep 30 15:00:18 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: calendar.c,v 1.28 2003/08/07 11:13:14 agc Exp $        */
+/*     $NetBSD: calendar.c,v 1.29 2003/09/30 15:00:18 briggs Exp $     */
 
 /*
  * Copyright (c) 1989, 1993, 1994
@@ -39,7 +39,7 @@
 #if 0
 static char sccsid[] = "@(#)calendar.c 8.4 (Berkeley) 1/7/95";
 #endif
-__RCSID("$NetBSD: calendar.c,v 1.28 2003/08/07 11:13:14 agc Exp $");
+__RCSID("$NetBSD: calendar.c,v 1.29 2003/09/30 15:00:18 briggs Exp $");
 #endif /* not lint */
 
 #include <sys/param.h>
@@ -184,7 +184,8 @@
 
        if ((fp = opencal()) == NULL)
                return;
-       while ((line = fparseln(stdin, NULL, NULL, NULL, 0)) != NULL) {
+       while ((line = fparseln(stdin, NULL, NULL, NULL, FPARSELN_UNESCCOMM))
+           != NULL) {
                if (line[0] == '\0')
                        continue;
                if (line[0] != '\t')
diff -r 53a15683cd63 -r a5679c6232ae usr.bin/calendar/calendars/calendar.history
--- a/usr.bin/calendar/calendars/calendar.history       Tue Sep 30 12:34:16 2003 +0000
+++ b/usr.bin/calendar/calendars/calendar.history       Tue Sep 30 15:00:18 2003 +0000
@@ -314,7 +314,7 @@
 09/28  "Pilgrim's Progress" published, 1678
 09/28  A Greek soldier runs 26+ miles after the Persian defeat at Marathon,
        490BC
-09/30  Red Jack kills 2, Elizabeth Stride (#3) and Catherine Eddowes (#4),
+09/30  Red Jack kills 2, Elizabeth Stride (\#3) and Catherine Eddowes (\#4),
        1888
 09/30  The first tooth is extracted under anesthesia in Charleston, Mass, 1846
 09/30  The verdicts of the Nuremberg trials are announced, 1946
diff -r 53a15683cd63 -r a5679c6232ae usr.bin/calendar/calendars/calendar.music
--- a/usr.bin/calendar/calendars/calendar.music Tue Sep 30 12:34:16 2003 +0000
+++ b/usr.bin/calendar/calendars/calendar.music Tue Sep 30 15:00:18 2003 +0000
@@ -81,7 +81,7 @@
 05/26  Al Jolson born, 1886
 05/31  The Who perform the loudest concert ever -- 76,000 watts of PA, 1976
 06/01  The Beatles release "Sgt. Pepper", 1967
-06/06  "Rock Around The Clock" makes Billboard's #1 slot, 1955
+06/06  "Rock Around The Clock" makes Billboard's \#1 slot, 1955
 06/07  Blind Faith debuts in concert at London's Hyde Park, 1969
 06/09  Les Paul (Lester Polfus) is born in Waukesha, Wisconsin, 1923
 06/10  Howlin' Wolf (Chester Burnett) is born in West Point, Mississippi, 1910
@@ -144,7 +144,7 @@
 10/25  The Rolling Stones appear on The Ed Sullivan Show, 1964
 10/29  Duane Allman dies in motorcycle crash near Macon, Georgia, 1971
 10/30  Grace Slick is born in Chicago, 1939
-11/02  Jimi Hendrix's "Electric Ladyland" enters US charts at #1, 1968
+11/02  Jimi Hendrix's "Electric Ladyland" enters US charts at \#1, 1968
 11/02  Keith Emerson is born, 1944
 11/03  James Taylor and Carly Simon are married in Manhattan, 1972
 11/07  Joni Mitchell (Roberta Joan Anderson) is born in Alberta, Canada, 1943



Home | Main Index | Thread Index | Old Index