mirror of
git://git.suckless.org/sbase
synced 2024-12-22 23:13:44 +00:00
The style inquisition on basename.
This commit is contained in:
parent
284e9f723d
commit
52d39e35c2
15
basename.c
15
basename.c
@ -3,10 +3,17 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "util.h"
|
||||
|
||||
static void usage(void);
|
||||
|
||||
void
|
||||
usage(void)
|
||||
{
|
||||
eprintf("usage: %s name [suffix]\n", argv0);
|
||||
}
|
||||
|
||||
int
|
||||
main(int argc, char *argv[])
|
||||
{
|
||||
@ -27,13 +34,9 @@ main(int argc, char *argv[])
|
||||
if(!strcmp(&s[n], argv[1]))
|
||||
s[n] = '\0';
|
||||
}
|
||||
|
||||
puts(s);
|
||||
|
||||
return EXIT_SUCCESS;
|
||||
return 0;
|
||||
}
|
||||
|
||||
void
|
||||
usage(void)
|
||||
{
|
||||
eprintf("usage: %s name [suffix]\n", argv0);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user