commit: Autoconfiscate the recent fontconfig spelling change.
17 years
Aidan Kehoe
changeset: 4328:dfd878799ef0724973cd47b1bbfc3aa3db777fdc
tag: tip
user: Aidan Kehoe <kehoea(a)parhasard.net>
date: Fri Dec 14 14:25:04 2007 +0100
files: ChangeLog configure configure.ac src/ChangeLog src/config.h.in src/font-mgr.c src/font-mgr.h
description:
Autoconfiscate the recent fontconfig spelling change.
ChangeLog addition:
2007-12-12 Aidan Kehoe <kehoea(a)parhasard.net>
* configure.ac :
Check for FcConfigGetRescanInterval, FcConfigSetRescanInterval.
* configure :
Rebuild.
src/ChangeLog additon:
2007-12-12 Aidan Kehoe <kehoea(a)parhasard.net>
* config.h.in:
Make the results of the checks for
FcConfigGetRescanInterval, FcConfigSetRescanInterval
available.
* font-mgr.h:
If FcConfigSetRescanInterval and FcConfigGetRescanInterval are not
available as functions, #define them to map to their old
misspelled names.
* font-mgr.c (Ffc_config_get_rescan_interval):
* font-mgr.c (Ffc_config_set_rescan_interval):
Use the correct spelling in
FcConfigGetRescanInterval, FcConfigSetRescanInterval
diff -r 466ad8ad5f136d806a71190b582f6c0eda0ecdf5 -r dfd878799ef0724973cd47b1bbfc3aa3db777fdc ChangeLog
--- a/ChangeLog Fri Dec 14 14:13:02 2007 +0100
+++ b/ChangeLog Fri Dec 14 14:25:04 2007 +0100
@@ -1,3 +1,10 @@ 2007-08-27 Mike Sperber <mike(a)xemacs.o
+2007-12-12 Aidan Kehoe <kehoea(a)parhasard.net>
+
+ * configure.ac :
+ Check for FcConfigGetRescanInterval, FcConfigSetRescanInterval.
+ * configure :
+ Rebuild.
+
2007-08-27 Mike Sperber <mike(a)xemacs.org>
* configure.ac: Try to use pkg-config for finding Xft includes and
diff -r 466ad8ad5f136d806a71190b582f6c0eda0ecdf5 -r dfd878799ef0724973cd47b1bbfc3aa3db777fdc configure
--- a/configure Fri Dec 14 14:13:02 2007 +0100
+++ b/configure Fri Dec 14 14:25:04 2007 +0100
@@ -20123,6 +20123,195 @@ else
{ echo "Error:" "Unable to find libXft for --with-xft" >&2; exit 1; }
fi
+
+
+for ac_func in FcConfigGetRescanInterval
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+{ echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
+if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined __stub_$ac_func || defined __stub___$ac_func
+choke me
+#endif
+
+int
+main ()
+{
+return $ac_func ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ eval "$as_ac_var=no"
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+ac_res=`eval echo '${'$as_ac_var'}'`
+ { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+
+for ac_func in FcConfigSetRescanInterval
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+{ echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
+if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined __stub_$ac_func || defined __stub___$ac_func
+choke me
+#endif
+
+int
+main ()
+{
+return $ac_func ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ eval "$as_ac_var=no"
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+ac_res=`eval echo '${'$as_ac_var'}'`
+ { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
with_fontconfig=yes
cat >>confdefs.h <<\_ACEOF
#define HAVE_FONTCONFIG 1
diff -r 466ad8ad5f136d806a71190b582f6c0eda0ecdf5 -r dfd878799ef0724973cd47b1bbfc3aa3db777fdc configure.ac
--- a/configure.ac Fri Dec 14 14:13:02 2007 +0100
+++ b/configure.ac Fri Dec 14 14:25:04 2007 +0100
@@ -3532,6 +3532,9 @@ extern Bool XRegisterIMInstantiateCallba
[XE_DIE(["Unable to find libfontconfig for --with-xft"])])
AC_CHECK_LIB(Xft, XftFontOpen, XE_PREPEND(-lXft, libs_x),
[XE_DIE(["Unable to find libXft for --with-xft"])])
+
+ AC_CHECK_FUNCS(FcConfigGetRescanInterval)
+ AC_CHECK_FUNCS(FcConfigSetRescanInterval)
dnl #### detect fontconfig properly!!!!
with_fontconfig=yes
AC_DEFINE(HAVE_FONTCONFIG)
diff -r 466ad8ad5f136d806a71190b582f6c0eda0ecdf5 -r dfd878799ef0724973cd47b1bbfc3aa3db777fdc src/ChangeLog
--- a/src/ChangeLog Fri Dec 14 14:13:02 2007 +0100
+++ b/src/ChangeLog Fri Dec 14 14:25:04 2007 +0100
@@ -1,3 +1,18 @@ 2007-12-11 Aidan Kehoe <kehoea@parhasa
+2007-12-12 Aidan Kehoe <kehoea(a)parhasard.net>
+
+ * config.h.in:
+ Make the results of the checks for
+ FcConfigGetRescanInterval, FcConfigSetRescanInterval
+ available.
+ * font-mgr.h:
+ If FcConfigSetRescanInterval and FcConfigGetRescanInterval are not
+ available as functions, #define them to map to their old
+ misspelled names.
+ * font-mgr.c (Ffc_config_get_rescan_interval):
+ * font-mgr.c (Ffc_config_set_rescan_interval):
+ Use the correct spelling in
+ FcConfigGetRescanInterval, FcConfigSetRescanInterval
+
2007-12-11 Aidan Kehoe <kehoea(a)parhasard.net>
* glyphs-eimage.c:
diff -r 466ad8ad5f136d806a71190b582f6c0eda0ecdf5 -r dfd878799ef0724973cd47b1bbfc3aa3db777fdc src/config.h.in
--- a/src/config.h.in Fri Dec 14 14:13:02 2007 +0100
+++ b/src/config.h.in Fri Dec 14 14:25:04 2007 +0100
@@ -208,6 +208,14 @@ things are arranged in config.h.in. In
/* Compile with support for fontconfig? */
#undef HAVE_FONTCONFIG
+
+/* Was the spelling of FcConfigGetRescanInterval corrected in this
+ fontconfig version? */
+#undef HAVE_FCCONFIGGETRESCANINTERVAL
+
+/* Was the spelling of FcConfigSetRescanInterval corrected in this
+ fontconfig version? */
+#undef HAVE_FCCONFIGSETRESCANINTERVAL
/* Compile with support for Xft? */
#undef USE_XFT
diff -r 466ad8ad5f136d806a71190b582f6c0eda0ecdf5 -r dfd878799ef0724973cd47b1bbfc3aa3db777fdc src/font-mgr.c
--- a/src/font-mgr.c Fri Dec 14 14:13:02 2007 +0100
+++ b/src/font-mgr.c Fri Dec 14 14:25:04 2007 +0100
@@ -898,10 +898,8 @@ XEmacs: should convert to a chartable.
intern ("fc-config-get-blanks"));
}
-/* The misspelling in the fontconfig function name accurately corresponds to
- the version of fontconfig.h I had on 2007-04-13. -- sjt */
DEFUN("fc-config-get-rescan-interval", Ffc_config_get_rescan_interval, 1, 1, 0, /*
- -- Function: int FcConfigGetRescanInverval (FcConfig *config)
+ -- Function: int FcConfigGetRescanInterval (FcConfig *config)
Returns the interval between automatic checks of the configuration
(in seconds) specified in 'config'. The configuration is checked
during a call to FcFontList when this interval has passed since
@@ -909,13 +907,11 @@ DEFUN("fc-config-get-rescan-interval", F
(config))
{
CHECK_FCCONFIG (config);
- return make_int (FcConfigGetRescanInverval (XFCCONFIG_PTR (config)));
-}
-
-/* The misspelling in the fontconfig function name accurately corresponds to
- the version of fontconfig.h I had on 2007-04-13. -- sjt */
+ return make_int (FcConfigGetRescanInterval (XFCCONFIG_PTR (config)));
+}
+
DEFUN("fc-config-set-rescan-interval", Ffc_config_set_rescan_interval, 2, 2, 0, /*
- -- Function: FcBool FcConfigSetRescanInverval (FcConfig *config, int
+ -- Function: FcBool FcConfigSetRescanInterval (FcConfig *config, int
rescanInterval)
Sets the rescan interval; returns FcFalse if an error occurred.
XEmacs: signal such error, or return nil on success. */
@@ -923,7 +919,7 @@ DEFUN("fc-config-set-rescan-interval", F
{
CHECK_FCCONFIG (config);
CHECK_INT (rescan_interval);
- if (FcConfigSetRescanInverval (XFCCONFIG_PTR (config),
+ if (FcConfigSetRescanInterval (XFCCONFIG_PTR (config),
XINT (rescan_interval)) == FcFalse)
signal_error (Qio_error, "FcConfigSetRescanInverval barfed",
intern ("fc-config-set-rescan-interval"));
diff -r 466ad8ad5f136d806a71190b582f6c0eda0ecdf5 -r dfd878799ef0724973cd47b1bbfc3aa3db777fdc src/font-mgr.h
--- a/src/font-mgr.h Fri Dec 14 14:13:02 2007 +0100
+++ b/src/font-mgr.h Fri Dec 14 14:25:04 2007 +0100
@@ -90,6 +90,17 @@ DECLARE_LRECORD(fc_config, struct fc_con
#endif /* FONTCONFIG_EXPOSE_CONFIG */
#ifdef USE_XFT
+
+#ifndef HAVE_FCCONFIGGETRESCANINTERVAL
+/* Older fontconfig versions misspell this function name. */
+#define FcConfigGetRescanInterval FcConfigGetRescanInverval
+#endif /* */
+
+#ifndef HAVE_FCCONFIGSETRESCANINTERVAL
+/* Older fontconfig versions misspell this function name. */
+#define FcConfigSetRescanInterval FcConfigSetRescanInverval
+#endif /* */
+
/*
The format of a fontname (as returned by fontconfig) is not well-documented,
But the character repertoire is represented in an ASCII-compatible way. See
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches
commit: Fix a #'setenv bug, merge other changes from GNU's env.el.
17 years
Aidan Kehoe
changeset: 4327:466ad8ad5f136d806a71190b582f6c0eda0ecdf5
tag: tip
user: Aidan Kehoe <kehoea(a)parhasard.net>
date: Fri Dec 14 14:13:02 2007 +0100
files: lisp/ChangeLog lisp/process.el
description:
Fix a #'setenv bug, merge other changes from GNU's env.el.
2007-12-14 Aidan Kehoe <kehoea(a)parhasard.net>
* process.el (substitute-env-vars):
Merge an example from GNU's docstring.
* process.el (setenv):
Pass nil as the default abbrev table to the #'read-from-minibuffer
call, instead of passing the current value of the variable. Bug
introduced by an incorrect sync from GNU by Ben; reported by
Thomas Mittelstaedt in 47626712.40609(a)cadenas.de.
Document the #'set-time-zone-rule call when TZ is set. Push the
old value on to the beginning of setenv-history. (Both merged from
GNU.) Document that we don't do the coding-system frobbing at this
level that GNU does.
Provide a commented-out, sample implementation of GNU's
#'environment; document why I think we shouldn't include it.
diff -r a5ff7e67ac1b2d4db44559970e77bf9391453b79 -r 466ad8ad5f136d806a71190b582f6c0eda0ecdf5 lisp/ChangeLog
--- a/lisp/ChangeLog Wed Dec 12 00:42:48 2007 +0100
+++ b/lisp/ChangeLog Fri Dec 14 14:13:02 2007 +0100
@@ -1,3 +1,21 @@ 2007-12-11 Aidan Kehoe <kehoea@parhasa
+2007-12-14 Aidan Kehoe <kehoea(a)parhasard.net>
+
+ * process.el (substitute-env-vars):
+ Merge an example from GNU's docstring.
+ * process.el (setenv):
+ Pass nil as the default abbrev table to the #'read-from-minibuffer
+ call, instead of passing the current value of the variable. Bug
+ introduced by an incorrect sync from GNU by Ben; reported by
+ Thomas Mittelstaedt in 47626712.40609(a)cadenas.de.
+
+ Document the #'set-time-zone-rule call when TZ is set. Push the
+ old value on to the beginning of setenv-history. (Both merged from
+ GNU.) Document that we don't do the coding-system frobbing at this
+ level that GNU does.
+
+ Provide a commented-out, sample implementation of GNU's
+ #'environment; document why I think we shouldn't include it.
+
2007-12-11 Aidan Kehoe <kehoea(a)parhasard.net>
* mule/latin.el :
diff -r a5ff7e67ac1b2d4db44559970e77bf9391453b79 -r 466ad8ad5f136d806a71190b582f6c0eda0ecdf5 lisp/process.el
--- a/lisp/process.el Wed Dec 12 00:42:48 2007 +0100
+++ b/lisp/process.el Fri Dec 14 14:13:02 2007 +0100
@@ -25,7 +25,7 @@
;; Boston, MA 02111-1307, USA.
;;; Synched up with: FSF 19.30, except for setenv/getenv (synched with FSF
-;;; 21.0.105).
+;;; 21.2.1).
;;; Authorship:
@@ -542,8 +542,10 @@ If it is also not t, RET does not exit i
`$FOO' where FOO is an environment variable name means to substitute
the value of that variable. The variable name should be terminated
with a character not a letter, digit or underscore; otherwise, enclose
-the entire variable name in braces. Use `$$' to insert a single
-dollar sign."
+the entire variable name in braces. For instance, in `ab$cd-x',
+`$cd' is treated as an environment variable.
+
+Use `$$' to insert a single dollar sign."
(let ((start 0))
(while (string-match
;; XEmacs change - FSF use their rx macro to generate this regexp
@@ -575,19 +577,40 @@ Interactively, the current value (if any
Interactively, the current value (if any) of the variable
appears at the front of the history list when you type in the new value.
-This function works by modifying `process-environment'."
+This function works by modifying `process-environment'.
+
+As a special case, setting variable `TZ' calls `set-time-zone-rule' as
+a side-effect."
(interactive
(if current-prefix-arg
(list (read-envvar-name "Clear environment variable: " 'exact) nil t)
- (let ((var (read-envvar-name "Set environment variable: " nil)))
+ (let* ((var (read-envvar-name "Set environment variable: " nil))
+ (value (getenv var)))
+ (when value
+ (push value setenv-history))
;; Here finally we specify the args to call setenv with.
(list var (read-from-minibuffer (format "Set %s to value: " var)
nil nil nil 'setenv-history
- (getenv var))))))
+ ;; XEmacs change; don't specify a
+ ;; default. (Nor an abbrev table.)
+ )))))
(if unset
(setq value nil)
(if substitute-env-vars
(setq value (substitute-env-vars value))))
+
+ ;; GNU fuck around with coding systems here. We do it at a much lower
+ ;; level; an equivalent of the following code of Handa's would be
+ ;; worthwhile here, though:
+
+; (let ((codings (find-coding-systems-string (concat variable value))))
+; (unless (or (eq 'undecided (car codings))
+; (memq (coding-system-base locale-coding-system) codings))
+; (error "Can't encode `%s=%s' with `locale-coding-system'"
+; variable (or value "")))))
+
+ ;; But then right now our find-coding-systems analogue is in packages.
+
(if (string-match "=" variable)
(error "Environment variable name `%s' contains `='" variable)
(let ((pattern (concat "\\`" (regexp-quote (concat variable "="))))
@@ -626,6 +649,25 @@ This function works by modifying `proces
; (message "%s" (if value value "Not set")))
; value))
+
+;; GNU have an #'environment function here, as of 2007-12-14. If someone
+;; actually uses it in the wild, this would suffice as an implementation:
+
+; (defun environment (&optional frame)
+; "Return a list of environment variables with their values.
+; Each entry in the list is a string of the form NAME=VALUE.
+;
+; Optional argument FRAME is ignored, for GNU compatibility.
+;
+; Non-ASCII characters look like Mojibake (that is, they are unreadable.)"
+; (loop
+; for entry in process-environment
+; collect (encode-coding-string entry 'native)))
+;
+
+;; but we shouldn't encourage that sort of ugliness and needless backwards
+;; incompatibility.
+
(provide 'env) ;; Yuck. Formerly the above were in env.el, which did this
;; provide.
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches
[PATCH] Autoconfiscate the recent fontconfig spelling correction
17 years
Aidan Kehoe
ChangeLog addition:
2007-12-12 Aidan Kehoe <kehoea(a)parhasard.net>
* configure.ac :
Check for FcConfigGetRescanInterval, FcConfigSetRescanInterval.
src/ChangeLog addition:
2007-12-12 Aidan Kehoe <kehoea(a)parhasard.net>
* config.h.in:
Make the results of the checks for
FcConfigGetRescanInterval, FcConfigSetRescanInterval
available.
* font-mgr.h:
If FcConfigSetRescanInterval and FcConfigGetRescanInterval are not
available as functions, #define them to map to their old
misspelled names.
* font-mgr.c (Ffc_config_get_rescan_interval):
* font-mgr.c (Ffc_config_set_rescan_interval):
Use the correct spelling in
FcConfigGetRescanInterval, FcConfigSetRescanInterval
XEmacs Trunk source patch:
Diff command: cvs -q diff -u
Files affected: src/font-mgr.c
===================================================================
RCS src/config.h.in
===================================================================
RCS src/font-mgr.h
===================================================================
RCS configure.ac
===================================================================
RCS
Index: configure.ac
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/configure.ac,v
retrieving revision 1.62
diff -u -r1.62 configure.ac
--- configure.ac 2007/08/29 06:19:54 1.62
+++ configure.ac 2007/12/12 10:33:19
@@ -3532,6 +3532,9 @@
[XE_DIE(["Unable to find libfontconfig for --with-xft"])])
AC_CHECK_LIB(Xft, XftFontOpen, XE_PREPEND(-lXft, libs_x),
[XE_DIE(["Unable to find libXft for --with-xft"])])
+
+ AC_CHECK_FUNCS(FcConfigGetRescanInterval)
+ AC_CHECK_FUNCS(FcConfigSetRescanInterval)
dnl #### detect fontconfig properly!!!!
with_fontconfig=yes
AC_DEFINE(HAVE_FONTCONFIG)
Index: src/font-mgr.h
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/font-mgr.h,v
retrieving revision 1.6
diff -u -r1.6 font-mgr.h
--- src/font-mgr.h 2007/04/30 16:46:36 1.6
+++ src/font-mgr.h 2007/12/12 10:33:19
@@ -90,6 +90,17 @@
#endif /* FONTCONFIG_EXPOSE_CONFIG */
#ifdef USE_XFT
+
+#ifndef HAVE_FCCONFIGGETRESCANINTERVAL
+/* Older fontconfig versions misspell this function name. */
+#define FcConfigGetRescanInterval FcConfigGetRescanInverval
+#endif /* */
+
+#ifndef HAVE_FCCONFIGSETRESCANINTERVAL
+/* Older fontconfig versions misspell this function name. */
+#define FcConfigSetRescanInterval FcConfigSetRescanInverval
+#endif /* */
+
/*
The format of a fontname (as returned by fontconfig) is not well-documented,
But the character repertoire is represented in an ASCII-compatible way. See
Index: src/config.h.in
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/config.h.in,v
retrieving revision 1.112
diff -u -r1.112 config.h.in
--- src/config.h.in 2007/05/17 15:42:48 1.112
+++ src/config.h.in 2007/12/12 10:33:20
@@ -209,6 +209,14 @@
/* Compile with support for fontconfig? */
#undef HAVE_FONTCONFIG
+/* Was the spelling of FcConfigGetRescanInterval corrected in this
+ fontconfig version? */
+#undef HAVE_FCCONFIGGETRESCANINTERVAL
+
+/* Was the spelling of FcConfigSetRescanInterval corrected in this
+ fontconfig version? */
+#undef HAVE_FCCONFIGSETRESCANINTERVAL
+
/* Compile with support for Xft? */
#undef USE_XFT
/* Per-widget stuff will go away? */
Index: src/font-mgr.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/font-mgr.c,v
retrieving revision 1.7
diff -u -r1.7 font-mgr.c
--- src/font-mgr.c 2007/05/01 14:22:38 1.7
+++ src/font-mgr.c 2007/12/12 10:33:20
@@ -898,10 +898,8 @@
intern ("fc-config-get-blanks"));
}
-/* The misspelling in the fontconfig function name accurately corresponds to
- the version of fontconfig.h I had on 2007-04-13. -- sjt */
DEFUN("fc-config-get-rescan-interval", Ffc_config_get_rescan_interval, 1, 1, 0, /*
- -- Function: int FcConfigGetRescanInverval (FcConfig *config)
+ -- Function: int FcConfigGetRescanInterval (FcConfig *config)
Returns the interval between automatic checks of the configuration
(in seconds) specified in 'config'. The configuration is checked
during a call to FcFontList when this interval has passed since
@@ -909,13 +907,11 @@
(config))
{
CHECK_FCCONFIG (config);
- return make_int (FcConfigGetRescanInverval (XFCCONFIG_PTR (config)));
+ return make_int (FcConfigGetRescanInterval (XFCCONFIG_PTR (config)));
}
-/* The misspelling in the fontconfig function name accurately corresponds to
- the version of fontconfig.h I had on 2007-04-13. -- sjt */
DEFUN("fc-config-set-rescan-interval", Ffc_config_set_rescan_interval, 2, 2, 0, /*
- -- Function: FcBool FcConfigSetRescanInverval (FcConfig *config, int
+ -- Function: FcBool FcConfigSetRescanInterval (FcConfig *config, int
rescanInterval)
Sets the rescan interval; returns FcFalse if an error occurred.
XEmacs: signal such error, or return nil on success. */
@@ -923,7 +919,7 @@
{
CHECK_FCCONFIG (config);
CHECK_INT (rescan_interval);
- if (FcConfigSetRescanInverval (XFCCONFIG_PTR (config),
+ if (FcConfigSetRescanInterval (XFCCONFIG_PTR (config),
XINT (rescan_interval)) == FcFalse)
signal_error (Qio_error, "FcConfigSetRescanInverval barfed",
intern ("fc-config-set-rescan-interval"));
--
¿Dónde estará ahora mi sobrino Yoghurtu Nghé, que tuvo que huir
precipitadamente de la aldea por culpa de la escasez de rinocerontes?
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches
commit: Don't let libtiff override the size of a boolean, Win32. From Ron Isaacson.
17 years
Aidan Kehoe
changeset: 4326:a5ff7e67ac1b2d4db44559970e77bf9391453b79
tag: tip
user: Aidan Kehoe <kehoea(a)parhasard.net>
date: Wed Dec 12 00:42:48 2007 +0100
files: src/ChangeLog src/glyphs-eimage.c
description:
Don't let libtiff override the size of a boolean, Win32. From Ron Isaacson.
2007-12-11 Aidan Kehoe <kehoea(a)parhasard.net>
* glyphs-eimage.c:
Merge Ron Isaacson's patch of
3ggprxj7ifh.wl_Ron.Isaacson(a)morganstanley.com , originally from
Gennady Khokhorin. Prevents library incompatibilities on Win32.
diff -r 948c9b232595f4a24f2982bf072432030810a0a5 -r a5ff7e67ac1b2d4db44559970e77bf9391453b79 src/ChangeLog
--- a/src/ChangeLog Tue Dec 11 21:56:18 2007 +0100
+++ b/src/ChangeLog Wed Dec 12 00:42:48 2007 +0100
@@ -1,3 +1,10 @@ 2007-12-11 Aidan Kehoe <kehoea@parhasa
+2007-12-11 Aidan Kehoe <kehoea(a)parhasard.net>
+
+ * glyphs-eimage.c:
+ Merge Ron Isaacson's patch of
+ 3ggprxj7ifh.wl_Ron.Isaacson(a)morganstanley.com , originally from
+ Gennady Khokhorin. Prevents library incompatibilities on Win32.
+
2007-12-11 Aidan Kehoe <kehoea(a)parhasard.net>
* fileio.c (Fsubstitute_in_file_name):
diff -r 948c9b232595f4a24f2982bf072432030810a0a5 -r a5ff7e67ac1b2d4db44559970e77bf9391453b79 src/glyphs-eimage.c
--- a/src/glyphs-eimage.c Tue Dec 11 21:56:18 2007 +0100
+++ b/src/glyphs-eimage.c Wed Dec 12 00:42:48 2007 +0100
@@ -109,6 +109,14 @@ BEGIN_C_DECLS
#define XMD_H
typedef signed int INT32;
typedef signed short INT16;
+
+/* And another one... jmorecfg.h defines the 'boolean' type as int,
+ which conflicts with the standard Windows 'boolean' definition as
+ unsigned char. Ref: http://www.asmail.be/msg0054688232.html */
+#ifndef __RPCNDR_H__ /* don't conflict if rpcndr.h already read */
+typedef unsigned char boolean;
+#endif
+#define HAVE_BOOLEAN /* prevent jmorecfg.h from redefining it */
#endif
#include <jpeglib.h>
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches
commit: Avoid an error when clicking on Help -> Tutorials
17 years
Aidan Kehoe
changeset: 4325:948c9b232595f4a24f2982bf072432030810a0a5
tag: tip
user: Aidan Kehoe <kehoea(a)parhasard.net>
date: Tue Dec 11 21:56:18 2007 +0100
files: lisp/ChangeLog lisp/mule/latin.el
description:
Avoid an error when clicking on Help -> Tutorials
APPROVE COMMIT
This is the patch of 18270.32449.777332.204409(a)parhasard.net , with slightly
different line numbers.
lisp/ChangeLog addition:
2007-12-11 Aidan Kehoe <kehoea(a)parhasard.net>
* mule/latin.el :
Specify tutorial-coding-system using dotted cons notation, since
it's not a list. Prevents an error in help-with-tutorial for these
languages.
diff -r 5e526366d5332103a24a7af2fd0bb0c8a773e3b6 -r 948c9b232595f4a24f2982bf072432030810a0a5 lisp/ChangeLog
--- a/lisp/ChangeLog Tue Dec 11 21:50:22 2007 +0100
+++ b/lisp/ChangeLog Tue Dec 11 21:56:18 2007 +0100
@@ -1,3 +1,10 @@ 2007-12-09 Aidan Kehoe <kehoea@parhasa
+2007-12-11 Aidan Kehoe <kehoea(a)parhasard.net>
+
+ * mule/latin.el :
+ Specify tutorial-coding-system using dotted cons notation, since
+ it's not a list. Prevents an error in help-with-tutorial for these
+ languages.
+
2007-12-09 Aidan Kehoe <kehoea(a)parhasard.net>
* abbrev.el (write-abbrev-file):
diff -r 5e526366d5332103a24a7af2fd0bb0c8a773e3b6 -r 948c9b232595f4a24f2982bf072432030810a0a5 lisp/mule/latin.el
--- a/lisp/mule/latin.el Tue Dec 11 21:50:22 2007 +0100
+++ b/lisp/mule/latin.el Tue Dec 11 21:56:18 2007 +0100
@@ -907,7 +907,7 @@ Generic language environment for %s (%s)
(native-coding-system ,codesys)
,@(if locale `((locale . ,locale)))
,@(if tutorial `((tutorial . ,tutorial)
- (tutorial-coding-system ,codesys)))
+ (tutorial-coding-system . ,codesys)))
,@(if sample-text `((sample-text . ,sample-text)))
(input-method . ,(or input-method default-input))
(documentation . ,(format "\
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches
commit: Don't error on unknown environment variables, #'substitute-in-file-name.
17 years
Aidan Kehoe
changeset: 4324:5e526366d5332103a24a7af2fd0bb0c8a773e3b6
tag: tip
user: Aidan Kehoe <kehoea(a)parhasard.net>
date: Tue Dec 11 21:50:22 2007 +0100
files: src/ChangeLog src/fileio.c tests/ChangeLog tests/automated/syntax-tests.el
description:
Don't error on unknown environment variables, #'substitute-in-file-name.
SUPERSEDES 18270.47509.666061.606519(a)parhasard.net
APPROVE COMMIT
src/fileio.c addition:
2007-12-11 Aidan Kehoe <kehoea(a)parhasard.net>
* fileio.c (Fsubstitute_in_file_name):
On encountering non-existent environment variables or incorrect
syntax for specifying environment variables (as is routine on
Windows) don't error, instead pass the original strings through.
tests/ChangeLog addition:
2007-12-11 Aidan Kehoe <kehoea(a)parhasard.net>
* automated/syntax-tests.el:
Check that substitute-in-file-name doesn't error when handed
non-existing environment variables, passing through the specified
string instead. Also check that existing environment variables are
correctly substituted. Also check that double slashes in the
middle of a path name are treated as re-starting the path.
diff -r 94509abd0ef06178d898dd2af041c96eb3c5436e -r 5e526366d5332103a24a7af2fd0bb0c8a773e3b6 src/ChangeLog
--- a/src/ChangeLog Tue Dec 11 21:41:54 2007 +0100
+++ b/src/ChangeLog Tue Dec 11 21:50:22 2007 +0100
@@ -1,3 +1,10 @@ 2007-12-05 Stephen J. Turnbull <stephe
+2007-12-11 Aidan Kehoe <kehoea(a)parhasard.net>
+
+ * fileio.c (Fsubstitute_in_file_name):
+ On encountering non-existent environment variables or incorrect
+ syntax for specifying environment variables (as is routine on
+ Windows) don't error, instead pass the original strings through.
+
2007-12-05 Stephen J. Turnbull <stephen(a)xemacs.org>
* search.c (simple_search): Fix underrun in reverse search.
diff -r 94509abd0ef06178d898dd2af041c96eb3c5436e -r 5e526366d5332103a24a7af2fd0bb0c8a773e3b6 src/fileio.c
--- a/src/fileio.c Tue Dec 11 21:41:54 2007 +0100
+++ b/src/fileio.c Tue Dec 11 21:50:22 2007 +0100
@@ -1518,10 +1518,10 @@ If `/~' appears, all of FILENAME through
/* This function can GC. GC checked 2000-07-28 ben. */
Ibyte *nm;
- Ibyte *s, *p, *o, *x, *endp;
+ Ibyte *s, *p, *o, *x, *endp, *got;
Ibyte *target = 0;
int total = 0;
- int substituted = 0;
+ int substituted = 0, seen_braces;
Ibyte *xnm;
Lisp_Object handler;
@@ -1576,7 +1576,10 @@ If `/~' appears, all of FILENAME through
{
p++;
if (p == endp)
- goto badsubst;
+ {
+ /* No substitution, no error. */
+ break;
+ }
else if (*p == '$')
{
/* "$$" means a single "$" */
@@ -1589,7 +1592,12 @@ If `/~' appears, all of FILENAME through
{
o = ++p;
while (p != endp && *p != '}') p++;
- if (*p != '}') goto missingclose;
+ if (*p != '}')
+ {
+ /* No substitution, no error. Keep looking. */
+ p = o;
+ continue;
+ }
s = p;
}
else
@@ -1608,10 +1616,12 @@ If `/~' appears, all of FILENAME through
#endif /* WIN32_NATIVE */
/* Get variable value */
- o = egetenv ((CIbyte *) target);
- if (!o) goto badvar;
- total += qxestrlen (o);
- substituted = 1;
+ got = egetenv ((CIbyte *) target);
+ if (got)
+ {
+ total += qxestrlen (got);
+ substituted = 1;
+ }
}
if (!substituted)
@@ -1629,8 +1639,12 @@ If `/~' appears, all of FILENAME through
else
{
p++;
+ seen_braces = 0;
if (p == endp)
- goto badsubst;
+ {
+ *x++ = '$';
+ break;
+ }
else if (*p == '$')
{
*x++ = *p++;
@@ -1638,9 +1652,16 @@ If `/~' appears, all of FILENAME through
}
else if (*p == '{')
{
+ seen_braces = 1;
o = ++p;
while (p != endp && *p != '}') p++;
- if (*p != '}') goto missingclose;
+ if (*p != '}')
+ {
+ /* Don't syntax error, don't substitute */
+ *x++ = '{';
+ p = o;
+ continue;
+ }
s = p++;
}
else
@@ -1659,12 +1680,30 @@ If `/~' appears, all of FILENAME through
#endif /* WIN32_NATIVE */
/* Get variable value */
- o = egetenv ((CIbyte *) target);
- if (!o)
- goto badvar;
-
- qxestrcpy (x, o);
- x += qxestrlen (o);
+ got = egetenv ((CIbyte *) target);
+ if (got)
+ {
+ qxestrcpy (x, got);
+ x += qxestrlen (got);
+ }
+ else
+ {
+ *x++ = '$';
+ if (seen_braces)
+ {
+ *x++ = '{';
+ /* Preserve the original case. */
+ qxestrncpy (x, o, s - o);
+ x += s - o;
+ *x++ = '}';
+ }
+ else
+ {
+ /* Preserve the original case. */
+ qxestrncpy (x, o, s - o);
+ x += s - o;
+ }
+ }
}
*x = 0;
@@ -1689,17 +1728,6 @@ If `/~' appears, all of FILENAME through
#endif
return make_string (xnm, x - xnm);
-
- badsubst:
- syntax_error ("Bad format environment-variable substitution", filename);
- missingclose:
- syntax_error ("Missing \"}\" in environment-variable substitution",
- filename);
- badvar:
- syntax_error_2 ("Substituting nonexistent environment variable",
- filename, build_intstring (target));
-
- RETURN_NOT_REACHED (Qnil);
}
/* A slightly faster and more convenient way to get
diff -r 94509abd0ef06178d898dd2af041c96eb3c5436e -r 5e526366d5332103a24a7af2fd0bb0c8a773e3b6 tests/ChangeLog
--- a/tests/ChangeLog Tue Dec 11 21:41:54 2007 +0100
+++ b/tests/ChangeLog Tue Dec 11 21:50:22 2007 +0100
@@ -1,3 +1,12 @@ 2007-12-10 Stephen J. Turnbull <stephe
+2007-12-11 Aidan Kehoe <kehoea(a)parhasard.net>
+
+ * automated/syntax-tests.el:
+ Check that substitute-in-file-name doesn't error when handed
+ non-existing environment variables, passing through the specified
+ string instead. Also check that existing environment variables are
+ correctly substituted. Also check that double slashes in the
+ middle of a path name are treated as re-starting the path.
+
2007-12-10 Stephen J. Turnbull <stephen(a)xemacs.org>
* reproduce-bugs.el (reproduce-bug): Add bug 10, crash in search.
diff -r 94509abd0ef06178d898dd2af041c96eb3c5436e -r 5e526366d5332103a24a7af2fd0bb0c8a773e3b6 tests/automated/syntax-tests.el
--- a/tests/automated/syntax-tests.el Tue Dec 11 21:41:54 2007 +0100
+++ b/tests/automated/syntax-tests.el Tue Dec 11 21:50:22 2007 +0100
@@ -205,3 +205,37 @@
;; special-case check that point didn't move
(Assert (= (point) 25))))
+(loop
+ with envvar-not-existing = (symbol-name (gensym "whatever"))
+ with envvar-existing = (symbol-name (gensym "whatever"))
+ with envvar-existing-val = (make-string #x10000 ?\xe1)
+ with examples =
+ (list (list (format "%chome%cwhatever%c%chi-there%c$%s"
+ directory-sep-char
+ directory-sep-char
+ directory-sep-char
+ directory-sep-char
+ directory-sep-char
+ envvar-existing)
+ (format "%chi-there%c%s"
+ directory-sep-char
+ directory-sep-char
+ envvar-existing-val))
+ (if (memq system-type '(windows-nt cygwin32))
+ '("//network-path/c$" "//network-path/c$")
+ '("/network-path/c$" "/network-path/c$"))
+ (list (format "/home/whoever/$%s" envvar-not-existing)
+ (format "/home/whoever/$%s" envvar-not-existing))
+ (list (format "/home/whoever/$%s" envvar-existing)
+ (format "/home/whoever/%s" envvar-existing-val))
+ (list (format "/home/whoever/${%s}" envvar-existing)
+ (format "/home/whoever/%s" envvar-existing-val))
+ (list (format "/home/whoever/${%s}" envvar-not-existing)
+ (format "/home/whoever/${%s}" envvar-not-existing)))
+ initially (progn (setenv envvar-not-existing nil t)
+ (setenv envvar-existing envvar-existing-val))
+ for (pre post)
+ in examples
+ do
+ (Assert (string= post (substitute-in-file-name pre))))
+
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches
commit: Commit a forgotten chunk of 4d0f773d5e21.
17 years
Aidan Kehoe
changeset: 4323:94509abd0ef06178d898dd2af041c96eb3c5436e
tag: tip
user: Aidan Kehoe <kehoea(a)parhasard.net>
date: Tue Dec 11 21:41:54 2007 +0100
files: tests/automated/test-harness.el
description:
Commit a forgotten chunk of 4d0f773d5e21.
This is the change to the file tests/automated/test-harness.el. See the
tests/ChangeLog of that commit,
http://mid.gmane.org/E1J1MtP-0000bo-Vw@alioth.debian.org for the details.
diff -r f70e56bb52a72781ed9382fda2826a6e1ad40f7d -r 94509abd0ef06178d898dd2af041c96eb3c5436e tests/automated/test-harness.el
--- a/tests/automated/test-harness.el Mon Dec 10 01:13:36 2007 -0800
+++ b/tests/automated/test-harness.el Tue Dec 11 21:41:54 2007 +0100
@@ -203,7 +203,29 @@ The output file's name is made by append
`(let ((test-harness-failure-tag "KNOWN BUG")
(test-harness-success-tag "PASS (FAILURE EXPECTED)"))
,@body))
-
+
+ (defmacro Known-Bug-Expect-Error (expected-error &rest body)
+ (let ((quoted-body (if (= 1 (length body))
+ `(quote ,(car body)) `(quote (progn ,@body)))))
+ `(let ((test-harness-failure-tag "KNOWN BUG")
+ (test-harness-success-tag "PASS (FAILURE EXPECTED)"))
+ (condition-case error-info
+ (progn
+ (setq trick-optimizer (progn ,@body))
+ (Print-Pass
+ "%S executed successfully, but expected error %S"
+ ,quoted-body
+ ',expected-error)
+ (incf passes))
+ (,expected-error
+ (Print-Failure "%S ==> error %S, as expected"
+ ,quoted-body ',expected-error)
+ (incf no-error-failures))
+ (error
+ (Print-Failure "%S ==> expected error %S, got error %S instead"
+ ,quoted-body ',expected-error error-info)
+ (incf wrong-error-failures))))))
+
(defmacro Implementation-Incomplete-Expect-Failure (&rest body)
`(let ((test-harness-failure-tag "IMPLEMENTATION INCOMPLETE")
(test-harness-success-tag "PASS (FAILURE EXPECTED)"))
@@ -337,7 +359,9 @@ BODY is a sequence of expressions and ma
;; #### Perhaps this should override `message' itself, too?
(defmacro Silence-Message (&rest body)
- `(flet ((append-message (&rest args) ())) ,@body))
+ `(flet ((append-message (&rest args) ())
+ (clear-message (&rest args) ()))
+ ,@body))
(defmacro Ignore-Ebola (&rest body)
`(let ((debug-issue-ebola-notices -42)) ,@body))
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches
[PATCH 21.4] Misc. cygwin fixes
17 years
Dr. Volker Zell
diff -urN origsrc/xemacs-21.4.21/src/ChangeLog src/xemacs-21.4.21/src/ChangeLog
--- origsrc/xemacs-21.4.21/src/ChangeLog 2007-10-08 03:21:29.000000000 +0200
+++ src/xemacs-21.4.21/src/ChangeLog 2007-12-04 23:37:14.974385600 +0100
@@ -1,3 +1,11 @@
+2007-11-29 Dr. Volker Zell <Dr.Volker.Zell(a)oracle.com>
+
+ * redisplay-msw.c (mswindows_text_width_single_run): #ifndef assertion
+ to fix a crash under Cygwin (Windows variant) when paging in Info buffer.
+
+ * sysdir.h: Revert workaround missing d_ino field from 'struct dirent'
+ for Cygwin as it's back in again.
+
2007-10-07 Vin Shelton <acs(a)xemacs.org>
* XEmacs 21.4.21 is released
diff -urN origsrc/xemacs-21.4.21/src/redisplay-msw.c src/xemacs-21.4.21/src/redisplay-msw.c
--- origsrc/xemacs-21.4.21/src/redisplay-msw.c 2006-07-04 15:14:14.000000000 +0200
+++ src/xemacs-21.4.21/src/redisplay-msw.c 2007-12-04 23:37:14.984400000 +0100
@@ -191,8 +191,15 @@
if (!fi->proportional_p || !hdc)
return (fi->width * run->len);
else
- {
+ {
+/* The 21.4.19 version of XEmacs doesn't has the Unicode support necessary to display
+ anything but ISO 8859-1 on Windows.
+ So commenting out the following assertion doesn't fix the problem but
+ it does prevent a crash when XEmacs tries to display Han characters
+*/
+#ifndef __CYGWIN__
assert(run->dimension == 1); /* #### FIXME! */
+#endif
mswindows_set_dc_font (hdc, font_inst,
cachel->underline, cachel->strikethru);
GetTextExtentPoint32 (hdc, run->ptr, run->len, &size);
@@ -560,7 +567,9 @@
}
}
+#ifndef __CYGWIN__
assert (runs[i].dimension == 1); /* #### FIXME: Broken when Mule? */
+#endif
ExtTextOut (hdc, xpos, dl->ypos,
NILP(bg_pmap) ? ETO_CLIPPED | ETO_OPAQUE : ETO_CLIPPED,
&rect, (char *) runs[i].ptr, runs[i].len, NULL);
diff -urN origsrc/xemacs-21.4.21/src/sysdir.h src/xemacs-21.4.21/src/sysdir.h
--- origsrc/xemacs-21.4.21/src/sysdir.h 2006-01-24 03:54:45.000000000 +0100
+++ src/xemacs-21.4.21/src/sysdir.h 2007-12-04 23:37:15.004428800 +0100
@@ -59,11 +59,7 @@
Since applying strlen to the name always works, we'll just do that. */
#define NAMLEN(p) strlen (p->d_name)
-#ifdef __CYGWIN__
-# define DIRENTRY_NONEMPTY(p) ((p)->d_name[0] != '\0')
-#else
# define DIRENTRY_NONEMPTY(p) ((p)->d_ino)
-#endif
/* encapsulation: directory calls */
Ciao
Volker
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches
[PATCH] Avoid syntax complaints in #'substitute-in-file-name
17 years
Aidan Kehoe
src/ChangeLog addition:
2007-12-11 Aidan Kehoe <kehoea(a)parhasard.net>
* fileio.c (Fsubstitute_in_file_name):
On encountering non-existent environment variables or incorrect
syntax for specifying environment variables (as is routine on
Windows) don't error, instead pass the original strings through.
XEmacs Trunk source patch:
Diff command: cvs -q diff -u
Files affected: src/fileio.c
===================================================================
RCS
Index: src/fileio.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/fileio.c,v
retrieving revision 1.113
diff -u -r1.113 fileio.c
--- src/fileio.c 2007/11/14 18:51:22 1.113
+++ src/fileio.c 2007/12/11 16:06:31
@@ -1518,10 +1518,10 @@
/* This function can GC. GC checked 2000-07-28 ben. */
Ibyte *nm;
- Ibyte *s, *p, *o, *x, *endp;
+ Ibyte *s, *p, *o, *x, *endp, *got;
Ibyte *target = 0;
int total = 0;
- int substituted = 0;
+ int substituted = 0, seen_braces;
Ibyte *xnm;
Lisp_Object handler;
@@ -1576,7 +1576,10 @@
{
p++;
if (p == endp)
- goto badsubst;
+ {
+ /* No substitution, no error. */
+ break;
+ }
else if (*p == '$')
{
/* "$$" means a single "$" */
@@ -1589,7 +1592,12 @@
{
o = ++p;
while (p != endp && *p != '}') p++;
- if (*p != '}') goto missingclose;
+ if (*p != '}')
+ {
+ /* No substitution, no error. Keep looking. */
+ p = o;
+ continue;
+ }
s = p;
}
else
@@ -1608,10 +1616,12 @@
#endif /* WIN32_NATIVE */
/* Get variable value */
- o = egetenv ((CIbyte *) target);
- if (!o) goto badvar;
- total += qxestrlen (o);
- substituted = 1;
+ got = egetenv ((CIbyte *) target);
+ if (got)
+ {
+ total += qxestrlen (got);
+ substituted = 1;
+ }
}
if (!substituted)
@@ -1629,8 +1639,12 @@
else
{
p++;
+ seen_braces = 0;
if (p == endp)
- goto badsubst;
+ {
+ *x++ = '$';
+ break;
+ }
else if (*p == '$')
{
*x++ = *p++;
@@ -1638,9 +1652,16 @@
}
else if (*p == '{')
{
+ seen_braces = 1;
o = ++p;
while (p != endp && *p != '}') p++;
- if (*p != '}') goto missingclose;
+ if (*p != '}')
+ {
+ /* Don't syntax error, don't substitute */
+ *x++ = '{';
+ p = o;
+ continue;
+ }
s = p++;
}
else
@@ -1659,12 +1680,28 @@
#endif /* WIN32_NATIVE */
/* Get variable value */
- o = egetenv ((CIbyte *) target);
- if (!o)
- goto badvar;
-
- qxestrcpy (x, o);
- x += qxestrlen (o);
+ got = egetenv ((CIbyte *) target);
+ if (got)
+ {
+ qxestrcpy (x, got);
+ x += qxestrlen (got);
+ }
+ else
+ {
+ *x++ = '$';
+ if (seen_braces)
+ {
+ *x++ = '{';
+ qxestrcpy (x, target);
+ x += qxestrlen (target);
+ *x++ = '}';
+ }
+ else
+ {
+ qxestrcpy (x, target);
+ x += qxestrlen (target);
+ }
+ }
}
*x = 0;
@@ -1689,17 +1726,6 @@
#endif
return make_string (xnm, x - xnm);
-
- badsubst:
- syntax_error ("Bad format environment-variable substitution", filename);
- missingclose:
- syntax_error ("Missing \"}\" in environment-variable substitution",
- filename);
- badvar:
- syntax_error_2 ("Substituting nonexistent environment variable",
- filename, build_intstring (target));
-
- RETURN_NOT_REACHED (Qnil);
}
/* A slightly faster and more convenient way to get
--
¿Dónde estará ahora mi sobrino Yoghurtu Nghé, que tuvo que huir
precipitadamente de la aldea por culpa de la escasez de rinocerontes?
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches
[PATCH] Avoid an error when clicking on Help -> Tutorials
17 years
Aidan Kehoe
lisp/ChangeLog addition:
2007-12-11 Aidan Kehoe <kehoea(a)parhasard.net>
* mule/latin.el :
Specify tutorial-coding-system using dotted cons notation, since
it's not a list. Prevents an error in help-with-tutorial for these
languages.
XEmacs Trunk source patch:
Diff command: cvs -q diff -u
Files affected: lisp/mule/latin.el
===================================================================
RCS
Index: lisp/mule/latin.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/lisp/mule/latin.el,v
retrieving revision 1.10
diff -u -r1.10 latin.el
--- lisp/mule/latin.el 2007/10/26 10:51:06 1.10
+++ lisp/mule/latin.el 2007/12/11 12:01:47
@@ -729,7 +729,7 @@
(native-coding-system ,codesys)
,@(if locale `((locale . ,locale)))
,@(if tutorial `((tutorial . ,tutorial)
- (tutorial-coding-system ,codesys)))
+ (tutorial-coding-system . ,codesys)))
,@(if sample-text `((sample-text . ,sample-text)))
(input-method . ,(or input-method default-input))
(documentation . ,(format "\
--
¿Dónde estará ahora mi sobrino Yoghurtu Nghé, que tuvo que huir
precipitadamente de la aldea por culpa de la escasez de rinocerontes?
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches