From 04a872f0d3db6a95b28c9640e2d9c5f3e3d2d7f6 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Sat, 12 May 2001 16:05:12 +0000 Subject: [PATCH] Include "dirname.h". (base_name, strip_trailing_slashes): Remove decls; now in dirname.h. (main): Use base_len instead of strip_trailing_slashes to strip trailing slashes. --- src/basename.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/basename.c b/src/basename.c index 5ac75a5..2c7f8d7 100644 --- a/src/basename.c +++ b/src/basename.c @@ -1,5 +1,5 @@ /* basename -- strip directory and suffix from filenames - Copyright (C) 1990-1997, 1999, 2000 Free Software Foundation, Inc. + Copyright (C) 1990-1997, 1999, 2000, 2001 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 @@ -31,6 +31,7 @@ #include "system.h" #include "long-options.h" +#include "dirname.h" #include "error.h" #include "closeout.h" @@ -39,9 +40,6 @@ #define AUTHORS "FIXME unknown" -char *base_name (); -void strip_trailing_slashes (); - /* The name this program was run with. */ char *program_name; @@ -118,9 +116,8 @@ main (int argc, char **argv) usage (1); } - strip_trailing_slashes (argv[1]); - name = base_name (argv[1]); + name[base_len (name)] = '\0'; if (argc == 3) remove_suffix (name, argv[2]); -- 2.7.4