mirror of
git://git.suckless.org/sbase
synced 2024-12-23 23:43:33 +00:00
Testing before rage. Suffix is fixed in basename.
This commit is contained in:
parent
3817f78f87
commit
3863ccdf98
@ -32,9 +32,9 @@ main(int argc, char *argv[])
|
|||||||
usage();
|
usage();
|
||||||
|
|
||||||
s = basename(argv[0]);
|
s = basename(argv[0]);
|
||||||
if (suffix) {
|
if (argc == 2 && argv[1]) {
|
||||||
n = strlen(s) - strlen(suffix);
|
n = strlen(s) - strlen(argv[1]);
|
||||||
if (!strcmp(&s[n], suffix))
|
if (!strcmp(&s[n], argv[1]))
|
||||||
s[n] = '\0';
|
s[n] = '\0';
|
||||||
}
|
}
|
||||||
puts(s);
|
puts(s);
|
||||||
|
Loading…
Reference in New Issue
Block a user