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.
This commit is contained in:
briggs 2003-09-30 15:00:18 +00:00
parent 701f5ff4ba
commit ef852c60a0
3 changed files with 7 additions and 6 deletions

View File

@ -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 @@ __COPYRIGHT("@(#) Copyright (c) 1989, 1993\n\
#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 @@ cal(void)
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')

View File

@ -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

View File

@ -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