]> code.delx.au - gnu-emacs/blobdiff - src/gmalloc.c
Clarify the `call-interactively' doc string, and add an example.
[gnu-emacs] / src / gmalloc.c
index a3f533bd5e809ed330756093a73f50e56c6d91c7..a023d2d78e591167874822b88c93ca37cdd44c22 100644 (file)
@@ -72,9 +72,7 @@ Fifth Floor, Boston, MA 02110-1301, USA.
 #define        CHAR_BIT        8
 #endif
 
-#ifdef HAVE_UNISTD_H
 #include <unistd.h>
-#endif
 
 #ifdef USE_PTHREAD
 #include <pthread.h>
@@ -554,12 +552,8 @@ get_contiguous_space (size, position)
 /* This is called when `_heapinfo' and `heapsize' have just
    been set to describe a new info table.  Set up the table
    to describe itself and account for it in the statistics.  */
-static void register_heapinfo PP ((void));
-#ifdef __GNUC__
-__inline__
-#endif
-static void
-register_heapinfo ()
+static inline void
+register_heapinfo (void)
 {
   __malloc_size_t block, blocks;
 
@@ -1969,12 +1963,12 @@ Fifth Floor, Boston, MA 02110-1301, USA.
 #endif
 
 /* Old hook values.  */
-static void (*old_free_hook) __P ((__ptr_t ptr));
-static __ptr_t (*old_malloc_hook) __P ((__malloc_size_t size));
-static __ptr_t (*old_realloc_hook) __P ((__ptr_t ptr, __malloc_size_t size));
+static void (*old_free_hook) (__ptr_t ptr);
+static __ptr_t (*old_malloc_hook) (__malloc_size_t size);
+static __ptr_t (*old_realloc_hook) (__ptr_t ptr, __malloc_size_t size);
 
 /* Function to call when something awful happens.  */
-static void (*abortfunc) __P ((enum mcheck_status));
+static void (*abortfunc) (enum mcheck_status);
 
 /* Arbitrary magical numbers.  */
 #define MAGICWORD      0xfedabeeb
@@ -1992,7 +1986,7 @@ struct hdr
 #if    defined(_LIBC) || defined(STDC_HEADERS) || defined(USG)
 #define flood memset
 #else
-static void flood __P ((__ptr_t, int, __malloc_size_t));
+static void flood (__ptr_t, int, __malloc_size_t);
 static void
 flood (ptr, val, size)
      __ptr_t ptr;
@@ -2005,7 +1999,7 @@ flood (ptr, val, size)
 }
 #endif
 
-static enum mcheck_status checkhdr __P ((const struct hdr *));
+static enum mcheck_status checkhdr (const struct hdr *);
 static enum mcheck_status
 checkhdr (hdr)
      const struct hdr *hdr;
@@ -2031,7 +2025,7 @@ checkhdr (hdr)
   return status;
 }
 
-static void freehook __P ((__ptr_t));
+static void freehook (__ptr_t);
 static void
 freehook (ptr)
      __ptr_t ptr;
@@ -2053,7 +2047,7 @@ freehook (ptr)
   __free_hook = freehook;
 }
 
-static __ptr_t mallochook __P ((__malloc_size_t));
+static __ptr_t mallochook (__malloc_size_t);
 static __ptr_t
 mallochook (size)
      __malloc_size_t size;
@@ -2073,7 +2067,7 @@ mallochook (size)
   return (__ptr_t) (hdr + 1);
 }
 
-static __ptr_t reallochook __P ((__ptr_t, __malloc_size_t));
+static __ptr_t reallochook (__ptr_t, __malloc_size_t);
 static __ptr_t
 reallochook (ptr, size)
      __ptr_t ptr;
@@ -2146,7 +2140,7 @@ static int mcheck_used = 0;
 
 int
 mcheck (func)
-     void (*func) __P ((enum mcheck_status));
+     void (*func) (enum mcheck_status);
 {
   abortfunc = (func != NULL) ? func : &mabort;
 
@@ -2172,6 +2166,3 @@ mprobe (__ptr_t ptr)
 }
 
 #endif /* GC_MCHECK */
-
-/* arch-tag: 93dce5c0-f49a-41b5-86b1-f91c4169c02e
-   (do not change this comment) */