+2002-02-09 Bruno Haible <bruno@clisp.org>
+
+ * c-ctype.h (c_is*): Change return type to bool.
+ * c-ctype.c (c_is*): Likewise.
+
+ * tmpdir.h (path_search): Change last argument's type to bool.
+ * tmpdir.c (path_search): Likewise.
+ (direxists): Change return type to bool.
+
+ * vasprintf.c (int_vasprintf): Change total_width to size_t.
+
2002-02-11 Bruno Haible <bruno@clisp.org>
* config.charset: Add support for NetBSD.
/* Character handling in C locale.
- Copyright 2000, 2001 Free Software Foundation, Inc.
+ Copyright 2000-2002 Free Software Foundation, Inc.
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 function isascii is not locale dependent. Its use in EBCDIC is
questionable. */
-int
+bool
c_isascii (c)
int c;
{
return ((c & ~0x7f) == 0);
}
-int
+bool
c_isalnum (c)
int c;
{
#endif
}
-int
+bool
c_isalpha (c)
int c;
{
#endif
}
-int
+bool
c_isblank (c)
int c;
{
return (c == ' ' || c == '\t');
}
-int
+bool
c_iscntrl (c)
int c;
{
#endif
}
-int
+bool
c_isdigit (c)
int c;
{
#endif
}
-int
+bool
c_islower (c)
int c;
{
#endif
}
-int
+bool
c_isgraph (c)
int c;
{
#endif
}
-int
+bool
c_isprint (c)
int c;
{
#endif
}
-int
+bool
c_ispunct (c)
int c;
{
#endif
}
-int
+bool
c_isspace (c)
int c;
{
|| c == '\n' || c == '\v' || c == '\f' || c == '\r');
}
-int
+bool
c_isupper (c)
int c;
{
#endif
}
-int
+bool
c_isxdigit (c)
int c;
{
<ctype.h> functions' behaviour depends on the current locale set via
setlocale.
- Copyright (C) 2000, 2001 Free Software Foundation, Inc.
+ Copyright (C) 2000-2002 Free Software Foundation, Inc.
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
# endif
#endif
+#include <stdbool.h>
+
/* Check whether the ASCII optimizations apply. */
/* Function declarations. */
-extern int c_isascii PARAMS ((int c)); /* not locale dependent */
-
-extern int c_isalnum PARAMS ((int c));
-extern int c_isalpha PARAMS ((int c));
-extern int c_isblank PARAMS ((int c));
-extern int c_iscntrl PARAMS ((int c));
-extern int c_isdigit PARAMS ((int c));
-extern int c_islower PARAMS ((int c));
-extern int c_isgraph PARAMS ((int c));
-extern int c_isprint PARAMS ((int c));
-extern int c_ispunct PARAMS ((int c));
-extern int c_isspace PARAMS ((int c));
-extern int c_isupper PARAMS ((int c));
-extern int c_isxdigit PARAMS ((int c));
+extern bool c_isascii PARAMS ((int c)); /* not locale dependent */
+
+extern bool c_isalnum PARAMS ((int c));
+extern bool c_isalpha PARAMS ((int c));
+extern bool c_isblank PARAMS ((int c));
+extern bool c_iscntrl PARAMS ((int c));
+extern bool c_isdigit PARAMS ((int c));
+extern bool c_islower PARAMS ((int c));
+extern bool c_isgraph PARAMS ((int c));
+extern bool c_isprint PARAMS ((int c));
+extern bool c_ispunct PARAMS ((int c));
+extern bool c_isspace PARAMS ((int c));
+extern bool c_isupper PARAMS ((int c));
+extern bool c_isxdigit PARAMS ((int c));
extern int c_tolower PARAMS ((int c));
extern int c_toupper PARAMS ((int c));
-/* Copyright (C) 1999, 2001 Free Software Foundation, Inc.
+/* Copyright (C) 1999, 2001-2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
/* Specification. */
#include "tmpdir.h"
+#include <stdbool.h>
#include <stdlib.h>
#include <string.h>
/* Prototypes for local functions. Needed to ensure compiler checking of
function argument counts despite of K&R C function definition syntax. */
-static int direxists PARAMS ((const char *dir));
+static bool direxists PARAMS ((const char *dir));
/* Return nonzero if DIR is an existent directory. */
-static int
+static bool
direxists (dir)
const char *dir;
{
size_t tmpl_len;
const char *dir;
const char *pfx;
- int try_tmpdir;
+ bool try_tmpdir;
{
const char *d;
size_t dlen, plen;
/* Determine a temporary directory.
- Copyright (C) 2001 Free Software Foundation, Inc.
+ Copyright (C) 2001-2002 Free Software Foundation, Inc.
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
# endif
#endif
+#include <stdbool.h>
#include <stddef.h>
/* Path search algorithm, for tmpnam, tmpfile, etc. If DIR is
for use with mk[s]temp. Will fail (-1) if DIR is non-null and
doesn't exist, none of the searched dirs exists, or there's not
enough space in TMPL. */
-extern int path_search PARAMS ((char *tmpl, size_t tmpl_len, const char *dir, const char *pfx, int try_tmpdir));
+extern int path_search PARAMS ((char *tmpl, size_t tmpl_len, const char *dir, const char *pfx, bool try_tmpdir));
/* Like vsprintf but provides a pointer to malloc'd storage, which must
be freed by the caller.
- Copyright (C) 1994, 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
+ Copyright (C) 1994, 1998, 1999, 2000-2002 Free Software Foundation, Inc.
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
#include <math.h>
#ifdef TEST
-int global_total_width;
+size_t global_total_width;
#endif
static int
const char *p = format;
/* Add one to make sure that it is never zero, which might cause malloc
to return NULL. */
- int total_width = strlen (format) + 1;
+ size_t total_width = strlen (format) + 1;
va_list ap;
memcpy (&ap, args, sizeof (va_list));
printf ("PASS: ");
else
printf ("FAIL: ");
- printf ("%d %s\n", global_total_width, result);
+ printf ("%lu %s\n", (unsigned long) global_total_width, result);
}
int
+2002-02-09 Bruno Haible <bruno@clisp.org>
+
+ * message.h (possible_format_p): Change return type to bool.
+ * message.c (possible_format_p): Likewise.
+
2002-01-14 Bruno Haible <bruno@clisp.org>
* x-glade.h: New file.
};
-int
+bool
possible_format_p (is_format)
enum is_format is_format;
{
impossible
};
-extern int
+extern bool
possible_format_p PARAMS ((enum is_format));