changeset 2340:91a83e231f92

[xemacs-hg @ 2004-10-19 17:18:59 by james] Mark more unused parameters.
author james
date Tue, 19 Oct 2004 17:19:07 +0000
parents 74a78941c2c1
children e9b0c15c1ced
files src/ChangeLog src/console.c src/events.c src/sysdep.c
diffstat 4 files changed, 104 insertions(+), 16 deletions(-) [+]
line wrap: on
line diff
--- a/src/ChangeLog	Mon Oct 18 21:51:40 2004 +0000
+++ b/src/ChangeLog	Tue Oct 19 17:19:07 2004 +0000
@@ -1,3 +1,11 @@
+2004-10-19  Jerry James  <james@xemacs.org>
+
+	* events.c: Define USED_IF_TTY and USED_IF_TOOLBARS.  Use them to
+	mark more unused parameters.
+	* console.c: Define USED_IF_TTY and use it.
+	* sysdep.c: Define USED_IF_TTY.  Mark more unused parameters.
+	Update a URL in a comment.
+
 2004-10-16  Malcolm Purvis  <malcolmp@xemacs.org>
 
 	* gtk-xemacs.c (gtk_xemacs_size_allocate): Cast pointer to right type.
--- a/src/console.c	Mon Oct 18 21:51:40 2004 +0000
+++ b/src/console.c	Tue Oct 19 17:19:07 2004 +0000
@@ -43,6 +43,12 @@
 #include "console-tty-impl.h"
 #endif
 
+#ifdef HAVE_TTY
+#define USED_IF_TTY(decl) decl
+#else
+#define USED_IF_TTY(decl) UNUSED (decl)
+#endif
+
 Lisp_Object Vconsole_list, Vselected_console;
 
 Lisp_Object Vcreate_console_hook, Vdelete_console_hook;
@@ -1024,7 +1030,7 @@
 Some operating systems cannot stop processes and resume them later.
 On such systems, who knows what will happen.
 */
