aboutsummaryrefslogtreecommitdiffstats
path: root/src/alloc.c
diff options
context:
space:
mode:
authorDan Nicolaescu2010-07-04 00:50:25 -0700
committerDan Nicolaescu2010-07-04 00:50:25 -0700
commit971de7fb158335fbda39525feb2d7776a26bc030 (patch)
tree605333d85f16e35bb06baffcb66ac49f4ec0dce9 /src/alloc.c
parentb8463cbfbe2c5183cf40772df2746e58b787ddeb (diff)
downloademacs-971de7fb158335fbda39525feb2d7776a26bc030.tar.gz
emacs-971de7fb158335fbda39525feb2d7776a26bc030.zip
Convert (most) functions in src to standard C.
* src/alloc.c: Convert function definitions to standard C. * src/atimer.c: * src/bidi.c: * src/bytecode.c: * src/callint.c: * src/callproc.c: * src/casefiddle.c: * src/casetab.c: * src/category.c: * src/ccl.c: * src/character.c: * src/charset.c: * src/chartab.c: * src/cmds.c: * src/coding.c: * src/composite.c: * src/data.c: * src/dbusbind.c: * src/dired.c: * src/dispnew.c: * src/doc.c: * src/doprnt.c: * src/ecrt0.c: * src/editfns.c: * src/fileio.c: * src/filelock.c: * src/filemode.c: * src/fns.c: * src/font.c: * src/fontset.c: * src/frame.c: * src/fringe.c: * src/ftfont.c: * src/ftxfont.c: * src/gtkutil.c: * src/indent.c: * src/insdel.c: * src/intervals.c: * src/keymap.c: * src/lread.c: * src/macros.c: * src/marker.c: * src/md5.c: * src/menu.c: * src/minibuf.c: * src/prefix-args.c: * src/print.c: * src/ralloc.c: * src/regex.c: * src/region-cache.c: * src/scroll.c: * src/search.c: * src/sound.c: * src/strftime.c: * src/syntax.c: * src/sysdep.c: * src/termcap.c: * src/terminal.c: * src/terminfo.c: * src/textprop.c: * src/tparam.c: * src/undo.c: * src/unexelf.c: * src/window.c: * src/xfaces.c: * src/xfns.c: * src/xfont.c: * src/xftfont.c: * src/xgselect.c: * src/xmenu.c: * src/xrdb.c: * src/xselect.c: * src/xsettings.c: * src/xsmfns.c: * src/xterm.c: Likewise.
Diffstat (limited to 'src/alloc.c')
-rw-r--r--src/alloc.c301
1 files changed, 101 insertions, 200 deletions
diff --git a/src/alloc.c b/src/alloc.c
index 84b9007cdd5..0f81c943ad3 100644
--- a/src/alloc.c
+++ b/src/alloc.c
@@ -371,7 +371,7 @@ enum mem_type
371 371
372static POINTER_TYPE *lisp_align_malloc (size_t, enum mem_type); 372static POINTER_TYPE *lisp_align_malloc (size_t, enum mem_type);
373static POINTER_TYPE *lisp_malloc (size_t, enum mem_type); 373static POINTER_TYPE *lisp_malloc (size_t, enum mem_type);
374void refill_memory_reserve (); 374void refill_memory_reserve (void);
375 375
376 376
377#if GC_MARK_STACK || defined GC_MALLOC_CHECK 377#if GC_MARK_STACK || defined GC_MALLOC_CHECK
@@ -514,8 +514,7 @@ static POINTER_TYPE *pure_alloc (size_t, int);
514/* Function malloc calls this if it finds we are near exhausting storage. */ 514/* Function malloc calls this if it finds we are near exhausting storage. */
515 515
516void 516void
517malloc_warning (str) 517malloc_warning (char *str)
518 char *str;
519{ 518{
520 pending_malloc_warning = str; 519 pending_malloc_warning = str;
521} 520}
@@ -524,7 +523,7 @@ malloc_warning (str)
524/* Display an already-pending malloc warning. */ 523/* Display an already-pending malloc warning. */
525 524
526void 525void
527display_malloc_warning () 526display_malloc_warning (void)
528{ 527{
529 call3 (intern ("display-warning"), 528 call3 (intern ("display-warning"),
530 intern ("alloc"), 529 intern ("alloc"),
@@ -543,7 +542,7 @@ display_malloc_warning ()
543/* Called if we can't allocate relocatable space for a buffer. */ 542/* Called if we can't allocate relocatable space for a buffer. */
544 543
545void 544void
546buffer_memory_full () 545buffer_memory_full (void)
547{ 546{
548 /* If buffers use the relocating allocator, no need to free 547 /* If buffers use the relocating allocator, no need to free
549 spare_memory, because we may have plenty of malloc space left 548 spare_memory, because we may have plenty of malloc space left
@@ -742,8 +741,7 @@ overrun_check_free (block)
742/* Like malloc but check for no memory and block interrupt input.. */ 741/* Like malloc but check for no memory and block interrupt input.. */
743 742
744POINTER_TYPE * 743POINTER_TYPE *
745xmalloc (size) 744xmalloc (size_t size)
746 size_t size;
747{ 745{
748 register POINTER_TYPE *val; 746 register POINTER_TYPE *val;
749 747
@@ -760,9 +758,7 @@ xmalloc (size)
760/* Like realloc but check for no memory and block interrupt input.. */ 758/* Like realloc but check for no memory and block interrupt input.. */
761 759
762POINTER_TYPE * 760POINTER_TYPE *
763xrealloc (block, size) 761xrealloc (POINTER_TYPE *block, size_t size)
764 POINTER_TYPE *block;
765 size_t size;
766{ 762{
767 register POINTER_TYPE *val; 763 register POINTER_TYPE *val;
768 764
@@ -783,8 +779,7 @@ xrealloc (block, size)
783/* Like free but block interrupt input. */ 779/* Like free but block interrupt input. */
784 780
785void 781void
786xfree (block) 782xfree (POINTER_TYPE *block)
787 POINTER_TYPE *block;
788{ 783{
789 if (!block) 784 if (!block)
790 return; 785 return;
@@ -800,8 +795,7 @@ xfree (block)
800/* Like strdup, but uses xmalloc. */ 795/* Like strdup, but uses xmalloc. */
801 796
802char * 797char *
803xstrdup (s) 798xstrdup (const char *s)
804 const char *s;
805{ 799{
806 size_t len = strlen (s) + 1; 800 size_t len = strlen (s) + 1;
807 char *p = (char *) xmalloc (len); 801 char *p = (char *) xmalloc (len);
@@ -813,8 +807,7 @@ xstrdup (s)
813/* Unwind for SAFE_ALLOCA */ 807/* Unwind for SAFE_ALLOCA */
814 808
815Lisp_Object 809Lisp_Object
816safe_alloca_unwind (arg) 810safe_alloca_unwind (Lisp_Object arg)
817 Lisp_Object arg;
818{ 811{
819 register struct Lisp_Save_Value *p = XSAVE_VALUE (arg); 812 register struct Lisp_Save_Value *p = XSAVE_VALUE (arg);
820 813
@@ -835,9 +828,7 @@ static void *lisp_malloc_loser;
835#endif 828#endif
836 829
837static POINTER_TYPE * 830static POINTER_TYPE *
838lisp_malloc (nbytes, type) 831lisp_malloc (size_t nbytes, enum mem_type type)
839 size_t nbytes;
840 enum mem_type type;
841{ 832{
842 register void *val; 833 register void *val;
843 834
@@ -881,8 +872,7 @@ lisp_malloc (nbytes, type)
881 call to lisp_malloc. */ 872 call to lisp_malloc. */
882 873
883static void 874static void
884lisp_free (block) 875lisp_free (POINTER_TYPE *block)
885 POINTER_TYPE *block;
886{ 876{
887 MALLOC_BLOCK_INPUT; 877 MALLOC_BLOCK_INPUT;
888 free (block); 878 free (block);
@@ -981,9 +971,7 @@ static struct ablock *free_ablock;
981 Alignment is on a multiple of BLOCK_ALIGN and `nbytes' has to be 971 Alignment is on a multiple of BLOCK_ALIGN and `nbytes' has to be
982 smaller or equal to BLOCK_BYTES. */ 972 smaller or equal to BLOCK_BYTES. */
983static POINTER_TYPE * 973static POINTER_TYPE *
984lisp_align_malloc (nbytes, type) 974lisp_align_malloc (size_t nbytes, enum mem_type type)
985 size_t nbytes;
986 enum mem_type type;
987{ 975{
988 void *base, *val; 976 void *base, *val;
989 struct ablocks *abase; 977 struct ablocks *abase;
@@ -1090,8 +1078,7 @@ lisp_align_malloc (nbytes, type)
1090} 1078}
1091 1079
1092static void 1080static void
1093lisp_align_free (block) 1081lisp_align_free (POINTER_TYPE *block)
1094 POINTER_TYPE *block;
1095{ 1082{
1096 struct ablock *ablock = block; 1083 struct ablock *ablock = block;
1097 struct ablocks *abase = ABLOCK_ABASE (ablock); 1084 struct ablocks *abase = ABLOCK_ABASE (ablock);
@@ -1136,7 +1123,7 @@ lisp_align_free (block)
1136 a call to lisp_malloc. */ 1123 a call to lisp_malloc. */
1137 1124
1138struct buffer * 1125struct buffer *
1139allocate_buffer () 1126allocate_buffer (void)
1140{ 1127{
1141 struct buffer *b 1128 struct buffer *b
1142 = (struct buffer *) lisp_malloc (sizeof (struct buffer), 1129 = (struct buffer *) lisp_malloc (sizeof (struct buffer),
@@ -1434,7 +1421,7 @@ static int n_interval_blocks;
1434/* Initialize interval allocation. */ 1421/* Initialize interval allocation. */
1435 1422
1436static void 1423static void
1437init_intervals () 1424init_intervals (void)
1438{ 1425{
1439 interval_block = NULL; 1426 interval_block = NULL;
1440 interval_block_index = INTERVAL_BLOCK_SIZE; 1427 interval_block_index = INTERVAL_BLOCK_SIZE;
@@ -1446,7 +1433,7 @@ init_intervals ()
1446/* Return a new interval. */ 1433/* Return a new interval. */
1447 1434
1448INTERVAL 1435INTERVAL
1449make_interval () 1436make_interval (void)
1450{ 1437{
1451 INTERVAL val; 1438 INTERVAL val;
1452 1439
@@ -1489,9 +1476,7 @@ make_interval ()
1489/* Mark Lisp objects in interval I. */ 1476/* Mark Lisp objects in interval I. */
1490 1477
1491static void 1478static void
1492mark_interval (i, dummy) 1479mark_interval (register INTERVAL i, Lisp_Object dummy)
1493 register INTERVAL i;
1494 Lisp_Object dummy;
1495{ 1480{
1496 eassert (!i->gcmarkbit); /* Intervals are never shared. */ 1481 eassert (!i->gcmarkbit); /* Intervals are never shared. */
1497 i->gcmarkbit = 1; 1482 i->gcmarkbit = 1;
@@ -1503,8 +1488,7 @@ mark_interval (i, dummy)
1503 use the macro MARK_INTERVAL_TREE instead. */ 1488 use the macro MARK_INTERVAL_TREE instead. */
1504 1489
1505static void 1490static void
1506mark_interval_tree (tree) 1491mark_interval_tree (register INTERVAL tree)
1507 register INTERVAL tree;
1508{ 1492{
1509 /* No need to test if this tree has been marked already; this 1493 /* No need to test if this tree has been marked already; this
1510 function is always called through the MARK_INTERVAL_TREE macro, 1494 function is always called through the MARK_INTERVAL_TREE macro,
@@ -1751,7 +1735,7 @@ static char string_overrun_cookie[GC_STRING_OVERRUN_COOKIE_SIZE] =
1751/* Initialize string allocation. Called from init_alloc_once. */ 1735/* Initialize string allocation. Called from init_alloc_once. */
1752 1736
1753static void 1737static void
1754init_strings () 1738init_strings (void)
1755{ 1739{
1756 total_strings = total_free_strings = total_string_size = 0; 1740 total_strings = total_free_strings = total_string_size = 0;
1757 oldest_sblock = current_sblock = large_sblocks = NULL; 1741 oldest_sblock = current_sblock = large_sblocks = NULL;
@@ -1873,7 +1857,7 @@ check_string_free_list ()
1873/* Return a new Lisp_String. */ 1857/* Return a new Lisp_String. */
1874 1858
1875static struct Lisp_String * 1859static struct Lisp_String *
1876allocate_string () 1860allocate_string (void)
1877{ 1861{
1878 struct Lisp_String *s; 1862 struct Lisp_String *s;
1879 1863
@@ -1944,9 +1928,7 @@ allocate_string ()
1944 S->data if it was initially non-null. */ 1928 S->data if it was initially non-null. */
1945 1929
1946void 1930void
1947allocate_string_data (s, nchars, nbytes) 1931allocate_string_data (struct Lisp_String *s, int nchars, int nbytes)
1948 struct Lisp_String *s;
1949 int nchars, nbytes;
1950{ 1932{
1951 struct sdata *data, *old_data; 1933 struct sdata *data, *old_data;
1952 struct sblock *b; 1934 struct sblock *b;
@@ -2043,7 +2025,7 @@ allocate_string_data (s, nchars, nbytes)
2043/* Sweep and compact strings. */ 2025/* Sweep and compact strings. */
2044 2026
2045static void 2027static void
2046sweep_strings () 2028sweep_strings (void)
2047{ 2029{
2048 struct string_block *b, *next; 2030 struct string_block *b, *next;
2049 struct string_block *live_blocks = NULL; 2031 struct string_block *live_blocks = NULL;
@@ -2143,7 +2125,7 @@ sweep_strings ()
2143/* Free dead large strings. */ 2125/* Free dead large strings. */
2144 2126
2145static void 2127static void
2146free_large_strings () 2128free_large_strings (void)
2147{ 2129{
2148 struct sblock *b, *next; 2130 struct sblock *b, *next;
2149 struct sblock *live_blocks = NULL; 2131 struct sblock *live_blocks = NULL;
@@ -2169,7 +2151,7 @@ free_large_strings ()
2169 data of live strings after compaction. */ 2151 data of live strings after compaction. */
2170 2152
2171static void 2153static void
2172compact_small_strings () 2154compact_small_strings (void)
2173{ 2155{
2174 struct sblock *b, *tb, *next; 2156 struct sblock *b, *tb, *next;
2175 struct sdata *from, *to, *end, *tb_end; 2157 struct sdata *from, *to, *end, *tb_end;
@@ -2357,9 +2339,7 @@ LENGTH must be a number. INIT matters only in whether it is t or nil. */)
2357 multibyte, depending on the contents. */ 2339 multibyte, depending on the contents. */
2358 2340
2359Lisp_Object 2341Lisp_Object
2360make_string (contents, nbytes) 2342make_string (const char *contents, int nbytes)
2361 const char *contents;
2362 int nbytes;
2363{ 2343{
2364 register Lisp_Object val; 2344 register Lisp_Object val;
2365 int nchars, multibyte_nbytes; 2345 int nchars, multibyte_nbytes;
@@ -2378,9 +2358,7 @@ make_string (contents, nbytes)
2378/* Make an unibyte string from LENGTH bytes at CONTENTS. */ 2358/* Make an unibyte string from LENGTH bytes at CONTENTS. */
2379 2359
2380Lisp_Object 2360Lisp_Object
2381make_unibyte_string (contents, length) 2361make_unibyte_string (const char *contents, int length)
2382 const char *contents;
2383 int length;
2384{ 2362{
2385 register Lisp_Object val; 2363 register Lisp_Object val;
2386 val = make_uninit_string (length); 2364 val = make_uninit_string (length);
@@ -2394,9 +2372,7 @@ make_unibyte_string (contents, length)
2394 bytes at CONTENTS. */ 2372 bytes at CONTENTS. */
2395 2373
2396Lisp_Object 2374Lisp_Object
2397make_multibyte_string (contents, nchars, nbytes) 2375make_multibyte_string (const char *contents, int nchars, int nbytes)
2398 const char *contents;
2399 int nchars, nbytes;
2400{ 2376{
2401 register Lisp_Object val; 2377 register Lisp_Object val;
2402 val = make_uninit_multibyte_string (nchars, nbytes); 2378 val = make_uninit_multibyte_string (nchars, nbytes);
@@ -2409,9 +2385,7 @@ make_multibyte_string (contents, nchars, nbytes)
2409 CONTENTS. It is a multibyte string if NBYTES != NCHARS. */ 2385 CONTENTS. It is a multibyte string if NBYTES != NCHARS. */
2410 2386
2411Lisp_Object 2387Lisp_Object
2412make_string_from_bytes (contents, nchars, nbytes) 2388make_string_from_bytes (const char *contents, int nchars, int nbytes)
2413 const char *contents;
2414 int nchars, nbytes;
2415{ 2389{
2416 register Lisp_Object val; 2390 register Lisp_Object val;
2417 val = make_uninit_multibyte_string (nchars, nbytes); 2391 val = make_uninit_multibyte_string (nchars, nbytes);
@@ -2428,10 +2402,7 @@ make_string_from_bytes (contents, nchars, nbytes)
2428 characters by itself. */ 2402 characters by itself. */
2429 2403
2430Lisp_Object 2404Lisp_Object
2431make_specified_string (contents, nchars, nbytes, multibyte) 2405make_specified_string (const char *contents, int nchars, int nbytes, int multibyte)
2432 const char *contents;
2433 int nchars, nbytes;
2434 int multibyte;
2435{ 2406{
2436 register Lisp_Object val; 2407 register Lisp_Object val;
2437 2408
@@ -2454,8 +2425,7 @@ make_specified_string (contents, nchars, nbytes, multibyte)
2454 data warrants. */ 2425 data warrants. */
2455 2426
2456Lisp_Object 2427Lisp_Object
2457build_string (str) 2428build_string (const char *str)
2458 const char *str;
2459{ 2429{
2460 return make_string (str, strlen (str)); 2430 return make_string (str, strlen (str));
2461} 2431}
@@ -2465,8 +2435,7 @@ build_string (str)
2465 occupying LENGTH bytes. */ 2435 occupying LENGTH bytes. */
2466 2436
2467Lisp_Object 2437Lisp_Object
2468make_uninit_string (length) 2438make_uninit_string (int length)
2469 int length;
2470{ 2439{
2471 Lisp_Object val; 2440 Lisp_Object val;
2472 2441
@@ -2482,8 +2451,7 @@ make_uninit_string (length)
2482 which occupy NBYTES bytes. */ 2451 which occupy NBYTES bytes. */
2483 2452
2484Lisp_Object 2453Lisp_Object
2485make_uninit_multibyte_string (nchars, nbytes) 2454make_uninit_multibyte_string (int nchars, int nbytes)
2486 int nchars, nbytes;
2487{ 2455{
2488 Lisp_Object string; 2456 Lisp_Object string;
2489 struct Lisp_String *s; 2457 struct Lisp_String *s;
@@ -2573,7 +2541,7 @@ struct Lisp_Float *float_free_list;
2573/* Initialize float allocation. */ 2541/* Initialize float allocation. */
2574 2542
2575static void 2543static void
2576init_float () 2544init_float (void)
2577{ 2545{
2578 float_block = NULL; 2546 float_block = NULL;
2579 float_block_index = FLOAT_BLOCK_SIZE; /* Force alloc of new float_block. */ 2547 float_block_index = FLOAT_BLOCK_SIZE; /* Force alloc of new float_block. */
@@ -2585,8 +2553,7 @@ init_float ()
2585/* Explicitly free a float cell by putting it on the free-list. */ 2553/* Explicitly free a float cell by putting it on the free-list. */
2586 2554
2587static void 2555static void
2588free_float (ptr) 2556free_float (struct Lisp_Float *ptr)
2589 struct Lisp_Float *ptr;
2590{ 2557{
2591 ptr->u.chain = float_free_list; 2558 ptr->u.chain = float_free_list;
2592 float_free_list = ptr; 2559 float_free_list = ptr;
@@ -2596,8 +2563,7 @@ free_float (ptr)
2596/* Return a new float object with value FLOAT_VALUE. */ 2563/* Return a new float object with value FLOAT_VALUE. */
2597 2564
2598Lisp_Object 2565Lisp_Object
2599make_float (float_value) 2566make_float (double float_value)
2600 double float_value;
2601{ 2567{
2602 register Lisp_Object val; 2568 register Lisp_Object val;
2603 2569
@@ -2697,7 +2663,7 @@ static int n_cons_blocks;
2697/* Initialize cons allocation. */ 2663/* Initialize cons allocation. */
2698 2664
2699static void 2665static void
2700init_cons () 2666init_cons (void)
2701{ 2667{
2702 cons_block = NULL; 2668 cons_block = NULL;
2703 cons_block_index = CONS_BLOCK_SIZE; /* Force alloc of new cons_block. */ 2669 cons_block_index = CONS_BLOCK_SIZE; /* Force alloc of new cons_block. */
@@ -2709,8 +2675,7 @@ init_cons ()
2709/* Explicitly free a cons cell by putting it on the free-list. */ 2675/* Explicitly free a cons cell by putting it on the free-list. */
2710 2676
2711void 2677void
2712free_cons (ptr) 2678free_cons (struct Lisp_Cons *ptr)
2713 struct Lisp_Cons *ptr;
2714{ 2679{
2715 ptr->u.chain = cons_free_list; 2680 ptr->u.chain = cons_free_list;
2716#if GC_MARK_STACK 2681#if GC_MARK_STACK
@@ -2766,7 +2731,7 @@ DEFUN ("cons", Fcons, Scons, 2, 2, 0,
2766 2731
2767/* Get an error now if there's any junk in the cons free list. */ 2732/* Get an error now if there's any junk in the cons free list. */
2768void 2733void
2769check_cons_list () 2734check_cons_list (void)
2770{ 2735{
2771#ifdef GC_CHECK_CONS_LIST 2736#ifdef GC_CHECK_CONS_LIST
2772 struct Lisp_Cons *tail = cons_free_list; 2737 struct Lisp_Cons *tail = cons_free_list;
@@ -2779,39 +2744,34 @@ check_cons_list ()
2779/* Make a list of 1, 2, 3, 4 or 5 specified objects. */ 2744/* Make a list of 1, 2, 3, 4 or 5 specified objects. */
2780 2745
2781Lisp_Object 2746Lisp_Object
2782list1 (arg1) 2747list1 (Lisp_Object arg1)
2783 Lisp_Object arg1;
2784{ 2748{
2785 return Fcons (arg1, Qnil); 2749 return Fcons (arg1, Qnil);
2786} 2750}
2787 2751
2788Lisp_Object 2752Lisp_Object
2789list2 (arg1, arg2) 2753list2 (Lisp_Object arg1, Lisp_Object arg2)
2790 Lisp_Object arg1, arg2;
2791{ 2754{
2792 return Fcons (arg1, Fcons (arg2, Qnil)); 2755 return Fcons (arg1, Fcons (arg2, Qnil));
2793} 2756}
2794 2757
2795 2758
2796Lisp_Object 2759Lisp_Object
2797list3 (arg1, arg2, arg3) 2760list3 (Lisp_Object arg1, Lisp_Object arg2, Lisp_Object arg3)
2798 Lisp_Object arg1, arg2, arg3;
2799{ 2761{
2800 return Fcons (arg1, Fcons (arg2, Fcons (arg3, Qnil))); 2762 return Fcons (arg1, Fcons (arg2, Fcons (arg3, Qnil)));
2801} 2763}
2802 2764
2803 2765
2804Lisp_Object 2766Lisp_Object
2805list4 (arg1, arg2, arg3, arg4) 2767list4 (Lisp_Object arg1, Lisp_Object arg2, Lisp_Object arg3, Lisp_Object arg4)
2806 Lisp_Object arg1, arg2, arg3, arg4;
2807{ 2768{
2808 return Fcons (arg1, Fcons (arg2, Fcons (arg3, Fcons (arg4, Qnil)))); 2769 return Fcons (arg1, Fcons (arg2, Fcons (arg3, Fcons (arg4, Qnil))));
2809} 2770}
2810 2771
2811 2772
2812Lisp_Object 2773Lisp_Object
2813list5 (arg1, arg2, arg3, arg4, arg5) 2774list5 (Lisp_Object arg1, Lisp_Object arg2, Lisp_Object arg3, Lisp_Object arg4, Lisp_Object arg5)
2814 Lisp_Object arg1, arg2, arg3, arg4, arg5;
2815{ 2775{
2816 return Fcons (arg1, Fcons (arg2, Fcons (arg3, Fcons (arg4, 2776 return Fcons (arg1, Fcons (arg2, Fcons (arg3, Fcons (arg4,
2817 Fcons (arg5, Qnil))))); 2777 Fcons (arg5, Qnil)))));
@@ -2904,8 +2864,7 @@ static int n_vectors;
2904 with room for LEN Lisp_Objects. */ 2864 with room for LEN Lisp_Objects. */
2905 2865
2906static struct Lisp_Vector * 2866static struct Lisp_Vector *
2907allocate_vectorlike (len) 2867allocate_vectorlike (EMACS_INT len)
2908 EMACS_INT len;
2909{ 2868{
2910 struct Lisp_Vector *p; 2869 struct Lisp_Vector *p;
2911 size_t nbytes; 2870 size_t nbytes;
@@ -2946,8 +2905,7 @@ allocate_vectorlike (len)
2946/* Allocate a vector with NSLOTS slots. */ 2905/* Allocate a vector with NSLOTS slots. */
2947 2906
2948struct Lisp_Vector * 2907struct Lisp_Vector *
2949allocate_vector (nslots) 2908allocate_vector (EMACS_INT nslots)
2950 EMACS_INT nslots;
2951{ 2909{
2952 struct Lisp_Vector *v = allocate_vectorlike (nslots); 2910 struct Lisp_Vector *v = allocate_vectorlike (nslots);
2953 v->size = nslots; 2911 v->size = nslots;
@@ -2958,9 +2916,7 @@ allocate_vector (nslots)
2958/* Allocate other vector-like structures. */ 2916/* Allocate other vector-like structures. */
2959 2917
2960struct Lisp_Vector * 2918struct Lisp_Vector *
2961allocate_pseudovector (memlen, lisplen, tag) 2919allocate_pseudovector (int memlen, int lisplen, EMACS_INT tag)
2962 int memlen, lisplen;
2963 EMACS_INT tag;
2964{ 2920{
2965 struct Lisp_Vector *v = allocate_vectorlike (memlen); 2921 struct Lisp_Vector *v = allocate_vectorlike (memlen);
2966 EMACS_INT i; 2922 EMACS_INT i;
@@ -2982,14 +2938,14 @@ allocate_hash_table (void)
2982 2938
2983 2939
2984struct window * 2940struct window *
2985allocate_window () 2941allocate_window (void)
2986{ 2942{
2987 return ALLOCATE_PSEUDOVECTOR(struct window, current_matrix, PVEC_WINDOW); 2943 return ALLOCATE_PSEUDOVECTOR(struct window, current_matrix, PVEC_WINDOW);
2988} 2944}
2989 2945
2990 2946
2991struct terminal * 2947struct terminal *
2992allocate_terminal () 2948allocate_terminal (void)
2993{ 2949{
2994 struct terminal *t = ALLOCATE_PSEUDOVECTOR (struct terminal, 2950 struct terminal *t = ALLOCATE_PSEUDOVECTOR (struct terminal,
2995 next_terminal, PVEC_TERMINAL); 2951 next_terminal, PVEC_TERMINAL);
@@ -3001,7 +2957,7 @@ allocate_terminal ()
3001} 2957}
3002 2958
3003struct frame * 2959struct frame *
3004allocate_frame () 2960allocate_frame (void)
3005{ 2961{
3006 struct frame *f = ALLOCATE_PSEUDOVECTOR (struct frame, 2962 struct frame *f = ALLOCATE_PSEUDOVECTOR (struct frame,
3007 face_cache, PVEC_FRAME); 2963 face_cache, PVEC_FRAME);
@@ -3013,7 +2969,7 @@ allocate_frame ()
3013 2969
3014 2970
3015struct Lisp_Process * 2971struct Lisp_Process *
3016allocate_process () 2972allocate_process (void)
3017{ 2973{
3018 return ALLOCATE_PSEUDOVECTOR (struct Lisp_Process, pid, PVEC_PROCESS); 2974 return ALLOCATE_PSEUDOVECTOR (struct Lisp_Process, pid, PVEC_PROCESS);
3019} 2975}
@@ -3142,7 +3098,7 @@ static int n_symbol_blocks;
3142/* Initialize symbol allocation. */ 3098/* Initialize symbol allocation. */
3143 3099
3144static void 3100static void
3145init_symbol () 3101init_symbol (void)
3146{ 3102{
3147 symbol_block = NULL; 3103 symbol_block = NULL;
3148 symbol_block_index = SYMBOL_BLOCK_SIZE; 3104 symbol_block_index = SYMBOL_BLOCK_SIZE;
@@ -3233,7 +3189,7 @@ static union Lisp_Misc *marker_free_list;
3233static int n_marker_blocks; 3189static int n_marker_blocks;
3234 3190
3235static void 3191static void
3236init_marker () 3192init_marker (void)
3237{ 3193{
3238 marker_block = NULL; 3194 marker_block = NULL;
3239 marker_block_index = MARKER_BLOCK_SIZE; 3195 marker_block_index = MARKER_BLOCK_SIZE;
@@ -3244,7 +3200,7 @@ init_marker ()
3244/* Return a newly allocated Lisp_Misc object, with no substructure. */ 3200/* Return a newly allocated Lisp_Misc object, with no substructure. */
3245 3201
3246Lisp_Object 3202Lisp_Object
3247allocate_misc () 3203allocate_misc (void)
3248{ 3204{
3249 Lisp_Object val; 3205 Lisp_Object val;
3250 3206
@@ -3286,8 +3242,7 @@ allocate_misc ()
3286/* Free a Lisp_Misc object */ 3242/* Free a Lisp_Misc object */
3287 3243
3288void 3244void
3289free_misc (misc) 3245free_misc (Lisp_Object misc)
3290 Lisp_Object misc;
3291{ 3246{
3292 XMISCTYPE (misc) = Lisp_Misc_Free; 3247 XMISCTYPE (misc) = Lisp_Misc_Free;
3293 XMISC (misc)->u_free.chain = marker_free_list; 3248 XMISC (misc)->u_free.chain = marker_free_list;
@@ -3301,9 +3256,7 @@ free_misc (misc)
3301 The unwind function can get the C values back using XSAVE_VALUE. */ 3256 The unwind function can get the C values back using XSAVE_VALUE. */
3302 3257
3303Lisp_Object 3258Lisp_Object
3304make_save_value (pointer, integer) 3259make_save_value (void *pointer, int integer)
3305 void *pointer;
3306 int integer;
3307{ 3260{
3308 register Lisp_Object val; 3261 register Lisp_Object val;
3309 register struct Lisp_Save_Value *p; 3262 register struct Lisp_Save_Value *p;
@@ -3338,8 +3291,7 @@ DEFUN ("make-marker", Fmake_marker, Smake_marker, 0, 0, 0,
3338/* Put MARKER back on the free list after using it temporarily. */ 3291/* Put MARKER back on the free list after using it temporarily. */
3339 3292
3340void 3293void
3341free_marker (marker) 3294free_marker (Lisp_Object marker)
3342 Lisp_Object marker;
3343{ 3295{
3344 unchain_marker (XMARKER (marker)); 3296 unchain_marker (XMARKER (marker));
3345 free_misc (marker); 3297 free_misc (marker);
@@ -3353,9 +3305,7 @@ free_marker (marker)
3353 Any number of arguments, even zero arguments, are allowed. */ 3305 Any number of arguments, even zero arguments, are allowed. */
3354 3306
3355Lisp_Object 3307Lisp_Object
3356make_event_array (nargs, args) 3308make_event_array (register int nargs, Lisp_Object *args)
3357 register int nargs;
3358 Lisp_Object *args;
3359{ 3309{
3360 int i; 3310 int i;
3361 3311
@@ -3395,7 +3345,7 @@ make_event_array (nargs, args)
3395/* Called if malloc returns zero. */ 3345/* Called if malloc returns zero. */
3396 3346
3397void 3347void
3398memory_full () 3348memory_full (void)
3399{ 3349{
3400 int i; 3350 int i;
3401 3351
@@ -3435,7 +3385,7 @@ memory_full ()
3435 and also directly from this file, in case we're not using ralloc.c. */ 3385 and also directly from this file, in case we're not using ralloc.c. */
3436 3386
3437void 3387void
3438refill_memory_reserve () 3388refill_memory_reserve (void)
3439{ 3389{
3440#ifndef SYSTEM_MALLOC 3390#ifndef SYSTEM_MALLOC
3441 if (spare_memory[0] == 0) 3391 if (spare_memory[0] == 0)
@@ -3483,7 +3433,7 @@ refill_memory_reserve ()
3483/* Initialize this part of alloc.c. */ 3433/* Initialize this part of alloc.c. */
3484 3434
3485static void 3435static void
3486mem_init () 3436mem_init (void)
3487{ 3437{
3488 mem_z.left = mem_z.right = MEM_NIL; 3438 mem_z.left = mem_z.right = MEM_NIL;
3489 mem_z.parent = NULL; 3439 mem_z.parent = NULL;
@@ -3497,8 +3447,7 @@ mem_init ()
3497 MEM_NIL if there is no node in the tree containing START. */ 3447 MEM_NIL if there is no node in the tree containing START. */
3498 3448
3499static INLINE struct mem_node * 3449static INLINE struct mem_node *
3500mem_find (start) 3450mem_find (void *start)
3501 void *start;
3502{ 3451{
3503 struct mem_node *p; 3452 struct mem_node *p;
3504 3453
@@ -3521,9 +3470,7 @@ mem_find (start)
3521 pointer to the node that was inserted. */ 3470 pointer to the node that was inserted. */
3522 3471
3523static struct mem_node * 3472static struct mem_node *
3524mem_insert (start, end, type) 3473mem_insert (void *start, void *end, enum mem_type type)
3525 void *start, *end;
3526 enum mem_type type;
3527{ 3474{
3528 struct mem_node *c, *parent, *x; 3475 struct mem_node *c, *parent, *x;
3529 3476
@@ -3595,8 +3542,7 @@ mem_insert (start, end, type)
3595 balance the tree, after node X has been inserted; X is always red. */ 3542 balance the tree, after node X has been inserted; X is always red. */
3596 3543
3597static void 3544static void
3598mem_insert_fixup (x) 3545mem_insert_fixup (struct mem_node *x)
3599 struct mem_node *x;
3600{ 3546{
3601 while (x != mem_root && x->parent->color == MEM_RED) 3547 while (x != mem_root && x->parent->color == MEM_RED)
3602 { 3548 {
@@ -3674,8 +3620,7 @@ mem_insert_fixup (x)
3674 b c a b */ 3620 b c a b */
3675 3621
3676static void 3622static void
3677mem_rotate_left (x) 3623mem_rotate_left (struct mem_node *x)
3678 struct mem_node *x;
3679{ 3624{
3680 struct mem_node *y; 3625 struct mem_node *y;
3681 3626
@@ -3714,8 +3659,7 @@ mem_rotate_left (x)
3714 a b b c */ 3659 a b b c */
3715 3660
3716static void 3661static void
3717mem_rotate_right (x) 3662mem_rotate_right (struct mem_node *x)
3718 struct mem_node *x;
3719{ 3663{
3720 struct mem_node *y = x->left; 3664 struct mem_node *y = x->left;
3721 3665
@@ -3744,8 +3688,7 @@ mem_rotate_right (x)
3744/* Delete node Z from the tree. If Z is null or MEM_NIL, do nothing. */ 3688/* Delete node Z from the tree. If Z is null or MEM_NIL, do nothing. */
3745 3689
3746static void 3690static void
3747mem_delete (z) 3691mem_delete (struct mem_node *z)
3748 struct mem_node *z;
3749{ 3692{
3750 struct mem_node *x, *y; 3693 struct mem_node *x, *y;
3751 3694
@@ -3799,8 +3742,7 @@ mem_delete (z)
3799 deletion. */ 3742 deletion. */
3800 3743
3801static void 3744static void
3802mem_delete_fixup (x) 3745mem_delete_fixup (struct mem_node *x)
3803 struct mem_node *x;
3804{ 3746{
3805 while (x != mem_root && x->color == MEM_BLACK) 3747 while (x != mem_root && x->color == MEM_BLACK)
3806 { 3748 {
@@ -3881,9 +3823,7 @@ mem_delete_fixup (x)
3881 the heap. M is a pointer to the mem_block for P. */ 3823 the heap. M is a pointer to the mem_block for P. */
3882 3824
3883static INLINE int 3825static INLINE int
3884live_string_p (m, p) 3826live_string_p (struct mem_node *m, void *p)
3885 struct mem_node *m;
3886 void *p;
3887{ 3827{
3888 if (m->type == MEM_TYPE_STRING) 3828 if (m->type == MEM_TYPE_STRING)
3889 { 3829 {
@@ -3906,9 +3846,7 @@ live_string_p (m, p)
3906 the heap. M is a pointer to the mem_block for P. */ 3846 the heap. M is a pointer to the mem_block for P. */
3907 3847
3908static INLINE int 3848static INLINE int
3909live_cons_p (m, p) 3849live_cons_p (struct mem_node *m, void *p)
3910 struct mem_node *m;
3911 void *p;
3912{ 3850{
3913 if (m->type == MEM_TYPE_CONS) 3851 if (m->type == MEM_TYPE_CONS)
3914 { 3852 {
@@ -3934,9 +3872,7 @@ live_cons_p (m, p)
3934 the heap. M is a pointer to the mem_block for P. */ 3872 the heap. M is a pointer to the mem_block for P. */
3935 3873
3936static INLINE int 3874static INLINE int
3937live_symbol_p (m, p) 3875live_symbol_p (struct mem_node *m, void *p)
3938 struct mem_node *m;
3939 void *p;
3940{ 3876{
3941 if (m->type == MEM_TYPE_SYMBOL) 3877 if (m->type == MEM_TYPE_SYMBOL)
3942 { 3878 {
@@ -3962,9 +3898,7 @@ live_symbol_p (m, p)
3962 the heap. M is a pointer to the mem_block for P. */ 3898 the heap. M is a pointer to the mem_block for P. */
3963 3899
3964static INLINE int 3900static INLINE int
3965live_float_p (m, p) 3901live_float_p (struct mem_node *m, void *p)
3966 struct mem_node *m;
3967 void *p;
3968{ 3902{
3969 if (m->type == MEM_TYPE_FLOAT) 3903 if (m->type == MEM_TYPE_FLOAT)
3970 { 3904 {
@@ -3988,9 +3922,7 @@ live_float_p (m, p)
3988 the heap. M is a pointer to the mem_block for P. */ 3922 the heap. M is a pointer to the mem_block for P. */
3989 3923
3990static INLINE int 3924static INLINE int
3991live_misc_p (m, p) 3925live_misc_p (struct mem_node *m, void *p)
3992 struct mem_node *m;
3993 void *p;
3994{ 3926{
3995 if (m->type == MEM_TYPE_MISC) 3927 if (m->type == MEM_TYPE_MISC)
3996 { 3928 {
@@ -4016,9 +3948,7 @@ live_misc_p (m, p)
4016 M is a pointer to the mem_block for P. */ 3948 M is a pointer to the mem_block for P. */
4017 3949
4018static INLINE int 3950static INLINE int
4019live_vector_p (m, p) 3951live_vector_p (struct mem_node *m, void *p)
4020 struct mem_node *m;
4021 void *p;
4022{ 3952{
4023 return (p == m->start && m->type == MEM_TYPE_VECTORLIKE); 3953 return (p == m->start && m->type == MEM_TYPE_VECTORLIKE);
4024} 3954}
@@ -4028,9 +3958,7 @@ live_vector_p (m, p)
4028 pointer to the mem_block for P. */ 3958 pointer to the mem_block for P. */
4029 3959
4030static INLINE int 3960static INLINE int
4031live_buffer_p (m, p) 3961live_buffer_p (struct mem_node *m, void *p)
4032 struct mem_node *m;
4033 void *p;
4034{ 3962{
4035 /* P must point to the start of the block, and the buffer 3963 /* P must point to the start of the block, and the buffer
4036 must not have been killed. */ 3964 must not have been killed. */
@@ -4096,8 +4024,7 @@ DEFUN ("gc-status", Fgc_status, Sgc_status, 0, 0, "",
4096/* Mark OBJ if we can prove it's a Lisp_Object. */ 4024/* Mark OBJ if we can prove it's a Lisp_Object. */
4097 4025
4098static INLINE void 4026static INLINE void
4099mark_maybe_object (obj) 4027mark_maybe_object (Lisp_Object obj)
4100 Lisp_Object obj;
4101{ 4028{
4102 void *po = (void *) XPNTR (obj); 4029 void *po = (void *) XPNTR (obj);
4103 struct mem_node *m = mem_find (po); 4030 struct mem_node *m = mem_find (po);
@@ -4160,8 +4087,7 @@ mark_maybe_object (obj)
4160 marked. */ 4087 marked. */
4161 4088
4162static INLINE void 4089static INLINE void
4163mark_maybe_pointer (p) 4090mark_maybe_pointer (void *p)
4164 void *p;
4165{ 4091{
4166 struct mem_node *m; 4092 struct mem_node *m;
4167 4093
@@ -4241,9 +4167,7 @@ mark_maybe_pointer (p)
4241 or END+OFFSET..START. */ 4167 or END+OFFSET..START. */
4242 4168
4243static void 4169static void
4244mark_memory (start, end, offset) 4170mark_memory (void *start, void *end, int offset)
4245 void *start, *end;
4246 int offset;
4247{ 4171{
4248 Lisp_Object *p; 4172 Lisp_Object *p;
4249 void **pp; 4173 void **pp;
@@ -4459,7 +4383,7 @@ dump_zombies ()
4459 equally on the stack. */ 4383 equally on the stack. */
4460 4384
4461static void 4385static void
4462mark_stack () 4386mark_stack (void)
4463{ 4387{
4464 int i; 4388 int i;
4465 /* jmp_buf may not be aligned enough on darwin-ppc64 */ 4389 /* jmp_buf may not be aligned enough on darwin-ppc64 */
@@ -4534,8 +4458,7 @@ mark_stack ()
4534 4458
4535/* Determine whether it is safe to access memory at address P. */ 4459/* Determine whether it is safe to access memory at address P. */
4536static int 4460static int
4537valid_pointer_p (p) 4461valid_pointer_p (void *p)
4538 void *p;
4539{ 4462{
4540#ifdef WINDOWSNT 4463#ifdef WINDOWSNT
4541 return w32_valid_pointer_p (p, 16); 4464 return w32_valid_pointer_p (p, 16);
@@ -4566,8 +4489,7 @@ valid_pointer_p (p)
4566 so it should only be used in code for manual debugging. */ 4489 so it should only be used in code for manual debugging. */
4567 4490
4568int 4491int
4569valid_lisp_object_p (obj) 4492valid_lisp_object_p (Lisp_Object obj)
4570 Lisp_Object obj;
4571{ 4493{
4572 void *p; 4494 void *p;
4573#if GC_MARK_STACK 4495#if GC_MARK_STACK
@@ -4645,9 +4567,7 @@ valid_lisp_object_p (obj)
4645 allocated. TYPE < 0 means it's not used for a Lisp object. */ 4567 allocated. TYPE < 0 means it's not used for a Lisp object. */
4646 4568
4647static POINTER_TYPE * 4569static POINTER_TYPE *
4648pure_alloc (size, type) 4570pure_alloc (size_t size, int type)
4649 size_t size;
4650 int type;
4651{ 4571{
4652 POINTER_TYPE *result; 4572 POINTER_TYPE *result;
4653#ifdef USE_LSB_TAG 4573#ifdef USE_LSB_TAG
@@ -4701,7 +4621,7 @@ pure_alloc (size, type)
4701/* Print a warning if PURESIZE is too small. */ 4621/* Print a warning if PURESIZE is too small. */
4702 4622
4703void 4623void
4704check_pure_size () 4624check_pure_size (void)
4705{ 4625{
4706 if (pure_bytes_used_before_overflow) 4626 if (pure_bytes_used_before_overflow)
4707 message ("emacs:0:Pure Lisp storage overflow (approx. %d bytes needed)", 4627 message ("emacs:0:Pure Lisp storage overflow (approx. %d bytes needed)",
@@ -4714,9 +4634,7 @@ check_pure_size ()
4714 address. Return NULL if not found. */ 4634 address. Return NULL if not found. */
4715 4635
4716static char * 4636static char *
4717find_string_data_in_pure (data, nbytes) 4637find_string_data_in_pure (const char *data, int nbytes)
4718 const char *data;
4719 int nbytes;
4720{ 4638{
4721 int i, skip, bm_skip[256], last_char_skip, infinity, start, start_max; 4639 int i, skip, bm_skip[256], last_char_skip, infinity, start, start_max;
4722 const unsigned char *p; 4640 const unsigned char *p;
@@ -4785,10 +4703,7 @@ find_string_data_in_pure (data, nbytes)
4785 string; then the string is not protected from gc. */ 4703 string; then the string is not protected from gc. */
4786 4704
4787Lisp_Object 4705Lisp_Object
4788make_pure_string (data, nchars, nbytes, multibyte) 4706make_pure_string (const char *data, int nchars, int nbytes, int multibyte)
4789 const char *data;
4790 int nchars, nbytes;
4791 int multibyte;
4792{ 4707{
4793 Lisp_Object string; 4708 Lisp_Object string;
4794 struct Lisp_String *s; 4709 struct Lisp_String *s;
@@ -4831,8 +4746,7 @@ make_pure_c_string (const char *data)
4831 of CAR as car and CDR as cdr. */ 4746 of CAR as car and CDR as cdr. */
4832 4747
4833Lisp_Object 4748Lisp_Object
4834pure_cons (car, cdr) 4749pure_cons (Lisp_Object car, Lisp_Object cdr)
4835 Lisp_Object car, cdr;
4836{ 4750{
4837 register Lisp_Object new; 4751 register Lisp_Object new;
4838 struct Lisp_Cons *p; 4752 struct Lisp_Cons *p;
@@ -4848,8 +4762,7 @@ pure_cons (car, cdr)
4848/* Value is a float object with value NUM allocated from pure space. */ 4762/* Value is a float object with value NUM allocated from pure space. */
4849 4763
4850static Lisp_Object 4764static Lisp_Object
4851make_pure_float (num) 4765make_pure_float (double num)
4852 double num;
4853{ 4766{
4854 register Lisp_Object new; 4767 register Lisp_Object new;
4855 struct Lisp_Float *p; 4768 struct Lisp_Float *p;
@@ -4865,8 +4778,7 @@ make_pure_float (num)
4865 pure space. */ 4778 pure space. */
4866 4779
4867Lisp_Object 4780Lisp_Object
4868make_pure_vector (len) 4781make_pure_vector (EMACS_INT len)
4869 EMACS_INT len;
4870{ 4782{
4871 Lisp_Object new; 4783 Lisp_Object new;
4872 struct Lisp_Vector *p; 4784 struct Lisp_Vector *p;
@@ -4949,8 +4861,7 @@ Does not copy symbols. Copies strings without text properties. */)
4949 VARADDRESS. */ 4861 VARADDRESS. */
4950 4862
4951void 4863void
4952staticpro (varaddress) 4864staticpro (Lisp_Object *varaddress)
4953 Lisp_Object *varaddress;
4954{ 4865{
4955 staticvec[staticidx++] = varaddress; 4866 staticvec[staticidx++] = varaddress;
4956 if (staticidx >= NSTATICS) 4867 if (staticidx >= NSTATICS)
@@ -4965,7 +4876,7 @@ staticpro (varaddress)
4965/* Temporarily prevent garbage collection. */ 4876/* Temporarily prevent garbage collection. */
4966 4877
4967int 4878int
4968inhibit_garbage_collection () 4879inhibit_garbage_collection (void)
4969{ 4880{
4970 int count = SPECPDL_INDEX (); 4881 int count = SPECPDL_INDEX ();
4971 int nbits = min (VALBITS, BITS_PER_INT); 4882 int nbits = min (VALBITS, BITS_PER_INT);
@@ -5297,8 +5208,7 @@ returns nil, because real GC can't be done. */)
5297 only interesting objects referenced from glyphs are strings. */ 5208 only interesting objects referenced from glyphs are strings. */
5298 5209
5299static void 5210static void
5300mark_glyph_matrix (matrix) 5211mark_glyph_matrix (struct glyph_matrix *matrix)
5301 struct glyph_matrix *matrix;
5302{ 5212{
5303 struct glyph_row *row = matrix->rows; 5213 struct glyph_row *row = matrix->rows;
5304 struct glyph_row *end = row + matrix->nrows; 5214 struct glyph_row *end = row + matrix->nrows;
@@ -5324,8 +5234,7 @@ mark_glyph_matrix (matrix)
5324/* Mark Lisp faces in the face cache C. */ 5234/* Mark Lisp faces in the face cache C. */
5325 5235
5326static void 5236static void
5327mark_face_cache (c) 5237mark_face_cache (struct face_cache *c)
5328 struct face_cache *c;
5329{ 5238{
5330 if (c) 5239 if (c)
5331 { 5240 {
@@ -5360,8 +5269,7 @@ int last_marked_index;
5360static int mark_object_loop_halt; 5269static int mark_object_loop_halt;
5361 5270
5362static void 5271static void
5363mark_vectorlike (ptr) 5272mark_vectorlike (struct Lisp_Vector *ptr)
5364 struct Lisp_Vector *ptr;
5365{ 5273{
5366 register EMACS_INT size = ptr->size; 5274 register EMACS_INT size = ptr->size;
5367 register int i; 5275 register int i;
@@ -5384,8 +5292,7 @@ mark_vectorlike (ptr)
5384 symbols. */ 5292 symbols. */
5385 5293
5386static void 5294static void
5387mark_char_table (ptr) 5295mark_char_table (struct Lisp_Vector *ptr)
5388 struct Lisp_Vector *ptr;
5389{ 5296{
5390 register EMACS_INT size = ptr->size & PSEUDOVECTOR_SIZE_MASK; 5297 register EMACS_INT size = ptr->size & PSEUDOVECTOR_SIZE_MASK;
5391 register int i; 5298 register int i;
@@ -5409,8 +5316,7 @@ mark_char_table (ptr)
5409} 5316}
5410 5317
5411void 5318void
5412mark_object (arg) 5319mark_object (Lisp_Object arg)
5413 Lisp_Object arg;
5414{ 5320{
5415 register Lisp_Object obj = arg; 5321 register Lisp_Object obj = arg;
5416#ifdef GC_CHECK_MARKED_OBJECTS 5322#ifdef GC_CHECK_MARKED_OBJECTS
@@ -5719,8 +5625,7 @@ mark_object (arg)
5719/* Mark the pointers in a buffer structure. */ 5625/* Mark the pointers in a buffer structure. */
5720 5626
5721static void 5627static void
5722mark_buffer (buf) 5628mark_buffer (Lisp_Object buf)
5723 Lisp_Object buf;
5724{ 5629{
5725 register struct buffer *buffer = XBUFFER (buf); 5630 register struct buffer *buffer = XBUFFER (buf);
5726 register Lisp_Object *ptr, tmp; 5631 register Lisp_Object *ptr, tmp;
@@ -5787,8 +5692,7 @@ mark_terminals (void)
5787 either marked or does not need to be marked to survive. */ 5692 either marked or does not need to be marked to survive. */
5788 5693
5789int 5694int
5790survives_gc_p (obj) 5695survives_gc_p (Lisp_Object obj)
5791 Lisp_Object obj;
5792{ 5696{
5793 int survives_p; 5697 int survives_p;
5794 5698
@@ -5834,7 +5738,7 @@ survives_gc_p (obj)
5834/* Sweep: find all structures not marked, and free them. */ 5738/* Sweep: find all structures not marked, and free them. */
5835 5739
5836static void 5740static void
5837gc_sweep () 5741gc_sweep (void)
5838{ 5742{
5839 /* Remove or mark entries in weak hash tables. 5743 /* Remove or mark entries in weak hash tables.
5840 This must be done before any object is unmarked. */ 5744 This must be done before any object is unmarked. */
@@ -6251,10 +6155,7 @@ Frames, windows, buffers, and subprocesses count as vectors
6251int suppress_checking; 6155int suppress_checking;
6252 6156
6253void 6157void
6254die (msg, file, line) 6158die (const char *msg, const char *file, int line)
6255 const char *msg;
6256 const char *file;
6257 int line;
6258{ 6159{
6259 fprintf (stderr, "\r\n%s:%d: Emacs fatal error: %s\r\n", 6160 fprintf (stderr, "\r\n%s:%d: Emacs fatal error: %s\r\n",
6260 file, line, msg); 6161 file, line, msg);
@@ -6264,7 +6165,7 @@ die (msg, file, line)
6264/* Initialization */ 6165/* Initialization */
6265 6166
6266void 6167void
6267init_alloc_once () 6168init_alloc_once (void)
6268{ 6169{
6269 /* Used to do Vpurify_flag = Qt here, but Qt isn't set up yet! */ 6170 /* Used to do Vpurify_flag = Qt here, but Qt isn't set up yet! */
6270 purebeg = PUREBEG; 6171 purebeg = PUREBEG;
@@ -6319,7 +6220,7 @@ init_alloc_once ()
6319} 6220}
6320 6221
6321void 6222void
6322init_alloc () 6223init_alloc (void)
6323{ 6224{
6324 gcprolist = 0; 6225 gcprolist = 0;
6325 byte_stack_list = 0; 6226 byte_stack_list = 0;
@@ -6333,7 +6234,7 @@ init_alloc ()
6333} 6234}
6334 6235
6335void 6236void
6336syms_of_alloc () 6237syms_of_alloc (void)
6337{ 6238{
6338 DEFVAR_INT ("gc-cons-threshold", &gc_cons_threshold, 6239 DEFVAR_INT ("gc-cons-threshold", &gc_cons_threshold,
6339 doc: /* *Number of bytes of consing between garbage collections. 6240 doc: /* *Number of bytes of consing between garbage collections.