Date: Tue, 5 Jan 2010 06:43:29 +0000 (UTC) From: Edwin Groothuis <edwin@FreeBSD.org> To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r201562 - user/edwin/calendar Message-ID: <201001050643.o056hTvO016334@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201001050643.o056hTvO016334>