File: 02-move-dump

package info (click to toggle)
xemacs21 21.4.24-12
  • links: PTS
  • area: main
  • in suites: sid
  • size: 34,212 kB
  • sloc: ansic: 243,882; lisp: 94,071; cpp: 5,726; sh: 4,406; perl: 1,096; cs: 775; makefile: 765; python: 279; asm: 248; lex: 119; yacc: 95; sed: 22; csh: 9
file content (85 lines) | stat: -rw-r--r-- 2,013 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
Description: Add DOCDIR as a location for the dump file
Author: Probably James LewisMoss <dres@debian.org> 
Origin: Old XEmacs packages
Forwarded: no
--- a/configure.in
+++ b/configure.in
@@ -5015,6 +5015,7 @@
   esac
 done
 AC_SUBST(DOCDIR)
+AC_DEFINE_UNQUOTED(DOCDIR, "$docdir")
 
 AC_SUBST(archlibdir)
 AC_SUBST(ARCHLIBDIR_USER_DEFINED)
--- a/src/config.h.in
+++ b/src/config.h.in
@@ -916,6 +916,7 @@
 #undef MODULEDIR_USER_DEFINED
 #undef SITEMODULEDIR_USER_DEFINED
 #undef DOCDIR_USER_DEFINED
+#undef DOCDIR
 #undef LISPDIR_USER_DEFINED
 #undef PACKAGE_PATH_USER_DEFINED
 #undef SITELISPDIR_USER_DEFINED
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1401,6 +1401,11 @@
 
 	* specifier.c (Fvalid_specifier_type_p): Typo in comment.
 
+2002-11-16  James LewisMoss  <dres@lewismoss.org>
+
+	* dumper.c (pdump_load): add search for file DUMP in DOCDIR along
+	with the patterned exe path search.
+
 2002-11-13  Stephen J. Turnbull  <stephen@xemacs.org>
 
 	* event-Xt.c (Xt_timeout):
--- a/src/dumper.c
+++ b/src/dumper.c
@@ -1323,9 +1323,24 @@
 }
 #endif /* !WIN32_NATIVE */
 
+static int
+pdump_file_doc_dir_try (char *exe_path)
+{
+  char *w = exe_path + strlen (exe_path);
+
+  sprintf (w, "%s", "DUMP");
+
+  if (pdump_file_get (exe_path))
+    {
+      if (pdump_load_check ())
+        return 1;
+      pdump_free ();
+    }
+  return 0;
+}
 
 static int
-pdump_file_try (char *exe_path)
+pdump_file_exe_path_try (char *exe_path)
 {
   char *w = exe_path + strlen (exe_path);
 
@@ -1440,9 +1455,16 @@
 
   /* Save exe_path because pdump_file_try() modifies it */
   strcpy(real_exe_path, exe_path);
-  if (pdump_file_try (exe_path)
+  if (pdump_file_exe_path_try (exe_path)
       || (xrealpath(real_exe_path, real_exe_path)
-	  && pdump_file_try (real_exe_path)))
+	  && pdump_file_exe_path_try (real_exe_path)))
+    {
+      pdump_load_finish ();
+      return 1;
+    }
+
+  sprintf(exe_path, "%s", DOCDIR);
+  if (pdump_file_doc_dir_try (exe_path))
     {
       pdump_load_finish ();
       return 1;