Mercurial Hosting > dis
annotate dis.c @ 4:8448e78efe82 default tip
Autmatic Win32 Porting
| author | VilyaemKenyaz |
|---|---|
| date | Thu, 28 Sep 2023 13:20:56 -0400 |
| parents | a499c3c6b9ae |
| children |
| rev | line source |
|---|---|
| 4 | 1 /********************************************* |
| 2 * Description - Display a file, dis | |
| 3 * Author - William King | |
| 4 * Date - Sep 25 2023 | |
| 5 * *******************************************/ | |
| 6 | |
|
1
b82f21466dfd
You can just printf the file what are you doing!
VilyaemKenyaz
parents:
0
diff
changeset
|
7 #include <stdio.h> |
|
b82f21466dfd
You can just printf the file what are you doing!
VilyaemKenyaz
parents:
0
diff
changeset
|
8 #include <stdlib.h> |
|
b82f21466dfd
You can just printf the file what are you doing!
VilyaemKenyaz
parents:
0
diff
changeset
|
9 #include <string.h> |
| 4 | 10 |
|
1
b82f21466dfd
You can just printf the file what are you doing!
VilyaemKenyaz
parents:
0
diff
changeset
|
11 #include "basedfilelib.h" |
| 0 | 12 |
|
1
b82f21466dfd
You can just printf the file what are you doing!
VilyaemKenyaz
parents:
0
diff
changeset
|
13 void main(int argc, char* argv[]){ |
|
2
2b6ce8d53356
Finished program, fully functional, seems to be faster than cat
VilyaemKenyaz
parents:
1
diff
changeset
|
14 if (argc == 1 ) { puts("Dis by William King at Peep Soft\nDisplays a file to stdout, better than cat at this purpose\nUsage: dis (file)");exit(0);} |
|
2b6ce8d53356
Finished program, fully functional, seems to be faster than cat
VilyaemKenyaz
parents:
1
diff
changeset
|
15 //puts("Displaying:"); |
|
2b6ce8d53356
Finished program, fully functional, seems to be faster than cat
VilyaemKenyaz
parents:
1
diff
changeset
|
16 char * filetoread = argv[1]; |
|
2b6ce8d53356
Finished program, fully functional, seems to be faster than cat
VilyaemKenyaz
parents:
1
diff
changeset
|
17 char * file = ReadFile(filetoread); |
| 3 | 18 printf("%s\n",file); |
|
2
2b6ce8d53356
Finished program, fully functional, seems to be faster than cat
VilyaemKenyaz
parents:
1
diff
changeset
|
19 exit(0); |
|
1
b82f21466dfd
You can just printf the file what are you doing!
VilyaemKenyaz
parents:
0
diff
changeset
|
20 } |
|
b82f21466dfd
You can just printf the file what are you doing!
VilyaemKenyaz
parents:
0
diff
changeset
|
21 |
