| 52 | } |
| 53 | |
| 54 | static 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 | |
| 76 | static int test_vstream(void) |
| 77 | { |
no test coverage detected
searching dependent graphs…