#include "long-options.h"
#include "error.h"
-char *basename __P ((char *));
-void strip_trailing_slashes ();
-
-static void remove_suffix __P ((register char *name, register char *suffix));
+extern char *basename ();
+extern void strip_trailing_slashes ();
/* The name this program was run with. */
char *program_name;
exit (status);
}
+/* Remove SUFFIX from the end of NAME if it is there, unless NAME
+ consists entirely of SUFFIX. */
+
+static void
+remove_suffix (char *name, const char *suffix)
+{
+ char *np;
+ const char *sp;
+
+ np = name + strlen (name);
+ sp = suffix + strlen (suffix);
+
+ while (np > name && sp > suffix)
+ if (*--np != *--sp)
+ return;
+ if (np > name)
+ *np = '\0';
+}
+
void
main (int argc, char **argv)
{
exit (0);
}
-
-/* Remove SUFFIX from the end of NAME if it is there, unless NAME
- consists entirely of SUFFIX. */
-
-static void
-remove_suffix (register char *name, register char *suffix)
-{
- register char *np, *sp;
-
- np = name + strlen (name);
- sp = suffix + strlen (suffix);
-
- while (np > name && sp > suffix)
- if (*--np != *--sp)
- return;
- if (np > name)
- *np = '\0';
-}