User: stephent
Date: 05/11/16 08:22:49
Modified: xemacs/src ChangeLog database.c event-Xt.c sound.c
Log:
Assorted minor fixes.
TODO comment in configure.ac:
<87irutytzq.fsf(a)tleepslib.sk.tsukuba.ac.jp>
Avoid warning, don't redefine integer types on Mac OS X:
<87ek5hytvq.fsf(a)tleepslib.sk.tsukuba.ac.jp>
Fix uninitialized variable:
<87acg5yttp.fsf(a)tleepslib.sk.tsukuba.ac.jp>
Eliminate warnings for unused parameters and functions:
<8764qtytrp.fsf(a)tleepslib.sk.tsukuba.ac.jp>
Quiet byte-compiler in select.el:
<871x1hytow.fsf(a)tleepslib.sk.tsukuba.ac.jp>
Quiet compiler about unused parameters in sound.el:
<87wtj9xf16.fsf(a)tleepslib.sk.tsukuba.ac.jp>
Revision Changes Path
1.469 +4 -0 XEmacs/xemacs/ChangeLog
Index: ChangeLog
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/ChangeLog,v
retrieving revision 1.468
retrieving revision 1.469
diff -u -p -r1.468 -r1.469
--- ChangeLog 2005/11/13 10:39:39 1.468
+++ ChangeLog 2005/11/16 07:22:37 1.469
@@ -1,3 +1,7 @@
+2005-11-16 Stephen J. Turnbull <stephen(a)xemacs.org>
+
+ * configure.ac (checks for typedefs): TODO comment.
+
2005-11-13 Ben Wing <ben(a)xemacs.org>
* dynodump/Makefile.in.in:
1.20 +1 -0 XEmacs/xemacs/configure.ac
Index: configure.ac
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/configure.ac,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -p -r1.19 -r1.20
--- configure.ac 2005/11/13 07:31:55 1.19
+++ configure.ac 2005/11/16 07:22:37 1.20
@@ -2763,6 +2763,7 @@ AC_TYPE_PID_T
AC_TYPE_UID_T
AC_TYPE_MODE_T
AC_TYPE_OFF_T
+dnl #### deprecated 2.13-ism
AC_CHECK_TYPE(ssize_t, int)
dnl not AC_CHECK_TYPE; lisp.h does hairy conditional typedef
1.697 +5 -0 XEmacs/xemacs/lisp/ChangeLog
Index: ChangeLog
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/lisp/ChangeLog,v
retrieving revision 1.696
retrieving revision 1.697
diff -u -p -r1.696 -r1.697
--- ChangeLog 2005/11/13 10:57:59 1.696
+++ ChangeLog 2005/11/16 07:22:40 1.697
@@ -1,3 +1,8 @@
+2005-11-16 Stephen J. Turnbull <stephen(a)xemacs.org>
+
+ * select.el (get-selection):
+ Quiet bytecompiler (unused condition-case variable).
+
2005-11-13 Ben Wing <ben(a)xemacs.org>
* syntax.el:
1.16 +1 -1 XEmacs/xemacs/lisp/select.el
Index: select.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/lisp/select.el,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -p -r1.15 -r1.16
--- select.el 2005/03/12 20:57:42 1.15
+++ select.el 2005/11/16 07:22:40 1.16
@@ -131,7 +131,7 @@ there is no selection an error is signal
(catch 'converted
(if targets
(dolist (current-preference data-type)
- (condition-case err
+ (condition-case nil
(if (and (memq current-preference targets)
(setq res (get-selection-internal
type current-preference)))
1.74 +8 -1 XEmacs/xemacs/lwlib/ChangeLog
Index: ChangeLog
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/lwlib/ChangeLog,v
retrieving revision 1.73
retrieving revision 1.74
diff -u -p -r1.73 -r1.74
--- ChangeLog 2005/11/13 10:39:34 1.73
+++ ChangeLog 2005/11/16 07:22:42 1.74
@@ -1,9 +1,16 @@
+2005-11-16 Stephen J. Turnbull <stephen(a)xemacs.org>
+
+ * xlwcheckbox.c (CheckboxInit): Mark unused parameters. C++
+ correctness.
+ (CheckboxRealize): Don't compile at all if unused.
+
+ * xlwradio.c (RadioDestroy): #if 0 dead code for later removal.
+
2005-11-13 Ben Wing <ben(a)xemacs.org>
* Makefile.in.in:
Add targets distclean-noconfig, realclean-noconfig, extraclean-noconfig.
Do some refactoring for cleanliness.
-
2005-11-08 Marcus Crestani <crestani(a)xemacs.org>
1.7 +9 -2 XEmacs/xemacs/lwlib/xlwradio.c
Index: xlwradio.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/lwlib/xlwradio.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -p -r1.6 -r1.7
--- xlwradio.c 2005/11/10 15:47:33 1.6
+++ xlwradio.c 2005/11/16 07:22:43 1.7
@@ -89,13 +89,17 @@ Boston, MA 02111-1307, USA. */
static void RadioInit (Widget, Widget, ArgList, Cardinal *);
static void RadioExpose (Widget, XEvent *, Region);
static void RadioResize (Widget);
-static void RadioDestroy (Widget, XtPointer, XtPointer);
static void RadioClassInit (void);
static void RadioClassPartInit (WidgetClass);
static Boolean RadioSetValues (Widget, Widget, Widget, ArgList, Cardinal *);
static void DrawDiamond (Widget);
static XtGeometryResult RadioQueryGeometry (Widget, XtWidgetGeometry *,
XtWidgetGeometry *);
+#if 0
+/* #### This function isn't used and is slated for destruction.
+ Can we just nuke it? */
+static void RadioDestroy (Widget, XtPointer, XtPointer);
+#endif
/* Action procs */
@@ -245,6 +249,9 @@ RadioInit (Widget request,
* Returns: none.
*/
+#if 0
+/* #### This function isn't used and is slated for destruction.
+ Can we just nuke it? */
/* ARGSUSED */
static void
RadioDestroy (Widget UNUSED (w),
@@ -253,7 +260,7 @@ RadioDestroy (Widget UNUSED (w),
{
/* TODO: get rid of this */
}
-
+#endif
/* React to size change from manager. Label widget will compute some internal
* stuff, but we need to override. This code requires knowledge of the
1.4 +4 -8 XEmacs/xemacs/lwlib/xlwcheckbox.c
Index: xlwcheckbox.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/lwlib/xlwcheckbox.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -p -r1.3 -r1.4
--- xlwcheckbox.c 2004/09/20 19:19:17 1.3
+++ xlwcheckbox.c 2005/11/16 07:22:43 1.4
@@ -225,13 +225,13 @@ CheckboxInit (Widget UNUSED (request),
#if DRAW_CHECK
Widget new,
#else
- Widget UNUSED (new),
+ Widget UNUSED (new_),
#endif
ArgList UNUSED (args),
Cardinal *UNUSED (num_args))
{
#if DRAW_CHECK
- CheckboxWidget cw = (CheckboxWidget) new;
+ CheckboxWidget cw = (CheckboxWidget) new_;
cw->checkbox.checkmark = None ;
cw->checkbox.checkmark_GC = None ;
#endif
@@ -280,17 +280,13 @@ CheckboxRealize(Widget w,
*/
/* ARGSUSED */
+#if DRAW_CHECK
static void
CheckboxDestroy (
-#if DRAW_CHECK
Widget w,
-#else
- Widget UNUSED (w),
-#endif
XtPointer UNUSED (junk),
XtPointer UNUSED (garbage))
{
-#if DRAW_CHECK
CheckboxWidget cw = (CheckboxWidget) w;
/* TODO: cache this via xmu */
@@ -298,8 +294,8 @@ CheckboxDestroy (
XFreePixmap( XtDisplay(w), cw->checkbox.checkmark ) ;
if( cw->checkbox.checkmark_GC != None )
XtReleaseGC(w, cw->checkbox.checkmark_GC) ;
-#endif
}
+#endif /* DRAW_CHECK */
1.885 +15 -0 XEmacs/xemacs/src/ChangeLog
Index: ChangeLog
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/ChangeLog,v
retrieving revision 1.884
retrieving revision 1.885
diff -u -p -r1.884 -r1.885
--- ChangeLog 2005/11/13 10:48:01 1.884
+++ ChangeLog 2005/11/16 07:22:44 1.885
@@ -1,3 +1,18 @@
+2005-11-16 Stephen J. Turnbull <stephen(a)xemacs.org>
+
+ * sound.c (USED_IF_HAVE_NATIVE_OR_NAS, USED_IF_HAVE_ANY):
+ New conditional UNUSED macros.
+ (Fplay_sound_file, Fdevice_sound_enabled_p, init_device_sound):
+ Use them.
+
+2005-11-16 Stephen J. Turnbull <stephen(a)xemacs.org>
+
+ * event-Xt.c (x_to_emacs_keysym): Initialize len.
+
+2005-11-16 Stephen J. Turnbull <stephen(a)xemacs.org>
+
+ * database.c: Don't redefine integer types for Mac OS X, either.
+
2005-11-13 Ben Wing <ben(a)xemacs.org>
* alloc.c:
1.38 +1 -1 XEmacs/xemacs/src/database.c
Index: database.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/database.c,v
retrieving revision 1.37
retrieving revision 1.38
diff -u -p -r1.37 -r1.38
--- database.c 2005/10/25 11:16:22 1.37
+++ database.c 2005/11/16 07:22:46 1.38
@@ -47,7 +47,7 @@ Boston, MA 02111-1307, USA. */
#ifdef HAVE_INTTYPES_H
#define __BIT_TYPES_DEFINED__
#include <inttypes.h>
-#if !defined(__FreeBSD__) && !defined(__NetBSD__)
+#if !defined(__FreeBSD__) && !defined(__NetBSD__) &&
!defined(__APPLE__)
typedef uint8_t u_int8_t;
typedef uint16_t u_int16_t;
typedef uint32_t u_int32_t;
1.88 +2 -2 XEmacs/xemacs/src/event-Xt.c
Index: event-Xt.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/event-Xt.c,v
retrieving revision 1.87
retrieving revision 1.88
diff -u -p -r1.87 -r1.88
--- event-Xt.c 2005/09/27 05:29:44 1.87
+++ event-Xt.c 2005/11/16 07:22:46 1.88
@@ -836,7 +836,7 @@ x_to_emacs_keysym (XKeyPressedEvent *eve
KeySym keysym = 0;
#ifdef HAVE_XIM
- int len;
+ int len = 0;
/* Some implementations of XmbLookupString don't return
XBufferOverflow correctly, so increase the size of the xim input
buffer from 64 to the more reasonable size 513, as Emacs has done.
@@ -893,7 +893,7 @@ x_to_emacs_keysym (XKeyPressedEvent *eve
stderr_out (" keysym=%s", XKeysymToString (keysym));
if (status == XLookupChars || status == XLookupBoth)
{
- if (len != 1)
+ if (len > 1)
{
int j;
stderr_out (" chars=\"");
1.25 +22 -9 XEmacs/xemacs/src/sound.c
Index: sound.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/sound.c,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -p -r1.24 -r1.25
--- sound.c 2005/05/05 17:10:54 1.24
+++ sound.c 2005/11/16 07:22:46 1.25
@@ -51,6 +51,25 @@ Boston, MA 02111-1307, USA. */
#include "syswindows.h"
#endif
+#ifdef HAVE_NAS_SOUND
+#define USED_IF_HAVE_NAS(decl) decl
+#else
+#define USED_IF_HAVE_NAS(decl) UNUSED (decl)
+#endif
+
+#if defined(HAVE_NATIVE_SOUND) || defined(HAVE_NAS_SOUND)
+#define USED_IF_HAVE_NATIVE_OR_NAS(decl) decl
+#else
+#define USED_IF_HAVE_NATIVE_OR_NAS(decl) UNUSED (decl)
+#endif
+
+#if defined(HAVE_NATIVE_SOUND) || defined(HAVE_NAS_SOUND) \
+ || defined(HAVE_ESD_SOUND)
+#define USED_IF_HAVE_ANY(decl) decl
+#else
+#define USED_IF_HAVE_ANY(decl) UNUSED (decl)
+#endif
+
#ifdef HAVE_ESD_SOUND
extern int esd_play_sound_file (Extbyte *file, int vol);
extern int esd_play_sound_data (Binbyte *data, size_t length, int vol);
@@ -87,7 +106,7 @@ except under Linux where WAV files are a
Windows the sound file must be in WAV format.
DEVICE defaults to the selected device.
*/
- (file, volume, device))
+ (file, volume, USED_IF_HAVE_ANY (device)))
{
/* This function can call lisp */
int vol;
@@ -402,7 +421,7 @@ If the sound cannot be played in any oth
DEFUN ("device-sound-enabled-p", Fdevice_sound_enabled_p, 0, 1, 0, /*
Return t if DEVICE is able to play sound. Defaults to selected device.
*/
- (device))
+ (USED_IF_HAVE_NATIVE_OR_NAS (device)))
{
#ifdef HAVE_NAS_SOUND
if (DEVICE_CONNECTED_TO_NAS_P (decode_device (device)))
@@ -487,12 +506,6 @@ the C kernel of Emacs uses.
return Qnil;
}
-#ifdef HAVE_NAS_SOUND
-#define USED_IF_HAVE_NAS(decl) decl
-#else
-#define USED_IF_HAVE_NAS(decl) UNUSED (decl)
-#endif
-
DEFUN ("wait-for-sounds", Fwait_for_sounds, 0, 1, 0, /*
Wait for all sounds to finish playing on DEVICE.
*/
@@ -608,7 +621,7 @@ init_native_sound (struct device *d)
#endif /* HAVE_NATIVE_SOUND */
void
-init_device_sound (struct device *d)
+init_device_sound (struct device * USED_IF_HAVE_NATIVE_OR_NAS (d))
{
#ifdef HAVE_NAS_SOUND
init_nas_sound (d);