aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorqorg11 <qorg@vxempire.xyz>2020-12-05 15:34:18 +0100
committerqorg11 <qorg@vxempire.xyz>2020-12-05 15:34:18 +0100
commitfbff968b27df9f6f41c5f32aef29a85f6e4d3da0 (patch)
treeec21ee9fae8bf531213277ac8dd238ce217a2447
parente4192c61551919801d710567ae1cfd0685250f3c (diff)
downloadk9core-fbff968b27df9f6f41c5f32aef29a85f6e4d3da0.tar.gz
k9core-fbff968b27df9f6f41c5f32aef29a85f6e4d3da0.zip
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
-rw-r--r--src/wc.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/wc.c b/src/wc.c
index 397da12..4e1b795 100644
--- a/src/wc.c
+++ b/src/wc.c
@@ -71,15 +71,15 @@ main(int argc, char *argv[])
switch(c)
{
case 'l':
- show_lines = 0;
- break;
+ show_lines = 0;
+ break;
case 'w':
- show_words = 0;
- break;
+ show_words = 0;
+ break;
case 'c':
case 'm':
- show_bytes = 0;
- break;
+ show_bytes = 0;
+ break;
}
}
@@ -91,7 +91,7 @@ main(int argc, char *argv[])
}
else for(int i = optind; i<argc; i++)
{
- if(argv[i][0] == '-' && argv[i][1] == '\0')
+ if(argv[i][0] == '-')
data = wc(stdin);
else
data = wc(fopen(argv[i],"r"));