Unbreak the umlauts
10 years, 1 month
Michael Sperber
This patch ...
2014-10-18 Stephen J. Turnbull <stephen(a)xemacs.org>
* fontcolor-xlike-inc.c (xft_find_charset_font):
* fontcolor-x.c (x_font_instance_truename):
* font-mgr.c (Ffc_name_unparse):
Protect Ffc_name_unparse from FcNameUnparse crash on charset property.
... caused some breakage for me. In particular, the test whether a
particular font implements a charset would always fail. The reason is
that fc patterns passed as arguments are modified in place. This patch
fixes that.
I'll push on Monday if nobody objects.
2014-10-25 Michael Sperber <mike(a)xemacs.org>
* fontcolor-x.c (x_font_instance_truename):
* font-mgr.c (Ffc_name_unparse):
* font-mgr.h (PRINT_XFT_PATTERN): Don't modify
fontconfig pattern passed in in place.
--
Regards,
Mike
diff --git a/src/font-mgr.c b/src/font-mgr.c
--- a/src/font-mgr.c
+++ b/src/font-mgr.c
@@ -266,9 +266,12 @@
CHECK_FC_PATTERN (pattern);
/* #### Could use multiple values here to extract and return charset? */
- FcPatternDel (XFC_PATTERN_PTR (pattern), FC_CHARSET);
-
- name = FcNameUnparse (XFC_PATTERN_PTR (pattern));
+ {
+ FcPattern* temp = FcPatternDuplicate (XFC_PATTERN_PTR (pattern));
+ FcPatternDel (temp, FC_CHARSET);
+ name = FcNameUnparse (XFC_PATTERN_PTR (pattern));
+ FcPatternDestroy (temp);
+ }
result = build_fcapi_string (name);
xfree (name);
return result;
diff --git a/src/font-mgr.h b/src/font-mgr.h
--- a/src/font-mgr.h
+++ b/src/font-mgr.h
@@ -145,8 +145,10 @@
do { \
DECLARE_EISTRING (eistrpxft_name); \
Extbyte *name; \
- FcPatternDel(pattern, FC_CHARSET); \
- name = (Extbyte *) FcNameUnparse (pattern); \
+ FcPattern* temp = FcPatternDuplicate (pattern); \
+ FcPatternDel (temp, FC_CHARSET); \
+ name = (Extbyte *) FcNameUnparse (temp); \
+ FcPatternDestroy (temp); \
eicpy_ext(eistrpxft_name, \
name ? name : "FONT WITH NULL NAME", \
Qfc_font_name_encoding); \
diff --git a/src/fontcolor-x.c b/src/fontcolor-x.c
--- a/src/fontcolor-x.c
+++ b/src/fontcolor-x.c
@@ -763,8 +763,12 @@
"Xft font present but lacks pattern",
wrap_font_instance(f), Qfont, errb);
}
- FcPatternDel (pattern, FC_CHARSET); /* FcNameUnparse may choke */
- res = FcNameUnparse (pattern);
+ {
+ FcPattern* temp = FcPatternDuplicate (pattern);
+ FcPatternDel (temp, FC_CHARSET); /* FcNameUnparse may choke */
+ res = FcNameUnparse (temp);
+ FcPatternDestroy (temp);
+ }
if (res)
{
FONT_INSTANCE_TRUENAME (f) =
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://lists.xemacs.org/mailman/listinfo/xemacs-patches
[AC21.5] Patches for Native Windows Builds
10 years, 1 month
Vin Shelton
APPROVE COMMIT 21.5
On Thu, Nov 6, 2014 at 3:27 PM, Vin Shelton <acs(a)alumni.princeton.edu> wrote:
> Here are the patches necessary to build on Windows native, using VS6.
> Please note a couple of things:
>
> 1) no attempt is made to support TLS. This is the patch necessary to
> go on building w/o TLS.
> 2) I don't understand why the patch to sysdep.c is necessary, but
> without this, the call to ioctl yields an "undefined identifier" from
> VS6. The only changes made to sysdep.c between 21.5.34 (which doesn't
> need this commenting out) and now were hygenic changes made by Aidan.
> Something must have changed in a header file, but I don't know what.
I have committed this to the xemacs branch, and by mistake, to the
xemacs-beta branch. I think I should have let Stephen do that, no?
Jerry - please review my commit. I no longer include tls.h unless
some form of tls is specified.
If anyone has any thoughts on the sysdep issue, please don't hold back.
Regards,
Vin
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://lists.xemacs.org/mailman/listinfo/xemacs-patches
[AC] Make :package-version in customize right.
10 years, 1 month
Michael Sperber
Executive summary: I screwed up.
2014-11-10 Michael Sperber <mike(a)xemacs.org>
* custom.el (custom-add-package-version): The car of a
:package-version is a symbol, not a string.
--
Regards,
Mike
diff --git a/lisp/custom.el b/lisp/custom.el
--- a/lisp/custom.el
+++ b/lisp/custom.el
@@ -523,9 +523,9 @@
(defun custom-add-package-version (symbol version)
"To the custom option SYMBOL add the package version VERSION."
(unless (and (consp version)
- (stringp (car version))
+ (symbolp (car version))
(stringp (cdr version)))
- (error "Invalid package version `%s'" value))
+ (error "Invalid package version `%s'" version))
(put symbol 'custom-package-version version))
(defun custom-add-load (symbol load)
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://lists.xemacs.org/mailman/listinfo/xemacs-patches
[P21.5] Patches for Native Windows Builds
10 years, 1 month
Vin Shelton
Here are the patches necessary to build on Windows native, using VS6.
Please note a couple of things:
1) no attempt is made to support TLS. This is the patch necessary to
go on building w/o TLS.
2) I don't understand why the patch to sysdep.c is necessary, but
without this, the call to ioctl yields an "undefined identifier" from
VS6. The only changes made to sysdep.c between 21.5.34 (which doesn't
need this commenting out) and now were hygenic changes made by Aidan.
Something must have changed in a header file, but I don't know what.
- Vin
diff -r 5d5aeb79edb4 nt/ChangeLog
--- a/nt/ChangeLog Thu Nov 06 09:34:06 2014 -0700
+++ b/nt/ChangeLog Thu Nov 06 13:05:06 2014 -0500
@@ -0,0 +1,5 @@
+2014-11-06 Vin Shelton <acs(a)xemacs.org>
+
+ * xemacs.mak (TEXINFO_SRCS): XEmacs sources no longer include
+ texinfo.texi.
+
diff -r 5d5aeb79edb4 src/ChangeLog
--- a/src/ChangeLog Thu Nov 06 09:34:06 2014 -0700
+++ b/src/ChangeLog Thu Nov 06 13:05:06 2014 -0500
@@ -0,0 +1,7 @@
+2014-11-06 Vin Shelton <acs(a)xemacs.org>
+
+ * sysdep.c (set_descriptor_non_blocking): Don't call ioctl() on
+ Windows native builds.
+ * emacs.c (main_1): Conditionalize tls variables and initialization.
+ * number.h: Elide Visual Studio warnings on NUMBER_TYPES expansion.
+
diff -r 5d5aeb79edb4 nt/xemacs.mak
--- a/nt/xemacs.mak Thu Nov 06 09:34:06 2014 -0700
+++ b/nt/xemacs.mak Thu Nov 06 13:05:13 2014 -0500
@@ -1495,7 +1495,6 @@
$(INFODIR)\new-users-guide.info \
$(INFODIR)\standards.info \
$(INFODIR)\termcap.info \
- $(INFODIR)\texinfo.info \
$(INFODIR)\widget.info \
$(INFODIR)\xemacs-faq.info \
$(INFODIR)\xemacs.info
@@ -1631,14 +1630,6 @@
$(MANDIR)\new-users-guide\region.texi \
$(MANDIR)\new-users-guide\search.texi \
$(MANDIR)\new-users-guide\xmenu.texi
-
-TEXINFO_SRCS = \
- $(MANDIR)\texinfo\texinfo.texi \
- $(MANDIR)\texinfo\version.texi
-
-$(INFODIR)\texinfo.info: $(TEXINFO_SRCS)
- cd $(MANDIR)\texinfo
- $(MAKEINFO) texinfo.texi
$(INFODIR)\xemacs.info: $(XEMACS_SRCS)
cd $(MANDIR)\xemacs
diff -r 5d5aeb79edb4 src/emacs.c
--- a/src/emacs.c Thu Nov 06 09:34:06 2014 -0700
+++ b/src/emacs.c Thu Nov 06 13:05:13 2014 -0500
@@ -1606,7 +1606,9 @@
syms_of_scrollbar ();
#endif
syms_of_text ();
+#ifdef WITH_TLS
syms_of_tls ();
+#endif
#ifdef HAVE_TOOLBARS
syms_of_toolbar ();
#endif
@@ -2217,7 +2219,9 @@
vars_of_symbols ();
vars_of_syntax ();
vars_of_text ();
+#ifdef WITH_TLS
vars_of_tls ();
+#endif
#ifdef HAVE_TOOLBARS
vars_of_toolbar ();
#endif
@@ -2680,8 +2684,10 @@
init_device_tty ();
#endif
init_console_stream (restart); /* Create the first console */
+#ifdef WITH_TLS
if (initialized && !restart)
init_tls ();
+#endif
/* try to get the actual pathname of the exec file we are running */
if (!restart)
diff -r 5d5aeb79edb4 src/number.h
--- a/src/number.h Thu Nov 06 09:34:06 2014 -0700
+++ b/src/number.h Thu Nov 06 13:05:13 2014 -0500
@@ -376,9 +376,21 @@
#define NUMBER_TYPES(prefix) prefix##FIXNUM_T, prefix##BIGNUM_T, \
prefix##RATIO_T, prefix##FLOAT_T, prefix##BIGFLOAT_T
+#ifdef _MSC_VER
+/* Disable warning 4003:
+ * warning C4003: not enough actual parameters for macro 'NUMBER_TYPES'
+ */
+#pragma warning( push )
+#pragma warning( disable : 4003)
+#endif
+
enum number_type { NUMBER_TYPES() };
enum lazy_number_type { NUMBER_TYPES(LAZY_), LAZY_MARKER_T };
+#ifdef _MSC_VER
+#pragma warning( pop )
+#endif
+
#undef NUMBER_TYPES
extern enum number_type get_number_type (Lisp_Object);
diff -r 5d5aeb79edb4 src/sysdep.c
--- a/src/sysdep.c Thu Nov 06 09:34:06 2014 -0700
+++ b/src/sysdep.c Thu Nov 06 13:05:13 2014 -0500
@@ -188,11 +188,13 @@
lowry(a)watson.ibm.com (Andy Lowry). */
/* #### Should this be conditionalized on FIONBIO? */
#if defined (STRIDE) || (defined (pfa) && defined (HAVE_PTYS)) || defined (AIX)
+#if !defined(WIN32_NATIVE)
{
int one = 1;
ioctl (fd, FIONBIO, &one);
}
#endif
+#endif
#ifdef F_SETFL
fcntl (fd, F_SETFL, O_NONBLOCK);
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://lists.xemacs.org/mailman/listinfo/xemacs-patches
[AC 21.5] Fix build with g++
10 years, 1 month
Jerry James
APPROVE COMMIT 21.5
On Wed, Nov 5, 2014 at 3:51 PM, Jerry James <james(a)xemacs.org> wrote:
> This patch fixes a collection of miscellaneous problems that break the
> build with g++ 4.8.3. Thanks to Mats for pointing out two of the
> problems. I think the contents of this patch are fairly
> straightforward, with the exception of the changes to XSTRING_LENGTH
> and XSTRING_DATA. Before I made those changes, g++ 4.8.3 complained
> about a possibly uninitialized anonymous value in both alloc.c and
> fileio.c. I looked briefly at the code, thought it looked okay and
> that g++ must have lost its marbles, and continued on. Then, after
> building temacs, it segfaulted while loading lisp, at the exact line
> in fileio.c where one of the warnings was issued. More digging showed
> that g++ was creating anonymous temporaries, and not initializing
> them, instead of using the parameters that I thought it should access.
> Very weird. I don't understand what is going on there. It may be a
> bug in g++ 4.8.3, but on the other hand, those macros evaluate their
> arguments multiple times, which may have something to do with the
> problem. Anyway, let me know if you object to this solution.
Given Mat's tacit approval on xemacs-beta, I have committed and pushed
this patch. If anybody is unhappy about the XSTRING_LENGTH and
XSTRING_DATA change, let me know and we can explore other possible
solutions.
--
Jerry James
http://www.jamezone.org/
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://lists.xemacs.org/mailman/listinfo/xemacs-patches
[PATCH 21.5] Fix build with g++
10 years, 1 month
Jerry James
PATCH 21.5
This patch fixes a collection of miscellaneous problems that break the
build with g++ 4.8.3. Thanks to Mats for pointing out two of the
problems. I think the contents of this patch are fairly
straightforward, with the exception of the changes to XSTRING_LENGTH
and XSTRING_DATA. Before I made those changes, g++ 4.8.3 complained
about a possibly uninitialized anonymous value in both alloc.c and
fileio.c. I looked briefly at the code, thought it looked okay and
that g++ must have lost its marbles, and continued on. Then, after
building temacs, it segfaulted while loading lisp, at the exact line
in fileio.c where one of the warnings was issued. More digging showed
that g++ was creating anonymous temporaries, and not initializing
them, instead of using the parameters that I thought it should access.
Very weird. I don't understand what is going on there. It may be a
bug in g++ 4.8.3, but on the other hand, those macros evaluate their
arguments multiple times, which may have something to do with the
problem. Anyway, let me know if you object to this solution.
diff -r 6928877dbc26 src/ChangeLog
--- a/src/ChangeLog Sat Oct 25 15:59:31 2014 +0200
+++ b/src/ChangeLog Wed Nov 05 15:48:49 2014 -0700
@@ -1,3 +1,18 @@
+2014-11-05 Jerry James <james(a)xemacs.org>
+
+ * ExternalClient-Xlib.c (ExternalClientEventHandler): Cast integer
+ to long before casting to XPointer, which may be larger than int.
+ * database.c: Use BEGIN_C_DECLS/END_C_DECLS around dbm definitions.
+ * lisp.h (ALLOCA): Use NULL instead of (void) 0 to placate g++.
+ (MALLOC_OR_ALLOCA): Ditto.
+ (XSTRING_LENGTH): Use an explicit temporary with NEW_GC so g++ 4.8
+ won't create an uninitialized anonymous temporary.
+ (XSTRING_DATA): Ditto.
+ * sysdll.c: Check whether HAVE_LTDL is defined, not its value.
+ * tls.c (tls_open): Add typecast to xmalloc call in the nss,
+ gnutls, and openssl versions to satisfy g++. In the gnutls version,
+ use gnutls_certificate_type_t appropriately.
+
2014-10-25 Michael Sperber <mike(a)xemacs.org>
* fontcolor-x.c (x_font_instance_truename):
diff -r 6928877dbc26 src/ExternalClient-Xlib.c
--- a/src/ExternalClient-Xlib.c Sat Oct 25 15:59:31 2014 +0200
+++ b/src/ExternalClient-Xlib.c Wed Nov 05 15:48:49 2014 -0700
@@ -134,9 +134,10 @@
else
return;
XFindContext(display, win, focus_context, ¤t_focus);
- if (focus_status != (int) current_focus)
+ if ((XPointer) (long) focus_status != current_focus)
{
- XSaveContext(display, win, focus_context, (XPointer) focus_status);
+ XSaveContext(display, win, focus_context,
+ (XPointer) (long) focus_status);
extw_send_notify_3(display, win, focus_status ?
extw_notify_focus_in : extw_notify_focus_out,
0, 0, 0);
diff -r 6928877dbc26 src/database.c
--- a/src/database.c Sat Oct 25 15:59:31 2014 +0200
+++ b/src/database.c Wed Nov 05 15:48:49 2014 -0700
@@ -83,6 +83,7 @@
#endif /* HAVE_BERKELEY_DB */
#ifdef HAVE_DBM
+BEGIN_C_DECLS
# ifdef TRUST_NDBM_H_PROTOTYPES
# include NDBM_H_FILE
# else /* not TRUST_NDBM_H_PROTOTYPES */
@@ -91,10 +92,6 @@
using C++, since they are of the form `datum dbm_firstkey()', without any
args given. */
-#if defined(__cplusplus) || defined(c_plusplus)
-extern "C" {
-#endif
-
/* Parameters to dbm_store for simple insertion or replacement. */
#define DBM_INSERT 0
#define DBM_REPLACE 1
@@ -119,11 +116,9 @@
DBM *dbm_open(const char *, int, mode_t);
int dbm_store(DBM *, datum, datum, int);
-#if defined(__cplusplus) || defined(c_plusplus)
-}
-#endif
+# endif /* (not) TRUST_NDBM_H_PROTOTYPES */
+END_C_DECLS
-# endif /* (not) TRUST_NDBM_H_PROTOTYPES */
Lisp_Object Qdbm;
#endif /* HAVE_DBM */
diff -r 6928877dbc26 src/lisp.h
--- a/src/lisp.h Sat Oct 25 15:59:31 2014 +0200
+++ b/src/lisp.h Wed Nov 05 15:48:49 2014 -0700
@@ -1368,7 +1368,7 @@
__temp_alloca_size__ = (size), \
__temp_alloca_size__ > MAX_ALLOCA_VS_C_ALLOCA ? \
xemacs_c_alloca (__temp_alloca_size__) : \
- (need_to_check_c_alloca ? xemacs_c_alloca (0) : (void) 0, \
+ (need_to_check_c_alloca ? xemacs_c_alloca (0) : NULL, \
alloca (__temp_alloca_size__)))
/* Version of ALLOCA() that is guaranteed to work inside of function calls
@@ -1402,7 +1402,7 @@
__temp_alloca_size__ = (size), \
__temp_alloca_size__ > MAX_ALLOCA_VS_MALLOC ? \
xmalloc_and_record_unwind (__temp_alloca_size__) : \
- (need_to_check_c_alloca ? xemacs_c_alloca (0) : (void) 0, \
+ (need_to_check_c_alloca ? xemacs_c_alloca (0) : NULL, \
alloca (__temp_alloca_size__)))
/* -------------- convenience functions for memory allocation ------------- */
@@ -2643,13 +2643,27 @@
#ifdef NEW_GC
#define STRING_DATA_OBJECT(s) ((s)->data_object)
#define XSTRING_DATA_OBJECT(s) (STRING_DATA_OBJECT (XSTRING (s)))
-#define XSTRING_LENGTH(s) (XSTRING_DATA_SIZE (XSTRING (s)))
+DECLARE_INLINE_HEADER (
+Bytecount
+XSTRING_LENGTH (Lisp_Object s)
+)
+{
+ Lisp_String *str = XSTRING (s);
+ return XSTRING_DATA_SIZE (str);
+}
#else /* not NEW_GC */
#define XSTRING_LENGTH(s) (XSTRING (s)->size_)
#endif /* not NEW_GC */
#define XSTRING_PLIST(s) (XSTRING (s)->plist)
#ifdef NEW_GC
-#define XSTRING_DATA(s) (XSTRING_DATA_DATA (XSTRING (s)))
+DECLARE_INLINE_HEADER (
+Ibyte *
+XSTRING_DATA (Lisp_Object s)
+)
+{
+ Lisp_String *str = XSTRING (s);
+ return XSTRING_DATA_DATA (str);
+}
#else /* not NEW_GC */
#define XSTRING_DATA(s) (XSTRING (s)->data_ + 0)
#endif /* not NEW_GC */
diff -r 6928877dbc26 src/sysdll.c
--- a/src/sysdll.c Sat Oct 25 15:59:31 2014 +0200
+++ b/src/sysdll.c Wed Nov 05 15:48:49 2014 -0700
@@ -454,7 +454,7 @@
NSLinkEditError (&c, &errorNumber, &fileNameWithError, &errorString);
return build_extstring (errorString, Qerror_message_encoding);
}
-#elif HAVE_LTDL
+#elif defined(HAVE_LTDL)
/* Libtool's libltdl */
#include <ltdl.h>
diff -r 6928877dbc26 src/tls.c
--- a/src/tls.c Sat Oct 25 15:59:31 2014 +0200
+++ b/src/tls.c Wed Nov 05 15:48:49 2014 -0700
@@ -122,7 +122,7 @@
}
/* Create the socket */
- nspr = xmalloc (sizeof (*nspr));
+ nspr = (tls_state_t *) xmalloc (sizeof (*nspr));
nspr->tls_refcount = 2;
nspr->tls_file_desc =
SSL_ImportFD (nss_model, PR_OpenTCPSocket (addr->sa_family));
@@ -507,7 +507,7 @@
setsockopt (s, IPPROTO_TCP, TCP_NODELAY, &val, sizeof(val));
/* Create the state object */
- gnutls = xmalloc (sizeof (*gnutls));
+ gnutls = (tls_state_t *) xmalloc (sizeof (*gnutls));
gnutls->tls_refcount = 2;
/* Initialize the session object */
@@ -615,7 +615,9 @@
gnutls_datum_t msg;
#ifdef HAVE_GNUTLS_CERTIFICATE_VERIFICATION_STATUS_PRINT
- int type = gnutls_certificate_type_get (gnutls->tls_session);
+ gnutls_certificate_type_t type;
+
+ type = gnutls_certificate_type_get (gnutls->tls_session);
err =
gnutls_certificate_verification_status_print (status, type, &msg, 0);
#else
@@ -966,7 +968,7 @@
setsockopt (s, IPPROTO_TCP, TCP_NODELAY, &val, sizeof(val));
/* Create the state object */
- openssl = xmalloc (sizeof (*openssl));
+ openssl = (tls_state_t *) xmalloc (sizeof (*openssl));
openssl->tls_refcount = 2;
/* Create the connection object */
--
Jerry James
http://www.jamezone.org/
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://lists.xemacs.org/mailman/listinfo/xemacs-patches
commit/cc-mode: acm: Make blink-parens work with a closing template delimiter.
10 years, 1 month
Bitbucket
1 new commit in cc-mode:
https://bitbucket.org/xemacs/cc-mode/commits/9a8816cab6aa/
Changeset: 9a8816cab6aa
User: acm
Date: 2014-11-01 15:36:12+00:00
Summary: Make blink-parens work with a closing template delimiter.
cc-cmds.el (c-electric-lt-gt): Cause a redisplay before calling
blink-paren-function, so as to apply syntax-table properties to the ">".
Affected #: 1 file
diff -r 7afc2ba9a07d8ddab67fd6de7cccd5a1bfdb79fb -r 9a8816cab6aa2266a66da2f6976df1d6d53ee72c cc-cmds.el
--- a/cc-cmds.el
+++ b/cc-cmds.el
@@ -1163,11 +1163,12 @@
(when (and (eq (char-before) ?>)
(not executing-kbd-macro)
blink-paren-function)
- ;; Note: Most paren blink functions, such as the standard
- ;; `blink-matching-open', currently doesn't handle paren chars
- ;; marked with text properties very well. Maybe we should avoid
- ;; this call for the time being?
- (funcall blink-paren-function)))))
+ ;; Currently (2014-10-19), the syntax-table text properties on < and >
+ ;; are only applied in code called during Emacs redisplay. We thus
+ ;; explicitly cause a redisplay so that these properties have been
+ ;; applied when `blink-paren-function' gets called.
+ (sit-for 0)
+ (funcall blink-paren-function)))))
(defun c-electric-paren (arg)
"Insert a parenthesis.
Repository URL: https://bitbucket.org/xemacs/cc-mode/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://lists.xemacs.org/mailman/listinfo/xemacs-patches