changeset 39682:5f60884970a8

Don't define min/max.
author Gerd Moellmann <gerd@gnu.org>
date Mon, 08 Oct 2001 08:07:49 +0000
parents 87cc624f4e1e
children 03d7434d87b6
files src/alloc.c src/atimer.c src/charset.c src/dired.c src/dispnew.c src/editfns.c src/fileio.c src/fns.c src/indent.c src/insdel.c src/intervals.c src/keymap.c src/minibuf.c src/scroll.c src/search.c src/sound.c src/sysdep.c src/term.c src/w32.c src/w32bdf.c src/w32console.c src/w32menu.c src/w32term.c src/window.c src/xdisp.c src/xfaces.c src/xfns.c src/xmenu.c src/xterm.c
diffstat 29 files changed, 0 insertions(+), 93 deletions(-) [+]
line wrap: on
line diff
--- a/src/alloc.c	Mon Oct 08 07:59:17 2001 +0000
+++ b/src/alloc.c	Mon Oct 08 08:07:49 2001 +0000
@@ -80,9 +80,6 @@
 
 #endif /* not DOUG_LEA_MALLOC */
 
-#define max(A,B) ((A) > (B) ? (A) : (B))
-#define min(A,B) ((A) < (B) ? (A) : (B))
-
 /* Macro to verify that storage intended for Lisp objects is not
    out of range to fit in the space for a pointer.
    ADDRESS is the start of the block, and SIZE
--- a/src/atimer.c	Mon Oct 08 07:59:17 2001 +0000
+++ b/src/atimer.c	Mon Oct 08 08:07:49 2001 +0000
@@ -35,11 +35,6 @@
 #include <sys/time.h>
 #endif
 
-/* The ubiquitous min/max macros.  */
-
-#define max(X, Y) ((X) > (Y) ? (X) : (Y))
-#define min(X, Y) ((X) < (Y) ? (X) : (Y))
-
 /* Free-list of atimer structures.  */
 
 static struct atimer *free_atimers;
--- a/src/charset.c	Mon Oct 08 07:59:17 2001 +0000
+++ b/src/charset.c	Mon Oct 08 08:07:49 2001 +0000
@@ -107,8 +107,6 @@
 /* List of all possible generic characters.  */
 Lisp_Object Vgeneric_character_list;
 
-#define min(X, Y) ((X) < (Y) ? (X) : (Y))
-#define max(X, Y) ((X) > (Y) ? (X) : (Y))
 
 void
 invalid_character (c)
--- a/src/dired.c	Mon Oct 08 07:59:17 2001 +0000
+++ b/src/dired.c	Mon Oct 08 08:07:49 2001 +0000
@@ -98,8 +98,6 @@
 /* From filemode.c.  Can't go in Lisp.h because of `stat'.  */
 extern void filemodestring P_ ((struct stat *, char *));
 
-#define min(a, b) ((a) < (b) ? (a) : (b))
-
 /* if system does not have symbolic links, it does not have lstat.
    In that case, use ordinary stat instead.  */
 
--- a/src/dispnew.c	Mon Oct 08 07:59:17 2001 +0000
+++ b/src/dispnew.c	Mon Oct 08 08:07:49 2001 +0000
@@ -75,9 +75,6 @@
 #include <unistd.h>
 #endif
 
-#define max(a, b) ((a) > (b) ? (a) : (b))
-#define min(a, b) ((a) < (b) ? (a) : (b))
-
 /* Get number of chars of output now in the buffer of a stdio stream.
    This ought to be built in in stdio, but it isn't.  Some s- files
    override this because their stdio internals differ.  */
--- a/src/editfns.c	Mon Oct 08 07:59:17 2001 +0000
+++ b/src/editfns.c	Mon Oct 08 08:07:49 2001 +0000
@@ -51,9 +51,6 @@
 #define MAX_10_EXP	310
 #endif
 
-#define min(a, b) ((a) < (b) ? (a) : (b))
-#define max(a, b) ((a) > (b) ? (a) : (b))
-
 #ifndef NULL
 #define NULL 0
 #endif
