Searched refs:fp (Results 51 - 75 of 171) sorted by relevance

1234567

/haiku/src/tests/system/libroot/posix/
H A Dfseek_test.cpp36 FILE *fp; local
57 fp = fdopen(fd, "w+");
58 if (fp == NULL)
61 setbuffer(fp, strbuf, sizeof(outstr) - 1);
63 if (fwrite(outstr, sizeof(outstr) - 1, 1, fp) != 1) {
70 if (fgetc(fp) != EOF) {
73 } else if (!feof(fp)) {
77 if (fseek(fp, 0, SEEK_CUR) != 0) {
78 printf("%d: fseek(fp, 0, SEEK_CUR) failed\n", __LINE__);
80 } else if (feof(fp)) {
378 FILE *fp = fopen("/tmp/fseek_test.data", "r+"); local
[all...]
/haiku/src/system/libroot/posix/glibc/libio/
H A Diofgets.c32 _IO_fgets (buf, n, fp)
35 _IO_FILE *fp;
40 CHECK_FILE (fp, NULL);
43 _IO_cleanup_region_start ((void (*) __P ((void *))) _IO_funlockfile, fp);
44 _IO_flockfile (fp);
48 old_error = fp->_IO_file_flags & _IO_ERR_SEEN;
49 fp->_IO_file_flags &= ~_IO_ERR_SEEN;
50 count = INTUSE(_IO_getline) (fp, buf, n - 1, '\n', 1);
53 if (count == 0 || ((fp->_IO_file_flags & _IO_ERR_SEEN)
61 fp
[all...]
H A Diofgetws.c32 fgetws (buf, n, fp)
35 _IO_FILE *fp;
40 CHECK_FILE (fp, NULL);
43 _IO_cleanup_region_start ((void (*) __P ((void *))) _IO_funlockfile, fp);
44 _IO_flockfile (fp);
48 old_error = fp->_IO_file_flags & _IO_ERR_SEEN;
49 fp->_IO_file_flags &= ~_IO_ERR_SEEN;
50 count = _IO_getwline (fp, buf, n - 1, L'\n', 1);
53 if (count == 0 || (_IO_ferror_unlocked (fp) && errno != EAGAIN))
60 fp
[all...]
H A Diofsetpos.c33 _IO_new_fsetpos (fp, posp)
34 _IO_FILE *fp;
38 CHECK_FILE (fp, EOF);
39 _IO_cleanup_region_start ((void (*) __P ((void *))) _IO_funlockfile, fp);
40 _IO_flockfile (fp);
41 if (_IO_seekpos_unlocked (fp, posp->__pos, _IOS_INPUT|_IOS_OUTPUT)
55 if (fp->_mode > 0
56 && (*fp->_codecvt->__codecvt_do_encoding) (fp->_codecvt) < 0)
58 fp
[all...]
H A Diofsetpos64.c33 _IO_new_fsetpos64 (fp, posp)
34 _IO_FILE *fp;
39 CHECK_FILE (fp, EOF);
40 _IO_cleanup_region_start ((void (*) __P ((void *))) _IO_funlockfile, fp);
41 _IO_flockfile (fp);
42 if (_IO_seekpos_unlocked (fp, posp->__pos, _IOS_INPUT|_IOS_OUTPUT)
56 if (fp->_mode > 0
57 && (*fp->_codecvt->__codecvt_do_encoding) (fp->_codecvt) < 0)
59 fp
[all...]
H A Dwgenops.c45 static int save_for_wbackup __P ((_IO_FILE *fp, wchar_t *end_p))
53 _IO_ssize_t _IO_least_wmarker __P ((_IO_FILE *fp, wchar_t *end_p));
56 _IO_least_wmarker (fp, end_p)
57 _IO_FILE *fp;
60 _IO_ssize_t least_so_far = end_p - fp->_wide_data->_IO_read_base;
62 for (mark = fp->_markers; mark != NULL; mark = mark->_next)
71 _IO_switch_to_main_wget_area (fp)
72 _IO_FILE *fp;
75 fp->_flags &= ~_IO_IN_BACKUP;
77 tmp = fp
[all...]
H A D__fsetlocking.c24 __fsetlocking (FILE *fp, int type) argument
26 int result = ((fp->_flags & _IO_USER_LOCK)
31 fp->_flags &= ~_IO_USER_LOCK;
33 fp->_flags |= _IO_USER_LOCK;
H A Dgetc_u.c33 int __getc_unlocked(FILE *fp);
36 __getc_unlocked (FILE *fp) argument
38 CHECK_FILE (fp, EOF);
39 return _IO_getc_unlocked (fp);
H A Dpclose.c34 __new_pclose (fp)
35 FILE *fp;
40 if (fp is not a proc_file)
43 return _IO_new_fclose (fp);
H A Diofread.c31 _IO_fread (buf, size, count, fp)
35 _IO_FILE *fp;
39 CHECK_FILE (fp, 0);
42 _IO_cleanup_region_start ((void (*) __P ((void *))) _IO_funlockfile, fp);
43 _IO_flockfile (fp);
44 bytes_read = INTUSE(_IO_sgetn) (fp, (char *) buf, bytes_requested);
45 _IO_funlockfile (fp);
H A Dmemstream.c33 static int _IO_mem_sync __P ((_IO_FILE* fp));
34 static void _IO_mem_finish __P ((_IO_FILE* fp, int));
35 static int _IO_wmem_sync __P ((_IO_FILE* fp));
36 static void _IO_wmem_finish __P ((_IO_FILE* fp, int));
97 struct _IO_FILE_memstream fp; member in struct:locked_FILE
109 new_f->fp._sf._sbf._f._lock = &new_f->lock;
115 _IO_no_init (&new_f->fp._sf._sbf._f, 0, 0, &new_f->wd, &_IO_wmem_jumps);
116 _IO_JUMPS ((struct _IO_FILE_plus *) &new_f->fp._sf._sbf) = &_IO_mem_jumps;
117 INTUSE(_IO_str_init_static) (&new_f->fp._sf, buf, _IO_BUFSIZ, buf);
118 new_f->fp
[all...]
H A Dwfiledoalloc.c84 _IO_wfile_doallocate (fp)
85 _IO_FILE *fp;
93 if (fp->_IO_buf_base == NULL)
94 INTUSE(_IO_file_doallocate) (fp);
96 if (fp->_fileno < 0 || _IO_SYSSTAT (fp, &st) < 0)
102 fp->_flags |= __SNPT;
115 INTUSE(_IO_wsetb) (fp, p, p + size, 1);
116 if (couldbetty && isatty (fp->_fileno))
117 fp
[all...]
H A Diofwrite_u.c34 fwrite_unlocked (buf, size, count, fp)
38 _IO_FILE *fp;
42 CHECK_FILE (fp, 0);
45 if (_IO_fwide (fp, -1) == -1)
47 written = _IO_sputn (fp, (const char *) buf, request);
H A Diofgetpos.c34 _IO_new_fgetpos (fp, posp)
35 _IO_FILE *fp;
40 CHECK_FILE (fp, EOF);
41 _IO_cleanup_region_start ((void (*) __P ((void *))) _IO_funlockfile, fp);
42 _IO_flockfile (fp);
43 pos = _IO_seekoff_unlocked (fp, 0, _IO_seek_cur, 0);
44 if (_IO_in_backup (fp))
46 if (fp->_mode <= 0)
47 pos -= fp->_IO_save_end - fp
[all...]
H A Diosetvbuf.c35 _IO_setvbuf (fp, buf, mode, size)
36 _IO_FILE *fp;
42 CHECK_FILE (fp, EOF);
43 _IO_cleanup_region_start ((void (*) (void *)) _IO_funlockfile, fp);
44 _IO_flockfile (fp);
48 fp->_IO_file_flags &= ~_IO_LINE_BUF|_IO_UNBUFFERED;
51 if (fp->_IO_buf_base == NULL)
66 if (_IO_DOALLOCATE (fp) < 0)
71 fp->_IO_file_flags &= ~_IO_LINE_BUF;
78 fp
[all...]
H A Diofwrite.c31 _IO_fwrite (buf, size, count, fp)
35 _IO_FILE *fp;
39 CHECK_FILE (fp, 0);
42 _IO_cleanup_region_start ((void (*) __P ((void *))) _IO_funlockfile, fp);
43 _IO_flockfile (fp);
44 if (fp->_vtable_offset != 0 || _IO_fwide (fp, -1) == -1)
45 written = _IO_sputn (fp, (const char *) buf, request);
46 _IO_funlockfile (fp);
H A Diofopen.c40 __fopen_maybe_mmap (fp)
41 _IO_FILE *fp;
44 if ((fp->_flags2 & _IO_FLAGS2_MMAP) && (fp->_flags & _IO_NO_WRITES))
51 if (fp->_mode <= 0)
52 _IO_JUMPS ((struct _IO_FILE_plus *) fp) = &_IO_file_jumps_maybe_mmap;
54 _IO_JUMPS ((struct _IO_FILE_plus *) fp) = &_IO_wfile_jumps_maybe_mmap;
55 fp->_wide_data->_wide_vtable = &_IO_wfile_jumps_maybe_mmap;
58 return fp;
70 struct _IO_FILE_plus fp; member in struct:locked_FILE
[all...]
H A Diogetdelim.c41 _IO_getdelim(char **lineptr, _IO_size_t *n, int delimiter, _IO_FILE *fp) argument
52 CHECK_FILE (fp, -1);
53 _IO_cleanup_region_start ((void (*) __P ((void *))) _IO_funlockfile, fp);
54 _IO_flockfile (fp);
55 if (_IO_ferror_unlocked (fp))
72 len = fp->_IO_read_end - fp->_IO_read_ptr;
75 if (__underflow (fp) == EOF)
80 len = fp->_IO_read_end - fp
[all...]
H A Diogetline.c34 _IO_getline (fp, buf, n, delim, extract_delim)
35 _IO_FILE *fp;
41 return INTUSE(_IO_getline_info) (fp, buf, n, delim, extract_delim,
55 _IO_getline_info (fp, buf, n, delim, extract_delim, eof)
56 _IO_FILE *fp;
66 if (__builtin_expect (fp->_mode, -1) == 0)
67 _IO_fwide (fp, -1);
70 _IO_ssize_t len = fp->_IO_read_end - fp->_IO_read_ptr;
73 int c = __uflow (fp);
[all...]
H A Diogetwline.c39 _IO_getwline (fp, buf, n, delim, extract_delim)
40 _IO_FILE *fp;
46 return _IO_getwline_info (fp, buf, n, delim, extract_delim, (wint_t *) 0);
58 _IO_getwline_info (fp, buf, n, delim, extract_delim, eof)
59 _IO_FILE *fp;
69 if (__builtin_expect (fp->_mode, 1) == 0)
70 _IO_fwide (fp, 1);
73 _IO_ssize_t len = (fp->_wide_data->_IO_read_end
74 - fp->_wide_data->_IO_read_ptr);
77 wint_t wc = __wuflow (fp);
[all...]
/haiku/src/system/libroot/os/arch/sparc/
H A Dfpu_implode.c79 * 2 bits (a la fpu_shr(), but we do not bother with fp->fp_sticky).
82 * Note that we may leave the value 2.0 in fp->fp_mant; it is the caller's
86 fpround(struct fpemu *fe, struct fpn *fp) argument
91 m0 = fp->fp_mant[0];
92 m1 = fp->fp_mant[1];
93 m2 = fp->fp_mant[2];
94 m3 = fp->fp_mant[3];
96 s = fp->fp_sticky;
120 if ((gr & 1) || fp->fp_sticky || (m3 & 1))
130 if (fp
[all...]
H A Dfpu_subr.c64 __fpu_shr(struct fpn *fp, int rsh) argument
70 if (rsh <= 0 || (fp->fp_class != FPC_NUM && !ISNAN(fp)))
74 m0 = fp->fp_mant[0];
75 m1 = fp->fp_mant[1];
76 m2 = fp->fp_mant[2];
77 m3 = fp->fp_mant[3];
85 fp->fp_mant[0] = 0;
86 fp->fp_mant[1] = 0;
87 fp
138 __fpu_norm(struct fpn *fp) argument
208 struct fpn *fp; local
[all...]
H A Dfpu_explode.c93 __fpu_itof(fp, i)
94 struct fpn *fp;
106 fp->fp_exp = FP_LG;
111 if (fp->fp_sign && (int)i < 0)
112 fp->fp_mant[0] = -i;
114 fp->fp_mant[0] = i;
115 fp->fp_mant[1] = 0;
116 fp->fp_mant[2] = 0;
117 fp->fp_mant[3] = 0;
118 __fpu_norm(fp);
[all...]
/haiku/src/system/libroot/posix/glibc/include/
H A Dstdio_ext.h8 # define __fsetlocking(fp, type) INTUSE(__fsetlocking) (fp, type)
/haiku/src/system/libroot/os/arch/arm64/
H A Dget_stack_frame.S9 mov x0, fp

Completed in 123 milliseconds

1234567