User: ben
Date: 05/02/04 04:01:24
Modified: xemacs/src ChangeLog dumper.c glyphs-eimage.c sysproc.h
Log:
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.
Revision Changes Path
1.788 +14 -0 XEmacs/xemacs/src/ChangeLog
(In the diff below, changes in quantity of whitespace are not shown.)
Index: ChangeLog
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/ChangeLog,v
retrieving revision 1.787
retrieving revision 1.788
diff -u -b -r1.787 -r1.788
--- ChangeLog 2005/02/03 17:34:02 1.787
+++ ChangeLog 2005/02/04 03:01:19 1.788
@@ -1,3 +1,17 @@
+2005-02-03 Ben Wing <ben(a)xemacs.org>
+
+ * 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 <james(a)xemacs.org>
* dumper.c (pdump_load_finish): Cast to Rawbyte * instead of char *.
1.25 +7 -2 XEmacs/xemacs/src/dumper.c
(In the diff below, changes in quantity of whitespace are not shown.)
Index: dumper.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/dumper.c,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -b -r1.24 -r1.25
--- dumper.c 2005/02/03 17:34:03 1.24
+++ dumper.c 2005/02/04 03:01:20 1.25
@@ -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;
}
1.25 +6 -5 XEmacs/xemacs/src/glyphs-eimage.c
(In the diff below, changes in quantity of whitespace are not shown.)
Index: glyphs-eimage.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/glyphs-eimage.c,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -b -r1.24 -r1.25
--- glyphs-eimage.c 2005/01/24 23:33:57 1.24
+++ glyphs-eimage.c 2005/02/04 03:01:21 1.25
@@ -105,11 +105,12 @@
BEGIN_C_DECLS
#ifdef WIN32_NATIVE
-/* #### Yuck! More horrifitude. tiffio.h, below, includes <windows.h>, 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 <windows.h> wants
them
- (which is more correct, anyway; jmorecfg.h defines INT32 as `long'). */
+/* #### Yuck! More horrifitude. tiffio.h, below, includes <windows.h>,
+ 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 <windows.h> wants them (which is more correct,
+ anyway; jmorecfg.h defines INT32 as `long'). */
#define XMD_H
typedef signed int INT32;
typedef signed short INT16;
1.17 +0 -4 XEmacs/xemacs/src/sysproc.h
(In the diff below, changes in quantity of whitespace are not shown.)
Index: sysproc.h
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/sysproc.h,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -b -r1.16 -r1.17
--- sysproc.h 2005/01/24 23:34:11 1.16
+++ sysproc.h 2005/02/04 03:01:21 1.17
@@ -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