# HG changeset patch # User ben # Date 1107486081 0 # Node ID 6bee993389f3bf3d67bb0298675c59f81fa9ae9d # Parent ecc681180115295dda5d8e266deeb822ae3ff941 [xemacs-hg @ 2005-02-04 03:01:19 by ben] misc source fixes dumper.c: Include extra DUMP_SLACK when allocating space for exe path. glyphs-eimage.c: Reformat comment. sysproc.h: Delete out-of-date comment about abort. diff -r ecc681180115 -r 6bee993389f3 src/ChangeLog --- a/src/ChangeLog Fri Feb 04 02:59:27 2005 +0000 +++ b/src/ChangeLog Fri Feb 04 03:01:21 2005 +0000 @@ -1,3 +1,17 @@ +2005-02-03 Ben Wing + + * dumper.c: + * dumper.c (pdump_file_try): + * dumper.c (DUMP_SLACK): + * dumper.c (pdump_load): + Include extra DUMP_SLACK when allocating space for exe path. + + * glyphs-eimage.c: + Reformat comment. + + * sysproc.h: + Delete out-of-date comment about abort. + 2005-02-03 Jerry James * dumper.c (pdump_load_finish): Cast to Rawbyte * instead of char *. diff -r ecc681180115 -r 6bee993389f3 src/dumper.c --- a/src/dumper.c Fri Feb 04 02:59:27 2005 +0000 +++ b/src/dumper.c Fri Feb 04 03:01:21 2005 +0000 @@ -1,7 +1,7 @@ /* Portable data dumper for XEmacs. Copyright (C) 1999-2000,2004 Olivier Galibert Copyright (C) 2001 Martin Buchholz - Copyright (C) 2001, 2002, 2003, 2004 Ben Wing. + Copyright (C) 2001, 2002, 2003, 2004, 2005 Ben Wing. This file is part of XEmacs. @@ -2084,6 +2084,10 @@ { Wexttext *w = exe_path + wext_strlen (exe_path); + /* We look for various names, including those with the version and dump ID, + those with just the dump ID, and those without either. We first try + adding directly to the executable name, then lopping off any extension + (e.g. .exe) or version name in the executable (xemacs-21.5.18). */ do { wext_sprintf (w, WEXTSTRING ("-%s-%08x.dmp"), WEXTSTRING (EMACS_VERSION), @@ -2128,6 +2132,7 @@ Wexttext *exe_path = NULL; int bufsize = 4096; int cchpathsize; +#define DUMP_SLACK 100 /* Enough to include dump ID, version name, .DMP */ /* Copied from mswindows_get_module_file_name (). Not clear if it's kosher to malloc() yet. */ @@ -2138,7 +2143,7 @@ bufsize); if (!cchpathsize) goto fail; - if (cchpathsize + 1 <= bufsize) + if (cchpathsize + DUMP_SLACK <= bufsize) break; bufsize *= 2; } diff -r ecc681180115 -r 6bee993389f3 src/glyphs-eimage.c --- a/src/glyphs-eimage.c Fri Feb 04 02:59:27 2005 +0000 +++ b/src/glyphs-eimage.c Fri Feb 04 03:01:21 2005 +0000 @@ -105,11 +105,12 @@ BEGIN_C_DECLS #ifdef WIN32_NATIVE -/* #### Yuck! More horrifitude. tiffio.h, below, includes , which - defines INT32 and INT16, the former differently and incompatibly from jmorecfg.h, - included by jpeglib.h. We can disable the stuff in jmorecfg.h by defining XMD_H - (clever, huh?); then we define these typedefs the way that wants them - (which is more correct, anyway; jmorecfg.h defines INT32 as `long'). */ +/* #### Yuck! More horrifitude. tiffio.h, below, includes , + which defines INT32 and INT16, the former differently and incompatibly + from jmorecfg.h, included by jpeglib.h. We can disable the stuff in + jmorecfg.h by defining XMD_H (clever, huh?); then we define these + typedefs the way that wants them (which is more correct, + anyway; jmorecfg.h defines INT32 as `long'). */ #define XMD_H typedef signed int INT32; typedef signed short INT16; diff -r ecc681180115 -r 6bee993389f3 src/sysproc.h --- a/src/sysproc.h Fri Feb 04 02:59:27 2005 +0000 +++ b/src/sysproc.h Fri Feb 04 03:01:21 2005 +0000 @@ -41,10 +41,6 @@ This is not true with visual c though. The trick below works with VC4.2b, 5.0 and 6.0. It assumes that VC is installed in a kind of standard way, so include path ends with /include. - NOTE: We also include this same file in s/windowsnt.h, to avoid problems - because this file prototypes ABORT() and then lisp.h defines it as a - macro, which must happen after the prototype. DO NOT remove the include - here just because you "know" it's somewhere else as well. */ #include <../include/process.h> #endif