-       (console))
+       (USED_IF_TTY (console)))
 {
 #ifdef HAVE_TTY
   struct console *con = decode_console (console);
@@ -1061,7 +1067,7 @@
 Re-initialize a previously suspended console.
 For tty consoles, do stuff to the tty to make it sane again.
 */
-       (console))
+       (USED_IF_TTY (console)))
 {
 #ifdef HAVE_TTY
   struct console *con = decode_console (console);
@@ -1109,7 +1115,7 @@
  the selected console.
 See also `current-input-mode'.
 */
-       (UNUSED (ignored), flow, meta, quit, console))
+       (UNUSED (ignored), USED_IF_TTY (flow), meta, quit, console))
 {
   struct console *con = decode_console (console);
   int meta_key = (!CONSOLE_TTY_P (con) ? 1 :
--- a/src/events.c	Mon Oct 18 21:51:40 2004 +0000
+++ b/src/events.c	Tue Oct 19 17:19:07 2004 +0000
@@ -41,6 +41,18 @@
 
 #include "console-tty-impl.h" /* for stuff in character_to_event */
 
+#ifdef HAVE_TTY
+#define USED_IF_TTY(decl) decl
+#else
+#define USED_IF_TTY(decl) UNUSED (decl)
+#endif
+
+#ifdef HAVE_TOOLBARS
+#define USED_IF_TOOLBARS(decl) decl
+#else
+#define USED_IF_TOOLBARS(decl) UNUSED (decl)
+#endif
+
 /* Where old events go when they are explicitly deallocated.
    The event chain here is cut loose before GC, so these will be freed
    eventually.
@@ -1210,7 +1222,8 @@
 
 void
 character_to_event (Ichar c, Lisp_Event *event, struct console *con,
-		    int use_console_meta_flag, int do_backspace_mapping)
+		    int use_console_meta_flag,
+		    int USED_IF_TTY (do_backspace_mapping))
 {
   Lisp_Object k = Qnil;
   int m = 0;
@@ -2383,7 +2396,7 @@
 Return the toolbar button that the mouse event EVENT occurred over.
 If the event did not occur over a toolbar button, nil is returned.
 */
-       (event))
+       (USED_IF_TOOLBARS (event)))
 {
 #ifdef HAVE_TOOLBARS
   Lisp_Object button;
--- a/src/sysdep.c	Mon Oct 18 21:51:40 2004 +0000
+++ b/src/sysdep.c	Tue Oct 19 17:19:07 2004 +0000
@@ -123,6 +123,12 @@
 #include <sys/termio.h>
 #endif
 
+#ifdef HAVE_TTY
+#define USED_IF_TTY(decl) decl
+#else
+#define USED_IF_TTY(decl) UNUSED (decl)
+#endif
+
 
 /************************************************************************/
 /*                         subprocess control                           */
@@ -190,7 +196,13 @@
 }
 
 void
-set_descriptor_non_blocking (int fd)
+set_descriptor_non_blocking (
+#if defined (STRIDE) || (defined (pfa) && defined (HAVE_PTYS)) || defined (AIX) || defined (F_SETFL)
+			     int fd
+#else
+			     int UNUSED (fd)
+#endif
+			     )
 {
 /* Stride people say it's a mystery why this is needed
    as well as the O_NDELAY, but that it fails without this.  */
@@ -710,7 +722,13 @@
 
 /* Suspend a process if possible; give terminal to its superior.  */
 void
-sys_suspend_process (int process)
+sys_suspend_process (
+#ifdef SIGTSTP
+		     int process
+#else
+		     int UNUSED (process)
+#endif
+		     )
 {
     /* I don't doubt that it is possible to suspend processes on
      * VMS machines or thost that use USG_JOBCTRL,
@@ -726,7 +744,13 @@
    so that the function works even when fd is not a pty. */
 
 int
-get_pty_max_bytes (int fd)
+get_pty_max_bytes (
+#if defined (HAVE_FPATHCONF) && defined (_PC_MAX_CANON)
+		   int fd
+#else
+		   int UNUSED (fd)
+#endif
+		   )
 {
   /* DEC OSF 4.0 fpathconf returns 255, but xemacs hangs on long shell
      input lines if we return 253.  252 is OK!.  So let's leave a bit
@@ -811,7 +835,13 @@
    to HEIGHT and WIDTH.  This is used mainly with ptys.  */
 
 int
-set_window_size (int fd, int height, int width)
+set_window_size (
+#if defined (TIOCSWINSZ) || defined (TIOCSSIZE)
+		 int fd, int height, int width
+#else
+		 int UNUSED (fd), int UNUSED (height), int UNUSED (width)
+#endif
+		 )
 {
 #ifdef TIOCSWINSZ
 
@@ -844,7 +874,13 @@
 /* Set up the proper status flags for use of a pty.  */
 
 void
-setup_pty (int fd)
+setup_pty (
+#ifdef TIOCPKT
+	   int fd
+#else
+	   int UNUSED (fd)
+#endif
+	   )
 {
 #ifdef IBMRTAIX
   /* On AIX, the parent gets SIGHUP when a pty attached child dies.  So, we */
@@ -1732,7 +1768,13 @@
 #endif /* HAVE_TTY */
 
 void
-init_one_device (struct device *d)
+init_one_device (
+#if defined(HAVE_TTY) || (defined(SIGIO) && !defined(BROKEN_SIGIO))
+		 struct device *d
+#else
+		 struct device *UNUSED (d)
+#endif
+		 )
 {
 #ifdef HAVE_TTY
   if (DEVICE_TTY_P (d))
@@ -1782,7 +1824,7 @@
    At the time this is called, init_sys_modes has not been done yet.  */
 
 int
-tabs_safe_p (struct device *d)
+tabs_safe_p (struct device *USED_IF_TTY (d))
 {
 #ifdef HAVE_TTY
   if (DEVICE_TTY_P (d))
@@ -2521,7 +2563,7 @@
 /* Ben sez: read Dick Gabriel's essay about the Worse Is Better
    approach to programming and its connection to the silly
    interruptible-system-call business.  To find it, look on
-   Jamie's home page (http://www.jwz.org/worse-is-better.html). */
+   Jamie's home page (http://www.jwz.org/doc/worse-is-better.html). */
 
 #ifdef WIN32_NATIVE
 
@@ -2893,7 +2935,13 @@
 }
 
 int
-qxe_mkdir (const Ibyte *path, mode_t mode)
+qxe_mkdir (const Ibyte *path,
+#ifdef WIN32_NATIVE
+	   mode_t UNUSED (mode)
+#else
+	   mode_t mode
+#endif
+	   )
 {
   Extbyte *pathout;
   PATHNAME_CONVERT_OUT (path, pathout);
@@ -3512,7 +3560,14 @@
    access to those functions goes through the following. */
 
 int
-set_file_times (Lisp_Object path, EMACS_TIME atime, EMACS_TIME mtime)
+set_file_times (
+#if defined (WIN32_NATIVE) || defined (HAVE_UTIME) || defined (HAVE_UTIMES)
+		Lisp_Object path, EMACS_TIME atime, EMACS_TIME mtime
+#else
+		Lisp_Object UNUSED (path), EMACS_TIME UNUSED (atime),
+		EMACS_TIME UNUSED (mtime)
+#endif
+		)
 {
 #if defined (WIN32_NATIVE)
   struct utimbuf utb;
@@ -3552,7 +3607,13 @@
    for increased accuracy. */
 
 static int
-get_process_times_1 (long *user_ticks, long *system_ticks)
+get_process_times_1 (
+#if defined (CLOCKS_PER_SEC) || defined (_SC_CLK_TCK) || defined (CLK_TCK) && !defined(WIN32_NATIVE)
+		     long *user_ticks, long *system_ticks
+#else
+		     long *UNUSED (user_ticks), long *UNUSED (system_ticks)
+#endif
+		     )
 {
 #if defined (_SC_CLK_TCK) || defined (CLK_TCK) && !defined(WIN32_NATIVE)
   /* We have the POSIX times() function available. */