NOTE: This patch has been committed.
APPROVE COMMIT
SUPERSEDES 17499.29798.163809.910007(a)parhasard.net
src/ChangeLog addition:
2006-05-06 Aidan Kehoe <kehoea(a)parhasard.net>
* lisp.h (struct Lisp_Subr):
Document that prompt, doc, and name should not be char *.
* symbols.c (Fsubr_name):
Cast name to const Ibyte * before returning it.
* sysfile.h:
Make versions of DIRECTORY_SEP, IS_DIRECTORY_SEP and IS_ANY_SEP
available to make-docfile and other non-emacs processes on win32.
XEmacs Trunk source patch:
Diff command: cvs -q diff -u
Files affected: src/sysfile.h src/symbols.c src/lisp.h
Index: src/lisp.h
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/lisp.h,v
retrieving revision 1.141
diff -u -u -r1.141 lisp.h
--- src/lisp.h 2006/03/30 23:10:38 1.141
+++ src/lisp.h 2006/05/06 08:04:00
@@ -2676,6 +2676,8 @@
struct lrecord_header lheader;
short min_args;
short max_args;
+ /* #### We should make these const Ascbyte * or const Ibyte *, not const
+ char *. */
const char *prompt;
const char *doc;
const char *name;
Index: src/symbols.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/symbols.c,v
retrieving revision 1.56
diff -u -u -r1.56 symbols.c
--- src/symbols.c 2006/04/29 16:15:30 1.56
+++ src/symbols.c 2006/05/06 08:04:01
@@ -729,7 +729,7 @@
if (!SUBRP (subr))
wrong_type_argument (Qsubrp, subr);
name = XSUBR (subr)->name;
- return make_string (name, strlen (name));
+ return make_string ((const Ibyte *)name, strlen (name));
}
DEFUN ("setplist", Fsetplist, 2, 2, 0, /*
Index: src/sysfile.h
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/sysfile.h,v
retrieving revision 1.22
diff -u -u -r1.22 sysfile.h
--- src/sysfile.h 2006/04/29 16:15:31 1.22
+++ src/sysfile.h 2006/05/06 08:04:02
@@ -467,6 +467,7 @@
#define SEPCHAR ';'
#define DEFAULT_DIRECTORY_SEP '\\'
+#ifdef emacs
DECLARE_INLINE_HEADER (Ibyte sysfile_get_directory_sep (void))
{
if (!CHARP (Vdirectory_sep_char)
@@ -484,6 +485,13 @@
}
#define DIRECTORY_SEP sysfile_get_directory_sep()
+#else /* emacs */
+
+/* The above Lisp variables are not available to make-docfile, etc. */
+#define DIRECTORY_SEP DEFAULT_DIRECTORY_SEP
+
+#endif /* emacs */
+
#else /* not WIN32_NATIVE */
#define SEPCHAR ':'
@@ -499,6 +507,8 @@
#define IS_DEVICE_SEP(c) ((c) == DEVICE_SEP)
+#ifdef emacs
+
DECLARE_INLINE_HEADER (int IS_DIRECTORY_SEP (Ichar c))
{
return (c == '/' || c == '\\');
@@ -508,6 +518,22 @@
{
return (c == '/' || c == '\\' || c == ':');
}
+
+#else /* emacs */
+
+/* The Ichar typedef is not available to make-docfile, etc. */
+
+DECLARE_INLINE_HEADER (int IS_DIRECTORY_SEP (int c))
+{
+ return (c == '/' || c == '\\');
+}
+
+DECLARE_INLINE_HEADER (int IS_ANY_SEP (int c))
+{
+ return (c == '/' || c == '\\' || c == ':');
+}
+
+#endif
#else /* not WIN32_ANY */
--
Aidan Kehoe,
http://www.parhasard.net/