Lines Matching refs:fb
440 read_whole_file(struct mparse *curp, int fd, struct buf *fb, int *with_mmap) in read_whole_file() argument
466 fb->sz = (size_t)st.st_size; in read_whole_file()
467 fb->buf = mmap(NULL, fb->sz, PROT_READ, MAP_SHARED, fd, 0); in read_whole_file()
468 if (fb->buf != MAP_FAILED) in read_whole_file()
502 fb->sz = 0; in read_whole_file()
503 fb->buf = NULL; in read_whole_file()
505 if (off == fb->sz) { in read_whole_file()
506 if (fb->sz == (1U << 31)) { in read_whole_file()
510 resize_buf(fb, 65536); in read_whole_file()
513 gzread(gz, fb->buf + (int)off, fb->sz - off) : in read_whole_file()
514 read(fd, fb->buf + (int)off, fb->sz - off); in read_whole_file()
516 fb->sz = off; in read_whole_file()
536 free(fb->buf); in read_whole_file()
537 fb->buf = NULL; in read_whole_file()