mirror of https://git.qorg11.net/k9core.git
wait i'm fucking stupid, lmao, well musl, good luck searching for a file called -<CHAR>, but if it makes you happy, go for it my dude
This commit is contained in:
parent
e4192c6155
commit
fbff968b27
14
src/wc.c
14
src/wc.c
|
@ -71,15 +71,15 @@ main(int argc, char *argv[])
|
||||||
switch(c)
|
switch(c)
|
||||||
{
|
{
|
||||||
case 'l':
|
case 'l':
|
||||||
show_lines = 0;
|
show_lines = 0;
|
||||||
break;
|
break;
|
||||||
case 'w':
|
case 'w':
|
||||||
show_words = 0;
|
show_words = 0;
|
||||||
break;
|
break;
|
||||||
case 'c':
|
case 'c':
|
||||||
case 'm':
|
case 'm':
|
||||||
show_bytes = 0;
|
show_bytes = 0;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -91,7 +91,7 @@ main(int argc, char *argv[])
|
||||||
}
|
}
|
||||||
else for(int i = optind; i<argc; i++)
|
else for(int i = optind; i<argc; i++)
|
||||||
{
|
{
|
||||||
if(argv[i][0] == '-' && argv[i][1] == '\0')
|
if(argv[i][0] == '-')
|
||||||
data = wc(stdin);
|
data = wc(stdin);
|
||||||
else
|
else
|
||||||
data = wc(fopen(argv[i],"r"));
|
data = wc(fopen(argv[i],"r"));
|
||||||
|
|
Loading…
Reference in New Issue