Home
last modified time | relevance | path

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

12345678910>>...80

/netbsd/src/external/bsd/ipf/dist/lib/
Dprintfr.c18 printfr(fp, iocfunc) in printfr() argument
19 struct frentry *fp; in printfr()
30 type = fp->fr_type & ~FR_T_BUILTIN;
32 if ((fp->fr_type & FR_T_BUILTIN) != 0)
35 if (fp->fr_collect != 0)
36 PRINTF("%u ", fp->fr_collect);
38 if (fp->fr_type == FR_T_CALLFUNC) {
40 } else if (fp->fr_func != NULL) {
42 if ((fp->fr_flags & FR_CALLNOW) != 0)
44 s = kvatoname(fp->fr_func, iocfunc);
[all …]
/netbsd/src/external/bsd/openldap/dist/contrib/slapd-modules/nssov/nss-pam-ldapd/
Dtio.c121 struct tio_fileinfo *fp; in tio_fdopen() local
122 fp = (struct tio_fileinfo *)malloc(sizeof(struct tio_fileinfo)); in tio_fdopen()
123 if (fp == NULL) in tio_fdopen()
125 fp->fd = fd; in tio_fdopen()
127 fp->readbuffer.buffer = (uint8_t *)malloc(initreadsize); in tio_fdopen()
128 if (fp->readbuffer.buffer == NULL) in tio_fdopen()
130 free(fp); in tio_fdopen()
133 fp->readbuffer.size = initreadsize; in tio_fdopen()
134 fp->readbuffer.maxsize = maxreadsize; in tio_fdopen()
135 fp->readbuffer.start = 0; in tio_fdopen()
[all …]
Dnslcd-prot.h86 #define WRITE(fp, ptr, size) \ argument
89 if (tio_write(fp, ptr, (size_t)size)) \
95 ERROR_OUT_WRITEERROR(fp); \
98 #define WRITE_INT32(fp, i) \ argument
101 WRITE(fp, &tmpint32, sizeof(int32_t))
103 #define WRITE_STRING(fp, str) \ argument
107 WRITE_INT32(fp, 0); \
111 WRITE_INT32(fp, strlen(str)); \
115 WRITE(fp, (str), tmpint32); \
119 #define WRITE_STRINGLIST(fp, arr) \ argument
[all …]
/netbsd/src/bin/sh/
Dshow.c260 TFILE *fp; in showtree() local
262 if ((fp = tracetfile) == NULL) in showtree()
265 trace_puts("showtree(", fp); in showtree()
267 trace_puts("NULL", fp); in showtree()
269 trace_puts("NEOF", fp); in showtree()
272 trace_puts(") called\n", fp); in showtree()
274 shtree(n, 1, 1, 1, fp); in showtree()
303 trlinelen(TFILE * fp) in trlinelen() argument
305 return fp->llen; in trlinelen()
309 shtree(union node *n, int ind, int ilvl, int nl, TFILE *fp) in shtree() argument
[all …]
/netbsd/src/lib/libc/stdio/
Dfseeko.c63 fseeko(FILE *fp, off_t offset, int whence) in __weak_alias()
71 _DIAGASSERT(fp != NULL); in __weak_alias()
77 FLOCKFILE(fp); in __weak_alias()
82 if ((seekfn = fp->_seek) == NULL) { in __weak_alias()
84 FUNLOCKFILE(fp); in __weak_alias()
100 (void)__sflush(fp); /* may adjust seek offset on append stream */ in __weak_alias()
101 if (fp->_flags & __SOFF) in __weak_alias()
102 curoff = fp->_offset; in __weak_alias()
104 curoff = (*seekfn)(fp->_cookie, (off_t)0, SEEK_CUR); in __weak_alias()
106 FUNLOCKFILE(fp); in __weak_alias()
[all …]
Dungetc.c59 __submore(FILE *fp) in __submore() argument
64 _DIAGASSERT(fp != NULL); in __submore()
66 if (_UB(fp)._base == fp->_ubuf) { in __submore()
72 _UB(fp)._base = p; in __submore()
73 _UB(fp)._size = BUFSIZ; in __submore()
74 p += BUFSIZ - sizeof(fp->_ubuf); in __submore()
75 for (i = sizeof(fp->_ubuf); --i >= 0;) in __submore()
76 p[i] = fp->_ubuf[i]; in __submore()
77 fp->_p = p; in __submore()
80 i = _UB(fp)._size; in __submore()
[all …]
Dflockfile.c59 flockfile(FILE *fp) in __weak_alias()
62 __flockfile_internal(fp, 0); in __weak_alias()
66 ftrylockfile(FILE *fp) in ftrylockfile() argument
74 mutex_lock(&_LOCK(fp)); in ftrylockfile()
76 if (_LOCKOWNER(fp) == thr_self()) { in ftrylockfile()
77 _LOCKCOUNT(fp)++; in ftrylockfile()
78 } else if (_LOCKOWNER(fp) == NULL) { in ftrylockfile()
79 _LOCKOWNER(fp) = thr_self(); in ftrylockfile()
80 _LOCKCOUNT(fp) = 1; in ftrylockfile()
84 mutex_unlock(&_LOCK(fp)); in ftrylockfile()
[all …]
Drefill.c56 lflush(FILE *fp) in lflush() argument
59 _DIAGASSERT(fp != NULL); in lflush()
61 if ((fp->_flags & (__SLBF|__SWR)) == (__SLBF|__SWR)) in lflush()
62 return __sflush(fp); in lflush()
71 __srefill(FILE *fp) in __srefill() argument
74 _DIAGASSERT(fp != NULL); in __srefill()
80 fp->_r = 0; /* largely a convenience for callers */ in __srefill()
83 if (fp->_flags & __SEOF) in __srefill()
87 if ((fp->_flags & __SRD) == 0) { in __srefill()
88 if ((fp->_flags & __SRW) == 0) { in __srefill()
[all …]
Dfreopen.c64 freopen(const char *file, const char *mode, FILE *fp) in freopen() argument
71 _DIAGASSERT(fp != NULL); in freopen()
74 (void) fclose(fp); in freopen()
89 if (fp->_flags == 0) { in freopen()
90 fp->_flags = __SEOF; /* hold on to it */ in freopen()
95 if (fp->_flags & __SWR) in freopen()
96 (void)__sflush(fp); in freopen()
98 isopen = fp->_close != NULL; in freopen()
99 if ((wantfd = __sfileno(fp)) == -1 && isopen) { in freopen()
100 (void) (*fp->_close)(fp->_cookie); in freopen()
[all …]
/netbsd/src/sys/arch/acorn32/stand/lib/
Driscoscalls.S36 stmfd sp!, {fp, ip, lr, pc}
37 sub fp, ip, #4
39 ldmdb fp, {fp, sp, pc}
43 stmfd sp!, {fp, ip, lr, pc}
44 sub fp, ip, #4
46 ldmdb fp, {fp, sp, pc}
50 stmfd sp!, {fp, ip, lr, pc}
51 sub fp, ip, #4
53 ldmdb fp, {fp, sp, pc}
57 stmfd sp!, {fp, ip, lr, pc}
[all …]
/netbsd/src/external/cddl/osnet/dist/common/ctf/
Dctf_open.c268 init_symtab(ctf_file_t *fp, const ctf_header_t *hp, in init_symtab() argument
272 uint_t *xp = fp->ctf_sxlate; in init_symtab()
273 uint_t *xend = xp + fp->ctf_nsyms; in init_symtab()
317 objtoff += fp->ctf_idwidth; in init_symtab()
328 info = *(uint_t *)((uintptr_t)fp->ctf_buf + funcoff); in init_symtab()
329 vlen = LCTF_INFO_VLEN(fp, info); in init_symtab()
336 if (LCTF_INFO_KIND(fp, info) == CTF_K_UNKNOWN && in init_symtab()
338 funcoff += fp->ctf_idwidth; /* skip pad */ in init_symtab()
340 funcoff += roundup2(fp->ctf_idwidth * (vlen + 2), 4); in init_symtab()
349 ctf_dprintf("loaded %lu symtab entries\n", fp->ctf_nsyms); in init_symtab()
[all …]
Dctf_create.c67 ctf_file_t *fp; in ctf_create() local
80 if ((fp = ctf_bufopen(&cts, NULL, NULL, errp)) == NULL) { in ctf_create()
85 fp->ctf_flags |= LCTF_RDWR; in ctf_create()
86 fp->ctf_dthashlen = hashlen; in ctf_create()
88 fp->ctf_dthash = hash; in ctf_create()
89 fp->ctf_dtstrlen = sizeof (_CTF_STRTAB_TEMPLATE); in ctf_create()
90 fp->ctf_dtnextid = 1; in ctf_create()
91 fp->ctf_dtoldid = 0; in ctf_create()
93 return (fp); in ctf_create()
97 ctf_copy_smembers(const ctf_file_t *fp, ctf_dtdef_t *dtd, uint_t soff, in ctf_copy_smembers() argument
[all …]
Dctf_lookup.c84 ctf_lookup_by_name(ctf_file_t *fp, const char *name) in ctf_lookup_by_name() argument
95 return (ctf_set_errno(fp, EINVAL)); in ctf_lookup_by_name()
117 ntype = fp->ctf_ptrtab[LCTF_TYPE_TO_INDEX(fp, type)]; in ctf_lookup_by_name()
119 ntype = ctf_type_resolve(fp, type); in ctf_lookup_by_name()
120 if (ntype == CTF_ERR || (ntype = fp->ctf_ptrtab[ in ctf_lookup_by_name()
121 LCTF_TYPE_TO_INDEX(fp, ntype)]) == 0) { in ctf_lookup_by_name()
122 (void) ctf_set_errno(fp, ECTF_NOTYPE); in ctf_lookup_by_name()
127 type = LCTF_INDEX_TO_TYPE(fp, ntype, in ctf_lookup_by_name()
128 (fp->ctf_flags & LCTF_CHILD)); in ctf_lookup_by_name()
137 for (lp = fp->ctf_lookups; lp->ctl_prefix != NULL; lp++) { in ctf_lookup_by_name()
[all …]
/netbsd/src/external/cddl/osnet/dist/lib/libnvpair/
Dnvpair_json.c23 #define FPRINTF(fp, ...) \ argument
25 if (fprintf(fp, __VA_ARGS__) < 0) \
46 nvlist_print_json_string(FILE *fp, const char *input) in nvlist_print_json_string() argument
54 FPRINTF(fp, "\""); in nvlist_print_json_string()
58 FPRINTF(fp, "\\\""); in nvlist_print_json_string()
61 FPRINTF(fp, "\\n"); in nvlist_print_json_string()
64 FPRINTF(fp, "\\r"); in nvlist_print_json_string()
67 FPRINTF(fp, "\\\\"); in nvlist_print_json_string()
70 FPRINTF(fp, "\\f"); in nvlist_print_json_string()
73 FPRINTF(fp, "\\t"); in nvlist_print_json_string()
[all …]
/netbsd/src/games/battlestar/
Dsave.c48 FILE *fp; in restore() local
52 if ((fp = fopen(filename, "r")) == 0) { in restore()
55 fread(&WEIGHT, sizeof WEIGHT, 1, fp); in restore()
56 fread(&CUMBER, sizeof CUMBER, 1, fp); in restore()
57 fread(&ourclock, sizeof ourclock, 1, fp); in restore()
58 fread(&tmp, sizeof tmp, 1, fp); in restore()
61 fread(location[n].link, sizeof location[n].link, 1, fp); in restore()
62 fread(location[n].objects, sizeof location[n].objects, 1, fp); in restore()
64 fread(inven, sizeof inven, 1, fp); in restore()
65 fread(wear, sizeof wear, 1, fp); in restore()
[all …]
/netbsd/src/games/rogue/
Dsave.c92 FILE *fp; in save_into_file() local
118 if (((fp = fopen(sfile, "w")) == NULL) || in save_into_file()
120 if (fp) in save_into_file()
121 fclose(fp); in save_into_file()
128 r_write(fp, &detect_monster, sizeof(detect_monster)); in save_into_file()
129 r_write(fp, &cur_level, sizeof(cur_level)); in save_into_file()
130 r_write(fp, &max_level, sizeof(max_level)); in save_into_file()
131 write_string(hunger_str, fp); in save_into_file()
132 write_string(login_name, fp); in save_into_file()
133 r_write(fp, &party_room, sizeof(party_room)); in save_into_file()
[all …]
/netbsd/src/usr.sbin/bootp/common/
Ddumptab.c52 FILE *fp; in dumptab() local
97 if ((fp = fopen(filename, "w")) == NULL) { in dumptab()
103 fprintf(fp, "\n# %s %s.%d\n", progname, VERSION, PATCHLEVEL); in dumptab()
104 fprintf(fp, "# %s: dump of bootp server database.\n", filename); in dumptab()
105 fprintf(fp, "# Dump taken %s", ctime(&t)); in dumptab()
106 fwrite(legend, 1, sizeof(legend) - 1, fp); in dumptab()
111 dump_host(fp, hp); in dumptab()
112 fprintf(fp, "\n"); in dumptab()
115 fclose(fp); in dumptab()
128 dump_host(FILE *fp, struct host *hp) in dump_host() argument
[all …]
/netbsd/src/games/fortune/fortune/
Dfortune.c255 display(FILEDESC *fp) in display() argument
259 open_fp(fp); in display()
260 (void) fseek(fp->inf, (long)Seekpts[0], SEEK_SET); in display()
261 for (Fort_len = 0; fgets(line, sizeof line, fp->inf) != NULL && in display()
262 !STR_ENDSTRING(line, fp->tbl); Fort_len++) { in display()
263 if (fp->tbl.str_flags & STR_ROTATED) in display()
449 FILEDESC *fp; in add_file() local
531 fp = new_fp(); in add_file()
532 fp->fd = fd; in add_file()
533 fp->percent = percent; in add_file()
[all …]
/netbsd/src/tests/lib/libc/stdio/
Dt_fmemopen.c131 FILE *fp; in ATF_TC_BODY() local
134 fp = fmemopen(&buf[0], sizeof(buf), *p); in ATF_TC_BODY()
139 ATF_CHECK(fp != NULL); in ATF_TC_BODY()
141 ATF_CHECK(fclose(fp) == 0); in ATF_TC_BODY()
159 FILE *fp; in ATF_TC_BODY() local
166 fp = fmemopen(NULL, BUFSIZ, *p); in ATF_TC_BODY()
167 ATF_CHECK(fp != NULL); in ATF_TC_BODY()
173 ATF_CHECK(ftello(fp) == (off_t)0); in ATF_TC_BODY()
175 ATF_CHECK(fclose(fp) == 0); in ATF_TC_BODY()
188 FILE *fp; in ATF_TC_BODY() local
[all …]
/netbsd/src/sys/arch/m68k/fpe/
Dfpu_implode.c61 static uint32_t fpu_ftoi(struct fpemu *fe, struct fpn *fp);
62 static uint32_t fpu_ftos(struct fpemu *fe, struct fpn *fp);
63 static uint32_t fpu_ftod(struct fpemu *fe, struct fpn *fp, uint32_t *);
64 static uint32_t fpu_ftox(struct fpemu *fe, struct fpn *fp, uint32_t *);
79 fpu_round(struct fpemu *fe, struct fpn *fp) in fpu_round() argument
84 m0 = fp->fp_mant[0]; in fpu_round()
85 m1 = fp->fp_mant[1]; in fpu_round()
86 m2 = fp->fp_mant[2]; in fpu_round()
88 s = fp->fp_sticky; in fpu_round()
112 if ((gr & 1) || fp->fp_sticky || (m2 & 1)) in fpu_round()
[all …]
/netbsd/src/sys/arch/sparc/fpu/
Dfpu_implode.c82 round(struct fpemu *fe, struct fpn *fp) in round() argument
87 m0 = fp->fp_mant[0]; in round()
88 m1 = fp->fp_mant[1]; in round()
89 m2 = fp->fp_mant[2]; in round()
90 m3 = fp->fp_mant[3]; in round()
92 s = fp->fp_sticky; in round()
117 if ((gr & 1) || fp->fp_sticky || (m3 & 1)) in round()
127 if (fp->fp_sign) in round()
133 if (!fp->fp_sign) in round()
143 fp->fp_mant[0] = m0; in round()
[all …]
/netbsd/src/sys/arch/ia64/stand/common/
Dfileload.c104 struct preloaded_file *fp; in command_unload() local
107 fp = preloaded_files; in command_unload()
109 file_discard(fp); in command_unload()
120 struct preloaded_file *fp; in command_lskern() local
129 for (fp = preloaded_files; fp; fp = fp->f_next) { in command_lskern()
131 (void *) fp->f_addr, fp->f_name, fp->f_type, (long) fp->f_size); in command_lskern()
133 if (fp->f_args != NULL) { in command_lskern()
135 pager_output(fp->f_args); in command_lskern()
149 struct preloaded_file *fp; in file_load() local
154 for (i = 0, fp = NULL; file_formats[i] && fp == NULL; i++) { in file_load()
[all …]
/netbsd/src/usr.bin/config/
Dmkioconf.c82 #define NEWLINE putc('\n', fp)
87 FILE *fp; in mkioconf() local
90 if ((fp = fopen("ioconf.c.tmp", "w")) == NULL) { in mkioconf()
95 fprintf(fp, "#include \"ioconf.h\"\n"); in mkioconf()
97 fprintf(fp, "#define IOCONF %s\n", ioconfname); in mkioconf()
99 emithdr(fp); in mkioconf()
100 emitcfdrivers(fp); in mkioconf()
101 emitexterns(fp); in mkioconf()
102 emitloc(fp); in mkioconf()
103 emitparents(fp); in mkioconf()
[all …]
/netbsd/src/external/bsd/byacc/dist/
Doutput.c11 #define CountLine(fp) (!rflag || ((fp) == code_file)) argument
40 putc_code(FILE * fp, int c) in putc_code() argument
42 if ((c == '\n') && (fp == code_file)) in putc_code()
44 putc(c, fp); in putc_code()
48 putl_code(FILE * fp, const char *s) in putl_code() argument
50 if (fp == code_file) in putl_code()
52 fputs(s, fp); in putl_code()
56 puts_code(FILE * fp, const char *s) in puts_code() argument
58 fputs(s, fp); in puts_code()
62 puts_param_types(FILE * fp, param *list, int more) in puts_param_types() argument
[all …]
/netbsd/src/external/bsd/am-utils/dist/amd/
Dops_nfs.c110 static int call_mountd(fh_cache *fp, u_long proc, fwd_fun f, wchan_t wchan);
111 static int webnfs_lookup(fh_cache *fp, fwd_fun f, wchan_t wchan);
153 fh_cache *fp, *fp2 = NULL; in find_nfs_fhandle_cache() local
156 ITER(fp, fh_cache, &fh_head) { in find_nfs_fhandle_cache()
157 if (fp->fh_id == id) { in find_nfs_fhandle_cache()
158 fp2 = fp; in find_nfs_fhandle_cache()
184 fh_cache *fp; in got_nfs_fh_mount() local
190 fp = find_nfs_fhandle_cache(arg, done); in got_nfs_fh_mount()
191 if (!fp) in got_nfs_fh_mount()
199 if (fp->fh_nfs_version == NFS_VERSION3) { in got_nfs_fh_mount()
[all …]

12345678910>>...80