Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 3 Mar 2010 06:48:05 +0000 (UTC)
From:      Edwin Groothuis <edwin@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-user@freebsd.org
Subject:   svn commit: r204623 - user/edwin/ncal
Message-ID:  <201003030648.o236m506072924@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: edwin
Date: Wed Mar  3 06:48:05 2010
New Revision: 204623
URL: http://svn.freebsd.org/changeset/base/204623

Log:
  Remove more old code.

Modified:
  user/edwin/ncal/ncal.c

Modified: user/edwin/ncal/ncal.c
==============================================================================
--- user/edwin/ncal/ncal.c	Wed Mar  3 06:41:01 2010	(r204622)
+++ user/edwin/ncal/ncal.c	Wed Mar  3 06:48:05 2010	(r204623)
@@ -165,25 +165,22 @@ int	nswitchb;		/* switch date for backwa
 const char	*term_so, *term_se;
 int	today;
 
-char   *center(char *s, char *t, int w);
-wchar_t *wcenter(wchar_t *s, wchar_t *t, int w);
-void	mkmonth(int year, int month, int jd_flag, struct monthlines * monthl);
-void    mkmonthb(int year, int month, int jd_flag, struct monthlines * monthl);
-void    mkweekdays(struct weekdays * wds);
-int     parsemonth(const char *s, int *m, int *y);
-void    printcc(void);
-void    printeaster(int year, int julian, int orthodox);
-void    printmonth(int year, int month, int jd_flag);
-void    printmonthb(int year, int month, int jd_flag);
-int	firstday(int y, int m);
-date   *sdate(int ndays, struct date * d);
-date   *sdateb(int ndays, struct date * d);
-int     sndays(struct date * d);
-int     sndaysb(struct date * d);
+static char   *center(char *s, char *t, int w);
+static wchar_t *wcenter(wchar_t *s, wchar_t *t, int w);
+static void	mkmonth(int year, int month, int jd_flag, struct monthlines * monthl);
+static void    mkmonthb(int year, int month, int jd_flag, struct monthlines * monthl);
+static void    mkweekdays(struct weekdays * wds);
+static int     parsemonth(const char *s, int *m, int *y);
+static void    printcc(void);
+static void    printeaster(int year, int julian, int orthodox);
+static int	firstday(int y, int m);
+static date   *sdate(int ndays, struct date * d);
+static date   *sdateb(int ndays, struct date * d);
+static int     sndays(struct date * d);
+static int     sndaysb(struct date * d);
 static void usage(void);
-int     weekdayb(int nd);
-void	monthrange(int year, int jd_flag, int m, int before, int after);
-void	monthrangeb(int year, int jd_flag, int m, int before, int after);
+static void	monthrange(int year, int jd_flag, int m, int before, int after);
+static void	monthrangeb(int year, int jd_flag, int m, int before, int after);
 
 int
 main(int argc, char *argv[])
@@ -476,58 +473,6 @@ printeaster(int y, int julian, int ortho
 	printf("%s\n", buf);
 }
 
-void
-printmonth(int y, int m, int jd_flag)
-{
-	struct monthlines month;
-	struct weekdays wds;
-	int i, len;
-
-	mkmonth(y, m - 1, jd_flag, &month);
-	mkweekdays(&wds);
-	printf("    %ls %d\n", month.name, y);
-	for (i = 0; i != 7; i++) {
-		len = wcslen(wds.names[i]);
-		if (wcswidth(wds.names[i], len) == len)
-			wprintf(L"%.2ls%s\n", wds.names[i], month.lines[i]);
-		else
-			wprintf(L"%.1ls%s\n", wds.names[i], month.lines[i]);
-	}
-	if (flag_weeks)
-		printf("  %s\n", month.weeks);
-}
-
-void
-printmonthb(int y, int m, int jd_flag)
-{
-	struct monthlines month;
-	struct weekdays wds;
-	wchar_t s[MAX_WIDTH], t[MAX_WIDTH];
-	int i;
-	int mw;
-
-	mkmonthb(y, m - 1, jd_flag, &month);
-	mkweekdays(&wds);
-
-	mw = jd_flag ? MONTH_WIDTH_B_J : MONTH_WIDTH_B;
-
-	swprintf(s, MAX_WIDTH, L"%ls %d", month.name, y);
-	wprintf(L"%ls\n", wcenter(t, s, mw));
-
-	if (jd_flag)
-		wprintf(L" %ls %ls %ls %ls %ls %ls %.2ls\n",
-			wds.names[6], wds.names[0],
-			wds.names[1], wds.names[2], wds.names[3],
-			wds.names[4], wds.names[5]);
-	else
-		wprintf(L"%ls%ls%ls%ls%ls%ls%.2ls\n", wds.names[6],
-			wds.names[0], wds.names[1], wds.names[2], wds.names[3],
-			wds.names[4], wds.names[5]);
-
-	for (i = 0; i != 6; i++)
-		printf("%s\n", month.lines[i]+1);
-}
-
 #define MW(mw, ms, ml) \
 	strlen(ms) > (ml) ? (mw) + 9 : (mw)
 #define	DECREASEMONTH(m, y) 		\



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201003030648.o236m506072924>