Lines Matching refs:fb
435 read_whole_file(struct mparse *curp, int fd, struct buf *fb, int *with_mmap) in read_whole_file() argument
461 fb->sz = (size_t)st.st_size; in read_whole_file()
462 fb->buf = mmap(NULL, fb->sz, PROT_READ, MAP_SHARED, fd, 0); in read_whole_file()
463 if (fb->buf != MAP_FAILED) in read_whole_file()
497 fb->sz = 0; in read_whole_file()
498 fb->buf = NULL; in read_whole_file()
500 if (off == fb->sz) { in read_whole_file()
501 if (fb->sz == (1U << 31)) { in read_whole_file()
505 resize_buf(fb, 65536); in read_whole_file()
508 gzread(gz, fb->buf + (int)off, fb->sz - off) : in read_whole_file()
509 read(fd, fb->buf + (int)off, fb->sz - off); in read_whole_file()
511 fb->sz = off; in read_whole_file()
531 free(fb->buf); in read_whole_file()
532 fb->buf = NULL; in read_whole_file()