From: Jim Meyering Date: Wed, 23 Jul 2003 06:39:44 +0000 (+0000) Subject: Include xstrndup.h. X-Git-Tag: v5.0.90~127 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8d69e13ee51f618bdf85f3933134d859677b7adf;p=thirdparty%2Fcoreutils.git Include xstrndup.h. (xstrndup): Remove function, now that it's been factored out into it's own file. --- diff --git a/src/dircolors.c b/src/dircolors.c index 97e34628e1..5d18f098cd 100644 --- a/src/dircolors.c +++ b/src/dircolors.c @@ -1,6 +1,6 @@ /* dircolors - output commands to set the LS_COLOR environment variable - Copyright (C) 1994, 1995, 1997, 1998, 1999, 2000, 2001, 2002 H. Peter Anvin - Copyright (C) 1996-2000 Free Software Foundation, Inc. + Copyright (C) 1996-2003 Free Software Foundation, Inc. + Copyright (C) 1994, 1995, 1997, 1998, 1999, 2000 H. Peter Anvin 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 @@ -31,6 +31,7 @@ #include "getline.h" #include "obstack.h" #include "quote.h" +#include "xstrndup.h" /* The official name of this program (e.g., no `g' prefix). */ #define PROGRAM_NAME "dircolors" @@ -123,15 +124,6 @@ For details on the format of these files, run `dircolors --print-database'.\n\ exit (status == 0 ? EXIT_SUCCESS : EXIT_FAILURE); } -static void * -xstrndup (const char *s, size_t n) -{ - char *new = strndup (s, n); - if (new == NULL) - xalloc_die (); - return new; -} - /* If the SHELL environment variable is set to `csh' or `tcsh,' assume C shell. Else Bourne shell. */