OSDN Git Service

キャラクター生成中やオプション設定中に'?'を押すとヘルプファイルの中の
[hengband/hengband.git] / src / files.c
index 37ff10b..d1a8092 100644 (file)
@@ -1592,7 +1592,7 @@ static struct
        {29,  5, 21, "Weight"},
        {29,  6, 21, "Social Class"},
        {29,  7, 21, "Align"},
-       {29, 14, 21, "Constraction"},
+       {29, 14, 21, "Construction"},
 };
 #endif
 
@@ -4837,14 +4837,14 @@ errr file_character(cptr name, bool full)
 
                /* Build query */
 #ifdef JP
-(void)sprintf(out_val, "¸½Â¸¤¹¤ë¥Õ¥¡¥¤¥ë %s ¤Ë¾å½ñ¤­¤·¤Þ¤¹¤«? ", buf);
+                (void)sprintf(out_val, "¸½Â¸¤¹¤ë¥Õ¥¡¥¤¥ë %s ¤Ë¾å½ñ¤­¤·¤Þ¤¹¤«? ", buf);
 #else
                (void)sprintf(out_val, "Replace existing file %s? ", buf);
 #endif
 
 
                /* Ask */
-               if (get_check(out_val)) fd = -1;
+               if (get_check_strict(out_val, CHECK_NO_HISTORY)) fd = -1;
        }
 
        /* Open the non-existing file */
@@ -4855,12 +4855,12 @@ errr file_character(cptr name, bool full)
        {
                /* Message */
 #ifdef JP
-msg_format("¥­¥ã¥é¥¯¥¿¾ðÊó¤Î¥Õ¥¡¥¤¥ë¤Ø¤Î½ñ¤­½Ð¤·¤Ë¼ºÇÔ¤·¤Þ¤·¤¿¡ª");
+                prt("¥­¥ã¥é¥¯¥¿¾ðÊó¤Î¥Õ¥¡¥¤¥ë¤Ø¤Î½ñ¤­½Ð¤·¤Ë¼ºÇÔ¤·¤Þ¤·¤¿¡ª", 0, 0);
 #else
-               msg_format("Character dump failed!");
+               prt("Character dump failed!", 0, 0);
 #endif
 
-               msg_print(NULL);
+                (void)inkey();
 
                /* Error */
                return (-1);
@@ -4888,57 +4888,6 @@ msg_print("
 }
 
 
-typedef struct file_tag
-{
-       char name[32];
-       int line_number;
-} file_tag;
-
-
-typedef struct file_tags
-{
-       file_tag tags[64];
-       int index;
-} file_tags;
-
-
-static void add_tag(file_tags *the_tags, cptr name, int line)
-{
-       if (the_tags->index < 64)
-       {
-               file_tag *tag = &(the_tags->tags[the_tags->index]);
-
-               /* Set the name and end it with '\0' */
-               strncpy(tag->name, name, 31);
-               tag->name[31] = '\0';
-
-               /* Set the line-number */
-               tag->line_number = line;
-
-               /* Increase the number of tags */
-               the_tags->index++;
-       }
-}
-
-
-static int get_line(file_tags *the_tags, cptr name)
-{
-       int i;
-
-       /* Search for the tag */
-       for (i = 0; i < the_tags->index; i++)
-       {
-               if (streq(the_tags->tags[i].name, name))
-               {
-                       return the_tags->tags[i].line_number;
-               }
-       }
-
-       /* Not found */
-       return 0;
-}
-
-
 /*
  * Recursive file perusal.
  *
@@ -5009,9 +4958,6 @@ bool show_file(bool show_version, cptr name, cptr what, int line, int mode)
        /* Sub-menu information */
        char hook[68][32];
 
-       /* Tags for in-file references */
-       file_tags tags;
-
        bool reverse = (line < 0);
 
        int wid, hgt, rows;
@@ -5034,9 +4980,6 @@ bool show_file(bool show_version, cptr name, cptr what, int line, int mode)
                hook[i][0] = '\0';
        }
 
-       /* No tags yet */
-       tags.index = 0;
-
        /* Copy the filename */
        strcpy(filename, name);
 
@@ -5180,7 +5123,7 @@ msg_format("'%s'
                        else if (str[6] == '<')
                        {
                                str[strlen(str) - 1] = '\0';
-                               add_tag(&tags, str + 7, next);
+                                if (tag && streq(str + 7, tag)) line = next;
                        }
 
                        /* Skip this */
@@ -5197,9 +5140,6 @@ msg_format("'%s'
        /* start from bottom when reverse mode */
        if (line == -1) line = ((size-1)/rows)*rows;
 
-       /* Go to the tagged line */
-       if (tag) line = get_line(&tags, tag);
-
        /* Display the file */
        while (TRUE)
        {