pspp-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Pspp-cvs] pspp/src data/case-source.c data/case-source.h ...


From: John Darrington
Subject: [Pspp-cvs] pspp/src data/case-source.c data/case-source.h ...
Date: Sat, 14 Oct 2006 00:25:21 +0000

CVSROOT:        /sources/pspp
Module name:    pspp
Changes by:     John Darrington <jmd>   06/10/14 00:25:21

Modified files:
        src/data       : case-source.c case-source.h case.c case.h 
                         data-in.c file-name.c file-name.h 
                         value-labels.c value-labels.h 
        src/language   : command.c 
        src/language/data-io: data-writer.c data-writer.h matrix-data.c 
        src/language/dictionary: modify-variables.c 
        src/language/lexer: lexer.c lexer.h q2c.c variable-parser.c 
                            variable-parser.h 
        src/language/stats: aggregate.c crosstabs.q descriptives.c 
                            frequencies.q regression.q 
        src/language/tests: moments-test.c 
        src/language/xforms: compute.c 
        src/libpspp    : array.c array.h hash.c hash.h pool.c pool.h 
        src/output     : output.c output.h 

Log message:
        Changed a lot of ints to bools.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/pspp/src/data/case-source.c?cvsroot=pspp&r1=1.1&r2=1.2
http://cvs.savannah.gnu.org/viewcvs/pspp/src/data/case-source.h?cvsroot=pspp&r1=1.1&r2=1.2
http://cvs.savannah.gnu.org/viewcvs/pspp/src/data/case.c?cvsroot=pspp&r1=1.5&r2=1.6
http://cvs.savannah.gnu.org/viewcvs/pspp/src/data/case.h?cvsroot=pspp&r1=1.5&r2=1.6
http://cvs.savannah.gnu.org/viewcvs/pspp/src/data/data-in.c?cvsroot=pspp&r1=1.12&r2=1.13
http://cvs.savannah.gnu.org/viewcvs/pspp/src/data/file-name.c?cvsroot=pspp&r1=1.5&r2=1.6
http://cvs.savannah.gnu.org/viewcvs/pspp/src/data/file-name.h?cvsroot=pspp&r1=1.4&r2=1.5
http://cvs.savannah.gnu.org/viewcvs/pspp/src/data/value-labels.c?cvsroot=pspp&r1=1.6&r2=1.7
http://cvs.savannah.gnu.org/viewcvs/pspp/src/data/value-labels.h?cvsroot=pspp&r1=1.3&r2=1.4
http://cvs.savannah.gnu.org/viewcvs/pspp/src/language/command.c?cvsroot=pspp&r1=1.14&r2=1.15
http://cvs.savannah.gnu.org/viewcvs/pspp/src/language/data-io/data-writer.c?cvsroot=pspp&r1=1.5&r2=1.6
http://cvs.savannah.gnu.org/viewcvs/pspp/src/language/data-io/data-writer.h?cvsroot=pspp&r1=1.1&r2=1.2
http://cvs.savannah.gnu.org/viewcvs/pspp/src/language/data-io/matrix-data.c?cvsroot=pspp&r1=1.10&r2=1.11
http://cvs.savannah.gnu.org/viewcvs/pspp/src/language/dictionary/modify-variables.c?cvsroot=pspp&r1=1.7&r2=1.8
http://cvs.savannah.gnu.org/viewcvs/pspp/src/language/lexer/lexer.c?cvsroot=pspp&r1=1.7&r2=1.8
http://cvs.savannah.gnu.org/viewcvs/pspp/src/language/lexer/lexer.h?cvsroot=pspp&r1=1.5&r2=1.6
http://cvs.savannah.gnu.org/viewcvs/pspp/src/language/lexer/q2c.c?cvsroot=pspp&r1=1.14&r2=1.15
http://cvs.savannah.gnu.org/viewcvs/pspp/src/language/lexer/variable-parser.c?cvsroot=pspp&r1=1.7&r2=1.8
http://cvs.savannah.gnu.org/viewcvs/pspp/src/language/lexer/variable-parser.h?cvsroot=pspp&r1=1.2&r2=1.3
http://cvs.savannah.gnu.org/viewcvs/pspp/src/language/stats/aggregate.c?cvsroot=pspp&r1=1.14&r2=1.15
http://cvs.savannah.gnu.org/viewcvs/pspp/src/language/stats/crosstabs.q?cvsroot=pspp&r1=1.14&r2=1.15
http://cvs.savannah.gnu.org/viewcvs/pspp/src/language/stats/descriptives.c?cvsroot=pspp&r1=1.11&r2=1.12
http://cvs.savannah.gnu.org/viewcvs/pspp/src/language/stats/frequencies.q?cvsroot=pspp&r1=1.14&r2=1.15
http://cvs.savannah.gnu.org/viewcvs/pspp/src/language/stats/regression.q?cvsroot=pspp&r1=1.30&r2=1.31
http://cvs.savannah.gnu.org/viewcvs/pspp/src/language/tests/moments-test.c?cvsroot=pspp&r1=1.4&r2=1.5
http://cvs.savannah.gnu.org/viewcvs/pspp/src/language/xforms/compute.c?cvsroot=pspp&r1=1.6&r2=1.7
http://cvs.savannah.gnu.org/viewcvs/pspp/src/libpspp/array.c?cvsroot=pspp&r1=1.4&r2=1.5
http://cvs.savannah.gnu.org/viewcvs/pspp/src/libpspp/array.h?cvsroot=pspp&r1=1.3&r2=1.4
http://cvs.savannah.gnu.org/viewcvs/pspp/src/libpspp/hash.c?cvsroot=pspp&r1=1.5&r2=1.6
http://cvs.savannah.gnu.org/viewcvs/pspp/src/libpspp/hash.h?cvsroot=pspp&r1=1.2&r2=1.3
http://cvs.savannah.gnu.org/viewcvs/pspp/src/libpspp/pool.c?cvsroot=pspp&r1=1.4&r2=1.5
http://cvs.savannah.gnu.org/viewcvs/pspp/src/libpspp/pool.h?cvsroot=pspp&r1=1.5&r2=1.6
http://cvs.savannah.gnu.org/viewcvs/pspp/src/output/output.c?cvsroot=pspp&r1=1.15&r2=1.16
http://cvs.savannah.gnu.org/viewcvs/pspp/src/output/output.h?cvsroot=pspp&r1=1.5&r2=1.6

Patches:
Index: data/case-source.c
===================================================================
RCS file: /sources/pspp/pspp/src/data/case-source.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- data/case-source.c  27 Apr 2006 02:42:01 -0000      1.1
+++ data/case-source.c  14 Oct 2006 00:25:20 -0000      1.2
@@ -50,8 +50,8 @@
     }
 }
 
-/* Returns nonzero if CLASS is the class of SOURCE. */
-int
+/* Returns true if CLASS is the class of SOURCE. */
+bool
 case_source_is_class (const struct case_source *source,
                       const struct case_source_class *class) 
 {

Index: data/case-source.h
===================================================================
RCS file: /sources/pspp/pspp/src/data/case-source.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- data/case-source.h  27 Apr 2006 02:42:01 -0000      1.1
+++ data/case-source.h  14 Oct 2006 00:25:20 -0000      1.2
@@ -59,7 +59,7 @@
                                         void *);
 void free_case_source (struct case_source *);
 
-int case_source_is_class (const struct case_source *,
+bool case_source_is_class (const struct case_source *,
                           const struct case_source_class *);
 
 #endif /* case-source.h */

Index: data/case.c
===================================================================
RCS file: /sources/pspp/pspp/src/data/case.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -b -r1.5 -r1.6
--- data/case.c 14 Jul 2006 02:28:29 -0000      1.5
+++ data/case.c 14 Oct 2006 00:25:20 -0000      1.6
@@ -161,9 +161,9 @@
 }
 
 /* Attempts to create C as a new case that holds VALUE_CNT
-   values.  Returns nonzero if successful, zero if memory
+   values.  Returns true if successful, false if memory
    allocation failed. */
-int
+bool
 case_try_create (struct ccase *c, size_t value_cnt) 
 {
   c->case_data = malloc (case_size (value_cnt));
@@ -171,20 +171,20 @@
     {
       c->case_data->value_cnt = value_cnt;
       c->case_data->ref_cnt = 1;
-      return 1;
+      return true;
     }
-  else 
-    return 0;
+  
+  return false;
 }
 
 /* Tries to initialize CLONE as a copy of ORIG.
-   Returns nonzero if successful, zero if memory allocation
+   Returns true if successful, false if memory allocation
    failed. */
-int
+bool
 case_try_clone (struct ccase *clone, const struct ccase *orig) 
 {
   case_clone (clone, orig);
-  return 1;
+  return true;
 }
 
 #ifdef DEBUGGING

Index: data/case.h
===================================================================
RCS file: /sources/pspp/pspp/src/data/case.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -b -r1.5 -r1.6
--- data/case.h 14 Jul 2006 02:28:29 -0000      1.5
+++ data/case.h 14 Oct 2006 00:25:20 -0000      1.6
@@ -57,8 +57,8 @@
 void case_resize (struct ccase *, size_t old_cnt, size_t new_cnt);
 void case_swap (struct ccase *, struct ccase *);
 
-int case_try_create (struct ccase *, size_t value_cnt);
-int case_try_clone (struct ccase *, const struct ccase *);
+bool case_try_create (struct ccase *, size_t value_cnt);
+bool case_try_clone (struct ccase *, const struct ccase *);
 
 CASE_INLINE void case_copy (struct ccase *dst, size_t dst_idx,
                             const struct ccase *src, size_t src_idx,

Index: data/data-in.c
===================================================================
RCS file: /sources/pspp/pspp/src/data/data-in.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -b -r1.12 -r1.13
--- data/data-in.c      4 Jul 2006 04:39:04 -0000       1.12
+++ data/data-in.c      14 Oct 2006 00:25:20 -0000      1.13
@@ -93,7 +93,7 @@
     i->e--;
 }
 
