OSDN Git Service

version++
[jnethack/source.git] / src / topten.c
index e3c3a63..8195ce8 100644 (file)
@@ -2,6 +2,11 @@
 /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
 /* NetHack may be freely redistributed.  See license for details. */
 
+/* JNetHack Copyright */
+/* (c) Issei Numata, Naoki Hamada, Shigehiro Miyashita, 1994-2000  */
+/* For 3.4-, Copyright (c) SHIRAKATA Kentaro, 2002-2016            */
+/* JNetHack may be freely redistributed.  See license for details. */
+
 #include "hack.h"
 #include "dlb.h"
 #ifdef SHORT_FILENAMES
@@ -312,10 +317,17 @@ struct toptenentry *tt;
     else
         (void) fprintf(rfile, fmt33, tt->plrole, tt->plrace, tt->plgend,
                        tt->plalign);
+#if 0 /*JP*/
     (void) fprintf(rfile, fmtX, onlyspace(tt->name) ? "_" : tt->name,
                    tt->death,
                    (multi ? ", while " : ""),
                    (multi ? (multi_reason ? multi_reason : "helpless") : ""));
+#else
+    (void) fprintf(rfile, fmtX, onlyspace(tt->name) ? "_" : tt->name,
+                   (multi ? (multi_reason ? multi_reason : "\96³\97Í\82È\8aÔ\82É") : ""),
+                   tt->death,
+                   "");
+#endif
 
 #ifdef NO_SCAN_BRACK
     nsb_unmung_line(tt->name);
@@ -350,8 +362,13 @@ struct toptenentry *tt;
             buf, /* (already includes separator) */
             XLOG_SEP, plname, XLOG_SEP, tt->death);
     if (multi)
+#if 0 /*JP*/
         Fprintf(rfile, "%cwhile=%s", XLOG_SEP,
                 multi_reason ? multi_reason : "helpless");
+#else
+        Fprintf(rfile, "%cwhile=%s", XLOG_SEP,
+                multi_reason ? multi_reason : "\96³\97Í\82È\8aÔ\82É");
+#endif
     Fprintf(rfile, "%cconduct=0x%lx%cturns=%ld%cachieve=0x%lx", XLOG_SEP,
             encodeconduct(), XLOG_SEP, moves, XLOG_SEP, encodeachieve());
     Fprintf(rfile, "%crealtime=%ld%cstarttime=%ld%cendtime=%ld", XLOG_SEP,
@@ -856,6 +873,11 @@ boolean so;
 #endif
 #if 0 /*JP*/
     if (!strncmp("escaped", t1->death, 7)) {
+#else
+    if (!strncmp("\92E\8fo\82µ\82½", jdeath, 8)
+        || !strncmp("escaped", jdeath, 7)) {
+#endif
+#if 0 /*JP*/
         Sprintf(eos(linebuf), "escaped the dungeon %s[max level %d]",
                 !strncmp(" (", t1->death + 7, 2) ? t1->death + 7 + 2 : "",
                 t1->maxlvl);
@@ -863,42 +885,40 @@ boolean so;
         if ((bp = index(linebuf, ')')) != 0)
             *bp = (t1->deathdnum == astral_level.dnum) ? '\0' : ' ';
 #else
-        if (!strncmp("\92E\8fo\82µ\82½", jdeath, 8)
-            || !strncmp("escaped", jdeath, 7)) {
-            char jbuf[BUFSZ];
-            strncpy(jbuf, t1->death, jdeath - t1->death);
-            jbuf[jdeath - t1->death] = '\0';
-            Sprintf(action, "%s\96À\8b{\82©\82ç\92E\8fo\82µ\82½[\8dÅ\91å\92n\89º%d\8aK]",
-                    jbuf, t1->maxlvl);
+        char jbuf[BUFSZ];
+        strncpy(jbuf, t1->death, jdeath - t1->death);
+        jbuf[jdeath - t1->death] = '\0';
+        Sprintf(action, "%s\96À\8b{\82©\82ç\92E\8fo\82µ\82½[\8dÅ\91å\92n\89º%d\8aK]",
+                jbuf, t1->maxlvl);
 #endif
         second_line = FALSE;
 #if 0 /*JP*/
     } else if (!strncmp("ascended", t1->death, 8)) {
 #else
-        } else if (!strncmp("\8f¸\93V\82µ\82½", jdeath, 8)
-                   || !strncmp("ascended", jdeath, 8)) {
+    } else if (!strncmp("\8f¸\93V\82µ\82½", jdeath, 8)
+               || !strncmp("ascended", jdeath, 8)) {
 #endif
 #if 0 /*JP:T*/
         Sprintf(eos(linebuf), "ascended to demigod%s-hood",
                 (t1->plgend[0] == 'F') ? "dess" : "");
 #else
-            Sprintf(action, "\8f¸\93V\82µ%s\90_\82Æ\82È\82Á\82½",
-                    (t1->plgend[0] == 'F') ? "\8f\97" : "");
+        Sprintf(action, "\8f¸\93V\82µ%s\90_\82Æ\82È\82Á\82½",
+                (t1->plgend[0] == 'F') ? "\8f\97" : "");
 #endif
         second_line = FALSE;
     } else {
 /*JP
         if (!strncmp(t1->death, "quit", 4)) {
 */
-            if (!strncmp(jdeath, "\94²\82¯\82½", 4)) {
+        if (!strncmp(jdeath, "\94²\82¯\82½", 4)) {
 #if 0 /*JP*/
             Strcat(linebuf, "quit");
 #else
-                Strcat(action, t1->death);
+            Strcat(action, t1->death);
 #endif
             second_line = FALSE;
 #if 1 /*JP*/
-            }
+        }
 #else
         } else if (!strncmp(t1->death, "died of st", 10)) {
             Strcat(linebuf, "starved to death");