--- a/src/fileio.c	Mon Oct 08 07:59:17 2001 +0000
+++ b/src/fileio.c	Mon Oct 08 08:07:49 2001 +0000
@@ -159,9 +159,6 @@
 #  define lstat stat
 #endif
 
-#define min(a, b) ((a) < (b) ? (a) : (b))
-#define max(a, b) ((a) > (b) ? (a) : (b))
-
 /* Nonzero during writing of auto-save files */
 int auto_saving;
 
--- a/src/fns.c	Mon Oct 08 07:59:17 2001 +0000
+++ b/src/fns.c	Mon Oct 08 08:07:49 2001 +0000
@@ -50,11 +50,6 @@
 #define NULL (void *)0
 #endif
 
-#ifndef min
-#define min(a, b) ((a) < (b) ? (a) : (b))
-#define max(a, b) ((a) > (b) ? (a) : (b))
-#endif
-
 /* Nonzero enables use of dialog boxes for questions
    asked by mouse commands.  */
 int use_dialog_box;
--- a/src/indent.c	Mon Oct 08 07:59:17 2001 +0000
+++ b/src/indent.c	Mon Oct 08 08:07:49 2001 +0000
@@ -39,9 +39,6 @@
 
 int indent_tabs_mode;
 
-#define min(a, b) ((a) < (b) ? (a) : (b))
-#define max(a, b) ((a) > (b) ? (a) : (b))
-
 #define CR 015
 
 /* These three values memoize the current column to avoid recalculation.  */
--- a/src/insdel.c	Mon Oct 08 07:59:17 2001 +0000
+++ b/src/insdel.c	Mon Oct 08 08:07:49 2001 +0000
@@ -33,9 +33,6 @@
 #define NULL 0
 #endif
 
-#define min(x, y) ((x) < (y) ? (x) : (y))
-#define max(x, y) ((x) > (y) ? (x) : (y))
-
 static void insert_from_string_1 P_ ((Lisp_Object, int, int, int, int, int, int));
 static void insert_from_buffer_1 ();
 static void gap_left P_ ((int, int, int));
--- a/src/intervals.c	Mon Oct 08 07:59:17 2001 +0000
+++ b/src/intervals.c	Mon Oct 08 08:07:49 2001 +0000
@@ -51,8 +51,6 @@
 
 #define TMEM(sym, set) (CONSP (set) ? ! NILP (Fmemq (sym, set)) : ! NILP (set))
 
-#define min(x, y) ((x) < (y) ? (x) : (y))
-
 Lisp_Object merge_properties_sticky ();
 static INTERVAL reproduce_tree P_ ((INTERVAL, INTERVAL));
 static INTERVAL reproduce_tree_obj P_ ((INTERVAL, Lisp_Object));
--- a/src/keymap.c	Mon Oct 08 07:59:17 2001 +0000
+++ b/src/keymap.c	Mon Oct 08 08:07:49 2001 +0000
@@ -32,8 +32,6 @@
 #include "puresize.h"
 #include "intervals.h"
 
-#define min(a, b) ((a) < (b) ? (a) : (b))
-
 /* The number of elements in keymap vectors.  */
 #define DENSE_TABLE_SIZE (0200)
 
--- a/src/minibuf.c	Mon Oct 08 07:59:17 2001 +0000
+++ b/src/minibuf.c	Mon Oct 08 08:07:49 2001 +0000
@@ -33,8 +33,6 @@
 #include "syntax.h"
 #include "intervals.h"
 
-#define min(a, b) ((a) < (b) ? (a) : (b))
-
 extern int quit_char;
 
 /* List of buffers for use as minibuffers.
--- a/src/scroll.c	Mon Oct 08 07:59:17 2001 +0000
+++ b/src/scroll.c	Mon Oct 08 08:07:49 2001 +0000
@@ -29,9 +29,6 @@
 #include "frame.h"
 #include "window.h"
 
-#define max(a, b) ((a) > (b) ? (a) : (b))
-#define min(a, b) ((a) < (b) ? (a) : (b))
-
 /* All costs measured in characters.
    So no cost can exceed the area of a frame, measured in characters.
    Let's hope this is never more than 1000000 characters.  */