-/* Returns nonzero if we're not at the end of the string being
+/* Returns true if we're not at the end of the string being
    parsed. */
 static inline bool
 have_char (struct data_in *i)

Index: data/file-name.c
===================================================================
RCS file: /sources/pspp/pspp/src/data/file-name.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -b -r1.5 -r1.6
--- data/file-name.c    9 Jun 2006 22:51:23 -0000       1.5
+++ data/file-name.c    14 Oct 2006 00:25:20 -0000      1.6
@@ -493,8 +493,8 @@
 
 /* Find out information about files. */
 
-/* Returns nonzero iff NAME specifies an absolute file name. */
-int
+/* Returns true iff NAME specifies an absolute file name. */
+bool
 fn_is_absolute (const char *name)
 {
 #ifdef unix
@@ -502,21 +502,21 @@
       || !strncmp (name, "./", 2)
       || !strncmp (name, "../", 3)
       || name[0] == '~')
-    return 1;
+    return true;
 #elif defined (__MSDOS__)
   if (name[0] == '\\'
       || !strncmp (name, ".\\", 2)
       || !strncmp (name, "..\\", 3)
       || (name[0] && name[1] == ':'))
-    return 1;
+    return true;
 #endif
   
-  return 0;
+  return false;
 }
   
-/* Returns 1 if FILE_NAME is a virtual file that doesn't
-   really exist on disk, 0 if it's a real file name. */
-int
+/* Returns true if FILE_NAME is a virtual file that doesn't
+   really exist on disk, false if it's a real file name. */
+bool
 fn_is_special (const char *file_name)
 {
   if (!strcmp (file_name, "-") || !strcmp (file_name, "stdin")
@@ -526,13 +526,13 @@
       || (*file_name && file_name[strlen (file_name) - 1] == '|')
 #endif
       )
-    return 1;
+    return true;
 
-  return 0;
+  return false;
 }
 
-/* Returns nonzero if file with name NAME exists. */
-int
+/* Returns true if file with name NAME exists. */
+bool
 fn_exists (const char *name)
 {
 #ifdef unix
@@ -542,9 +542,9 @@
 #else
   FILE *f = fopen (name, "r");
   if (!f)
-    return 0;
+    return false;
   fclose (f);
-  return 1;
+  return true;
 #endif
 }
 

Index: data/file-name.h
===================================================================
RCS file: /sources/pspp/pspp/src/data/file-name.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -b -r1.4 -r1.5
--- data/file-name.h    9 Jun 2006 22:51:23 -0000       1.4
+++ data/file-name.h    14 Oct 2006 00:25:20 -0000      1.5
@@ -21,6 +21,7 @@
 #define FILE_NAME_H 1
 
 #include <stdio.h>
+#include <stdbool.h>
 
 /* Search path for configuration files. */
 extern const char *config_path;
@@ -41,9 +42,9 @@
 
 char *fn_get_cwd (void);
 
-int fn_is_absolute (const char *fn);
-int fn_is_special (const char *fn);
-int fn_exists (const char *fn);
+bool fn_is_absolute (const char *fn);
+bool fn_is_special (const char *fn);
+bool fn_exists (const char *fn);
 char *fn_readlink (const char *fn);
 
 const char *fn_getenv (const char *variable);

Index: data/value-labels.c
===================================================================
RCS file: /sources/pspp/pspp/src/data/value-labels.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -b -r1.6 -r1.7
--- data/value-labels.c 26 Jun 2006 05:40:29 -0000      1.6
+++ data/value-labels.c 14 Oct 2006 00:25:20 -0000      1.7
@@ -189,10 +189,10 @@
 }
 
 /* If VLS does not already contain a value label for VALUE, adds
-   LABEL for it and returns nonzero.  Otherwise, returns zero.
+   LABEL for it and returns true.  Otherwise, returns false.
    Behavior is undefined if VLS's width is greater than
    MAX_SHORT_STRING. */
-int
+bool
 val_labs_add (struct val_labs *vls, union value value, const char *label) 
 {
   struct int_val_lab *ivl;
@@ -211,20 +211,17 @@
   if (*vlpp == NULL) 
     {
       *vlpp = ivl;
-      return 1; 
+      return true; 
     }
-  else 
-    {
       free_int_val_lab (ivl, vls);
-      return 0;
-    }
+  return false;
 }
 
-/* Sets LABEL as the value label for VALUE in VLS.  Returns zero
-   if there wasn't already a value label for VALUE, or nonzero if
+/* Sets LABEL as the value label for VALUE in VLS.  Returns false
+   if there wasn't already a value label for VALUE, or true if
    there was.  Behavior is undefined if VLS's width is greater
    than MAX_SHORT_STRING. */
-int
+bool
 val_labs_replace (struct val_labs *vls, union value value, const char *label) 
 {
   struct int_val_lab *ivl;
@@ -236,23 +233,23 @@
   if (vls->labels == NULL)
     {
       val_labs_add (vls, value, label);
-      return 0;
+      return false;
     }
 
   ivl = hsh_replace (vls->labels, create_int_val_lab (vls, value, label));
   if (ivl == NULL) 
-    return 0;
+    return false;
   else 
     {
       free_int_val_lab (ivl, vls);
-      return 1;
+      return true;
     }
 }
 
-/* Removes any value label for VALUE within VLS.  Returns nonzero
+/* Removes any value label for VALUE within VLS.  Returns true
    if a value label was removed. Behavior is undefined if VLS's
    width is greater than MAX_SHORT_STRING. */
-int 
+bool
 val_labs_remove (struct val_labs *vls, union value value) 
 {
   assert (vls != NULL);
@@ -266,7 +263,7 @@
       return deleted;
     }
   else
-    return 0;
+    return false;
 }
 
 /* Searches VLS for a value label for VALUE.  If successful,

Index: data/value-labels.h
===================================================================
RCS file: /sources/pspp/pspp/src/data/value-labels.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- data/value-labels.h 7 May 2006 02:04:12 -0000       1.3
+++ data/value-labels.h 14 Oct 2006 00:25:20 -0000      1.4
@@ -43,9 +43,9 @@
 bool val_labs_can_set_width (const struct val_labs *, int new_width);
 void val_labs_set_width (struct val_labs *, int new_width);
 
-int val_labs_add (struct val_labs *, union value, const char *);
-int val_labs_replace (struct val_labs *, union value, const char *);
-int val_labs_remove (struct val_labs *, union value);
+bool val_labs_add (struct val_labs *, union value, const char *);
+bool val_labs_replace (struct val_labs *, union value, const char *);
+bool val_labs_remove (struct val_labs *, union value);
 char *val_labs_find (const struct val_labs *, union value);
 
 struct val_labs_iterator;

Index: language/command.c
===================================================================
RCS file: /sources/pspp/pspp/src/language/command.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -b -r1.14 -r1.15
--- language/command.c  8 Jul 2006 03:05:51 -0000       1.14
+++ language/command.c  14 Oct 2006 00:25:20 -0000      1.15
@@ -264,9 +264,9 @@
   return string;
 }
 
-/* Returns nonzero if strings A and B can be confused based on
+/* Returns true if strings A and B can be confused based on
    their first three letters. */
-static int
+static bool
 conflicting_3char_prefixes (const char *a, const char *b) 
 {
   size_t aw_len, bw_len;
@@ -278,7 +278,7 @@
 
   /* Words that are the same don't conflict. */
   if (aw_len == bw_len && !buf_compare_case (aw, bw, aw_len))
-    return 0;
+    return false;
   
   /* Words that are otherwise the same in the first three letters
      do conflict. */
@@ -287,9 +287,9 @@
           || (bw_len == 3 && aw_len > 3)) && !buf_compare_case (aw, bw, 3);
 }
 
-/* Returns nonzero if CMD can be confused with another command
+/* Returns true if CMD can be confused with another command
    based on the first three letters of its first word. */
-static int
+static bool
 conflicting_3char_prefix_command (const struct command *cmd) 
 {
   assert (cmd >= commands && cmd < commands + command_cnt);

Index: language/data-io/data-writer.c
===================================================================
RCS file: /sources/pspp/pspp/src/language/data-io/data-writer.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -b -r1.5 -r1.6
--- language/data-io/data-writer.c      17 Apr 2006 01:54:15 -0000      1.5
+++ language/data-io/data-writer.c      14 Oct 2006 00:25:20 -0000      1.6
@@ -80,15 +80,15 @@
 }
 
 /* Writes record REC having length LEN to the file corresponding to
-   HANDLE.  REC is not null-terminated.  Returns nonzero on success,
-   zero on failure. */
-int
+   HANDLE.  REC is not null-terminated.  Returns true on success,
+   false on failure. */
+bool
 dfm_put_record (struct dfm_writer *w, const char *rec, size_t len)
 {
   assert (w != NULL);
 
   if (dfm_write_error (w))
-    return 0;
+    return false;
   
   if (fh_get_mode (w->fh) == FH_MODE_BINARY
       && len < fh_get_record_width (w->fh))

Index: language/data-io/data-writer.h
===================================================================
RCS file: /sources/pspp/pspp/src/language/data-io/data-writer.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- language/data-io/data-writer.h      4 Mar 2006 01:11:57 -0000       1.1
+++ language/data-io/data-writer.h      14 Oct 2006 00:25:20 -0000      1.2
@@ -29,6 +29,6 @@
 struct dfm_writer *dfm_open_writer (struct file_handle *);
 bool dfm_close_writer (struct dfm_writer *);
 bool dfm_write_error (const struct dfm_writer *);
-int dfm_put_record (struct dfm_writer *, const char *rec, size_t len);
+bool dfm_put_record (struct dfm_writer *, const char *rec, size_t len);
 
 #endif /* data-writer.h */

Index: language/data-io/matrix-data.c
===================================================================
RCS file: /sources/pspp/pspp/src/language/data-io/matrix-data.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -b -r1.10 -r1.11
--- language/data-io/matrix-data.c      8 Jul 2006 03:05:51 -0000       1.10
+++ language/data-io/matrix-data.c      14 Oct 2006 00:25:20 -0000      1.11
@@ -795,7 +795,7 @@
 }
 
 /* Is there at least one token left in the data file? */
