Lines Matching refs:fp
40 int FlushAndSync(FILE *fp);
44 FILE *fp = fopen(filename, "r"); in FileSize() local
45 if (!fp) { in FileSize()
50 int ret = fseek(fp, 0L, SEEK_END); in FileSize()
52 size = ftell(fp); in FileSize()
54 fclose(fp); in FileSize()
59 static FILE *FileClear(FILE **fp, const char *filename) in FileClear() argument
61 if (*fp != NULL) { in FileClear()
62 fclose(*fp); in FileClear()
64 *fp = fopen(filename, "w"); in FileClear()
65 if (*fp == NULL) { in FileClear()
69 return *fp; in FileClear()
104 int FlushAndSync(FILE *fp) in FlushAndSync() argument
106 if (fp == NULL) { in FlushAndSync()
109 if (fflush(fp) != 0) { in FlushAndSync()
112 int fd = fileno(fp); in FlushAndSync()