Lines Matching refs:fp
1290 FILE *fp, *tp; in history_truncate_file() local
1301 if ((fp = fopen(filename, "r+")) == NULL) in history_truncate_file()
1316 if (fread(buf, sizeof(buf), (size_t)1, fp) != 1) { in history_truncate_file()
1317 if (ferror(fp)) { in history_truncate_file()
1321 if (fseeko(fp, (off_t)sizeof(buf) * count, SEEK_SET) == in history_truncate_file()
1326 left = (ssize_t)fread(buf, (size_t)1, sizeof(buf), fp); in history_truncate_file()
1327 if (ferror(fp)) { in history_truncate_file()
1386 if (fseeko(fp, (off_t)0, SEEK_SET) == (off_t)-1) { in history_truncate_file()
1399 if (ferror(fp)) in history_truncate_file()
1403 if (fwrite(buf, (size_t)left, (size_t)1, fp) != 1) { in history_truncate_file()
1408 fflush(fp); in history_truncate_file()
1409 if((off = ftello(fp)) > 0) in history_truncate_file()
1410 (void)ftruncate(fileno(fp), off); in history_truncate_file()
1416 fclose(fp); in history_truncate_file()
1465 FILE *fp; in append_history() local
1472 if ((fp = fopen(filename, "a")) == NULL) in append_history()
1475 if (history(h, &ev, H_NSAVE_FP, (size_t)n, fp) == -1) { in append_history()
1477 fclose(fp); in append_history()
1480 fclose(fp); in append_history()