-static int
+static bool
 another_token (struct dfm_reader *reader)
 {
   for (;;)
@@ -804,18 +804,19 @@
       size_t space_cnt;
       
       if (dfm_eof (reader))
-        return 0;
+        return false;
 
       p = dfm_get_record (reader);
       space_cnt = ss_span (p, ss_cstr (CC_SPACES));
       if (space_cnt < ss_length (p)) 
         {
           dfm_forward_columns (reader, space_cnt);
-          return 1;
+          return true;
         }
 
       dfm_forward_record (reader);
     }
+  NOT_REACHED();
 }
 
 /* Parse a MATRIX DATA token from READER into TOKEN. */
@@ -919,8 +920,8 @@
     double *split_values;       /* SPLIT FILE variable values. */
   };
 
-static int nr_read_splits (struct nr_aux_data *, int compare);
-static int nr_read_factors (struct nr_aux_data *, int cell);
+static bool nr_read_splits (struct nr_aux_data *, int compare);
+static bool nr_read_factors (struct nr_aux_data *, int cell);
 static bool nr_output_data (struct nr_aux_data *, struct ccase *,
                             write_case_func *, write_case_data);
 static bool matrix_data_read_without_rowtype (struct case_source *source,
@@ -1212,9 +1213,9 @@
 }
 
 /* Read the split file variables.  If COMPARE is 1, compares the
-   values read to the last values read and returns 1 if they're equal,
-   0 otherwise. */
-static int
+   values read to the last values read and returns true if they're equal,
+   false otherwise. */
+static bool
 nr_read_splits (struct nr_aux_data *nr, int compare)
 {
   struct matrix_data_pgm *mx = nr->mx;
@@ -1225,11 +1226,11 @@
   if (compare && just_read)
     {
       just_read = 0;
-      return 1;
+      return true;
     }
   
   if (dict_get_split_vars (default_dict) == NULL)
-    return 1;
+    return true;
 
   if (mx->single_split)
     {
@@ -1238,7 +1239,7 @@
           struct mxd_var *mv = dict_get_split_vars (default_dict)[0]->aux;
           nr->split_values[0] = ++mv->sub_type; 
         }
-      return 1;
+      return true;
     }
 
   if (!compare)
@@ -1249,12 +1250,12 @@
     {
       struct matrix_token token;
       if (!mget_token (&token, mx->reader))
-        return 0;
+        return false;
       if (token.type != MNUM)
         {
           msg (SE, _("Syntax error expecting SPLIT FILE value %s."),
                context (mx->reader));
-          return 0;
+          return false;
         }
 
       if (!compare)
@@ -1264,31 +1265,31 @@
           msg (SE, _("Expecting value %g for %s."),
                nr->split_values[i],
                dict_get_split_vars (default_dict)[i]->name);
-          return 0;
+          return false;
         }
     }
 
-  return 1;
+  return true;
 }
 
 /* Read the factors for cell CELL.  If COMPARE is 1, compares the
-   values read to the last values read and returns 1 if they're equal,
-   0 otherwise. */
-static int
+   values read to the last values read and returns true if they're equal,
+   false otherwise. */
+static bool
 nr_read_factors (struct nr_aux_data *nr, int cell)
 {
   struct matrix_data_pgm *mx = nr->mx;
-  int compare;
+  bool compare;
   
   if (mx->n_factors == 0)
-    return 1;
+    return true;
 
   assert (nr->max_cell_idx >= cell);
   if (cell != nr->max_cell_idx)
-    compare = 1;
+    compare = true;
   else
     {
-      compare = 0;
+      compare = false;
       nr->max_cell_idx++;
     }
       
@@ -1299,12 +1300,12 @@
       {
         struct matrix_token token;
        if (!mget_token (&token, mx->reader))
-         return 0;
+         return false;
        if (token.type != MNUM)
          {
            msg (SE, _("Syntax error expecting factor value %s."),
                 context (mx->reader));
-           return 0;
+           return false;
          }
        
        if (!compare)
@@ -1314,12 +1315,12 @@
            msg (SE, _("Syntax error expecting value %g for %s %s."),
                 nr->factor_values[i + mx->n_factors * cell],
                 mx->factors[i]->name, context (mx->reader));
-           return 0;
+           return false;
          }
       }
   }
 
-  return 1;
+  return true;
 }
 
 /* Write the contents of a cell having content type CONTENT and data
@@ -1457,14 +1458,14 @@
     struct factor_data *current;        /* Current factor. */
   };
 
-static int wr_read_splits (struct wr_aux_data *, struct ccase *,
+static bool wr_read_splits (struct wr_aux_data *, struct ccase *,
                            write_case_func *, write_case_data);
 static bool wr_output_data (struct wr_aux_data *, struct ccase *,
                            write_case_func *, write_case_data);
-static int wr_read_rowtype (struct wr_aux_data *, 
+static bool wr_read_rowtype (struct wr_aux_data *, 
                             const struct matrix_token *, struct dfm_reader *);
-static int wr_read_factors (struct wr_aux_data *);
-static int wr_read_indeps (struct wr_aux_data *);
+static bool wr_read_factors (struct wr_aux_data *);
+static bool wr_read_indeps (struct wr_aux_data *);
 static bool matrix_data_read_with_rowtype (struct case_source *,
                                            struct ccase *,
                                            write_case_func *,
@@ -1523,55 +1524,55 @@
 
 /* Read the split file variables.  If they differ from the previous
    set of split variables then output the data.  Returns success. */
-static int 
+static bool 
 wr_read_splits (struct wr_aux_data *wr,
                 struct ccase *c,
                 write_case_func *write_case, write_case_data wc_data)
 {
   struct matrix_data_pgm *mx = wr->mx;
-  int compare;
+  bool compare;
   size_t split_cnt;
 
   split_cnt = dict_get_split_cnt (default_dict);
   if (split_cnt == 0)
-    return 1;
+    return true;
 
   if (wr->split_values)
-    compare = 1;
+    compare = true;
   else
     {
-      compare = 0;
+      compare = false;
       wr->split_values = xnmalloc (split_cnt, sizeof *wr->split_values);
     }
   
   {
-    int different = 0;
+    bool different = false;
     int i;
 
     for (i = 0; i < split_cnt; i++)
       {
         struct matrix_token token;
        if (!mget_token (&token, mx->reader))
-         return 0;
+         return false;
        if (token.type != MNUM)
          {
            msg (SE, _("Syntax error %s expecting SPLIT FILE value."),
                 context (mx->reader));
-           return 0;
+           return false;
          }
 
        if (compare && wr->split_values[i] != token.number && !different)
          {
            if (!wr_output_data (wr, c, write_case, wc_data))
              return 0;
-           different = 1;
+           different = true;
            mx->cells = 0;
          }
        wr->split_values[i] = token.number;
       }
   }
 
-  return 1;
+  return true;
 }
 
 /* Compares doubles A and B, treating SYSMIS as greatest. */
@@ -1714,7 +1715,7 @@
 
 /* Sets ROWTYPE_ based on the given TOKEN read from READER.
    Return success. */
-static int 
+static bool 
 wr_read_rowtype (struct wr_aux_data *wr,
                  const struct matrix_token *token,
                  struct dfm_reader *reader)
@@ -1722,13 +1723,13 @@
   if (wr->content != -1)
     {
       msg (SE, _("Multiply specified ROWTYPE_ %s."), context (reader));
-      return 0;
+      return false;
     }
   if (token->type != MSTR)
     {
       msg (SE, _("Syntax error %s expecting ROWTYPE_ string."),
            context (reader));
-      return 0;
+      return false;
     }
   
   {
@@ -1750,12 +1751,12 @@
       return 0;
     }
 
-  return 1;
+  return true;
 }
 
 /* Read the factors for the current row.  Select a set of factors and
    point wr_current to it. */
-static int 
+static bool 
 wr_read_factors (struct wr_aux_data *wr)
 {
   struct matrix_data_pgm *mx = wr->mx;
@@ -1859,15 +1860,15 @@
 
 winnage:
   local_free (factor_values);
-  return 1;
+  return true;
 
 lossage:
   local_free (factor_values);
-  return 0;
+  return false;
 }
 
 /* Read the independent variables into wr->current. */
-static int 
+static bool 
 wr_read_indeps (struct wr_aux_data *wr)
 {
   struct matrix_data_pgm *mx = wr->mx;
@@ -1899,7 +1900,7 @@
        {
          msg (SE, _("Duplicate specification for %s."),
               content_names[wr->content]);
-         return 0;
+         return false;
        }
       if (type == 0)
        n_cols = mx->n_continuous;
@@ -1911,7 +1912,7 @@
        {
          msg (SE, _("Too many rows of matrix data for %s."),
               content_names[wr->content]);
-         return 0;
+         return false;
        }
       
       switch (mx->section)
@@ -1950,23 +1951,23 @@
       {
         struct matrix_token token;
        if (!mget_token (&token, mx->reader))
-         return 0;
+         return false;
        if (token.type != MNUM)
          {
            msg (SE, _("Syntax error expecting value for %s %s."),
                  dict_get_var (default_dict, mx->first_continuous + j)->name,
                  context (mx->reader));
-           return 0;
+           return false;
          }
 
        *cp++ = token.number;
       }
     if (mx->fmt != FREE
         && !force_eol (mx->reader, content_names[wr->content]))
-      return 0;
+      return false;
   }
 
-  return 1;
+  return true;
 }
 
 /* Matrix source. */

Index: language/dictionary/modify-variables.c
===================================================================
RCS file: /sources/pspp/pspp/src/language/dictionary/modify-variables.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -b -r1.7 -r1.8
--- language/dictionary/modify-variables.c      8 Jul 2006 03:05:51 -0000       
1.7
+++ language/dictionary/modify-variables.c      14 Oct 2006 00:25:20 -0000      
1.8
@@ -73,7 +73,7 @@
     size_t rename_cnt;
   };
 
