MCPcopy Create free account
hub / github.com/acl-dev/acl / test_file3

Function test_file3

lib_acl/samples/file/main.cpp:54–74  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

52}
53
54static int test_file3(void)
55{
56 char buf[1024];
57 int ret;
58
59 ACL_VSTREAM *fp = acl_vstream_fopen("test3.txt", O_RDONLY, 0700, 8192);
60 if (fp == NULL) {
61 printf("fopen error %s\n", acl_last_serror());
62 return (-1);
63 }
64
65 while (1) {
66 ret = acl_vstream_gets_nonl(fp, buf, sizeof(buf));
67 if (ret == ACL_VSTREAM_EOF)
68 break;
69 printf(">>>gets(%s), ret: %d\n", buf, ret);
70 }
71
72 acl_vstream_fclose(fp);
73 return (0);
74}
75
76static int test_vstream(void)
77{

Callers 1

mainFunction · 0.85

Calls 3

acl_vstream_fopenFunction · 0.85
acl_last_serrorFunction · 0.85
acl_vstream_gets_nonlFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…