OSDN Git Service

[Refactor] #37353 メッセージ整理。 / Refactor messages.
[hengband/hengband.git] / src / z-form.c
index d0d6c88..b2629ba 100644 (file)
@@ -11,7 +11,6 @@
 /* Purpose: Low level text formatting -BEN- */
 
 #include "z-form.h"
-
 #include "z-util.h"
 #include "z-virt.h"
 
@@ -282,8 +281,6 @@ uint vstrnfmt(char *buf, uint max, cptr fmt, va_list vp)
 
                        /* Save the character */
                        buf[n++] = *s++;
-
-                       /* Continue */
                        continue;
                }
 
@@ -301,8 +298,6 @@ uint vstrnfmt(char *buf, uint max, cptr fmt, va_list vp)
 
                        /* Skip the "%" */
                        s++;
-
-                       /* Continue */
                        continue;
                }
 
@@ -319,8 +314,6 @@ uint vstrnfmt(char *buf, uint max, cptr fmt, va_list vp)
 
                        /* Skip the "n" */
                        s++;
-
-                       /* Continue */
                        continue;
                }
 
@@ -332,8 +325,6 @@ uint vstrnfmt(char *buf, uint max, cptr fmt, va_list vp)
 
                        /* Skip the "r" */
                        s++;
-
-                       /* Continue */
                        continue;
                }
 
@@ -466,9 +457,8 @@ uint vstrnfmt(char *buf, uint max, cptr fmt, va_list vp)
                                arg = va_arg(vp, int);
 
                                /* Format the argument */
-                               sprintf(tmp, aux, arg);
+                               sprintf(tmp, "%c", arg);
 
-                               /* Done */
                                break;
                        }
 
@@ -496,7 +486,6 @@ uint vstrnfmt(char *buf, uint max, cptr fmt, va_list vp)
                                        sprintf(tmp, aux, arg);
                                }
 
-                               /* Done */
                                break;
                        }
 
@@ -510,7 +499,6 @@ uint vstrnfmt(char *buf, uint max, cptr fmt, va_list vp)
                                        /* Access next argument */
                                        arg = va_arg(vp, unsigned long);
 
-                                       /* Format the argument */
                                        sprintf(tmp, aux, arg);
                                }
                                else
@@ -519,12 +507,10 @@ uint vstrnfmt(char *buf, uint max, cptr fmt, va_list vp)
 
                                        /* Access next argument */
                                        arg = va_arg(vp, unsigned int);
-
-                                       /* Format the argument */
                                        sprintf(tmp, aux, arg);
+
                                }
 
-                               /* Done */
                                break;
                        }
 
@@ -541,7 +527,6 @@ uint vstrnfmt(char *buf, uint max, cptr fmt, va_list vp)
                                /* Format the argument */
                                sprintf(tmp, aux, arg);
 
-                               /* Done */
                                break;
                        }
 
@@ -556,7 +541,6 @@ uint vstrnfmt(char *buf, uint max, cptr fmt, va_list vp)
                                /* Format the argument */
                                sprintf(tmp, aux, arg);
 
-                               /* Done */
                                break;
                        }
 
@@ -577,9 +561,8 @@ uint vstrnfmt(char *buf, uint max, cptr fmt, va_list vp)
                                arg2[1023] = '\0';
 
                                /* Format the argument */
-                               sprintf(tmp, aux, arg2);
+                               sprintf(tmp, aux, arg);
 
-                               /* Done */
                                break;
                        }
 
@@ -593,14 +576,12 @@ uint vstrnfmt(char *buf, uint max, cptr fmt, va_list vp)
                                arg = va_arg(vp, vptr);
 
                                /* Format the "user data" */
-                               (void)vstrnfmt_aux(tmp, 1000, aux, arg);
+                               sprintf(tmp, aux, arg);
 
-                               /* Done */
                                break;
                        }
 
 
-                       /* Oops */
                        default:
                        {
                                /* Error -- illegal format char */
@@ -626,9 +607,8 @@ uint vstrnfmt(char *buf, uint max, cptr fmt, va_list vp)
                                {
                                        /* Capitalize if possible */
                                        if (islower(tmp[q]))
-                                               tmp[q] = toupper(tmp[q]);
+                                               tmp[q] = (char)toupper(tmp[q]);
 
-                                       /* Done */
                                        break;
                                }
                        }