Home
last modified time | relevance | path

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

12

/netbsd-src/sys/dev/hpc/
H A Dfontconv.c12 FILE *ofp; variable
22 ofp = stdout; in main()
46 fprintf(ofp, "static u_char %s%dx%d_data[] = {\n", in fc_rasops()
64 fprintf(ofp, " /* code %d */\n", code); in fc_rasops()
67 fprintf(ofp, " "); in fc_rasops()
70 fprintf(ofp, "0x%02x,", (buf[k] & 0xff)); in fc_rasops()
73 fprintf(ofp, " /* "); in fc_rasops()
77 fprintf(ofp, " */\n"); in fc_rasops()
79 fprintf(ofp, "\n"); in fc_rasops()
88 fprintf(ofp, "};\n"); in fc_rasops()
[all …]
/netbsd-src/usr.bin/csplit/
H A Dcsplit.c108 FILE *ofp; in main() local
203 ofp = newfile(); in main()
204 while ((p = get_line()) != NULL && fputs(p, ofp) != EOF) in main()
207 (void)printf("%jd\n", (intmax_t)ftello(ofp)); in main()
208 if (fclose(ofp) != 0) in main()
307 toomuch(FILE *ofp, long n) in toomuch() argument
337 if (ftello(ofp) < (off_t)sizeof(buf)) in toomuch()
338 rewind(ofp); in toomuch()
340 (void)fseeko(ofp, -(off_t)sizeof(buf), SEEK_CUR); in toomuch()
341 if (ferror(ofp)) in toomuch()
[all …]
/netbsd-src/external/gpl3/binutils/dist/gprof/
H A Dgmon_io.c159 gmon_io_write_32 (FILE *ofp, unsigned int val) in gmon_io_write_32() argument
164 if (fwrite (buf, 1, 4, ofp) != 4) in gmon_io_write_32()
170 gmon_io_write_64 (FILE *ofp, uint64_t val) in gmon_io_write_64() argument
175 if (fwrite (buf, 1, 8, ofp) != 8) in gmon_io_write_64()
181 gmon_io_write_vma (FILE *ofp, bfd_vma val) in gmon_io_write_vma() argument
187 if (gmon_io_write_32 (ofp, (unsigned int) val)) in gmon_io_write_vma()
192 if (gmon_io_write_64 (ofp, (uint64_t) val)) in gmon_io_write_vma()
200 gmon_io_write_8 (FILE *ofp, unsigned int val) in gmon_io_write_8() argument
205 if (fwrite (buf, 1, 1, ofp) != 1) in gmon_io_write_8()
211 gmon_io_write (FILE *ofp, char *buf, size_t n) in gmon_io_write() argument
[all …]
H A Dsource.c102 FILE *ifp, *ofp; in annotate_source() local
175 ofp = stdout; in annotate_source()
219 ofp = fopen (fname, "w"); in annotate_source()
221 if (!ofp) in annotate_source()
232 if (ofp == stdout) in annotate_source()
237 fputc ('\n', ofp); in annotate_source()
242 fprintf (ofp, "\f\n"); in annotate_source()
244 fprintf (ofp, _("*** File %s:\n"), sf->name); in annotate_source()
258 fputs (annotation, ofp); in annotate_source()
263 fputc (buf[i], ofp); in annotate_source()
[all …]
H A Dbasic_blocks.c208 bb_write_blocks (FILE *ofp, const char *filename) in bb_write_blocks() argument
223 if (gmon_io_write_8 (ofp, GMON_TAG_BB_COUNT) in bb_write_blocks()
224 || gmon_io_write_32 (ofp, nblocks)) in bb_write_blocks()
235 if (gmon_io_write_vma (ofp, sym->bb_addr[i]) in bb_write_blocks()
236 || gmon_io_write_vma (ofp, (bfd_vma) sym->bb_calls[i])) in bb_write_blocks()
463 FILE *ofp; in print_annotated_source() local
533 ofp = annotate_source (sf, 16, annotate_with_count, sf); in print_annotated_source()
534 if (!ofp) in print_annotated_source()
539 fprintf (ofp, _("\n\nTop %d Lines:\n\n Line Count\n\n"), in print_annotated_source()
556 fprintf (ofp, "%9d %10lu\n", sym->line_num, sym->ncalls); in print_annotated_source()
[all …]
H A Dcall_graph.c107 cg_write_arcs (FILE *ofp, const char *filename) in cg_write_arcs() argument
116 if (gmon_io_write_8 (ofp, GMON_TAG_CG_ARC) in cg_write_arcs()
117 || gmon_io_write_vma (ofp, arc->parent->addr) in cg_write_arcs()
118 || gmon_io_write_vma (ofp, arc->child->addr) in cg_write_arcs()
119 || gmon_io_write_32 (ofp, arc->count)) in cg_write_arcs()
H A Dhist.c248 hist_write_hist (FILE * ofp, const char *filename) in hist_write_hist() argument
259 if (gmon_io_write_8 (ofp, GMON_TAG_TIME_HIST) in hist_write_hist()
260 || gmon_io_write_vma (ofp, record->lowpc) in hist_write_hist()
261 || gmon_io_write_vma (ofp, record->highpc) in hist_write_hist()
262 || gmon_io_write_32 (ofp, record->num_bins) in hist_write_hist()
263 || gmon_io_write_32 (ofp, hz) in hist_write_hist()
264 || gmon_io_write (ofp, hist_dimension, 15) in hist_write_hist()
265 || gmon_io_write (ofp, &hist_dimension_abbrev, 1)) in hist_write_hist()
275 if (fwrite (&count[0], sizeof (count), 1, ofp) != 1) in hist_write_hist()
/netbsd-src/external/gpl3/binutils.old/dist/gprof/
H A Dgmon_io.c159 gmon_io_write_32 (FILE *ofp, unsigned int val) in gmon_io_write_32() argument
164 if (fwrite (buf, 1, 4, ofp) != 4) in gmon_io_write_32()
170 gmon_io_write_64 (FILE *ofp, uint64_t val) in gmon_io_write_64() argument
175 if (fwrite (buf, 1, 8, ofp) != 8) in gmon_io_write_64()
181 gmon_io_write_vma (FILE *ofp, bfd_vma val) in gmon_io_write_vma() argument
187 if (gmon_io_write_32 (ofp, (unsigned int) val)) in gmon_io_write_vma()
192 if (gmon_io_write_64 (ofp, (uint64_t) val)) in gmon_io_write_vma()
200 gmon_io_write_8 (FILE *ofp, unsigned int val) in gmon_io_write_8() argument
205 if (fwrite (buf, 1, 1, ofp) != 1) in gmon_io_write_8()
211 gmon_io_write (FILE *ofp, char *buf, size_t n) in gmon_io_write() argument
[all …]
H A Dsource.c102 FILE *ifp, *ofp; in annotate_source() local
175 ofp = stdout; in annotate_source()
219 ofp = fopen (fname, "w"); in annotate_source()
221 if (!ofp) in annotate_source()
232 if (ofp == stdout) in annotate_source()
237 fputc ('\n', ofp); in annotate_source()
242 fprintf (ofp, "\f\n"); in annotate_source()
244 fprintf (ofp, _("*** File %s:\n"), sf->name); in annotate_source()
258 fputs (annotation, ofp); in annotate_source()
263 fputc (buf[i], ofp); in annotate_source()
[all …]
H A Dbasic_blocks.c208 bb_write_blocks (FILE *ofp, const char *filename) in bb_write_blocks() argument
223 if (gmon_io_write_8 (ofp, GMON_TAG_BB_COUNT) in bb_write_blocks()
224 || gmon_io_write_32 (ofp, nblocks)) in bb_write_blocks()
235 if (gmon_io_write_vma (ofp, sym->bb_addr[i]) in bb_write_blocks()
236 || gmon_io_write_vma (ofp, (bfd_vma) sym->bb_calls[i])) in bb_write_blocks()
467 FILE *ofp; in print_annotated_source() local
537 ofp = annotate_source (sf, 16, annotate_with_count, sf); in print_annotated_source()
538 if (!ofp) in print_annotated_source()
543 fprintf (ofp, _("\n\nTop %d Lines:\n\n Line Count\n\n"), in print_annotated_source()
560 fprintf (ofp, "%9d %10lu\n", sym->line_num, sym->ncalls); in print_annotated_source()
[all …]
H A Dcall_graph.c107 cg_write_arcs (FILE *ofp, const char *filename) in cg_write_arcs() argument
116 if (gmon_io_write_8 (ofp, GMON_TAG_CG_ARC) in cg_write_arcs()
117 || gmon_io_write_vma (ofp, arc->parent->addr) in cg_write_arcs()
118 || gmon_io_write_vma (ofp, arc->child->addr) in cg_write_arcs()
119 || gmon_io_write_32 (ofp, arc->count)) in cg_write_arcs()
H A Dhist.c248 hist_write_hist (FILE * ofp, const char *filename) in hist_write_hist() argument
259 if (gmon_io_write_8 (ofp, GMON_TAG_TIME_HIST) in hist_write_hist()
260 || gmon_io_write_vma (ofp, record->lowpc) in hist_write_hist()
261 || gmon_io_write_vma (ofp, record->highpc) in hist_write_hist()
262 || gmon_io_write_32 (ofp, record->num_bins) in hist_write_hist()
263 || gmon_io_write_32 (ofp, hz) in hist_write_hist()
264 || gmon_io_write (ofp, hist_dimension, 15) in hist_write_hist()
265 || gmon_io_write (ofp, &hist_dimension_abbrev, 1)) in hist_write_hist()
275 if (fwrite (&count[0], sizeof (count), 1, ofp) != 1) in hist_write_hist()
/netbsd-src/external/gpl3/binutils/dist/libctf/
H A Dctf-types.c102 ctf_dict_t *ofp = fp; in ctf_member_next() local
122 return ctf_set_errno (ofp, ENOMEM); in ctf_member_next()
123 i->cu.ctn_fp = ofp; in ctf_member_next()
132 return (ctf_set_errno (ofp, ECTF_NOTSOU)); in ctf_member_next()
153 return (ctf_set_errno (ofp, ECTF_NEXT_WRONGFUN)); in ctf_member_next()
155 if (ofp != i->cu.ctn_fp) in ctf_member_next()
156 return (ctf_set_errno (ofp, ECTF_NEXT_WRONGFP)); in ctf_member_next()
159 if ((fp = ctf_get_dict (ofp, type)) == NULL) in ctf_member_next()
160 return (ctf_set_errno (ofp, ECTF_NOPARENT)); in ctf_member_next()
180 return (ctf_set_errno (ofp, ctf_errno (fp))); in ctf_member_next()
[all …]
H A Dctf-create.c718 ctf_dict_t *ofp = fp; in ctf_set_array() local
725 if (!(ofp->ctf_flags & LCTF_RDWR)) in ctf_set_array()
726 return (ctf_set_errno (ofp, ECTF_RDONLY)); in ctf_set_array()
729 return (ctf_set_errno (ofp, ECTF_RDONLY)); in ctf_set_array()
733 return (ctf_set_errno (ofp, ECTF_BADID)); in ctf_set_array()
1053 ctf_dict_t *ofp = fp; in ctf_add_enumerator() local
1067 if (!(ofp->ctf_flags & LCTF_RDWR)) in ctf_add_enumerator()
1068 return (ctf_set_errno (ofp, ECTF_RDONLY)); in ctf_add_enumerator()
1071 return (ctf_set_errno (ofp, ECTF_RDONLY)); in ctf_add_enumerator()
1074 return (ctf_set_errno (ofp, ECTF_BADID)); in ctf_add_enumerator()
[all …]
/netbsd-src/external/bsd/mdocml/dist/
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()
/netbsd-src/external/gpl3/binutils.old/dist/libctf/
H A Dctf-types.c102 ctf_dict_t *ofp = fp; in ctf_member_next() local
122 return ctf_set_errno (ofp, ENOMEM); in ctf_member_next()
123 i->cu.ctn_fp = ofp; in ctf_member_next()
132 return (ctf_set_errno (ofp, ECTF_NOTSOU)); in ctf_member_next()
153 return (ctf_set_errno (ofp, ECTF_NEXT_WRONGFUN)); in ctf_member_next()
155 if (ofp != i->cu.ctn_fp) in ctf_member_next()
156 return (ctf_set_errno (ofp, ECTF_NEXT_WRONGFP)); in ctf_member_next()
159 if ((fp = ctf_get_dict (ofp, type)) == NULL) in ctf_member_next()
160 return (ctf_set_errno (ofp, ECTF_NOPARENT)); in ctf_member_next()
235 return ctf_set_errno (ofp, ECTF_NEXT_END); in ctf_member_next()
[all …]
/netbsd-src/usr.bin/compress/
H A Dcompress.c205 FILE *ifp, *ofp; in compress() local
217 ifp = ofp = NULL; in compress()
235 if ((ofp = zopen(out, "w", bits)) == NULL) { in compress()
241 if (fwrite(buf, 1, nr, ofp) != nr) { in compress()
251 if (fclose(ofp)) in compress()
255 ofp = NULL; in compress()
290 err: if (ofp) in compress()
291 (void)fclose(ofp); in compress()
303 FILE *ifp, *ofp; in decompress() local
315 ifp = ofp = NULL; in decompress()
[all …]
/netbsd-src/usr.bin/patch/
H A Dpatch.c132 static FILE *ofp = NULL; /* output file pointer */ variable
313 if (ferror(ofp) || fclose(ofp)) { in main()
318 ofp = NULL; in main()
354 if (ofp) in main()
355 fclose(ofp); in main()
356 ofp = NULL; in main()
855 fputs(not_defined, ofp); in apply_hunk()
858 fputs(else_defined, ofp); in apply_hunk()
861 fputs(pfetch(old), ofp); in apply_hunk()
871 fputs(else_defined, ofp); in apply_hunk()
[all …]
/netbsd-src/usr.sbin/crash/
H A Dcrash.c73 static FILE *ofp; variable
100 if (ofp != stdout) { in cleanup()
101 (void)fflush(ofp); in cleanup()
102 (void)pclose(ofp); in cleanup()
103 ofp = stdout; in cleanup()
259 if (ofp != stdout) { in db_readline()
260 (void)fflush(ofp); in db_readline()
261 (void)pclose(ofp); in db_readline()
262 ofp = stdout; in db_readline()
289 assert(ofp in db_readline()
[all...]
/netbsd-src/usr.bin/uniq/
H A Duniq.c69 FILE *ifp, *ofp; in main() local
76 ifp = ofp = NULL; in main()
111 ofp = stdout; in main()
115 ofp = stdout; in main()
119 ofp = file(argv[1], "w"); in main()
164 show(ofp, prevline); in main()
177 show(ofp, prevline); in main()
189 show(FILE *ofp, const char *str) in show() argument
195 (void)fprintf(ofp, "%4d %s", repeats + 1, str); in show()
197 (void)fprintf(ofp, "%s", str); in show()
/netbsd-src/external/cddl/osnet/dist/common/ctf/
H A Dctf_types.c63 ctf_file_t *ofp = fp; in ctf_member_iter() local
79 return (ctf_set_errno(ofp, ECTF_NOTSOU)); in ctf_member_iter()
114 ctf_file_t *ofp = fp; in ctf_enum_iter() local
128 return (ctf_set_errno(ofp, ECTF_NOTENUM)); in ctf_enum_iter()
174 ctf_file_t *ofp = fp; in ctf_type_resolve() local
186 return (ctf_set_errno(ofp, ECTF_CORRUPT)); in ctf_type_resolve()
478 ctf_file_t *ofp = fp; in ctf_type_reference() local
492 return (ctf_set_errno(ofp, ECTF_NOTREF)); in ctf_type_reference()
506 ctf_file_t *ofp = fp; in ctf_type_pointer() local
516 return (ctf_set_errno(ofp, ECTF_NOTYPE)); in ctf_type_pointer()
[all …]
/netbsd-src/external/bsd/nvi/dist/ex/
H A Dex_filter.c101 FILE *ifp, *ofp; in ex_filter() local
136 ofp = NULL; in ex_filter()
148 if ((ofp = fdopen(output[0], "r")) == NULL) { in ex_filter()
180 if (ex_readfp(sp, "filter", ofp, fm, &nread, 1)) in ex_filter()
248 if (filter_ldisplay(sp, ofp)) in ex_filter()
256 if (ex_readfp(sp, "filter", ofp, tm, &nread, 1)) in ex_filter()
297 if (ofp != NULL) in ex_filter()
298 (void)fclose(ofp); in ex_filter()
/netbsd-src/usr.bin/config/
H A Dmkmakefile.c89 FILE *ifp, *ofp; in mkmakefile() local
134 if ((ofp = fopen("Makefile.tmp", "w")) == NULL) { in mkmakefile()
139 emitdefs(ofp); in mkmakefile()
145 fputs(line, ofp); in mkmakefile()
175 emitsubs(ofp, line, ifname, lineno); in mkmakefile()
178 (*fn)(ofp); in mkmakefile()
181 fflush(ofp); in mkmakefile()
182 if (ferror(ofp)) in mkmakefile()
190 if (fclose(ofp)) { in mkmakefile()
191 ofp in mkmakefile()
[all...]
/netbsd-src/usr.bin/utoppya/
H A Dutoppya.c348 FILE *ofp, *to; in cmd_get() local
393 ofp = stdout; in cmd_get()
412 if ((ofp = fopen(dst, reget ? "a" : "w")) == NULL) in cmd_get()
439 rv = fwrite(buf, 1, l, ofp); in cmd_get()
442 if (ofp != stdout) in cmd_get()
443 fclose(ofp); in cmd_get()
453 if (ofp != stdout) in cmd_get()
454 fclose(ofp); in cmd_get()
/netbsd-src/tests/lib/libc/stdio/
H A Dh_intr.c130 FILE *ifp, *ofp; in process() local
153 if ((ofp = popen(opts.cmd, "w")) == NULL) { in process()
158 setvbuf(ofp, NULL, opts.btype, opts.asize); in process()
168 setvbuf(ofp, r ? abuf : NULL, in process()
174 if ((i = wr_fn(ofp, buf, n)) == -1) { in process()
181 if (fflush(ofp)) in process()
192 if (pclose(ofp) != 0) in process()

12