-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.c
51 lines (37 loc) · 1.08 KB
/
main.c
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
/**************************************/
/* main.c */
/**************************************/
#include "efile.h"
int main()
{
FILE *filePtr = eopen("testfile.txt", "r");
char *buffer;
printf("------------------\n");
printf("| From \"eread()\" |\n");
printf("------------------\n");
buffer = eread(NULL);
printf("%s", buffer);
fseek(filePtr, 0, SEEK_SET);
printf("\n\n-------------------\n");
printf("| From \"eprint()\" |\n");
printf("-------------------\n");
eprint(NULL);
fseek(filePtr, 0, SEEK_SET);
printf("\n\n----------------------\n");
printf("| From \"ereadLine()\" |\n");
printf("----------------------\n");
buffer = ereadLine(NULL);
printf("%s", buffer);
fseek(filePtr, 0, SEEK_SET);
printf("\n\n-----------------------------\n");
printf("| From \"ereadCustomLines()\" |\n");
printf("-----------------------------\n");
buffer = ereadCustomLines(NULL, 6);
printf("%s", buffer);
fseek(filePtr, 0, SEEK_SET);
eclose(filePtr);
return 0;
}
/**************************************/
/* EOF */
/**************************************/