annotate dis.c @ 4:8448e78efe82 default tip

Autmatic Win32 Porting
author VilyaemKenyaz
date Thu, 28 Sep 2023 13:20:56 -0400
parents a499c3c6b9ae
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
4
8448e78efe82 Autmatic Win32 Porting
VilyaemKenyaz
parents: 3
diff changeset
1 /*********************************************
8448e78efe82 Autmatic Win32 Porting
VilyaemKenyaz
parents: 3
diff changeset
2 * Description - Display a file, dis
8448e78efe82 Autmatic Win32 Porting
VilyaemKenyaz
parents: 3
diff changeset
3 * Author - William King
8448e78efe82 Autmatic Win32 Porting
VilyaemKenyaz
parents: 3
diff changeset
4 * Date - Sep 25 2023
8448e78efe82 Autmatic Win32 Porting
VilyaemKenyaz
parents: 3
diff changeset
5 * *******************************************/
8448e78efe82 Autmatic Win32 Porting
VilyaemKenyaz
parents: 3
diff changeset
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
8448e78efe82 Autmatic Win32 Porting
VilyaemKenyaz
parents: 3
diff changeset
10
1
b82f21466dfd You can just printf the file what are you doing!
VilyaemKenyaz
parents: 0
diff changeset
11 #include "basedfilelib.h"
0
e92d7e15bc33 First commit, made by makeprogram
VilyaemKenyaz
parents:
diff changeset
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
a499c3c6b9ae Are you STUPID???
VilyaemKenyaz
parents: 2
diff changeset
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