? assert.patch
? msg-loc.patch
? pspp-0.4.2.tar.gz
? doc/.dirstamp
? gl/Makefile
? gl/Makefile.am
? gl/Makefile.in
? gl/alloca.c
? gl/alloca.h
? gl/alloca_.h
? gl/asnprintf.c
? gl/asprintf.c
? gl/c-ctype.c
? gl/c-ctype.h
? gl/c-strtod.c
? gl/c-strtod.h
? gl/charset.alias
? gl/config.charset
? gl/error.c
? gl/error.h
? gl/exit.h
? gl/exitfail.c
? gl/exitfail.h
? gl/full-read.c
? gl/full-read.h
? gl/full-write.c
? gl/full-write.h
? gl/getdelim.c
? gl/getdelim.h
? gl/gethostname.c
? gl/getline.c
? gl/getline.h
? gl/getlogin_r.c
? gl/getlogin_r.h
? gl/getopt.c
? gl/getopt1.c
? gl/getopt_.h
? gl/getopt_int.h
? gl/gettext.h
? gl/intprops.h
? gl/lbrkprop.h
? gl/linebreak.c
? gl/linebreak.h
? gl/localcharset.c
? gl/localcharset.h
? gl/mbchar.c
? gl/mbchar.h
? gl/mbuiter.h
? gl/memcasecmp.c
? gl/memcasecmp.h
? gl/memchr.c
? gl/memcmp.c
? gl/memmem.c
? gl/memmem.h
? gl/memmove.c
? gl/memset.c
? gl/minmax.h
? gl/printf-args.c
? gl/printf-args.h
? gl/printf-parse.c
? gl/printf-parse.h
? gl/progname.c
? gl/progname.h
? gl/readlink.c
? gl/ref-add.sed
? gl/ref-add.sin
? gl/ref-del.sed
? gl/ref-del.sin
? gl/safe-read.c
? gl/safe-read.h
? gl/safe-write.c
? gl/safe-write.h
? gl/size_max.h
? gl/snprintf.c
? gl/snprintf.h
? gl/stat-macros.h
? gl/stdbool_.h
? gl/stdint_.h
? gl/stpcpy.c
? gl/stpcpy.h
? gl/strcase.h
? gl/strcasecmp.c
? gl/strcspn.c
? gl/strerror.c
? gl/strftime.c
? gl/strftime.h
? gl/strncasecmp.c
? gl/strndup.c
? gl/strndup.h
? gl/strnlen.c
? gl/strnlen.h
? gl/strnlen1.c
? gl/strnlen1.h
? gl/strpbrk.c
? gl/strpbrk.h
? gl/strsep.c
? gl/strsep.h
? gl/strstr.c
? gl/strstr.h
? gl/strtod.c
? gl/strtok_r.c
? gl/strtok_r.h
? gl/strtol.c
? gl/strtoul.c
? gl/time_r.c
? gl/time_r.h
? gl/utf16-ucs4.h
? gl/utf8-ucs4.h
? gl/vasnprintf.c
? gl/vasnprintf.h
? gl/vasprintf.c
? gl/vasprintf.h
? gl/vsnprintf.c
? gl/vsnprintf.h
? gl/xalloc-die.c
? gl/xalloc.h
? gl/xasprintf.c
? gl/xmalloc.c
? gl/xreadlink.c
? gl/xreadlink.h
? gl/xsize.h
? gl/xstrndup.c
? gl/xstrndup.h
? gl/xvasprintf.c
? gl/xvasprintf.h
? gl/m4/alloca.m4
? gl/m4/assert.m4
? gl/m4/c-strtod.m4
? gl/m4/codeset.m4
? gl/m4/eoverflow.m4
? gl/m4/error.m4
? gl/m4/exitfail.m4
? gl/m4/extensions.m4
? gl/m4/getdelim.m4
? gl/m4/gethostname.m4
? gl/m4/getline.m4
? gl/m4/getlogin_r.m4
? gl/m4/getopt.m4
? gl/m4/gettext.m4
? gl/m4/glibc2.m4
? gl/m4/glibc21.m4
? gl/m4/gnulib-cache.m4
? gl/m4/gnulib-comp.m4
? gl/m4/gnulib-tool.m4
? gl/m4/iconv.m4
? gl/m4/intdiv0.m4
? gl/m4/intmax.m4
? gl/m4/intmax_t.m4
? gl/m4/inttypes-pri.m4
? gl/m4/inttypes.m4
? gl/m4/inttypes_h.m4
? gl/m4/isc-posix.m4
? gl/m4/lcmessage.m4
? gl/m4/lib-ld.m4
? gl/m4/lib-link.m4
? gl/m4/lib-prefix.m4
? gl/m4/linebreak.m4
? gl/m4/localcharset.m4
? gl/m4/longdouble.m4
? gl/m4/longlong.m4
? gl/m4/mbchar.m4
? gl/m4/mbiter.m4
? gl/m4/mbrtowc.m4
? gl/m4/mbstate_t.m4
? gl/m4/memcasecmp.m4
? gl/m4/memchr.m4
? gl/m4/memcmp.m4
? gl/m4/memmem.m4
? gl/m4/memmove.m4
? gl/m4/memset.m4
? gl/m4/minmax.m4
? gl/m4/nls.m4
? gl/m4/onceonly_2_57.m4
? gl/m4/po.m4
? gl/m4/printf-posix.m4
? gl/m4/progtest.m4
? gl/m4/readlink.m4
? gl/m4/restrict.m4
? gl/m4/safe-read.m4
? gl/m4/safe-write.m4
? gl/m4/signed.m4
? gl/m4/size_max.m4
? gl/m4/snprintf.m4
? gl/m4/ssize_t.m4
? gl/m4/stat-macros.m4
? gl/m4/stdarg.m4
? gl/m4/stdbool.m4
? gl/m4/stdint.m4
? gl/m4/stdint_h.m4
? gl/m4/stpcpy.m4
? gl/m4/strcase.m4
? gl/m4/strcspn.m4
? gl/m4/strerror.m4
? gl/m4/strerror_r.m4
? gl/m4/strftime.m4
? gl/m4/strndup.m4
? gl/m4/strnlen.m4
? gl/m4/strpbrk.m4
? gl/m4/strsep.m4
? gl/m4/strstr.m4
? gl/m4/strtod.m4
? gl/m4/strtok_r.m4
? gl/m4/strtol.m4
? gl/m4/strtoul.m4
? gl/m4/time_r.m4
? gl/m4/tm_gmtoff.m4
? gl/m4/uintmax_t.m4
? gl/m4/ulonglong.m4
? gl/m4/unistd_h.m4
? gl/m4/utf-ucs4.m4
? gl/m4/vasnprintf.m4
? gl/m4/vasprintf.m4
? gl/m4/vsnprintf.m4
? gl/m4/wchar_t.m4
? gl/m4/wint_t.m4
? gl/m4/xalloc.m4
? gl/m4/xreadlink.m4
? gl/m4/xsize.m4
? gl/m4/xstrndup.m4
? gl/m4/xvasprintf.m4
? intl/ChangeLog
? intl/Makefile
? intl/Makefile.in
? intl/VERSION
? intl/bindtextdom.c
? intl/config.charset
? intl/dcgettext.c
? intl/dcigettext.c
? intl/dcngettext.c
? intl/dgettext.c
? intl/dngettext.c
? intl/eval-plural.h
? intl/explodename.c
? intl/finddomain.c
? intl/gettext.c
? intl/gettextP.h
? intl/gmo.h
? intl/hash-string.h
? intl/intl-compat.c
? intl/l10nflist.c
? intl/langprefs.c
? intl/libgnuintl.h.in
? intl/loadinfo.h
? intl/loadmsgcat.c
? intl/localcharset.c
? intl/localcharset.h
? intl/locale.alias
? intl/localealias.c
? intl/localename.c
? intl/log.c
? intl/ngettext.c
? intl/os2compat.c
? intl/os2compat.h
? intl/osdep.c
? intl/plural-exp.c
? intl/plural-exp.h
? intl/plural.c
? intl/plural.y
? intl/printf-args.c
? intl/printf-args.h
? intl/printf-parse.c
? intl/printf-parse.h
? intl/printf.c
? intl/ref-add.sin
? intl/ref-del.sin
? intl/relocatable.c
? intl/relocatable.h
? intl/textdomain.c
? intl/vasnprintf.c
? intl/vasnprintf.h
? intl/vasnwprintf.h
? intl/wprintf-parse.h
? intl/xsize.h
? lib/gsl-extras/.deps
? lib/gsl-extras/.dirstamp
? lib/gtksheet/.deps
? lib/gtksheet/.dirstamp
? lib/linreg/.deps
? lib/linreg/.dirstamp
? m4/Makefile.am
? m4/codeset.m4
? m4/gettext.m4
? m4/glibc2.m4
? m4/glibc21.m4
? m4/iconv.m4
? m4/intdiv0.m4
? m4/intmax.m4
? m4/inttypes-pri.m4
? m4/inttypes.m4
? m4/inttypes_h.m4
? m4/isc-posix.m4
? m4/lcmessage.m4
? m4/lib-ld.m4
? m4/lib-link.m4
? m4/lib-prefix.m4
? m4/longdouble.m4
? m4/longlong.m4
? m4/nls.m4
? m4/po.m4
? m4/printf-posix.m4
? m4/progtest.m4
? m4/signed.m4
? m4/size_max.m4
? m4/stdint_h.m4
? m4/uintmax_t.m4
? m4/ulonglong.m4
? m4/wchar_t.m4
? m4/wint_t.m4
? m4/xsize.m4
? src/data/.deps
? src/data/.dirstamp
? src/language/.deps
? src/language/.dirstamp
? src/language/control/.deps
? src/language/control/.dirstamp
? src/language/data-io/.deps
? src/language/data-io/.dirstamp
? src/language/data-io/file-handle.c
? src/language/data-io/list.c
? src/language/dictionary/.deps
? src/language/dictionary/.dirstamp
? src/language/expressions/.deps
? src/language/expressions/.dirstamp
? src/language/lexer/.deps
? src/language/lexer/.dirstamp
? src/language/lexer/q2c
? src/language/stats/.deps
? src/language/stats/.dirstamp
? src/language/stats/correlations.c
? src/language/stats/crosstabs.c
? src/language/stats/examine.c
? src/language/stats/frequencies.c
? src/language/stats/means.c
? src/language/stats/oneway.c
? src/language/stats/rank.c
? src/language/stats/regression.c
? src/language/stats/t-test.c
? src/language/tests/.deps
? src/language/tests/.dirstamp
? src/language/utilities/.deps
? src/language/utilities/.dirstamp
? src/language/utilities/set.c
? src/language/xforms/.deps
? src/language/xforms/.dirstamp
? src/libpspp/.deps
? src/libpspp/.dirstamp
? src/libpspp/version.c
? src/math/.deps
? src/math/.dirstamp
? src/math/linreg/.deps
? src/math/linreg/.dirstamp
? src/math/ts/.deps
? src/math/ts/.dirstamp
? src/output/.deps
? src/output/.dirstamp
? src/output/charts/.deps
? src/output/charts/.dirstamp
? src/ui/gui/.deps
? src/ui/gui/.dirstamp
? src/ui/gui/psppire
? src/ui/terminal/.deps
? src/ui/terminal/.dirstamp
? src/ui/terminal/pspp
? tests/libpspp/.deps
? tests/libpspp/.dirstamp
? tests/libpspp/ll-test
? tests/libpspp/llx-test
Index: src/data/any-reader.c
===================================================================
RCS file: /sources/pspp/pspp/src/data/any-reader.c,v
retrieving revision 1.5
diff -U3 -r1.5 any-reader.c
--- src/data/any-reader.c	17 Apr 2006 01:54:15 -0000	1.5
+++ src/data/any-reader.c	4 Jul 2006 06:05:04 -0000
@@ -19,7 +19,7 @@
 
 #include <config.h>
 #include "any-reader.h"
-#include <assert.h>
+#include <libpspp/Assert.h>
 #include <errno.h>
 #include <stdbool.h>
 #include <stdio.h>
@@ -139,7 +139,7 @@
       return make_any_reader (SCRATCH_FILE,
                               scratch_reader_open (handle, dict));
     }
-  abort ();
+  AssertNotReached ();
 }
 
 /* Reads a single case from READER into C.
@@ -158,7 +158,7 @@
     case SCRATCH_FILE:
       return scratch_reader_read_case (reader->private, c);
     }
-  abort ();
+  AssertNotReached ();
 }
 
 /* Returns true if an I/O error has occurred on READER, false
@@ -177,7 +177,7 @@
     case SCRATCH_FILE:
       return scratch_reader_error (reader->private);
     }
-  abort ();
+  AssertNotReached ();
 }
 
 /* Closes READER. */
@@ -202,7 +202,7 @@
       break;
 
     default:
-      abort ();
+      AssertNotReached ();
     }
 
   free (reader);
Index: src/data/any-writer.c
===================================================================
RCS file: /sources/pspp/pspp/src/data/any-writer.c,v
retrieving revision 1.5
diff -U3 -r1.5 any-writer.c
--- src/data/any-writer.c	17 Apr 2006 01:54:15 -0000	1.5
+++ src/data/any-writer.c	4 Jul 2006 06:05:04 -0000
@@ -19,7 +19,7 @@
 
 #include <config.h>
 #include "any-writer.h"
-#include <assert.h>
+#include <libpspp/Assert.h>
 #include <errno.h>
 #include <stdbool.h>
 #include <stdio.h>
@@ -85,7 +85,7 @@
                                                                   dict));
     }
 
-  abort ();
+  AssertNotReached ();
 }
 
 /* If PRIVATE is non-null, creates and returns a new any_writer,
@@ -162,7 +162,7 @@
     case SCRATCH_FILE:
       return scratch_writer_write_case (writer->private, c);
     }
-  abort ();
+  AssertNotReached ();
 }
 
 /* Returns true if an I/O error has occurred on WRITER, false
@@ -181,7 +181,7 @@
     case SCRATCH_FILE:
       return scratch_writer_error (writer->private);
     }
-  abort ();
+    AssertNotReached ();
 }
 
 /* Closes WRITER.
@@ -209,7 +209,7 @@
       break;
       
     default:
-      abort ();
+      AssertNotReached ();
     }
 
   free (writer);
Index: src/data/calendar.c
===================================================================
RCS file: /sources/pspp/pspp/src/data/calendar.c,v
retrieving revision 1.1
diff -U3 -r1.1 calendar.c
--- src/data/calendar.c	4 Mar 2006 01:11:57 -0000	1.1
+++ src/data/calendar.c	4 Jul 2006 06:05:04 -0000
@@ -1,6 +1,6 @@
 #include <config.h>
 #include "calendar.h"
-#include <assert.h>
+#include <libpspp/Assert.h>
 #include <stdbool.h>
 #include "settings.h"
 #include "value.h"
@@ -15,7 +15,7 @@
 static int
 floor_div (int a, int b) 
 {
-  assert (b > 0);
+  Assert (b > 0);
   return (a >= 0 ? a : a - b + 1) / b;
 }
 
@@ -123,7 +123,7 @@
       31 + 28 + 31 + 30 + 31 + 30 + 31 + 31 + 30 + 31 + 30, /* Nov */
     };
 
-  assert (month >= 1 && month <= 12);
+  Assert (month >= 1 && month <= 12);
   return cum_month_days[month - 1] + (month >= 3 && is_leap_year (year));
 }
 
Index: src/data/case.c
===================================================================
RCS file: /sources/pspp/pspp/src/data/case.c,v
retrieving revision 1.4
diff -U3 -r1.4 case.c
--- src/data/case.c	7 May 2006 05:44:18 -0000	1.4
+++ src/data/case.c	4 Jul 2006 06:05:04 -0000
@@ -26,14 +26,7 @@
 #include <libpspp/str.h>
 #include "variable.h"
 
-#ifdef DEBUGGING
-#undef NDEBUG
-#else
-#ifndef NDEBUG
-#define NDEBUG
-#endif
-#endif
-#include <assert.h>
+#include <libpspp/Assert.h>
 
 /* Changes C not to share data with any other case.
    C must be a case with a reference count greater than 1.
@@ -45,10 +38,12 @@
 {
   struct case_data *cd;
   
-  assert (c != NULL);
-  assert (c->this == c);
-  assert (c->case_data != NULL);
-  assert (c->case_data->ref_cnt > 1);
+  Assert (c != NULL);
+#ifdef DEBUGGING
+  Assert (c->this == c);
+#endif
+  Assert (c->case_data != NULL);
+  Assert (c->case_data->ref_cnt > 1);
 
   cd = c->case_data;
   cd->ref_cnt--;
@@ -100,11 +95,11 @@
 void
 case_clone (struct ccase *clone, const struct ccase *orig)
 {
-  assert (orig != NULL);
-  assert (orig->this == orig);
-  assert (orig->case_data != NULL);
-  assert (orig->case_data->ref_cnt > 0);
-  assert (clone != NULL);
+  Assert (orig != NULL);
+  Assert (orig->this == orig);
+  Assert (orig->case_data != NULL);
+  Assert (orig->case_data->ref_cnt > 0);
+  Assert (clone != NULL);
 
   if (clone != orig) 
     {
@@ -121,11 +116,11 @@
 void
 case_move (struct ccase *dst, struct ccase *src) 
 {
-  assert (src != NULL);
-  assert (src->this == src);
-  assert (src->case_data != NULL);
-  assert (src->case_data->ref_cnt > 0);
-  assert (dst != NULL);
+  Assert (src != NULL);
+  Assert (src->this == src);
+  Assert (src->case_data != NULL);
+  Assert (src->case_data->ref_cnt > 0);
+  Assert (dst != NULL);
   
   if (dst != src) 
     {
@@ -143,8 +138,8 @@
 {
   struct case_data *cd;
   
-  assert (c != NULL);
-  assert (c->this == c);
+  Assert (c != NULL);
+  Assert (c->this == c);
 
   cd = c->case_data;
   if (cd != NULL && --cd->ref_cnt == 0) 
@@ -215,17 +210,17 @@
            const struct ccase *src, size_t src_idx,
            size_t value_cnt)
 {
-  assert (dst != NULL);
-  assert (dst->this == dst);
-  assert (dst->case_data != NULL);
-  assert (dst->case_data->ref_cnt > 0);
-  assert (dst_idx + value_cnt <= dst->case_data->value_cnt);
-
-  assert (src != NULL);
-  assert (src->this == src);
-  assert (src->case_data != NULL);
-  assert (src->case_data->ref_cnt > 0);
-  assert (src_idx + value_cnt <= dst->case_data->value_cnt);
+  Assert (dst != NULL);
+  Assert (dst->this == dst);
+  Assert (dst->case_data != NULL);
+  Assert (dst->case_data->ref_cnt > 0);
+  Assert (dst_idx + value_cnt <= dst->case_data->value_cnt);
+
+  Assert (src != NULL);
+  Assert (src->this == src);
+  Assert (src->case_data != NULL);
+  Assert (src->case_data->ref_cnt > 0);
+  Assert (src_idx + value_cnt <= dst->case_data->value_cnt);
 
   if (dst->case_data != src->case_data || dst_idx != src_idx) 
     {
@@ -246,12 +241,12 @@
 case_to_values (const struct ccase *c, union value *output,
                 size_t output_size UNUSED) 
 {
-  assert (c != NULL);
-  assert (c->this == c);
-  assert (c->case_data != NULL);
-  assert (c->case_data->ref_cnt > 0);
-  assert (output_size == c->case_data->value_cnt);
-  assert (output != NULL || output_size == 0);
+  Assert (c != NULL);
+  Assert (c->this == c);
+  Assert (c->case_data != NULL);
+  Assert (c->case_data->ref_cnt > 0);
+  Assert (output_size == c->case_data->value_cnt);
+  Assert (output != NULL || output_size == 0);
 
   memcpy (output, c->case_data->values,
           c->case_data->value_cnt * sizeof *output);
@@ -266,12 +261,12 @@
 case_from_values (struct ccase *c, const union value *input,
                   size_t input_size UNUSED) 
 {
-  assert (c != NULL);
-  assert (c->this == c);
-  assert (c->case_data != NULL);
-  assert (c->case_data->ref_cnt > 0);
-  assert (input_size == c->case_data->value_cnt);
-  assert (input != NULL || input_size == 0);
+  Assert (c != NULL);
+  Assert (c->this == c);
+  Assert (c->case_data != NULL);
+  Assert (c->case_data->ref_cnt > 0);
+  Assert (input_size == c->case_data->value_cnt);
+  Assert (input != NULL || input_size == 0);
 
   if (c->case_data->ref_cnt > 1)
     case_unshare (c);
@@ -287,11 +282,11 @@
 const union value *
 case_data (const struct ccase *c, size_t idx) 
 {
-  assert (c != NULL);
-  assert (c->this == c);
-  assert (c->case_data != NULL);
-  assert (c->case_data->ref_cnt > 0);
-  assert (idx < c->case_data->value_cnt);
+  Assert (c != NULL);
+  Assert (c->this == c);
+  Assert (c->case_data != NULL);
+  Assert (c->case_data->ref_cnt > 0);
+  Assert (idx < c->case_data->value_cnt);
 
   return &c->case_data->values[idx];
 }
@@ -303,11 +298,11 @@
 double
 case_num (const struct ccase *c, size_t idx) 
 {
-  assert (c != NULL);
-  assert (c->this == c);
-  assert (c->case_data != NULL);
-  assert (c->case_data->ref_cnt > 0);
-  assert (idx < c->case_data->value_cnt);
+  Assert (c != NULL);
+  Assert (c->this == c);
+  Assert (c->case_data != NULL);
+  Assert (c->case_data->ref_cnt > 0);
+  Assert (idx < c->case_data->value_cnt);
 
   return c->case_data->values[idx].f;
 }
@@ -321,11 +316,11 @@
 const char *
 case_str (const struct ccase *c, size_t idx) 
 {
-  assert (c != NULL);
-  assert (c->this == c);
-  assert (c->case_data != NULL);
-  assert (c->case_data->ref_cnt > 0);
-  assert (idx < c->case_data->value_cnt);
+  Assert (c != NULL);
+  Assert (c->this == c);
+  Assert (c->case_data != NULL);
+  Assert (c->case_data->ref_cnt > 0);
+  Assert (idx < c->case_data->value_cnt);
 
   return c->case_data->values[idx].s;
 }
@@ -338,11 +333,11 @@
 union value *
 case_data_rw (struct ccase *c, size_t idx) 
 {
-  assert (c != NULL);
-  assert (c->this == c);
-  assert (c->case_data != NULL);
-  assert (c->case_data->ref_cnt > 0);
-  assert (idx < c->case_data->value_cnt);
+  Assert (c != NULL);
+  Assert (c->this == c);
+  Assert (c->case_data != NULL);
+  Assert (c->case_data->ref_cnt > 0);
+  Assert (idx < c->case_data->value_cnt);
 
   if (c->case_data->ref_cnt > 1)
     case_unshare (c);
@@ -372,8 +367,8 @@
       const struct variable *va = *vap;
       const struct variable *vb = *vbp;
 
-      assert (va->type == vb->type);
-      assert (va->width == vb->width);
+      Assert (va->type == vb->type);
+      Assert (va->width == vb->width);
       
       if (va->width == 0) 
         {
@@ -404,10 +399,12 @@
 const union value *
 case_data_all (const struct ccase *c) 
 {
-  assert (c != NULL);
-  assert (c->this == c);
-  assert (c->case_data != NULL);
-  assert (c->case_data->ref_cnt > 0);
+  Assert (c != NULL);
+#ifdef DEBUGGING
+  Assert (c->this == c);
+#endif
+  Assert (c->case_data != NULL);
+  Assert (c->case_data->ref_cnt > 0);
 
   return c->case_data->values;
 }
@@ -420,10 +417,12 @@
 union value *
 case_data_all_rw (struct ccase *c) 
 {
-  assert (c != NULL);
-  assert (c->this == c);
-  assert (c->case_data != NULL);
-  assert (c->case_data->ref_cnt > 0);
+  Assert (c != NULL);
+#ifdef DEBUGGING
+  Assert (c->this == c);
+#endif
+  Assert (c->case_data != NULL);
+  Assert (c->case_data->ref_cnt > 0);
 
   if (c->case_data->ref_cnt > 1)
     case_unshare (c);
Index: src/data/casefile.c
===================================================================
RCS file: /sources/pspp/pspp/src/data/casefile.c,v
retrieving revision 1.12
diff -U3 -r1.12 casefile.c
--- src/data/casefile.c	19 Jun 2006 10:16:51 -0000	1.12
+++ src/data/casefile.c	4 Jul 2006 06:05:04 -0000
@@ -19,7 +19,7 @@
 
 #include <config.h>
 #include "casefile.h"
-#include <assert.h>
+#include <libpspp/Assert.h>
 #include <errno.h>
 #include <fcntl.h>
 #include <stdio.h>
@@ -287,7 +287,7 @@
 bool
 casefile_in_core (const struct casefile *cf) 
 {
-  assert (cf != NULL);
+  Assert (cf != NULL);
 
   return cf->storage == MEMORY;
 }
@@ -308,7 +308,7 @@
 casefile_sleep (const struct casefile *cf_) 
 {
   struct casefile *cf = (struct casefile *) cf_;
-  assert (cf != NULL);
+  Assert (cf != NULL);
 
   casefile_mode_reader (cf);
   casefile_to_disk (cf);
@@ -332,7 +332,7 @@
 size_t
 casefile_get_value_cnt (const struct casefile *cf) 
 {
-  assert (cf != NULL);
+  Assert (cf != NULL);
 
   return cf->value_cnt;
 }
@@ -341,7 +341,7 @@
 unsigned long
 casefile_get_case_cnt (const struct casefile *cf) 
 {
-  assert (cf != NULL);
+  Assert (cf != NULL);
 
   return cf->case_cnt;
 }
@@ -352,9 +352,9 @@
 bool
 casefile_append (struct casefile *cf, const struct ccase *c) 
 {
-  assert (cf != NULL);
-  assert (c != NULL);
-  assert (cf->mode == WRITE);
+  Assert (cf != NULL);
+  Assert (c != NULL);
+  Assert (cf->mode == WRITE);
 
   /* Try memory first. */
   if (cf->storage == MEMORY) 
@@ -385,7 +385,7 @@
       else
         {
           casefile_to_disk (cf);
-          assert (cf->storage == DISK);
+          Assert (cf->storage == DISK);
           write_case_to_disk (cf, c);
         }
     }
@@ -446,15 +446,15 @@
   struct casefile *cf = (struct casefile *) cf_;
   struct casereader *reader;
   
