From 7f5a14a4366b8696b9f58cc78d8b3a02912ffc6d Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Mon, 8 Sep 2003 23:08:47 +0000 Subject: [PATCH] Remove K&R cruft. --- lib/basename.c | 8 ++++---- lib/dirname.c | 8 +++----- lib/stripslash.c | 8 +------- m4/dirname.m4 | 16 +++------------- 4 files changed, 11 insertions(+), 29 deletions(-) diff --git a/lib/basename.c b/lib/basename.c index 54f037ed5f..5ff2989330 100644 --- a/lib/basename.c +++ b/lib/basename.c @@ -1,5 +1,7 @@ /* basename.c -- return the last element in a path - Copyright (C) 1990, 1998, 1999, 2000, 2001 Free Software Foundation, Inc. + + Copyright (C) 1990, 1998, 1999, 2000, 2001, 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 @@ -19,10 +21,8 @@ # include #endif -#if STDC_HEADERS || HAVE_STRING_H -# include -#endif #include "dirname.h" +#include /* In general, we can't use the builtin `basename' function if available, since it has different meanings in different environments. diff --git a/lib/dirname.c b/lib/dirname.c index 131af8bbdb..815192a66f 100644 --- a/lib/dirname.c +++ b/lib/dirname.c @@ -1,5 +1,5 @@ /* dirname.c -- return all but the last element in a path - Copyright 1990, 1998, 2000, 2001, 2003 Free Software Foundation, Inc. + Copyright (C) 1990, 1998, 2000, 2001, 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 @@ -19,11 +19,9 @@ # include #endif -#if STDC_HEADERS || HAVE_STRING_H -# include -#endif - #include "dirname.h" + +#include #include "xalloc.h" /* Return the length of `dirname (PATH)', or zero if PATH is diff --git a/lib/stripslash.c b/lib/stripslash.c index 73be737321..c6b319e69f 100644 --- a/lib/stripslash.c +++ b/lib/stripslash.c @@ -1,5 +1,5 @@ /* stripslash.c -- remove redundant trailing slashes from a file name - Copyright (C) 1990, 2001 Free Software Foundation, Inc. + Copyright (C) 1990, 2001, 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 @@ -19,12 +19,6 @@ # include #endif -#if STDC_HEADERS || HAVE_STRING_H -# include -#else -# include -#endif - #include "dirname.h" /* Remove trailing slashes from PATH. diff --git a/m4/dirname.m4 b/m4/dirname.m4 index 8b04bcabda..9a5e6f5f34 100644 --- a/m4/dirname.m4 +++ b/m4/dirname.m4 @@ -1,5 +1,5 @@ -# dirname.m4 serial 1 -dnl Copyright (C) 2002 Free Software Foundation, Inc. +# dirname.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 @@ -11,15 +11,5 @@ AC_DEFUN([gl_DIRNAME], dnl Prerequisites of lib/dirname.h. AC_REQUIRE([jm_AC_DOS]) - dnl Prerequisites of lib/dirname.c. - AC_REQUIRE([AC_HEADER_STDC]) - AC_CHECK_HEADERS_ONCE(string.h) - - dnl Prerequisites of lib/basename.c. - AC_REQUIRE([AC_HEADER_STDC]) - AC_CHECK_HEADERS_ONCE(string.h) - - dnl Prerequisites of lib/stripslash.c. - AC_REQUIRE([AC_HEADER_STDC]) - AC_CHECK_HEADERS_ONCE(string.h) + dnl No prerequisites of lib/basename.c, lib/dirname.c, lib/stripslash.c. ]) -- 2.30.2