X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=src%2Fdumper.c;h=9e93d0967d2877ec671927078680b0132341d41d;hb=3f56098210002ecef7ce82e894c65428869c554c;hp=640309dc7ad024865f97905054d3a8afd9638163;hpb=3062d425fac0473eb5aa2efc0bb002f6ce0cb028;p=chise%2Fxemacs-chise.git.1 diff --git a/src/dumper.c b/src/dumper.c index 640309d..9e93d09 100644 --- a/src/dumper.c +++ b/src/dumper.c @@ -29,6 +29,7 @@ Boston, MA 02111-1307, USA. */ #include "sysfile.h" #include "console-stream.h" #include "dumper.h" +#include "sysdep.h" #ifdef WIN32_NATIVE #include "nt.h" @@ -281,7 +282,11 @@ static int pdump_fd; static void *pdump_buf; static FILE *pdump_out; +#ifdef UTF2000 +#define PDUMP_HASHSIZE 20000001 +#else #define PDUMP_HASHSIZE 200001 +#endif static pdump_entry_list_elt **pdump_hash; @@ -414,7 +419,7 @@ pdump_get_indirect_count (EMACS_INT code, const struct lrecord_description *idesc, const void *idata) { - EMACS_INT count; + EMACS_INT count = 0; /* initialize to shut up GCC */ const void *irdata; int line = XD_INDIRECT_VAL (code); @@ -439,7 +444,7 @@ pdump_get_indirect_count (EMACS_INT code, stderr_out ("Unsupported count type : %d (line = %d, code=%ld)\n", idesc[line].type, line, (long)code); pdump_backtrace (); - abort (); + ABORT (); } count += delta; return count; @@ -539,7 +544,7 @@ pdump_register_sub (const void *data, const struct lrecord_description *desc, in default: stderr_out ("Unsupported dump type : %d\n", desc[pos].type); pdump_backtrace (); - abort (); + ABORT (); }; } } @@ -565,10 +570,10 @@ pdump_register_object (Lisp_Object obj) if (imp->description) { int me = depth++; - if (me>65536) + if (me>=65536) { stderr_out ("Backtrace overflow, loop ?\n"); - abort (); + ABORT (); } backtrace[me].obj = objh; backtrace[me].position = 0; @@ -600,10 +605,10 @@ pdump_register_struct (const void *data, { int me = depth++; int i; - if (me>65536) + if (me>=65536) { stderr_out ("Backtrace overflow, loop ?\n"); - abort (); + ABORT (); } backtrace[me].obj = 0; backtrace[me].position = 0; @@ -716,7 +721,7 @@ pdump_dump_data (pdump_entry_list_elt *elt, } default: stderr_out ("Unsupported dump type : %d\n", desc[pos].type); - abort (); + ABORT (); } } } @@ -794,7 +799,7 @@ pdump_reloc_one (void *data, EMACS_INT delta, } default: stderr_out ("Unsupported dump type : %d\n", desc[pos].type); - abort (); + ABORT (); }; } } @@ -818,7 +823,7 @@ pdump_scan_by_alignment (void (*f)(pdump_entry_list_elt *, for (align = ALIGNOF (max_align_t); align; align>>=1) { - int i; + size_t i; pdump_entry_list_elt *elt; for (i=0; i