+Sat Mar  4 12:27:06 2006  Ben Pfaff  <blp@gnu.org>
+
+       * Smake: Require "intprops" gnulib module.
+
+       * acinclude.m4: Remove BLP_INT_DIGITS.  Now we use the intprops.h
+       header file instead.
+
+       * configure.ac: Don't call BLP_INT_DIGITS.
+
 Sat Mar  4 11:53:36 2006  Ben Pfaff  <blp@gnu.org>
 
        * acinclude.m4: Remove BLP_RANDOM.  Its results were unused.
 
 GNULIB_TOOL = $(GNULIB)/gnulib-tool
 
 GNULIB_MODULES = alloca alloca-opt assert full-read full-write         \
-gethostname getline getlogin_r getopt gettext memcasecmp memchr memcmp \
-memmem memmove memset progname readlink restrict snprintf stat-macros  \
-stdbool stpcpy strcase strcspn strerror strftime strstr strtod         \
-strtok_r strtol strtoul vsnprintf xalloc xalloc-die xreadlink          \
-xvasprintf
+gethostname getline getlogin_r getopt gettext intprops memcasecmp      \
+memchr memcmp memmem memmove memset progname readlink restrict         \
+snprintf stat-macros stdbool stpcpy strcase strcspn strerror strftime  \
+strstr strtod strtok_r strtol strtoul vsnprintf xalloc xalloc-die      \
+xreadlink xvasprintf
 
 all: po/POTFILES.in
        test -d m4 || mkdir m4
 
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
 
