/* 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
#include "system.h"
#include "long-options.h"
+#include "dirname.h"
#include "error.h"
#include "closeout.h"
#define AUTHORS "FIXME unknown"
-char *base_name ();
-void strip_trailing_slashes ();
-
/* The name this program was run with. */
char *program_name;
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]);