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

Function acl_vstream_fopen

lib_acl/src/stdlib/acl_vstream.c:2502–2534  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2500/* acl_vstream_fopen - open buffered file fp */
2501
2502ACL_VSTREAM *acl_vstream_fopen(const char *path, unsigned int oflags,
2503 int mode, size_t buflen)
2504{
2505 ACL_VSTREAM *fp;
2506 ACL_FILE_HANDLE fh;
2507
2508 /* for linux2.6 */
2509#ifdef _LARGEFILE64_SOURCE
2510 oflags |= O_LARGEFILE;
2511#endif
2512
2513#ifdef ACL_WINDOWS
2514 oflags |= O_BINARY;
2515#endif
2516
2517 fh = acl_file_open(path, oflags, mode);
2518 if (fh == ACL_FILE_INVALID) {
2519 return NULL;
2520 }
2521
2522 fp = acl_vstream_fdopen(ACL_SOCKET_INVALID, oflags, buflen,
2523 -1, ACL_VSTREAM_TYPE_FILE);
2524 if (fp == NULL) {
2525 return NULL;
2526 }
2527
2528 fp->fd.h_file = fh;
2529 fp->oflags = oflags;
2530 fp->omode = mode;
2531 acl_vstream_set_path(fp, path);
2532
2533 return fp;
2534}
2535
2536char *acl_vstream_loadfile(const char *path)
2537{

Callers 15

get_dnsFunction · 0.85
get_portFunction · 0.85
test_file_vstreamFunction · 0.85
dict_load_fileFunction · 0.85
UpdateSvnMethod · 0.85
mainFunction · 0.85
parse_xml_fileFunction · 0.85
parse_xml_fileFunction · 0.85
parse_xml_fileFunction · 0.85
parse_xml_fileFunction · 0.85
mainFunction · 0.85
parse_xml_fileFunction · 0.85

Calls 2

acl_file_openFunction · 0.85
acl_vstream_set_pathFunction · 0.85

Tested by 4

test_file_vstreamFunction · 0.68
test_file3Function · 0.68
test_vstreamFunction · 0.68
test_thread_poolFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…