From: Thomas Cort Date: Mon, 18 Nov 2013 23:00:57 +0000 (-0500) Subject: usr.bin/calendar: re-sync with upstream. X-Git-Tag: v3.3.0~681 X-Git-Url: http://zhaoyanbai.com/repos/%22http:/www.isc.org/icons/index.css?a=commitdiff_plain;h=refs%2Fchanges%2F58%2F1158%2F1;p=minix.git usr.bin/calendar: re-sync with upstream. Jenkins was failing on usr.bin/calendar/calendar.c:386:6: with "error: 'fd' may be used uninitialized in this function" when the level of error checking was turned up. The error was recently fixed upstream. This commit updates calendar.c to upstream rev 1.50, updates calendar files too. Change-Id: Ibe0695bf5d0315972f2a4fb1175219dd12cbfa5a --- diff --git a/releasetools/nbsd_ports b/releasetools/nbsd_ports index cf50f51c0..ec06af2f5 100644 --- a/releasetools/nbsd_ports +++ b/releasetools/nbsd_ports @@ -152,7 +152,7 @@ 2012/10/17 12:00:00,usr.bin/bzip2 2012/10/17 12:00:00,usr.bin/bzip2recover 2013/03/15 12:00:00,usr.bin/cal -2012/10/17 12:00:00,usr.bin/calendar +2013/11/18 12:00:00,usr.bin/calendar 2012/10/17 12:00:00,usr.bin/checknr 2009/04/11 12:10:02,usr.bin/chpass 2012/10/17 12:00:00,usr.bin/cksum diff --git a/usr.bin/calendar/calendar.c b/usr.bin/calendar/calendar.c index 279f77914..37d2789ea 100644 --- a/usr.bin/calendar/calendar.c +++ b/usr.bin/calendar/calendar.c @@ -1,4 +1,4 @@ -/* $NetBSD: calendar.c,v 1.49 2012/04/03 12:03:04 matthias Exp $ */ +/* $NetBSD: calendar.c,v 1.50 2013/11/09 15:57:15 christos Exp $ */ /* * Copyright (c) 1989, 1993, 1994 @@ -39,7 +39,7 @@ __COPYRIGHT("@(#) Copyright (c) 1989, 1993\ #if 0 static char sccsid[] = "@(#)calendar.c 8.4 (Berkeley) 1/7/95"; #endif -__RCSID("$NetBSD: calendar.c,v 1.49 2012/04/03 12:03:04 matthias Exp $"); +__RCSID("$NetBSD: calendar.c,v 1.50 2013/11/09 15:57:15 christos Exp $"); #endif /* not lint */ #include @@ -383,24 +383,23 @@ getfield(char *p, char **endp, int *flags) static FILE * opencal(FILE **in) { - int fd; + int fd = -1; int pdes[2]; - const char **name; /* open up calendar file as stdin */ if (fname == NULL) { - for (name = defaultnames; *name != NULL; name++) { - if ((fd = open(*name, O_RDONLY)) < 0) + for (const char **name = defaultnames; *name != NULL; name++) { + if ((fd = open(*name, O_RDONLY)) == -1) continue; else break; } - if (*name == NULL) { + if (fd == -1) { if (doall) return NULL; err(EXIT_FAILURE, "Cannot open calendar file"); } - } else if ((fd = open(fname, O_RDONLY)) < 0) { + } else if ((fd = open(fname, O_RDONLY)) == -1) { if (doall) return NULL; err(EXIT_FAILURE, "Cannot open `%s'", fname); diff --git a/usr.bin/calendar/calendars/calendar.birthday b/usr.bin/calendar/calendars/calendar.birthday index d0bb213e1..891682691 100644 --- a/usr.bin/calendar/calendars/calendar.birthday +++ b/usr.bin/calendar/calendars/calendar.birthday @@ -106,7 +106,7 @@ 04/10 Commodore Matthew Calbraith Perry born, 1854 04/10 William Booth born, 1829, founder of the Salvation Army 04/13 Thomas Jefferson born, 1743 -04/14 Christian Huygen born, 1629, physicist & astronomer; +04/14 Christiaan Huygens born, 1629, physicist & astronomer; discovered Saturn's rings 04/15 Leonardo da Vinci born, 1452 04/16 Charles (Charlie) Chaplin (Sir) born in London, 1889 diff --git a/usr.bin/calendar/calendars/calendar.history b/usr.bin/calendar/calendars/calendar.history index 722085fd8..124dba699 100644 --- a/usr.bin/calendar/calendars/calendar.history +++ b/usr.bin/calendar/calendars/calendar.history @@ -475,7 +475,7 @@ 11/09 Roosevelt establishes the Civil Works Administration, 1933 11/10 41 Women arrested in suffragette demonstrations near White House, 1917 11/10 Cpt. Wirz, commandant of Andersonville Prison hanged, 1865 -11/10 Henry Stanley asks David Livingston, "Dr. Livingston, I presume?", 1871 +11/10 Henry Morton Stanley asks David Livingstone, "Dr. Livingstone, I presume?", 1871 11/11 Washington becomes the 42nd state, 1889 11/12 Dr. Sun Yat-sen's Birthday in Taiwan 11/12 U.S. first exports oil to Europe, 1861 diff --git a/usr.bin/calendar/calendars/calendar.holiday b/usr.bin/calendar/calendars/calendar.holiday index 9b311e437..3add9c4e9 100644 --- a/usr.bin/calendar/calendars/calendar.holiday +++ b/usr.bin/calendar/calendars/calendar.holiday @@ -28,7 +28,6 @@ 01/21* Lee-Jackson Day in Virginia (3rd Monday) 01/21* Robert E. Lee's Birthday in Alabama & Mississippi (3rd Monday) 01/21 Our Lady of Altagracia in Dominican Republic -01/21* Lee-Jackson Day in Virginia (3rd Monday) 01/23 Feast of St. Ildefonsus 01/23 National Handwriting Day 01/24 Economic Liberation Day in Togo @@ -165,7 +164,6 @@ 05/18 Flag Day in Haiti 05/18 Prayer Day in Denmark 05/19 Youth and Sports Day in Turkey -05/20* Memorial Day in Michigan (3rd Monday) 05/20 Mecklenburg Independence Day in North Carolina 05/20 National Day in Cameroon 05/20* Memorial Day in Michigan (3rd Monday) @@ -351,7 +349,6 @@ 10/07 National Heroes Day in Jamaica 10/08 Constitution Day in U.S.S.R 10/08 Fiji Day in Fiji -10/08 Thanksgiving Day in Canada 10/09 Independence Day in Uganda 10/09 Korean Alphabet Day in South Korea 10/09 Leif Erikson Day commemorates the discovery of North America in AD 1000 diff --git a/usr.bin/calendar/calendars/calendar.music b/usr.bin/calendar/calendars/calendar.music index f0044465c..af5689634 100644 --- a/usr.bin/calendar/calendars/calendar.music +++ b/usr.bin/calendar/calendars/calendar.music @@ -148,6 +148,7 @@ 10/22 Franz Liszt born, 1811 10/25 Jon Anderson (Yes) is born in Lancashire, England, 1944 10/25 The Rolling Stones appear on The Ed Sullivan Show, 1964 +10/27 Lou Reed dies aged 71, 2013 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 diff --git a/usr.bin/calendar/calendars/calendar.netbsd b/usr.bin/calendar/calendars/calendar.netbsd index 2f88be0f8..956d649e3 100644 --- a/usr.bin/calendar/calendars/calendar.netbsd +++ b/usr.bin/calendar/calendars/calendar.netbsd @@ -35,6 +35,8 @@ 05/12 NetBSD/hp300 port started, 1993 05/14 NetBSD/cesfic port started, 2001 05/15 NetBSD/macppc port started, 1998 +05/20 NetBSD 6.0.2 released, 2013 +05/20 NetBSD 6.1 released, 2013 05/20 NetBSD 1.2.1 released, 1997 05/25 NetBSD/amigappc port started, 2000 05/28 NetBSD/algor port started, 2001 @@ -60,6 +62,7 @@ 08/02 NetBSD/vax port started, 1994 08/12 NetBSD/mipsco port started, 2000 08/20 pkgsrc forked from FreeBSD Ports, 1997 +08/22 NetBSD 6.1.1 released, 2013 08/23 NetBSD 0.9 released, 1993 08/26 NetBSD 1.4.1 released, 1999 09/02 NetBSD/amiga port started, 1993 @@ -68,7 +71,11 @@ 09/13 NetBSD 1.5.2 released, 2001 09/14 NetBSD 1.6 released, 2002 09/25 NetBSD/hpcmips port started, 1999 +09/28 NetBSD 5.1.3 released, 2013 +09/28 NetBSD 5.2.1 released, 2013 09/29 NetBSD/mac68k port started, 1993 +09/30 NetBSD 6.0.3 released, 2013 +09/30 NetBSD 6.1.2 released, 2013 10/02 NetBSD/sparc port started, 1993 10/04 NetBSD 1.2 released, 1996 10/05 NetBSD/cats port started, 1998 @@ -77,6 +84,7 @@ 10/14 NetBSD 4.0.1 released, 2008 10/14 NetBSD/bebox port started, 1997 10/16 NetBSD/playstation2 port started, 2001 +10/17 NetBSD 6.0 released, 2012 10/26 NetBSD 1.0 released, 1994 10/30 pkgsrc/Darwin support added, 2001 10/31 NetBSD 2.0.3 released, 2005