-static int rearrange_dict (struct dictionary *d,
+static bool rearrange_dict (struct dictionary *d,
                            const struct var_modification *vm);
 
 /* Performs MODIFY VARS command. */
@@ -466,11 +466,11 @@
 }
 
 /* Reoders, removes, and renames variables in dictionary D
-   according to VM.  Returns nonzero if successful, zero if there
+   according to VM.  Returns true if successful, false if there
    would have been duplicate variable names if the modifications
    had been carried out.  In the latter case, the dictionary is
    not modified. */
-static int
+static bool
 rearrange_dict (struct dictionary *d, const struct var_modification *vm)
 {
   char **rename_old_names;
@@ -484,7 +484,7 @@
   /* Check whether the modifications will cause duplicate
      names. */
   if (!validate_var_modification (d, vm))
-    return 0;
+    return false;
 
   /* Record the old names of variables to rename.  After
      variables are deleted, we can't depend on the variables to
@@ -524,5 +524,5 @@
   free (rename_vars);
   free (rename_new_names);
 
-  return 1;
+  return true;
 }

Index: language/lexer/lexer.c
===================================================================
RCS file: /sources/pspp/pspp/src/language/lexer/lexer.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -b -r1.7 -r1.8
--- language/lexer/lexer.c      8 Jul 2006 03:05:51 -0000       1.7
+++ language/lexer/lexer.c      14 Oct 2006 00:25:20 -0000      1.8
@@ -69,11 +69,11 @@
 /* Pointer to next token in getl_buf. */
 static char *prog;
 
-/* Nonzero only if this line ends with a terminal dot. */
-static int dot;
+/* True only if this line ends with a terminal dot. */
+static bool dot;
 
-/* Nonzero only if the last token returned was T_STOP. */
-static int eof;
+/* True only if the last token returned was T_STOP. */
+static bool eof;
 
 /* If nonzero, next token returned by lex_get().
    Used only in exceptional circumstances. */
@@ -186,7 +186,7 @@
            }
          else if (!lex_get_line ())
            {
-             eof = 1;
+             eof = true;
              token = T_STOP;
 #if DUMP_TOKENS
              dump_token ();
@@ -497,48 +497,48 @@
   
 /* Token matching functions. */
 
-/* If TOK is the current token, skips it and returns nonzero.
-   Otherwise, returns zero. */
-int
+/* If TOK is the current token, skips it and returns true
+   Otherwise, returns false. */
+bool
 lex_match (int t)
 {
   if (token == t)
     {
       lex_get ();
-      return 1;
+      return true;
     }
   else
-    return 0;
+    return false;
 }
 
 /* If the current token is the identifier S, skips it and returns
-   nonzero.  The identifier may be abbreviated to its first three
+   true.  The identifier may be abbreviated to its first three
    letters.
-   Otherwise, returns zero. */
-int
+   Otherwise, returns false. */
+bool
 lex_match_id (const char *s)
 {
   if (token == T_ID && lex_id_match (s, tokid))
     {
       lex_get ();
-      return 1;
+      return true;
     }
   else
-    return 0;
+    return false;
 }
 
-/* If the current token is integer N, skips it and returns nonzero.
-   Otherwise, returns zero. */
-int
+/* If the current token is integer N, skips it and returns true.
+   Otherwise, returns false. */
+bool
 lex_match_int (int x)
 {
   if (lex_is_integer () && lex_integer () == x)
     {
       lex_get ();
-      return 1;
+      return true;
     }
   else
-    return 0;
+    return false;
 }
 
 /* Forced matches. */
@@ -546,91 +546,91 @@
 /* If this token is identifier S, fetches the next token and returns
    nonzero.
    Otherwise, reports an error and returns zero. */
-int
+bool
 lex_force_match_id (const char *s)
 {
   if (token == T_ID && lex_id_match (s, tokid))
     {
       lex_get ();
-      return 1;
+      return true;
     }
   else
     {
       lex_error (_("expecting `%s'"), s);
-      return 0;
+      return false;
     }
 }
 
 /* If the current token is T, skips the token.  Otherwise, reports an
-   error and returns from the current function with return value 0. */
-int
+   error and returns from the current function with return value false. */
+bool
 lex_force_match (int t)
 {
   if (token == t)
     {
       lex_get ();
-      return 1;
+      return true;
     }
   else
     {
       lex_error (_("expecting `%s'"), lex_token_name (t));
-      return 0;
+      return false;
     }
 }
 
-/* If this token is a string, does nothing and returns nonzero.
-   Otherwise, reports an error and returns zero. */
-int
+/* If this token is a string, does nothing and returns true.
+   Otherwise, reports an error and returns false. */
+bool
 lex_force_string (void)
 {
   if (token == T_STRING)
-    return 1;
+    return true;
   else
     {
       lex_error (_("expecting string"));
-      return 0;
+      return false;
     }
 }
 
-/* If this token is an integer, does nothing and returns nonzero.
-   Otherwise, reports an error and returns zero. */
-int
+/* If this token is an integer, does nothing and returns true.
+   Otherwise, reports an error and returns false. */
+bool
 lex_force_int (void)
 {
   if (lex_is_integer ())
-    return 1;
+    return true;
   else
     {
       lex_error (_("expecting integer"));
-      return 0;
+      return false;
     }
 }
        
-/* If this token is a number, does nothing and returns nonzero.
-   Otherwise, reports an error and returns zero. */
-int
+/* If this token is a number, does nothing and returns true.
+   Otherwise, reports an error and returns false. */
+bool
 lex_force_num (void)
 {
   if (lex_is_number ())
-    return 1;
+    return true;
   else
     {
       lex_error (_("expecting number"));
-      return 0;
+      return false;
     }
 }
        
-/* If this token is an identifier, does nothing and returns nonzero.
-   Otherwise, reports an error and returns zero. */
-int
+/* If this token is an identifier, does nothing and returns true.
+   Otherwise, reports an error and returns false. */
+bool
 lex_force_id (void)
 {
   if (token == T_ID)
-    return 1;
+    return true;
   else
     {
       lex_error (_("expecting identifier"));
-      return 0;
+      return false;
     }
 }
 /* Weird token functions. */
@@ -726,7 +726,8 @@
 lex_discard_line (void)
 {
   prog = ds_end (&getl_buf);
-  dot = put_token = 0;
+  dot = false;
+  put_token = 0;
 }
 
 /* Sets the current position in the current line to P, which must be
@@ -961,7 +962,7 @@
 void
 lex_reset_eof (void)
 {
-  eof = 0;
+  eof = false;
 }
 
 /* Skip a COMMENT command. */
@@ -973,7 +974,7 @@
       if (!lex_get_line ()) 
         {
           put_token = T_STOP;
-          eof = 1;
+          eof = true;
           return;
         }
       

Index: language/lexer/lexer.h
===================================================================
RCS file: /sources/pspp/pspp/src/language/lexer/lexer.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -b -r1.5 -r1.6
--- language/lexer/lexer.h      18 Jul 2006 04:57:01 -0000      1.5
+++ language/lexer/lexer.h      14 Oct 2006 00:25:20 -0000      1.6
@@ -52,17 +52,17 @@
 long lex_integer (void);
 
 /* Token matching functions. */
-int lex_match (int);
-int lex_match_id (const char *);
-int lex_match_int (int);
+bool lex_match (int);
+bool lex_match_id (const char *);
+bool lex_match_int (int);
 
 /* Forcible matching functions. */
-int lex_force_match (int);
-int lex_force_match_id (const char *);
-int lex_force_int (void);
-int lex_force_num (void);
-int lex_force_id (void);
-int lex_force_string (void);
+bool lex_force_match (int);
+bool lex_force_match_id (const char *);
+bool lex_force_int (void);
+bool lex_force_num (void);
+bool lex_force_id (void);
+bool lex_force_string (void);
        
 /* Weird token functions. */
 int lex_look_ahead (void);

Index: language/lexer/q2c.c
===================================================================
RCS file: /sources/pspp/pspp/src/language/lexer/q2c.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -b -r1.14 -r1.15
--- language/lexer/q2c.c        8 Jul 2006 03:05:51 -0000       1.14
+++ language/lexer/q2c.c        14 Oct 2006 00:25:20 -0000      1.15
@@ -43,7 +43,7 @@
 char *program_name;
 
 /* Have the input and output files been opened yet? */
-int is_open;
+bool is_open;
 
 /* Input, output files. */
 FILE *in, *out;
@@ -80,7 +80,7 @@
 {
   if (!is_open)
     return;
-  is_open = 0;
+  is_open = false;
   fclose (in);
   fclose (out);
   if (remove (ofn) == -1)
@@ -225,7 +225,7 @@
 
 /* Read one line from the input file into buf.  Lines having special
    formats are handled specially. */
-static int
+static bool
 get_line (void)
 {
   ln++;
@@ -233,7 +233,7 @@
     {
       if (ferror (in))
        fail ("%s: fgets: %s", ifn, strerror (errno));
-      return 0;
+      return false;
     }
 
   cp = strchr (buf, '\n');
@@ -241,7 +241,7 @@
     *cp = '\0';
 
   cp = buf;
-  return 1;
+  return true;
 }
 
 /* Symbol table manager. */
@@ -418,29 +418,29 @@
 }
 
 /* Checks whether the current token is the identifier S; if so, skips
-   the token and returns 1; otherwise, returns 0. */
-static int
+   the token and returns true; otherwise, returns false. */
+static bool
 match_id (const char *s)
 {
   if (token == T_ID && !strcmp (tokstr, s))
     {
       lex_get ();
-      return 1;
+      return true;
     }
-  return 0;
+  return false;
 }
 
 /* Checks whether the current token is T.  If so, skips the token and
-   returns 1; otherwise, returns 0. */
-static int
+   returns true; otherwise, returns false. */
+static bool
 match_token (int t)
 {
   if (token == t)
     {
       lex_get ();
-      return 1;
+      return true;
     }
-  return 0;
+  return false;
 }
 
 /* Force the current token to be T, and skip it. */
@@ -948,8 +948,8 @@
   }
 }
 
