diff options
author | Clive Lin <clive@FreeBSD.org> | 2002-03-31 09:57:43 +0000 |
---|---|---|
committer | Clive Lin <clive@FreeBSD.org> | 2002-03-31 09:57:43 +0000 |
commit | 7dd0cf84b99171ce32e402e1f7191302f5c5c05d (patch) | |
tree | 3ecab5d533c62f1b2f5958b964e2e7389207b5b3 /chinese/lunar | |
parent | o Convert po from utf-8 to big5. (diff) |
o Add big5 output messages.
o Modify lunar man page.
Since I can read the message, and it exactly matches what my mother told
me, I think it's okay to commit.
PR: ports/35344
Submitted by: Chou Yeh-Jyi <yjchou@cis.nctu.edu.tw>
Notes
Notes:
svn path=/head/; revision=57045
Diffstat (limited to 'chinese/lunar')
-rw-r--r-- | chinese/lunar/Makefile | 1 | ||||
-rw-r--r-- | chinese/lunar/files/patch-03 | 120 | ||||
-rw-r--r-- | chinese/lunar/files/patch-04 | 44 |
3 files changed, 165 insertions, 0 deletions
diff --git a/chinese/lunar/Makefile b/chinese/lunar/Makefile index d4f6893fbd9b..a16f5dcf45a5 100644 --- a/chinese/lunar/Makefile +++ b/chinese/lunar/Makefile @@ -8,6 +8,7 @@ PORTNAME= lunar PORTVERSION= 2.1 +PORTREVISION= 1 CATEGORIES= chinese MASTER_SITES= ftp://ftp.ifcss.org/pub/software/unix/c-utils/ \ ftp://ftp.edu.tw/Chinese/ifcss/software/unix/c-utils/ \ diff --git a/chinese/lunar/files/patch-03 b/chinese/lunar/files/patch-03 new file mode 100644 index 000000000000..a8e4d08932a2 --- /dev/null +++ b/chinese/lunar/files/patch-03 @@ -0,0 +1,120 @@ +--- lunar.c.orig Tue Feb 26 20:54:23 2002 ++++ lunar.c Tue Feb 26 21:01:38 2002 +@@ -118,6 +118,26 @@ + "四", "五", "六" + }; + ++static char *GanBIG5[] = { ++ "ヒ", "", "", "", "コ", ++ "", "┌", "ǒ", "ば", "" ++}; ++ ++static char *ZhiBIG5[] = { ++ "", "ぁ", "盙", "", "ò", "", ++ "と", "ゼ", "ビ", "ɑ", "Ζ", "ヨ" ++}; ++ ++static char *ShengXiaoBIG5[] = { ++ "公", "", "", "ㄟ", "纒", "矰", ++ "皑", "ο", "礥", "蔓", "", "睫" ++}; ++ ++static char *weekdayBIG5[] = { ++ "ら", "", "", "", ++ "", "き", "せ" ++}; ++ + + Date solar, lunar, gan, zhi, gan2, zhi2, lunar2; + +@@ -127,6 +147,7 @@ + int jieAlert; /* if there is uncertainty in JieQi calculation */ + + int showHZ = 0; /* output in hanzi */ ++int showB5 = 0; /* output in big5 */ + int showBM = 0; /* output in bitmap */ + char BMfile[] = BITMAPFILE; /* bit map file */ + char GZBM[NBM][BMRow][BMCol]; /* the bitmap array */ +@@ -139,7 +160,7 @@ + void CalGZ(); + int JieDate(), JieDate(); + void readBM(), display3(); +-void Report(), ReportE(), ReportBM(), ReportGB(); ++void Report(), ReportE(), ReportBM(), ReportGB(), ReportBIG5(); + void usage(), Error(); + + +@@ -162,6 +183,7 @@ + case 'l': if (inverse) leap=1; else usage(); break; + case 'h': showHZ = 1; break; + case 'b': showBM = 1; break; ++ case '5': showB5 = 1; break; + default: usage(); break; + } + } +@@ -213,13 +235,14 @@ + void usage() + { + printf("Usage:\n\n"); +- printf("Solar->Lunar:\t%s [-h] [-b] year month day [hour]\n", progname); ++ printf("Solar->Lunar:\t%s [-h] [-5] [-b] year month day [hour]\n", progname); + printf("\t\t(in Solar Calendar, 24 hour clock)\n\n"); +- printf("Lunar->Solar:\t%s [-h] [-b] -i [-l] year month day [hour]\n", ++ printf("Lunar->Solar:\t%s [-h] [-5] [-b] -i [-l] year month day [hour]\n", + progname); + printf("\t\t(in Lunar Calendar, 24 hour clock)\n"); + printf("\t\t-l means the month is a leap month (\"run4 yue4\")\n\n"); + printf("\t\t-h means output in hanzi (GB)\n"); ++ printf("\t\t-5 means output in traditional chinese(BIG5)\n"); + printf("\t\t-b means output in \"bitmap\"\n\n"); + printf("Date range: about %d years from the Solar Date %d.%d.%d\n", Nyear, + SolarFirstDate.year, SolarFirstDate.month, SolarFirstDate.day); +@@ -578,6 +601,8 @@ + { + if (showHZ) + ReportGB(); ++ else if (showB5) ++ ReportBIG5(); + else if (showBM) + ReportBM(); + else +@@ -614,6 +639,39 @@ + if (lunar2.month==1) + printf("* %s\n", "年柱亦可能要修改"); + printf("* %s\n", "请查有节气时间之万年历"); ++ } ++} ++ ++ ++void ReportBIG5() ++{ ++ printf("%s%d%s%2d%s%2d%s%2d%s%s%s\n", "锭菌", ++ solar.year, "", solar.month, "る", solar.day, ++ "ら", solar.hour, "", ++ "琍戳", weekdayBIG5[solar.weekday]); ++ printf("%s%d%s%s%2d%s%2d%s%s%s%s%s\n", "潮菌", ++ lunar.year, "", (lunar.leap? "秥":""), ++ lunar.month, "る", lunar.day, "ら", ++ ZhiBIG5[zhi.hour], "", ++ "ネ╲妮", ShengXiaoBIG5[zhi.year]); ++ printf("%s%s%s%s%s%s%s%s%s%s%s%s%s\n", "や", ++ GanBIG5[gan.year], ZhiBIG5[zhi.year], "", ++ GanBIG5[gan.month], ZhiBIG5[zhi.month], "る", ++ GanBIG5[gan.day], ZhiBIG5[zhi.day], "ら", ++ GanBIG5[gan.hour], ZhiBIG5[zhi.hour], ""); ++ printf("%s%s%s%s%s%s%s%s%s%s%s%s%s\n", ++ "ノ琖衡崩衡ぇò", ++ GanBIG5[gan2.year], ZhiBIG5[zhi2.year], "", ++ GanBIG5[gan2.month], ZhiBIG5[zhi2.month], "る", ++ GanBIG5[gan2.day], ZhiBIG5[zhi2.day], "ら", ++ GanBIG5[gan2.hour], ZhiBIG5[zhi2.hour], ""); ++ if (jieAlert) ++ { ++ printf("* %s, %s\n", "琌ら竊", ++ "る琖璶э"); ++ if (lunar2.month==1) ++ printf("* %s\n", "琖ョ璶э"); ++ printf("* %s\n", "叫琩Τ竊丁ぇ窾菌"); + } + } + diff --git a/chinese/lunar/files/patch-04 b/chinese/lunar/files/patch-04 new file mode 100644 index 000000000000..ca01fe067074 --- /dev/null +++ b/chinese/lunar/files/patch-04 @@ -0,0 +1,44 @@ +--- lunar.1.orig Tue Aug 11 12:14:48 1992 ++++ lunar.1 Tue Feb 26 21:00:38 2002 +@@ -4,13 +4,15 @@ + .SH SYNTAX + .B lunar + [ +-.B\-h ++.B \-h + ] [ +-.B\-b ++.B \-5 + ] [ +-.B\-i ++.B \-b + ] [ +-.B\-l ++.B \-i ++] [ ++.B \-l + ] + .I year month day + [ +@@ -56,14 +58,16 @@ + The ganzhi of the j-th leap month is the same as that of the j-th month. + + The possible options are +-.IP b ++.IP \-b + output ganzhi in special "bitmap" characters. +-.IP h +-output hanzi or Chinese characters encoded in (highest-bit-set) GB code. +-.IP i ++.IP \-h ++output hanzi or Simplified Chinese characters encoded in (highest-bit-set) GB code. ++.IP \-5 ++output Traditional Chinese characters encoded in (highest-bit-set) BIG5 code. ++.IP \-i + convert a lunar date to solar date. + The default is to convert a solar date to a lunar date. +-.IP l ++.IP \-l + indicate the month is a lunar leap month. + This option is meaningful only when the "-i" option is used. + .SH COPYRIGHT |