cvs diff: Diffing .
cvs diff: Diffing config
cvs diff: Diffing config/psfonts
cvs diff: Diffing doc
cvs diff: Diffing examples
cvs diff: Diffing lib
cvs diff: Diffing lib/gsl-extras
cvs diff: Diffing lib/gtksheet
cvs diff: Diffing lib/linreg
cvs diff: Diffing po
cvs diff: Diffing src
cvs diff: Diffing src/data
Index: src/data/dictionary.c
===================================================================
RCS file: /cvsroot/pspp/pspp/src/data/dictionary.c,v
retrieving revision 1.18
diff -u -p -r1.18 dictionary.c
--- src/data/dictionary.c	3 Nov 2006 04:53:51 -0000	1.18
+++ src/data/dictionary.c	25 Nov 2006 01:27:32 -0000
@@ -38,6 +38,8 @@
 #include <libpspp/misc.h>
 #include <libpspp/str.h>
 
+#include "minmax.h"
+
 #include "gettext.h"
 #define _(msgid) gettext (msgid)
 
@@ -532,8 +534,8 @@ dict_reorder_var (struct dictionary *d, 
 
   move_element (d->var, d->var_cnt, sizeof *d->var, v->index, new_index);
 
-  min_idx = min (v->index, new_index);
-  max_idx = max (v->index, new_index);
+  min_idx = MIN (v->index, new_index);
+  max_idx = MAX (v->index, new_index);
   for (i = min_idx; i <= max_idx; i++)
     d->var[i]->index = i;
 }
Index: src/data/sys-file-reader.c
===================================================================
RCS file: /cvsroot/pspp/pspp/src/data/sys-file-reader.c,v
retrieving revision 1.25
diff -u -p -r1.25 sys-file-reader.c
--- src/data/sys-file-reader.c	3 Nov 2006 04:53:51 -0000	1.25
+++ src/data/sys-file-reader.c	25 Nov 2006 01:27:33 -0000
@@ -439,7 +439,7 @@ sfm_open_reader (struct file_handle *fh,
 		      break;
 		    }
 
