k9core

Unnamed repository
Log | Files | Refs | LICENSE

commit 27a02780f65460d0ccb9f3efaf54814b8e9e531a
parent 0d526968a57ad704a48e5d28f42019b8d8164f0b
Author: qorg11 <qorg@vxempire.xyz>
Date:   Mon, 15 Mar 2021 13:00:53 +0100

whoops

Diffstat:
Msrc/wc.c | 8+++-----
1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/src/wc.c b/src/wc.c @@ -56,7 +56,7 @@ wc(const char *filename, struct wc_values *data) } void -print_values(const char *filename, struct wc_values data, int show_total) +print_values(const char *filename, struct wc_values data) { if(show_bytes && show_lines && show_words) printf("%i %i %i", @@ -71,8 +71,6 @@ print_values(const char *filename, struct wc_values data, int show_total) if(!show_bytes) printf("%i ",data.bytes); } - if(show_total) { - } printf(" %s\n",filename); } @@ -102,7 +100,7 @@ main(int argc, char *argv[]) } if(optind == argc) { wc("/dev/stdin",&data); /* lol */ - print_values("stdin",data,0); + print_values("stdin",data); } else for(int i = optind; i<argc; i++) { @@ -111,7 +109,7 @@ main(int argc, char *argv[]) else return_value = wc(argv[i],&data); if (return_value == 0) - print_values(argv[i],data,1); + print_values(argv[i],data); } if(argc > optind+1) printf("%i %i %i total\n",