1
0
mirror of git://git.suckless.org/sbase synced 2024-12-23 07:25:07 +00:00

The style inquisition on basename.

This commit is contained in:
Christoph Lohmann 2013-03-05 21:35:55 +01:00
parent 284e9f723d
commit 52d39e35c2
2 changed files with 10 additions and 6 deletions

View File

@ -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);
}

1
uniq.c
View File

@ -4,6 +4,7 @@
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include "text.h"
#include "util.h"