This commit is contained in:
etrushko05
2025-10-18 05:12:52 -04:00
parent e5870253c4
commit 5f66cc8eea
3 changed files with 0 additions and 46 deletions

5
wcl.c
View File

@@ -3,10 +3,6 @@
#include <ctype.h>
void process_file(const char *filename, long *lines, long *words, long *bytes) {
FILE *file = fopen(filename, "r");
if (!file) {
perror(filename);
return;
}
int ch;
int in_word = 0;
while ((ch = fgetc(file)) != EOF) {
@@ -23,7 +19,6 @@ void process_file(const char *filename, long *lines, long *words, long *bytes) {
fclose(file);
}
int main(int argc, char *argv[]) {
long total_lines = 0, total_words = 0, total_bytes = 0;
printf("Name\tLines\tBytes\tWords\n");
for (int i = 1; i < argc; i++) {
long lines = 0, words = 0, bytes = 0;