-		  for ( i = 0 ; i < min(n_vars, dict_get_var_cnt(*dict)) ; ++i ) 
+		  for ( i = 0 ; i < MIN(n_vars, dict_get_var_cnt(*dict)) ; ++i ) 
 		    {
 		      struct
 		      {
@@ -1382,7 +1382,7 @@ read_value_labels (struct sfm_reader *r,
       
       if (var[0]->type == ALPHA)
         {
-          const int copy_len = min (sizeof label->raw_value,
+          const int copy_len = MIN (sizeof label->raw_value,
                                     sizeof label->label);
           memcpy (label->value.s, label->raw_value, copy_len);
         } else {
@@ -1446,7 +1446,7 @@ buf_read (struct sfm_reader *r, void *bu
   assert (r);
 
   if (buf == NULL && byte_cnt > 0 )
-    buf = xmalloc (max (byte_cnt, min_alloc));
+    buf = xmalloc (MAX (byte_cnt, min_alloc));
 
   if ( byte_cnt == 0 )
     return buf;
Index: src/data/sys-file-writer.c
===================================================================
RCS file: /cvsroot/pspp/pspp/src/data/sys-file-writer.c,v
retrieving revision 1.15
diff -u -p -r1.15 sys-file-writer.c
--- src/data/sys-file-writer.c	3 Nov 2006 04:53:51 -0000	1.15
+++ src/data/sys-file-writer.c	25 Nov 2006 01:27:33 -0000
@@ -458,7 +458,7 @@ write_variable (struct sfm_writer *w, co
   int nm;               /* Number of missing values, possibly negative. */
 
   sv.rec_type = 2;
-  sv.type = min(v->width, MAX_LONG_STRING);
+  sv.type = MIN(v->width, MAX_LONG_STRING);
   sv.has_var_label = (v->label != NULL);
 
   mv_copy (&mv, &v->miss);
@@ -500,7 +500,7 @@ write_variable (struct sfm_writer *w, co
 
       int ext_len;
 
-      l.label_len = min (strlen (v->label), 255);
+      l.label_len = MIN (strlen (v->label), 255);
       ext_len = ROUND_UP (l.label_len, sizeof l.label_len);
       memcpy (l.label, v->label, l.label_len);
       memset (&l.label[l.label_len], ' ', ext_len - l.label_len);
@@ -523,7 +523,7 @@ write_variable (struct sfm_writer *w, co
       memset (&sv.write, 0, sizeof sv.write);
       memset (&sv.name, 0, sizeof sv.name);
 
-      pad_count = DIV_RND_UP (min(v->width, MAX_LONG_STRING),
+      pad_count = DIV_RND_UP (MIN(v->width, MAX_LONG_STRING),
 			      (int) sizeof (flt64)) - 1;
       for (i = 0; i < pad_count; i++)
 	buf_write (w, &sv, sizeof sv);
@@ -839,7 +839,7 @@ buf_write (struct sfm_writer *w, const v
 static char *
 append_string_max (char *dest, const char *src, const char *end)
 {
-  int nbytes = min (end - dest, (int) strlen (src));
+  int nbytes = MIN (end - dest, (int) strlen (src));
   memcpy (dest, src, nbytes);
   return dest + nbytes;
 }
Index: src/data/variable.c
===================================================================
RCS file: /cvsroot/pspp/pspp/src/data/variable.c,v
retrieving revision 1.11
diff -u -p -r1.11 variable.c
--- src/data/variable.c	29 Oct 2006 09:51:36 -0000	1.11
+++ src/data/variable.c	25 Nov 2006 01:27:34 -0000
@@ -31,6 +31,8 @@
 #include <libpspp/str.h>
 #include "value-labels.h"
 
+#include "minmax.h"
+
 #include "gettext.h"
 #define _(msgid) gettext (msgid)
 
@@ -106,7 +108,7 @@ compare_values (const union value *a, co
   if (width == 0) 
     return a->f < b->f ? -1 : a->f > b->f;
   else
-    return memcmp (a->s, b->s, min(MAX_SHORT_STRING, width));
+    return memcmp (a->s, b->s, MIN(MAX_SHORT_STRING, width));
 }
 
 /* Create a hash of v */
@@ -118,7 +120,7 @@ hash_value(const union value  *v, int wi
   if ( 0 == width ) 
     id_hash = hsh_hash_double (v->f);
   else
-    id_hash = hsh_hash_bytes (v->s, min(MAX_SHORT_STRING, width));
+    id_hash = hsh_hash_bytes (v->s, MIN(MAX_SHORT_STRING, width));
 
   return id_hash;
 }
cvs diff: Diffing src/language
cvs diff: Diffing src/language/control
cvs diff: Diffing src/language/data-io
Index: src/language/data-io/list.q
===================================================================
RCS file: /cvsroot/pspp/pspp/src/language/data-io/list.q,v
retrieving revision 1.20
diff -u -p -r1.20 list.q
--- src/language/data-io/list.q	11 Nov 2006 23:10:00 -0000	1.20
+++ src/language/data-io/list.q	25 Nov 2006 01:27:34 -0000
@@ -44,6 +44,8 @@
 #include <output/output.h>
 #include <output/table.h>
 
+#include "minmax.h"
+
 #include "gettext.h"
 #define _(msgid) gettext (msgid)
 
@@ -326,7 +328,7 @@ write_header (struct outp_driver *d)
 	  struct variable *v = cmd.v_variables[i];
 	  
 	  memset (&prc->header[prc->header_rows - 1][x], '-',
-		  max (v->print.w, (int) strlen (v->name)));
+		  MAX (v->print.w, (int) strlen (v->name)));
 	  if ((int) strlen (v->name) < v->print.w)
 	    x += v->print.w - strlen (v->name);
  	  memcpy (&prc->header[0][x], v->name, strlen (v->name));
@@ -533,7 +535,7 @@ determine_layout (void)
       outp_open_page (d);
       
       max_width = n_chars_width (d);
-      largest_page_width = max (largest_page_width, max_width);
+      largest_page_width = MAX (largest_page_width, max_width);
 
       prc = d->prc = xmalloc (sizeof *prc);
       prc->type = 0;
@@ -544,7 +546,7 @@ determine_layout (void)
       for (width = cmd.n_variables - 1, column = 0; column < cmd.n_variables; column++)
 	{
 	  struct variable *v = cmd.v_variables[column];
-	  width += max (v->print.w, (int) strlen (v->name));
+	  width += MAX (v->print.w, (int) strlen (v->name));
 	}
       if (width <= max_width)
 	{
@@ -574,7 +576,7 @@ determine_layout (void)
 	    {
 	      struct variable *v = cmd.v_variables[column];
 	      int trial_width = (width - v->print.w
-				 + max (v->print.w, (int) strlen (v->name)));
+				 + MAX (v->print.w, (int) strlen (v->name)));
 	      
 	      if (trial_width > max_width)
 		{
@@ -590,7 +592,7 @@ determine_layout (void)
 	  for (prc->header_rows = 0, column = 0;
 	       column < prc->n_vertical;
 	       column++)
-	    prc->header_rows = max (prc->header_rows,
+	    prc->header_rows = MAX (prc->header_rows,
 				    strlen (cmd.v_variables[column]->name));
 	  prc->header_rows++;
 	  continue;
@@ -638,7 +640,7 @@ list_cases (const struct ccase *c, void 
 	    int width;
 
 	    if (prc->type == 0 && column >= prc->n_vertical)
-	      width = max ((int) strlen (v->name), v->print.w);
+	      width = MAX ((int) strlen (v->name), v->print.w);
 	    else
 	      width = v->print.w;
 
Index: src/language/data-io/matrix-data.c
===================================================================
RCS file: /cvsroot/pspp/pspp/src/language/data-io/matrix-data.c,v
retrieving revision 1.18
diff -u -p -r1.18 matrix-data.c
--- src/language/data-io/matrix-data.c	22 Nov 2006 04:24:02 -0000	1.18
+++ src/language/data-io/matrix-data.c	25 Nov 2006 01:27:35 -0000
@@ -44,6 +44,7 @@
 #include <libpspp/pool.h>
 #include <libpspp/str.h>
 
+#include "minmax.h"
 #include "size_max.h"
 
 #include "gettext.h"
@@ -1737,8 +1738,8 @@ wr_read_rowtype (struct wr_aux_data *wr,
     char s[16];
     char *cp;
     
-    memcpy (s, token->string, min (15, token->length));
-    s[min (15, token->length)] = 0;
+    memcpy (s, token->string, MIN (15, token->length));
+    s[MIN (15, token->length)] = 0;
 
     for (cp = s; *cp; cp++)
       *cp = toupper ((unsigned char) *cp);
cvs diff: Diffing src/language/dictionary
Index: src/language/dictionary/sys-file-info.c
===================================================================
RCS file: /cvsroot/pspp/pspp/src/language/dictionary/sys-file-info.c,v
retrieving revision 1.14
diff -u -p -r1.14 sys-file-info.c
--- src/language/dictionary/sys-file-info.c	11 Nov 2006 23:10:00 -0000	1.14
+++ src/language/dictionary/sys-file-info.c	25 Nov 2006 01:27:36 -0000
@@ -43,6 +43,8 @@
 #include <output/output.h>
 #include <output/table.h>
 
+#include "minmax.h"
+
 #include "gettext.h"
 #define _(msgid) gettext (msgid)
 
@@ -70,7 +72,7 @@ sysfile_info_dim (struct tab_table *t, s
   int i;
 
   for (p = max; *p; p++)
-    t->w[p - max] = min (tab_natural_width (t, d, p - max),
+    t->w[p - max] = MIN (tab_natural_width (t, d, p - max),
 			 *p * d->prop_em_width);
   for (i = 0; i < t->nr; i++)
     t->h[i] = tab_natural_height (t, d, i);
@@ -152,7 +154,7 @@ cmd_sysfile_info (struct lexer *lexer, s
       
       if (r + 10 + nvl > nr)
 	{
-	  nr = max (nr * dict_get_var_cnt (d) / (i + 1), nr);
+	  nr = MAX (nr * dict_get_var_cnt (d) / (i + 1), nr);
 	  nr += 10 + nvl;
 	  tab_realloc (t, 4, nr);
 	}
@@ -334,8 +336,8 @@ variables_dim (struct tab_table *t, stru
   t->w[0] = tab_natural_width (t, d, 0);
   if (_as == AS_DICTIONARY || _as == AS_VARIABLES || _as == AS_LABELS)
     {
-      t->w[1] = max (tab_natural_width (t, d, 1), d->prop_em_width * 5);
-      t->w[2] = max (tab_natural_width (t, d, 2), d->prop_em_width * 35);
+      t->w[1] = MAX (tab_natural_width (t, d, 1), d->prop_em_width * 5);
+      t->w[2] = MAX (tab_natural_width (t, d, 2), d->prop_em_width * 35);
       pc = 3;
     }
   else pc = 1;
@@ -399,7 +401,7 @@ display_variables (struct variable **vl,
       
 	  if (r + 10 + nvl > nr)
 	    {
-	      nr = max (nr * n / (i + 1), nr);
+	      nr = MAX (nr * n / (i + 1), nr);
 	      nr += 10 + nvl;
 	      tab_realloc (t, nc, nr);
 	    }
cvs diff: Diffing src/language/expressions
cvs diff: Diffing src/language/lexer
cvs diff: Diffing src/language/stats
Index: src/language/stats/aggregate.c
===================================================================
RCS file: /cvsroot/pspp/pspp/src/language/stats/aggregate.c,v
retrieving revision 1.19
diff -u -p -r1.19 aggregate.c
--- src/language/stats/aggregate.c	11 Nov 2006 23:10:00 -0000	1.19
+++ src/language/stats/aggregate.c	25 Nov 2006 01:27:36 -0000
@@ -46,6 +46,8 @@
 #include <math/moments.h>
 #include <math/sort.h>
 
+#include "minmax.h"
+
 #include "gettext.h"
 #define _(msgid) gettext (msgid)
 
@@ -809,7 +811,7 @@ accumulate_aggregate_info (struct agr_pr
             moments1_add (iter->moments, v->f, weight);
             break;
 	  case MAX:
-	    iter->dbl[0] = max (iter->dbl[0], v->f);
+	    iter->dbl[0] = MAX (iter->dbl[0], v->f);
 	    iter->int1 = 1;
 	    break;
 	  case MAX | FSTRING:
@@ -818,7 +820,7 @@ accumulate_aggregate_info (struct agr_pr
 	    iter->int1 = 1;
 	    break;
 	  case MIN:
-	    iter->dbl[0] = min (iter->dbl[0], v->f);
+	    iter->dbl[0] = MIN (iter->dbl[0], v->f);
 	    iter->int1 = 1;
 	    break;
 	  case MIN | FSTRING:
Index: src/language/stats/crosstabs.q
===================================================================
RCS file: /cvsroot/pspp/pspp/src/language/stats/crosstabs.q,v
retrieving revision 1.22
diff -u -p -r1.22 crosstabs.q
--- src/language/stats/crosstabs.q	11 Nov 2006 23:10:00 -0000	1.22
+++ src/language/stats/crosstabs.q	25 Nov 2006 01:27:40 -0000
@@ -60,6 +60,8 @@
 #include <output/output.h>
 #include <output/table.h>
 
+#include "minmax.h"
+
 #include "gettext.h"
 #define _(msgid) gettext (msgid)
 #define N_(msgid) msgid
@@ -1222,7 +1224,7 @@ output_pivot_table (struct table_entry *
       /* Allocate table space for the matrix. */
       if (table && tab_row (table) + (n_rows + 1) * num_cells > tab_nr (table))
 	tab_realloc (table, -1,
-		     max (tab_nr (table) + (n_rows + 1) * num_cells,
+		     MAX (tab_nr (table) + (n_rows + 1) * num_cells,
 			  tab_nr (table) * (pe - pb) / (te - tb)));
 
       if (mode == GENERAL)
@@ -2277,9 +2279,9 @@ calc_fisher (int a, int b, int c, int d,
 {
   int x;
   
-  if (min (c, d) < min (a, b))
+  if (MIN (c, d) < MIN (a, b))
     swap (&a, &c), swap (&b, &d);
-  if (min (b, d) < min (a, c))
+  if (MIN (b, d) < MIN (a, c))
     swap (&a, &b), swap (&c, &d);
   if (b * c < a * d)
     {
@@ -2471,7 +2473,7 @@ static int
 calc_symmetric (double v[N_SYMMETRIC], double ase[N_SYMMETRIC],
 		double t[N_SYMMETRIC])
 {
-  int q = min (ns_rows, ns_cols);
+  int q = MIN (ns_rows, ns_cols);
   
   if (q <= 1)
     return 0;
@@ -3194,9 +3196,9 @@ format_short (char *s, const struct fmt_
 
       assert (fmt_subst.type == FMT_A || fmt_subst.type == FMT_AHEX);
       if (fmt_subst.type == FMT_A)
-        fmt_subst.w = min (8, fmt_subst.w);
+        fmt_subst.w = MIN (8, fmt_subst.w);
       else
-        fmt_subst.w = min (16, fmt_subst.w);
+        fmt_subst.w = MIN (16, fmt_subst.w);
 
       fp = &fmt_subst;
     }
Index: src/language/stats/examine.q
===================================================================
RCS file: /cvsroot/pspp/pspp/src/language/stats/examine.q,v
retrieving revision 1.16
diff -u -p -r1.16 examine.q
--- src/language/stats/examine.q	25 Nov 2006 00:42:44 -0000	1.16
+++ src/language/stats/examine.q	25 Nov 2006 01:27:40 -0000
@@ -50,6 +50,8 @@ Foundation, Inc., 51 Franklin Street, Fi
 #include <output/manager.h>
 #include <output/table.h>
 
+#include "minmax.h"
+
 #include "gettext.h"
 #define _(msgid) gettext (msgid)
 #define N_(msgid) msgid
@@ -1728,8 +1730,8 @@ box_plot_variables (const struct factor 
 
       for ( i = 0 ; i < n_vars ; ++i ) 
 	{
-	  y_max = max (y_max, (*fs)->m[i].max);
-	  y_min = min (y_min, (*fs)->m[i].min);
+	  y_max = MAX (y_max, (*fs)->m[i].max);
+	  y_min = MIN (y_min, (*fs)->m[i].min);
 	}
       
       boxplot_draw_yscale (ch, y_max, y_min);
@@ -1870,8 +1872,8 @@ np_plot (const struct metrics *m, const 
   {
     /* Need to make sure that both the scatter plot and the ideal fit into the
        plot */
-    double x_lower = min (m->min, (yfirst - intercept) / slope) ;
-    double x_upper = max (m->max, (ylast  - intercept) / slope) ;
+    double x_lower = MIN (m->min, (yfirst - intercept) / slope) ;
+    double x_upper = MAX (m->max, (ylast  - intercept) / slope) ;
     double slack = (x_upper - x_lower)  * 0.05 ;
 
     chart_write_xscale (np_chart, x_lower - slack, x_upper + slack, 5);
Index: src/language/stats/flip.c
===================================================================
RCS file: /cvsroot/pspp/pspp/src/language/stats/flip.c,v
retrieving revision 1.14
diff -u -p -r1.14 flip.c
--- src/language/stats/flip.c	11 Nov 2006 23:10:00 -0000	1.14
+++ src/language/stats/flip.c	25 Nov 2006 01:27:40 -0000
@@ -49,6 +49,7 @@
 #include <libpspp/str.h>
 
 #include "intprops.h"
+#include "minmax.h"
 
 #include "gettext.h"
 #define _(msgid) gettext (msgid)
@@ -231,7 +232,7 @@ make_new_var (struct dictionary *dict, c
 
     for (i = 1; i < 10000000; i++)
       {
-	int ofs = min (7 - intlog10 (i), len);
+	int ofs = MIN (7 - intlog10 (i), len);
 	memcpy (n, name, ofs);
 	sprintf (&n[ofs], "%d", i);
 
@@ -342,7 +343,7 @@ flip_sink_write (struct case_sink *sink,
         }
       else
 	{
-	  int width = min (flip->new_names->width, MAX_SHORT_STRING);
+	  int width = MIN (flip->new_names->width, MAX_SHORT_STRING);
 	  memcpy (v->name, case_str (c, flip->idx_to_fv[flip->new_names->index]),
                   width);
 	  v->name[width] = 0;
@@ -430,7 +431,7 @@ flip_file (struct flip_pgm *flip)
   
   for (case_idx = 0; case_idx < flip->case_cnt; )
     {
-      unsigned long read_cases = min (flip->case_cnt - case_idx,
+      unsigned long read_cases = MIN (flip->case_cnt - case_idx,
                                       case_capacity);
       size_t i;
 
Index: src/language/stats/frequencies.q
===================================================================
RCS file: /cvsroot/pspp/pspp/src/language/stats/frequencies.q,v
retrieving revision 1.22
diff -u -p -r1.22 frequencies.q
--- src/language/stats/frequencies.q	11 Nov 2006 23:10:00 -0000	1.22
+++ src/language/stats/frequencies.q	25 Nov 2006 01:27:41 -0000
@@ -1144,9 +1144,9 @@ full_dim (struct tab_table *t, struct ou
   int i;
 
   if (lab)
-    t->w[0] = min (tab_natural_width (t, d, 0), d->prop_em_width * 15);
+    t->w[0] = MIN (tab_natural_width (t, d, 0), d->prop_em_width * 15);
   for (i = lab; i < lab + 5; i++)
-    t->w[i] = max (tab_natural_width (t, d, i), d->prop_em_width * 8);
+    t->w[i] = MAX (tab_natural_width (t, d, i), d->prop_em_width * 8);
   for (i = 0; i < t->nr; i++)
     t->h[i] = d->font_height;
 }
@@ -1268,14 +1268,14 @@ dump_full (struct variable *v)
 static void
 condensed_dim (struct tab_table *t, struct outp_driver *d)
 {
-  int cum_w = max (outp_string_width (d, _("Cum"), OUTP_PROPORTIONAL),
-		   max (outp_string_width (d, _("Cum"), OUTP_PROPORTIONAL),
+  int cum_w = MAX (outp_string_width (d, _("Cum"), OUTP_PROPORTIONAL),
+		   MAX (outp_string_width (d, _("Cum"), OUTP_PROPORTIONAL),
 			outp_string_width (d, "000", OUTP_PROPORTIONAL)));
 
   int i;
 
   for (i = 0; i < 2; i++)
-    t->w[i] = max (tab_natural_width (t, d, i), d->prop_em_width * 8);
+    t->w[i] = MAX (tab_natural_width (t, d, i), d->prop_em_width * 8);
   for (i = 2; i < 4; i++)
     t->w[i] = cum_w;
   for (i = 0; i < t->nr; i++)
cvs diff: Diffing src/language/tests
cvs diff: Diffing src/language/utilities
cvs diff: Diffing src/language/xforms
cvs diff: Diffing src/libpspp
Index: src/libpspp/ChangeLog
===================================================================
RCS file: /cvsroot/pspp/pspp/src/libpspp/ChangeLog,v
retrieving revision 1.39
diff -u -p -r1.39 ChangeLog
--- src/libpspp/ChangeLog	22 Nov 2006 04:24:03 -0000	1.39
+++ src/libpspp/ChangeLog	25 Nov 2006 01:27:41 -0000
@@ -1,3 +1,9 @@
+Fri Nov 24 17:27:00 2006  Ben Pfaff  <blp@gnu.org>
+
+	* misc.h: (min) Removed.  All references updated to use MIN, from
+	minmax.h provided by gnulib.
+	(max) Ditto (for MAX).
+
 Sun Nov 19 09:22:26 2006  Ben Pfaff  <blp@gnu.org>
 
 	* str.c (ss_get_long): New function.
Index: src/libpspp/array.c
===================================================================
RCS file: /cvsroot/pspp/pspp/src/libpspp/array.c,v
retrieving revision 1.7
diff -u -p -r1.7 array.c
--- src/libpspp/array.c	29 Oct 2006 11:16:07 -0000	1.7
+++ src/libpspp/array.c	25 Nov 2006 01:27:42 -0000
@@ -99,6 +99,8 @@
 #include <libpspp/assertion.h>
 
 #include "message.h"
+
+#include "minmax.h"
 
 /* Finds an element in ARRAY, which contains COUNT elements of
    SIZE bytes each, using COMPARE for comparisons.  Returns the
@@ -700,12 +702,10 @@ sort (void *array, size_t count, size_t 
      of the array to sort, and END_PTR points at the very last element in
      the array (*not* one beyond it!). */
 
-#define min(x, y) ((x) < (y) ? (x) : (y))
-
   {
     char *const end_ptr = &first[size * (count - 1)];
     char *tmp_ptr = first;
-    char *thresh = min(end_ptr, first + max_thresh);
+    char *thresh = MIN (end_ptr, first + max_thresh);
     register char *run_ptr;
 
     /* Find smallest element in first threshold and place it at the
Index: src/libpspp/misc.h
===================================================================
RCS file: /cvsroot/pspp/pspp/src/libpspp/misc.h,v
retrieving revision 1.1
diff -u -p -r1.1 misc.h
--- src/libpspp/misc.h	4 Mar 2006 01:11:57 -0000	1.1
+++ src/libpspp/misc.h	25 Nov 2006 01:27:42 -0000
@@ -43,14 +43,6 @@
 #include <ieeefp.h>		/* Declares finite() under Solaris. */
 #endif
 
-#ifndef min
-#define min(A, B) ((A) < (B) ? (A) : (B))
-#endif
-
-#ifndef max
-#define max(A, B) ((A) > (B) ? (A) : (B))
-#endif
-
 /* Clamps A to be between B and C. */
 #define range(A, B, C) ((A) < (B) ? (B) : ((A) > (C) ? (C) : (A)))
 
cvs diff: Diffing src/math
Index: src/math/percentiles.c
===================================================================
RCS file: /cvsroot/pspp/pspp/src/math/percentiles.c,v
retrieving revision 1.4
diff -u -p -r1.4 percentiles.c
--- src/math/percentiles.c	25 Oct 2006 22:28:13 -0000	1.4
+++ src/math/percentiles.c	25 Nov 2006 01:27:42 -0000
@@ -19,18 +19,18 @@ Foundation, Inc., 51 Franklin Street, Fi
 02110-1301, USA. */
 
 #include <config.h>
+#include <assert.h>
 #include <libpspp/compiler.h>
 #include "factor-stats.h"
 #include "percentiles.h"
 #include <libpspp/misc.h>
 
+#include "minmax.h"
+
 #include "gettext.h"
 #define _(msgid) gettext (msgid)
 #define N_(msgid) msgid
 
-#include <assert.h>
-
-
 struct ptile_params
 {
   double g1, g1_star;
@@ -337,7 +337,7 @@ tukey_hinges(const struct weighted_value
   
   for ( i = 0 ; i < n_data ; ++i ) 
     {
-      c_star = min(c_star, wv[i]->w);
+      c_star = MIN(c_star, wv[i]->w);
     }
 
   if ( c_star > 1 ) c_star = 1;
Index: src/math/sort.c
===================================================================
RCS file: /cvsroot/pspp/pspp/src/math/sort.c,v
retrieving revision 1.17
diff -u -p -r1.17 sort.c
--- src/math/sort.c	5 Nov 2006 00:35:44 -0000	1.17
+++ src/math/sort.c	25 Nov 2006 01:27:43 -0000
@@ -44,6 +44,8 @@
 #include <libpspp/misc.h>
 #include <libpspp/str.h>
 
+#include "minmax.h"
+
 #include "gettext.h"
 #define _(msgid) gettext (msgid)
 
@@ -587,7 +589,7 @@ merge (struct external_sort *xsrt)
 {
   while (xsrt->run_cnt > 1)
     {
-      int order = min (MAX_MERGE_ORDER, xsrt->run_cnt);
+      int order = MIN (MAX_MERGE_ORDER, xsrt->run_cnt);
       int idx = choose_merge (xsrt->runs, xsrt->run_cnt, order);
       xsrt->runs[idx] = merge_once (xsrt, xsrt->runs + idx, order);
       remove_range (xsrt->runs, xsrt->run_cnt, sizeof *xsrt->runs,
cvs diff: Diffing src/math/linreg
cvs diff: Diffing src/math/time-series
cvs diff: Diffing src/math/ts
cvs diff: Diffing src/output
Index: src/output/table.c
===================================================================
RCS file: /cvsroot/pspp/pspp/src/output/table.c,v
retrieving revision 1.16
diff -u -p -r1.16 table.c
--- src/output/table.c	5 Nov 2006 05:20:53 -0000	1.16
+++ src/output/table.c	25 Nov 2006 01:27:43 -0000
@@ -142,8 +142,8 @@ tab_realloc (struct tab_table *t, int nc
   
   if (nc > t->cf)
     {
-      int mr1 = min (nr, t->nr);
-      int mc1 = min (nc, t->nc);
+      int mr1 = MIN (nr, t->nr);
+      int mc1 = MIN (nc, t->nc);
       
       struct substring *new_cc;
       unsigned char *new_ct;
cvs diff: Diffing src/output/charts
Index: src/output/charts/piechart.c
===================================================================
RCS file: /cvsroot/pspp/pspp/src/output/charts/piechart.c,v
retrieving revision 1.2
diff -u -p -r1.2 piechart.c
--- src/output/charts/piechart.c	15 Mar 2006 03:29:11 -0000	1.2
+++ src/output/charts/piechart.c	25 Nov 2006 01:27:43 -0000
@@ -33,7 +33,8 @@ Foundation, Inc., 51 Franklin Street, Fi
 #include <output/chart.h>
 #include <libpspp/str.h>
 #include <data/value-labels.h>
-#include <libpspp/misc.h>
+
+#include "minmax.h"
 
 
 /* Pie charts of course need to know Pi :) */
@@ -71,7 +72,7 @@ piechart_plot(const char *title, const s
   const double centre_x = (ch->data_right + ch->data_left ) / 2.0 ;
   const double centre_y = (ch->data_top + ch->data_bottom ) / 2.0 ;
 
-  const double radius = min( 
+  const double radius = MIN( 
 			    5.0 / 12.0 * (ch->data_top - ch->data_bottom),
 			    1.0 / 4.0 * (ch->data_right - ch->data_left)
 			    );
cvs diff: Diffing src/ui
cvs diff: Diffing src/ui/gui
cvs diff: Diffing src/ui/gui/icons
cvs diff: Diffing src/ui/terminal
cvs diff: Diffing tests
cvs diff: Diffing tests/bugs
cvs diff: Diffing tests/command
cvs diff: Diffing tests/expressions
cvs diff: Diffing tests/expressions/randist
cvs diff: Diffing tests/formats
cvs diff: Diffing tests/libpspp
cvs diff: Diffing tests/stats
cvs diff: Diffing tests/xforms
