Lines Matching refs:fp
24 FILE * fp;
26 fp = fopen(name, mode);
28 if (!fp) {
36 return fp;
52 void op_close_file(FILE * fp)
54 if (fclose(fp))
59 void op_write_file(FILE * fp, void const * buf, size_t size)
66 written = fwrite(buf, size, 1, fp);
77 void op_write_u8(FILE * fp, u8 val)
79 op_write_file(fp, &val, sizeof(val));
83 void op_write_u32(FILE * fp, u32 val)
85 op_write_file(fp, &val, sizeof(val));
89 void op_write_u64(FILE * fp, u64 val)
91 op_write_file(fp, &val, sizeof(val));
97 FILE * fp;
100 fp = fopen(filename, "r");
101 if (fp == NULL) {
110 if (fscanf(fp, "%u", &value) != 1) {
111 fclose(fp);
120 fclose(fp);
126 char * op_get_line(FILE * fp)
137 switch (c = getc(fp)) {