-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.c
More file actions
29 lines (26 loc) · 714 Bytes
/
main.c
File metadata and controls
29 lines (26 loc) · 714 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#include "tolowercase.h"
#include <stdio.h>
#include <string.h>
int main(int argc, char *argv[]) {
if (argc == 1) {
printf("Please enter an input file and an output file\n\n");
puts("tolowercase -h from help");
return 1;
} else if (argc == 2) {
if (strcmp(argv[1], "-h") == 0) {
printf("USAGE: tolowercase input.txt output.txt\n\n");
puts("OPTIONS");
puts("-h: Print this screen");
return 0;
}
printf("Please enter an output file\n\n");
puts("tolowercase -h from help");
return 1;
} else if (argc > 3) {
printf("Too many arguments\n\n");
puts("tolowercase -h from help");
}
toLowerCase(argv[1], argv[2]);
puts("Done\n");
return 0;
}