--- a/src/search.c	Mon Oct 08 07:59:17 2001 +0000
+++ b/src/search.c	Mon Oct 08 08:07:49 2001 +0000
@@ -33,9 +33,6 @@
 #include <sys/types.h>
 #include "regex.h"
 
-#define min(a, b) ((a) < (b) ? (a) : (b))
-#define max(a, b) ((a) > (b) ? (a) : (b))
-
 #define REGEXP_CACHE_SIZE 20
 
 /* If the regexp is non-nil, then the buffer contains the compiled form
--- a/src/sound.c	Mon Oct 08 07:59:17 2001 +0000
+++ b/src/sound.c	Mon Oct 08 08:07:49 2001 +0000
@@ -53,8 +53,6 @@
 #define DEFAULT_SOUND_DEVICE "/dev/dsp"
 #endif
 
-#define max(X, Y) ((X) > (Y) ? (X) : (Y))
-#define min(X, Y) ((X) < (Y) ? (X) : (Y))
 #define abs(X)    ((X) < 0 ? -(X) : (X))
 
 /* Structure forward declarations.  */
--- a/src/sysdep.c	Mon Oct 08 07:59:17 2001 +0000
+++ b/src/sysdep.c	Mon Oct 08 08:07:49 2001 +0000
@@ -58,8 +58,6 @@
 #endif
 #endif  /* macintosh */
 
-#define min(x,y) ((x) > (y) ? (y) : (x))
-
 #ifdef WINDOWSNT
 #define read sys_read
 #define write sys_write
--- a/src/term.c	Mon Oct 08 07:59:17 2001 +0000
+++ b/src/term.c	Mon Oct 08 08:07:49 2001 +0000
@@ -63,9 +63,6 @@
 static void tty_show_cursor P_ ((void));
 static void tty_hide_cursor P_ ((void));
 
-#define max(a, b) ((a) > (b) ? (a) : (b))
-#define min(a, b) ((a) < (b) ? (a) : (b))
-
 #define OUTPUT(a) \
      tputs (a, (int) (FRAME_HEIGHT (XFRAME (selected_frame)) - curY), cmputc)
 #define OUTPUT1(a) tputs (a, 1, cmputc)
--- a/src/w32.c	Mon Oct 08 07:59:17 2001 +0000
+++ b/src/w32.c	Mon Oct 08 08:07:49 2001 +0000
@@ -88,11 +88,6 @@
 #include "w32heap.h"
 #include "systime.h"
 
-#undef min
-#undef max
-#define min(x, y) (((x) < (y)) ? (x) : (y))
-#define max(x, y) (((x) > (y)) ? (x) : (y))
-
 extern Lisp_Object Vw32_downcase_file_names;
 extern Lisp_Object Vw32_generate_fake_inodes;
 extern Lisp_Object Vw32_get_true_file_attributes;
--- a/src/w32bdf.c	Mon Oct 08 07:59:17 2001 +0000
+++ b/src/w32bdf.c	Mon Oct 08 08:07:49 2001 +0000
@@ -34,9 +34,6 @@
 #include "w32term.h"
 #include "w32bdf.h"
 
-#define min(a, b) ((a) < (b) ? (a) : (b))
-#define max(a, b) ((a) > (b) ? (a) : (b))
-
 /* 10 planes */
 #define BDF_CODEPOINT_HEAP_INITIAL_SIZE (96 * 10)
 /* about 96 characters */
--- a/src/w32console.c	Mon Oct 08 07:59:17 2001 +0000
+++ b/src/w32console.c	Mon Oct 08 08:07:49 2001 +0000
@@ -41,8 +41,6 @@
 #include "frame.h"
 #include "w32inevt.h"
 
-#define min(a, b) ((a) < (b) ? (a) : (b))
-
 /* from window.c */
 extern Lisp_Object Frecenter ();
 
--- a/src/w32menu.c	Mon Oct 08 07:59:17 2001 +0000
+++ b/src/w32menu.c	Mon Oct 08 08:07:49 2001 +0000
@@ -113,9 +113,6 @@
 
 /******************************************************************/
 
