Home
last modified time | relevance | path

Searched refs:ofp (Results 1 – 25 of 32) sorted by relevance

12

/freebsd/usr.bin/csplit/
H A Dcsplit.c101 FILE *ofp; in main() local
196 ofp = newfile(); in main()
197 while ((p = get_line()) != NULL && fputs(p, ofp) != EOF) in main()
200 printf("%jd\n", (intmax_t)ftello(ofp)); in main()
201 if (fclose(ofp) != 0) in main()
295 toomuch(FILE *ofp, long n) in toomuch() argument
325 if (ftello(ofp) < (off_t)sizeof(buf)) in toomuch()
326 rewind(ofp); in toomuch()
328 fseeko(ofp, -(off_t)sizeof(buf), SEEK_CUR); in toomuch()
329 if (ferror(ofp)) in toomuch()
[all …]
/freebsd/usr.sbin/config/
H A Dmkmakefile.cc64 static void process_into_file(char *line, FILE *ofp);
66 static void dump_map(env_map &emap, FILE *ofp);
135 FILE *ifp, *ofp; in makefile() local
141 ofp = fopen(path("Makefile.new"), "w"); in makefile()
142 if (ofp == NULL) in makefile()
144 fprintf(ofp, "KERN_IDENT=%s\n", ident); in makefile()
145 fprintf(ofp, "MACHINE=%s\n", machinename); in makefile()
146 fprintf(ofp, "MACHINE_ARCH=%s\n", machinearch); in makefile()
148 fprintf(ofp, "%s=%s", op->op_name, op->op_value); in makefile()
150 fprintf(ofp, " %s", op->op_value); in makefile()
[all …]
/freebsd/contrib/mandoc/
H A Ddba_write.c40 static FILE *ofp; variable
46 ofp = fopen(fname, "w"); in dba_open()
47 return ofp == NULL ? -1 : 0; in dba_open()
53 return fclose(ofp) == EOF ? -1 : 0; in dba_close()
61 if ((pos = ftell(ofp)) == -1) in dba_tell()
73 if (fseek(ofp, pos, SEEK_SET) == -1) in dba_seek()
101 if (nmemb - fwrite(&out, sizeof(out[0]), nmemb, ofp)) in dba_skip()
109 if (putc(c, ofp) == EOF) in dba_char_write()
116 if (fputs(str, ofp) == EOF) in dba_str_write()
125 if (fwrite(&i, sizeof(i), 1, ofp) != 1) in dba_int_write()
/freebsd/usr.bin/uniq/
H A Duniq.c83 FILE *ifp, *ofp; in main() local
144 ofp = stdout; in main()
153 ofp = file(ofn = argv[1], "w"); in main()
156 if (caph_rights_limit(fileno(ofp), &rights) < 0) { in main()
165 if (caph_ioctls_limit(fileno(ofp), &cmd, 1) < 0) { in main()
184 show(ofp, prevline); in main()
203 fputc('\n', ofp); in main()
205 show(ofp, thisline); in main()
209 show(ofp, prevline); in main()
225 fputc('\n', ofp); in main()
307 show(FILE * ofp,const char * str) show() argument
[all...]
/freebsd/usr.bin/compress/
H A Dcompress.c187 FILE *ifp, *ofp; in compress() local
196 ifp = ofp = NULL; in compress()
208 if ((ofp = zopen(out, "w", bits)) == NULL) { in compress()
213 if (fwrite(buf, 1, nr, ofp) != nr) { in compress()
224 if (fclose(ofp)) { in compress()
228 ofp = NULL; in compress()
263 err: if (ofp) { in compress()
266 (void)fclose(ofp); in compress()
277 FILE *ifp, *ofp; in decompress() local
286 ifp = ofp = NULL; in decompress()
[all …]
/freebsd/usr.bin/patch/
H A Dpatch.c127 static FILE *ofp = NULL; /* output file pointer */ variable
355 if (ferror(ofp) || fclose(ofp)) { in main()
360 ofp = NULL; in main()
396 if (ofp) in main()
397 fclose(ofp); in main()
398 ofp = NULL; in main()
913 fputs(not_defined, ofp); in apply_hunk()
916 fputs(else_defined, ofp); in apply_hunk()
919 fputs(pfetch(old), ofp); in apply_hunk()
929 fputs(else_defined, ofp); in apply_hunk()
[all …]
/freebsd/contrib/nvi/ex/
H A Dex_filter.c41 FILE *ifp, *ofp; in ex_filter() local
77 ofp = NULL; in ex_filter()
89 if ((ofp = fdopen(output[0], "r")) == NULL) { in ex_filter()
102 if (ofp != NULL) in ex_filter()
103 (void)fclose(ofp); in ex_filter()
174 if (ex_readfp(sp, "filter", ofp, fm, &nread, 1)) in ex_filter()
242 if (filter_ldisplay(sp, ofp)) in ex_filter()
250 if (ex_readfp(sp, "filter", ofp, tm, &nread, 1)) in ex_filter()
/freebsd/sys/contrib/openzfs/cmd/zstream/
H A Dzstream_redup.c217 FILE *ofp = fdopen(infd, "r"); in zfs_redup_stream() local
218 long offset = ftell(ofp); in zfs_redup_stream()
221 while (sfread(drr, sizeof (*drr), ofp) != 0) { in zfs_redup_stream()
261 (void) sfread(buf, sz, ofp); in zfs_redup_stream()
294 (void) sfread(buf, payload_size, ofp); in zfs_redup_stream()
304 (void) sfread(buf, payload_size, ofp); in zfs_redup_stream()
350 (void) sfread(buf, payload_size, ofp); in zfs_redup_stream()
364 (void) sfread(buf, payload_size, ofp); in zfs_redup_stream()
381 if (feof(ofp)) { in zfs_redup_stream()
385 if (ferror(ofp)) { in zfs_redup_stream()
[all …]
/freebsd/cddl/contrib/opensolaris/common/ctf/
H A Dctf_types.c186 ctf_file_t *ofp = fp; in ctf_member_iter() local
202 return (ctf_set_errno(ofp, ECTF_NOTSOU)); in ctf_member_iter()
227 ctf_file_t *ofp = fp; in ctf_enum_iter() local
242 return (ctf_set_errno(ofp, ECTF_NOTENUM)); in ctf_enum_iter()
290 ctf_file_t *ofp = fp; in ctf_type_resolve() local
304 return (ctf_set_errno(ofp, ECTF_CORRUPT)); in ctf_type_resolve()
615 ctf_file_t *ofp = fp; in ctf_type_reference() local
633 return (ctf_set_errno(ofp, ECTF_NOTREF)); in ctf_type_reference()
647 ctf_file_t *ofp = fp; in ctf_type_pointer() local
657 return (ctf_set_errno(ofp, ECTF_NOTYPE)); in ctf_type_pointer()
[all …]
H A Dctf_open.c958 ctf_dup(ctf_file_t *ofp) in ctf_dup() argument
972 bcopy(&ofp->ctf_data, &ctfsect, sizeof (ctf_sect_t)); in ctf_dup()
975 (void) ctf_set_errno(ofp, ECTF_MMAP); in ctf_dup()
985 if (ofp->ctf_symtab.cts_data != NULL) { in ctf_dup()
986 bcopy(&ofp->ctf_symtab, &symsect, sizeof (ctf_sect_t)); in ctf_dup()
989 (void) ctf_set_errno(ofp, ECTF_MMAP); in ctf_dup()
1001 if (ofp->ctf_strtab.cts_data != NULL) { in ctf_dup()
1002 bcopy(&ofp->ctf_strtab, &strsect, sizeof (ctf_sect_t)); in ctf_dup()
1005 (void) ctf_set_errno(ofp, ECTF_MMAP); in ctf_dup()
1019 (void) ctf_set_errno(ofp, err); in ctf_dup()
H A Dctf_create.c275 ctf_file_t ofp, *nfp; in ctf_update() local
553 bcopy(fp, &ofp, sizeof (ctf_file_t)); in ctf_update()
555 bcopy(&ofp, nfp, sizeof (ctf_file_t)); in ctf_update()
/freebsd/contrib/ncurses/ncurses/tinfo/
H A Dmake_keys.c87 make_keys(FILE *ifp, FILE *ofp) in make_keys() argument
110 fprintf(ofp, "\t{ %4u, %-*.*s },\t/* %s */\n", in make_keys()
120 write_list(FILE *ofp, const char **list) in write_list() argument
123 fprintf(ofp, "%s\n", *list++); in write_list()
H A Dobsolete.c46 NCURSES_SP_NAME(_nc_set_buffer) (NCURSES_SP_DCLx FILE *ofp, int buffered) in NCURSES_EXPORT()
51 (void) ofp; in NCURSES_EXPORT()
57 _nc_set_buffer(FILE *ofp, int buffered) in _nc_set_buffer() argument
59 NCURSES_SP_NAME(_nc_set_buffer) (CURRENT_SCREEN, ofp, buffered); in _nc_set_buffer()
/freebsd/contrib/ncurses/ncurses/base/
H A Dlib_newterm.c174 FILE *ofp, in NCURSES_SP_NAME()
181 FILE *_ofp = ofp ? ofp : stdout; in NCURSES_SP_NAME()
189 (void *) ofp, in NCURSES_SP_NAME()
363 newterm(const char *name, FILE *ofp, FILE *ifp) in newterm() argument
370 rc = NCURSES_SP_NAME(newterm) (CURRENT_SCREEN_PRE, name, ofp, ifp); in newterm()
/freebsd/usr.sbin/ppp/
H A Dfilter.c243 struct filterent *ofp) in filter_Parse() argument
257 ofp->f_action = A_NONE; in filter_Parse()
258 ofp++; in filter_Parse()
263 ofp += ruleno; in filter_Parse()
286 ofp->f_action = A_NONE; in filter_Parse()
403 *ofp = fe; in filter_Parse()
/freebsd/sys/compat/linux/
H A Dlinux_socket.c2428 is_sendfile(struct file *fp, struct file *ofp) in is_sendfile() argument
2443 if (ofp->f_type != DTYPE_SOCKET) in is_sendfile()
2445 so = ofp->f_data; in is_sendfile()
2471 struct file *ofp; in sendfile_fallback() local
2488 error = fget_write(td, out, &cap_pwrite_rights, &ofp); in sendfile_fallback()
2491 seekable = (ofp->f_ops->fo_flags & DFLAG_SEEKABLE) != 0; in sendfile_fallback()
2493 if ((error = fo_seek(ofp, 0, SEEK_CUR, td)) != 0) in sendfile_fallback()
2529 error = fo_write(ofp, &auio, ofp->f_cred, flags, td); in sendfile_fallback()
2546 error = fo_seek(ofp, out_offset, SEEK_SET, td); in sendfile_fallback()
2549 fdrop(ofp, td); in sendfile_fallback()
[all …]
/freebsd/sys/contrib/openzfs/lib/libzfs/
H A Dlibzfs_diff.c444 FILE *ofp; in differ() local
447 if ((ofp = fdopen(di->outputfd, "w")) == NULL) { in differ()
475 err = write_free_diffs(ofp, di, &dr); in differ()
478 err = write_inuse_diffs(ofp, di, &dr); in differ()
489 (void) fclose(ofp); in differ()
/freebsd/cddl/contrib/opensolaris/lib/libdtrace/common/
H A Ddt_cc.c1850 FILE *ofp = tmpfile(); in dt_preproc() local
1869 if (argv == NULL || ofp == NULL) { in dt_preproc()
1895 (void) snprintf(opath, sizeof (opath), "/dev/fd/%d", fileno(ofp)); in dt_preproc()
1950 dup2(fileno(ofp), 1); in dt_preproc()
1982 (void) fflush(ofp); in dt_preproc()
1983 (void) fseek(ofp, 0, SEEK_SET); in dt_preproc()
1984 return (ofp); in dt_preproc()
1988 (void) fclose(ofp); in dt_preproc()
H A Ddt_subr.c1030 dtrace_set_outfp(const FILE *ofp) in dtrace_set_outfp() argument
1033 xo_set_file((FILE *)ofp); in dtrace_set_outfp()
H A Ddt_cg.c333 ctf_file_t *fp, *ofp; in dt_cg_field_set() local
347 if ((fp = dt_cg_membinfo(ofp = fp, type, in dt_cg_field_set()
349 yypcb->pcb_hdl->dt_ctferr = ctf_errno(ofp); in dt_cg_field_set()
/freebsd/contrib/ntp/ntpq/
H A Dntpq-subs.c394 FILE * ofp, in xprintf() argument
403 rc = vfprintf((ofp ? ofp : stderr), fmt, va); in xprintf()
411 FILE * ofp in xputs() argument
414 return fputs(str, (ofp ? ofp : stderr)); in xputs()
420 FILE * ofp in xputc() argument
423 return fputc(ch, (ofp ? ofp : stderr)); in xputc()
/freebsd/contrib/ncurses/ncurses/
H A Dllib-ltinfow1407 FILE *ofp,
1413 FILE *ofp,
H A Dllib-ltinfo1374 FILE *ofp,
1380 FILE *ofp,
H A Dllib-ltinfot1486 FILE *ofp,
1492 FILE *ofp,
H A Dllib-ltinfotw1519 FILE *ofp,
1525 FILE *ofp,

12