OSDN Git Service

[Refactor] #37353 コメント整理。 / Refactor comments.
[hengband/hengband.git] / src / z-virt.c
index 3405ef0..72303a9 100644 (file)
@@ -1,4 +1,4 @@
-/* File: z-virt.c */
+/* File: z-virt.c */
 
 /*
  * Copyright (c) 1997 Ben Harrison
 /* Purpose: Memory management routines -BEN- */
 
 #include "z-virt.h"
-
 #include "z-util.h"
 
-
 /*
  * Allow debugging messages to track memory usage.
  */
@@ -43,12 +41,11 @@ vptr rnfree(vptr p, huge len)
        /* Decrease memory count */
        virt_kill += len;
 
-       /* Message */
        if (len > virt_size)
        {
                char buf[80];
                sprintf(buf, "Kill (%ld): %ld - %ld = %ld.",
-                       len, virt_make, virt_kill, virt_make - virt_kill);
+                       len, virt_make, virt_kill, virt_make - virt_kill);
                plog(buf);
        }
 
@@ -60,7 +57,6 @@ vptr rnfree(vptr p, huge len)
        /* Use "free" */
        free ((char*)(p));
 
-       /* Done */
        return (NULL);
 }
 
@@ -115,7 +111,7 @@ vptr ralloc(huge len)
        {
                char buf[80];
                sprintf(buf, "Make (%ld): %ld - %ld = %ld.",
-                       len, virt_make, virt_kill, virt_make - virt_kill);
+                       len, virt_make, virt_kill, virt_make - virt_kill);
                plog(buf);
        }
 
@@ -140,10 +136,10 @@ vptr ralloc(huge len)
 /*
  * Allocate a constant string, containing the same thing as 'str'
  */
-cptr string_make(cptr str)
+concptr string_make(concptr str)
 {
        huge len = 0;
-       cptr t = str;
+       concptr t = str;
        char *s, *res;
 
        /* Simple sillyness */
@@ -167,7 +163,7 @@ cptr string_make(cptr str)
  * Un-allocate a string allocated above.
  * Depends on no changes being made to the string.
  */
-errr string_free(cptr str)
+errr string_free(concptr str)
 {
        huge len = 0;