Home
last modified time | relevance | path

Searched refs:fp (Results 1 – 25 of 1476) sorted by relevance

12345678910>>...60

/openbsd-src/gnu/lib/libstdc++/libstdc++/libio/
H A Dgenops.c39 _IO_un_link (fp) in _IO_un_link() argument
40 struct _IO_FILE_plus *fp; in _IO_un_link()
42 if (fp->file._flags & _IO_LINKED)
50 if (*f == fp)
52 *f = (struct _IO_FILE_plus *) fp->file._chain;
59 fp->file._flags &= ~_IO_LINKED;
64 _IO_link_in (fp) in _IO_link_in() argument
65 struct _IO_FILE_plus *fp; in _IO_link_in()
67 if ((fp->file._flags & _IO_LINKED) == 0)
69 fp->file._flags |= _IO_LINKED;
[all …]
H A Dwgenops.c44 static int save_for_wbackup __P ((_IO_FILE *fp, wchar_t *end_p))
52 _IO_ssize_t _IO_least_wmarker __P ((_IO_FILE *fp, wchar_t *end_p));
55 _IO_least_wmarker (fp, end_p) in _IO_least_wmarker() argument
56 _IO_FILE *fp; in _IO_least_wmarker()
59 _IO_ssize_t least_so_far = end_p - fp->_wide_data->_IO_read_base;
61 for (mark = fp->_markers; mark != NULL; mark = mark->_next)
69 _IO_switch_to_main_wget_area (fp) in _IO_switch_to_main_wget_area() argument
70 _IO_FILE *fp; in _IO_switch_to_main_wget_area()
73 fp->_flags &= ~_IO_IN_BACKUP;
75 tmp = fp->_wide_data->_IO_read_end;
[all …]
H A Dwfileops.c57 _IO_wfile_setbuf (fp, p, len) in _IO_wfile_setbuf() argument
58 _IO_FILE *fp; in _IO_wfile_setbuf()
62 if (_IO_wdefault_setbuf (fp, p, len) == NULL)
65 fp->_wide_data->_IO_write_base = fp->_wide_data->_IO_write_ptr =
66 fp->_wide_data->_IO_write_end = fp->_wide_data->_IO_buf_base;
67 _IO_wsetg (fp, fp->_wide_data->_IO_buf_base, fp->_wide_data->_IO_buf_base,
68 fp->_wide_data->_IO_buf_base);
70 return fp;
77 _IO_wdo_write (fp, data, to_do) in _IO_wdo_write() argument
78 _IO_FILE *fp; in _IO_wdo_write()
[all …]
H A Dfileops.c129 _IO_new_file_init (fp) in _IO_new_file_init() argument
130 struct _IO_FILE_plus *fp; in _IO_new_file_init()
135 fp->file._offset = _IO_pos_BAD;
136 fp->file._IO_file_flags |= CLOSED_FILEBUF_FLAGS;
138 _IO_link_in (fp);
139 fp->file._fileno = -1;
143 _IO_new_file_close_it (fp) in _IO_new_file_close_it() argument
144 _IO_FILE *fp; in _IO_new_file_close_it()
147 if (!_IO_file_is_open (fp))
150 write_status = _IO_do_flush (fp);
[all …]
/openbsd-src/lib/libc/stdio/
H A Dfseek.c49 fseeko(FILE *fp, off_t offset, int whence) in fseeko() argument
64 if ((seekfn = fp->_seek) == NULL) { in fseeko()
73 FLOCKFILE(fp); in fseeko()
82 __sflush(fp); /* may adjust seek offset on append stream */ in fseeko()
83 if (fp->_flags & __SOFF) in fseeko()
84 curoff = fp->_offset; in fseeko()
86 curoff = (*seekfn)(fp->_cookie, (fpos_t)0, SEEK_CUR); in fseeko()
88 FUNLOCKFILE(fp); in fseeko()
92 if (fp->_flags & __SRD) { in fseeko()
93 curoff -= fp in fseeko()
249 fseek(FILE * fp,long offset,int whence) fseek() argument
[all...]
H A Dungetc.c47 __submore(FILE *fp) in __submore() argument
52 if (_UB(fp)._base == fp->_ubuf) { in __submore()
58 _UB(fp)._base = p; in __submore()
59 _UB(fp)._size = BUFSIZ; in __submore()
60 p += BUFSIZ - sizeof(fp->_ubuf); in __submore()
61 for (i = sizeof(fp->_ubuf); --i >= 0;) in __submore()
62 p[i] = fp->_ubuf[i]; in __submore()
63 fp->_p = p; in __submore()
66 i = _UB(fp)._size; in __submore()
67 p = reallocarray(_UB(fp)._base, i, 2); in __submore()
[all …]
H A Drefill.c40 lflush(FILE *fp) in lflush() argument
42 if ((fp->_flags & (__SLBF|__SWR)) == (__SLBF|__SWR)) in lflush()
43 return (__sflush_locked(fp)); /* ignored... */ in lflush()
52 __srefill(FILE *fp) in __srefill() argument
59 fp->_r = 0; /* largely a convenience for callers */ in __srefill()
62 if (fp->_flags & __SEOF) in __srefill()
66 if ((fp->_flags & __SRD) == 0) { in __srefill()
67 if ((fp->_flags & __SRW) == 0) { in __srefill()
69 fp->_flags |= __SERR; in __srefill()
73 if (fp->_flags & __SWR) { in __srefill()
[all …]
H A Dfreopen.c50 freopen(const char *file, const char *mode, FILE *fp) in freopen() argument
56 (void) fclose(fp); in freopen()
63 FLOCKFILE(fp); in freopen()
73 if (fp->_flags == 0) { in freopen()
74 fp->_flags = __SEOF; /* hold on to it */ in freopen()
79 if (fp->_flags & __SWR) in freopen()
80 (void) __sflush(fp); in freopen()
82 isopen = fp->_close != NULL; in freopen()
83 if ((wantfd = fp->_file) < 0 && isopen) { in freopen()
84 (void) (*fp in freopen()
[all...]
H A Dfgetln.c43 __slbexpand(FILE *fp, size_t newsize) in __slbexpand() argument
47 if (fp->_lb._size >= newsize) in __slbexpand()
49 if ((p = recallocarray(fp->_lb._base, fp->_lb._size, newsize, 1)) == NULL) in __slbexpand()
51 fp->_lb._base = p; in __slbexpand()
52 fp->_lb._size = newsize; in __slbexpand()
64 fgetln(FILE *fp, size_t *lenp) in fgetln() argument
71 FLOCKFILE(fp); in fgetln()
72 _SET_ORIENTATION(fp, -1); in fgetln()
75 if (fp->_r <= 0 && __srefill(fp)) in fgetln()
79 if ((p = memchr(fp->_p, '\n', fp->_r)) != NULL) { in fgetln()
[all …]
H A Dfvwrite.c49 __sfvwrite(FILE *fp, struct __suio *uio) in __sfvwrite() argument
61 if (cantwrite(fp)) in __sfvwrite()
65 #define COPY(n) (void)memcpy(fp->_p, p, n) in __sfvwrite()
78 if (fp->_flags & __SNBF) { in __sfvwrite()
85 w = (*fp->_write)(fp->_cookie, p, MIN(len, INT_MAX)); in __sfvwrite()
91 } else if ((fp->_flags & __SLBF) == 0) { in __sfvwrite()
106 if ((fp->_flags & (__SALC | __SSTR)) == in __sfvwrite()
107 (__SALC | __SSTR) && fp->_w < len) { in __sfvwrite()
108 size_t blen = fp->_p - fp->_bf._base; in __sfvwrite()
115 _base = recallocarray(fp->_bf._base, in __sfvwrite()
[all …]
H A Dfread.c43 fread(void *buf, size_t size, size_t count, FILE *fp) in fread() argument
56 fp->_flags |= __SERR; in fread()
65 FLOCKFILE(fp); in fread()
66 _SET_ORIENTATION(fp, -1); in fread()
67 if (fp->_r < 0) in fread()
68 fp->_r = 0; in fread()
77 if ((fp->_flags & __SNBF) != 0 && buf != NULL) { in fread()
80 fp->_bf._base = fp->_p = p; in fread()
81 fp->_bf._size = resid; in fread()
83 if (__srefill(fp)) { in fread()
[all …]
/openbsd-src/games/battlestar/
H A Dsave.c45 FILE *fp; in restore() local
49 if ((fp = fopen(filename, "r")) == NULL) in restore()
51 fread(&WEIGHT, sizeof WEIGHT, 1, fp); in restore()
52 fread(&CUMBER, sizeof CUMBER, 1, fp); in restore()
53 fread(&ourclock, sizeof ourclock, 1, fp); in restore()
54 fread(&tmp, sizeof tmp, 1, fp); in restore()
57 fread(location[n].link, sizeof location[n].link, 1, fp); in restore()
58 fread(location[n].objects, sizeof location[n].objects, 1, fp); in restore()
60 fread(inven, sizeof inven, 1, fp); in restore()
61 fread(wear, sizeof wear, 1, fp); in restore()
[all …]
/openbsd-src/gnu/usr.bin/gcc/gcc/testsuite/gcc.dg/format/
H A Dc99-scanf-1.c14 unsigned long int *ulp, float *fp, double *dp, long double *ldp, char *s, in foo() argument
33 ip, ip, uip, uip, uip, uip, fp, fp, fp, fp, fp, fp, fp, fp, in foo()
39 scanf ("%ha", fp); /* { dg-warning "length" "bad use of %h" } */ in foo()
40 scanf ("%hA", fp); /* { dg-warning "length" "bad use of %h" } */ in foo()
41 scanf ("%he", fp); /* { dg-warning "length" "bad use of %h" } */ in foo()
42 scanf ("%hE", fp); /* { dg-warning "length" "bad use of %h" } */ in foo()
43 scanf ("%hf", fp); /* { dg-warning "length" "bad use of %h" } */ in foo()
44 scanf ("%hF", fp); /* { dg-warning "length" "bad use of %h" } */ in foo()
45 scanf ("%hg", fp); /* { dg-warning "length" "bad use of %h" } */ in foo()
46 scanf ("%hG", fp); /* { dg-warning "length" "bad use of %h" } */ in foo()
[all …]
/openbsd-src/gnu/llvm/compiler-rt/lib/builtins/hexagon/
H A Dcommon_entry_exit_abi2.S42 memd(fp+#-48) = r27:26
43 memd(fp+#-40) = r25:24
46 memd(fp+#-32) = r23:22
47 memd(fp+#-24) = r21:20
50 memd(fp+#-16) = r19:18
51 memd(fp+#-8) = r17:16
58 memd(fp+#-40) = r25:24
59 memd(fp+#-32) = r23:22
62 memd(fp+#-24) = r21:20
63 memd(fp+#-16) = r19:18
[all …]
/openbsd-src/lib/libc/arch/sparc64/fpu/
H A Dfpu_explode.c87 __fpu_itof(fp, i) in __fpu_itof() argument
88 struct fpn *fp; in __fpu_itof()
100 fp->fp_exp = FP_LG;
101 fp->fp_mant[0] = (fp->fp_sign && (int)i < 0) ? -i : i;
102 fp->fp_mant[1] = 0;
103 fp->fp_mant[2] = 0;
104 fp->fp_mant[3] = 0;
105 __fpu_norm(fp);
113 __fpu_uitof(fp, i) in __fpu_uitof() argument
114 struct fpn *fp; in __fpu_uitof()
[all …]
H A Dfpu_implode.c81 fpround(struct fpemu *fe, struct fpn *fp) in fpround() argument
86 m0 = fp->fp_mant[0]; in fpround()
87 m1 = fp->fp_mant[1]; in fpround()
88 m2 = fp->fp_mant[2]; in fpround()
89 m3 = fp->fp_mant[3]; in fpround()
91 s = fp->fp_sticky; in fpround()
115 if ((gr & 1) || fp->fp_sticky || (m3 & 1)) in fpround()
125 if (fp->fp_sign) in fpround()
131 if (!fp->fp_sign) in fpround()
141 fp->fp_mant[0] = m0; in fpround()
[all …]
H A Dfpu_subr.c68 __fpu_shr(struct fpn *fp, int rsh) in __fpu_shr() argument
74 if (rsh <= 0 || (fp->fp_class != FPC_NUM && !ISNAN(fp))) in __fpu_shr()
78 m0 = fp->fp_mant[0]; in __fpu_shr()
79 m1 = fp->fp_mant[1]; in __fpu_shr()
80 m2 = fp->fp_mant[2]; in __fpu_shr()
81 m3 = fp->fp_mant[3]; in __fpu_shr()
89 fp->fp_mant[0] = 0; in __fpu_shr()
90 fp->fp_mant[1] = 0; in __fpu_shr()
91 fp->fp_mant[2] = 0; in __fpu_shr()
92 fp->fp_mant[3] = 0; in __fpu_shr()
[all …]
/openbsd-src/sys/arch/sparc64/fpu/
H A Dfpu_implode.c77 fpu_round(struct fpemu *fe, struct fpn *fp) in fpu_round() argument
82 m0 = fp->fp_mant[0]; in fpu_round()
83 m1 = fp->fp_mant[1]; in fpu_round()
84 m2 = fp->fp_mant[2]; in fpu_round()
85 m3 = fp->fp_mant[3]; in fpu_round()
87 s = fp->fp_sticky; in fpu_round()
112 if ((gr & 1) || fp->fp_sticky || (m3 & 1)) in fpu_round()
122 if (fp->fp_sign) in fpu_round()
128 if (!fp->fp_sign) in fpu_round()
138 fp->fp_mant[0] = m0; in fpu_round()
[all …]
H A Dfpu_subr.c68 fpu_shr(struct fpn *fp, int rsh) in fpu_shr() argument
74 if (rsh <= 0 || (fp->fp_class != FPC_NUM && !ISNAN(fp))) in fpu_shr()
78 m0 = fp->fp_mant[0]; in fpu_shr()
79 m1 = fp->fp_mant[1]; in fpu_shr()
80 m2 = fp->fp_mant[2]; in fpu_shr()
81 m3 = fp->fp_mant[3]; in fpu_shr()
89 fp->fp_mant[0] = 0; in fpu_shr()
90 fp->fp_mant[1] = 0; in fpu_shr()
91 fp->fp_mant[2] = 0; in fpu_shr()
92 fp->fp_mant[3] = 0; in fpu_shr()
[all …]
/openbsd-src/sys/arch/hppa/stand/libsa/
H A Dlif.c54 struct file *fp; local
66 fp = alloc(sizeof(*fp));
69 sizeof(fp->f_buf), &fp->f_buf, &buf_size)) ||
70 buf_size != sizeof(fp->f_buf)) {
75 } else if ((fp->f_lp = (struct lifvol *)fp->f_buf)->vol_id == LIF_VOL_ID) {
76 f->f_fsdata = fp;
77 fp->f_ld = (struct lifdir *)(fp->f_buf + LIF_DIRSTART);
78 fp->f_seek = 0;
79 fp->f_rd = fp->f_ld;
80 fp->f_nfiles = lifstob(fp->f_lp->vol_dirsize) /
[all …]
/openbsd-src/sys/arch/landisk/stand/xxboot/
H A Dufs12.c120 struct file *fp = (struct file *)f->f_fsdata; in read_inode() local
121 struct fs *fs = fp->f_fs; in read_inode()
140 if (fp->f_is2) { in read_inode()
144 fp->f_di.i2 = dp[ino_to_fsbo(fs, inumber)]; in read_inode()
149 fp->f_di.i1 = dp[ino_to_fsbo(fs, inumber)]; in read_inode()
159 fp->f_blkno[level] = -1; in read_inode()
160 fp->f_buf_blkno = -1; in read_inode()
161 fp->f_seekp = 0; in read_inode()
175 struct file *fp = (struct file *)f->f_fsdata;
176 struct fs *fs = fp->f_fs;
[all …]
/openbsd-src/gnu/usr.bin/binutils/gdb/gdbserver/
H A Di387-fp.c75 struct i387_fsave *fp = (struct i387_fsave *) buf; in i387_cache_to_fsave() local
81 collect_register (i + st0_regnum, ((char *) &fp->st_space[0]) + i * 10); in i387_cache_to_fsave()
83 collect_register_by_name ("fioff", &fp->fioff); in i387_cache_to_fsave()
84 collect_register_by_name ("fooff", &fp->fooff); in i387_cache_to_fsave()
88 fp->fop = (val2 & 0x7FF) | (fp->fop & 0xF800); in i387_cache_to_fsave()
92 *(unsigned short *) &fp->fctrl = val; in i387_cache_to_fsave()
96 *(unsigned short *) &fp->fstat = val; in i387_cache_to_fsave()
100 *(unsigned short *) &fp->ftag = val; in i387_cache_to_fsave()
104 *(unsigned short *) &fp->fiseg = val; in i387_cache_to_fsave()
108 *(unsigned short *) &fp->foseg = val; in i387_cache_to_fsave()
[all …]
/openbsd-src/gnu/usr.bin/binutils/gdb/rdi-share/
H A Ddevsw.c112 static void dumpPacket(FILE *fp, char *label, struct data_packet *p) in dumpPacket() argument
118 if (!fp) in dumpPacket()
121 fprintf(fp,"%s [T=%d L=%d] ",label,p->type,p->len); in dumpPacket()
123 fprintf(fp,"%02x ",p->data[i]); in dumpPacket()
124 fprintf(fp,"\n"); in dumpPacket()
130 fprintf(fp,"R=%08x ",r); in dumpPacket()
131 fprintf(fp,"%s ", r&0x80000000 ? "H<-T" : "H->T"); in dumpPacket()
135 case CI_PRIVATE: fprintf(fp,"CI_PRIVATE: "); break; in dumpPacket()
136 case CI_HADP: fprintf(fp,"CI_HADP: "); break; in dumpPacket()
137 case CI_TADP: fprintf(fp,"CI_TADP: "); break; in dumpPacket()
[all …]
/openbsd-src/sys/lib/libsa/
H A Dufs2.c113 struct file *fp = (struct file *)f->f_fsdata; in read_inode() local
114 struct fs *fs = fp->f_fs; in read_inode()
137 fp->f_di = dp[ino_to_fsbo(fs, inumber)]; in read_inode()
147 fp->f_blkno[level] = -1; in read_inode()
148 fp->f_buf_blkno = -1; in read_inode()
149 fp->f_seekp = 0; in read_inode()
162 struct file *fp = (struct file *)f->f_fsdata; in chmod_inode() local
163 struct fs *fs = fp->f_fs; in chmod_inode()
205 struct file *fp = (struct file *)f->f_fsdata; in block_map() local
207 struct fs *fs = fp->f_fs; in block_map()
[all …]
H A Dufs.c114 struct file *fp = (struct file *)f->f_fsdata; in read_inode() local
115 struct fs *fs = fp->f_fs; in read_inode()
139 fp->f_di = dp[ino_to_fsbo(fs, inumber)]; in read_inode()
149 fp->f_blkno[level] = -1; in read_inode()
150 fp->f_buf_blkno = -1; in read_inode()
151 fp->f_seekp = 0; in read_inode()
164 struct file *fp = (struct file *)f->f_fsdata; in chmod_inode() local
165 struct fs *fs = fp->f_fs; in chmod_inode()
209 struct file *fp = (struct file *)f->f_fsdata; in block_map() local
211 struct fs *fs = fp->f_fs; in block_map()
[all …]

12345678910>>...60