-/* Returns 1 if string T is a PSPP keyword, 0 otherwise. */
-static int
+/* Returns true if string T is a PSPP keyword, false otherwise. */
+static bool
 is_keyword (const char *t)
 {
   static const char *kw[] =
@@ -961,8 +961,8 @@
 
   for (cp = kw; *cp; cp++)
     if (!strcmp (t, *cp))
-      return 1;
-  return 0;
+      return true;
+  return false;
 }
 
 /* Transforms a string NAME into a valid C identifier: makes
@@ -1165,7 +1165,7 @@
 
   /* Write out prototypes for custom_*() functions as necessary. */
   {
-    int seen = 0;
+    bool seen = false;
     subcommand *sbc;
 
     for (sbc = subcommands; sbc; sbc = sbc->next)
@@ -1173,7 +1173,7 @@
        {
          if (!seen)
            {
-             seen = 1;
+             seen = true;
              dump (0, "/* Prototype for custom subcommands of %s. */",
                    cmdname);
            }
@@ -1610,7 +1610,7 @@
          dump (0, "int x;");
        }
       dump (1, "if (!lex_force_string ())");
-      dump (0, "return 0;");
+      dump (0, "return false;");
       outdent ();
       if (sbc->restriction)
        {
@@ -1860,12 +1860,12 @@
       }
   }
 
-  dump (-1, "return 1;");
+  dump (-1, "return true;");
   dump (0, nullstr);
   dump (-1, "lossage:");
   indent ();
   dump (0, "free_%s (p);", make_identifier (cmdname));
-  dump (0, "return 0;");
+  dump (0, "return false;");
   dump (-1, "}");
   dump (0, nullstr);
 }
@@ -1995,7 +1995,7 @@
   if (!out)
     fail ("%s: open: %s.", ofn, strerror (errno));
 
-  is_open = 1;
+  is_open = true;
   buf = xmalloc (MAX_LINE_LEN);
   tokstr = xmalloc (MAX_TOK_LEN);
 

Index: language/lexer/variable-parser.c
===================================================================
RCS file: /sources/pspp/pspp/src/language/lexer/variable-parser.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -b -r1.7 -r1.8
--- language/lexer/variable-parser.c    18 Jul 2006 04:57:01 -0000      1.7
+++ language/lexer/variable-parser.c    14 Oct 2006 00:25:20 -0000      1.8
@@ -99,9 +99,9 @@
 
 /* Parses a set of variables from dictionary D given options
    OPTS.  Resulting list of variables stored in *VAR and the
-   number of variables into *CNT.  Returns nonzero only if
+   number of variables into *CNT.  Returns true only if
    successful. */
