Commit MetaInfo

Revision932b6b5b07afa257d6cd445f470994df2e3f23d6 (tree)
Time2018-12-16 04:48:52
AuthorSHIRAKATA Kentaro <argrath@ub32...>
CommiterSHIRAKATA Kentaro

Log Message

GCC says embedding a directive within macro arguments is not portable

Change Summary

Incremental Difference

--- a/src/attrib.c
+++ b/src/attrib.c
@@ -1104,19 +1104,21 @@ int propidx; /* special cases can have negative values */
11041104 break;
11051105 case INVIS:
11061106 if (u.uprops[INVIS].blocked & W_ARMC)
1107- Sprintf(buf, because_of,
11081107 #if 0 /*JP*/
1108+ Sprintf(buf, because_of,
11091109 ysimple_name(uarmc)); /* mummy wrapping */
11101110 #else
1111+ Sprintf(buf, because_of,
11111112 simpleonames(uarmc)); /* mummy wrapping */
11121113 #endif
11131114 break;
11141115 case CLAIRVOYANT:
11151116 if (wizard && (u.uprops[CLAIRVOYANT].blocked & W_ARMH))
1116- Sprintf(buf, because_of,
11171117 #if 0 /*JP*/
1118+ Sprintf(buf, because_of,
11181119 ysimple_name(uarmh)); /* cornuthaum */
11191120 #else
1121+ Sprintf(buf, because_of,
11201122 simpleonames(uarmh)); /* cornuthaum */
11211123 #endif
11221124 break;
--- a/src/do_name.c
+++ b/src/do_name.c
@@ -134,13 +134,15 @@ const char *goal;
134134 "同じ地形を飛ばして" };
135135 #endif
136136
137- Sprintf(sbuf,
138137 #if 0 /*JP*/
138+ Sprintf(sbuf,
139139 "Use '%c', '%c', '%c', '%c' to move the cursor to %s.", /* hjkl */
140+ Cmd.move_W, Cmd.move_S, Cmd.move_N, Cmd.move_E, goal);
140141 #else
142+ Sprintf(sbuf,
141143 "[%c%c%c%c]で%sへ移動できる.",
142-#endif
143144 Cmd.move_W, Cmd.move_S, Cmd.move_N, Cmd.move_E, goal);
145+#endif
144146 putstr(tmpwin, 0, sbuf);
145147 #if 0 /*JP*/
146148 Sprintf(sbuf,
--- a/src/invent.c
+++ b/src/invent.c
@@ -2285,16 +2285,19 @@ long quan; /* if non-0, print this quantity, not obj->quan */
22852285 */
22862286 if (cost != 0 || let == '*') {
22872287 /* if dot is true, we're doing Iu, otherwise Ix */
2288- Sprintf(li,
22892288 #if 0 /*JP*/
2289+ Sprintf(li,
22902290 iflags.menu_tab_sep ? "%c - %s\t%6ld %s"
22912291 : "%c - %-45s %6ld %s",
2292+ (dot && use_invlet ? obj->invlet : let),
2293+ (txt ? txt : doname(obj)), cost, currency(cost));
22922294 #else
2295+ Sprintf(li,
22932296 iflags.menu_tab_sep ? "%c - %s\t%6ld%s"
22942297 : "%c - %-45s %6ld%s",
2295-#endif
22962298 (dot && use_invlet ? obj->invlet : let),
22972299 (txt ? txt : doname(obj)), cost, currency(cost));
2300+#endif
22982301 } else {
22992302 /* ordinary inventory display or pickup message */
23002303 Sprintf(li, "%c - %s%s", (use_invlet ? obj->invlet : let),
--- a/src/objnam.c
+++ b/src/objnam.c
@@ -1204,28 +1204,27 @@ char *prefix;
12041204 Strcat(prefix, is_corrodeable(obj) ? "腐食した" : "腐った");
12051205 }
12061206 if (rknown && obj->oerodeproof)
1207+#if 0 /*JP*/
12071208 Strcat(prefix, iscrys
1208-/*JP
12091209 ? "fixed "
1210-*/
1211- ? "安定した"
12121210 : is_rustprone(obj)
1213-/*JP
12141211 ? "rustproof "
1215-*/
1216- ? "錆びない"
12171212 : is_corrodeable(obj)
1218-#if 0 /*JP*/
1219- ? "corrodeproof " /* "stainless"? */
1220-#else
12211213 ? "腐食しない" /* "stainless"? */
1222-#endif
12231214 : is_flammable(obj)
1224-/*JP
12251215 ? "fireproof "
1226-*/
1216+ : "");
1217+#else
1218+ Strcat(prefix, iscrys
1219+ ? "安定した"
1220+ : is_rustprone(obj)
1221+ ? "錆びない"
1222+ : is_corrodeable(obj)
1223+ ? "腐食しない" /* "stainless"? */
1224+ : is_flammable(obj)
12271225 ? "燃えない"
12281226 : "");
1227+#endif
12291228 }
12301229
12311230 /* used to prevent rust on items where rust makes no difference */
--- a/src/role.c
+++ b/src/role.c
@@ -2236,13 +2236,17 @@ winid where;
22362236 Sprintf(buf, "%12s ", "alignment:");
22372237 */
22382238 Sprintf(buf, "%12s ", "属性:");
2239+#if 0 /*JP:日本語では名詞が自然*/
22392240 Strcat(buf, (which == RS_ALGNMNT) ? choosing : (a == ROLE_NONE)
22402241 ? not_yet
22412242 : (a == ROLE_RANDOM)
22422243 ? rand_choice
2243-#if 0 /*JP:日本語では名詞が自然*/
22442244 : aligns[a].adj);
22452245 #else
2246+ Strcat(buf, (which == RS_ALGNMNT) ? choosing : (a == ROLE_NONE)
2247+ ? not_yet
2248+ : (a == ROLE_RANDOM)
2249+ ? rand_choice
22462250 : aligns[a].noun);
22472251 #endif
22482252 putstr(where, 0, buf);
--- a/src/topten.c
+++ b/src/topten.c
@@ -631,11 +631,12 @@ time_t when;
631631 char pbuf[BUFSZ];
632632
633633 topten_print("");
634- Sprintf(pbuf,
635634 #if 0 /*JP*/
635+ Sprintf(pbuf,
636636 "Since you were in %s mode, the score list will not be checked.",
637637 wizard ? "wizard" : "discover");
638638 #else
639+ Sprintf(pbuf,
639640 "%sモードでプレイしたのでスコアリストには載らない.",
640641 wizard ? "ウィザード" : "発見");
641642 #endif
--- a/win/tty/wintty.c
+++ b/win/tty/wintty.c
@@ -2037,10 +2037,11 @@ struct WinDesc *cw;
20372037 if (cw->npages > 1)
20382038 #if 0 /*JP*/
20392039 Sprintf(cw->morestr, "(%d of %d)", curr_page + 1,
2040+ (int) cw->npages);
20402041 #else
20412042 Sprintf(cw->morestr, "(%d/%d)", curr_page + 1,
2042-#endif
20432043 (int) cw->npages);
2044+#endif
20442045 else if (msave)
20452046 Strcpy(cw->morestr, msave);
20462047 else
Show on old repository browser