Lines Matching refs:fp
776 FILE *fp; in history_load() local
789 if ((fp = fopen(fname, "r")) == NULL) in history_load()
794 if ((sz = getline(&line, &llen, fp)) == -1) in history_load()
803 for (i = 0; (sz = getline(&line, &llen, fp)) != -1; i++) { in history_load()
829 (void) fclose(fp); in history_load()
838 history_save_fp(TYPE(History) *h, size_t nelem, FILE *fp) in history_save_fp() argument
849 if (ftell(fp) == 0 && fputs(hist_cookie, fp) == EOF) in history_save_fp()
878 (void) fprintf(fp, "%s\n", ptr); in history_save_fp()
893 FILE *fp; in history_save() local
900 if ((fp = fdopen(i, "w")) == NULL) in history_save()
903 i = history_save_fp(h, (size_t)-1, fp); in history_save()
905 (void) fclose(fp); in history_save()