-  assert (cf != NULL);
+  Assert (cf != NULL);
 
   if (cf->storage == MEMORY)
     {
       size_t idx, block_cnt;
       
-      assert (cf->file_name == NULL);
-      assert (cf->fd == -1);
-      assert (cf->buffer_used == 0);
+      Assert (cf->file_name == NULL);
+      Assert (cf->fd == -1);
+      Assert (cf->buffer_used == 0);
 
       if (!make_temp_file (&cf->fd, &cf->file_name))
         {
@@ -497,7 +497,7 @@
 void
 casefile_mode_reader (struct casefile *cf) 
 {
-  assert (cf != NULL);
+  Assert (cf != NULL);
   cf->mode = READ;
 }
 
@@ -509,8 +509,8 @@
   struct casefile *cf = (struct casefile *) cf_;
   struct casereader *reader;
 
-  assert (cf != NULL);
-  assert (!cf->being_destroyed);
+  Assert (cf != NULL);
+  Assert (!cf->being_destroyed);
 
   /* Flush the buffer to disk if it's not empty. */
   if (cf->mode == WRITE && cf->storage == DISK)
@@ -567,7 +567,7 @@
 {
   struct casereader *reader;
   
-  assert (cf->readers == NULL);
+  Assert (cf->readers == NULL);
   reader = casefile_get_reader (cf);
   reader->destructive = 1;
   cf->being_destroyed = 1;
@@ -674,7 +674,7 @@
 const struct casefile *
 casereader_get_casefile (const struct casereader *reader) 
 {
-  assert (reader != NULL);
+  Assert (reader != NULL);
   
   return reader->cf;
 }
@@ -685,7 +685,7 @@
 bool
 casereader_read (struct casereader *reader, struct ccase *c) 
 {
-  assert (reader != NULL);
+  Assert (reader != NULL);
   
   if (!reader->cf->ok || reader->case_idx >= reader->cf->case_cnt) 
     return false;
@@ -725,7 +725,7 @@
 bool
 casereader_read_xfer (struct casereader *reader, struct ccase *c)
 {
-  assert (reader != NULL);
+  Assert (reader != NULL);
 
   if (reader->destructive == 0
       || reader->case_idx >= reader->cf->case_cnt
@@ -749,9 +749,9 @@
 void
 casereader_seek (struct casereader *reader, unsigned long case_idx) 
 {
-  assert (reader != NULL);
-  assert (reader->random);
-  assert (case_idx < reader->cf->case_cnt);
+  Assert (reader != NULL);
+  Assert (reader->random);
+  Assert (case_idx < reader->cf->case_cnt);
 
   reader->case_idx = case_idx;
   if (reader->cf->storage == DISK)
@@ -762,7 +762,7 @@
 void
 casereader_destroy (struct casereader *reader)
 {
-  assert (reader != NULL);
+  Assert (reader != NULL);
 
   if (reader->next != NULL)
     reader->next->prev = reader->prev;
Index: src/data/category.c
===================================================================
RCS file: /sources/pspp/pspp/src/data/category.c,v
retrieving revision 1.3
diff -U3 -r1.3 category.c
--- src/data/category.c	25 Mar 2006 22:46:21 -0000	1.3
+++ src/data/category.c	4 Jul 2006 06:05:04 -0000
@@ -32,6 +32,8 @@
   'cat_var'.
 */
 #include <config.h>
+#include <libpspp/Assert.h>
+
 #include <stdlib.h>
 #include <libpspp/alloc.h>
 #include <libpspp/message.h>
@@ -58,7 +60,7 @@
 void
 cat_stored_values_destroy (struct variable *v)
 {
-  assert (v != NULL);
+  Assert (v != NULL);
 
   if (v->obs_vals != NULL)
     {
@@ -81,13 +83,13 @@
   size_t i;
   const union value *candidate;
 
-  assert (val != NULL);
-  assert (v != NULL);
-  assert (v->obs_vals != NULL);
+  Assert (val != NULL);
+  Assert (v != NULL);
+  Assert (v->obs_vals != NULL);
   for (i = 0; i < v->obs_vals->n_categories; i++)
     {
       candidate = v->obs_vals->vals + i;
-      assert (candidate != NULL);
+      Assert (candidate != NULL);
       if (!compare_values (candidate, val, v->width))
 	{
 	  return i;
@@ -106,8 +108,8 @@
 
   if (v->type == ALPHA)
     {
-      assert (val != NULL);
-      assert (v != NULL);
+      Assert (val != NULL);
+      Assert (v != NULL);
       cv = v->obs_vals;
       if (cat_value_find (v, val) == CAT_VALUE_NOT_FOUND)
 	{
@@ -127,7 +129,7 @@
 union value *
 cat_subscript_to_value (const size_t s, struct variable *v)
 {
-  assert (v->obs_vals != NULL);
+  Assert (v->obs_vals != NULL);
   if (s < v->obs_vals->n_categories)
     {
       return (v->obs_vals->vals + s);
Index: src/data/data-in.c
===================================================================
RCS file: /sources/pspp/pspp/src/data/data-in.c,v
retrieving revision 1.12
diff -U3 -r1.12 data-in.c
--- src/data/data-in.c	4 Jul 2006 04:39:04 -0000	1.12
+++ src/data/data-in.c	4 Jul 2006 06:05:05 -0000
@@ -18,6 +18,8 @@
    02110-1301, USA. */
 
 #include <config.h>
+#include <libpspp/Assert.h>
+
 #include "data-in.h"
 #include <libpspp/message.h>
 #include <math.h>
@@ -279,7 +281,7 @@
   const char s[] = "0123456789abcdef";
   const char *cp = strchr (s, tolower ((unsigned char) c));
 
-  assert (cp != NULL);
+  Assert (cp != NULL);
   return cp - s;
 }
 
@@ -1355,7 +1357,7 @@
 {
   const struct fmt_desc *const fmt = &formats[i->format.type];
 
-  assert (check_input_specifier (&i->format, 0));
+  Assert (check_input_specifier (&i->format, 0));
 
   /* Check that we've got a string to work with. */
   if (i->e == i->s || i->format.w <= 0)
@@ -1411,7 +1413,7 @@
     bool success;
 
     handler = handlers[i->format.type];
-    assert (handler != NULL);
+    Assert (handler != NULL);
 
     success = handler (i);
     if (!success)
Index: src/data/data-out.c
===================================================================
RCS file: /sources/pspp/pspp/src/data/data-out.c,v
retrieving revision 1.5
diff -U3 -r1.5 data-out.c
--- src/data/data-out.c	7 May 2006 02:18:32 -0000	1.5
+++ src/data/data-out.c	4 Jul 2006 06:05:05 -0000
@@ -18,6 +18,8 @@
    02110-1301, USA. */
 
 #include <config.h>
+#include <libpspp/Assert.h>
+
 #include <libpspp/message.h>
 #include <ctype.h>
 #include <math.h>
@@ -60,7 +62,7 @@
   int cat = formats[fp->type].cat;
   int ok;
 
-  assert (check_output_specifier (fp, 0));
+  Assert (check_output_specifier (fp, 0));
   if (!(cat & FCAT_STRING)) 
     {
       /* Numeric formatting. */
@@ -101,12 +103,10 @@
           break;
 
         case FMT_A:
-          assert (0);
-          abort ();
+          AssertNotReached ();
 
         case FMT_AHEX:
-          assert (0);
-          abort ();
+          AssertNotReached ();
 
         case FMT_IB:
           ok = convert_IB (s, fp, number);
@@ -159,8 +159,7 @@
           break;
 
         default:
-          assert (0);
-          abort ();
+          AssertNotReached ();
         }
     }
   else 
@@ -179,8 +178,7 @@
           break;
 
         default:
-          assert (0);
-          abort ();
+          AssertNotReached ();
         }
     }
 
@@ -751,7 +749,7 @@
       }
       break;
     default:
-      assert (0);
+      AssertNotReached ();
     }
 
   if (buf[0] == 0)
@@ -1001,7 +999,7 @@
     while (*bp == ' ')
       bp++;
 
-    assert ((number >= 0) ^ (*bp == '-'));
+    Assert ((number >= 0) ^ (*bp == '-'));
     if (number < 0)
       bp++;
 
@@ -1013,7 +1011,7 @@
     cp = stpcpy (cp, cc->neg_suffix);
 
   /* Copy into dst. */
-  assert (cp - buf <= fp->w);
+  Assert (cp - buf <= fp->w);
   if (cp - buf < fp->w)
     {
       memcpy (&dst[fp->w - (cp - buf)], buf, cp - buf);
@@ -1034,7 +1032,7 @@
 static int
 try_F (char *dst, const struct fmt_spec *fp, double number)
 {
-  assert (fp->w <= 40);
+  Assert (fp->w <= 40);
   if (finite (number)) 
     {
       if (fabs (number) < power10[fp->w])
@@ -1114,7 +1112,7 @@
   
   char buf[128];
   
-  assert (decimals > fp->d);
+  Assert (decimals > fp->d);
   if (decimals > LDBL_DIG)
     decimals = LDBL_DIG + 1;
 
@@ -1192,7 +1190,7 @@
           else if (*cp == '9') 
             *cp = '0';
           else
-            assert (*cp == '.');
+            Assert (*cp == '.');
 
           if (cp == buf || *--cp == '-')
             {
@@ -1233,7 +1231,7 @@
 static int
 convert_infinite (char *dst, const struct fmt_spec *fp, double number)
 {
-  assert (!finite (number));
+  Assert (!finite (number));
   
   if (fp->w >= 3)
     {
Index: src/data/dictionary.c
===================================================================
RCS file: /sources/pspp/pspp/src/data/dictionary.c,v
retrieving revision 1.13
diff -U3 -r1.13 dictionary.c
--- src/data/dictionary.c	2 Jul 2006 06:19:24 -0000	1.13
+++ src/data/dictionary.c	4 Jul 2006 06:05:05 -0000
@@ -18,6 +18,7 @@
    02110-1301, USA. */
 
 #include <config.h>
+#include <libpspp/Assert.h>
 
 #include "dictionary.h"
 
@@ -90,7 +91,7 @@
   struct dictionary *d;
   size_t i;
 
-  assert (s != NULL);
+  Assert (s != NULL);
 
   d = dict_create ();
 
@@ -149,7 +150,7 @@
      Others are necessarily cleared by deleting all the variables.*/
   int i;
 
-  assert (d != NULL);
+  Assert (d != NULL);
 
   for (i = 0; i < d->var_cnt; i++) 
     {
@@ -184,7 +185,7 @@
 {
   int i;
   
-  assert (d != NULL);
+  Assert (d != NULL);
   
   for (i = 0; i < d->var_cnt; i++)
     var_clear_aux (d->var[i]);
@@ -206,7 +207,7 @@
 size_t
 dict_get_var_cnt (const struct dictionary *d) 
 {
-  assert (d != NULL);
+  Assert (d != NULL);
 
   return d->var_cnt;
 }
@@ -217,8 +218,8 @@
 struct variable *
 dict_get_var (const struct dictionary *d, size_t idx) 
 {
-  assert (d != NULL);
-  assert (idx < d->var_cnt);
+  Assert (d != NULL);
+  Assert (idx < d->var_cnt);
 
   return d->var[idx];
 }
@@ -235,10 +236,10 @@
   size_t count;
   size_t i;
   
-  assert (d != NULL);
-  assert (vars != NULL);
-  assert (cnt != NULL);
-  assert ((exclude_classes & ~((1u << DC_ORDINARY)
+  Assert (d != NULL);
+  Assert (vars != NULL);
+  Assert (cnt != NULL);
+  Assert ((exclude_classes & ~((1u << DC_ORDINARY)
                                | (1u << DC_SYSTEM)
                                | (1u << DC_SCRATCH))) == 0);
   
@@ -252,7 +253,7 @@
   for (i = 0; i < d->var_cnt; i++)
     if (!(exclude_classes & (1u << dict_class_from_id (d->var[i]->name))))
       (*vars)[(*cnt)++] = d->var[i];
-  assert (*cnt == count);
+  Assert (*cnt == count);
 }
 
 
@@ -264,12 +265,12 @@
 {
   struct variable *v;
 
-  assert (d != NULL);
-  assert (name != NULL);
+  Assert (d != NULL);
+  Assert (name != NULL);
 
-  assert (width >= 0 && width <= MAX_STRING);
+  Assert (width >= 0 && width <= MAX_STRING);
 
-  assert (var_is_plausible_name(name,0));
+  Assert (var_is_plausible_name(name,0));
     
   /* Make sure there's not already a variable by that name. */
   if (dict_lookup_var (d, name) != NULL)
@@ -329,7 +330,7 @@
 dict_create_var_assert (struct dictionary *d, const char *name, int width)
 {
   struct variable *v = dict_create_var (d, name, width);
-  assert (v != NULL);
+  Assert (v != NULL);
   return v;
 }
 
@@ -343,12 +344,12 @@
 {
   struct variable *nv;
 
-  assert (d != NULL);
-  assert (ov != NULL);
-  assert (name != NULL);
+  Assert (d != NULL);
+  Assert (ov != NULL);
+  Assert (name != NULL);
 
-  assert (strlen (name) >= 1);
-  assert (strlen (name) <= LONG_NAME_LEN);
+  Assert (strlen (name) >= 1);
+  Assert (strlen (name) <= LONG_NAME_LEN);
 
   nv = dict_create_var (d, name, ov->width);
   if (nv == NULL)
@@ -382,7 +383,7 @@
                        const char *name)
 {
   struct variable *v = dict_clone_var (d, ov, name);
-  assert (v != NULL);
+  Assert (v != NULL);
   return v;
 }
 
@@ -393,8 +394,8 @@
 {
   struct variable v;
   
-  assert (d != NULL);
-  assert (name != NULL);
+  Assert (d != NULL);
+  Assert (name != NULL);
 
   str_copy_trunc (v.name, sizeof v.name, name);
   return hsh_find (d->name_tab, &v);
@@ -406,7 +407,7 @@
 dict_lookup_var_assert (const struct dictionary *d, const char *name)
 {
   struct variable *v = dict_lookup_var (d, name);
-  assert (v != NULL);
+  Assert (v != NULL);
   return v;
 }
 
@@ -415,8 +416,8 @@
 bool
 dict_contains_var (const struct dictionary *d, const struct variable *v)
 {
-  assert (d != NULL);
-  assert (v != NULL);
+  Assert (d != NULL);
+  Assert (v != NULL);
 
   return v->index >= 0 && v->index < d->var_cnt && d->var[v->index] == v;
 }
@@ -449,9 +450,9 @@
 {
   size_t i;
 
-  assert (d != NULL);
-  assert (v != NULL);
-  assert (dict_contains_var (d, v));
+  Assert (d != NULL);
+  Assert (v != NULL);
+  Assert (dict_contains_var (d, v));
 
   /* Delete aux data. */
   var_clear_aux (v);
@@ -491,8 +492,8 @@
 {
   /* FIXME: this can be done in O(count) time, but this algorithm
      is O(count**2). */
-  assert (d != NULL);
-  assert (count == 0 || vars != NULL);
+  Assert (d != NULL);
+  Assert (count == 0 || vars != NULL);
 
   while (count-- > 0)
     dict_delete_var (d, *vars++);
@@ -506,7 +507,7 @@
 
   /* FIXME: this can be done in O(count) time, but this algorithm
      is O(count**2). */
-  assert (d != NULL);
+  Assert (d != NULL);
 
   for (i = 0; i < d->var_cnt; )
     if (dict_class_from_id (d->var[i]->name) == DC_SCRATCH)
@@ -525,10 +526,10 @@
   size_t min_idx, max_idx;
   size_t i;
   
-  assert (d != NULL);
-  assert (v != NULL);
-  assert (dict_contains_var (d, v));
-  assert (new_index < d->var_cnt);
+  Assert (d != NULL);
+  Assert (v != NULL);
+  Assert (dict_contains_var (d, v));
+  Assert (new_index < d->var_cnt);
 
   move_element (d->var, d->var_cnt, sizeof *d->var, v->index, new_index);
 
@@ -549,22 +550,22 @@
   struct variable **new_var;
   size_t i;
   
-  assert (d != NULL);
-  assert (count == 0 || order != NULL);
-  assert (count <= d->var_cnt);
+  Assert (d != NULL);
+  Assert (count == 0 || order != NULL);
+  Assert (count <= d->var_cnt);
 
   new_var = xnmalloc (d->var_cnt, sizeof *new_var);
   memcpy (new_var, order, count * sizeof *new_var);
   for (i = 0; i < count; i++) 
     {
-      assert (d->var[order[i]->index] != NULL);
+      Assert (d->var[order[i]->index] != NULL);
       d->var[order[i]->index] = NULL;
       order[i]->index = i;
     }
   for (i = 0; i < d->var_cnt; i++)
     if (d->var[i] != NULL)
       {
-        assert (count < d->var_cnt);
+        Assert (count < d->var_cnt);
         new_var[count] = d->var[i];
         new_var[count]->index = count;
         count++;
@@ -580,12 +581,12 @@
 dict_rename_var (struct dictionary *d, struct variable *v,
                  const char *new_name) 
 {
-  assert (d != NULL);
-  assert (v != NULL);
-  assert (new_name != NULL);
-  assert (var_is_plausible_name (new_name, false));
-  assert (dict_contains_var (d, v));
-  assert (!compare_var_names (v->name, new_name, NULL)
+  Assert (d != NULL);
+  Assert (v != NULL);
+  Assert (new_name != NULL);
+  Assert (var_is_plausible_name (new_name, false));
+  Assert (dict_contains_var (d, v));
+  Assert (!compare_var_names (v->name, new_name, NULL)
           || dict_lookup_var (d, new_name) == NULL);
 
   hsh_force_delete (d->name_tab, v);
@@ -611,17 +612,17 @@
   size_t i;
   bool success = true;
 
-  assert (d != NULL);
-  assert (count == 0 || vars != NULL);
-  assert (count == 0 || new_names != NULL);
+  Assert (d != NULL);
+  Assert (count == 0 || vars != NULL);
+  Assert (count == 0 || new_names != NULL);
 
   /* Remove the variables to be renamed from the name hash,
      save their names, and rename them. */
   old_names = xnmalloc (count, sizeof *old_names);
   for (i = 0; i < count; i++) 
     {
-      assert (d->var[vars[i]->index] == vars[i]);
-      assert (var_is_plausible_name (new_names[i], false));
+      Assert (d->var[vars[i]->index] == vars[i]);
+      Assert (var_is_plausible_name (new_names[i], false));
       hsh_force_delete (d->name_tab, vars[i]);
       old_names[i] = xstrdup (vars[i]->name);
       strcpy (vars[i]->name, new_names[i]);
@@ -631,10 +632,10 @@
      checking for conflicts. */
   for (i = 0; i < count; i++)
     {
-      assert (new_names[i] != NULL);
-      assert (*new_names[i] != '\0');
-      assert (strlen (new_names[i]) >= 1);
-      assert (strlen (new_names[i]) <= LONG_NAME_LEN);
+      Assert (new_names[i] != NULL);
+      Assert (*new_names[i] != '\0');
+      Assert (strlen (new_names[i]) >= 1);
+      Assert (strlen (new_names[i]) <= LONG_NAME_LEN);
 
       if (hsh_insert (d->name_tab, vars[i]) != NULL)
         {
@@ -678,8 +679,8 @@
 struct variable *
 dict_get_weight (const struct dictionary *d) 
 {
-  assert (d != NULL);
-  assert (d->weight == NULL || dict_contains_var (d, d->weight));
+  Assert (d != NULL);
+  Assert (d->weight == NULL || dict_contains_var (d, d->weight));
   
   return d->weight;
 }
@@ -693,8 +694,8 @@
 dict_get_case_weight (const struct dictionary *d, const struct ccase *c, 
 		      int *warn_on_invalid)
 {
-  assert (d != NULL);
-  assert (c != NULL);
+  Assert (d != NULL);
+  Assert (c != NULL);
 
   if (d->weight == NULL)
     return 1.0;
@@ -718,9 +719,9 @@
 void
 dict_set_weight (struct dictionary *d, struct variable *v) 
 {
-  assert (d != NULL);
-  assert (v == NULL || dict_contains_var (d, v));
-  assert (v == NULL || v->type == NUMERIC);
+  Assert (d != NULL);
+  Assert (v == NULL || dict_contains_var (d, v));
+  Assert (v == NULL || v->type == NUMERIC);
 
   d->weight = v;
 }
@@ -730,8 +731,8 @@
 struct variable *
 dict_get_filter (const struct dictionary *d) 
 {
-  assert (d != NULL);
-  assert (d->filter == NULL || dict_contains_var (d, d->filter));
+  Assert (d != NULL);
+  Assert (d->filter == NULL || dict_contains_var (d, d->filter));
   
   return d->filter;
 }
@@ -741,8 +742,8 @@
 void
 dict_set_filter (struct dictionary *d, struct variable *v)
 {
-  assert (d != NULL);
-  assert (v == NULL || dict_contains_var (d, v));
+  Assert (d != NULL);
+  Assert (v == NULL || dict_contains_var (d, v));
 
   d->filter = v;
 }
@@ -752,7 +753,7 @@
 size_t
 dict_get_case_limit (const struct dictionary *d) 
 {
-  assert (d != NULL);
+  Assert (d != NULL);
 
   return d->case_limit;
 }
@@ -762,7 +763,7 @@
 void
 dict_set_case_limit (struct dictionary *d, size_t case_limit) 
 {
-  assert (d != NULL);
+  Assert (d != NULL);
 
   d->case_limit = case_limit;
 }
@@ -773,7 +774,7 @@
 int
 dict_get_next_value_idx (const struct dictionary *d) 
 {
-  assert (d != NULL);
+  Assert (d != NULL);
 
   return d->next_value_idx;
 }
@@ -783,7 +784,7 @@
 size_t
 dict_get_case_size (const struct dictionary *d) 
 {
-  assert (d != NULL);
+  Assert (d != NULL);
 
   return sizeof (union value) * dict_get_next_value_idx (d);
 }
@@ -992,7 +993,7 @@
 struct variable *const *
 dict_get_split_vars (const struct dictionary *d) 
 {
-  assert (d != NULL);
+  Assert (d != NULL);
   
   return d->split;
 }
@@ -1001,7 +1002,7 @@
 size_t
 dict_get_split_cnt (const struct dictionary *d) 
 {
-  assert (d != NULL);
+  Assert (d != NULL);
 
   return d->split_cnt;
 }
@@ -1011,8 +1012,8 @@
 dict_set_split_vars (struct dictionary *d,
                      struct variable *const *split, size_t cnt)
 {
-  assert (d != NULL);
-  assert (cnt == 0 || split != NULL);
+  Assert (d != NULL);
+  Assert (cnt == 0 || split != NULL);
 
   d->split_cnt = cnt;
   d->split = xnrealloc (d->split, cnt, sizeof *d->split);
@@ -1024,7 +1025,7 @@
 const char *
 dict_get_label (const struct dictionary *d) 
 {
-  assert (d != NULL);
+  Assert (d != NULL);
 
   return d->label;
 }
@@ -1034,7 +1035,7 @@
 void
 dict_set_label (struct dictionary *d, const char *label) 
 {
-  assert (d != NULL);
+  Assert (d != NULL);
 
   free (d->label);
   if (label == NULL)
@@ -1054,7 +1055,7 @@
 const char *
 dict_get_documents (const struct dictionary *d) 
 {
-  assert (d != NULL);
+  Assert (d != NULL);
 
   return d->documents;
 }
@@ -1064,7 +1065,7 @@
 void
 dict_set_documents (struct dictionary *d, const char *documents)
 {
-  assert (d != NULL);
+  Assert (d != NULL);
 
   free (d->documents);
   if (documents == NULL)
@@ -1084,11 +1085,11 @@
   struct vector *vector;
   size_t i;
 
-  assert (d != NULL);
-  assert (name != NULL);
-  assert (var_is_plausible_name (name, false));
-  assert (var != NULL);
-  assert (cnt > 0);
+  Assert (d != NULL);
+  Assert (name != NULL);
+  Assert (var_is_plausible_name (name, false));
+  Assert (var != NULL);
+  Assert (cnt > 0);
   
   if (dict_lookup_vector (d, name) != NULL)
     return false;
@@ -1100,7 +1101,7 @@
   vector->var = xnmalloc (cnt, sizeof *var);
   for (i = 0; i < cnt; i++)
     {
-      assert (dict_contains_var (d, var[i]));
+      Assert (dict_contains_var (d, var[i]));
       vector->var[i] = var[i];
     }
   vector->cnt = cnt;
@@ -1113,8 +1114,8 @@
 const struct vector *
 dict_get_vector (const struct dictionary *d, size_t idx) 
 {
-  assert (d != NULL);
-  assert (idx < d->vector_cnt);
+  Assert (d != NULL);
+  Assert (idx < d->vector_cnt);
 
   return d->vector[idx];
 }
@@ -1123,7 +1124,7 @@
 size_t
 dict_get_vector_cnt (const struct dictionary *d) 
 {
-  assert (d != NULL);
+  Assert (d != NULL);
 
   return d->vector_cnt;
 }
@@ -1135,8 +1136,8 @@
 {
   size_t i;
 
-  assert (d != NULL);
-  assert (name != NULL);
+  Assert (d != NULL);
+  Assert (name != NULL);
 
   for (i = 0; i < d->vector_cnt; i++)
     if (!strcasecmp (d->vector[i]->name, name))
@@ -1150,7 +1151,7 @@
 {
   size_t i;
   
-  assert (d != NULL);
+  Assert (d != NULL);
 
   for (i = 0; i < d->vector_cnt; i++) 
     {
Index: src/data/file-handle-def.c
===================================================================
RCS file: /sources/pspp/pspp/src/data/file-handle-def.c,v
retrieving revision 1.5
diff -U3 -r1.5 file-handle-def.c
--- src/data/file-handle-def.c	17 Apr 2006 01:54:15 -0000	1.5
+++ src/data/file-handle-def.c	4 Jul 2006 06:05:05 -0000
@@ -18,6 +18,8 @@
    02110-1301, USA. */
 
 #include <config.h>
+#include <libpspp/Assert.h>
+
 #include "file-handle-def.h"
 #include <libpspp/message.h>
 #include <errno.h>
@@ -200,7 +202,7 @@
                 const struct fh_properties *properties)
 {
   struct file_handle *handle;
-  assert (fh_from_name (handle_name) == NULL);
+  Assert (fh_from_name (handle_name) == NULL);
   handle = create_handle (handle_name, FH_REF_FILE);
   handle->file_name = xstrdup (file_name);
   handle->identity = fn_get_identity (file_name);
@@ -255,8 +257,8 @@
 static const char *
 mode_name (const char *mode) 
 {
-  assert (mode != NULL);
-  assert (mode[0] == 'r' || mode[0] == 'w');
+  Assert (mode != NULL);
+  Assert (mode[0] == 'r' || mode[0] == 'w');
 
   return mode[0] == 'r' ? "reading" : "writing";
 }
@@ -286,13 +288,13 @@
 fh_open (struct file_handle *h, enum fh_referent mask UNUSED,
          const char *type, const char *mode) 
 {
-  assert (h != NULL);
-  assert ((fh_get_referent (h) & mask) != 0);
-  assert (type != NULL);
-  assert (mode != NULL);
-  assert (mode[0] == 'r' || mode[0] == 'w');
-  assert (mode[1] == 's' || mode[1] == 'e');
-  assert (mode[2] == '\0');
+  Assert (h != NULL);
+  Assert ((fh_get_referent (h) & mask) != 0);
+  Assert (type != NULL);
+  Assert (mode != NULL);
+  Assert (mode[0] == 'r' || mode[0] == 'w');
+  Assert (mode[1] == 's' || mode[1] == 'e');
+  Assert (mode[2] == '\0');
 
   if (h->open_cnt != 0) 
     {
@@ -322,7 +324,7 @@
     {
       h->type = type;
       strcpy (h->open_mode, mode);
-      assert (h->aux == NULL);
+      Assert (h->aux == NULL);
     }
   h->open_cnt++;
 
@@ -340,12 +342,12 @@
 int
 fh_close (struct file_handle *h, const char *type, const char *mode)
 {
-  assert (h != NULL);
-  assert (h->open_cnt > 0);
-  assert (type != NULL);
-  assert (!strcmp (type, h->type));
-  assert (mode != NULL);
-  assert (!strcmp (mode, h->open_mode));
+  Assert (h != NULL);
+  Assert (h->open_cnt > 0);
+  Assert (type != NULL);
+  Assert (!strcmp (type, h->type));
+  Assert (mode != NULL);
+  Assert (!strcmp (mode, h->open_mode));
 
   if (--h->open_cnt == 0) 
     {
@@ -389,7 +391,7 @@
 const char *
 fh_get_file_name (const struct file_handle *handle) 
 {
-  assert (handle->referent == FH_REF_FILE);
+  Assert (handle->referent == FH_REF_FILE);
   return handle->file_name;
 }
 
@@ -397,7 +399,7 @@
 enum fh_mode
 fh_get_mode (const struct file_handle *handle) 
 {
-  assert (handle->referent == FH_REF_FILE);
+  Assert (handle->referent == FH_REF_FILE);
   return handle->mode;
 }
 
@@ -405,7 +407,7 @@
 size_t
 fh_get_record_width (const struct file_handle *handle)
 {
-  assert (handle->referent & (FH_REF_FILE | FH_REF_INLINE));
+  Assert (handle->referent & (FH_REF_FILE | FH_REF_INLINE));
   return handle->record_width;
 }
 
@@ -415,7 +417,7 @@
 size_t
 fh_get_tab_width (const struct file_handle *handle) 
 {
-  assert (handle->referent & (FH_REF_FILE | FH_REF_INLINE));
+  Assert (handle->referent & (FH_REF_FILE | FH_REF_INLINE));
   return handle->tab_width;
 }
 
@@ -424,7 +426,7 @@
 struct scratch_handle *
 fh_get_scratch_handle (struct file_handle *handle) 
 {
-  assert (handle->referent == FH_REF_SCRATCH);
+  Assert (handle->referent == FH_REF_SCRATCH);
   return handle->sh;
 }
 
@@ -433,7 +435,7 @@
 void
 fh_set_scratch_handle (struct file_handle *handle, struct scratch_handle *sh)
 {
-  assert (handle->referent == FH_REF_SCRATCH);
+  Assert (handle->referent == FH_REF_SCRATCH);
   handle->sh = sh;
 }
 
@@ -448,7 +450,7 @@
 void
 fh_set_default_handle (struct file_handle *new_default_handle) 
 {
-  assert (new_default_handle == NULL
+  Assert (new_default_handle == NULL
           || (new_default_handle->referent & (FH_REF_INLINE | FH_REF_FILE)));
   default_handle = new_default_handle;
 }
Index: src/data/file-name.c
===================================================================
RCS file: /sources/pspp/pspp/src/data/file-name.c,v
retrieving revision 1.5
diff -U3 -r1.5 file-name.c
--- src/data/file-name.c	9 Jun 2006 22:51:23 -0000	1.5
+++ src/data/file-name.c	4 Jul 2006 06:05:05 -0000
@@ -18,6 +18,7 @@
    02110-1301, USA. */
 
 #include <config.h>
+#include <libpspp/Assert.h>
 
 #include "file-name.h"
 
@@ -602,7 +603,7 @@
 FILE *
 fn_open (const char *fn, const char *mode)
 {
-  assert (mode[0] == 'r' || mode[0] == 'w');
+  Assert (mode[0] == 'r' || mode[0] == 'w');
 
   if (mode[0] == 'r' && (!strcmp (fn, "stdin") || !strcmp (fn, "-"))) 
     return stdin;
@@ -710,8 +711,8 @@
 fn_compare_file_identities (const struct file_identity *a,
                             const struct file_identity *b) 
 {
-  assert (a != NULL);
-  assert (b != NULL);
+  Assert (a != NULL);
+  Assert (b != NULL);
   if (a->device != b->device)
     return a->device < b->device ? -1 : 1;
   else
Index: src/data/format.c
===================================================================
RCS file: /sources/pspp/pspp/src/data/format.c,v
retrieving revision 1.6
diff -U3 -r1.6 format.c
--- src/data/format.c	19 Jun 2006 10:16:51 -0000	1.6
+++ src/data/format.c	4 Jul 2006 06:05:05 -0000
@@ -18,6 +18,8 @@
    02110-1301, USA. */
 
 #include <config.h>
+#include <libpspp/Assert.h>
+
 #include "format.h"
 #include <ctype.h>
 #include <libpspp/message.h>
@@ -189,7 +191,7 @@
                       int type, bool emit_error) 
 {
   const struct fmt_desc *f = &formats[format->type];
-  assert (type == NUMERIC || type == ALPHA);
+  Assert (type == NUMERIC || type == ALPHA);
   if ((type == ALPHA) != ((f->cat & FCAT_STRING) != 0))
     {
       if (emit_error)
@@ -227,7 +229,7 @@
 void
 convert_fmt_ItoO (const struct fmt_spec *input, struct fmt_spec *output)
 {
-  assert (check_input_specifier (input, 0));
+  Assert (check_input_specifier (input, 0));
 
   output->type = formats[input->type].output;
   output->w = input->w;
@@ -258,7 +260,7 @@
     case FMT_PIBHEX:
       {
 	static const int map[] = {4, 6, 9, 11, 14, 16, 18, 21};
-	assert (input->w % 2 == 0 && input->w >= 2 && input->w <= 16);
+	Assert (input->w % 2 == 0 && input->w >= 2 && input->w <= 16);
 	output->w = map[input->w / 2 - 1];
 	break;
       }
@@ -280,7 +282,7 @@
     case FMT_CCC:
     case FMT_CCD:
     case FMT_CCE:
-      assert (0);
+      AssertNotReached ();
     case FMT_Z:
     case FMT_A:
       /* nothing is necessary */
@@ -314,10 +316,10 @@
       /* nothing is necessary */
       break;
     default:
-      assert (0);
+      AssertNotReached ();
     }
 
-  assert (check_output_specifier (output, 0));
+  Assert (check_output_specifier (output, 0));
 }
 
 /* Returns the width corresponding to the format specifier.  The
@@ -356,7 +358,7 @@
   f.type = type;
   f.w = w;
   f.d = d;
-  assert (check_input_specifier (&f, 0));
+  Assert (check_input_specifier (&f, 0));
   return f;
 }
 
@@ -369,7 +371,7 @@
   f.type = type;
   f.w = w;
   f.d = d;
-  assert (check_output_specifier (&f, 0));
+  Assert (check_output_specifier (&f, 0));
   return f;
 }
 
Index: src/data/identifier.c
===================================================================
RCS file: /sources/pspp/pspp/src/data/identifier.c,v
retrieving revision 1.2
diff -U3 -r1.2 identifier.c
--- src/data/identifier.c	17 Mar 2006 04:58:25 -0000	1.2
+++ src/data/identifier.c	4 Jul 2006 06:05:05 -0000
@@ -26,7 +26,7 @@
 #include "identifier.h"
 
 
-#include <assert.h>
+#include <libpspp/Assert.h>
 #include <string.h>
 
 
@@ -86,7 +86,7 @@
 {
   size_t i = 0;
 
-  assert (kw && tok);
+  Assert (kw && tok);
   for (;;)
     {
       if (i == kw_len && i == tok_len)
Index: src/data/make-file.c
===================================================================
RCS file: /sources/pspp/pspp/src/data/make-file.c,v
retrieving revision 1.6
diff -U3 -r1.6 make-file.c
--- src/data/make-file.c	17 Apr 2006 01:54:15 -0000	1.6
+++ src/data/make-file.c	4 Jul 2006 06:05:05 -0000
@@ -18,7 +18,7 @@
    02110-1301, USA. */
 
 #include <config.h>
-#include <assert.h>
+#include <libpspp/Assert.h>
 #include <stdlib.h>
 #include <string.h>
 #include <errno.h>
@@ -44,8 +44,8 @@
 {
   const char *parent_dir;
 
-  assert (file_name != NULL);
-  assert (fd != NULL);
+  Assert (file_name != NULL);
+  Assert (fd != NULL);
 
   if (getenv ("TMPDIR") != NULL)
     parent_dir = getenv ("TMPDIR");
@@ -82,8 +82,8 @@
      Need also to pass in the directory instead of using /tmp 
   */
 
-  assert (file_name != NULL);
-  assert (fp != NULL);
+  Assert (file_name != NULL);
+  Assert (fp != NULL);
 
   if (getenv ("TMPDIR") != NULL)
     parent_dir = getenv ("TMPDIR");
Index: src/data/missing-values.c
===================================================================
RCS file: /sources/pspp/pspp/src/data/missing-values.c,v
retrieving revision 1.2
diff -U3 -r1.2 missing-values.c
--- src/data/missing-values.c	15 Mar 2006 03:29:10 -0000	1.2
+++ src/data/missing-values.c	4 Jul 2006 06:05:05 -0000
@@ -19,7 +19,7 @@
 
 #include <config.h>
 #include "missing-values.h"
-#include <assert.h>
+#include <libpspp/Assert.h>
 #include <stdlib.h>
 #include <libpspp/str.h>
 
@@ -31,7 +31,7 @@
 void
 mv_init (struct missing_values *mv, int width) 
 {
-  assert (width >= 0 && width <= MAX_STRING);
+  Assert (width >= 0 && width <= MAX_STRING);
   mv->type = MV_NONE;
   mv->width = width;
 }
@@ -47,7 +47,7 @@
 void
 mv_copy (struct missing_values *mv, const struct missing_values *src) 
 {
-  assert(src);
+  Assert (src);
 
   *mv = *src;
 }
@@ -90,7 +90,7 @@
     case MV_RANGE_1:
       return false;
     }
-  abort ();
+  AssertNotReached ();
 }
 
 /* Attempts to add S to the set of string missing values MV.  S
@@ -101,7 +101,7 @@
 bool
 mv_add_str (struct missing_values *mv, const char s[]) 
 {
-  assert (mv->width > 0);
+  Assert (mv->width > 0);
   return mv_add_value (mv, (union value *) s);
 }
 
@@ -111,7 +111,7 @@
 bool
 mv_add_num (struct missing_values *mv, double d) 
 {
-  assert (mv->width == 0);
+  Assert (mv->width == 0);
   return mv_add_value (mv, (union value *) &d);
 }
 
@@ -121,7 +121,7 @@
 bool
 mv_add_num_range (struct missing_values *mv, double low, double high) 
 {
-  assert (mv->width == 0);
+  Assert (mv->width == 0);
   if (low > high)
     return false;
   switch (mv->type) 
@@ -139,7 +139,7 @@
     case MV_RANGE_1:
       return false;
     }
-  abort ();
+  AssertNotReached ();
 }
 
 /* Returns true if MV contains an individual value,
@@ -159,7 +159,7 @@
     case MV_RANGE:
       return false;
     }
-  abort ();
+  AssertNotReached ();
 }
 
 /* Removes one individual value from MV and stores it in *V.
@@ -168,7 +168,7 @@
 void
 mv_pop_value (struct missing_values *mv, union value *v) 
 {
-  assert (mv_has_value (mv));
+  Assert (mv_has_value (mv));
   mv->type--;
   *v = mv->values[mv->type & 3];
 }
@@ -181,18 +181,18 @@
 void
 mv_peek_value (const struct missing_values *mv, union value *v, int idx) 
 {
-  assert (idx >= 0 ) ;
-  assert (idx < 3);
+  Assert (idx >= 0 ) ;
+  Assert (idx < 3);
 
-  assert (mv_has_value (mv));
+  Assert (mv_has_value (mv));
   *v = mv->values[idx];
 }
 
 void 
 mv_replace_value (struct missing_values *mv, const union value *v, int idx)
 {
-  assert (idx >= 0) ;
-  assert (idx < mv_n_values(mv));
+  Assert (idx >= 0) ;
+  Assert (idx < mv_n_values(mv));
 
   mv->values[idx] = *v;
 }
@@ -202,7 +202,7 @@
 int  
 mv_n_values (const struct missing_values *mv)
 {
-  assert(mv_has_value(mv));
+  Assert (mv_has_value(mv));
   return mv->type & 3;
 }
 
@@ -224,7 +224,7 @@
     case MV_3:
       return false;
     }
-  abort ();
+  AssertNotReached ();
 }
 
 /* Removes the numeric range from MV and stores it in *LOW and
@@ -233,7 +233,7 @@
 void
 mv_pop_range (struct missing_values *mv, double *low, double *high) 
 {
-  assert (mv_has_range (mv));
+  Assert (mv_has_range (mv));
   *low = mv->values[1].f;
   *high = mv->values[2].f;
   mv->type &= 3;
@@ -246,7 +246,7 @@
 void
 mv_peek_range (const struct missing_values *mv, double *low, double *high) 
 {
-  assert (mv_has_range (mv));
+  Assert (mv_has_range (mv));
   *low = mv->values[1].f;
   *high = mv->values[2].f;
 }
@@ -258,7 +258,7 @@
 static bool
 using_element (unsigned type, int idx) 
 {
-  assert (idx >= 0 && idx < 3);
+  Assert (idx >= 0 && idx < 3);
   
   switch (type) 
     {
@@ -275,7 +275,7 @@
     case MV_RANGE_1:
       return true;
     }
-  abort ();
+  AssertNotReached ();
 }
 
 /* Returns true if S contains only spaces between indexes
@@ -286,7 +286,7 @@
 {
   int i;
 
-  assert (new_width < old_width);
+  Assert (new_width < old_width);
   for (i = new_width; i < old_width; i++)
     if (s[i] != ' ')
       return false;
@@ -304,7 +304,7 @@
 bool
 mv_is_resizable (struct missing_values *mv, int width) 
 {
-  assert ((width == 0) == (mv->width == 0));
+  Assert ((width == 0) == (mv->width == 0));
   if (width > MAX_SHORT_STRING && mv->type != MV_NONE)
     return false;
   else if (width >= mv->width)
@@ -326,7 +326,7 @@
 void
 mv_resize (struct missing_values *mv, int width) 
 {
-  assert (mv_is_resizable (mv, width));
+  Assert (mv_is_resizable (mv, width));
   if (width > mv->width) 
     {
       int i;
@@ -353,7 +353,7 @@
 bool
 mv_is_num_missing (const struct missing_values *mv, double d)
 {
-  assert (mv->width == 0);
+  Assert (mv->width == 0);
   return d == SYSMIS || mv_is_num_user_missing (mv, d);
 }
 
@@ -382,7 +382,7 @@
 mv_is_num_user_missing (const struct missing_values *mv, double d)
 {
   const union value *v = mv->values;
-  assert (mv->width == 0);
+  Assert (mv->width == 0);
   switch (mv->type) 
     {
     case MV_NONE:
@@ -398,7 +398,7 @@
     case MV_RANGE_1:
       return v[0].f == d || (v[1].f <= d && d <= v[2].f);
     }
-  abort ();
+  AssertNotReached ();
 }
 
 /* Returns true if S[] is a missing value in MV, false otherwise.
@@ -409,7 +409,7 @@
                         const char s[])
 {
   const union value *v = mv->values;
-  assert (mv->width > 0);
+  Assert (mv->width > 0);
   switch (mv->type) 
     {
     case MV_NONE:
@@ -425,9 +425,9 @@
               || !memcmp (v[2].s, s, mv->width));
     case MV_RANGE:
     case MV_RANGE_1:
-      abort ();
+      AssertNotReached ();
     }
-  abort ();
+  AssertNotReached ();
 }
 
 /* Returns true if MV is a set of numeric missing values and V is
Index: src/data/por-file-writer.c
===================================================================
RCS file: /sources/pspp/pspp/src/data/por-file-writer.c,v
retrieving revision 1.4
diff -U3 -r1.4 por-file-writer.c
--- src/data/por-file-writer.c	17 Apr 2006 01:54:15 -0000	1.4
+++ src/data/por-file-writer.c	4 Jul 2006 06:05:05 -0000
@@ -18,6 +18,8 @@
    02110-1301, USA. */
 
 #include <config.h>
+#include <libpspp/Assert.h>
+
 #include "por-file-writer.h"
 #include <libpspp/message.h>
 #include <ctype.h>
@@ -176,7 +178,7 @@
   if (ferror (w->file))
     return;
 
-  assert (buf != NULL);
+  Assert (buf != NULL);
   while (nbytes + w->lc >= 80)
     {
       size_t n = 80 - w->lc;
@@ -495,7 +497,7 @@
   i = 0;
   for (power = 30.0L; power < DBL_MAX; power *= power)
     {
-      assert (i < sizeof pow_tab / sizeof *pow_tab);
+      Assert (i < sizeof pow_tab / sizeof *pow_tab);
       pow_tab[i++] = power;
     }
 }
@@ -507,8 +509,8 @@
   long double power;
   int i;
 
-  assert (exponent >= 0);
-  assert (exponent < 1L << (sizeof pow_tab / sizeof *pow_tab));
+  Assert (exponent >= 0);
+  Assert (exponent < 1L << (sizeof pow_tab / sizeof *pow_tab));
 
   power = 1.L;
   for (i = 0; exponent > 0; exponent >>= 1, i++)
@@ -533,7 +535,7 @@
 static int
 trig_to_char (int trig)
 {
-  assert (trig >= 0 && trig < 30);
+  Assert (trig >= 0 && trig < 30);
   return "0123456789ABCDEFGHIJKLMNOPQRST"[trig];
 }
 
@@ -609,7 +611,7 @@
 static bool
 should_round_up (const char trigs[], int trig_cnt)
 {
-  assert (trig_cnt > 0);
+  Assert (trig_cnt > 0);
 
   if (*trigs < BASE / 2)
     {
@@ -744,8 +746,8 @@
          truncated to the nearest integer.  The chunk fits in a
          long. */
       chunk = value;
-      assert (pow30 (CHUNK_SIZE) <= LONG_MAX);
-      assert (chunk >= 0 && chunk < pow30 (CHUNK_SIZE));
+      Assert (pow30 (CHUNK_SIZE) <= LONG_MAX);
+      Assert (chunk >= 0 && chunk < pow30 (CHUNK_SIZE));
 
       value -= chunk;
 
@@ -776,7 +778,7 @@
   /* Round to requested precision, conservatively estimating the
      required base-30 precision as 2/3 of the base-10 precision
      (log30(10) = .68). */
-  assert (base_10_precision > 0);
+  Assert (base_10_precision > 0);
   if (base_10_precision > LDBL_DIG)
     base_10_precision = LDBL_DIG;
   base_30_precision = DIV_RND_UP (base_10_precision * 2, 3);
Index: src/data/procedure.c
===================================================================
RCS file: /sources/pspp/pspp/src/data/procedure.c,v
retrieving revision 1.9
diff -U3 -r1.9 procedure.c
--- src/data/procedure.c	7 May 2006 05:46:26 -0000	1.9
+++ src/data/procedure.c	4 Jul 2006 06:05:05 -0000
@@ -18,6 +18,7 @@
    02110-1301, USA. */
 
 #include <config.h>
+#include <libpspp/Assert.h>
 
 #include <errno.h>
 #include <stdio.h>
@@ -195,7 +196,7 @@
   struct write_case_data wc_data;
   bool ok = true;
 
-  assert (proc_source != NULL);
+  Assert (proc_source != NULL);
 
   update_last_proc_invocation ();
 
@@ -439,8 +440,8 @@
 struct ccase *
 lagged_case (int n_before)
 {
-  assert (n_before >= 1 );
-  assert (n_before <= n_lag);
+  Assert (n_before >= 1 );
+  Assert (n_before <= n_lag);
 
   if (n_before <= lag_count)
     {
@@ -636,7 +637,7 @@
 {
   bool ok;
   
-  assert (aux->casefile != NULL);
+  Assert (aux->casefile != NULL);
   ok = aux->split_func (&aux->prev_case, aux->casefile, aux->func_aux);
   casefile_destroy (aux->casefile);
   aux->casefile = NULL;
@@ -668,7 +669,7 @@
 {
   struct trns_chain *chain;
   
-  assert (temporary_trns_chain == NULL);
+  Assert (temporary_trns_chain == NULL);
   chain = permanent_trns_chain;
   cur_trns_chain = permanent_trns_chain = trns_chain_create ();
   return chain;
@@ -807,7 +808,7 @@
 void
 proc_set_sink (struct case_sink *sink) 
 {
-  assert (proc_sink == NULL);
+  Assert (proc_sink == NULL);
   proc_sink = sink;
 }
 
@@ -816,7 +817,7 @@
 void
 proc_set_source (struct case_source *source) 
 {
-  assert (proc_source == NULL);
+  Assert (proc_source == NULL);
   proc_source = source;
 }
 
@@ -839,10 +840,10 @@
 
   /* Try to make sure that this function is called immediately
      after procedure() or a similar function. */
-  assert (proc_source != NULL);
-  assert (case_source_is_class (proc_source, &storage_source_class));
-  assert (trns_chain_is_empty (permanent_trns_chain));
-  assert (!proc_in_temporary_transformations ());
+  Assert (proc_source != NULL);
+  Assert (case_source_is_class (proc_source, &storage_source_class));
+  Assert (trns_chain_is_empty (permanent_trns_chain));
+  Assert (!proc_in_temporary_transformations ());
 
   casefile = storage_source_decapsulate (proc_source);
   proc_source = NULL;
Index: src/data/settings.c
===================================================================
RCS file: /sources/pspp/pspp/src/data/settings.c,v
retrieving revision 1.3
diff -U3 -r1.3 settings.c
--- src/data/settings.c	30 May 2006 12:01:33 -0000	1.3
+++ src/data/settings.c	4 Jul 2006 06:05:05 -0000
@@ -19,7 +19,7 @@
 
 #include <config.h>
 #include "settings.h"
-#include <assert.h>
+#include <libpspp/Assert.h>
 #include <stdlib.h>
 #include <time.h>
 #include "format.h"
@@ -205,7 +205,7 @@
 void
 set_decimal (char decimal_) 
 {
-  assert (decimal_ == '.' || decimal_ == ',');
+  Assert (decimal_ == '.' || decimal_ == ',');
   decimal = decimal_;
 }
 
@@ -223,7 +223,7 @@
 void
 set_grouping (char grouping_) 
 {
-  assert (grouping_ == '.' || grouping_ == ',');
+  Assert (grouping_ == '.' || grouping_ == ',');
   grouping = grouping_;
 }
  
@@ -470,7 +470,7 @@
 const struct custom_currency *
 get_cc (int idx)
 {
-  assert (idx >= 0 && idx < CC_CNT);
+  Assert (idx >= 0 && idx < CC_CNT);
   return &cc[idx];
 }
 
@@ -478,7 +478,7 @@
 void
 set_cc (int idx, const struct custom_currency *cc_) 
 {
-  assert (idx >= 0 && idx < CC_CNT);
+  Assert (idx >= 0 && idx < CC_CNT);
   cc[idx] = *cc_;
 }
 
Index: src/data/storage-stream.c
===================================================================
RCS file: /sources/pspp/pspp/src/data/storage-stream.c,v
retrieving revision 1.4
diff -U3 -r1.4 storage-stream.c
--- src/data/storage-stream.c	7 May 2006 05:48:57 -0000	1.4
+++ src/data/storage-stream.c	4 Jul 2006 06:05:05 -0000
@@ -18,6 +18,7 @@
    02110-1301, USA. */
 
 #include <config.h>
+#include <libpspp/Assert.h>
 
 #include <data/storage-stream.h>
 
@@ -157,7 +158,7 @@
 {
   struct storage_stream_info *info = source->aux;
 
-  assert (source->class == &storage_source_class);
+  Assert (source->class == &storage_source_class);
   return info->casefile;
 }
 
@@ -169,7 +170,7 @@
   struct storage_stream_info *info = source->aux;
   struct casefile *casefile;
 
-  assert (source->class == &storage_source_class);
+  Assert (source->class == &storage_source_class);
   casefile = info->casefile;
   info->casefile = NULL;
   free_case_source (source);
Index: src/data/sys-file-reader.c
===================================================================
RCS file: /sources/pspp/pspp/src/data/sys-file-reader.c,v
retrieving revision 1.20
diff -U3 -r1.20 sys-file-reader.c
--- src/data/sys-file-reader.c	9 Jun 2006 22:51:23 -0000	1.20
+++ src/data/sys-file-reader.c	4 Jul 2006 06:05:06 -0000
@@ -18,6 +18,7 @@
    02110-1301, USA. */
 
 #include <config.h>
+#include <libpspp/Assert.h>
 
 #include <stdlib.h>
 #include <errno.h>
@@ -708,7 +709,7 @@
 				  dict_delete_var(*dict, v_next);
 				}
 
-			      assert ( length > MAX_LONG_STRING );
+			      Assert ( length > MAX_LONG_STRING );
 
 			      v->width = length;
 			      v->print.w = v->width;
@@ -1043,7 +1044,7 @@
 				   records still expected. */
   int next_value = 0;		/* Index to next `value' structure. */
 
-  assert(r);
+  Assert (r);
 
   *var_by_idx = 0;
 
@@ -1424,7 +1425,7 @@
           memcpy (label->value.s, label->raw_value, copy_len);
         } else {
           flt64 f;
-          assert (sizeof f == sizeof label->raw_value);
+          Assert (sizeof f == sizeof label->raw_value);
           memcpy (&f, label->raw_value, sizeof f);
           if (r->reverse_endian)
             bswap_flt64 (&f);
@@ -1480,7 +1481,7 @@
 static void *
 buf_read (struct sfm_reader *r, void *buf, size_t byte_cnt, size_t min_alloc)
 {
-  assert (r);
+  Assert (r);
 
   if (buf == NULL && byte_cnt > 0 )
     buf = xmalloc (max (byte_cnt, min_alloc));
@@ -1508,7 +1509,7 @@
 void
 buf_unread(struct sfm_reader *r, size_t byte_cnt)
 {
-  assert(byte_cnt > 0);
+  Assert (byte_cnt > 0);
 
   if ( 0 != fseek(r->file, -byte_cnt, SEEK_CUR))
     {
@@ -1665,7 +1666,7 @@
       p = r->x;
     }
 
-  abort ();
+  AssertNotReached ();
 
  success:
   /* We have filled up an entire record.  Update state and return
Index: src/data/sys-file-writer.c
===================================================================
RCS file: /sources/pspp/pspp/src/data/sys-file-writer.c,v
retrieving revision 1.12
diff -U3 -r1.12 sys-file-writer.c
--- src/data/sys-file-writer.c	9 Jun 2006 22:51:23 -0000	1.12
+++ src/data/sys-file-writer.c	4 Jul 2006 06:05:06 -0000
@@ -18,6 +18,8 @@
    02110-1301, USA. */
 
 #include <config.h>
+#include <libpspp/Assert.h>
+
 #include "sys-file-writer.h"
 #include "sfm-private.h"
 #include <libpspp/message.h>
@@ -109,7 +111,7 @@
 static inline int
 var_flt64_cnt (const struct variable *v) 
 {
-  assert(sizeof(flt64) == MAX_SHORT_STRING);
+  Assert (sizeof(flt64) == MAX_SHORT_STRING);
   return width_to_bytes(v->width) / MAX_SHORT_STRING ;
 }
 
@@ -437,7 +439,7 @@
 static inline void
 write_format_spec (const struct fmt_spec *src, int32_t *dest)
 {
-  assert(check_output_specifier(src, true));
+  Assert (check_output_specifier(src, true));
   *dest = (formats[src->type].spss << 16) | (src->w << 8) | src->d;
 }
 
@@ -830,7 +832,7 @@
 static void
 buf_write (struct sfm_writer *w, const void *buf, size_t nbytes)
 {
-  assert (buf != NULL);
+  Assert (buf != NULL);
   fwrite (buf, nbytes, 1, w->file);
 }
 
Index: src/data/transformations.c
===================================================================
RCS file: /sources/pspp/pspp/src/data/transformations.c,v
retrieving revision 1.3
diff -U3 -r1.3 transformations.c
--- src/data/transformations.c	7 May 2006 05:50:07 -0000	1.3
+++ src/data/transformations.c	4 Jul 2006 06:05:06 -0000
@@ -21,7 +21,7 @@
 
 #include <data/transformations.h>
 
-#include <assert.h>
+#include <libpspp/Assert.h>
 #include <stdlib.h>
 
 #include <libpspp/str.h>
@@ -130,7 +130,7 @@
 {
   struct transformation *trns;
 
-  assert (!chain->finalized);
+  Assert (!chain->finalized);
 
   if (chain->trns_cnt == chain->trns_cap)
     chain->trns = x2nrealloc (chain->trns, &chain->trns_cap,
@@ -152,8 +152,8 @@
 {
   size_t i;
   
-  assert (dst->finalized);
-  assert (src->finalized);
+  Assert (dst->finalized);
+  Assert (src->finalized);
 
   if (dst->trns_cnt + src->trns_cnt > dst->trns_cap) 
     {
@@ -194,7 +194,7 @@
 {
   size_t i;
 
-  assert (chain->finalized);
+  Assert (chain->finalized);
   for (i = 0; i < chain->trns_cnt; )
     {
       struct transformation *trns = &chain->trns[i];
Index: src/data/value-labels.c
===================================================================
RCS file: /sources/pspp/pspp/src/data/value-labels.c,v
retrieving revision 1.6
diff -U3 -r1.6 value-labels.c
--- src/data/value-labels.c	26 Jun 2006 05:40:29 -0000	1.6
+++ src/data/value-labels.c	4 Jul 2006 06:05:06 -0000
@@ -18,6 +18,7 @@
    02110-1301, USA. */
 
 #include <config.h>
+#include <libpspp/Assert.h>
 
 #include "value-labels.h"
 
@@ -54,7 +55,7 @@
 {
   struct val_labs *vls;
 
-  assert (width >= 0);
+  Assert (width >= 0);
 
   vls = xmalloc (sizeof *vls);
   vls->width = width;
@@ -71,7 +72,7 @@
   struct val_labs_iterator *i;
   struct val_lab *vl;
 
-  assert (vls != NULL);
+  Assert (vls != NULL);
 
   copy = val_labs_create (vls->width);
   for (vl = val_labs_first (vls, &i); vl != NULL;
@@ -87,7 +88,7 @@
 bool
 val_labs_can_set_width (const struct val_labs *vls, int new_width) 
 {
-  assert ((vls->width == 0) == (new_width == 0));
+  Assert ((vls->width == 0) == (new_width == 0));
 
   if (vls->width == 0)
     return new_width == 0;
@@ -122,7 +123,7 @@
 void
 val_labs_set_width (struct val_labs *vls, int new_width) 
 {
-  assert (val_labs_can_set_width (vls, new_width));
+  Assert (val_labs_can_set_width (vls, new_width));
 
   vls->width = new_width;
   if (new_width > MAX_SHORT_STRING)
@@ -144,7 +145,7 @@
 void
 val_labs_clear (struct val_labs *vls) 
 {
-  assert (vls != NULL);
+  Assert (vls != NULL);
 
   hsh_destroy (vls->labels);
   vls->labels = NULL;
@@ -154,7 +155,7 @@
 size_t
 val_labs_count (const struct val_labs *vls) 
 {
-  assert (vls != NULL);
+  Assert (vls != NULL);
 
   if (vls->labels == NULL)
     return 0;
@@ -176,8 +177,8 @@
 {
   struct int_val_lab *ivl;
 
-  assert (label != NULL);
-  assert (vls->width <= MAX_SHORT_STRING);
+  Assert (label != NULL);
+  Assert (vls->width <= MAX_SHORT_STRING);
   
   ivl = xmalloc (sizeof *ivl);
   ivl->value = value;
@@ -198,9 +199,9 @@
   struct int_val_lab *ivl;
   void **vlpp;
 
-  assert (vls != NULL);
-  assert (vls->width <= MAX_SHORT_STRING);
-  assert (label != NULL);
+  Assert (vls != NULL);
+  Assert (vls->width <= MAX_SHORT_STRING);
+  Assert (label != NULL);
 
   if (vls->labels == NULL) 
     vls->labels = hsh_create (8, compare_int_val_lab, hash_int_val_lab,
@@ -229,9 +230,9 @@
 {
   struct int_val_lab *ivl;
 
-  assert (vls != NULL);
-  assert (vls->width <= MAX_SHORT_STRING);
-  assert (label != NULL);
+  Assert (vls != NULL);
+  Assert (vls->width <= MAX_SHORT_STRING);
+  Assert (label != NULL);
 
   if (vls->labels == NULL)
     {
@@ -255,8 +256,8 @@
 int 
 val_labs_remove (struct val_labs *vls, union value value) 
 {
-  assert (vls != NULL);
-  assert (vls->width <= MAX_SHORT_STRING);
+  Assert (vls != NULL);
+  Assert (vls->width <= MAX_SHORT_STRING);
 
   if (vls->labels != NULL) 
     {
@@ -276,7 +277,7 @@
 char *
 val_labs_find (const struct val_labs *vls, union value value) 
 {
-  assert (vls != NULL);
+  Assert (vls != NULL);
 
   if (vls->width > MAX_SHORT_STRING)
     return NULL;
@@ -312,8 +313,8 @@
 {
   struct val_labs_iterator *i;
 
-  assert (vls != NULL);
-  assert (ip != NULL);
+  Assert (vls != NULL);
+  Assert (ip != NULL);
 
   if (vls->labels == NULL || vls->width > MAX_SHORT_STRING)
     return NULL;
@@ -336,8 +337,8 @@
 {
   struct val_labs_iterator *i;
 
-  assert (vls != NULL);
-  assert (ip != NULL);
+  Assert (vls != NULL);
+  Assert (ip != NULL);
 
   if (vls->labels == NULL || vls->width > MAX_SHORT_STRING)
     return NULL;
@@ -358,10 +359,10 @@
   struct val_labs_iterator *i;
   struct int_val_lab *ivl;
   
-  assert (vls != NULL);
-  assert (vls->width <= MAX_SHORT_STRING);
-  assert (ip != NULL);
-  assert (*ip != NULL);
+  Assert (vls != NULL);
+  Assert (vls->width <= MAX_SHORT_STRING);
+  Assert (ip != NULL);
+  Assert (*ip != NULL);
 
   i = *ip;
   ivl = *i->lp++;
@@ -387,8 +388,8 @@
 {
   struct val_labs_iterator *i;
 
-  assert (ip != NULL);
-  assert (*ip != NULL);
+  Assert (ip != NULL);
+  Assert (*ip != NULL);
   
   i = *ip;
   free (i->labels);
@@ -456,7 +457,7 @@
   struct atom a;
   void **app;
   
-  assert (string != NULL);
+  Assert (string != NULL);
           
   if (atoms == NULL) 
     atoms = hsh_create (8, compare_atoms, hash_atom, free_atom, NULL);
@@ -485,7 +486,7 @@
 {
   if (atom != NULL) 
     {
-      assert (atom->ref_count > 0);
+      Assert (atom->ref_count > 0);
       atom->ref_count--;
       if (atom->ref_count == 0) 
         hsh_force_delete (atoms, atom);
@@ -496,7 +497,7 @@
 static  char *
 atom_to_string (const struct atom *atom) 
 {
-  assert (atom != NULL);
+  Assert (atom != NULL);
   
   return atom->string;
 }
@@ -541,8 +542,8 @@
 {
   char *s;
   
-  assert (val != NULL);
-  assert (var != NULL);
+  Assert (val != NULL);
+  Assert (var != NULL);
 
   s = val_labs_find (var->val_labs, *val);
   if (s == NULL) 
Index: src/data/variable.c
===================================================================
RCS file: /sources/pspp/pspp/src/data/variable.c,v
retrieving revision 1.8
diff -U3 -r1.8 variable.c
--- src/data/variable.c	7 May 2006 02:18:32 -0000	1.8
+++ src/data/variable.c	4 Jul 2006 06:05:06 -0000
@@ -18,6 +18,8 @@
    02110-1301, USA. */
 
 #include <config.h>
+#include <libpspp/Assert.h>
+
 #include "variable.h"
 #include <libpspp/message.h>
 #include <stdlib.h>
@@ -56,8 +58,8 @@
 var_attach_aux (struct variable *v,
                 void *aux, void (*aux_dtor) (struct variable *)) 
 {
-  assert (v->aux == NULL);
-  assert (aux != NULL);
+  Assert (v->aux == NULL);
+  Assert (aux != NULL);
   v->aux = aux;
   v->aux_dtor = aux_dtor;
   return aux;
@@ -69,7 +71,7 @@
 var_detach_aux (struct variable *v) 
 {
   void *aux = v->aux;
-  assert (aux != NULL);
+  Assert (aux != NULL);
   v->aux = NULL;
   return aux;
 }
@@ -79,7 +81,7 @@
 void
 var_clear_aux (struct variable *v) 
 {
-  assert (v != NULL);
+  Assert (v != NULL);
   if (v->aux != NULL) 
     {
       if (v->aux_dtor != NULL)
@@ -134,7 +136,7 @@
   bool plausible;
   size_t length, i;
   
-  assert (name != NULL);
+  Assert (name != NULL);
 
   /* Note that strlen returns number of BYTES, not the number of 
      CHARACTERS */
@@ -182,7 +184,7 @@
 {
   size_t length;
   
-  assert (name != NULL);
+  Assert (name != NULL);
 
   /* Note that strlen returns number of BYTES, not the number of 
      CHARACTERS */
@@ -259,8 +261,8 @@
 void
 var_set_short_name (struct variable *v, const char *short_name) 
 {
-  assert (v != NULL);
-  assert (short_name[0] == '\0' || var_is_plausible_name (short_name, false));
+  Assert (v != NULL);
+  Assert (short_name[0] == '\0' || var_is_plausible_name (short_name, false));
   
   str_copy_trunc (v->short_name, sizeof v->short_name, short_name);
   str_uppercase (v->short_name);
@@ -270,7 +272,7 @@
 void
 var_clear_short_name (struct variable *v) 
 {
-  assert (v != NULL);
+  Assert (v != NULL);
 
   v->short_name[0] = '\0';
 }
@@ -285,9 +287,9 @@
   char *start, *end;
   int len, ofs;
 
-  assert (v != NULL);
-  assert (suffix >= 0);
-  assert (strlen (v->short_name) > 0);
+  Assert (v != NULL);
+  Assert (suffix >= 0);
+  Assert (strlen (v->short_name) > 0);
 
   /* Set base name. */
   var_set_short_name (v, base);
@@ -320,7 +322,7 @@
 enum dict_class
 dict_class_from_id (const char *name) 
 {
-  assert (name != NULL);
+  Assert (name != NULL);
 
   switch (name[0]) 
     {
@@ -346,8 +348,7 @@
     case DC_SCRATCH:
       return _("scratch");
     default:
-      assert (0);
-      abort ();
+      AssertNotReached ();
     }
 }
 
@@ -360,7 +361,7 @@
   const int remainder = width - (chunks * EFFECTIVE_LONG_STRING_LENGTH) ;
   int bytes, mod8;
 
-  assert (width >= 0);
+  Assert (width >= 0);
 
   if ( width == 0 ) 
     return MAX_SHORT_STRING ;
@@ -377,7 +378,7 @@
   if ( mod8 ) 
     bytes += MAX_SHORT_STRING - mod8;
 
-  assert( bytes % MAX_SHORT_STRING == 0 );
+  Assert ( bytes % MAX_SHORT_STRING == 0 );
 
   return bytes;
 }
Index: src/language/command.c
===================================================================
RCS file: /sources/pspp/pspp/src/language/command.c,v
retrieving revision 1.13
diff -U3 -r1.13 command.c
--- src/language/command.c	28 Jun 2006 18:40:21 -0000	1.13
+++ src/language/command.c	4 Jul 2006 06:05:06 -0000
@@ -18,7 +18,7 @@
    02110-1301, USA. */
 
 #include <config.h>
-
+#include <libpspp/Assert.h>
 #include <language/command.h>
 
 #include <stdio.h>
@@ -69,7 +69,7 @@
 bool
 cmd_result_is_success (enum cmd_result result) 
 {
-  assert (cmd_result_is_valid (result));
+  Assert (cmd_result_is_valid (result));
   return result > 0;
 }
 
@@ -78,7 +78,7 @@
 bool
 cmd_result_is_failure (enum cmd_result result) 
 {
-  assert (cmd_result_is_valid (result));
+  Assert (cmd_result_is_valid (result));
   return result < 0;
 }
 
@@ -203,7 +203,7 @@
   tab_set_command_name (NULL);
   msg_set_command_name (NULL);
     
-  assert (cmd_result_is_valid (result));
+  Assert (cmd_result_is_valid (result));
   return result;
 }
 
@@ -273,7 +273,7 @@
 
   aw = find_word (a, &aw_len);
   bw = find_word (b, &bw_len);
-  assert (aw != NULL && bw != NULL);
+  Assert (aw != NULL && bw != NULL);
 
   /* Words that are the same don't conflict. */
   if (aw_len == bw_len && !buf_compare_case (aw, bw, aw_len))
@@ -291,7 +291,7 @@
 static int
 conflicting_3char_prefix_command (const struct command *cmd) 
 {
-  assert (cmd >= commands && cmd < commands + command_cnt);
+  Assert (cmd >= commands && cmd < commands + command_cnt);
 
   return ((cmd > commands
            && conflicting_3char_prefixes (cmd[-1].name, cmd[0].name))
@@ -421,7 +421,7 @@
   for (cmd = commands; cmd < commands + command_cnt; cmd++) 
     if (!strcmp (cmd->name, name))
       return cmd;
-  abort ();
+  AssertNotReached ();
 }
 
 /* Frees the WORD_CNT words in WORDS. */
@@ -480,7 +480,7 @@
     {
       int cmd_match_cnt;
       
-      assert (word_cnt < sizeof words / sizeof *words);
+      Assert (word_cnt < sizeof words / sizeof *words);
       if (token == T_ID) 
         {
           words[word_cnt] = ds_xstrdup (&tokstr);
@@ -523,7 +523,7 @@
 
       /* Get the command. */
       command = get_complete_match (words, complete_word_cnt);
-      assert (command != NULL);
+      Assert (command != NULL);
 
       /* Figure out how many words we want to keep.
          We normally want to swallow the entire command. */
@@ -532,7 +532,7 @@
         pushback_word_cnt--;
       
       /* FIXME: We only support one-token pushback. */
-      assert (pushback_word_cnt + 1 >= word_cnt);
+      Assert (pushback_word_cnt + 1 >= word_cnt);
 
       while (word_cnt > pushback_word_cnt) 
         {
@@ -571,7 +571,7 @@
 static bool
 report_state_mismatch (const struct command *command, enum cmd_state state)
 {
-  assert (!in_correct_state (command, state));
+  Assert (!in_correct_state (command, state));
   if (state == CMD_STATE_INITIAL || state == CMD_STATE_DATA)
     {
       const char *allowed[3];
@@ -595,7 +595,7 @@
       else if (allowed_cnt == 3)
         s = xasprintf (_("%s, %s, or %s"), allowed[0], allowed[1], allowed[2]);
       else
-        abort ();
+        AssertNotReached ();
 
       msg (SE, _("%s is allowed only %s."), command->name, s);
 
@@ -748,7 +748,7 @@
       return 0;
 
     default:
-      assert (pid > 0);
+      Assert (pid > 0);
       while (wait (NULL) != pid)
 	;
       return 1;
Index: src/language/line-buffer.c
===================================================================
RCS file: /sources/pspp/pspp/src/language/line-buffer.c,v
retrieving revision 1.14
diff -U3 -r1.14 line-buffer.c
--- src/language/line-buffer.c	4 Jul 2006 04:39:04 -0000	1.14
+++ src/language/line-buffer.c	4 Jul 2006 06:05:06 -0000
@@ -18,7 +18,7 @@
    02110-1301, USA. */
 
 #include <config.h>
-
+#include <libpspp/Assert.h>
 #include <language/line-buffer.h>
 
 #include <stdio.h>
@@ -420,7 +420,7 @@
 void
 msg_pop_msg_locator (const struct msg_locator *loc)
 {
-  assert (nfile_loc >= 0 && file_loc[nfile_loc - 1] == loc);
+  Assert (nfile_loc >= 0 && file_loc[nfile_loc - 1] == loc);
   nfile_loc--;
 }
 
@@ -493,7 +493,7 @@
       return s->u.interactive (line, get_prompt_style ());
     }
 
-  abort ();
+  AssertNotReached ();
 }
 
 /* Reads a single line into LINE.
@@ -568,7 +568,7 @@
 const char * 
 getl_get_prompt (enum getl_prompt_style style)
 {
-  assert (style < GETL_PROMPT_CNT);
+  Assert (style < GETL_PROMPT_CNT);
   return prompts[style];
 }
 
@@ -576,7 +576,7 @@
 void
 getl_set_prompt (enum getl_prompt_style style, const char *string)
 {
-  assert (style < GETL_PROMPT_CNT);
+  Assert (style < GETL_PROMPT_CNT);
   free (prompts[style]);
   prompts[style] = xstrdup (string);
 }
@@ -585,7 +585,7 @@
 void
 getl_set_prompt_style (enum getl_prompt_style style) 
 {
-  assert (style < GETL_PROMPT_CNT);
+  Assert (style < GETL_PROMPT_CNT);
   current_style = style;
 }
 
Index: src/language/control/control-stack.c
===================================================================
RCS file: /sources/pspp/pspp/src/language/control/control-stack.c,v
retrieving revision 1.3
diff -U3 -r1.3 control-stack.c
--- src/language/control/control-stack.c	15 Mar 2006 03:29:10 -0000	1.3
+++ src/language/control/control-stack.c	4 Jul 2006 06:05:06 -0000
@@ -1,6 +1,6 @@
 #include <config.h>
 #include "control-stack.h"
-#include <assert.h>
+#include <libpspp/Assert.h>
 #include <stdlib.h>
 #include <libpspp/compiler.h>
 #include <libpspp/message.h>
@@ -35,7 +35,7 @@
 {
   struct ctl_struct *ctl;
 
-  assert (private != NULL);
+  Assert (private != NULL);
   ctl = xmalloc (sizeof *ctl);
   ctl->class = class;
   ctl->down = ctl_stack;
@@ -79,8 +79,8 @@
 {
   struct ctl_struct *top = ctl_stack;
   
-  assert (top != NULL);
-  assert (top->private == private);
+  Assert (top != NULL);
+  Assert (top->private == private);
 
   top->class->close (top->private);
   ctl_stack = top->down;
Index: src/language/control/do-if.c
===================================================================
RCS file: /sources/pspp/pspp/src/language/control/do-if.c,v
retrieving revision 1.5
diff -U3 -r1.5 do-if.c
--- src/language/control/do-if.c	5 May 2006 04:53:12 -0000	1.5
+++ src/language/control/do-if.c	4 Jul 2006 06:05:06 -0000
@@ -18,7 +18,7 @@
    02110-1301, USA. */
 
 #include <config.h>
-
+#include <libpspp/Assert.h>
 #include <stdlib.h>
 
 #include "control-stack.h"
@@ -161,7 +161,7 @@
 static void
 add_else (struct do_if_trns *do_if) 
 {
-  assert (!has_else (do_if));
+  Assert (!has_else (do_if));
   add_clause (do_if, NULL, next_transformation ());
 }
 
Index: src/language/data-io/data-list.c
===================================================================
RCS file: /sources/pspp/pspp/src/language/data-io/data-list.c,v
retrieving revision 1.17
diff -U3 -r1.17 data-list.c
--- src/language/data-io/data-list.c	27 Jun 2006 19:09:21 -0000	1.17
+++ src/language/data-io/data-list.c	4 Jul 2006 06:05:06 -0000
@@ -18,6 +18,7 @@
    02110-1301, USA. */
 
 #include <config.h>
+#include <libpspp/Assert.h>
 
 #include <ctype.h>
 #include <float.h>
@@ -999,7 +1000,7 @@
       retval = read_from_data_list_list (dls, c);
       break;
     default:
-      abort ();
+      AssertNotReached ();
     }
   dfm_pop (dls->reader);
 
Index: src/language/data-io/data-reader.c
===================================================================
RCS file: /sources/pspp/pspp/src/language/data-io/data-reader.c,v
retrieving revision 1.11
diff -U3 -r1.11 data-reader.c
--- src/language/data-io/data-reader.c	9 Jun 2006 22:51:24 -0000	1.11
+++ src/language/data-io/data-reader.c	4 Jul 2006 06:05:06 -0000
@@ -18,6 +18,7 @@
    02110-1301, USA. */
 
 #include <config.h>
+#include <libpspp/Assert.h>
 
 #include <language/data-io/data-reader.h>
 
@@ -195,7 +196,7 @@
 static bool
 read_file_record (struct dfm_reader *r)
 {
-  assert (r->fh != fh_inline_file ());
+  Assert (r->fh != fh_inline_file ());
   ds_clear (&r->line);
   if (fh_get_mode (r->fh) == FH_MODE_TEXT)
     {
@@ -224,7 +225,7 @@
         }
     }
   else
-    abort ();
+    AssertNotReached ();
 
   r->where.line_number++;
 
@@ -284,8 +285,8 @@
 struct substring
 dfm_get_record (struct dfm_reader *r)
 {
-  assert ((r->flags & DFM_ADVANCE) == 0);
-  assert (r->eof_cnt == 0);
+  Assert ((r->flags & DFM_ADVANCE) == 0);
+  Assert (r->eof_cnt == 0);
 
   return ds_substr (&r->line, r->pos, SIZE_MAX);
 }
@@ -299,8 +300,8 @@
 {
   size_t ofs, new_pos, tab_width;
 
-  assert ((r->flags & DFM_ADVANCE) == 0);
-  assert (r->eof_cnt == 0);
+  Assert ((r->flags & DFM_ADVANCE) == 0);
+  Assert (r->eof_cnt == 0);
 
   if (r->flags & DFM_TABS_EXPANDED)
     return;
@@ -340,7 +341,7 @@
          length that we had before.  DATA LIST uses a
          beyond-the-end position to deal with an empty field at
          the end of the line. */
-      assert (r->pos >= ds_length (&r->line));
+      Assert (r->pos >= ds_length (&r->line));
       new_pos = (r->pos - ds_length (&r->line)) + ds_length (&r->scratch);
     }
 
Index: src/language/data-io/data-writer.c
===================================================================
RCS file: /sources/pspp/pspp/src/language/data-io/data-writer.c,v
retrieving revision 1.5
diff -U3 -r1.5 data-writer.c
--- src/language/data-io/data-writer.c	17 Apr 2006 01:54:15 -0000	1.5
+++ src/language/data-io/data-writer.c	4 Jul 2006 06:05:06 -0000
@@ -19,7 +19,7 @@
 
 #include <config.h>
 #include <language/data-io/data-writer.h>
-#include <assert.h>
+#include <libpspp/Assert.h>
 #include <errno.h>
 #include <stdlib.h>
 #include <libpspp/alloc.h>
@@ -85,7 +85,7 @@
 int
 dfm_put_record (struct dfm_writer *w, const char *rec, size_t len)
 {
-  assert (w != NULL);
+  Assert (w != NULL);
 
   if (dfm_write_error (w))
     return 0;
Index: src/language/data-io/file-handle.q
===================================================================
RCS file: /sources/pspp/pspp/src/language/data-io/file-handle.q,v
retrieving revision 1.6
diff -U3 -r1.6 file-handle.q
--- src/language/data-io/file-handle.q	28 Jun 2006 02:21:28 -0000	1.6
+++ src/language/data-io/file-handle.q	4 Jul 2006 06:05:07 -0000
@@ -109,7 +109,7 @@
         properties.record_width = cmd.n_lrecl[0];
       break;
     default:
-      assert (0);
+      AssertNotReached ();
     }
 
   if (cmd.mode != FH_SCRATCH)
@@ -154,7 +154,7 @@
     case FH_REF_SCRATCH:
       return _("scratch file");
     default:
-      abort ();
+      AssertNotReached ();
     }
 }
 
Index: src/language/data-io/get.c
===================================================================
RCS file: /sources/pspp/pspp/src/language/data-io/get.c,v
retrieving revision 1.14
diff -U3 -r1.14 get.c
--- src/language/data-io/get.c	2 Jul 2006 04:25:12 -0000	1.14
+++ src/language/data-io/get.c	4 Jul 2006 06:05:07 -0000
@@ -18,7 +18,7 @@
    02110-1301, USA. */
 
 #include <config.h>
-
+#include <libpspp/Assert.h>
 #include <stdlib.h>
 
 #include <data/any-reader.h>
@@ -302,9 +302,9 @@
   struct sfm_write_options sysfile_opts;
   struct pfm_write_options porfile_opts;
 
-  assert (writer_type == SYSFILE_WRITER || writer_type == PORFILE_WRITER);
-  assert (command_type == XFORM_CMD || command_type == PROC_CMD);
-  assert ((retain_unselected != NULL) == (command_type == PROC_CMD));
+  Assert (writer_type == SYSFILE_WRITER || writer_type == PORFILE_WRITER);
+  Assert (command_type == XFORM_CMD || command_type == PROC_CMD);
+  Assert ((retain_unselected != NULL) == (command_type == PROC_CMD));
 
   if (command_type == PROC_CMD)
     *retain_unselected = true;
@@ -843,7 +843,7 @@
           saw_table = true;
         }
       else
-        assert (0);
+        AssertNotReached ();
       lex_match ('=');
 
       file->by = NULL;
@@ -869,7 +869,7 @@
         }
       else 
         {
-          assert (file->type == MTF_FILE);
+          Assert (file->type == MTF_FILE);
           file->next = first_table;
           file->prev = first_table->prev;
           if (first_table->prev)
@@ -1169,7 +1169,7 @@
     if (iter->handle == NULL)
       {
         if (!mtf_delete_file_in_place (mtf, &iter))
-          abort ();
+          AssertNotReached ();
         break;
       }
   
@@ -1196,7 +1196,7 @@
     strcpy (s, "numeric");
   else
     {
-      assert (v->type == ALPHA);
+      Assert (v->type == ALPHA);
       sprintf (s, "string with width %d", v->width);
     }
   return s;
@@ -1231,7 +1231,7 @@
   for (iter = mtf->head; iter; iter = next)
     {
       next = iter->next;
-      assert (iter->dict != mtf->dict);
+      Assert (iter->dict != mtf->dict);
       if (!mtf_close_file (iter))
         ok = false;
     }
@@ -1311,7 +1311,7 @@
 {
   const struct ccase *ca = case_is_null (&a->input) ? c : &a->input;
   const struct ccase *cb = case_is_null (&b->input) ? c : &b->input;
-  assert ((a == NULL) + (b == NULL) + (c == NULL) <= 1);
+  Assert ((a == NULL) + (b == NULL) + (c == NULL) <= 1);
   return case_compare_2dict (ca, cb, a->by, b->by, mtf->by_cnt);
 }
 
@@ -1325,7 +1325,7 @@
   /* Do we need another record from the active file? */
   bool read_active_file;
 
-  assert (mtf->head != NULL);
+  Assert (mtf->head != NULL);
   if (mtf->head->type == MTF_TABLE)
     return true;
   
@@ -1377,7 +1377,7 @@
 	 from the TABLE input record into the output record. */
       for (; iter != NULL; iter = next)
 	{
-	  assert (iter->type == MTF_TABLE);
+	  Assert (iter->type == MTF_TABLE);
       
 	  next = iter->next;
           for (;;) 
@@ -1654,7 +1654,7 @@
           int src_idx = *src_fv + idx;
           int dst_idx = v->fv + idx;
           
-          assert (map->map[dst_idx] == -1);
+          Assert (map->map[dst_idx] == -1);
           map->map[dst_idx] = src_idx;
         }
       free (src_fv);
@@ -1679,10 +1679,10 @@
 {
   size_t dst_idx;
 
-  assert (map != NULL);
-  assert (src != NULL);
-  assert (dst != NULL);
-  assert (src != dst);
+  Assert (map != NULL);
+  Assert (src != NULL);
+  Assert (dst != NULL);
+  Assert (src != dst);
 
   for (dst_idx = 0; dst_idx < map->value_cnt; dst_idx++)
     {
Index: src/language/data-io/inpt-pgm.c
===================================================================
RCS file: /sources/pspp/pspp/src/language/data-io/inpt-pgm.c,v
retrieving revision 1.11
diff -U3 -r1.11 inpt-pgm.c
--- src/language/data-io/inpt-pgm.c	28 Jun 2006 05:49:03 -0000	1.11
+++ src/language/data-io/inpt-pgm.c	4 Jul 2006 06:05:07 -0000
@@ -18,7 +18,7 @@
    02110-1301, USA. */
 
 #include <config.h>
-
+#include <libpspp/Assert.h>
 #include <language/data-io/inpt-pgm.h>
 
 #include <float.h>
@@ -170,7 +170,7 @@
         inp->init[j + var->fv] = value_init;
     }
   for (i = 0; i < inp->init_cnt; i++)
-    assert (inp->init[i] != -1);
+    Assert (inp->init[i] != -1);
   inp->case_size = dict_get_case_size (default_dict);
 
   proc_set_source (create_case_source (&input_program_source_class, inp));
@@ -181,7 +181,7 @@
 int
 cmd_end_input_program (void)
 {
-  assert (in_input_program ());
+  Assert (in_input_program ());
   return CMD_END_INPUT_PROGRAM; 
 }
 
@@ -205,7 +205,7 @@
         memset (case_data_rw (c, i)->s, ' ', sizeof case_data_rw (c, i)->s);
         break;
       default:
-        assert (0);
+        AssertNotReached ();
       }
 }
 
@@ -229,7 +229,7 @@
         memset (case_data_rw (c, i)->s, ' ', sizeof case_data_rw (c, i)->s);
         break;
       default:
-        assert (0);
+        AssertNotReached ();
       }
 }
 
@@ -288,7 +288,7 @@
 int
 cmd_end_case (void)
 {
-  assert (in_input_program ());
+  Assert (in_input_program ());
   if (token == '.')
     return CMD_END_CASE;
   return lex_end_of_command ();
@@ -406,7 +406,7 @@
 int
 cmd_end_file (void)
 {
-  assert (in_input_program ());
+  Assert (in_input_program ());
 
   add_transformation (end_file_trns_proc, NULL, NULL);
 
Index: src/language/data-io/list.q
===================================================================
RCS file: /sources/pspp/pspp/src/language/data-io/list.q,v
retrieving revision 1.13
diff -U3 -r1.13 list.q
--- src/language/data-io/list.q	28 Jun 2006 02:21:28 -0000	1.13
+++ src/language/data-io/list.q	4 Jul 2006 06:05:07 -0000
@@ -115,7 +115,7 @@
 {
   struct outp_text text;
   
-  assert (d->cp_y + d->font_height <= d->length);
+  Assert (d->cp_y + d->font_height <= d->length);
   text.font = OUTP_FIXED;
   text.justification = OUTP_LEFT;
   text.string = ss_cstr (s);
@@ -269,7 +269,7 @@
 	  fputs ("  </TR>\n", x->file);
 	}
       else
-	assert (0);
+	AssertNotReached ();
     }
 }
 
@@ -286,7 +286,7 @@
   if (n_lines_remaining (d) < prc->header_rows + 1)
     {
       outp_eject_page (d);
-      assert (n_lines_remaining (d) >= prc->header_rows + 1);
+      Assert (n_lines_remaining (d) >= prc->header_rows + 1);
     }
 
   /* Design the header. */
@@ -341,7 +341,7 @@
 		prc->header[i][x] = 0;
 		break;
 	      }
-	  assert (x);
+	  Assert (x);
 	}
     }
 
@@ -387,7 +387,7 @@
 	  }
       }
     else
-      assert (0);
+      AssertNotReached ();
   
   free (cmd.v_variables);
 }
@@ -527,7 +527,7 @@
       if (d->class == &html_class)
 	continue;
       
-      assert (d->class->special == 0);
+      Assert (d->class->special == 0);
 
       outp_open_page (d);
       
@@ -582,7 +582,7 @@
 		}
 	      width = trial_width;
 	    }
-	  assert (prc->n_vertical != SIZE_MAX);
+	  Assert (prc->n_vertical != SIZE_MAX);
 
 	  prc->n_vertical = cmd.n_variables;
 	  /* Finally determine the length of the headers. */
@@ -718,7 +718,7 @@
 	fputs ("  </TR>\n", x->file);
       }
     else
-      assert (0);
+      AssertNotReached  ();
 
   return true;
 }
Index: src/language/data-io/matrix-data.c
===================================================================
RCS file: /sources/pspp/pspp/src/language/data-io/matrix-data.c,v
retrieving revision 1.9
diff -U3 -r1.9 matrix-data.c
--- src/language/data-io/matrix-data.c	27 Jun 2006 19:09:21 -0000	1.9
+++ src/language/data-io/matrix-data.c	4 Jul 2006 06:05:07 -0000
@@ -18,6 +18,7 @@
    02110-1301, USA. */
 
 #include <config.h>
+#include <libpspp/Assert.h>
 
 #include <stdlib.h>
 #include <ctype.h>
@@ -349,7 +350,7 @@
             for (i = 0; i < split_cnt; i++)
               {
                 struct mxd_var *mv = split[i]->aux;
-                assert (mv != NULL);
+                Assert (mv != NULL);
 		if (mv->var_type != MXD_CONTINUOUS)
 		  {
 		    msg (SE, _("Split variable %s is already another type."),
@@ -383,7 +384,7 @@
 	      {
                 struct variable *v = mx->factors[i];
                 struct mxd_var *mv = v->aux;
-                assert (mv != NULL);
+                Assert (mv != NULL);
 		if (mv->var_type != MXD_CONTINUOUS)
 		  {
 		    msg (SE, _("Factor variable %s is already another type."),
@@ -606,7 +607,7 @@
         struct mxd_var *mv = v->aux;
 	int type = mv->var_type;
 	
-	assert (type >= 0 && type < MXD_COUNT);
+	Assert (type >= 0 && type < MXD_COUNT);
 	v->print = v->write = fmt_tab[type];
 
 	if (type == MXD_CONTINUOUS)
@@ -712,7 +713,7 @@
 {
   struct mxd_var *mv;
   
-  assert (v->aux == NULL);
+  Assert (v->aux == NULL);
   mv = xmalloc (sizeof *mv);
   mv->var_type = var_type;
   mv->sub_type = sub_type;
@@ -754,7 +755,7 @@
       printf (" '%.*s'", token->length, token->string);
       break;
     default:
-      assert (0);
+      AssertNotReached ();
     }
   fflush (stdout);
 }
@@ -990,7 +991,7 @@
 	  }
 	else 
 	  {
-	    assert (mx->section == UPPER);
+	    Assert (mx->section == UPPER);
 	    for (r = 1; r < mx->n_continuous; r++)
 	      for (c = 0; c < r; c++)
 		cp[c + r * mx->n_continuous] = cp[r + c * mx->n_continuous];
@@ -1066,16 +1067,14 @@
 	      n_cols = mx->n_continuous;
 	      break;
 	    default:
-	      assert (0);
-              abort ();
+              AssertNotReached ();
 	    }
 	  break;
 	case 2:
 	  n_cols = 1;
 	  break;
 	default:
-	  assert (0);
-          abort ();
+          AssertNotReached ();
 	}
 
       {
@@ -1284,7 +1283,7 @@
   if (mx->n_factors == 0)
     return 1;
 
-  assert (nr->max_cell_idx >= cell);
+  Assert (nr->max_cell_idx >= cell);
   if (cell != nr->max_cell_idx)
     compare = 1;
   else
@@ -1404,7 +1403,7 @@
 	    for (content = 0; content <= PROX; content++)
 	      if (mx->is_per_factor[content])
 		{
-		  assert (nr->data[content] != NULL
+		  Assert (nr->data[content] != NULL
 			  && nr->data[content][cell] != NULL);
 
 		  if (!dump_cell_content (mx, content, nr->data[content][cell],
@@ -1935,13 +1934,11 @@
 	  n_cols = mx->n_continuous;
 	  break;
 	default:
-	  assert (0);
-          abort ();
+          AssertNotReached ();
 	}
       break;
     default:
-      assert (0);
-      abort ();
+      AssertNotReached ();
     }
   c->n_rows[wr->content]++;
 
Index: src/language/data-io/print.c
===================================================================
RCS file: /sources/pspp/pspp/src/language/data-io/print.c,v
retrieving revision 1.10
diff -U3 -r1.10 print.c
--- src/language/data-io/print.c	27 Jun 2006 19:09:21 -0000	1.10
+++ src/language/data-io/print.c	4 Jul 2006 06:05:07 -0000
@@ -20,7 +20,7 @@
 /* FIXME: seems like a lot of code duplication with data-list.c. */
 
 #include <config.h>
-
+#include <libpspp/Assert.h>
 #include <stdlib.h>
 
 #include <data/case.h>
@@ -838,7 +838,7 @@
       case PRT_SPACE:
 	break;
       case PRT_ERROR:
-	assert (0);
+	AssertNotReached ();
       }
 
   if (fh != NULL)
@@ -883,8 +883,7 @@
 	  break;
 	case PRT_ERROR:
         default:
-	  assert (0);
-          abort ();
+          AssertNotReached ();
 	}
       if (pot_w > w)
 	w = pot_w;
@@ -958,7 +957,7 @@
 	break;
 
       case PRT_ERROR:
-	assert (0);
+	AssertNotReached ();
 	break;
       }
 
@@ -988,7 +987,7 @@
 	  /* nothing to do */
 	  break;
 	case PRT_ERROR:
-	  assert (0);
+	  AssertNotReached ();
 	  break;
 	}
       n = i->next;
Index: src/language/dictionary/modify-variables.c
===================================================================
RCS file: /sources/pspp/pspp/src/language/dictionary/modify-variables.c,v
retrieving revision 1.6
diff -U3 -r1.6 modify-variables.c
--- src/language/dictionary/modify-variables.c	27 Jun 2006 19:09:22 -0000	1.6
+++ src/language/dictionary/modify-variables.c	4 Jul 2006 06:05:07 -0000
@@ -18,7 +18,7 @@
    02110-1301, USA. */
 
 #include <config.h>
-
+#include <libpspp/Assert.h>
 #include <stdlib.h>
 
 #include <data/dictionary.h>
@@ -248,7 +248,7 @@
                 compare_variables_given_ordering, &forward_positional_ordering);
 
           dict_get_vars (default_dict, &all_vars, &all_cnt, 0);
-          assert (all_cnt >= keep_cnt);
+          Assert (all_cnt >= keep_cnt);
 
           drop_cnt = all_cnt - keep_cnt;
           drop_vars = xnmalloc (drop_cnt, sizeof *keep_vars);
@@ -259,7 +259,7 @@
                               compare_variables_given_ordering,
                               &forward_positional_ordering)
               != drop_cnt)
-            assert (0);
+            AssertNotReached ();
 
           free (keep_vars);
           free (all_vars);
@@ -411,7 +411,7 @@
         compare_variables_given_ordering, &forward_positional_ordering);
 
   /* Keep variables, in index order. */
-  assert (all_cnt >= drop_cnt);
+  Assert (all_cnt >= drop_cnt);
   keep_cnt = all_cnt - drop_cnt;
   keep_vars = xnmalloc (keep_cnt, sizeof *keep_vars);
   if (set_difference (all_vars, all_cnt,
@@ -420,7 +420,7 @@
                       keep_vars,
                       compare_variables_given_ordering,
                       &forward_positional_ordering) != keep_cnt)
-    assert (0);
+    AssertNotReached ();
 
   /* Copy variables into var_renaming array. */
   var_renaming = xnmalloc (keep_cnt, sizeof *var_renaming);
@@ -514,7 +514,7 @@
   /* Do renaming. */
   if (dict_rename_vars (d, rename_vars, rename_new_names, rename_cnt,
                         NULL) == 0)
-    assert (0);
+    AssertNotReached ();
 
   /* Clean up. */
   for (i = 0; i < vm->rename_cnt; i++)
Index: src/language/dictionary/numeric.c
===================================================================
RCS file: /sources/pspp/pspp/src/language/dictionary/numeric.c,v
retrieving revision 1.9
diff -U3 -r1.9 numeric.c
--- src/language/dictionary/numeric.c	27 Jun 2006 19:09:22 -0000	1.9
+++ src/language/dictionary/numeric.c	4 Jul 2006 06:05:07 -0000
@@ -18,6 +18,7 @@
    02110-1301, USA. */
 
 #include <config.h>
+#include <libpspp/Assert.h>
 
 #include <stdlib.h>
 
@@ -151,8 +152,7 @@
 	  width = f.w / 2;
 	  break;
 	default:
-	  assert (0);
-          abort ();
+          AssertNotReached ();
 	}
 
       /* Create each variable. */
Index: src/language/dictionary/split-file.c
===================================================================
RCS file: /sources/pspp/pspp/src/language/dictionary/split-file.c,v
retrieving revision 1.6
diff -U3 -r1.6 split-file.c
--- src/language/dictionary/split-file.c	27 Jun 2006 19:09:22 -0000	1.6
+++ src/language/dictionary/split-file.c	4 Jul 2006 06:05:07 -0000
@@ -18,6 +18,7 @@
    02110-1301, USA. */
 
 #include <config.h>
+#include <libpspp/Assert.h>
 
 #include <stdlib.h>
 
@@ -91,7 +92,7 @@
       char temp_buf[80];
       const char *val_lab;
 
-      assert (v->type == NUMERIC || v->type == ALPHA);
+      Assert (v->type == NUMERIC || v->type == ALPHA);
       tab_text (t, 0, i + 1, TAB_LEFT | TAT_PRINTF, "%s", v->name);
       
       data_out (temp_buf, &v->print, case_data (c, v->fv));
Index: src/language/dictionary/vector.c
===================================================================
RCS file: /sources/pspp/pspp/src/language/dictionary/vector.c,v
retrieving revision 1.6
diff -U3 -r1.6 vector.c
--- src/language/dictionary/vector.c	27 Jun 2006 19:09:22 -0000	1.6
+++ src/language/dictionary/vector.c	4 Jul 2006 06:05:07 -0000
@@ -18,7 +18,7 @@
    02110-1301, USA. */
 
 #include <config.h>
-
+#include <libpspp/Assert.h>
 #include <stdlib.h>
 
 #include <data/procedure.h>
@@ -177,7 +177,7 @@
 		  v[i] = dict_create_var_assert (default_dict, name, 0);
 		}
               if (!dict_create_vector (default_dict, cp, v, nv))
-                assert (0);
+                AssertNotReached ();
 	      cp += strlen (cp) + 1;
 	    }
           free (v);
Index: src/language/expressions/evaluate.c
===================================================================
RCS file: /sources/pspp/pspp/src/language/expressions/evaluate.c,v
retrieving revision 1.5
diff -U3 -r1.5 evaluate.c
--- src/language/expressions/evaluate.c	9 Jun 2006 22:51:24 -0000	1.5
+++ src/language/expressions/evaluate.c	4 Jul 2006 06:05:07 -0000
@@ -18,6 +18,7 @@
    02110-1301, USA. */
 
 #include <config.h>
+#include <libpspp/Assert.h>
 #include "private.h"
 
 #include <ctype.h>
@@ -36,12 +37,12 @@
   double *ns = e->number_stack;
   struct substring *ss = e->string_stack;
 
-  assert ((c != NULL) == (e->dict != NULL));
+  Assert ((c != NULL) == (e->dict != NULL));
   pool_clear (e->eval_pool);
 
   for (;;)
     {
-      assert (op < e->ops + e->op_cnt);
+      Assert (op < e->ops + e->op_cnt);
       switch (op++->operation)
 	{
         case OP_number:
@@ -67,7 +68,7 @@
 #include "evaluate.inc"
           
 	default:
-	  abort ();
+	  AssertNotReached ();
 	}
     }
 }
@@ -77,7 +78,7 @@
 {
   double d;
 
-  assert (e->type == OP_number || e->type == OP_boolean);
+  Assert (e->type == OP_number || e->type == OP_boolean);
   expr_evaluate (e, c, case_idx, &d);
   return d;
 }
@@ -90,8 +91,8 @@
 {
   struct substring s;
 
-  assert (e->type == OP_string);
-  assert ((dst == NULL) == (dst_size == 0));
+  Assert (e->type == OP_string);
+  Assert ((dst == NULL) == (dst_size == 0));
   expr_evaluate (e, c, case_idx, &s);
   
   buf_copy_rpad (dst, dst_size, s.string, s.length);
@@ -233,7 +234,7 @@
         }
 
       default:
-        assert (0);
+        AssertNotReached ();
       }
 
   expr_free (expr);
@@ -299,7 +300,7 @@
           fprintf (stderr, "i<%d>", op->integer);
           break;
         default:
-          abort ();
+          AssertNotReached ();
         } 
     }
   fprintf (stderr, "\n");
Index: src/language/expressions/operations.def
===================================================================
RCS file: /sources/pspp/pspp/src/language/expressions/operations.def,v
retrieving revision 1.4
diff -U3 -r1.4 operations.def
--- src/language/expressions/operations.def	9 Jun 2006 22:51:24 -0000	1.4
+++ src/language/expressions/operations.def	4 Jul 2006 06:05:07 -0000
@@ -567,7 +567,7 @@
 
   v.f = x;
   dst = alloc_string (e, f->w);
-  assert ((formats[f->type].cat & FCAT_STRING) == 0);
+  Assert ((formats[f->type].cat & FCAT_STRING) == 0);
   data_out (dst.string, f, &v);
   return dst;
 }
Index: src/language/expressions/operations.h.pl
===================================================================
RCS file: /sources/pspp/pspp/src/language/expressions/operations.h.pl,v
retrieving revision 1.1
diff -U3 -r1.1 operations.h.pl
--- src/language/expressions/operations.h.pl	4 Mar 2006 01:11:57 -0000	1.1
+++ src/language/expressions/operations.h.pl	4 Jul 2006 06:05:07 -0000
@@ -48,7 +48,7 @@
     print "\nstatic inline bool\n";
     print "$function (operation_type op)\n";
     print "{\n";
-    print "  assert (is_operation (op));\n" if $function ne 'is_operation';
+    print "  Assert (is_operation (op));\n" if $function ne 'is_operation';
     print "  return op >= ${category}_first && op <= ${category}_last;\n";
     print "}\n";
 }
Index: src/language/expressions/optimize.c
===================================================================
RCS file: /sources/pspp/pspp/src/language/expressions/optimize.c,v
retrieving revision 1.3
diff -U3 -r1.3 optimize.c
--- src/language/expressions/optimize.c	9 Jun 2006 22:51:24 -0000	1.3
+++ src/language/expressions/optimize.c	4 Jul 2006 06:05:08 -0000
@@ -18,6 +18,7 @@
    02110-1301, USA. */
 
 #include <config.h>
+#include <libpspp/Assert.h>
 #include "private.h"
 #include <math.h>
 #include <ctype.h>
@@ -72,7 +73,7 @@
     {
       /* Most operations produce SYSMIS given any SYSMIS
          argument. */
-      assert (op->returns == OP_number || op->returns == OP_boolean);
+      Assert (op->returns == OP_number || op->returns == OP_boolean);
       if (op->returns == OP_number)
         return expr_allocate_number (e, SYSMIS);
       else
@@ -100,7 +101,7 @@
 optimize_tree (union any_node *node, struct expression *e)
 {
   struct composite_node *n = &node->composite;
-  assert (is_composite (node->type));
+  Assert (is_composite (node->type));
 
   /* If you add to these optimizations, please also add a
      correctness test in tests/expressions/expressions.sh. */
@@ -157,19 +158,18 @@
 #include "optimize.inc"
 
     default:
-      assert (0);
+      AssertNotReached ();
     }
 
   /* Not reached. */
-  assert (0);
-  abort ();
+  AssertNotReached ();
 }
 
 static double
 get_number_arg (struct composite_node *c, size_t arg_idx) 
 {
-  assert (arg_idx < c->arg_cnt);
-  assert (c->args[arg_idx]->type == OP_number
+  Assert (arg_idx < c->arg_cnt);
+  Assert (c->args[arg_idx]->type == OP_number
           || c->args[arg_idx]->type == OP_boolean);
   return c->args[arg_idx]->number.n;
 }
@@ -190,8 +190,8 @@
 static struct substring
 get_string_arg (struct composite_node *c, size_t arg_idx) 
 {
-  assert (arg_idx < c->arg_cnt);
-  assert (c->args[arg_idx]->type == OP_string);
+  Assert (arg_idx < c->arg_cnt);
+  Assert (c->args[arg_idx]->type == OP_string);
   return c->args[arg_idx]->string.s;
 }
 
@@ -211,8 +211,8 @@
 static const struct fmt_spec *
 get_format_arg (struct composite_node *c, size_t arg_idx) 
 {
-  assert (arg_idx < c->arg_cnt);
-  assert (c->args[arg_idx]->type == OP_ni_format
+  Assert (arg_idx < c->arg_cnt);
+  Assert (c->args[arg_idx]->type == OP_ni_format
           || c->args[arg_idx]->type == OP_no_format);
   return &c->args[arg_idx]->format.f;
 }
@@ -302,7 +302,7 @@
       break;
 
     default:
-      abort ();
+      AssertNotReached ();
     }
 }
 
@@ -356,14 +356,14 @@
 void
 flatten_node (union any_node *n, struct expression *e)
 {
-  assert (is_operation (n->type));
+  Assert (is_operation (n->type));
 
   if (is_atom (n->type))
     flatten_atom (n, e);
   else if (is_composite (n->type))
     flatten_composite (n, e);
   else 
-    abort ();
+    AssertNotReached ();
 }
 
 static union operation_data *
Index: src/language/expressions/parse.c
===================================================================
RCS file: /sources/pspp/pspp/src/language/expressions/parse.c,v
retrieving revision 1.11
diff -U3 -r1.11 parse.c
--- src/language/expressions/parse.c	27 Jun 2006 19:09:22 -0000	1.11
+++ src/language/expressions/parse.c	4 Jul 2006 06:05:08 -0000
@@ -18,6 +18,7 @@
    02110-1301, USA. */
 
 #include <config.h>
+#include <libpspp/Assert.h>
 #include "private.h"
 #include <ctype.h>
 #include <float.h>
@@ -73,7 +74,7 @@
   union any_node *n;
   struct expression *e;
 
-  assert (type == EXPR_NUMBER || type == EXPR_STRING || type == EXPR_BOOLEAN);
+  Assert (type == EXPR_NUMBER || type == EXPR_STRING || type == EXPR_BOOLEAN);
 
   e = expr_create (dict);
   n = parse_or (e);
@@ -145,7 +146,7 @@
 static const struct stack_heights *
 atom_type_stack (atom_type type)
 {
-  assert (is_atom (type));
+  Assert (is_atom (type));
   
   switch (type) 
     {
@@ -167,7 +168,7 @@
       return &not_on_stack;
           
     default:
-      abort ();
+      AssertNotReached ();
     }
 }
 
@@ -271,7 +272,7 @@
       break;
 
     default:
-      abort ();
+      AssertNotReached ();
     }
   
   return true;
@@ -301,7 +302,7 @@
 {
   atom_type actual_type;
 
-  assert (!!do_coercion == (e != NULL));
+  Assert (!!do_coercion == (e != NULL));
   if (*node == NULL) 
     {
       /* Propagate error.  Whatever caused the original error
@@ -345,7 +346,7 @@
       break;
 
     case OP_format:
-      abort ();
+      AssertNotReached ();
 
     case OP_ni_format:
       if ((*node)->type == OP_format
@@ -399,7 +400,7 @@
       break;
 
     default:
-      abort ();
+      AssertNotReached ();
     }
 
   if (do_coercion) 
@@ -431,7 +432,7 @@
                       atom_type required_type, union any_node **node)
 {
   int success = type_coercion_core (e, required_type, node, NULL, true);
-  assert (success);
+  Assert (success);
 }
 
 /* Returns true if *NODE may be coerced to type REQUIRED_TYPE,
@@ -484,12 +485,12 @@
   const struct operation *o;
   size_t i;
 
-  assert (op != NULL);
+  Assert (op != NULL);
   o = &operations[op->type];
-  assert (o->arg_cnt == arg_cnt);
-  assert ((o->flags & OPF_ARRAY_OPERAND) == 0);
+  Assert (o->arg_cnt == arg_cnt);
+  Assert ((o->flags & OPF_ARRAY_OPERAND) == 0);
   for (i = 0; i < arg_cnt; i++) 
-    assert (o->args[i] == arg_type);
+    Assert (o->args[i] == arg_type);
   return true;
 }
 
@@ -526,7 +527,7 @@
   int op_count;
   const struct operator *operator;
 
-  assert (check_binary_operators (ops, op_cnt, operand_type));
+  Assert (check_binary_operators (ops, op_cnt, operand_type));
   if (node == NULL)
     return node;
 
@@ -865,13 +866,13 @@
      The caller must already have verified that the current token
      is the name of a vector. */
   vector = dict_lookup_vector (default_dict, tokid);
-  assert (vector != NULL);
+  Assert (vector != NULL);
   lex_get ();
 
   /* Skip left parenthesis token.
      The caller must have verified that the lookahead is a left
      parenthesis. */
-  assert (token == '(');
+  Assert (token == '(');
   lex_get ();
 
   element = parse_or (e);
@@ -988,7 +989,7 @@
 static atom_type
 function_arg_type (const struct operation *f, size_t arg_idx) 
 {
-  assert (arg_idx < f->arg_cnt || (f->flags & OPF_ARRAY_OPERAND));
+  Assert (arg_idx < f->arg_cnt || (f->flags & OPF_ARRAY_OPERAND));
 
   return f->args[arg_idx < f->arg_cnt ? arg_idx : f->arg_cnt - 1];
 }
@@ -1047,14 +1048,14 @@
     {
       if (f->array_min_elems == 0) 
         {
-          assert ((f->flags & OPF_MIN_VALID) == 0);
+          Assert ((f->flags & OPF_MIN_VALID) == 0);
           msg (SE, _("%s function does not accept a minimum valid "
                      "argument count."), f->prototype);
           return false;
         }
       else 
         {
-          assert (f->flags & OPF_MIN_VALID);
+          Assert (f->flags & OPF_MIN_VALID);
           if (array_arg_cnt < f->array_min_elems)
             {
               msg (SE, _("%s requires at least %d valid arguments in list."),
@@ -1239,8 +1240,8 @@
   else if (n->type == OP_LAG_Vnn || n->type == OP_LAG_Vsn)
     {
       int n_before;
-      assert (n->composite.arg_cnt == 2);
-      assert (n->composite.args[1]->type == OP_pos_int);
+      Assert (n->composite.arg_cnt == 2);
+      Assert (n->composite.args[1]->type == OP_pos_int);
       n_before = n->composite.args[1]->integer.i;
       if (n_lag < n_before)
         n_lag = n_before;
@@ -1275,20 +1276,20 @@
 atom_type
 expr_node_returns (const union any_node *n)
 {
-  assert (n != NULL);
-  assert (is_operation (n->type));
+  Assert (n != NULL);
+  Assert (is_operation (n->type));
   if (is_atom (n->type)) 
     return n->type;
   else if (is_composite (n->type))
     return operations[n->type].returns;
   else
-    abort ();
+    AssertNotReached ();
 }
 
 static const char *
 atom_type_name (atom_type type)
 {
-  assert (is_atom (type));
+  Assert (is_atom (type));
   return operations[type].name;
 }
 
@@ -1321,23 +1322,23 @@
   struct operation *op;
   size_t i;
   
-  assert (n != NULL);
-  assert (is_operation (n->type));
+  Assert (n != NULL);
+  Assert (is_operation (n->type));
   op = &operations[n->type];
   
   if (!is_atom (n->type))
     {
       struct composite_node *c = &n->composite;
       
-      assert (is_composite (n->type));
-      assert (c->arg_cnt >= op->arg_cnt);
+      Assert (is_composite (n->type));
+      Assert (c->arg_cnt >= op->arg_cnt);
       for (i = 0; i < op->arg_cnt; i++) 
-        assert (expr_node_returns (c->args[i]) == op->args[i]);
+        Assert (expr_node_returns (c->args[i]) == op->args[i]);
       if (c->arg_cnt > op->arg_cnt && !is_operator (n->type)) 
         {
-          assert (op->flags & OPF_ARRAY_OPERAND);
+          Assert (op->flags & OPF_ARRAY_OPERAND);
           for (i = 0; i < c->arg_cnt; i++)
-            assert (operations[c->args[i]->type].returns
+            Assert (operations[c->args[i]->type].returns
                     == op->args[op->arg_cnt - 1]);
         }
     }
@@ -1365,7 +1366,7 @@
     }
   memcpy (n->composite.args, args, sizeof *n->composite.args * arg_cnt);
   n->composite.min_valid = 0;
-  assert (is_valid_node (n));
+  Assert (is_valid_node (n));
   return n;
 }
 
@@ -1382,7 +1383,7 @@
 expr_allocate_boolean (struct expression *e, double b)
 {
   union any_node *n = pool_alloc (e->expr_pool, sizeof n->number);
-  assert (b == 0.0 || b == 1.0 || b == SYSMIS);
+  Assert (b == 0.0 || b == 1.0 || b == SYSMIS);
   n->type = OP_boolean;
   n->number.n = b;
   return n;
@@ -1401,7 +1402,7 @@
 expr_allocate_pos_int (struct expression *e, int i)
 {
   union any_node *n = pool_alloc (e->expr_pool, sizeof n->integer);
-  assert (i > 0);
+  Assert (i > 0);
   n->type = OP_pos_int;
   n->integer.i = i;
   return n;
@@ -1460,7 +1461,7 @@
 static union any_node *
 allocate_unary_variable (struct expression *e, struct variable *v) 
 {
-  assert (v != NULL);
+  Assert (v != NULL);
   return expr_allocate_unary (e, v->type == NUMERIC ? OP_NUM_VAR : OP_STR_VAR,
                               expr_allocate_variable (e, v));
 }
Index: src/language/expressions/private.h
===================================================================
RCS file: /sources/pspp/pspp/src/language/expressions/private.h,v
retrieving revision 1.4
diff -U3 -r1.4 private.h
--- src/language/expressions/private.h	9 Jun 2006 22:51:24 -0000	1.4
+++ src/language/expressions/private.h	4 Jul 2006 06:05:08 -0000
@@ -20,7 +20,7 @@
 #ifndef EXPRESSIONS_PRIVATE_H 
 #define EXPRESSIONS_PRIVATE_H
 
-#include <assert.h>
+#include <libpspp/Assert.h>
 #include <stddef.h>
 #include <data/format.h>
 #include <libpspp/str.h>
Index: src/language/lexer/lexer.c
===================================================================
RCS file: /sources/pspp/pspp/src/language/lexer/lexer.c,v
retrieving revision 1.6
diff -U3 -r1.6 lexer.c
--- src/language/lexer/lexer.c	9 Jun 2006 22:51:24 -0000	1.6
+++ src/language/lexer/lexer.c	4 Jul 2006 06:05:08 -0000
@@ -18,6 +18,8 @@
    02110-1301, USA. */
 
 #include <config.h>
+#include <libpspp/Assert.h>
+
 #include "lexer.h"
 #include <libpspp/message.h>
 #include <ctype.h>
@@ -124,7 +126,7 @@
 static void
 restore_token (void) 
 {
-  assert (put_token != 0);
+  Assert (put_token != 0);
   token = put_token;
   ds_assign_string (&tokstr, &put_tokstr);
   str_copy_trunc (tokid, sizeof tokid, ds_cstr (&tokstr));
@@ -470,7 +472,7 @@
 double
 lex_number (void)
 {
-  assert (lex_is_number ());
+  Assert (lex_is_number ());
   return tokval;
 }
 
@@ -490,7 +492,7 @@
 long
 lex_integer (void)
 {
-  assert (lex_is_integer ());
+  Assert (lex_is_integer ());
   return tokval;
 }
   
@@ -691,7 +693,7 @@
 void
 lex_put_back_id (const char *id)
 {
-  assert (lex_id_to_token (id, strlen (id)) == T_ID);
+  Assert (lex_id_to_token (id, strlen (id)) == T_ID);
   save_token ();
   token = T_ID;
   ds_assign_cstr (&tokstr, id);
@@ -934,7 +936,7 @@
 	}
     }
 	
-  assert (0);
+  AssertNotReached ();
 }
 
 /* Really weird functions. */
@@ -1018,7 +1020,7 @@
       chars_per_byte = 2;
       break;
     default:
-      abort ();
+      AssertNotReached ();
     }
   
   byte_cnt = ds_length (&tokstr) / chars_per_byte;
Index: src/language/lexer/q2c.c
===================================================================
RCS file: /sources/pspp/pspp/src/language/lexer/q2c.c,v
retrieving revision 1.12
diff -U3 -r1.12 q2c.c
--- src/language/lexer/q2c.c	28 Jun 2006 02:21:28 -0000	1.12
+++ src/language/lexer/q2c.c	4 Jul 2006 06:05:08 -0000
@@ -1710,7 +1710,7 @@
       dump (0, "goto lossage;");
       dump (-1, "default:");
       indent ();
-      dump (0, "assert (0);");
+      dump (0, "AssertNotReached ();");
       dump (-1, "}");
       outdent ();
     }
@@ -1776,7 +1776,7 @@
       dump (0, "break;");
       dump (-1, "default:");
       indent ();
-      dump (0, "assert (0);");
+      dump (0, "AssertNotReached ();");
       dump (-1, "}");
       outdent ();
     }
@@ -2030,6 +2030,7 @@
 	  indent = 0;
 
 	  dump (0, "#include <stdlib.h>");
+	  dump (0, "#include <libpspp/Assert.h>");
 	  dump (0, "#include <libpspp/alloc.h>");
 	  dump (0, "#include <libpspp/message.h>");
 	  dump (0, "#include <language/lexer/lexer.h>");
Index: src/language/lexer/variable-parser.c
===================================================================
RCS file: /sources/pspp/pspp/src/language/lexer/variable-parser.c,v
retrieving revision 1.5
diff -U3 -r1.5 variable-parser.c
--- src/language/lexer/variable-parser.c	27 Jun 2006 19:09:22 -0000	1.5
+++ src/language/lexer/variable-parser.c	4 Jul 2006 06:05:08 -0000
@@ -18,6 +18,7 @@
    02110-1301, USA. */
 
 #include <config.h>
+#include <libpspp/Assert.h>
 
 #include <language/lexer/variable-parser.h>
 
@@ -46,7 +47,7 @@
 static bool
 parse_vs_variable_idx (const struct var_set *vs, size_t *idx)
 {
-  assert (idx != NULL);
+  Assert (idx != NULL);
   
   if (token != T_ID)
     {
@@ -108,9 +109,9 @@
   struct var_set *vs;
   int success;
 
-  assert (d != NULL);
-  assert (var != NULL);
-  assert (cnt != NULL);
+  Assert (d != NULL);
+  Assert (var != NULL);
+  Assert (cnt != NULL);
 
   vs = var_set_create_from_dict (d);
   success = parse_var_set_vars (vs, var, cnt, opts);
@@ -210,18 +211,18 @@
   size_t mv;
   char *included;
 
-  assert (vs != NULL);
-  assert (v != NULL);
-  assert (nv != NULL);
+  Assert (vs != NULL);
+  Assert (v != NULL);
+  Assert (nv != NULL);
 
   /* At most one of PV_NUMERIC, PV_STRING, PV_SAME_TYPE may be
      specified. */
-  assert ((((pv_opts & PV_NUMERIC) != 0)
+  Assert ((((pv_opts & PV_NUMERIC) != 0)
            + ((pv_opts & PV_STRING) != 0)
            + ((pv_opts & PV_SAME_TYPE) != 0)) <= 1);
 
   /* PV_DUPLICATE and PV_NO_DUPLICATE are incompatible. */
-  assert (!(pv_opts & PV_DUPLICATE) || !(pv_opts & PV_NO_DUPLICATE));
+  Assert (!(pv_opts & PV_DUPLICATE) || !(pv_opts & PV_NO_DUPLICATE));
 
   if (!(pv_opts & PV_APPEND))
     {
@@ -371,9 +372,9 @@
   char root1[LONG_NAME_LEN + 1], root2[LONG_NAME_LEN + 1];
   int success = 0;
 
-  assert (names != NULL);
-  assert (nnames != NULL);
-  assert ((pv_opts & ~(PV_APPEND | PV_SINGLE
+  Assert (names != NULL);
+  Assert (nnames != NULL);
+  Assert ((pv_opts & ~(PV_APPEND | PV_SINGLE
                        | PV_NO_SCRATCH | PV_NO_DUPLICATE)) == 0);
   /* FIXME: PV_NO_DUPLICATE is not implemented. */
 
@@ -482,9 +483,9 @@
 {
   size_t i;
 
-  assert (names != NULL);
-  assert (nnames != NULL);
-  assert ((pv_opts & ~PV_APPEND) == 0);
+  Assert (names != NULL);
+  Assert (nnames != NULL);
+  Assert ((pv_opts & ~PV_APPEND) == 0);
 
   if (!(pv_opts & PV_APPEND))
     {
@@ -555,7 +556,7 @@
 size_t
 var_set_get_cnt (const struct var_set *vs) 
 {
-  assert (vs != NULL);
+  Assert (vs != NULL);
 
   return vs->get_cnt (vs);
 }
@@ -565,8 +566,8 @@
 struct variable *
 var_set_get_var (const struct var_set *vs, size_t idx) 
 {
-  assert (vs != NULL);
-  assert (idx < var_set_get_cnt (vs));
+  Assert (vs != NULL);
+  Assert (idx < var_set_get_cnt (vs));
 
   return vs->get_var (vs, idx);
 }
@@ -588,9 +589,9 @@
 var_set_lookup_var_idx (const struct var_set *vs, const char *name,
                         size_t *idx)
 {
-  assert (vs != NULL);
-  assert (name != NULL);
-  assert (strlen (name) <= LONG_NAME_LEN);
+  Assert (vs != NULL);
+  Assert (name != NULL);
+  Assert (strlen (name) <= LONG_NAME_LEN);
 
   return vs->lookup_var_idx (vs, name, idx);
 }
Index: src/language/stats/aggregate.c
===================================================================
RCS file: /sources/pspp/pspp/src/language/stats/aggregate.c,v
retrieving revision 1.12
diff -U3 -r1.12 aggregate.c
--- src/language/stats/aggregate.c	27 Jun 2006 19:09:22 -0000	1.12
+++ src/language/stats/aggregate.c	4 Jul 2006 06:05:08 -0000
@@ -18,7 +18,7 @@
    02110-1301, USA. */
 
 #include <config.h>
-
+#include <libpspp/Assert.h>
 #include <stdlib.h>
 
 #include <data/any-writer.h>
@@ -571,7 +571,7 @@
 		  destvar = dict_clone_var (agr->dict, v->src, dest[i]);
 		else
                   {
-                    assert (v->src->type == NUMERIC
+                    Assert (v->src->type == NUMERIC
                             || function->alpha_type == NUMERIC);
                     destvar = dict_create_var (agr->dict, dest[i], 0);
                     if (destvar != NULL) 
@@ -892,7 +892,7 @@
                caught earlier.  Nothing to do. */
             break;
 	  default:
-	    assert (0);
+	    AssertNotReached ();
 	  }
     } else {
       switch (iter->function)
@@ -904,7 +904,7 @@
 	  iter->int1++;
 	  break;
 	default:
-	  assert (0);
+	  AssertNotReached ();
 	}
     }
 }
@@ -1033,7 +1033,7 @@
 	    v->f = i->int1;
 	    break;
 	  default:
-	    assert (0);
+	    AssertNotReached ();
 	  }
       }
   }
Index: src/language/stats/crosstabs.q
===================================================================
RCS file: /sources/pspp/pspp/src/language/stats/crosstabs.q,v
retrieving revision 1.11
diff -U3 -r1.11 crosstabs.q
--- src/language/stats/crosstabs.q	28 Jun 2006 02:21:28 -0000	1.11
+++ src/language/stats/crosstabs.q	4 Jul 2006 06:05:09 -0000
@@ -127,8 +127,8 @@
 static inline struct var_range *
 get_var_range (struct variable *v) 
 {
-  assert (v != NULL);
-  assert (v->aux != NULL);
+  Assert (v != NULL);
+  Assert (v->aux != NULL);
   return v->aux;
 }
 
@@ -321,7 +321,7 @@
     var_set = var_set_create_from_array (variables, variables_cnt);
   else
     var_set = var_set_create_from_dict (default_dict);
-  assert (var_set != NULL);
+  Assert (var_set != NULL);
   
   for (n_by = 0; ;)
     {
@@ -583,7 +583,7 @@
       {
 	int j;
 
-	assert (x != NULL);
+	Assert (x != NULL);
 	for (j = 0; j < x->nvar; j++)
 	  {
             const union value *v = case_data (c, x->vars[j]->fv);
@@ -720,7 +720,7 @@
 	}
       else 
 	{
-	  assert (x->vars[i]->type == ALPHA);
+	  Assert (x->vars[i]->type == ALPHA);
 	  {
 	    const int diffstr = strncmp (a->values[i].s, b->values[i].s,
                                          x->vars[i]->width);
@@ -1084,7 +1084,7 @@
 	    const struct tuple *t;
 
 	    for (t = cell_names; t->value != cells[i]; t++)
-	      assert (t->value != -1);
+	      Assert (t->value != -1);
 	    if (i)
 	      cp = stpcpy (cp, ", ");
 	    cp = stpcpy (cp, gettext (t->name));
@@ -1295,7 +1295,7 @@
 	  int r, c;
 	  double *tp = col_tot;
 	  
-	  assert (mode == INTEGER);
+	  Assert (mode == INTEGER);
 	  mat = (*tb)->u.data;
 	  ns_cols = n_cols;
 
@@ -1359,7 +1359,7 @@
 	if (tb != pb)
 	  for (; ; first_difference--)
 	    {
-	      assert (first_difference >= 2);
+	      Assert (first_difference >= 2);
 	      if (memcmp (&cmp->values[first_difference],
 			  &(*tb)->values[first_difference],
                           sizeof *cmp->values))
@@ -1553,7 +1553,7 @@
       tp++;
       if (--*cnt == 0)
 	break;
-      assert (*cnt > 0);
+      Assert (*cnt > 0);
 
       if ((*tp)->table != fp->table)
 	break;
@@ -1587,7 +1587,7 @@
       tp++;
       if (--*cnt == 0)
 	break;
-      assert (*cnt > 0);
+      Assert (*cnt > 0);
 
       if ((*tp)->table != fp->table)
 	break;
@@ -1647,7 +1647,7 @@
       struct var_range *vr = get_var_range (v);
       int i;
       
-      assert (mode == INTEGER);
+      Assert (mode == INTEGER);
       *values = xnmalloc (vr->count, sizeof **values);
       for (i = 0; i < vr->count; i++)
 	(*values)[i].f = i + vr->min;
@@ -1799,8 +1799,7 @@
 				 * (1. - col_tot[c] / W)));
 		    break;
 		  default:
-		    assert (0);
-                    abort ();
+		    AssertNotReached ();
 		  }
 
                 format_cell_entry (table, c, i, v, suffix, mark_missing);
@@ -1855,8 +1854,7 @@
                 v = 0.;
                 break;
               default:
-                assert (0);
-                abort ();
+                AssertNotReached ();
               }
 
             format_cell_entry (table, n_cols, 0, v, suffix, mark_missing);
@@ -1911,8 +1909,7 @@
 	      case CRS_CL_ASRESIDUAL:
 		continue;
 	      default:
-		assert (0);
-                abort ();
+		AssertNotReached ();
 	      }
 
             format_cell_entry (table, c, i, v, suffix, mark_missing);
@@ -2353,7 +2350,7 @@
 		break;
 	    }
 
-	assert (j == 2);
+	Assert (j == 2);
 
 	f11 = mat[nz_cols[0]];
 	f12 = mat[nz_cols[1]];
@@ -2566,7 +2563,7 @@
 		
 		if (++j == n_cols)
 		  break;
-		assert (j < n_cols);
+		Assert (j < n_cols);
 
 		Cij -= col_tot[j] - cum[j + i * n_cols];
 		Dij += col_tot[j - 1] - cum[j - 1 + i * n_cols];
@@ -2638,7 +2635,7 @@
 		
 		if (++j == n_cols)
 		  break;
-		assert (j < n_cols);
+		Assert (j < n_cols);
 
 		Cij -= col_tot[j] - cum[j + i * n_cols];
 		Dij += col_tot[j - 1] - cum[j - 1 + i * n_cols];
@@ -2714,7 +2711,7 @@
 	    s = t;
 	    if (++i == n_rows)
 	      break;
-	    assert (i < n_rows);
+	    Assert (i < n_rows);
 	  }
       }
       
@@ -2731,7 +2728,7 @@
 	    s = t;
 	    if (++j == n_cols)
 	      break;
-	    assert (j < n_cols);
+	    Assert (j < n_cols);
 	  }
       }
       
@@ -2828,7 +2825,7 @@
 	    break;
 	}
 
-    assert (j == 2);
+    Assert (j == 2);
 
     f11 = mat[nz_cols[0]];
     f12 = mat[nz_cols[1]];
@@ -3189,7 +3186,7 @@
     {
       fmt_subst = *fp;
 
-      assert (fmt_subst.type == FMT_A || fmt_subst.type == FMT_AHEX);
+      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);
       else
Index: src/language/stats/descriptives.c
===================================================================
RCS file: /sources/pspp/pspp/src/language/stats/descriptives.c,v
retrieving revision 1.9
diff -U3 -r1.9 descriptives.c
--- src/language/stats/descriptives.c	27 Jun 2006 19:09:22 -0000	1.9
+++ src/language/stats/descriptives.c	4 Jul 2006 06:05:09 -0000
@@ -20,6 +20,7 @@
 /* FIXME: Many possible optimizations. */
 
 #include <config.h>
+#include <libpspp/Assert.h>
 
 #include <limits.h>
 #include <math.h>
@@ -585,7 +586,7 @@
 
   if (t->missing_type == DSC_LISTWISE)
     {
-      assert(t->vars);
+      Assert (t->vars);
       for (vars = t->vars; vars < t->vars + t->var_cnt; vars++)
 	{
 	  double score = case_num (c, (*vars)->fv);
@@ -622,7 +623,7 @@
   struct dsc_trns *t = trns_;
 
   free (t->z_scores);
-  assert((t->missing_type != DSC_LISTWISE) ^ (t->vars != NULL));
+  Assert ((t->missing_type != DSC_LISTWISE) ^ (t->vars != NULL));
   free (t->vars);
   return true;
 }
Index: src/language/stats/examine.q
===================================================================
RCS file: /sources/pspp/pspp/src/language/stats/examine.q,v
retrieving revision 1.8
diff -U3 -r1.8 examine.q
--- src/language/stats/examine.q	28 Jun 2006 02:21:28 -0000	1.8
+++ src/language/stats/examine.q	4 Jul 2006 06:05:09 -0000
@@ -523,7 +523,7 @@
       return 0;
     }
 
-  assert(n_dependent_vars);
+  Assert (n_dependent_vars);
 
   totals = xnmalloc (n_dependent_vars, sizeof *totals);
 
@@ -640,7 +640,7 @@
       else
 	indep_vals[1].f = SYSMIS;
 
-      assert(fctr->fstats);
+      Assert (fctr->fstats);
 
       foo = ( struct factor_statistics ** ) 
 	hsh_probe(fctr->fstats, (void *) &indep_vals);
@@ -1548,7 +1548,7 @@
     
     p = hsh_find(m->ptile_hash, &d);
     
-    assert(p);
+    Assert (p);
 
 
     tab_float (tbl, col + 2, 
@@ -1634,8 +1634,8 @@
     d = 25;
     p2 = hsh_find(m->ptile_hash, &d);
 
-    assert(p1);
-    assert(p2);
+    Assert (p1);
+    Assert (p2);
 
     tab_float (tbl, col + 2, 
 	       row + 10,
Index: src/language/stats/flip.c
===================================================================
RCS file: /sources/pspp/pspp/src/language/stats/flip.c,v
retrieving revision 1.10
diff -U3 -r1.10 flip.c
--- src/language/stats/flip.c	27 Jun 2006 19:09:22 -0000	1.10
+++ src/language/stats/flip.c	4 Jul 2006 06:05:09 -0000
@@ -17,7 +17,8 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA. */
 
-#include "config.h"
+#include <config.h>
+#include <libpspp/Assert.h>
 
 #include <ctype.h>
 #include <errno.h>
@@ -538,7 +539,7 @@
           else if (feof (flip->file))
             msg (SE, _("Unexpected end of file reading FLIP temporary file."));
           else
-            abort ();
+            AssertNotReached ();
           ok = false;
           break;
         }
Index: src/language/stats/frequencies.q
===================================================================
RCS file: /sources/pspp/pspp/src/language/stats/frequencies.q,v
retrieving revision 1.11
diff -U3 -r1.11 frequencies.q
--- src/language/stats/frequencies.q	28 Jun 2006 02:21:28 -0000	1.11
+++ src/language/stats/frequencies.q	4 Jul 2006 06:05:09 -0000
@@ -269,8 +269,8 @@
 static inline struct var_freqs *
 get_var_freqs (struct variable *v)
 {
-  assert (v != NULL);
-  assert (v->aux != NULL);
+  Assert (v != NULL);
+  Assert (v->aux != NULL);
   return v->aux;
 }
 
@@ -557,7 +557,7 @@
 	    ft->out_of_range += weight;
 	  break;
 	default:
-	  assert (0);
+	  AssertNotReached ();
 	}
     }
   return true;
@@ -645,7 +645,7 @@
 	      dump_full (v);
 	    break;
 	  default:
-	    assert (0);
+	    AssertNotReached ();
 	  }
       else
 	dumped_freq_tab = 0;
@@ -706,7 +706,7 @@
     case FRQ_AFREQ | (ALPHA << 16):     return compare_freq_alpha_a;
     case FRQ_DFREQ | (NUMERIC << 16):   return compare_freq_numeric_d;
     case FRQ_DFREQ | (ALPHA << 16):     return compare_freq_alpha_d;
-    default: assert (0);
+    default: AssertNotReached ();
     }
 
   return 0;
@@ -735,7 +735,7 @@
   size_t i;
 
   ft = &get_var_freqs (v)->tab;
-  assert (ft->mode == FRQM_GENERAL);
+  Assert (ft->mode == FRQM_GENERAL);
   compare = get_freq_comparator (cmd.sort, v->type);
 
   /* Extract data from hash table. */
@@ -783,7 +783,7 @@
 cleanup_freq_tab (struct variable *v)
 {
   struct freq_tab *ft = &get_var_freqs (v)->tab;
-  assert (ft->mode == FRQM_GENERAL);
+  Assert (ft->mode == FRQM_GENERAL);
   free (ft->valid);
   hsh_destroy (ft->data);
 }
Index: src/language/stats/means.q
===================================================================
RCS file: /sources/pspp/pspp/src/language/stats/means.q,v
retrieving revision 1.6
diff -U3 -r1.6 means.q
--- src/language/stats/means.q	28 Jun 2006 02:21:28 -0000	1.6
+++ src/language/stats/means.q	4 Jul 2006 06:05:09 -0000
@@ -141,7 +141,7 @@
     }
 
   var_set = var_set_create_from_dict (default_dict);
-  assert (var_set != NULL);
+  Assert (var_set != NULL);
 
   do
     {
Index: src/language/stats/oneway.q
===================================================================
RCS file: /sources/pspp/pspp/src/language/stats/oneway.q,v
retrieving revision 1.8
diff -U3 -r1.8 oneway.q
--- src/language/stats/oneway.q	28 Jun 2006 02:21:28 -0000	1.8
+++ src/language/stats/oneway.q	4 Jul 2006 06:05:09 -0000
@@ -241,7 +241,7 @@
       return 0;
     }
 
-  assert(n_vars);
+  Assert(n_vars);
 
   if ( ! lex_match(T_BY))
     return 2;
Index: src/language/stats/rank.q
===================================================================
RCS file: /sources/pspp/pspp/src/language/stats/rank.q,v
retrieving revision 1.9
diff -U3 -r1.9 rank.q
--- src/language/stats/rank.q	28 Jun 2006 02:21:28 -0000	1.9
+++ src/language/stats/rank.q	4 Jul 2006 06:05:09 -0000
@@ -19,6 +19,7 @@
 02110-1301, USA. */
 
 #include <config.h>
+#include <libpspp/Assert.h>
 
 #include "sort-criteria.h"
 
@@ -206,7 +207,7 @@
 	  break;
 
 	default:
-	  assert(false);
+	  AssertNotReached ();
 	  break;
 	}
   
Index: src/language/stats/regression.q
===================================================================
RCS file: /sources/pspp/pspp/src/language/stats/regression.q,v
retrieving revision 1.27
diff -U3 -r1.27 regression.q
--- src/language/stats/regression.q	28 Jun 2006 02:21:28 -0000	1.27
+++ src/language/stats/regression.q	4 Jul 2006 06:05:10 -0000
@@ -151,7 +151,7 @@
   double adjrsq;
   double std_error;
 
-  assert (c != NULL);
+  Assert (c != NULL);
   rsq = c->ssm / c->sst;
   adjrsq = 1.0 - (1.0 - rsq) * (c->n_obs - 1.0) / (c->n_obs - c->n_indeps);
   std_error = sqrt ((c->n_indeps - 1.0) / (c->n_obs - 1.0));
@@ -195,7 +195,7 @@
   const char *val_s;
   struct tab_table *t;
 
-  assert (c != NULL);
+  Assert (c != NULL);
   tmp = xnmalloc (MAX_STRING, sizeof (*tmp));
   n_rows = c->n_coeffs + 2;
 
@@ -292,7 +292,7 @@
 
   struct tab_table *t;
 
-  assert (c != NULL);
+  Assert (c != NULL);
   t = tab_create (n_cols, n_rows, 0);
   tab_headers (t, 2, 0, 1, 0);
   tab_dim (t, tab_natural_dimensions);
@@ -339,32 +339,32 @@
 static void
 reg_stats_outs (pspp_linreg_cache * c)
 {
-  assert (c != NULL);
+  Assert (c != NULL);
 }
 static void
 reg_stats_zpp (pspp_linreg_cache * c)
 {
-  assert (c != NULL);
+  Assert (c != NULL);
 }
 static void
 reg_stats_label (pspp_linreg_cache * c)
 {
-  assert (c != NULL);
+  Assert (c != NULL);
 }
 static void
 reg_stats_sha (pspp_linreg_cache * c)
 {
-  assert (c != NULL);
+  Assert (c != NULL);
 }
 static void
 reg_stats_ci (pspp_linreg_cache * c)
 {
-  assert (c != NULL);
+  Assert (c != NULL);
 }
 static void
 reg_stats_f (pspp_linreg_cache * c)
 {
-  assert (c != NULL);
+  Assert (c != NULL);
 }
 static void
 reg_stats_bcov (pspp_linreg_cache * c)
@@ -378,7 +378,7 @@
   const char *label;
   struct tab_table *t;
 
-  assert (c != NULL);
+  Assert (c != NULL);
   n_cols = c->n_indeps + 1 + 2;
   n_rows = 2 * (c->n_indeps + 1);
   t = tab_create (n_cols, n_rows, 0);
@@ -410,27 +410,27 @@
 static void
 reg_stats_ses (pspp_linreg_cache * c)
 {
-  assert (c != NULL);
+  Assert (c != NULL);
 }
 static void
 reg_stats_xtx (pspp_linreg_cache * c)
 {
-  assert (c != NULL);
+  Assert (c != NULL);
 }
 static void
 reg_stats_collin (pspp_linreg_cache * c)
 {
-  assert (c != NULL);
+  Assert (c != NULL);
 }
 static void
 reg_stats_tol (pspp_linreg_cache * c)
 {
-  assert (c != NULL);
+  Assert (c != NULL);
 }
 static void
 reg_stats_selection (pspp_linreg_cache * c)
 {
-  assert (c != NULL);
+  Assert (c != NULL);
 }
 
 static void
@@ -554,18 +554,18 @@
   const union value **vals = NULL;
   struct variable **vars = NULL;
 
-  assert (trns != NULL);
+  Assert (trns != NULL);
   model = trns->c;
-  assert (model != NULL);
-  assert (model->depvar != NULL);
-  assert (model->pred != NULL);
+  Assert (model != NULL);
+  Assert (model->depvar != NULL);
+  Assert (model->pred != NULL);
 
   vars = xnmalloc (model->n_coeffs, sizeof (*vars));
   n_vals = (*model->get_vars) (model, vars);
 
   vals = xnmalloc (n_vals, sizeof (*vals));
   output = case_data_rw (c, model->pred->fv);
-  assert (output != NULL);
+  Assert (output != NULL);
 
   for (i = 0; i < n_vals; i++)
     {
@@ -593,18 +593,18 @@
   const union value *obs = NULL;
   struct variable **vars = NULL;
 
-  assert (trns != NULL);
+  Assert (trns != NULL);
   model = trns->c;
-  assert (model != NULL);
-  assert (model->depvar != NULL);
-  assert (model->resid != NULL);
+  Assert (model != NULL);
+  Assert (model->depvar != NULL);
+  Assert (model->resid != NULL);
 
   vars = xnmalloc (model->n_coeffs, sizeof (*vars));
   n_vals = (*model->get_vars) (model, vars);
 
   vals = xnmalloc (n_vals, sizeof (*vals));
   output = case_data_rw (c, model->resid->fv);
-  assert (output != NULL);
+  Assert (output != NULL);
 
   for (i = 0; i < n_vals; i++)
     {
@@ -656,7 +656,7 @@
   t->c = c;
   reg_get_name (name, prefix);
   new_var = dict_create_var (default_dict, name, 0);
-  assert (new_var != NULL);
+  Assert (new_var != NULL);
   *v = new_var;
   add_transformation (f, regression_trns_free, t);
   trns_index++;
@@ -668,7 +668,7 @@
   int n_trns = 0;
   int i;
 
-  assert (models != NULL);
+  Assert (models != NULL);
 
   if (save)
     {
@@ -684,8 +684,8 @@
 
       for (lc = models; lc < models + cmd.n_dependent; lc++)
 	{
-	  assert (*lc != NULL);
-	  assert ((*lc)->depvar != NULL);
+	  Assert (*lc != NULL);
+	  Assert ((*lc)->depvar != NULL);
 	  if (cmd.a_save[REGRESSION_SV_RESID])
 	    {
 	      reg_save_var ("RES", regression_trns_resid_proc, *lc,
@@ -702,7 +702,7 @@
     {
       for (lc = models; lc < models + cmd.n_dependent; lc++)
 	{
-	  assert (*lc != NULL);
+	  Assert (*lc != NULL);
 	  pspp_linreg_cache_free (*lc);
 	}
     }
@@ -836,10 +836,10 @@
 
   if (export)
     {
-      assert (c != NULL);
-      assert (model_file != NULL);
+      Assert (c != NULL);
+      Assert (model_file != NULL);
       fp = fopen (fh_get_file_name (model_file), "w");
-      assert (fp != NULL);
+      Assert (fp != NULL);
       fprintf (fp, "%s", reg_preamble);
       reg_print_getvar (fp, c);
       if (reg_has_categorical (c))
@@ -1012,7 +1012,7 @@
       free (v_variables);
       return 0;
     }
-  assert (n_variables);
+  Assert (n_variables);
 
   return 1;
 }
@@ -1053,7 +1053,7 @@
   int i;
   int j;
 
-  assert (indep_vars != NULL);
+  Assert (indep_vars != NULL);
   j = 0;
   for (i = 0; i < n_variables; i++)
     {
@@ -1103,7 +1103,7 @@
 
   pspp_linreg_opts lopts;
 
-  assert (models != NULL);
+  Assert (models != NULL);
 
   output_split_file_values (first);
 
@@ -1134,7 +1134,7 @@
       n_indep = get_n_indep ((const struct variable *) cmd.v_dependent[k]);
       lopts.get_indep_mean_std = xnmalloc (n_indep, sizeof (int));
       indep_vars = xnmalloc (n_indep, sizeof *indep_vars);
-      assert (indep_vars != NULL);
+      Assert (indep_vars != NULL);
 
       for (i = 0; i < n_cases; i++)
 	{
Index: src/language/stats/sort-cases.c
===================================================================
RCS file: /sources/pspp/pspp/src/language/stats/sort-cases.c,v
retrieving revision 1.4
diff -U3 -r1.4 sort-cases.c
--- src/language/stats/sort-cases.c	5 May 2006 04:53:13 -0000	1.4
+++ src/language/stats/sort-cases.c	4 Jul 2006 06:05:10 -0000
@@ -19,7 +19,7 @@
 
 #include <config.h>
 
-#include <assert.h>
+#include <libpspp/Assert.h>
 #include <stdlib.h>
 #include <limits.h>
 
Index: src/language/stats/sort-criteria.c
===================================================================
RCS file: /sources/pspp/pspp/src/language/stats/sort-criteria.c,v
retrieving revision 1.3
diff -U3 -r1.3 sort-criteria.c
--- src/language/stats/sort-criteria.c	27 Jun 2006 19:09:22 -0000	1.3
+++ src/language/stats/sort-criteria.c	4 Jul 2006 06:05:10 -0000
@@ -19,7 +19,7 @@
 
 #include <config.h>
 #include <sys/types.h>
-#include <assert.h>
+#include <libpspp/Assert.h>
 #include <stdlib.h>
 #include <limits.h>
 #include <libpspp/alloc.h>
@@ -60,7 +60,7 @@
   struct variable **local_vars = NULL;
   size_t local_var_cnt;
 
-  assert ((vars == NULL) == (var_cnt == NULL));
+  Assert ((vars == NULL) == (var_cnt == NULL));
   if (vars == NULL) 
     {
       vars = &local_vars;
Index: src/language/stats/t-test.q
===================================================================
RCS file: /sources/pspp/pspp/src/language/stats/t-test.q,v
retrieving revision 1.8
diff -U3 -r1.8 t-test.q
--- src/language/stats/t-test.q	28 Jun 2006 02:21:28 -0000	1.8
+++ src/language/stats/t-test.q	4 Jul 2006 06:05:10 -0000
@@ -314,7 +314,7 @@
 	      hsh_insert(hash,pairs[i].v[1]);
 	    }
 
-	  assert(cmd.n_variables == 0);
+	  Assert(cmd.n_variables == 0);
 	  cmd.n_variables = hsh_count(hash);
 
 	  cmd.v_variables = xnrealloc (cmd.v_variables, cmd.n_variables,
@@ -464,7 +464,7 @@
       free (vars);
       return 0;
     }
-  assert (n_vars);
+  Assert (n_vars);
 
   n_before_WITH = 0;
   if (lex_match (T_WITH))
@@ -523,7 +523,7 @@
     {
       int i;
 
-      assert(n_pairs_local == n_vars / 2);
+      Assert(n_pairs_local == n_vars / 2);
       for (i = 0; i < n_pairs_local; ++i)
 	{
 	  pairs[i].v[n_pairs] = vars[i];
@@ -623,7 +623,7 @@
 	ssbox_paired_init(ssb,cmd);
 	break;
       default:
-	assert(0);
+	AssertNotReached ();
       }
 }
 
@@ -751,7 +751,7 @@
       indep_value[1] = gp.v.g_value[1].f;
     }
 
-  assert(ssb->t);
+  Assert(ssb->t);
 
   for (i=0; i < cmd->n_variables; ++i)
     {
@@ -803,7 +803,7 @@
 	    }
 
 	  gs = hsh_find(grp_hash, (void *) &search_val);
-	  assert(gs);
+	  Assert(gs);
 
 	  tab_float(ssb->t, 2 ,i*2+count+1, TAB_RIGHT, gs->n, 2, 0);
 	  tab_float(ssb->t, 3 ,i*2+count+1, TAB_RIGHT, gs->mean, 8, 2);
@@ -844,7 +844,7 @@
 {
   int i;
 
-  assert(ssb->t);
+  Assert(ssb->t);
 
   for (i=0; i < n_pairs; ++i)
     {
@@ -878,7 +878,7 @@
 {
   int i;
 
-  assert(ssb->t);
+  Assert(ssb->t);
 
   for (i=0; i < cmd->n_variables; ++i)
     {
@@ -937,7 +937,7 @@
 	trbox_paired_init(trb,cmd);
 	break;
       default:
-	assert(0);
+	AssertNotReached ();
       }
 }
 
@@ -963,7 +963,7 @@
   const int hsize=11;
   const int vsize=cmd->n_variables*2+3;
 
-  assert(self);
+  Assert(self);
   self->populate = trbox_independent_samples_populate;
 
   trbox_base_init(self,cmd->n_variables*2,hsize);
@@ -1002,7 +1002,7 @@
 {
   int i;
 
-  assert(self);
+  Assert(self);
   for (i=0; i < cmd->n_variables; ++i)
     {
       double p,q;
@@ -1032,7 +1032,7 @@
 	search_val = gp.v.g_value[0];
 
       gs0 = hsh_find(grp_hash, (void *) &search_val);
-      assert(gs0);
+      Assert(gs0);
 
       if ( gp.criterion == CMP_LE ) 
 	search_val.f = gp.v.critical_value + 1.0;
@@ -1040,7 +1040,7 @@
 	search_val = gp.v.g_value[1];
 
       gs1 = hsh_find(grp_hash, (void *) &search_val);
-      assert(gs1);
+      Assert(gs1);
 
 	  
       tab_text (self->t, 0, i*2+3, TAB_LEFT, cmd->v_variables[i]->name);
@@ -1281,7 +1281,7 @@
 {
   int i;
 
-  assert(trb->t);
+  Assert(trb->t);
 
   for (i=0; i < cmd->n_variables; ++i)
     {
@@ -1830,7 +1830,7 @@
 	  gs->se_mean = gs->std_dev / sqrt(gs->n);
 	  count ++;
 	}
-      assert(count == 2);
+      Assert(count == 2);
     }
 }
 
@@ -1933,7 +1933,7 @@
     {
       /* less-than-or-equal comparision is not meaningfull for
 	 alpha variables, so we shouldn't ever arrive here */
-      assert(p->indep_width == 0 ) ;
+      Assert(p->indep_width == 0 ) ;
       
       flag_a = ( a->id.f < p->v.critical_value ) ;
       flag_b = ( b->id.f < p->v.critical_value ) ;
@@ -1962,7 +1962,7 @@
   if ( p->criterion == CMP_LE ) 
     {
       /* Not meaningfull to do a less than compare for alpha values ? */
-      assert(p->indep_width == 0 ) ;
+      Assert(p->indep_width == 0 ) ;
       flag = ( g->id.f < p->v.critical_value ) ; 
     }
   else if ( p->criterion == CMP_EQ) 
@@ -1970,7 +1970,7 @@
       flag = which_group(g,p);
     }
   else
-    assert(0);
+    AssertNotReached ();
 
   return flag;
 }
Index: src/language/utilities/set.q
===================================================================
RCS file: /sources/pspp/pspp/src/language/utilities/set.q,v
retrieving revision 1.9
diff -U3 -r1.9 set.q
--- src/language/utilities/set.q	28 Jun 2006 02:21:28 -0000	1.9
+++ src/language/utilities/set.q	4 Jul 2006 06:05:10 -0000
@@ -52,6 +52,8 @@
 #include "gettext.h"
 #define _(msgid) gettext (msgid)
 
+/* (headers) */
+
 /* (specification)
    "SET" (stc_):
      blanks=custom;
Index: src/language/xforms/recode.c
===================================================================
RCS file: /sources/pspp/pspp/src/language/xforms/recode.c,v
retrieving revision 1.8
diff -U3 -r1.8 recode.c
--- src/language/xforms/recode.c	27 Jun 2006 19:09:22 -0000	1.8
+++ src/language/xforms/recode.c	4 Jul 2006 06:05:10 -0000
@@ -18,6 +18,7 @@
    02110-1301, USA. */
 
 #include <config.h>
+#include <libpspp/Assert.h>
 
 #include <ctype.h>
 #include <math.h>
@@ -526,7 +527,7 @@
       *var = dict_lookup_var (default_dict, name);
       if (*var == NULL)
         *var = dict_create_var_assert (default_dict, name, 0);
-      assert ((*var)->type == trns->dst_type);
+      Assert ((*var)->type == trns->dst_type);
     }
 }
 
@@ -560,7 +561,7 @@
           match = true;
           break;
         default:
-          abort ();
+          AssertNotReached ();
         }
 
       if (match)
@@ -609,7 +610,7 @@
             break;
           }
         default:
-          abort ();
+          AssertNotReached ();
         }
 
       if (match)
Index: src/libpspp/Assert.h
===================================================================
RCS file: src/libpspp/Assert.h
diff -N src/libpspp/Assert.h
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ src/libpspp/Assert.h	4 Jul 2006 06:05:10 -0000
@@ -0,0 +1,75 @@
+/* PSPP - computes sample statistics.
+   Copyright (C) 2006 Free Software Foundation, Inc.
+   Written by John  Darrington <john@darrington.wattle.id.au>
+
+   This program is free software; you can redistribute it and/or
+   modify it under the terms of the GNU General Public License as
+   published by the Free Software Foundation; either version 2 of the
+   License, or (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful, but
+   WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program; if not, write to the Free Software
+   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+   02110-1301, USA. */
+
+#ifndef __PSPP_ASSERT_H
+#define __PSPP_ASSERT_H
+
+
+#include <config.h>
+#include <stdbool.h>
+#include <stdio.h>
+#include "message.h"
+#include "compiler.h"
+
+#undef __STRING
+#define __STRING(x) #x
+
+static inline void pspp_not_reached (const char *file, int line) NO_RETURN ;
+
+static inline void 
+pspp_not_reached (const char *file, int line) 
+{
+  char msg[256];
+  snprintf (msg, 256, "%s:%d should not be reached", file, line);
+  request_bug_report_and_abort (msg);
+}
+
+static inline void 
+pspp_assert (const char *expr, const char *file, int line, bool expr_val)
+{
+  if ( ! expr_val ) 
+    {
+      char msg[256];
+      snprintf (msg, 256, "Assertion failed: %s:%d; (%s)", file, line, expr);
+      request_bug_report_and_abort (msg);
+    }
+}
+
+#define AssertLevel 2
+
+#define Assert(expr) ((void) (0))
+#define ExpensiveAssert(expr) ((void) (0))
+#define AssertNotReached() abort()
+
+
+#if AssertLevel > 0
+#  undef Assert
+#  define Assert(expr) pspp_assert(__STRING(expr), __FILE__, __LINE__, expr)
+#  undef AssertNotReached
+#  define AssertNotReached() pspp_not_reached(__FILE__, __LINE__)
+#endif
+
+#if AssertLevel >= 5
+#  undef ExpensiveAssert
+#  define ExpensiveAssert(expr) \
+	pspp_assert(__STRING(expr), __FILE__, __LINE__, expr)
+#endif
+
+
+#endif 
Index: src/libpspp/array.c
===================================================================
RCS file: /sources/pspp/pspp/src/libpspp/array.c,v
retrieving revision 1.3
diff -U3 -r1.3 array.c
--- src/libpspp/array.c	7 May 2006 10:11:51 -0000	1.3
+++ src/libpspp/array.c	4 Jul 2006 06:05:10 -0000
@@ -90,6 +90,8 @@
    02110-1301 USA.  */
 
 #include <config.h>
+#include <libpspp/Assert.h>
+
 #include "array.h"
 #include <gsl/gsl_rng.h>
 #include <limits.h>
@@ -97,13 +99,6 @@
 #include <string.h>
 #include "alloc.h"
 
-/* Some of the assertions in this file are very expensive.  We
-   don't use them by default. */
-#ifdef EXTRA_CHECKS
-#define expensive_assert(X) assert(X)
-#else
-#define expensive_assert(X) ((void) 0)
-#endif
 #include "message.h"
 
 /* Finds an element in ARRAY, which contains COUNT elements of
@@ -204,7 +199,7 @@
       first += size;
       if (first >= last) 
         {
-          assert (adjacent_find_equal (array, count,
+          Assert (adjacent_find_equal (array, count,
                                        size, compare, aux) == NULL);
           return count; 
         }
@@ -280,7 +275,7 @@
     }
 
  done:
-  assert (is_partitioned (array, count, size, nonzero_cnt, predicate, aux));
+  Assert (is_partitioned (array, count, size, nonzero_cnt, predicate, aux));
   return nonzero_cnt; 
 }
 
@@ -296,7 +291,7 @@
   const char *first = array;
   size_t idx;
 
-  assert (nonzero_cnt <= count);
+  Assert (nonzero_cnt <= count);
   for (idx = 0; idx < nonzero_cnt; idx++)
     if (predicate (first + idx * size, aux) == 0)
       return 0;
@@ -332,8 +327,8 @@
       input += size;
     }
 
-  assert (nonzero_cnt == count_if (array, count, size, predicate, aux));
-  assert (nonzero_cnt == count_if (result, nonzero_cnt, size, predicate, aux));
+  Assert (nonzero_cnt == count_if (array, count, size, predicate, aux));
+  Assert (nonzero_cnt == count_if (result, nonzero_cnt, size, predicate, aux));
 
   return nonzero_cnt;
 }
@@ -347,9 +342,9 @@
 {
   char *array = array_;
   
-  assert (array != NULL);
-  assert (idx <= count);
-  assert (idx + n <= count);
+  Assert (array != NULL);
+  Assert (idx <= count);
+  Assert (idx + n <= count);
 
   if (idx + n < count)
     memmove (array + idx * size, array + (idx + n) * size,
@@ -374,9 +369,9 @@
 move_element (void *array_, size_t count, size_t size,
               size_t old_idx, size_t new_idx) 
 {
-  assert (array_ != NULL || count == 0);
-  assert (old_idx < count);
-  assert (new_idx < count);
+  Assert (array_ != NULL || count == 0);
+  Assert (old_idx < count);
+  Assert (new_idx < count);
   
   if (old_idx != new_idx) 
     {
@@ -453,7 +448,7 @@
     }
 
  done:
-  assert (count_equal (array, count, size, element, compare, aux) == 0);
+  Assert (count_equal (array, count, size, element, compare, aux) == 0);
   return count;
 }
 
@@ -482,9 +477,9 @@
                void *value,
                algo_compare_func *compare, void *aux) 
 {
-  assert (array != NULL);
-  assert (count <= INT_MAX);
-  assert (compare != NULL);
+  Assert (array != NULL);
+  Assert (count <= INT_MAX);
+  Assert (compare != NULL);
 
   if (count != 0) 
     {
@@ -507,7 +502,7 @@
         }
     }
 
-  expensive_assert (find (array, count, size, value, compare, aux) == NULL);
+  ExpensiveAssert (find (array, count, size, value, compare, aux) == NULL);
   return NULL;
 }
 
@@ -753,7 +748,7 @@
       }
   }
 
-  assert (is_sorted (array, count, size, compare, aux));
+  Assert (is_sorted (array, count, size, compare, aux));
 }
 
 /* Tests whether ARRAY, which contains COUNT elements of SIZE
@@ -860,7 +855,7 @@
   char *first = array;
   size_t i;
   
-  expensive_assert (count < 1 || is_heap (array, count - 1,
+  ExpensiveAssert (count < 1 || is_heap (array, count - 1,
                                           size, compare, aux));
   for (i = count; i > 1; i /= 2) 
     {
@@ -871,7 +866,7 @@
       else
         break; 
     }
-  expensive_assert (is_heap (array, count, size, compare, aux));
+  ExpensiveAssert (is_heap (array, count, size, compare, aux));
 }
 
 /* ARRAY contains COUNT elements of SIZE bytes each.  Initially
@@ -922,10 +917,10 @@
 {
   char *first = array;
 
-  expensive_assert (is_heap (array, count, size, compare, aux));
+  ExpensiveAssert (is_heap (array, count, size, compare, aux));
   SWAP (first, first + (count - 1) * size, size);
   heapify (first, count - 1, size, 1, compare, aux);
-  expensive_assert (count < 1 || is_heap (array, count - 1,
+  ExpensiveAssert (count < 1 || is_heap (array, count - 1,
                                           size, compare, aux));
 }
 
@@ -940,7 +935,7 @@
   
   for (idx = count / 2; idx >= 1; idx--)
     heapify (array, count, size, idx, compare, aux);
-  expensive_assert (count < 1 || is_heap (array, count, size, compare, aux));
+  ExpensiveAssert (count < 1 || is_heap (array, count, size, compare, aux));
 }
 
 /* ARRAY contains COUNT elements of SIZE bytes each.  Initially
@@ -954,13 +949,13 @@
   char *first = array;
   size_t idx;
 
-  expensive_assert (is_heap (array, count, size, compare, aux));
+  ExpensiveAssert (is_heap (array, count, size, compare, aux));
   for (idx = count; idx >= 2; idx--)
     {
       SWAP (first, first + (idx - 1) * size, size);
       heapify (array, idx - 1, size, 1, compare, aux);
     }
-  expensive_assert (is_sorted (array, count, size, compare, aux));
+  ExpensiveAssert (is_sorted (array, count, size, compare, aux));
 }
 
 /* ARRAY contains COUNT elements of SIZE bytes each.  This
Index: src/libpspp/automake.mk
===================================================================
RCS file: /sources/pspp/pspp/src/libpspp/automake.mk,v
retrieving revision 1.12
diff -U3 -r1.12 automake.mk
--- src/libpspp/automake.mk	1 Jul 2006 22:34:27 -0000	1.12
+++ src/libpspp/automake.mk	4 Jul 2006 06:05:10 -0000
@@ -4,6 +4,7 @@
 noinst_LIBRARIES += src/libpspp/libpspp.a
 
 src_libpspp_libpspp_a_SOURCES = \
+	src/libpspp/Assert.h \
 	src/libpspp/array.c \
 	src/libpspp/array.h \
 	src/libpspp/alloc.c \
Index: src/libpspp/hash.c
===================================================================
RCS file: /sources/pspp/pspp/src/libpspp/hash.c,v
retrieving revision 1.5
diff -U3 -r1.5 hash.c
--- src/libpspp/hash.c	26 Jun 2006 05:37:53 -0000	1.5
+++ src/libpspp/hash.c	4 Jul 2006 06:05:10 -0000
@@ -20,7 +20,7 @@
 #include <config.h>
 #include "hash.h"
 #include "message.h"
-#include <assert.h>
+#include <libpspp/Assert.h>
 #include <ctype.h>
 #include <limits.h>
 #include <stdbool.h>
@@ -54,7 +54,7 @@
 static size_t
 next_power_of_2 (size_t x) 
 {
-  assert (x != 0);
+  Assert (x != 0);
 
   for (;;) 
     {
@@ -81,7 +81,7 @@
   const unsigned char *buf = (const unsigned char *) buf_;
   unsigned hash;
 
-  assert (buf != NULL);
+  Assert (buf != NULL);
 
   hash = FNV_32_BASIS;
   while (size-- > 0)
@@ -97,7 +97,7 @@
   const unsigned char *s = (const unsigned char *) s_;
   unsigned hash;
 
-  assert (s != NULL);
+  Assert (s != NULL);
 
   hash = FNV_32_BASIS;
   while (*s != '\0')
@@ -113,7 +113,7 @@
   const unsigned char *s = (const unsigned char *) s_;
   unsigned hash;
 
-  assert (s != NULL);
+  Assert (s != NULL);
 
   hash = FNV_32_BASIS;
   while (*s != '\0')
@@ -171,8 +171,8 @@
   struct hsh_table *h;
   int i;
 
-  assert (compare != NULL);
-  assert (hash != NULL);
+  Assert (compare != NULL);
+  Assert (hash != NULL);
   
   h = xmalloc (sizeof *h);
   h->used = 0;
@@ -198,7 +198,7 @@
 {
   int i;
 
-  assert (h != NULL);
+  Assert (h != NULL);
   if (h->free)
     for (i = 0; i < h->size; i++)
       if (h->entries[i] != NULL)
@@ -239,7 +239,7 @@
 {
   unsigned i = h->hash (target, h->aux);
 
-  assert (h->hash_ordered);
+  Assert (h->hash_ordered);
   for (;;)
     {
       void *entry;
@@ -259,7 +259,7 @@
 {
   unsigned i = h->hash (target, h->aux);
 
-  assert (h->hash_ordered);
+  Assert (h->hash_ordered);
   for (;;)
     {
       i &= h->size - 1;
@@ -278,11 +278,11 @@
   void **begin, **end, **table_p;
   int i;
 
-  assert (h != NULL);
-  assert (new_size >= h->used);
+  Assert (h != NULL);
+  Assert (new_size >= h->used);
 
   /* Verify that NEW_SIZE is a positive power of 2. */
-  assert (new_size > 0 && (new_size & (new_size - 1)) == 0);
+  Assert (new_size > 0 && (new_size & (new_size - 1)) == 0);
 
   begin = h->entries;
   end = begin + h->size;
@@ -337,9 +337,9 @@
 {
   size_t n;
 
-  assert (h != NULL);
+  Assert (h != NULL);
   n = partition (h->entries, h->size, sizeof *h->entries, not_null, NULL);
-  assert (n == h->used);
+  Assert (n == h->used);
 #ifndef NDEBUG
   h->hash_ordered = false;
 #endif
@@ -355,8 +355,8 @@
   void *const *b = b_;
   struct hsh_table *h = h_;
 
-  assert(a);
-  assert(b);
+  Assert (a);
+  Assert (b);
 
   return h->compare (*a, *b, h->aux);
 }
@@ -384,7 +384,7 @@
 void *const *
 hsh_sort (struct hsh_table *h)
 {
-  assert (h != NULL);
+  Assert (h != NULL);
 
   hsh_data (h);
   sort (h->entries, h->used, sizeof *h->entries, comparison_helper, h);
@@ -404,7 +404,7 @@
 {
   void **copy;
 
-  assert (h != NULL);
+  Assert (h != NULL);
   copy = xnmalloc ((h->used + 1), sizeof *copy);
   copy_if (h->entries, h->size, sizeof *h->entries, copy, not_null, NULL);
   copy[h->used] = NULL;
@@ -424,7 +424,7 @@
 {
   void **copy;
 
-  assert (h != NULL);
+  Assert (h != NULL);
   copy = hsh_data_copy (h);
   sort (copy, h->used, sizeof *copy, comparison_helper, h);
   return copy;
@@ -441,9 +441,9 @@
 {
   unsigned i;
   
-  assert (h != NULL);
-  assert (target != NULL);
-  assert (h->hash_ordered);
+  Assert (h != NULL);
+  Assert (target != NULL);
+  Assert (h->hash_ordered);
 
   if (h->used > h->size / 2)
     rehash (h, h->size * 2);
@@ -461,8 +461,8 @@
 {
   void **entry;
 
-  assert (h != NULL);
-  assert (target != NULL);
+  Assert (h != NULL);
+  Assert (target != NULL);
 
   entry = hsh_probe (h, target);
   if (*entry == NULL) 
@@ -542,8 +542,8 @@
 void *
 hsh_first (struct hsh_table *h, struct hsh_iterator *iter) 
 {
-  assert (h != NULL);
-  assert (iter != NULL);
+  Assert (h != NULL);
+  Assert (iter != NULL);
 
   iter->next = 0;
   return hsh_next (h, iter);
@@ -560,9 +560,9 @@
 {
   size_t i;
 
-  assert (h != NULL);
-  assert (iter != NULL);
-  assert (iter->next <= h->size);
+  Assert (h != NULL);
+  Assert (iter != NULL);
+  Assert (iter->next <= h->size);
 
   for (i = iter->next; i < h->size; i++)
     if (h->entries[i])
@@ -579,7 +579,7 @@
 size_t 
 hsh_count (struct hsh_table *h) 
 {
-  assert (h != NULL);
+  Assert (h != NULL);
   
   return h->used;
 }
@@ -611,7 +611,7 @@
 hsh_force_insert (struct hsh_table *h, void *p)
 {
   void **pp = hsh_probe (h, p);
-  assert (*pp == NULL);
+  Assert (*pp == NULL);
   *pp = p;
 }
 
@@ -622,7 +622,7 @@
 hsh_force_find (struct hsh_table *h, const void *target)
 {
   void *found = hsh_find (h, target);
-  assert (found != NULL);
+  Assert (found != NULL);
   return found;
 }
 
@@ -632,6 +632,6 @@
 hsh_force_delete (struct hsh_table *h, const void *target)
 {
   int found = hsh_delete (h, target);
-  assert (found != 0);
+  Assert (found != 0);
 }
 #endif
Index: src/libpspp/i18n.c
===================================================================
RCS file: /sources/pspp/pspp/src/libpspp/i18n.c,v
retrieving revision 1.3
diff -U3 -r1.3 i18n.c
--- src/libpspp/i18n.c	3 Jul 2006 01:38:24 -0000	1.3
+++ src/libpspp/i18n.c	4 Jul 2006 06:05:10 -0000
@@ -19,7 +19,7 @@
 
 #include <config.h>
 #include <xalloc.h>
-#include <assert.h>
+#include <libpspp/Assert.h>
 #include <stdlib.h>
 #include <stdio.h>
 #include <string.h>
@@ -82,7 +82,7 @@
   if ( length == -1 ) 
      length = strlen(text);
 
-  assert(how < n_CONV);
+  Assert (how < n_CONV);
 
   if (convertor[how] == (iconv_t) -1) 
     return xstrndup (text, length);
@@ -154,7 +154,7 @@
 const char *
 get_pspp_locale(void)
 {
-  assert ( locale);
+  Assert ( locale);
   return locale;
 }
 
@@ -185,7 +185,7 @@
 void
 i18n_init(void)
 {
-  assert ( ! locale) ;
+  Assert ( ! locale) ;
   locale = strdup(setlocale(LC_CTYPE, NULL));
 
   setlocale(LC_CTYPE, locale);
Index: src/libpspp/ll.c
===================================================================
RCS file: /sources/pspp/pspp/src/libpspp/ll.c,v
retrieving revision 1.1
diff -U3 -r1.1 ll.c
--- src/libpspp/ll.c	1 Jul 2006 22:34:27 -0000	1.1
+++ src/libpspp/ll.c	4 Jul 2006 06:05:10 -0000
@@ -32,7 +32,7 @@
 #endif
 
 #include <libpspp/ll.h>
-#include <assert.h>
+#include <libpspp/Assert.h>
 
 /* Returns the number of nodes in LIST (not counting the null
    node).  Executes in O(n) time in the length of the list. */
Index: src/libpspp/ll.h
===================================================================
RCS file: /sources/pspp/pspp/src/libpspp/ll.h,v
retrieving revision 1.1
diff -U3 -r1.1 ll.h
--- src/libpspp/ll.h	1 Jul 2006 22:34:27 -0000	1.1
+++ src/libpspp/ll.h	4 Jul 2006 06:05:10 -0000
@@ -50,7 +50,8 @@
 #ifndef LL_H
 #define LL_H
 
-#include <assert.h>
+#include <config.h>
+#include <libpspp/Assert.h>
 #include <stdbool.h>
 #include <stddef.h>
 
@@ -391,7 +392,7 @@
 ll_pop_head (struct ll_list *list)
 {
   struct ll *head;
-  assert (!ll_is_empty (list));
+  Assert (!ll_is_empty (list));
   head = ll_head (list);
   ll_remove (head);
   return head;
@@ -403,7 +404,7 @@
 ll_pop_tail (struct ll_list *list) 
 {
   struct ll *tail;
-  assert (!ll_is_empty (list));
+  Assert (!ll_is_empty (list));
   tail = ll_tail (list);
   ll_remove (tail);
   return tail;
Index: src/libpspp/llx.c
===================================================================
RCS file: /sources/pspp/pspp/src/libpspp/llx.c,v
retrieving revision 1.1
diff -U3 -r1.1 llx.c
--- src/libpspp/llx.c	1 Jul 2006 22:34:27 -0000	1.1
+++ src/libpspp/llx.c	4 Jul 2006 06:05:10 -0000
@@ -27,19 +27,14 @@
    coverage of lines and branches in this code, as reported by
    "gcov -b". */
 
-#ifdef HAVE_CONFIG_H
 #include <config.h>
-#endif
+#include <libpspp/Assert.h>
+
+#include "compiler.h"
 
 #include <libpspp/llx.h>
-#include <assert.h>
 #include <stdlib.h>
 
-#if __GNUC__ >= 2 && !defined UNUSED
-#define UNUSED __attribute__ ((unused))
-#else
-#define UNUSED
-#endif
 
 /* Destroys LIST and frees all of its nodes using MANAGER.
    If DESTRUCTOR is non-null, each node in the list will be
Index: src/libpspp/message.c
===================================================================
RCS file: /sources/pspp/pspp/src/libpspp/message.c,v
retrieving revision 1.4
diff -U3 -r1.4 message.c
--- src/libpspp/message.c	4 Jul 2006 04:39:04 -0000	1.4
+++ src/libpspp/message.c	4 Jul 2006 06:05:10 -0000
@@ -166,14 +166,6 @@
   fprintf(stderr,
     "******************************************************************\n");
 
-  abort();
-}
-
-void 
-msg_assert_fail(const char *expr, const char *file, int line)
-{
-  char msg[256];
-  snprintf(msg,256,"Assertion failed: %s:%d; (%s)",file,line,expr);
-  request_bug_report_and_abort( msg );
+  abort ();
 }
 
Index: src/libpspp/message.h
===================================================================
RCS file: /sources/pspp/pspp/src/libpspp/message.h,v
retrieving revision 1.11
diff -U3 -r1.11 message.h
--- src/libpspp/message.h	4 Jul 2006 04:39:04 -0000	1.11
+++ src/libpspp/message.h	4 Jul 2006 06:05:10 -0000
@@ -107,15 +107,6 @@
 
 
 /* Used in panic situations only. */
-void request_bug_report_and_abort (const char *msg);
-
-void msg_assert_fail (const char *expr, const char *file, int line);
-
-#undef __STRING
-#define __STRING(x) #x
-#undef assert
-			       
-#define assert(expr) ( (void) ( expr ? (void) 0 : \
-	       msg_assert_fail(__STRING(expr), __FILE__, __LINE__)) )
+void request_bug_report_and_abort (const char *msg) NO_RETURN ;
 
 #endif /* message.h */
Index: src/libpspp/pool.c
===================================================================
RCS file: /sources/pspp/pspp/src/libpspp/pool.c,v
retrieving revision 1.3
diff -U3 -r1.3 pool.c
--- src/libpspp/pool.c	8 May 2006 01:18:10 -0000	1.3
+++ src/libpspp/pool.c	4 Jul 2006 06:05:11 -0000
@@ -18,6 +18,8 @@
    02110-1301, USA. */
 
 #include <config.h>
+#include <libpspp/Assert.h>
+
 #include "pool.h"
 #include <stdlib.h>
 #include "alloc.h"
@@ -168,8 +170,8 @@
   struct pool *pool;
   char *struct_;
 
-  assert (struct_size >= sizeof pool);
-  assert (pool_member_offset <= struct_size - sizeof pool);
+  Assert (struct_size >= sizeof pool);
+  Assert (pool_member_offset <= struct_size - sizeof pool);
 
   pool = pool_create ();
   struct_ = pool_alloc (pool, struct_size);
@@ -239,7 +241,7 @@
 void *
 pool_alloc (struct pool *pool, size_t amt)
 {
-  assert (pool != NULL);
+  Assert (pool != NULL);
 
   if (amt == 0)
     return NULL;
@@ -295,7 +297,7 @@
 void *
 pool_alloc_unaligned (struct pool *pool, size_t amt)
 {
-  assert (pool != NULL);
+  Assert (pool != NULL);
 
 #ifndef DISCRETE_BLOCKS
   /* Strings need not be aligned on any boundary, but some
@@ -651,7 +653,7 @@
   struct pool *subpool;
   struct pool_gizmo *g;
 
-  assert (pool != NULL);
+  Assert (pool != NULL);
   subpool = pool_create ();
   subpool->parent = pool;
 
@@ -675,9 +677,9 @@
 {
   struct pool_gizmo *g;
 
-  assert (pool != NULL);
-  assert (subpool != NULL);
-  assert (subpool->parent == NULL);
+  Assert (pool != NULL);
+  Assert (subpool != NULL);
+  Assert (subpool->parent == NULL);
   
   g = pool_alloc (subpool, sizeof *g);
   g->type = POOL_GIZMO_SUBPOOL;
@@ -697,7 +699,7 @@
 {
   FILE *f;
 
-  assert (pool && file_name && mode);
+  Assert (pool && file_name && mode);
   f = fopen (file_name, mode);
   if (f == NULL)
     return NULL;
@@ -710,7 +712,7 @@
 int
 pool_fclose (struct pool *pool, FILE *file)
 {
-  assert (pool && file);
+  Assert (pool && file);
   pool_detach_file (pool, file);
   return fclose (file);
 }
@@ -764,7 +766,7 @@
 void
 pool_register (struct pool *pool, void (*free) (void *), void *p)
 {
-  assert (pool && free && p);
+  Assert (pool && free && p);
 
   {
     struct pool_gizmo *g = pool_alloc (pool, sizeof *g);
@@ -780,7 +782,7 @@
 int
 pool_unregister (struct pool *pool, void *p)
 {
-  assert (pool && p);
+  Assert (pool && p);
   
   {
     struct pool_gizmo *g;
@@ -803,7 +805,7 @@
 void
 pool_mark (struct pool *pool, struct pool_mark *mark)
 {
-  assert (pool && mark);
+  Assert (pool && mark);
 
   mark->block = pool->blocks;
   mark->ofs = pool->blocks->ofs;
@@ -818,7 +820,7 @@
 void
 pool_release (struct pool *pool, const struct pool_mark *mark)
 {
-  assert (pool && mark);
+  Assert (pool && mark);
   
   {
     struct pool_gizmo *cur, *next;
@@ -862,7 +864,7 @@
 static void
 add_gizmo (struct pool *pool, struct pool_gizmo *gizmo)
 {
-  assert (pool && gizmo);
+  Assert (pool && gizmo);
 
   gizmo->pool = pool;
   gizmo->next = pool->gizmos;
@@ -880,7 +882,7 @@
 static void
 delete_gizmo (struct pool *pool, struct pool_gizmo *gizmo)
 {
-  assert (pool && gizmo);
+  Assert (pool && gizmo);
 
   check_gizmo (pool, gizmo);
 
@@ -897,7 +899,7 @@
 static void
 free_gizmo (struct pool_gizmo *gizmo)
 {
-  assert (gizmo != NULL);
+  Assert (gizmo != NULL);
 
   switch (gizmo->type)
     {
@@ -915,7 +917,7 @@
       gizmo->p.registered.free (gizmo->p.registered.p);
       break;
     default:
-      assert (0);
+      AssertNotReached ();
     }
 }
 
@@ -936,9 +938,9 @@
 static void
 check_gizmo (struct pool *p, struct pool_gizmo *g) 
 {
-  assert (g->pool == p);
-  assert (g->next == NULL || g->next->prev == g);
-  assert ((g->prev != NULL && g->prev->next == g)
+  Assert (g->pool == p);
+  Assert (g->next == NULL || g->next->prev == g);
+  Assert ((g->prev != NULL && g->prev->next == g)
           || (g->prev == NULL && p->gizmos == g));
 
 }
Index: src/libpspp/str.c
===================================================================
RCS file: /sources/pspp/pspp/src/libpspp/str.c,v
retrieving revision 1.13
diff -U3 -r1.13 str.c
--- src/libpspp/str.c	9 Jun 2006 22:51:24 -0000	1.13
+++ src/libpspp/str.c	4 Jul 2006 06:05:11 -0000
@@ -18,6 +18,7 @@
    02110-1301, USA. */
 
 #include <config.h>
+#include <libpspp/Assert.h>
 
 #include "str.h"
 
@@ -197,7 +198,7 @@
 str_copy_trunc (char *dst, size_t dst_size, const char *src) 
 {
   size_t src_len = strlen (src);
-  assert (dst_size > 0);
+  Assert (dst_size > 0);
   if (src_len + 1 < dst_size)
     memcpy (dst, src, src_len + 1);
   else 
@@ -215,7 +216,7 @@
                     const char *src, size_t src_size) 
 {
   size_t dst_len;
-  assert (dst_size > 0);
+  Assert (dst_size > 0);
 
   dst_len = src_size < dst_size ? src_size : dst_size - 1;
   memcpy (dst, src, dst_len);
@@ -607,7 +608,7 @@
 ss_pointer_to_position (struct substring ss, const char *p)
 {
   size_t pos = p - ss.string;
-  assert (pos <= ss.length);
+  Assert (pos <= ss.length);
   return pos;
 }
 
Index: src/libpspp/str.h
===================================================================
RCS file: /sources/pspp/pspp/src/libpspp/str.h,v
retrieving revision 1.10
diff -U3 -r1.10 str.h
--- src/libpspp/str.h	9 Jun 2006 22:51:24 -0000	1.10
+++ src/libpspp/str.h	4 Jul 2006 06:05:11 -0000
@@ -20,7 +20,9 @@
 #if !str_h
 #define str_h 1
 
-#include <assert.h>
+#include <config.h>
+#include <libpspp/Assert.h>
+
 #include <stdarg.h>
 #include <stdbool.h>
 #include <stdio.h>
Index: src/math/coefficient.c
===================================================================
RCS file: /sources/pspp/pspp/src/math/coefficient.c,v
retrieving revision 1.2
diff -U3 -r1.2 coefficient.c
--- src/math/coefficient.c	19 May 2006 21:08:20 -0000	1.2
+++ src/math/coefficient.c	4 Jul 2006 06:05:11 -0000
@@ -21,6 +21,9 @@
 /*
   Accessor functions for matching coefficients and variables.
  */
+#include <config.h>
+#include <libpspp/Assert.h>
+
 #include <math/coefficient.h>
 #include <math/linreg/linreg.h>
 #include "src/math/design-matrix.h"
@@ -74,7 +77,7 @@
 				   interaction terms are written. 
 				 */
       coeff->v_info = xnmalloc (coeff->n_vars, sizeof (*coeff->v_info));
-      assert (coeff->v_info != NULL);
+      Assert (coeff->v_info != NULL);
       coeff->v_info->v =
 	(const struct variable *) design_matrix_col_to_var (X, i);
 
@@ -82,7 +85,7 @@
 	{
 	  size_t k;
 	  k = design_matrix_var_to_column (X, coeff->v_info->v);
-	  assert (k <= i);
+	  Assert (k <= i);
 	  k = i - k;
 	  coeff->v_info->val =
 	    cat_subscript_to_value (k, (struct variable *) coeff->v_info->v);
@@ -151,7 +154,7 @@
     {
       return NULL;
     }
-  assert (i < c->n_vars);
+  Assert (i < c->n_vars);
   return (c->v_info + i)->v;
 }
 
Index: src/math/coefficient.h
===================================================================
RCS file: /sources/pspp/pspp/src/math/coefficient.h,v
retrieving revision 1.4
diff -U3 -r1.4 coefficient.h
--- src/math/coefficient.h	5 Jun 2006 00:21:05 -0000	1.4
+++ src/math/coefficient.h	4 Jul 2006 06:05:11 -0000
@@ -22,7 +22,7 @@
 #ifndef COEFFICIENT_H
 #define COEFFICIENT_H
 
-#include <assert.h>
+#include <config.h>
 #include <math/linreg/linreg.h>
 #include <src/data/variable.h>
 #include <src/data/value.h>
Index: src/math/design-matrix.c
===================================================================
RCS file: /sources/pspp/pspp/src/math/design-matrix.c,v
retrieving revision 1.2
diff -U3 -r1.2 design-matrix.c
--- src/math/design-matrix.c	15 Mar 2006 03:29:11 -0000	1.2
+++ src/math/design-matrix.c	4 Jul 2006 06:05:11 -0000
@@ -21,6 +21,8 @@
   Create design matrices for procedures that need them.
 */
 #include <config.h>
+#include <libpspp/Assert.h>
+
 #include <stdlib.h>
 #include <libpspp/alloc.h>
 #include <libpspp/message.h>
@@ -106,7 +108,7 @@
   for (i = 0; i < n_variables; i++)
     {
       v = v_variables[i];
-      assert ((dm->vars + i) != NULL);
+      Assert ((dm->vars + i) != NULL);
       (dm->vars + i)->v = v;	/* Allows us to look up the variable from
 				   the design matrix. */
       (dm->vars + i)->first_column = n_cols;
@@ -117,7 +119,7 @@
 	}
       else if (v->type == ALPHA)
 	{
-	  assert (v->obs_vals != NULL);
+	  Assert (v->obs_vals != NULL);
 	  (dm->vars + i)->last_column =
 	    (dm->vars + i)->first_column + v->obs_vals->n_categories - 2;
 	  n_cols += v->obs_vals->n_categories - 1;
@@ -245,11 +247,11 @@
   size_t lc;
   double entry;
 
-  assert (var->type == ALPHA);
+  Assert (var->type == ALPHA);
   fc = design_matrix_var_to_column (dm, var);
   lc = dm_var_to_last_column (dm, var);
-  assert (lc != DM_COLUMN_NOT_FOUND);
-  assert (fc != DM_COLUMN_NOT_FOUND);
+  Assert (lc != DM_COLUMN_NOT_FOUND);
+  Assert (fc != DM_COLUMN_NOT_FOUND);
   is_one = fc + cat_value_find (var, val);
   for (col = fc; col <= lc; col++)
     {
@@ -263,8 +265,8 @@
 {
   size_t col;
 
-  assert (var->type == NUMERIC);
+  Assert (var->type == NUMERIC);
   col = design_matrix_var_to_column ((const struct design_matrix *) dm, var);
-  assert (col != DM_COLUMN_NOT_FOUND);
+  Assert (col != DM_COLUMN_NOT_FOUND);
   gsl_matrix_set (dm->m, row, col, val->f);
 }
Index: src/math/factor-stats.c
===================================================================
RCS file: /sources/pspp/pspp/src/math/factor-stats.c,v
retrieving revision 1.3
diff -U3 -r1.3 factor-stats.c
--- src/math/factor-stats.c	16 Apr 2006 01:05:15 -0000	1.3
+++ src/math/factor-stats.c	4 Jul 2006 06:05:11 -0000
@@ -30,14 +30,14 @@
 #include <stdlib.h>
 #include <math.h>
 #include <float.h>
-#include <assert.h>
+#include <libpspp/Assert.h>
 #include "histogram.h"
 
 
 void
 metrics_precalc(struct metrics *m)
 {
-  assert (m) ;
+  Assert (m) ;
 
   m->n_missing = 0;
 
@@ -90,7 +90,7 @@
 
       struct case_node *cn;
 
-      assert( (*wv)->v.f == val->f );
+      Assert ( (*wv)->v.f == val->f );
       (*wv)->w += weight;      
 
       cn = xmalloc ( sizeof *cn);
@@ -300,8 +300,8 @@
 
   int cmp0;
 
-  assert(f0);
-  assert(f1);
+  Assert (f0);
+  Assert (f1);
 
   cmp0 = compare_values(&f0->id[0], &f1->id[0], width);
 
Index: src/math/histogram.c
===================================================================
RCS file: /sources/pspp/pspp/src/math/histogram.c,v
retrieving revision 1.1
diff -U3 -r1.1 histogram.c
--- src/math/histogram.c	4 Mar 2006 01:11:57 -0000	1.1
+++ src/math/histogram.c	4 Jul 2006 06:05:11 -0000
@@ -20,7 +20,7 @@
 #include <config.h>
 #include <math.h>
 #include <gsl/gsl_histogram.h>
-#include <assert.h>
+#include <libpspp/Assert.h>
 #include "histogram.h"
 #include "chart-geometry.h"
 
Index: src/math/moments.c
===================================================================
RCS file: /sources/pspp/pspp/src/math/moments.c,v
retrieving revision 1.2
diff -U3 -r1.2 moments.c
--- src/math/moments.c	15 Mar 2006 03:29:11 -0000	1.2
+++ src/math/moments.c	4 Jul 2006 06:05:11 -0000
@@ -19,7 +19,7 @@
 
 #include <config.h>
 #include "moments.h"
-#include <assert.h>
+#include <libpspp/Assert.h>
 #include <math.h>
 #include <stdlib.h>
 #include <libpspp/alloc.h>
@@ -40,7 +40,7 @@
               double w, double d1, double d2, double d3, double d4,
               double *variance, double *skewness, double *kurtosis) 
 {
-  assert (w > 0.);
+  Assert (w > 0.);
 
   if (max_moment >= MOMENT_VARIANCE && w > 1.) 
     {
@@ -101,8 +101,8 @@
 static void
 init_moments (struct moments *m, enum moment max_moment)
 {
-  assert (m != NULL);
-  assert (max_moment == MOMENT_MEAN || max_moment == MOMENT_VARIANCE
+  Assert (m != NULL);
+  Assert (max_moment == MOMENT_MEAN || max_moment == MOMENT_VARIANCE
           || max_moment == MOMENT_SKEWNESS || max_moment == MOMENT_KURTOSIS);
   m->max_moment = max_moment;
   moments_clear (m);
@@ -141,8 +141,8 @@
 void
 moments_pass_one (struct moments *m, double value, double weight) 
 {
-  assert (m != NULL);
-  assert (m->pass == 1);
+  Assert (m != NULL);
+  Assert (m->pass == 1);
 
   if (value != SYSMIS && weight > 0.) 
     {
@@ -158,7 +158,7 @@
 {
   double d, d_power;
 
-  assert (m != NULL);
+  Assert (m != NULL);
 
   if (m->pass == 1) 
     {
@@ -209,7 +209,7 @@
                    double *mean, double *variance,
                    double *skewness, double *kurtosis) 
 {
-  assert (m != NULL);
+  Assert (m != NULL);
 
   if (mean != NULL)
     *mean = SYSMIS;
@@ -236,8 +236,8 @@
          don't support "online" computation during the second
          pass, so As a simple self-check, the total weight for
          the passes must agree. */
-      assert (m->pass == 2);
-      assert (m->w1 == m->w2);
+      Assert (m->pass == 2);
+      Assert (m->w1 == m->w2);
 
       if (m->w2 > 0.) 
         {
@@ -341,8 +341,8 @@
 static void
 init_moments1 (struct moments1 *m, enum moment max_moment)
 {
-  assert (m != NULL);
-  assert (max_moment == MOMENT_MEAN || max_moment == MOMENT_VARIANCE
+  Assert (m != NULL);
+  Assert (max_moment == MOMENT_MEAN || max_moment == MOMENT_VARIANCE
           || max_moment == MOMENT_SKEWNESS || max_moment == MOMENT_KURTOSIS);
   m->max_moment = max_moment;
   moments1_clear (m);
@@ -380,7 +380,7 @@
 void
 moments1_add (struct moments1 *m, double value, double weight) 
 {
-  assert (m != NULL);
+  Assert (m != NULL);
 
   if (value != SYSMIS && weight > 0.) 
     {
@@ -436,7 +436,7 @@
                     double *mean, double *variance,
                     double *skewness, double *kurtosis) 
 {
-  assert (m != NULL);
+  Assert (m != NULL);
 
   if (mean != NULL)
     *mean = SYSMIS;
Index: src/math/percentiles.c
===================================================================
RCS file: /sources/pspp/pspp/src/math/percentiles.c,v
retrieving revision 1.3
diff -U3 -r1.3 percentiles.c
--- src/math/percentiles.c	15 Mar 2006 03:29:11 -0000	1.3
+++ src/math/percentiles.c	4 Jul 2006 06:05:11 -0000
@@ -28,7 +28,7 @@
 #define _(msgid) gettext (msgid)
 #define N_(msgid) msgid
 
-#include <assert.h>
+#include <libpspp/Assert.h>
 
 
 struct ptile_params
@@ -126,7 +126,7 @@
    */
   if ( par->g2_star == 0 ) 
     {
-      assert(par->g2 == 0 );
+      Assert (par->g2 == 0 );
       return wv[par->k2]->v.f;
     }
 
@@ -219,7 +219,7 @@
 
   struct ptile_params pp;
 
-  assert( p <= 1.0);
+  Assert ( p <= 1.0);
 
   tc1 = w * p ;
   tc2 = (w + 1) * p ;
@@ -369,7 +369,7 @@
 
       if ( h[i] + 1 >= n_data )
       {
-	      assert( a_star < 1 ) ;
+	      Assert ( a_star < 1 ) ;
 	      hinge[i] = (1 - a_star) * wv[h[i]]->v.f;
 	      continue;
       }
@@ -396,8 +396,8 @@
       
     }
 
-  assert(hinge[0] <= hinge[1]);
-  assert(hinge[1] <= hinge[2]);
+  Assert (hinge[0] <= hinge[1]);
+  Assert (hinge[1] <= hinge[2]);
 
 }
 
Index: src/math/sort.c
===================================================================
RCS file: /sources/pspp/pspp/src/math/sort.c,v
retrieving revision 1.10
diff -U3 -r1.10 sort.c
--- src/math/sort.c	10 May 2006 04:11:07 -0000	1.10
+++ src/math/sort.c	4 Jul 2006 06:05:11 -0000
@@ -18,6 +18,7 @@
    02110-1301, USA. */
 
 #include <config.h>
+#include <libpspp/Assert.h>
 
 #include "sort.h"
 
@@ -173,7 +174,7 @@
             {
               bool ok = casereader_read_xfer (reader, &cases[i].c);
               if (!ok)
-                abort ();
+                AssertNotReached ();
               cases[i].idx = i;
             }
 
@@ -183,7 +184,7 @@
           for (i = 0; i < case_cnt; i++)
             casefile_append_xfer (dst, &cases[i].c);
           if (casefile_error (dst))
-            abort ();
+            AssertNotReached ();
 
           free (cases);
         }
@@ -368,7 +369,7 @@
   struct record_run *rr;
 
   /* Compose record_run for this run and add to heap. */
-  assert (irs->record_cnt < irs->record_cap - 1);
+  Assert (irs->record_cnt < irs->record_cap - 1);
   rr = irs->records + irs->record_cnt++;
   case_copy (&rr->record, 0, c, 0, irs->xsrt->value_cnt);
   rr->run = irs->run;
@@ -452,8 +453,8 @@
 {
   int i;
 
-  assert (a != NULL);
-  assert (b != NULL);
+  Assert (a != NULL);
+  Assert (b != NULL);
   
   for (i = 0; i < criteria->crit_cnt; i++)
     {
@@ -543,7 +544,7 @@
   struct ccase case_tmp;
   
   /* Extract minimum case from heap. */
-  assert (irs->record_cnt > 0);
+  Assert (irs->record_cnt > 0);
   pop_heap (irs->records, irs->record_cnt--, sizeof *irs->records,
             compare_record_run_minheap, irs);
   record_run = irs->records + irs->record_cnt;
@@ -553,14 +554,14 @@
     return;
 
   /* Start new run if necessary. */
-  assert (record_run->run == irs->run
+  Assert (record_run->run == irs->run
           || record_run->run == irs->run + 1);
   if (record_run->run != irs->run)
     {
       end_run (irs);
       start_run (irs);
     }
-  assert (record_run->run == irs->run);
+  Assert (record_run->run == irs->run);
   irs->case_cnt++;
 
   /* Write to disk. */
@@ -597,7 +598,7 @@
       if (xsrt->runs[idx] == NULL)
         return NULL;
     }
-  assert (xsrt->run_cnt == 1);
+  Assert (xsrt->run_cnt == 1);
   xsrt->run_cnt = 0;
   return xsrt->runs[0];
 }
Index: src/math/linreg/linreg.c
===================================================================
RCS file: /sources/pspp/pspp/src/math/linreg/linreg.c,v
retrieving revision 1.15
diff -U3 -r1.15 linreg.c
--- src/math/linreg/linreg.c	19 May 2006 21:08:20 -0000	1.15
+++ src/math/linreg/linreg.c	4 Jul 2006 06:05:11 -0000
@@ -18,6 +18,9 @@
   Franklin Street, Fifth Floor, Boston, MA 02111-1307, USA.
  */
 
+#include <config.h>
+#include <libpspp/Assert.h>
+
 #include <gsl/gsl_fit.h>
 #include <gsl/gsl_multifit.h>
 
@@ -119,7 +122,7 @@
   for (coef = c->coeff[2]; coef < c->coeff[c->n_coeffs]; coef++)
     {
       tmp = pspp_coeff_get_var (coef, 0);
-      assert (tmp != NULL);
+      Assert (tmp != NULL);
       /* Repeated variables are likely to bunch together, at the end
          of the array. */
       i = result - 1;
Index: src/math/ts/innovations.c
===================================================================
RCS file: /sources/pspp/pspp/src/math/ts/innovations.c,v
retrieving revision 1.10
diff -U3 -r1.10 innovations.c
--- src/math/ts/innovations.c	3 Jul 2006 19:41:20 -0000	1.10
+++ src/math/ts/innovations.c	4 Jul 2006 06:05:11 -0000
@@ -28,12 +28,12 @@
   0-387-97429-6. Sections 5.2, 8.3 and 8.4.
  */
 
+#include <libpspp/Assert.h>
 #include <gsl/gsl_matrix.h>
 #include <gsl/gsl_vector.h>
 #include <gsl/gsl_math.h>
 #include <stdlib.h>
 #include <libpspp/alloc.h>
-#include <libpspp/compiler.h>
 #include <math/coefficient.h>
 #include <math/ts/innovations.h>
 
@@ -85,8 +85,8 @@
   double y;
   int rc = 1;
 
-  assert (data != NULL);
-  assert (est != NULL);
+  Assert (data != NULL);
+  Assert (est != NULL);
   
   for (i = 0; i < data->size1; i++)
     {
@@ -274,7 +274,7 @@
 {
   size_t i;
 
-  assert (est != NULL);
+  Assert (est != NULL);
   free (est->cov);
   free (est->scale);
   for (i = 0; i < (size_t) est->max_lag; i++)
@@ -287,7 +287,7 @@
 {
   size_t i;
 
-  assert (est != NULL);
+  Assert (est != NULL);
   for (i = 0; i < n; i++)
     {
       pspp_innovations_free_one (est[i]);
Index: src/output/afm.c
===================================================================
RCS file: /sources/pspp/pspp/src/output/afm.c,v
retrieving revision 1.3
diff -U3 -r1.3 afm.c
--- src/output/afm.c	9 Jun 2006 22:51:24 -0000	1.3
+++ src/output/afm.c	4 Jul 2006 06:05:11 -0000
@@ -18,6 +18,8 @@
    02110-1301, USA. */
 
 #include <config.h>
+#include <libpspp/Assert.h>
+
 #include "afm.h"
 #include "c-ctype.h"
 #include "c-strtod.h"
@@ -913,7 +915,7 @@
 static int
 value_to_ascii85 (int value) 
 {
-  assert (value >= 0 && value < 85);
+  Assert (value >= 0 && value < 85);
 #if C_CTYPE_ASCII
   return value + 33;
 #else
@@ -1146,7 +1148,7 @@
           break;
       
         default:
-          abort ();
+          AssertNotReached ();
         }
       binary_finish (&e);
     }
Index: src/output/ascii.c
===================================================================
RCS file: /sources/pspp/pspp/src/output/ascii.c,v
retrieving revision 1.9
diff -U3 -r1.9 ascii.c
--- src/output/ascii.c	9 Jun 2006 22:51:24 -0000	1.9
+++ src/output/ascii.c	4 Jul 2006 06:05:11 -0000
@@ -18,6 +18,7 @@
    02110-1301, USA. */
 
 #include <config.h>
+#include <libpspp/Assert.h>
 
 #include <ctype.h>
 #include <errno.h>
@@ -323,7 +324,7 @@
 	    this->width = arg;
 	    break;
 	  default:
-	    abort ();
+	    AssertNotReached ();
 	  }
       }
       break;
@@ -365,7 +366,7 @@
 	    x->tab_width = arg;
 	    break;
 	  default:
-	    abort ();
+	    AssertNotReached ();
 	  }
       }
       break;
@@ -395,12 +396,12 @@
             x->squeeze_blank_lines = setting;
             break;
 	  default:
-	    abort ();
+	    AssertNotReached ();
 	  }
       }
       break;
     default:
-      abort ();
+      AssertNotReached ();
     }
 
   return true;
@@ -464,7 +465,7 @@
   int y;
   unsigned short value;
 
-  assert (this->page_open);
+  Assert (this->page_open);
 #if DEBUGGING
   if (x0 < 0 || x1 > this->width || y0 < 0 || y1 > this->length)
     {
@@ -511,7 +512,7 @@
       x += width - length;
       break;
     default:
-      abort ();
+      AssertNotReached ();
     }
 
   if (y >= this->length || x >= this->width)
@@ -604,7 +605,7 @@
 static void
 ascii_text_draw (struct outp_driver *this, const struct outp_text *t)
 {
-  assert (this->page_open);
+  Assert (this->page_open);
   delineate (this, t, true, NULL, NULL);
 }
 
Index: src/output/chart.c
===================================================================
RCS file: /sources/pspp/pspp/src/output/chart.c,v
retrieving revision 1.2
diff -U3 -r1.2 chart.c
--- src/output/chart.c	15 Mar 2006 03:29:11 -0000	1.2
+++ src/output/chart.c	4 Jul 2006 06:05:11 -0000
@@ -24,7 +24,7 @@
 #include <stdarg.h>
 #include <string.h>
 #include <float.h>
-#include <assert.h>
+#include <libpspp/Assert.h>
 #include <math.h>
 
 #include "chart.h"
Index: src/output/chart.h
===================================================================
RCS file: /sources/pspp/pspp/src/output/chart.h,v
retrieving revision 1.3
diff -U3 -r1.3 chart.h
--- src/output/chart.h	17 Apr 2006 01:54:15 -0000	1.3
+++ src/output/chart.h	4 Jul 2006 06:05:11 -0000
@@ -18,12 +18,12 @@
    02110-1301, USA. */
 
 #include <config.h>
+#include <libpspp/Assert.h>
 #include <stdio.h>
 #include <stdarg.h>
 #include <string.h>
 #include <stdio.h>
 #include <float.h>
-#include <assert.h>
 #include <math.h>
 
 #include <math/chart-geometry.h>
Index: src/output/html.c
===================================================================
RCS file: /sources/pspp/pspp/src/output/html.c,v
retrieving revision 1.12
diff -U3 -r1.12 html.c
--- src/output/html.c	3 Jul 2006 17:39:07 -0000	1.12
+++ src/output/html.c	4 Jul 2006 06:05:11 -0000
@@ -18,6 +18,8 @@
    02110-1301, USA. */
 
 #include <config.h>
+#include <libpspp/Assert.h>
+
 #include "chart.h"
 #include "htmlP.h"
 #include <errno.h>
@@ -183,11 +185,11 @@
           error (0, 0, _("`chart-files' value must contain `#'"));
           break;
         default:
-          abort ();
+          AssertNotReached ();
         }
       break;
     default:
-      abort ();
+      AssertNotReached ();
     }
   
   return true;
@@ -201,7 +203,7 @@
   extern struct som_table_class tab_table_class;
   struct html_driver_ext *x = this->ext;
   
-  assert (s->class == &tab_table_class ) ;
+  Assert (s->class == &tab_table_class ) ;
 
   switch (s->type) 
     {
@@ -212,7 +214,7 @@
       link_image (x->file, ((struct chart *)s->ext)->file_name);
       break;
     default:
-      abort ();
+      AssertNotReached ();
     }
 }
 
Index: src/output/manager.c
===================================================================
RCS file: /sources/pspp/pspp/src/output/manager.c,v
retrieving revision 1.8
diff -U3 -r1.8 manager.c
--- src/output/manager.c	14 May 2006 20:11:50 -0000	1.8
+++ src/output/manager.c	4 Jul 2006 06:05:11 -0000
@@ -18,6 +18,9 @@
    02110-1301, USA. */
 
 #include <config.h>
+#include <libpspp/Assert.h>
+
+
 #include "manager.h"
 #include <stdio.h>
 #include <stdlib.h>
@@ -94,7 +97,7 @@
 #if DEBUGGING
   static int entry;
   
-  assert (entry++ == 0);
+  Assert (entry++ == 0);
 #endif
 
   if ( t->type == SOM_TABLE) 
@@ -110,7 +113,7 @@
 	{
 	  printf ("headers: (l,r)=(%d,%d), (t,b)=(%d,%d) in table size (%d,%d)\n",
 		  hl, hr, ht, hb, nc, nr);
-	  abort ();
+	  AssertNotReached ();
 	}
       else if (hl + hr == nc)
 	printf ("warning: headers (l,r)=(%d,%d) in table width %d\n", hl, hr, nc);
@@ -134,7 +137,7 @@
   }
   
 #if DEBUGGING
-  assert (--entry == 0);
+  Assert (--entry == 0);
 #endif
 }
 
@@ -193,8 +196,8 @@
   int max_len = 0;
   int index = 0;
   
-  assert (cs == SOM_COL_DOWN);
-  assert (d->cp_x == 0);
+  Assert (cs == SOM_COL_DOWN);
+  Assert (d->cp_x == 0);
 
   for (y0 = ht; y0 < nr - hb; y0 = y1)
     {
@@ -204,7 +207,7 @@
 
       if (y0 == y1)
 	{
-	  assert (d->cp_y);
+	  Assert (d->cp_y);
 	  outp_eject_page (d);
 	}
       else
@@ -236,8 +239,8 @@
 static void
 render_simple (void)
 {
-  assert (d->cp_x == 0);
-  assert (tw < d->width && th + d->cp_y < d->length);
+  Assert (d->cp_x == 0);
+  Assert (tw < d->width && th + d->cp_y < d->length);
 
   t->class->title (0, 0);
   t->class->render (hl, ht, nc - hr, nr - hb);
@@ -253,7 +256,7 @@
   int x_index;
   int x0, x1;
   
-  assert (d->cp_x == 0);
+  Assert (d->cp_x == 0);
 
   for (x_index = 0, x0 = hl; x0 < nc - hr; x0 = x1, x_index++)
     {
@@ -277,7 +280,7 @@
 
 	  if (y0 == y1)
 	    {
-	      assert (d->cp_y);
+	      Assert (d->cp_y);
 	      outp_eject_page (d);
 	    }
           else
Index: src/output/output.c
===================================================================
RCS file: /sources/pspp/pspp/src/output/output.c,v
retrieving revision 1.14
diff -U3 -r1.14 output.c
--- src/output/output.c	9 Jun 2006 22:51:24 -0000	1.14
+++ src/output/output.c	4 Jul 2006 06:05:11 -0000
@@ -18,6 +18,8 @@
    02110-1301, USA. */
 
 #include <config.h>
+#include <libpspp/Assert.h>
+
 #include "output.h"
 #include <stdlib.h>
 #include <stdio.h>
@@ -779,7 +781,7 @@
       for (c = outp_class_list; c; c = c->next)
 	if (c->class == d->class)
 	  break;
-      assert (c != NULL);
+      Assert (c != NULL);
     }
   free (d->name);
 
Index: src/output/postscript.c
===================================================================
RCS file: /sources/pspp/pspp/src/output/postscript.c,v
retrieving revision 1.18
diff -U3 -r1.18 postscript.c
--- src/output/postscript.c	9 Jun 2006 22:51:24 -0000	1.18
+++ src/output/postscript.c	4 Jul 2006 06:05:12 -0000
@@ -18,6 +18,7 @@
    02110-1301, USA. */
 
 #include <config.h>
+#include <libpspp/Assert.h>
 
 #include <ctype.h>
 #include <errno.h>
@@ -374,7 +375,7 @@
 	    this->font_height = arg;
 	    break;
 	  default:
-	    abort ();
+	    AssertNotReached ();
 	  }
       }
       break;
@@ -400,7 +401,7 @@
 	    x->line_width = dimension;
 	    break;
 	  default:
-	    abort ();
+	    AssertNotReached ();
 	  }
       }
       break;
@@ -417,7 +418,7 @@
       }
       break;
     default:
-      abort ();
+      AssertNotReached ();
     }
 
   return true;
@@ -608,7 +609,7 @@
     case SOM_CHART:
       break;
     default:
-      abort ();
+      AssertNotReached ();
       break;
     }
 }
@@ -1083,7 +1084,7 @@
 static void
 ps_text_draw (struct outp_driver *this, const struct outp_text *t)
 {
-  assert (this->page_open);
+  Assert (this->page_open);
   text (this, t, true, NULL, NULL);
 }
 
Index: src/output/table.c
===================================================================
RCS file: /sources/pspp/pspp/src/output/table.c,v
retrieving revision 1.9
diff -U3 -r1.9 table.c
--- src/output/table.c	2 Jul 2006 05:44:25 -0000	1.9
+++ src/output/table.c	4 Jul 2006 06:05:12 -0000
@@ -18,6 +18,8 @@
    02110-1301, USA. */
 
 #include <config.h>
+#include <libpspp/Assert.h>
+
 #include "table.h"
 #include <ctype.h>
 #include <stdarg.h>
@@ -85,7 +87,7 @@
 void
 tab_destroy (struct tab_table *t)
 {
-  assert (t != NULL);
+  Assert (t != NULL);
   pool_destroy (t->container);
 }
 
@@ -95,15 +97,15 @@
 void
 tab_resize (struct tab_table *t, int nc, int nr)
 {
-  assert (t != NULL);
+  Assert (t != NULL);
   if (nc != -1)
     {
-      assert (nc + t->col_ofs <= t->cf);
+      Assert (nc + t->col_ofs <= t->cf);
       t->nc = nc + t->col_ofs;
     }
   if (nr != -1)
     {
-      assert (nr + t->row_ofs <= t->nr);
+      Assert (nr + t->row_ofs <= t->nr);
       t->nr = nr + t->row_ofs;
     }
 }
@@ -119,7 +121,7 @@
 {
   int ro, co;
   
-  assert (t != NULL);
+  Assert (t != NULL);
   ro = t->row_ofs;
   co = t->col_ofs;
   if (ro || co)
@@ -130,7 +132,7 @@
   if (nr == -1)
     nr = t->nr;
   
-  assert (nc == t->nc);
+  Assert (nc == t->nc);
   
   if (nc > t->cf)
     {
@@ -187,11 +189,11 @@
 void
 tab_headers (struct tab_table *table, int l, int r, int t, int b)
 {
-  assert (table != NULL);
-  assert (l < table->nc);
-  assert (r < table->nc);
-  assert (t < table->nr);
-  assert (b < table->nr);
+  Assert (table != NULL);
+  Assert (l < table->nc);
+  Assert (r < table->nc);
+  Assert (t < table->nr);
+  Assert (b < table->nr);
 
 
   table->l = l;
@@ -208,7 +210,7 @@
 void
 tab_columns (struct tab_table *t, int style, int group)
 {
-  assert (t != NULL);
+  Assert (t != NULL);
   t->col_style = style;
   t->col_group = group;
 }
@@ -220,7 +222,7 @@
 void
 tab_vline (struct tab_table *t, int style, int x, int y1, int y2)
 {
-  assert (t != NULL);
+  Assert (t != NULL);
 
 #if DEBUGGING
   if (x + t->col_ofs < 0 || x + t->col_ofs > t->nc
@@ -241,11 +243,11 @@
   y1 += t->row_ofs;
   y2 += t->row_ofs;
 
-  assert (x  > 0);
-  assert (x  < t->nc);
-  assert (y1 >= 0);
-  assert (y2 >= y1);
-  assert (y2 <=  t->nr);
+  Assert (x  > 0);
+  Assert (x  < t->nc);
+  Assert (y1 >= 0);
+  Assert (y2 >= y1);
+  Assert (y2 <=  t->nr);
 
   if (style != -1)
     {
@@ -260,17 +262,17 @@
 void
 tab_hline (struct tab_table * t, int style, int x1, int x2, int y)
 {
-  assert (t != NULL);
+  Assert (t != NULL);
 
   x1 += t->col_ofs;
   x2 += t->col_ofs;
   y += t->row_ofs;
 
-  assert (y >= 0);
-  assert (y < t->nr);
-  assert (x2 >= x1 );
-  assert (x1 >= 0 );
-  assert (x2 < t->nc);
+  Assert (y >= 0);
+  Assert (y < t->nr);
+  Assert (x2 >= x1 );
+  Assert (x1 >= 0 );
+  Assert (x2 < t->nc);
 
   if (style != -1)
     {
@@ -290,7 +292,7 @@
 tab_box (struct tab_table *t, int f_h, int f_v, int i_h, int i_v,
 	 int x1, int y1, int x2, int y2)
 {
-  assert (t != NULL);
+  Assert (t != NULL);
 
 #if DEBUGGING
   if (x1 + t->col_ofs < 0 || x1 + t->col_ofs >= t->nc 
@@ -305,7 +307,7 @@
 	      x2, t->col_ofs, x2 + t->col_ofs,
 	      y2, t->row_ofs, y2 + t->row_ofs,
 	      t->nc, t->nr);
-      abort ();
+      AssertNotReached ();
     }
 #endif
 
@@ -314,12 +316,12 @@
   y1 += t->row_ofs;
   y2 += t->row_ofs;
 
-  assert (x2 >= x1);
-  assert (y2 >= y1);
-  assert (x1 >= 0);
-  assert (y1 >= 0);
-  assert (x2 < t->nc);
-  assert (y2 < t->nr);
+  Assert (x2 >= x1);
+  Assert (y2 >= y1);
+  Assert (x1 >= 0);
+  Assert (y1 >= 0);
+  Assert (x2 < t->nc);
+  Assert (y2 < t->nr);
 
   if (f_h != -1)
     {
@@ -371,7 +373,7 @@
 static struct substring
 text_format (struct tab_table *table, int opt, const char *text, va_list args)
 {
-  assert (table != NULL && text != NULL);
+  Assert (table != NULL && text != NULL);
 
   return ss_cstr (opt & TAT_PRINTF
                   ? pool_vasprintf (table->container, text, args)
@@ -385,7 +387,7 @@
 {
   va_list args;
 
-  assert (t != NULL && title != NULL);
+  Assert (t != NULL && title != NULL);
   va_start (args, title);
   t->title = xvasprintf (title, args);
   va_end (args);
@@ -395,7 +397,7 @@
 void
 tab_dim (struct tab_table *t, tab_dim_func *dim_func)
 {
-  assert (t != NULL && t->dim == NULL);
+  Assert (t != NULL && t->dim == NULL);
   t->dim = dim_func;
 }
 
@@ -408,7 +410,7 @@
 {
   int width;
 
-  assert (t != NULL && c >= 0 && c < t->nc);
+  Assert (t != NULL && c >= 0 && c < t->nc);
   {
     int r;
 
@@ -458,7 +460,7 @@
 {
   int height;
 
-  assert (t != NULL && r >= 0 && r < t->nr);
+  Assert (t != NULL && r >= 0 && r < t->nr);
   
   {
     int c;
@@ -469,7 +471,7 @@
 	unsigned char opt = t->ct[c + r * t->cf];
         int h;
 
-	assert (t->w[c] != NOT_INT);
+	Assert (t->w[c] != NOT_INT);
 	if (opt & (TAB_JOIN | TAB_EMPTY))
 	  continue;
 
@@ -495,7 +497,7 @@
 {
   int i;
 
-  assert (t != NULL);
+  Assert (t != NULL);
   
   for (i = 0; i < t->nc; i++)
     t->w[i] = tab_natural_width (t, d, i);
@@ -515,7 +517,7 @@
 {
   char *contents;
 
-  assert (table != NULL && v != NULL && f != NULL);
+  Assert (table != NULL && v != NULL && f != NULL);
 #if DEBUGGING
   if (c + table->col_ofs < 0 || r + table->row_ofs < 0
       || c + table->col_ofs >= table->nc
@@ -549,12 +551,12 @@
   struct fmt_spec f;
   union value double_value;
 
-  assert (table != NULL && w <= 40);
+  Assert (table != NULL && w <= 40);
   
-  assert (c >= 0);
-  assert (c < table->nc);
-  assert (r >= 0);
-  assert (r < table->nr);
+  Assert (c >= 0);
+  Assert (c < table->nc);
+  Assert (r >= 0);
+  Assert (r < table->nr);
 
   f = make_output_format (FMT_F, w, d);
   
@@ -593,12 +595,12 @@
 {
   va_list args;
 
-  assert (table != NULL && text != NULL);
+  Assert (table != NULL && text != NULL);
 
-  assert (c >= 0 );
-  assert (r >= 0 );
-  assert (c < table->nc);
-  assert (r < table->nr);
+  Assert (c >= 0 );
+  Assert (r >= 0 );
+  Assert (c < table->nc);
+  Assert (r < table->nr);
   
 
 #if DEBUGGING
@@ -629,14 +631,14 @@
 {
   struct tab_joined_cell *j;
 
-  assert (table != NULL && text != NULL);
+  Assert (table != NULL && text != NULL);
 
-  assert (x1 + table->col_ofs >= 0);
-  assert (y1 + table->row_ofs >= 0);
-  assert (y2 >= y1);
-  assert (x2 >= x1);
-  assert (y2 + table->row_ofs < table->nr);
-  assert (x2 + table->col_ofs < table->nc);
+  Assert (x1 + table->col_ofs >= 0);
+  Assert (y1 + table->row_ofs >= 0);
+  Assert (y2 >= y1);
+  Assert (x2 >= x1);
+  Assert (y2 + table->row_ofs < table->nr);
+  Assert (x2 + table->col_ofs < table->nc);
 
 #if DEBUGGING
   if (x1 + table->col_ofs < 0 || x1 + table->col_ofs >= table->nc
@@ -702,7 +704,7 @@
 tab_raw (struct tab_table *table, int c, int r, unsigned opt,
 	 struct substring *string)
 {
-  assert (table != NULL && string != NULL);
+  Assert (table != NULL && string != NULL);
   
 #if DEBUGGING
   if (c + table->col_ofs < 0 || r + table->row_ofs < 0
@@ -772,7 +774,7 @@
 void
 tab_flags (struct tab_table *t, unsigned flags)
 {
-  assert (t != NULL);
+  Assert (t != NULL);
   t->flags = flags;
 }
 
@@ -782,7 +784,7 @@
 {
   struct som_entity s;
 
-  assert (t != NULL);
+  Assert (t != NULL);
   s.class = &tab_table_class;
   s.ext = t;
   s.type = SOM_TABLE;
@@ -799,17 +801,17 @@
 {
   int diff = 0;
 
-  assert (t != NULL);
+  Assert (t != NULL);
 #if DEBUGGING
   if (row < -1 || row >= t->nr)
     {
       printf ("tab_offset(): row=%d in %d-row table\n", row, t->nr);
-      abort ();
+      AssertNotReached ();
     }
   if (col < -1 || col >= t->nc)
     {
       printf ("tab_offset(): col=%d in %d-column table\n", col, t->nc);
-      abort ();
+      AssertNotReached ();
     }
 #endif
 
@@ -827,7 +829,7 @@
 void
 tab_next_row (struct tab_table *t)
 {
-  assert (t != NULL);
+  Assert (t != NULL);
   t->cc += t->cf;
   t->ct += t->cf;
   if (++t->row_ofs >= t->nr)
@@ -842,13 +844,13 @@
 static void
 tabi_table (struct som_entity *table)
 {
-  assert (table != NULL);
-  assert (table->type == SOM_TABLE);
+  Assert (table != NULL);
+  Assert (table->type == SOM_TABLE);
 
   t = table->ext;
   tab_offset (t, 0, 0);
   
-  assert (t->w == NULL && t->h == NULL);
+  Assert (t->w == NULL && t->h == NULL);
   t->w = pool_nalloc (t->container, t->nc, sizeof *t->w);
   t->h = pool_nalloc (t->container, t->nr, sizeof *t->h);
   t->hrh = pool_nmalloc (t->container, t->nr + 1, sizeof *t->hrh);
@@ -870,7 +872,7 @@
     case TAL_2:
       return OUTP_L_DOUBLE;
     default:
-      abort ();
+      AssertNotReached ();
     }
 }
 
@@ -881,7 +883,7 @@
   int c, r;
   int i;
   
-  assert (driver != NULL);
+  Assert (driver != NULL);
   d = driver;
   
   /* Figure out sizes of rules. */
@@ -921,7 +923,7 @@
     t->w[i] = -1;
 #endif
 
-  assert (t->dim != NULL);
+  Assert (t->dim != NULL);
   t->dim (t, d);
 
 #if DEBUGGING
@@ -935,7 +937,7 @@
 	    printf ("Table row %d height not initialized.\n", i);
 	    error = 1;
 	  }
-	assert (t->h[i] > 0);
+	Assert (t->h[i] > 0);
       }
     
     for (i = 0; i < t->nc; i++)
@@ -945,7 +947,7 @@
 	    printf ("Table column %d width not initialized.\n", i);
 	    error = 1;
 	  }
-	assert (t->w[i] > 0);
+	Assert (t->w[i] > 0);
       }
   }
 #endif
@@ -970,7 +972,7 @@
 static void
 tabi_count (int *n_columns, int *n_rows)
 {
-  assert (n_columns != NULL && n_rows != NULL);
+  Assert (n_columns != NULL && n_rows != NULL);
   *n_columns = t->nc;
   *n_rows = t->nr;
 }
@@ -983,7 +985,7 @@
 static void
 tabi_area (int *horiz, int *vert)
 {
-  assert (horiz != NULL && vert != NULL);
+  Assert (horiz != NULL && vert != NULL);
   
   {
     int w, c;
@@ -1007,7 +1009,7 @@
 static void
 tabi_columns (int *style)
 {
-  assert (style != NULL);
+  Assert (style != NULL);
   *style = t->col_style;
 }
 
@@ -1016,7 +1018,7 @@
 static void
 tabi_headers (int *hl, int *hr, int *ht, int *hb)
 {
-  assert (hl != NULL && hr != NULL && ht != NULL && hb != NULL);
+  Assert (hl != NULL && hr != NULL && ht != NULL && hb != NULL);
   *hl = t->l;
   *hr = t->r;
   *ht = t->t;
@@ -1038,10 +1040,10 @@
   int *r;
   int total;
   
-  assert (end != NULL && (cumtype == SOM_ROWS || cumtype == SOM_COLUMNS));
+  Assert (end != NULL && (cumtype == SOM_ROWS || cumtype == SOM_COLUMNS));
   if (cumtype == SOM_ROWS)
     {
-      assert (start >= 0 && start < t->nr);
+      Assert (start >= 0 && start < t->nr);
       n = t->nr - t->b;
       d = &t->h[start];
       r = &t->hrh[start + 1];
@@ -1049,7 +1051,7 @@
     }
   else
     {
-      assert (start >= 0 && start < t->nc);
+      Assert (start >= 0 && start < t->nc);
       n = t->nc - t->r;
       d = &t->w[start];
       r = &t->wrv[start + 1];
@@ -1093,7 +1095,7 @@
 static void
 tabi_flags (unsigned *flags)
 {
-  assert (flags != NULL);
+  Assert (flags != NULL);
   *flags = t->flags;
 }
 
@@ -1256,7 +1258,7 @@
     case TAB_CENTER:
       return OUTP_CENTER;
     default:
-      abort ();
+      AssertNotReached ();
     }
 }
 
@@ -1275,7 +1277,7 @@
     case TAL_2:
       return OUTP_L_DOUBLE;
     default:
-      abort ();
+      AssertNotReached ();
     }
 }
 
Index: src/output/charts/box-whisker.c
===================================================================
RCS file: /sources/pspp/pspp/src/output/charts/box-whisker.c,v
retrieving revision 1.2
diff -U3 -r1.2 box-whisker.c
--- src/output/charts/box-whisker.c	15 Mar 2006 03:29:11 -0000	1.2
+++ src/output/charts/box-whisker.c	4 Jul 2006 06:05:12 -0000
@@ -19,7 +19,7 @@
 
 
 #include <math.h>
-#include <assert.h>
+#include <libpspp/Assert.h>
 #include <libpspp/misc.h>
 
 #include <output/charts/box-whisker.h>
@@ -105,7 +105,7 @@
   const double box_top = 
     ch->data_bottom + ( hinge[2] - ch->y_min ) * ch->ordinate_scale;
 
-  assert(m);
+  Assert (m);
 
   /* Can't really draw a boxplot if there's no data */
   if ( n_data == 0 ) 
Index: src/output/charts/cartesian.c
===================================================================
RCS file: /sources/pspp/pspp/src/output/charts/cartesian.c,v
retrieving revision 1.4
diff -U3 -r1.4 cartesian.c
--- src/output/charts/cartesian.c	4 Apr 2006 12:43:22 -0000	1.4
+++ src/output/charts/cartesian.c	4 Jul 2006 06:05:12 -0000
@@ -19,7 +19,7 @@
 
 
 #include <math.h>
-#include <assert.h>
+#include <libpspp/Assert.h>
 
 #include <output/chart.h>
 
Index: src/output/charts/piechart.c
===================================================================
RCS file: /sources/pspp/pspp/src/output/charts/piechart.c,v
retrieving revision 1.2
diff -U3 -r1.2 piechart.c
--- src/output/charts/piechart.c	15 Mar 2006 03:29:11 -0000	1.2
+++ src/output/charts/piechart.c	4 Jul 2006 06:05:12 -0000
@@ -22,7 +22,7 @@
 #include <config.h>
 
 #include <float.h>
-#include <assert.h>
+#include <libpspp/Assert.h>
 #include <math.h>
 #include <stdio.h>
 
@@ -154,8 +154,8 @@
   const double stop_y   = 
     y0 + radius * cos(start_angle + segment_angle);
 
-  assert(segment_angle <= 2 * M_PI);
-  assert(segment_angle >= 0);
+  Assert (segment_angle <= 2 * M_PI);
+  Assert (segment_angle >= 0);
 
   if ( segment_angle > M_PI ) 
     {
Index: src/output/charts/plot-chart.c
===================================================================
RCS file: /sources/pspp/pspp/src/output/charts/plot-chart.c,v
retrieving revision 1.3
diff -U3 -r1.3 plot-chart.c
--- src/output/charts/plot-chart.c	4 Apr 2006 12:43:22 -0000	1.3
+++ src/output/charts/plot-chart.c	4 Jul 2006 06:05:12 -0000
@@ -25,7 +25,7 @@
 #include <string.h>
 #include <stdio.h>
 #include <float.h>
-#include <assert.h>
+#include <libpspp/Assert.h>
 #include <math.h>
 
 #include <output/charts/plot-chart.h>
@@ -65,7 +65,7 @@
 {
   const int tickSize = 10;
 
-  assert(chart);
+  Assert (chart);
 
   pl_savestate_r(chart->lp);
 
@@ -76,7 +76,7 @@
   else if (orientation == TICK_ORDINATE ) 
       pl_flinerel_r(chart->lp, 0, position, -tickSize, position);
   else
-    assert(0);
+    AssertNotReached ();
 
   if ( label ) {
     char buf[10];
@@ -133,7 +133,7 @@
   const double tick_interval = 
     chart_rounded_tick( (max - min) / (double) ticks);
 
-  assert ( ch );
+  Assert ( ch );
 
 
   ch->x_max = ceil( max / tick_interval ) * tick_interval ; 
Index: src/output/charts/plot-chart.h
===================================================================
RCS file: /sources/pspp/pspp/src/output/charts/plot-chart.h,v
retrieving revision 1.3
diff -U3 -r1.3 plot-chart.h
--- src/output/charts/plot-chart.h	4 Apr 2006 12:43:22 -0000	1.3
+++ src/output/charts/plot-chart.h	4 Jul 2006 06:05:12 -0000
@@ -18,12 +18,13 @@
    02110-1301, USA. */
 
 #include <config.h>
+#include <libpspp/Assert.h>
+
 #include <stdio.h>
 #include <stdarg.h>
 #include <string.h>
 #include <stdio.h>
 #include <float.h>
-#include <assert.h>
 #include <math.h>
 
 
Index: src/output/charts/plot-hist.c
===================================================================
RCS file: /sources/pspp/pspp/src/output/charts/plot-hist.c,v
retrieving revision 1.2
diff -U3 -r1.2 plot-hist.c
--- src/output/charts/plot-hist.c	15 Mar 2006 03:29:11 -0000	1.2
+++ src/output/charts/plot-hist.c	4 Jul 2006 06:05:12 -0000
@@ -25,7 +25,7 @@
 #include <math.h>
 #include <gsl/gsl_histogram.h>
 #include <gsl/gsl_randist.h>
-#include <assert.h>
+#include <libpspp/Assert.h>
 
 #include <output/charts/plot-hist.h>
 #include <output/charts/plot-chart.h>
@@ -82,9 +82,9 @@
     const double width = (ch->data_right - ch->data_left) / (double) bins ;
 
 
-    assert ( 0 == gsl_histogram_get_range(hist, bar, &lower, &upper));
+    Assert ( 0 == gsl_histogram_get_range(hist, bar, &lower, &upper));
 
-    assert( upper >= lower);
+    Assert ( upper >= lower);
 
     height = gsl_histogram_get(hist, bar) * 
       (ch->data_top - ch->data_bottom) / gsl_histogram_max_val(hist);
@@ -159,7 +159,7 @@
     gsl_histogram_get_range(hist, 0, &x_min, &not_used);
     range = not_used - x_min;
     gsl_histogram_get_range(hist, bins - 1, &not_used, &x_max);
-    assert(range == x_max - not_used);
+    Assert (range == x_max - not_used);
 
     abscissa_scale = (ch->data_right - ch->data_left) / (x_max - x_min);
     ordinate_scale = (ch->data_top - ch->data_bottom) / 
Index: src/ui/gui/psppire.c
===================================================================
RCS file: /sources/pspp/pspp/src/ui/gui/psppire.c,v
retrieving revision 1.15
diff -U3 -r1.15 psppire.c
--- src/ui/gui/psppire.c	4 Jul 2006 01:24:59 -0000	1.15
+++ src/ui/gui/psppire.c	4 Jul 2006 06:05:12 -0000
@@ -18,7 +18,7 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA. */
 
-#include <assert.h>
+#include <libpspp/Assert.h>
 #include <libintl.h>
 
 #include <libpspp/version.h>
Index: src/ui/terminal/command-line.c
===================================================================
RCS file: /sources/pspp/pspp/src/ui/terminal/command-line.c,v
retrieving revision 1.5
diff -U3 -r1.5 command-line.c
--- src/ui/terminal/command-line.c	25 Apr 2006 18:03:03 -0000	1.5
+++ src/ui/terminal/command-line.c	4 Jul 2006 06:05:12 -0000
@@ -18,6 +18,7 @@
    02110-1301, USA. */
 
 #include <config.h>
+#include <libpspp/Assert.h>
 #include "command-line.h"
 #include <libpspp/message.h>
 #include <ctype.h>
@@ -180,7 +181,7 @@
 	case 0:
 	  break;
 	default:
-	  assert (0);
+	  AssertNotReached ();
 	}
     }
 
Index: src/ui/terminal/read-line.c
===================================================================
RCS file: /sources/pspp/pspp/src/ui/terminal/read-line.c,v
retrieving revision 1.8
diff -U3 -r1.8 read-line.c
--- src/ui/terminal/read-line.c	28 Jun 2006 05:49:03 -0000	1.8
+++ src/ui/terminal/read-line.c	4 Jul 2006 06:05:12 -0000
@@ -23,7 +23,7 @@
 
 #include <stdlib.h>
 #include <stdbool.h>
-#include <assert.h>
+#include <libpspp/Assert.h>
 #include <errno.h>
 
 #include "msg-ui.h"
@@ -123,7 +123,7 @@
   char *string;
 #endif
   
-  assert (initialised);
+  Assert (initialised);
 
   reset_msg_count ();
 
Index: tests/automake.mk
===================================================================
RCS file: /sources/pspp/pspp/tests/automake.mk,v
retrieving revision 1.7
diff -U3 -r1.7 automake.mk
--- tests/automake.mk	1 Jul 2006 22:34:27 -0000	1.7
+++ tests/automake.mk	4 Jul 2006 06:05:12 -0000
@@ -110,6 +110,15 @@
 
 noinst_PROGRAMS += tests/libpspp/ll-test tests/libpspp/llx-test
 
+
+tests_libpspp_ll_test_LDADD = \
+	$(top_builddir)/src/libpspp/libpspp.a \
+	$(top_builddir)/gl/libgl.a	
+
+tests_libpspp_llx_test_LDADD = \
+	$(top_builddir)/src/libpspp/libpspp.a \
+	$(top_builddir)/gl/libgl.a	
+
 tests_libpspp_ll_test_SOURCES = \
 	src/libpspp/ll.c \
 	src/libpspp/ll.h \
@@ -122,6 +131,8 @@
 	src/libpspp/llx.h \
 	tests/libpspp/llx-test.c
 
+
+
 EXTRA_DIST += $(TESTS) tests/weighting.data tests/data-list.data tests/list.data \
 	tests/no_case_size.sav \
 	tests/coverage.sh tests/test_template \
Index: tests/libpspp/ll-test.c
===================================================================
RCS file: /sources/pspp/pspp/tests/libpspp/ll-test.c,v
retrieving revision 1.1
diff -U3 -r1.1 ll-test.c
--- tests/libpspp/ll-test.c	1 Jul 2006 22:34:27 -0000	1.1
+++ tests/libpspp/ll-test.c	4 Jul 2006 06:05:12 -0000
@@ -30,17 +30,12 @@
    routines. */
 
 #include <libpspp/ll.h>
-#include <assert.h>
+#include <libpspp/Assert.h>
+#include <libpspp/compiler.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
 
-/* Support preliminaries. */
-#if __GNUC__ >= 2 && !defined UNUSED
-#define UNUSED __attribute__ ((unused))
-#else
-#define UNUSED
-#endif
 
 /* Exit with a failure code.
    (Place a breakpoint on this function while debugging.) */
Index: tests/libpspp/llx-test.c
===================================================================
RCS file: /sources/pspp/pspp/tests/libpspp/llx-test.c,v
retrieving revision 1.1
diff -U3 -r1.1 llx-test.c
--- tests/libpspp/llx-test.c	1 Jul 2006 22:34:27 -0000	1.1
+++ tests/libpspp/llx-test.c	4 Jul 2006 06:05:13 -0000
@@ -29,17 +29,12 @@
    See ll-test.c for a similar program for the ll_* routines. */
 
 #include <libpspp/llx.h>
-#include <assert.h>
+#include <libpspp/Assert.h>
+#include <libpspp/compiler.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
 
-/* Support preliminaries. */
-#if __GNUC__ >= 2 && !defined UNUSED
-#define UNUSED __attribute__ ((unused))
-#else
-#define UNUSED
-#endif
 
 /* Exit with a failure code.
    (Place a breakpoint on this function while debugging.) */
