summaryrefslogtreecommitdiff
path: root/usr.bin/cal
diff options
context:
space:
mode:
authorKiyoshi Aman <kiyoshi.aman+adelie@gmail.com>2019-05-28 07:37:03 -0500
committerKiyoshi Aman <kiyoshi.aman+adelie@gmail.com>2019-05-28 07:37:03 -0500
commit0986a21124880869cb146ac7fa80a6bc3a6f09dd (patch)
tree46cc4790f4cf6fe5abd45d9b4ce87bf5c79addbd /usr.bin/cal
parente49261426acb09f4f85d995101b28d36ba54939e (diff)
downloaduserland-0986a21124880869cb146ac7fa80a6bc3a6f09dd.tar.gz
userland-0986a21124880869cb146ac7fa80a6bc3a6f09dd.tar.bz2
userland-0986a21124880869cb146ac7fa80a6bc3a6f09dd.tar.xz
userland-0986a21124880869cb146ac7fa80a6bc3a6f09dd.zip
usr.bin/cal: make more buildable; requires curses work?
Diffstat (limited to 'usr.bin/cal')
-rw-r--r--usr.bin/cal/cal.c21
1 files changed, 4 insertions, 17 deletions
diff --git a/usr.bin/cal/cal.c b/usr.bin/cal/cal.c
index 712fa59..51aa0b7 100644
--- a/usr.bin/cal/cal.c
+++ b/usr.bin/cal/cal.c
@@ -32,20 +32,6 @@
* SUCH DAMAGE.
*/
-#include <sys/cdefs.h>
-#ifndef lint
-__COPYRIGHT("@(#) Copyright (c) 1989, 1993, 1994\
- The Regents of the University of California. All rights reserved.");
-#endif /* not lint */
-
-#ifndef lint
-#if 0
-static char sccsid[] = "@(#)cal.c 8.4 (Berkeley) 4/2/94";
-#else
-__RCSID("$NetBSD: cal.c,v 1.29 2015/06/16 22:54:10 christos Exp $");
-#endif
-#endif /* not lint */
-
#include <sys/types.h>
#include <ctype.h>
@@ -55,11 +41,10 @@ __RCSID("$NetBSD: cal.c,v 1.29 2015/06/16 22:54:10 christos Exp $");
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#include <term.h>
#include <time.h>
-#include <tzfile.h>
#include <unistd.h>
+#define TM_YEAR_BASE 1900
#define SATURDAY 6 /* 1 Jan 1 was a Saturday */
#define FIRST_MISSING_DAY reform->first_missing_day
@@ -178,6 +163,7 @@ static struct reform {
{ "Germany", 0, 1700, 2, 19, 0, 0 },
{ "Norway", 0, 1700, 2, 19, 0, 0 },
{ "Denmark", 0, 1700, 2, 19, 0, 0 },
+ { "United Kingdom", 0, 1752, 9, 3, 0, 0 },
{ "Great Britain", 0, 1752, 9, 3, 0, 0 },
{ "England", 0, 1752, 9, 3, 0, 0 },
{ "America", 0, 1752, 9, 3, 0, 0 },
@@ -187,6 +173,7 @@ static struct reform {
{ "China", 0, 1911, 11, 7, 0, 0 },
{ "Bulgaria", 0, 1916, 4, 1, 0, 0 },
{ "U.S.S.R.", 0, 1918, 2, 1, 0, 0 },
+ { "Russia", 0, 1918, 2, 1, 0, 0 },
{ "Serbia", 0, 1919, 1, 19, 0, 0 },
{ "Romania", 0, 1919, 1, 19, 0, 0 },
{ "Greece", 0, 1924, 3, 10, 0, 0 },
@@ -211,7 +198,7 @@ static int day_in_week(int, int, int);
static int day_in_year(int, int, int);
static void monthrange(int, int, int, int, int);
static void trim_trailing_spaces(char *);
-__dead static void usage(void);
+static void usage(void);
int
main(int argc, char **argv)