Mercurial > hg > octave-nkf > gnulib-hg
changeset 4658:6ef2ff78cbad
Remove K&R cruft.
author | Paul Eggert <eggert@cs.ucla.edu> |
---|---|
date | Tue, 09 Sep 2003 19:37:26 +0000 |
parents | 551632549a7b |
children | 1b52171ed2f7 |
files | lib/hard-locale.c lib/hash.c lib/human.c m4/hard-locale.m4 m4/hash.m4 m4/human.m4 |
diffstat | 6 files changed, 14 insertions(+), 54 deletions(-) [+] |
line wrap: on
line diff
--- a/lib/hard-locale.c +++ b/lib/hard-locale.c @@ -1,6 +1,6 @@ /* hard-locale.c -- Determine whether a locale is hard. - Copyright (C) 1997, 1998, 1999, 2002 Free Software Foundation, Inc. + Copyright (C) 1997, 1998, 1999, 2002, 2003 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 @@ -20,19 +20,14 @@ # include <config.h> #endif +#include "hard-locale.h" + #if HAVE_LOCALE_H # include <locale.h> #endif -#if HAVE_STDLIB_H -# include <stdlib.h> -#endif - -#if HAVE_STRING_H -# include <string.h> -#endif - -#include "hard-locale.h" +#include <stdlib.h> +#include <string.h> /* Return nonzero if the current CATEGORY locale is hard, i.e. if you can't get away with assuming traditional C or POSIX behavior. */
--- a/lib/hash.c +++ b/lib/hash.c @@ -27,27 +27,11 @@ #if HAVE_CONFIG_H # include <config.h> #endif -#if HAVE_STDLIB_H -# include <stdlib.h> -#endif #include <limits.h> #include <stdbool.h> #include <stdio.h> - -#ifndef HAVE_DECL_FREE -"this configure-time declaration test was not run" -#endif -#if !HAVE_DECL_FREE -void free (); -#endif - -#ifndef HAVE_DECL_MALLOC -"this configure-time declaration test was not run" -#endif -#if !HAVE_DECL_MALLOC -char *malloc (); -#endif +#include <stdlib.h> #if USE_OBSTACK # include "obstack.h"
--- a/lib/human.c +++ b/lib/human.c @@ -36,25 +36,9 @@ # include <locale.h> #endif -#if HAVE_STDLIB_H -# include <stdlib.h> -#endif -#ifndef HAVE_DECL_GETENV -"this configure-time declaration test was not run" -#endif -#if !HAVE_DECL_GETENV -char *getenv (); -#endif - -#if HAVE_STRING_H -# include <string.h> -#endif - -#if HAVE_STRINGS_H -# include <strings.h> -#endif - #include <stdio.h> +#include <stdlib.h> +#include <string.h> #include "gettext.h" #define _(msgid) gettext (msgid)
--- a/m4/hard-locale.m4 +++ b/m4/hard-locale.m4 @@ -1,5 +1,5 @@ -# hard-locale.m4 serial 1 -dnl Copyright (C) 2002 Free Software Foundation, Inc. +# hard-locale.m4 serial 2 +dnl Copyright (C) 2002, 2003 Free Software Foundation, Inc. dnl This file is free software, distributed under the terms of the GNU dnl General Public License. As a special exception to the GNU General dnl Public License, this file may be distributed as part of a program @@ -9,6 +9,6 @@ AC_DEFUN([gl_HARD_LOCALE], [ dnl Prerequisites of lib/hard-locale.c. - AC_CHECK_HEADERS_ONCE(locale.h stdlib.h string.h) + AC_CHECK_HEADERS_ONCE(locale.h) AC_CHECK_FUNCS_ONCE(setlocale) ])
--- a/m4/hash.m4 +++ b/m4/hash.m4 @@ -1,4 +1,4 @@ -# hash.m4 serial 2 +# hash.m4 serial 3 dnl Copyright (C) 2002, 2003 Free Software Foundation, Inc. dnl This file is free software, distributed under the terms of the GNU dnl General Public License. As a special exception to the GNU General @@ -10,6 +10,4 @@ [ dnl Prerequisites of lib/hash.c. AC_REQUIRE([AM_STDBOOL_H]) - AC_CHECK_HEADERS_ONCE(stdlib.h) - AC_CHECK_DECLS_ONCE(free malloc) ])
--- a/m4/human.m4 +++ b/m4/human.m4 @@ -1,4 +1,4 @@ -# human.m4 serial 3 +# human.m4 serial 4 dnl Copyright (C) 2002, 2003 Free Software Foundation, Inc. dnl This file is free software, distributed under the terms of the GNU dnl General Public License. As a special exception to the GNU General @@ -13,7 +13,6 @@ AC_REQUIRE([jm_AC_TYPE_UINTMAX_T]) dnl Prerequisites of lib/human.c. - AC_CHECK_HEADERS_ONCE(locale.h stdlib.h string.h) - AC_CHECK_DECLS_ONCE(getenv) + AC_CHECK_HEADERS_ONCE(locale.h) AC_CHECK_FUNCS_ONCE(localeconv) ])