[jnh-cvs 544] CVS update: jnethack/src

Back to archive index

argra****@users***** argra****@users*****
2008年 4月 8日 (火) 20:38:58 JST


Index: jnethack/src/pager.c
diff -u jnethack/src/pager.c:1.24 jnethack/src/pager.c:1.25
--- jnethack/src/pager.c:1.24	Wed Jan  4 18:07:58 2006
+++ jnethack/src/pager.c	Tue Apr  8 20:38:58 2008
@@ -190,7 +190,7 @@
 		    (mtmp->mpeaceful && accurate) ? "peaceful " : "",
 		    name);
 #else
-	    Strcpy(buf2, mtmp->data->mname);
+	    Strcpy(buf2, name);
 	    Sprintf(buf, "%s%s%s",
 		    (mtmp->mtame && accurate) ? "手なずけられた" :
 		    (mtmp->mpeaceful && accurate) ? "友好的な" : "",
@@ -651,7 +651,7 @@
     char    out_str[BUFSZ], look_buf[BUFSZ];
 #if 1 /*JP*/
     char look_buf2[BUFSZ];
-    const char *firstmatch2 = 0;
+    const char *firstmatch_tr = 0;
 #endif
     const char *x_str, *firstmatch = 0;
     struct permonst *pm = 0;
@@ -778,11 +778,9 @@
 		    Sprintf(out_str, "%c       %s", sym, an(monexplain[i]));
 */
 		    Sprintf(out_str, "%c       %s", sym, jtrns_obj('S', monexplain[i]));
-#if 0 /*JP*/
 		    firstmatch = monexplain[i];
-#else
-		    firstmatch = jtrns_obj('S',monexplain[i]);
-		    firstmatch2 = monexplain[i];
+#if 1 /*JP*/
+		    firstmatch_tr = jtrns_obj('S',monexplain[i]);
 #endif
 		    found++;
 		} else {
@@ -814,11 +812,9 @@
 	if (u.uswallow && from_screen && is_swallow_sym(sym)) {
 	    if (!found) {
 		Sprintf(out_str, "%c       %s", sym, mon_interior);
-#if 0 /*JP*/
 		firstmatch = mon_interior;
-#else
-		firstmatch = "怪物の内部";
-		firstmatch2 = mon_interior;
+#if 1 /*JP*/
+		firstmatch_tr = "怪物の内部";
 #endif
 	    } else {
 		found += append_str(out_str, mon_interior);
@@ -839,11 +835,9 @@
 		    Sprintf(out_str, "%c       %s", sym, an(objexplain[i]));
 */
 		    Sprintf(out_str, "%c       %s", sym, jtrns_obj('S',objexplain[i]));
-#if 0 /*JP*/
 		    firstmatch = objexplain[i];
-#else
-		    firstmatch = jtrns_obj('S',objexplain[i]);
-		    firstmatch2 = objexplain[i];
+#if 1 /*JP*/
+		    firstmatch_tr = jtrns_obj('S',objexplain[i]);
 #endif
 		    found++;
 		} else {
@@ -861,11 +855,9 @@
 		Sprintf(out_str, "%c       %s", sym, an(invisexplain));
 */
 		Sprintf(out_str, "%c       %s", sym, jtrns_obj('S',invisexplain));
-#if 0 /*JP*/
 		firstmatch = invisexplain;
-#else
-		firstmatch = jtrns_obj('S', invisexplain);
-		firstmatch2 = invisexplain;
+#if 1 /*JP*/
+		firstmatch_tr = jtrns_obj('S', invisexplain);
 #endif
 		found++;
 	    } else {
@@ -907,11 +899,9 @@
 				jtrns_obj('S', x_str));
 #endif
 		    }
-#if 0 /*JP*/
 		    firstmatch = x_str;
-#else
-		    firstmatch = jtrns_obj('S', x_str);
-		    firstmatch2 = x_str;
+#if 1 /*JP*/
+		    firstmatch_tr = jtrns_obj('S', x_str);
 #endif
 		    found++;
 		} else if (!u.uswallow && !(hit_trap && is_cmap_trap(i)) &&
@@ -939,8 +929,9 @@
 			Sprintf(out_str, "%c       %s",
 				sym, def_warnsyms[i].explanation);
 			firstmatch = def_warnsyms[i].explanation;
-#if 1 /*JP*/ /* 多分不要だが念のため */
-			firstmatch2 = firstmatch;
+#if 1 /*JP*/
+			/* ここではfirstmatchも日本語になっていることに注意 */
+			firstmatch_tr = firstmatch;
 #endif
 			found++;
 		} else {
@@ -960,12 +951,11 @@
 	    if (!found) {
 #if 0 /*JP*/
 		Sprintf(out_str, "%c       %s", sym, an(x_str));
-		firstmatch = x_str;
 #else
 		Sprintf(out_str, "%c       %s", sym, jtrns_obj('S', (x_str)));
-		firstmatch = jtrns_obj('S', x_str);
-		firstmatch2 = x_str;
+		firstmatch_tr = jtrns_obj('S', x_str);
 #endif
+		firstmatch = x_str;
 		found++;
 	    } else {
 /*JP
@@ -978,12 +968,11 @@
 	/* handle optional boulder symbol as a special case */ 
 	if (iflags.bouldersym && sym == iflags.bouldersym) {
 	    if (!found) {
-#if 0 /*JP*/
 		firstmatch = "boulder";
+#if 0 /*JP*/
 		Sprintf(out_str, "%c       %s", sym, an(firstmatch));
 #else
-		firstmatch = "岩";
-		firstmatch2 = "boulder";
+		firstmatch_tr = "岩";
 		Sprintf(out_str, "%c       岩", sym);
 #endif
 		found++;
@@ -1008,12 +997,19 @@
 		pm = lookat(cc.x, cc.y, look_buf, monbuf);
 */
 		pm = lookat(cc.x, cc.y, look_buf, monbuf, look_buf2);
+#if 0 /*JP*/
 		firstmatch = look_buf;
-#if 1 /*JP*/
-		firstmatch2 = look_buf2;
+#else
+		/* ここではfirstmatchも日本語になっていることに注意 */
+		firstmatch_tr = look_buf;
+		firstmatch = look_buf2;
 #endif
 		if (*firstmatch) {
+#if 0 /*JP*/
 		    Sprintf(temp_buf, " (%s)", firstmatch);
+#else
+		    Sprintf(temp_buf, " (%s)", firstmatch_tr);
+#endif
 		    (void)strncat(out_str, temp_buf, BUFSZ-strlen(out_str)-1);
 		    found = 1;	/* we have something to look up */
 		}
@@ -1031,19 +1027,10 @@
 	if (found) {
 	    pline("%s", out_str);
 	    /* check the data file for information about this thing */
-#if 0 /*JP*/
 	    if (found == 1 && ans != LOOK_QUICK && ans != LOOK_ONCE &&
 			(ans == LOOK_VERBOSE || (flags.help && !quick))) {
-#else
-	    if (found == 1 && ans != LOOK_QUICK && ans != LOOK_ONCE &&
-			(ans == LOOK_VERBOSE || (flags.help && !quick)) &&
-			firstmatch2) {
-#endif
 		char temp_buf[BUFSZ];
-/*JP
 		Strcpy(temp_buf, firstmatch);
-*/
-		Strcpy(temp_buf, firstmatch2);
 		checkfile(temp_buf, pm, FALSE, (boolean)(ans == LOOK_VERBOSE));
 	    }
 	} else {


Jnethack-cvs メーリングリストの案内
Back to archive index