patch投げ用
Revision | 2e868295eec14536354e0dddf7e84ce117b3dc42 (tree) |
---|---|
Zeit | 2016-02-14 01:46:48 |
Autor | SHIRAKATA Kentaro <argrath@ub32...> |
Commiter | SHIRAKATA Kentaro |
patch makedefs.c (no -j)
@@ -25,8 +25,14 @@ | ||
25 | 25 | /* version information */ |
26 | 26 | #ifdef SHORT_FILENAMES |
27 | 27 | #include "patchlev.h" |
28 | +#if 1 /*JP*/ | |
29 | +#include "../japanese/jpatchle.h" | |
30 | +#endif | |
28 | 31 | #else |
29 | 32 | #include "patchlevel.h" |
33 | +#if 1 /*JP*/ | |
34 | +#include "../japanese/jpatchlevel.h" | |
35 | +#endif | |
30 | 36 | #endif |
31 | 37 | |
32 | 38 | #include <ctype.h> |
@@ -1188,6 +1194,25 @@ const char *build_date; | ||
1188 | 1194 | return outbuf; |
1189 | 1195 | } |
1190 | 1196 | |
1197 | +#if 1 /*JP*/ | |
1198 | +static char * | |
1199 | +jversion_id_string(outbuf, build_date) | |
1200 | +char *outbuf; | |
1201 | +const char *build_date; | |
1202 | +{ | |
1203 | + char subbuf[64], versbuf[64]; | |
1204 | + | |
1205 | + subbuf[0] = '\0'; | |
1206 | +#ifdef BETA | |
1207 | + Strcat(subbuf, " Beta"); | |
1208 | +#endif | |
1209 | + | |
1210 | + Sprintf(outbuf, "%s JNetHack%s Version %s-%d.%d.", PORT_ID, | |
1211 | + subbuf, version_string(versbuf, "."), JVERSION_MAJOR, JVERSION_MINOR); | |
1212 | + return outbuf; | |
1213 | +} | |
1214 | +#endif | |
1215 | + | |
1191 | 1216 | static char * |
1192 | 1217 | bannerc_string(outbuf, build_date) |
1193 | 1218 | char *outbuf; |
@@ -1276,6 +1301,10 @@ do_date() | ||
1276 | 1301 | Fprintf(ofp, "#define VERSION_STRING \"%s\"\n", version_string(buf, ".")); |
1277 | 1302 | Fprintf(ofp, "#define VERSION_ID \\\n \"%s\"\n", |
1278 | 1303 | version_id_string(buf, cbuf)); |
1304 | +#if 1 /*JP*/ | |
1305 | + Fprintf(ofp,"#define JVERSION_ID \\\n \"%s\"\n", | |
1306 | + jversion_id_string(buf, cbuf)); | |
1307 | +#endif | |
1279 | 1308 | Fprintf(ofp, "#define COPYRIGHT_BANNER_C \\\n \"%s\"\n", |
1280 | 1309 | bannerc_string(buf, cbuf)); |
1281 | 1310 | Fprintf(ofp, "\n"); |
@@ -1660,11 +1689,18 @@ do_data() | ||
1660 | 1689 | entry_cnt = line_cnt = 0; |
1661 | 1690 | /* read through the input file and split it into two sections */ |
1662 | 1691 | while ((line = fgetline(ifp)) != 0) { |
1692 | +#if 0 /*JP*/ | |
1663 | 1693 | if (d_filter(line)) { |
1664 | 1694 | free(line); |
1665 | 1695 | continue; |
1666 | 1696 | } |
1667 | 1697 | if (*line > ' ') { /* got an entry name */ |
1698 | +#else | |
1699 | + unsigned char uc; | |
1700 | + uc = *((unsigned char *)line); | |
1701 | + if (d_filter(line)) continue; | |
1702 | + if (uc > ' ') { /* got an entry name */ | |
1703 | +#endif | |
1668 | 1704 | /* first finish previous entry */ |
1669 | 1705 | if (line_cnt) |
1670 | 1706 | Fprintf(ofp, "%d\n", line_cnt), line_cnt = 0; |
@@ -1753,6 +1789,7 @@ char *line; | ||
1753 | 1789 | } |
1754 | 1790 | |
1755 | 1791 | static const char *special_oracle[] = { |
1792 | +#if 0 /*JP*/ | |
1756 | 1793 | "\"...it is rather disconcerting to be confronted with the", |
1757 | 1794 | "following theorem from [Baker, Gill, and Solovay, 1975].", "", |
1758 | 1795 | "Theorem 7.18 There exist recursive languages A and B such that", |
@@ -1761,6 +1798,18 @@ static const char *special_oracle[] = { | ||
1761 | 1798 | "currently available will not suffice for proving that P != NP or " |
1762 | 1799 | " ", |
1763 | 1800 | "that P == NP.\" [Garey and Johnson, p. 185.]" |
1801 | +#else | |
1802 | + "「次の定理[Baker, Gill, and Solovay, 1975]に直面することは", | |
1803 | + "むしろ困惑することである.", | |
1804 | + "", | |
1805 | + "定理 7.18 次のような再帰的言語 A,Bが存在する", | |
1806 | + " (1) P(A) == NP(A),かつ", | |
1807 | + " (2) P(B) != NP(B)", | |
1808 | + "", | |
1809 | + "これは現在 P != NPであるかまたは P == NPであるかを証明する", | |
1810 | + "有効な手法がないことを強く示している.」", | |
1811 | + "[Garey and Johnson, p. 185.]" | |
1812 | +#endif | |
1764 | 1813 | }; |
1765 | 1814 | |
1766 | 1815 | /* |