svn commit: r201562 - user/edwin/calendar

Edwin Groothuis edwin at FreeBSD.org
Tue Jan 5 06:43:29 UTC 2010


Author: edwin
Date: Tue Jan  5 06:43:29 2010
New Revision: 201562
URL: http://svn.freebsd.org/changeset/base/201562

Log:
  Be able to redefine the string of the CNY.

Modified:
  user/edwin/calendar/io.c

Modified: user/edwin/calendar/io.c
==============================================================================
--- user/edwin/calendar/io.c	Tue Jan  5 06:40:27 2010	(r201561)
+++ user/edwin/calendar/io.c	Tue Jan  5 06:43:29 2010	(r201562)
@@ -144,6 +144,14 @@ cal(void)
 			npaskha.len = strlen(buf + 7);
 			continue;
 		}
+		if (strncasecmp(buf, "ChineseNewYear=", 15) == 0 && buf[15]) {
+			if (ncny.name != NULL)
+				free(ncny.name);
+			if ((ncny.name = strdup(buf + 15)) == NULL)
+				errx(1, "cannot allocate memory");
+			ncny.len = strlen(buf + 15);
+			continue;
+		}
 
 		/*
 		 * If the line starts with a tab, the data has to be


More information about the svn-src-user mailing list