Lines Matching refs:f_fp
79 return ((PyFileObject *)f)->f_fp; in PyFile_AsFile()
110 result = PyObject_Print(op, f->f_fp, flags); in file_PyObject_Print()
125 if (f->f_fp == NULL) in dircheck()
129 res = fstat(fileno(f->f_fp), &buf); in dircheck()
152 assert(f->f_fp == NULL); in fill_file_fields()
185 f->f_fp = fp; in fill_file_fields()
336 assert(f->f_fp == NULL); in open_the_file()
370 f->f_fp = _wfopen(PyUnicode_AS_UNICODE(f->f_name), in open_the_file()
377 if (NULL == f->f_fp && NULL != name) { in open_the_file()
379 f->f_fp = fopen(name, newmode); in open_the_file()
383 if (f->f_fp == NULL) { in open_the_file()
430 FILE *local_fp = f->f_fp; in close_the_file()
453 f->f_fp = NULL; in close_the_file()
537 fflush(file->f_fp); in PyFile_SetBufSize()
546 setvbuf(file->f_fp, file->f_setbuf, type, bufsize); in PyFile_SetBufSize()
548 setbuf(file->f_fp, file->f_setbuf); in PyFile_SetBufSize()
655 f->f_fp == NULL ? "closed" : "open", in file_repr()
667 f->f_fp == NULL ? "closed" : "open", in file_repr()
773 if (f->f_fp == NULL) in file_seek()
804 ret = _portable_fseek(f->f_fp, offset, whence); in file_seek()
809 clearerr(f->f_fp); in file_seek()
827 if (f->f_fp == NULL) in file_truncate()
843 initialpos = _portable_ftell(f->f_fp); in file_truncate()
871 ret = fflush(f->f_fp); in file_truncate()
885 ret = _portable_fseek(f->f_fp, newsize, SEEK_SET) != 0; in file_truncate()
893 hFile = (HANDLE)_get_osfhandle(fileno(f->f_fp)); in file_truncate()
907 ret = ftruncate(fileno(f->f_fp), newsize); in file_truncate()
916 ret = _portable_fseek(f->f_fp, initialpos, SEEK_SET) != 0; in file_truncate()
926 clearerr(f->f_fp); in file_truncate()
936 if (f->f_fp == NULL) in file_tell()
940 pos = _portable_ftell(f->f_fp); in file_tell()
945 clearerr(f->f_fp); in file_tell()
950 c = GETC(f->f_fp); in file_tell()
955 } else if (c != EOF) ungetc(c, f->f_fp); in file_tell()
967 if (f->f_fp == NULL) in file_fileno()
969 return PyInt_FromLong((long) fileno(f->f_fp)); in file_fileno()
977 if (f->f_fp == NULL) in file_flush()
981 res = fflush(f->f_fp); in file_flush()
985 clearerr(f->f_fp); in file_flush()
996 if (f->f_fp == NULL) in file_isatty()
999 res = isatty((int)fileno(f->f_fp)); in file_isatty()
1021 res = fstat(fileno(f->f_fp), &st); in new_buffersize()
1035 pos = lseek(fileno(f->f_fp), 0L, SEEK_CUR); in new_buffersize()
1038 pos = ftell(f->f_fp); in new_buffersize()
1041 clearerr(f->f_fp); in new_buffersize()
1077 if (f->f_fp == NULL) in file_read()
1106 buffersize - bytesread, f->f_fp, (PyObject *)f); in file_read()
1107 interrupted = ferror(f->f_fp) && errno == EINTR; in file_read()
1110 clearerr(f->f_fp); in file_read()
1119 if (!ferror(f->f_fp)) in file_read()
1121 clearerr(f->f_fp); in file_read()
1134 clearerr(f->f_fp); in file_read()
1159 if (f->f_fp == NULL) in file_readinto()
1177 nnow = Py_UniversalNewlineFread(ptr+ndone, ntodo, f->f_fp, in file_readinto()
1179 interrupted = ferror(f->f_fp) && errno == EINTR; in file_readinto()
1182 clearerr(f->f_fp); in file_readinto()
1191 if (!ferror(f->f_fp)) in file_readinto()
1194 clearerr(f->f_fp); in file_readinto()
1428 FILE *fp = f->f_fp; in get_line()
1570 if (fo->f_fp == NULL) in PyFile_GetLine()
1662 if (f->f_fp == NULL) in file_readline()
1697 if (f->f_fp == NULL) in file_readlines()
1717 buffersize-nfilled, f->f_fp, (PyObject *)f); in file_readlines()
1723 if (!ferror(f->f_fp)) in file_readlines()
1729 clearerr(f->f_fp); in file_readlines()
1734 clearerr(f->f_fp); in file_readlines()
1828 if (f->f_fp == NULL) in file_write()
1871 n2 = fwrite(s, 1, n, f->f_fp); in file_write()
1872 if (n2 != n || ferror(f->f_fp)) { in file_write()
1883 clearerr(f->f_fp); in file_write()
1901 if (f->f_fp == NULL) in file_writelines()
1946 if (f->f_fp == NULL) { in file_writelines()
1992 1, len, f->f_fp); in file_writelines()
1996 clearerr(f->f_fp); in file_writelines()
2018 if (f->f_fp == NULL) in file_self()
2177 return PyBool_FromLong((long)(f->f_fp == 0)); in get_closed()
2278 chunksize = Py_UniversalNewlineFread(rab->buf, bufsize, f->f_fp, (PyObject *)f); in readahead()
2281 if (ferror(f->f_fp)) { in readahead()
2283 clearerr(f->f_fp); in readahead()
2348 if (f->f_fp == NULL) in file_iternext()
2432 if (foself->f_fp != NULL) { in file_init()
2606 if (fobj->f_fp == NULL) { in PyFile_WriteObject()