-#define min(x,y) (((x) < (y)) ? (x) : (y))
-#define max(x,y) (((x) > (y)) ? (x) : (y))
-
 #ifndef TRUE
 #define TRUE 1
 #define FALSE 0
--- a/src/w32term.c	Mon Oct 08 07:59:17 2001 +0000
+++ b/src/w32term.c	Mon Oct 08 08:07:49 2001 +0000
@@ -56,13 +56,6 @@
 #include "composite.h"
 #include "coding.h"
 
-#ifndef min
-#define min(a,b) ((a) < (b) ? (a) : (b))
-#endif
-#ifndef max
-#define max(a,b) ((a) > (b) ? (a) : (b))
-#endif
-
 #define abs(x)	((x) < 0 ? -(x) : (x))
 
 #define BETWEEN(X, LOWER, UPPER)  ((X) >= (LOWER) && (X) < (UPPER))
--- a/src/window.c	Mon Oct 08 07:59:17 2001 +0000
+++ b/src/window.c	Mon Oct 08 08:07:49 2001 +0000
@@ -221,8 +221,6 @@
 static int inhibit_frame_unsplittable;
 #endif /* 0 */
 
-#define min(a, b) ((a) < (b) ? (a) : (b))
-
 extern int scroll_margin;
 
 extern Lisp_Object Qwindow_scroll_functions, Vwindow_scroll_functions;
--- a/src/xdisp.c	Mon Oct 08 07:59:17 2001 +0000
+++ b/src/xdisp.c	Mon Oct 08 08:07:49 2001 +0000
@@ -198,9 +198,6 @@
 #include "macterm.h"
 #endif
 
-#define min(a, b) ((a) < (b) ? (a) : (b))
-#define max(a, b) ((a) > (b) ? (a) : (b))
-
 #define INFINITY 10000000
 
 #if defined (USE_X_TOOLKIT) || defined (HAVE_NTGUI) || defined (macintosh)
--- a/src/xfaces.c	Mon Oct 08 07:59:17 2001 +0000
+++ b/src/xfaces.c	Mon Oct 08 08:07:49 2001 +0000
@@ -288,11 +288,7 @@
 #include <stdio.h>
 #include <ctype.h>
 
-#ifndef max
-#define max(A, B)	((A) > (B) ? (A) : (B))
-#define min(A, B)	((A) < (B) ? (A) : (B))
 #define abs(X)		((X) < 0 ? -(X) : (X))
-#endif
 
 /* Number of pt per inch (from the TeXbook).  */
 
--- a/src/xfns.c	Mon Oct 08 07:59:17 2001 +0000
+++ b/src/xfns.c	Mon Oct 08 08:07:49 2001 +0000
@@ -117,9 +117,6 @@
 
 #endif /* USE_X_TOOLKIT */
 
-#define min(a,b) ((a) < (b) ? (a) : (b))
-#define max(a,b) ((a) > (b) ? (a) : (b))
-
 #ifdef HAVE_X11R4
 #define MAXREQUEST(dpy) (XMaxRequestSize (dpy))
 #else
--- a/src/xmenu.c	Mon Oct 08 07:59:17 2001 +0000
+++ b/src/xmenu.c	Mon Oct 08 08:07:49 2001 +0000
@@ -81,9 +81,6 @@
 #endif /* not USE_X_TOOLKIT */
 #endif /* HAVE_X_WINDOWS */
 
-#define min(x,y) (((x) < (y)) ? (x) : (y))
-#define max(x,y) (((x) > (y)) ? (x) : (y))
-
 #ifndef TRUE
 #define TRUE 1
 #define FALSE 0
--- a/src/xterm.c	Mon Oct 08 07:59:17 2001 +0000
+++ b/src/xterm.c	Mon Oct 08 08:07:49 2001 +0000
@@ -144,13 +144,6 @@
 #endif
 #endif
 
-#ifndef min
-#define min(a,b) ((a) < (b) ? (a) : (b))
-#endif
-#ifndef max
-#define max(a,b) ((a) > (b) ? (a) : (b))
-#endif
-
 #define abs(x)	((x) < 0 ? -(x) : (x))
 
 #define BETWEEN(X, LOWER, UPPER)  ((X) >= (LOWER) && (X) < (UPPER))