From 5acc713fc13db046c8697b591efaea0afd5f72d4 Mon Sep 17 00:00:00 2001 From: Michael Jennings Date: Tue, 10 Dec 2002 21:52:13 +0000 Subject: [PATCH] Tue Dec 10 16:50:29 2002 Michael Jennings (mej) A few fixes from Andre Pang . One for big- endian machines, one for automake >= 1.6, and one for using the cut buffers with the copy/paste script functions. SVN revision: 6489 --- ChangeLog | 6 ++++++ configure.in | 8 ++++++++ src/script.c | 4 ++-- 3 files changed, 16 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 0f2b04d..0c43edd 100644 --- a/ChangeLog +++ b/ChangeLog @@ -4946,3 +4946,9 @@ problem. >:I I should really read more carefully. While I was at it, I fixed some bad uses of BEG_STRCASECMP(). ---------------------------------------------------------------------- +Tue Dec 10 16:50:29 2002 Michael Jennings (mej) + +A few fixes from Andre Pang . One for big- +endian machines, one for automake >= 1.6, and one for using the cut +buffers with the copy/paste script functions. +---------------------------------------------------------------------- diff --git a/configure.in b/configure.in index 8a159b8..422b240 100644 --- a/configure.in +++ b/configure.in @@ -143,6 +143,14 @@ export PERL AWK AC_C_CONST AC_C_INLINE +AC_C_BIGENDIAN + +# Keep automake >= 1.6 quiet about "assembler sources seen but no CCAS defined" +CCAS="$CC" +AC_SUBST(CCAS) +CCASFLAGS="$CFLAGS" +AC_SUBST(CCASFLAGS) + AC_PATH_XTRA if test ! -z "$X_CFLAGS"; then diff --git a/src/script.c b/src/script.c index d7d272b..5207929 100644 --- a/src/script.c +++ b/src/script.c @@ -163,7 +163,7 @@ script_handler_copy(char **params) for (i = 0; (buffer_id = params[i]) != NULL; i++) { if (*buffer_id) { if (*buffer_id >= '0' && *buffer_id <= '7') { - sel = (Atom) ((int) XA_CUT_BUFFER0 + (int) *buffer_id); + sel = (Atom) ((int) XA_CUT_BUFFER0 + (int) (*buffer_id - '0')); } else if (!BEG_STRCASECMP(buffer_id, "clipboard")) { sel = XA_CLIPBOARD(Xdisplay); } else if (!BEG_STRCASECMP(buffer_id, "primary")) { @@ -264,7 +264,7 @@ script_handler_paste(char **params) for (i = 0; (buffer_id = params[i]) != NULL; i++) { if (*buffer_id) { if (*buffer_id >= '0' && *buffer_id <= '7') { - sel = (Atom) ((int) XA_CUT_BUFFER0 + (int) *buffer_id); + sel = (Atom) ((int) XA_CUT_BUFFER0 + (int) (*buffer_id - '0')); } else if (!BEG_STRCASECMP(buffer_id, "clipboard")) { sel = XA_CLIPBOARD(Xdisplay); } else if (!BEG_STRCASECMP(buffer_id, "primary")) {