-int
+bool
 parse_variables (const struct dictionary *d, struct variable ***var,
                  size_t *cnt, int opts) 
 {
@@ -122,10 +122,10 @@
 
 /* Parses a set of variables from dictionary D given options
    OPTS.  Resulting list of variables stored in *VARS and the
-   number of variables into *VAR_CNT.  Returns nonzero only if
+   number of variables into *VAR_CNT.  Returns true only if
    successful.  Same behavior as parse_variables, except that all
    allocations are taken from the given POOL. */
-int
+bool
 parse_variables_pool (struct pool *pool, const struct dictionary *dict,
                       struct variable ***vars, size_t *var_cnt, int opts) 
 {
@@ -145,17 +145,17 @@
 
 /* Parses a variable name from VS.  If successful, sets *IDX to
    the variable's index in VS, *CLASS to the variable's
-   dictionary class, and returns nonzero.  Returns zero on
+   dictionary class, and returns true.  Returns false on
    failure. */
-static int
+static bool
 parse_var_idx_class (const struct var_set *vs, size_t *idx,
                      enum dict_class *class)
 {
   if (!parse_vs_variable_idx (vs, idx))
-    return 0;
+    return false;
 
   *class = dict_class_from_id (var_set_get_var (vs, *idx)->name);
-  return 1;
+  return true;
 }
 
 /* Add the variable from VS with index IDX to the list of
@@ -218,10 +218,10 @@
       add_variable (v, nv, mv, included, pv_opts, vs, i);
 }
 
-/* Note that if parse_variables() returns 0, *v is free()'d.
-   Conversely, if parse_variables() returns non-zero, then *nv is
+/* Note that if parse_variables() returns false, *v is free()'d.
+   Conversely, if parse_variables() returns true, then *nv is
    nonzero and *v is non-NULL. */
-int
+bool
 parse_var_set_vars (const struct var_set *vs, 
                     struct variable ***v, size_t *nv,
                     int pv_opts)
@@ -381,7 +381,7 @@
 
 /* Parses a list of variable names according to the DATA LIST version
    of the TO convention.  */
-int
+bool
 parse_DATA_LIST_vars (char ***names, size_t *nnames, int pv_opts)
 {
   int n1, n2;
@@ -511,7 +511,7 @@
    version of the TO convention.  Same args as
    parse_DATA_LIST_vars(), except that all allocations are taken
    from the given POOL. */
-int
+bool
 parse_DATA_LIST_vars_pool (struct pool *pool,
                            char ***names, size_t *nnames, int pv_opts)
 {
@@ -532,7 +532,7 @@
 /* Parses a list of variables where some of the variables may be
    existing and the rest are to be created.  Same args as
    parse_DATA_LIST_vars(). */
-int
+bool
 parse_mixed_vars (char ***names, size_t *nnames, int pv_opts)
 {
   size_t i;
@@ -579,7 +579,7 @@
    existing and the rest are to be created.  Same args as
    parse_mixed_vars(), except that all allocations are taken
    from the given POOL. */
-int
+bool
 parse_mixed_vars_pool (struct pool *pool,
                        char ***names, size_t *nnames, int pv_opts)
 {

Index: language/lexer/variable-parser.h
===================================================================
RCS file: /sources/pspp/pspp/src/language/lexer/variable-parser.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- language/lexer/variable-parser.h    18 Jul 2006 04:57:01 -0000      1.2
+++ language/lexer/variable-parser.h    14 Oct 2006 00:25:20 -0000      1.3
@@ -57,17 +57,17 @@
 
 struct variable *parse_variable (void);
 struct variable *parse_dict_variable (const struct dictionary *);
-int parse_variables (const struct dictionary *, struct variable ***, size_t *,
+bool parse_variables (const struct dictionary *, struct variable ***, size_t *,
                      int opts);
-int parse_variables_pool (struct pool *, const struct dictionary *,
+bool parse_variables_pool (struct pool *, const struct dictionary *,
                           struct variable ***, size_t *, int opts);
-int parse_var_set_vars (const struct var_set *, struct variable ***, size_t *,
+bool parse_var_set_vars (const struct var_set *, struct variable ***, size_t *,
                         int opts);
-int parse_DATA_LIST_vars (char ***names, size_t *cnt, int opts);
-int parse_DATA_LIST_vars_pool (struct pool *,
+bool parse_DATA_LIST_vars (char ***names, size_t *cnt, int opts);
+bool parse_DATA_LIST_vars_pool (struct pool *,
                                char ***names, size_t *cnt, int opts);
-int parse_mixed_vars (char ***names, size_t *cnt, int opts);
-int parse_mixed_vars_pool (struct pool *,
+bool parse_mixed_vars (char ***names, size_t *cnt, int opts);
+bool parse_mixed_vars_pool (struct pool *,
                            char ***names, size_t *cnt, int opts);
 
 #endif /* variable-parser.h */

Index: language/stats/aggregate.c
===================================================================
RCS file: /sources/pspp/pspp/src/language/stats/aggregate.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -b -r1.14 -r1.15
--- language/stats/aggregate.c  23 Sep 2006 00:15:58 -0000      1.14
+++ language/stats/aggregate.c  14 Oct 2006 00:25:20 -0000      1.15
@@ -154,9 +154,9 @@
                                        const struct ccase *);
 
 /* Prototypes. */
-static int parse_aggregate_functions (struct agr_proc *);
+static bool parse_aggregate_functions (struct agr_proc *);
 static void agr_destroy (struct agr_proc *);
-static int aggregate_single_case (struct agr_proc *agr,
+static bool aggregate_single_case (struct agr_proc *agr,
                                   const struct ccase *input,
                                   struct ccase *output);
 static void dump_aggregate_info (struct agr_proc *agr, struct ccase *output);
@@ -351,7 +351,7 @@
 }
 
 /* Parse all the aggregate functions. */
-static int
+static bool
 parse_aggregate_functions (struct agr_proc *agr)
 {
   struct agr_var *tail; /* Tail of linked list starting at agr->vars. */
@@ -642,10 +642,10 @@
       if (!lex_match ('/'))
        {
          if (token == '.')
-           return 1;
+           return true;
 
          lex_error ("expecting end of command");
-         return 0;
+         return false;
        }
       continue;
       
@@ -667,7 +667,7 @@
          }
       free (src);
        
-      return 0;
+      return false;
     }
 }
 
@@ -713,9 +713,9 @@
 static void dump_aggregate_info (struct agr_proc *, struct ccase *);
 
 /* Processes a single case INPUT for aggregation.  If output is
-   warranted, writes it to OUTPUT and returns nonzero.
-   Otherwise, returns zero and OUTPUT is unmodified. */
-static int
+   warranted, writes it to OUTPUT and returns true.
+   Otherwise, returns false and OUTPUT is unmodified. */
+static bool
 aggregate_single_case (struct agr_proc *agr,
                        const struct ccase *input, struct ccase *output)
 {

Index: language/stats/crosstabs.q
===================================================================
RCS file: /sources/pspp/pspp/src/language/stats/crosstabs.q,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -b -r1.14 -r1.15
--- language/stats/crosstabs.q  23 Sep 2006 00:15:58 -0000      1.14
+++ language/stats/crosstabs.q  14 Oct 2006 00:25:20 -0000      1.15
@@ -1702,11 +1702,11 @@
 }
 
 /* Put VALUE into cell (C,R) of TABLE, suffixed with character
-   SUFFIX if nonzero.  If MARK_MISSING is nonzero the entry is
+   SUFFIX if nonzero.  If MARK_MISSING is true the entry is
    additionally suffixed with a letter `M'. */
 static void
 format_cell_entry (struct tab_table *table, int c, int r, double value,
-                   char suffix, int mark_missing)
+                   char suffix, bool mark_missing)
 {
   const struct fmt_spec f = {FMT_F, 10, 1};
   union value v;
@@ -1755,13 +1755,13 @@
          tab_hline (table, TAL_1, -1, n_cols, 0);
        for (c = 0; c < n_cols; c++)
          {
-            int mark_missing = 0;
+            bool mark_missing = false;
             double expected_value = row_tot[r] * col_tot[c] / W;
             if (cmd.miss == CRS_REPORT
                 && (mv_is_num_user_missing (&x->vars[COL_VAR]->miss, cols[c].f)
                     || mv_is_num_user_missing (&x->vars[ROW_VAR]->miss,
                                                rows[r].f)))
-              mark_missing = 1;
+              mark_missing = true;
            for (i = 0; i < num_cells; i++)
              {
                double v;
@@ -1821,11 +1821,11 @@
     for (r = 0; r < n_rows; r++) 
       {
         char suffix = 0;
-        int mark_missing = 0;
+        bool mark_missing = false;
 
         if (cmd.miss == CRS_REPORT
             && mv_is_num_user_missing (&x->vars[ROW_VAR]->miss, rows[r].f))
-          mark_missing = 1;
+          mark_missing = true;
 
         for (i = 0; i < num_cells; i++)
           {
@@ -1874,13 +1874,13 @@
     for (c = 0; c <= n_cols; c++)
       {
        double ct = c < n_cols ? col_tot[c] : W;
-        int mark_missing = 0;
+        bool mark_missing = false;
         char suffix = 0;
         int i;
            
         if (cmd.miss == CRS_REPORT && c < n_cols 
             && mv_is_num_user_missing (&x->vars[COL_VAR]->miss, cols[c].f))
-          mark_missing = 1;
+          mark_missing = true;
 
         for (i = 0; i < num_cells; i++)
          {

Index: language/stats/descriptives.c
===================================================================
RCS file: /sources/pspp/pspp/src/language/stats/descriptives.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -b -r1.11 -r1.12
--- language/stats/descriptives.c       25 Sep 2006 09:35:15 -0000      1.11
+++ language/stats/descriptives.c       14 Oct 2006 00:25:20 -0000      1.12
@@ -40,6 +40,7 @@
 #include <libpspp/compiler.h>
 #include <libpspp/magic.h>
 #include <libpspp/message.h>
+#include <libpspp/assertion.h>
 #include <math/moments.h>
 #include <output/manager.h>
 #include <output/table.h>
@@ -172,8 +173,8 @@
 static void free_dsc_proc (struct dsc_proc *);
 
 /* Z-score functions. */
-static int try_name (struct dsc_proc *dsc, char *name);
-static int generate_z_varname (struct dsc_proc *dsc, char *z_name,
+static bool try_name (struct dsc_proc *dsc, char *name);
+static bool generate_z_varname (struct dsc_proc *dsc, char *z_name,
                                const char *name, size_t *z_cnt);
 static void dump_z_table (struct dsc_proc *);
 static void setup_z_trns (struct dsc_proc *);
@@ -465,26 +466,26 @@
 
 /* Z scores. */
 
-/* Returns 0 if NAME is a duplicate of any existing variable name or
-   of any previously-declared z-var name; otherwise returns 1. */
-static int
+/* Returns false if NAME is a duplicate of any existing variable name or
+   of any previously-declared z-var name; otherwise returns true. */
+static bool
 try_name (struct dsc_proc *dsc, char *name)
 {
   size_t i;
 
   if (dict_lookup_var (default_dict, name) != NULL)
-    return 0;
+    return false;
   for (i = 0; i < dsc->var_cnt; i++)
     if (!strcasecmp (dsc->vars[i].z_name, name))
-      return 0;
-  return 1;
+      return false;
+  return true;
 }
 
 /* Generates a name for a Z-score variable based on a variable
    named VAR_NAME, given that *Z_CNT generated variable names are
-   known to already exist.  If successful, returns nonzero and
-   copies the new name into Z_NAME.  On failure, returns zero. */
-static int
+   known to already exist.  If successful, returns true and
+   copies the new name into Z_NAME.  On failure, returns false. */
+static bool
 generate_z_varname (struct dsc_proc *dsc, char *z_name,
                     const char *var_name, size_t *z_cnt)
 {
@@ -496,7 +497,7 @@
   if (try_name (dsc, name))
     {
       strcpy (z_name, name);
-      return 1;
+      return true;
     }
 
   /* Generate a synthetic name. */
@@ -517,15 +518,16 @@
          msg (SE, _("Ran out of generic names for Z-score variables.  "
                     "There are only 126 generic names: ZSC001-ZSC0999, "
                     "STDZ01-STDZ09, ZZZZ01-ZZZZ09, ZQZQ01-ZQZQ09."));
-         return 0;
+         return false;
        }
       
       if (try_name (dsc, name))
        {
          strcpy (z_name, name);
-         return 1;
+         return true;
        }
     }
+  NOT_REACHED();
 }
 
 /* Outputs a table describing the mapping between source
@@ -693,7 +695,7 @@
 
 /* Statistical calculation. */
 
-static int listwise_missing (struct dsc_proc *dsc, const struct ccase *c);
+static bool listwise_missing (struct dsc_proc *dsc, const struct ccase *c);
 
 /* Calculates and displays descriptive statistics for the cases
    in CF. */
@@ -841,9 +843,9 @@
   return true;
 }
 
-/* Returns nonzero if any of the descriptives variables in DSC's
-   variable list have missing values in case C, zero otherwise. */
-static int
+/* Returns true if any of the descriptives variables in DSC's
+   variable list have missing values in case C, false otherwise. */
+static bool
 listwise_missing (struct dsc_proc *dsc, const struct ccase *c) 
 {
   size_t i;
@@ -856,9 +858,9 @@
       if (x == SYSMIS
           || (!dsc->include_user_missing
               && mv_is_num_user_missing (&dv->v->miss, x)))
-        return 1;
+        return true;
     }
-  return 0;
+  return false;
 }
 
 /* Statistical display. */

Index: language/stats/frequencies.q
===================================================================
RCS file: /sources/pspp/pspp/src/language/stats/frequencies.q,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -b -r1.14 -r1.15
--- language/stats/frequencies.q        23 Sep 2006 00:15:58 -0000      1.14
+++ language/stats/frequencies.q        14 Oct 2006 00:25:21 -0000      1.15
@@ -712,9 +712,9 @@
   return 0;
 }
 
-/* Returns nonzero iff the value in struct freq F is non-missing
+/* Returns true iff the value in struct freq F is non-missing
    for variable V. */
-static int
+static bool
 not_missing (const void *f_, void *v_) 
 {
   const struct freq *f = f_;

Index: language/stats/regression.q
===================================================================
RCS file: /sources/pspp/pspp/src/language/stats/regression.q,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -b -r1.30 -r1.31
--- language/stats/regression.q 25 Sep 2006 09:35:15 -0000      1.30
+++ language/stats/regression.q 14 Oct 2006 00:25:21 -0000      1.31
@@ -949,7 +949,7 @@
 /*
   Is variable k the dependent variable?
  */
-static int
+static bool
 is_depvar (size_t k, const struct variable *v)
 {
   /*
@@ -957,9 +957,9 @@
      names match.
    */
   if (!compare_var_names (v, v_variables[k], NULL))
-    return 1;
+    return true;
 
-  return 0;
+  return false;
 }
 
 /*

Index: language/tests/moments-test.c
===================================================================
RCS file: /sources/pspp/pspp/src/language/tests/moments-test.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -b -r1.4 -r1.5
--- language/tests/moments-test.c       16 Apr 2006 01:05:15 -0000      1.4
+++ language/tests/moments-test.c       14 Oct 2006 00:25:21 -0000      1.5
@@ -29,7 +29,7 @@
 
 #define _(msgid) gettext (msgid)
 
-static int
+static bool
 read_values (double **values, double **weights, size_t *cnt) 
 {
   size_t cap = 0;
@@ -47,7 +47,7 @@
           if (!lex_is_number ())
             {
               lex_error (_("expecting weight value"));
-              return 0;
+              return false;
             }
           weight = tokval;
           lex_get ();
@@ -65,7 +65,7 @@
       (*cnt)++;
     }
 
-  return 1;
+  return true;
 }
 
 int

Index: language/xforms/compute.c
===================================================================
RCS file: /sources/pspp/pspp/src/language/xforms/compute.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -b -r1.6 -r1.7
--- language/xforms/compute.c   25 Sep 2006 09:35:15 -0000      1.6
+++ language/xforms/compute.c   14 Oct 2006 00:25:21 -0000      1.7
@@ -372,7 +372,7 @@
     return lvalue->vector->var[0]->type;
 }
 
-/* Returns nonzero if LVALUE has a vector as its target. */
+/* Returns true if LVALUE has a vector as its target. */
 static bool
 lvalue_is_vector (const struct lvalue *lvalue) 
 {

Index: libpspp/array.c
===================================================================
RCS file: /sources/pspp/pspp/src/libpspp/array.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -b -r1.4 -r1.5
--- libpspp/array.c     8 Jul 2006 03:05:52 -0000       1.4
+++ libpspp/array.c     14 Oct 2006 00:25:21 -0000      1.5
@@ -148,24 +148,24 @@
 
 /* Counts and return the number of elements in ARRAY, which
    contains COUNT elements of SIZE bytes each, for which
-   PREDICATE returns nonzero.  AUX is passed as auxiliary data to
+   PREDICATE returns true.  AUX is passed as auxiliary data to
    PREDICATE. */
 size_t
 count_if (const void *array, size_t count, size_t size,
           algo_predicate_func *predicate, void *aux) 
 {
   const char *first = array;
-  size_t nonzero_cnt = 0;
+  size_t true_cnt = 0;
 
   while (count-- > 0) 
     {
       if (predicate (first, aux) != 0)
-        nonzero_cnt++;
+        true_cnt++;
       
       first += size;
     }
 
-  return nonzero_cnt;
+  return true_cnt;
 }
 
 /* Byte-wise swap two items of size SIZE. */
@@ -224,18 +224,18 @@
 }
 
 /* Reorders ARRAY, which contains COUNT elements of SIZE bytes
-   each, so that the elements for which PREDICATE returns nonzero
+   each, so that the elements for which PREDICATE returns true
    precede those for which PREDICATE returns zero.  AUX is
    passed to each predicate as auxiliary data.  Returns the
-   number of elements for which PREDICATE returns nonzero.  Not
+   number of elements for which PREDICATE returns true.  Not
    stable. */
 size_t 
 partition (void *array, size_t count, size_t size,
            algo_predicate_func *predicate, void *aux) 
 {
-  size_t nonzero_cnt = count;
+  size_t true_cnt = count;
   char *first = array;
-  char *last = first + nonzero_cnt * size;
+  char *last = first + true_cnt * size;
 
   for (;;)
     {
@@ -250,7 +250,7 @@
 
           first += size; 
         }
-      nonzero_cnt--;
+      true_cnt--;
 
       /* Move LAST backward to point to last element that passes
          PREDICATE. */
@@ -263,7 +263,7 @@
           else if (predicate (last, aux)) 
             break;
           else
-            nonzero_cnt--;
+            true_cnt--;
         }
       
       /* By swapping FIRST and LAST we extend the starting and
@@ -274,30 +274,30 @@
     }
 
  done:
-  assert (is_partitioned (array, count, size, nonzero_cnt, predicate, aux));
-  return nonzero_cnt; 
+  assert (is_partitioned (array, count, size, true_cnt, predicate, aux));
+  return true_cnt; 
 }
 
 /* Checks whether ARRAY, which contains COUNT elements of SIZE
-   bytes each, is partitioned such that PREDICATE returns nonzero
-   for the first NONZERO_CNT elements and zero for the remaining
+   bytes each, is partitioned such that PREDICATE returns true
+   for the first TRUE_CNT elements and zero for the remaining
    elements.  AUX is passed as auxiliary data to PREDICATE. */
-int
+bool
 is_partitioned (const void *array, size_t count, size_t size,
-                size_t nonzero_cnt,
+                size_t true_cnt,
                 algo_predicate_func *predicate, void *aux) 
 {
   const char *first = array;
   size_t idx;
 
-  assert (nonzero_cnt <= count);
-  for (idx = 0; idx < nonzero_cnt; idx++)
+  assert (true_cnt <= count);
+  for (idx = 0; idx < true_cnt; idx++)
     if (predicate (first + idx * size, aux) == 0)
-      return 0;
-  for (idx = nonzero_cnt; idx < count; idx++)
+      return false;
+  for (idx = true_cnt; idx < count; idx++)
     if (predicate (first + idx * size, aux) != 0)
-      return 0;
-  return 1;
+      return false;
+  return true;
 }
 
 /* Copies the COUNT elements of SIZE bytes each from ARRAY to
@@ -397,7 +397,7 @@
     void *aux;
   };
 
-static int
+static bool
 not (const void *data, void *pred_aux_) 
 {
   const struct pred_aux *pred_aux = pred_aux_;
@@ -753,7 +753,7 @@
 /* Tests whether ARRAY, which contains COUNT elements of SIZE
    bytes each, is sorted in order according to COMPARE.  AUX is
    passed to COMPARE as auxiliary data. */
-int
+bool
 is_sorted (const void *array, size_t count, size_t size,
            algo_compare_func *compare, void *aux) 
 {
@@ -762,9 +762,9 @@
       
   for (idx = 0; idx + 1 < count; idx++)
     if (compare (first + idx * size, first + (idx + 1) * size, aux) > 0)
-      return 0; 
+      return false; 
   
-  return 1;
+  return true;
 }
 
 /* Computes the generalized set difference, ARRAY1 minus ARRAY2,
@@ -958,10 +958,10 @@
 }
 
 /* ARRAY contains COUNT elements of SIZE bytes each.  This
-   function tests whether ARRAY is a heap and returns 1 if so, 0
-   otherwise.  Uses COMPARE to compare elements, passing AUX as
-   auxiliary data. */
-int
+   function tests whether ARRAY is a heap and returns true if so, 
+   false otherwise.  Uses COMPARE to compare elements, passing 
+   AUX as auxiliary data. */
+bool
 is_heap (const void *array, size_t count, size_t size,
          algo_compare_func *compare, void *aux) 
 {
@@ -973,9 +973,9 @@
       size_t parent = child / 2;
       if (compare (first + (parent - 1) * size,
                    first + (child - 1) * size, aux) < 0)
-        return 0;
+        return false;
     }
 
-  return 1;
+  return true;
 }
 

Index: libpspp/array.h
===================================================================
RCS file: /sources/pspp/pspp/src/libpspp/array.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- libpspp/array.h     7 May 2006 10:11:51 -0000       1.3
+++ libpspp/array.h     14 Oct 2006 00:25:21 -0000      1.4
@@ -2,14 +2,14 @@
 #define ALGORITHM_H 1
 
 #include <stddef.h>
+#include <stdbool.h>
 
 /* Compares A and B, given auxiliary data AUX, and returns a
    strcmp()-type result. */
 typedef int algo_compare_func (const void *a, const void *b, void *aux);
 
-/* Tests a predicate on DATA, given auxiliary data AUX, and
-   returns nonzero if true or zero if false. */
-typedef int algo_predicate_func (const void *data, void *aux);
+/* Tests a predicate on DATA, given auxiliary data AUX */
+typedef bool algo_predicate_func (const void *data, void *aux);
 
 /* Returns a random number in the range 0 through MAX exclusive,
    given auxiliary data AUX. */
@@ -37,7 +37,7 @@
 
 /* Counts and return the number of elements in ARRAY, which
    contains COUNT elements of SIZE bytes each, for which
-   PREDICATE returns nonzero.  AUX is passed as auxiliary data to
+   PREDICATE returns true.  AUX is passed as auxiliary data to
    PREDICATE. */
 size_t count_if (const void *array, size_t count, size_t size,
                  algo_predicate_func *predicate, void *aux);
@@ -51,7 +51,7 @@
 /* Tests whether ARRAY, which contains COUNT elements of SIZE
    bytes each, is sorted in order according to COMPARE.  AUX is
    passed to COMPARE as auxiliary data. */
-int is_sorted (const void *array, size_t count, size_t size,
+bool is_sorted (const void *array, size_t count, size_t size,
                algo_compare_func *compare, void *aux);
 
 /* Makes the elements in ARRAY unique, by moving up duplicates,
@@ -65,19 +65,19 @@
                     algo_compare_func *compare, void *aux);
 
 /* Reorders ARRAY, which contains COUNT elements of SIZE bytes
-   each, so that the elements for which PREDICATE returns nonzero
-   precede those for which PREDICATE returns zero.  AUX is passed
+   each, so that the elements for which PREDICATE returns true
+   precede those for which PREDICATE returns false.  AUX is passed
    as auxiliary data to PREDICATE.  Returns the number of
-   elements for which PREDICATE returns nonzero.  Not stable. */
+   elements for which PREDICATE returns true.  Not stable. */
 size_t partition (void *array, size_t count, size_t size,
                   algo_predicate_func *predicate, void *aux);
 
 /* Checks whether ARRAY, which contains COUNT elements of SIZE
-   bytes each, is partitioned such that PREDICATE returns nonzero
-   for the first NONZERO_CNT elements and zero for the remaining
+   bytes each, is partitioned such that PREDICATE returns true
+   for the first TRUE_CNT elements and zero for the remaining
    elements.  AUX is passed as auxiliary data to PREDICATE. */
-int is_partitioned (const void *array, size_t count, size_t size,
-                    size_t nonzero_cnt,
+bool is_partitioned (const void *array, size_t count, size_t size,
+                    size_t true_cnt,
                     algo_predicate_func *predicate, void *aux);
 
 /* Randomly reorders ARRAY, which contains COUNT elements of SIZE
@@ -164,7 +164,7 @@
 
 /* Finds the first pair of adjacent equal elements in ARRAY,
    which has COUNT elements of SIZE bytes.  Returns the first
-   element in ARRAY such that COMPARE returns zero when it and
+   element in ARRAY such that COMPARE returns true when it and
    its successor element are compared.  AUX is passed to COMPARE
    as auxiliary data. */
 void *adjacent_find_equal (const void *array, size_t count, size_t size,
@@ -202,10 +202,10 @@
                 algo_compare_func *compare, void *aux);
 
 /* ARRAY contains COUNT elements of SIZE bytes each.  This
-   function tests whether ARRAY is a heap and returns 1 if so, 0
-   otherwise.  Uses COMPARE to compare elements, passing AUX as
-   auxiliary data. */
-int is_heap (const void *array, size_t count, size_t size,
+   function tests whether ARRAY is a heap and returns true if so, 
+   false otherwise.  Uses COMPARE to compare elements, passing 
+   AUX as auxiliary data. */
+bool is_heap (const void *array, size_t count, size_t size,
              algo_compare_func *compare, void *aux);
 
 

Index: libpspp/hash.c
===================================================================
RCS file: /sources/pspp/pspp/src/libpspp/hash.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -b -r1.5 -r1.6
--- libpspp/hash.c      26 Jun 2006 05:37:53 -0000      1.5
+++ libpspp/hash.c      14 Oct 2006 00:25:21 -0000      1.6
@@ -18,6 +18,7 @@
    02110-1301, USA. */
 
 #include <config.h>
+#include <stdbool.h>
 #include "hash.h"
 #include "message.h"
 #include <assert.h>
@@ -304,9 +305,9 @@
 #endif
 }
 
-/* A "algo_predicate_func" that returns nonzero if DATA points
+/* A "algo_predicate_func" that returns true if DATA points
    to a non-null void. */
-static int
+static bool
 not_null (const void *data_, void *aux UNUSED) 
 {
   void *const *data = data_;
@@ -495,13 +496,13 @@
 }
 
 /* Deletes the entry in hash table H that matches TARGET.
-   Returns nonzero if an entry was deleted.
+   Returns true if an entry was deleted.
 
    Uses Knuth's Algorithm 6.4R (Deletion with linear probing).
    Because our load factor is at most 1/2, the average number of
    moves that this algorithm makes should be at most 2 - ln 2 ~=
    1.65. */
-int
+bool
 hsh_delete (struct hsh_table *h, const void *target) 
 {
   unsigned i = locate_matching_entry (h, target);
@@ -522,7 +523,7 @@
             {
               i = (i - 1) & (h->size - 1);
               if (h->entries[i] == NULL)
-                return 1;
+                return true;
               
               r = h->hash (h->entries[i], h->aux) & (h->size - 1);
             }
@@ -531,7 +532,7 @@
         }
     }
   else
-    return 0;
+    return false;
 }
 
 /* Iteration. */

Index: libpspp/hash.h
===================================================================
RCS file: /sources/pspp/pspp/src/libpspp/hash.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- libpspp/hash.h      4 Mar 2006 21:26:39 -0000       1.2
+++ libpspp/hash.h      14 Oct 2006 00:25:21 -0000      1.3
@@ -21,6 +21,7 @@
 #define hash_h 1
 
 #include <stddef.h>
+#include <stdbool.h>
 
 typedef int hsh_compare_func (const void *, const void *, void *aux);
 typedef unsigned hsh_hash_func (const void *, void *aux);
@@ -55,7 +56,7 @@
 void *hsh_insert (struct hsh_table *, void *);
 void *hsh_replace (struct hsh_table *, void *);
 void *hsh_find (struct hsh_table *, const void *);
-int hsh_delete (struct hsh_table *, const void *);
+bool hsh_delete (struct hsh_table *, const void *);
 
 /* Iteration. */
 void *hsh_first (struct hsh_table *, struct hsh_iterator *);

Index: libpspp/pool.c
===================================================================
RCS file: /sources/pspp/pspp/src/libpspp/pool.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -b -r1.4 -r1.5
--- libpspp/pool.c      8 Jul 2006 03:05:52 -0000       1.4
+++ libpspp/pool.c      14 Oct 2006 00:25:21 -0000      1.5
@@ -777,8 +777,8 @@
 }
 
 /* Unregisters previously registered P from POOL.
-   Returns nonzero only if P was found to be registered in POOL. */
-int
+   Returns true only if P was found to be registered in POOL. */
+bool
 pool_unregister (struct pool *pool, void *p)
 {
   assert (pool && p);
@@ -790,11 +790,11 @@
       if (g->type == POOL_GIZMO_REGISTERED && g->p.registered.p == p)
        {
          delete_gizmo (pool, g);
-         return 1;
+         return true;
        }
   }
   
-  return 0;
+  return false;
 }
 
 /* Partial freeing. */

Index: libpspp/pool.h
===================================================================
RCS file: /sources/pspp/pspp/src/libpspp/pool.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -b -r1.5 -r1.6
--- libpspp/pool.h      9 May 2006 23:49:00 -0000       1.5
+++ libpspp/pool.h      14 Oct 2006 00:25:21 -0000      1.6
@@ -22,6 +22,7 @@
 
 #include <stdarg.h>
 #include <stdio.h>
+#include <stdbool.h>
 #include "compiler.h"
 
 /* Maximum size of a suballocated block.  Larger blocks are allocated
@@ -90,7 +91,7 @@
 
 /* Custom allocations. */
 void pool_register (struct pool *, void (*free) (void *), void *p);
-int pool_unregister (struct pool *, void *);
+bool pool_unregister (struct pool *, void *);
 
 /* Partial freeing. */
 void pool_mark (struct pool *, struct pool_mark *);

Index: output/output.c
===================================================================
RCS file: /sources/pspp/pspp/src/output/output.c,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -b -r1.15 -r1.16
--- output/output.c     13 Jul 2006 03:58:44 -0000      1.15
+++ output/output.c     14 Oct 2006 00:25:21 -0000      1.16
@@ -927,9 +927,9 @@
 
 /* Stores the dimensions in 1/72000" units of paper identified by
    SIZE, which is of form `HORZ x VERT' or `HORZ by VERT' where each
-   of HORZ and VERT are dimensions, into *H and *V.  Return nonzero on
+   of HORZ and VERT are dimensions, into *H and *V.  Return true on
    success. */
-static int
+static bool
 internal_get_paper_size (char *size, int *h, int *v)
 {
   char *tail;
@@ -938,7 +938,7 @@
     size++;
   *h = outp_evaluate_dimension (size, &tail);
   if (tail == NULL)
-    return 0;
+    return false;
   while (isspace ((unsigned char) *tail))
     tail++;
   if (*tail == 'x')
@@ -948,7 +948,7 @@
   else
     {
       error (0, 0, _("`x' expected in paper size `%s'"), size);
-      return 0;
+      return false;
     }
   *v = outp_evaluate_dimension (tail, &tail);
   if (tail == NULL)
@@ -958,19 +958,19 @@
   if (*tail)
     {
       error (0, 0, _("trailing garbage `%s' on paper size `%s'"), tail, size);
-      return 0;
+      return false;
     }
   
-  return 1;
+  return true;
 }
 
 /* Stores the dimensions, in 1/72000" units, of paper identified by
    SIZE into *H and *V.  SIZE may be a pair of dimensions of form `H x
    V', or it may be a case-insensitive paper identifier, which is
-   looked up in the `papersize' configuration file.  Returns nonzero
+   looked up in the `papersize' configuration file.  Returns true
    on success.  May modify SIZE. */
 /* Don't read further unless you've got a strong stomach. */
-int
+bool
 outp_get_paper_size (char *size, int *h, int *v)
 {
   struct paper_size
@@ -987,7 +987,7 @@
   int line_number = 0;
 
   bool free_it = false;
-  int result = 0;
+  bool result = false;
   char *ep;
 
   while (isspace ((unsigned char) *size))

Index: output/output.h
===================================================================
RCS file: /sources/pspp/pspp/src/output/output.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -b -r1.5 -r1.6
--- output/output.h     9 Jun 2006 22:51:24 -0000       1.5
+++ output/output.h     14 Oct 2006 00:25:21 -0000      1.6
@@ -155,7 +155,7 @@
 int outp_match_keyword (const char *, struct outp_option *, int *);
 
 int outp_evaluate_dimension (char *, char **);
-int outp_get_paper_size (char *, int *h, int *v);
+bool outp_get_paper_size (char *, int *h, int *v);
 
 void outp_open_page (struct outp_driver *);
 void outp_close_page (struct outp_driver *);




reply via email to

[Prev in Thread] Current Thread [Next in Thread]