-dnl Check longest integer in digits.
-
-AC_DEFUN([BLP_INT_DIGITS],
-[
-AC_MSG_CHECKING(number of digits in LONG_MIN (incl. sign))
-AC_CACHE_VAL(blp_int_digits,
-            [AC_TRY_RUN([#include <stdio.h>
-                          #include <limits.h>
-                         int
-                         main()
-                         {
-                           int len;
-                           char s[80];
-                           sprintf(s, "%ld", LONG_MAX);
-                           len = strlen(s);
-                           sprintf(s, "%ld", LONG_MIN);
-                           if(strlen(s)>len) len=strlen(s);
-                           sprintf(s, "%lu", ULONG_MAX);
-                           if(strlen(s)>len) len=strlen(s);
-                           exit(len);
-                         }
-                        ],
-                        eval "blp_int_digits=19",
-                        eval "blp_int_digits=$?"
-                        if test "$blp_int_digits" -lt 11; then
-                          blp_int_digits=11
-                        fi,
-                        eval "blp_int_digits=19")
-            ])
-AC_DEFINE_UNQUOTED([INT_DIGITS], $blp_int_digits,
-       [Number of digits in longest `long' value, including sign.
-         This is usually 11, for 32-bit `long's, or 19, for 64-bit
-         `long's.])
-AC_MSG_RESULT($blp_int_digits) ])dnl
-
 dnl Check for readline and history libraries.
 
 dnl Modified for PSPP by Ben Pfaff, based on readline.m4 serial 3 from
 
 
 AC_C_BIGENDIAN
 
-BLP_INT_DIGITS
-
 AC_FUNC_VPRINTF
 AC_CHECK_FUNCS([strchr strrchr __setfpucw isinf isnan finite getpid feholdexcept])
 
 
+Sat Mar  4 12:28:09 2006  Ben Pfaff  <blp@gnu.org>
+
+       * In many source files, replace INT_DIGITS by
+       INT_STRLEN_BOUND(int) and include intprops.h.
+
 John Darrington:
        
        * Replaced '_' with '-' in most filenames.
 
 #include <ctype.h>
 #include <errno.h>
 #include "alloc.h"
+#include "intprops.h"
 #include "message.h"
 #include "str.h"
 #include "settings.h"
   p = strstr (f->filename, "%d");
   if (p)
     {
-      char *s = local_alloc (strlen (f->filename) + INT_DIGITS - 1);
+      char *s = local_alloc (strlen (f->filename)
+                             + INT_STRLEN_BOUND (int) - 1);
       char *cp;
 
       memcpy (s, f->filename, p - f->filename);
 
 #include "alloc.h"
 #include "command.h"
 #include "dictionary.h"
+#include "intprops.h"
 #include "message.h"
 #include "line-buffer.h"
 #include "lexer.h"
 static inline void
 store_numeric (char **repl, long value)
 {
-  *repl = xmalloc (INT_DIGITS + 1);
+  *repl = xmalloc (INT_STRLEN_BOUND (value) + 1);
   sprintf (*repl, "%ld", value);
 }
 
 
 #include "case.h"
 #include "command.h"
 #include "dictionary.h"
+#include "intprops.h"
 #include "lexer.h"
 #include "message.h"
 #include "magic.h"
   int line_number = 0;
 
   const char *Line = _("Line");
-  char *leader = local_alloc (strlen (Line) + INT_DIGITS + 1 + 1);
+  char *leader = local_alloc (strlen (Line)
+                              + INT_STRLEN_BOUND (line_number) + 1 + 1);
       
   while (index < cmd.n_variables)
     {
 
 #include "command.h"
 #include "dictionary.h"
 #include "message.h"
+#include "intprops.h"
 #include "lexer.h"
 #include "misc.h"
 #include "pool.h"
             strcpy (v->name, "VPOSINF");
           else 
             {
-              char name[INT_DIGITS + 2];
+              char name[INT_STRLEN_BOUND (int) + 2];
               sprintf (name, "V%d", (int) f);
               str_copy_trunc (v->name, sizeof v->name, name);
             }
 
 #include "filename.h"
 #include "getline.h"
 #include "hash.h"
+#include "intprops.h"
 #include "pool.h"
 #include "str.h"
 #include "version.h"
 int
 font_number_to_index (int x)
 {
-  char name[INT_DIGITS + 2];
+  char name[INT_STRLEN_BOUND (x) + 2];
 
   /* Note that space is the only character that can't appear in a
      character name.  That makes it an excellent choice for a name
 
 #include "message.h"
 #include "filename.h"
 #include "htmlP.h"
+#include "intprops.h"
 #include "misc.h"
 #include "settings.h"
 #include "str.h"
 static const char *
 find_defn_value (const char *key)
 {
-  static char buf[INT_DIGITS + 1];
+  static char buf[INT_STRLEN_BOUND (int) + 1];
   struct outp_defn *d;
 
   for (d = outp_macros; d; d = d->next)
 
 #include "font.h"
 #include "getline.h"
 #include "hash.h"
+#include "intprops.h"
 #include "misc.h"
 #include "output.h"
 #include "manager.h"
     {"title", 0},
     {0, 0},
   };
-  char boundbox[INT_DIGITS * 4 + 4];
+  char boundbox[INT_STRLEN_BOUND (int) * 4 + 4];
 #if HAVE_UNISTD_H
   char host[128];
 #endif
-  char scaling[INT_DIGITS + 5];
+  char scaling[INT_STRLEN_BOUND (int) + 5];
   time_t curtime;
   struct tm *loctime;
   char *p, *cp;
-  char paper_width[INT_DIGITS + 1];
-  char paper_length[INT_DIGITS + 1];
-  char left_margin[INT_DIGITS + 1];
-  char top_margin[INT_DIGITS + 1];
-  char line_width[INT_DIGITS + 1];
-  char line_width_thick[INT_DIGITS + 1];
+  char paper_width[INT_STRLEN_BOUND (int) + 1];
+  char paper_length[INT_STRLEN_BOUND (int) + 1];
+  char left_margin[INT_STRLEN_BOUND (int) + 1];
+  char top_margin[INT_STRLEN_BOUND (int) + 1];
+  char line_width[INT_STRLEN_BOUND (int) + 1];
+  char line_width_thick[INT_STRLEN_BOUND (int) + 1];
 
   struct outp_driver *this = f->param;
   struct ps_driver_ext *x = this->ext;
 
   int last_y;
 
-  char number[INT_DIGITS + 1];
+  char number[INT_STRLEN_BOUND (int) + 1];
   char line[80];
   char *lp;