| /netbsd-src/external/bsd/ipf/dist/lib/ |
| H A D | printfr.c | 18 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/ |
| H A D | tio.c | 121 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 …]
|
| /netbsd-src/external/gpl3/binutils/dist/libctf/ |
| H A D | ctf-open.c | 77 get_ctt_size_common (const ctf_dict_t *fp _libctf_unused_, in get_ctt_size_common() 105 get_ctt_size_v1 (const ctf_dict_t *fp, const ctf_type_t *tp, in get_ctt_size_v1() argument 110 return (get_ctt_size_common (fp, tp, sizep, incrementp, in get_ctt_size_v1() 119 get_ctt_size_v2_unconverted (const ctf_dict_t *fp, const ctf_type_t *tp, in get_ctt_size_v2_unconverted() argument 124 return (get_ctt_size_common (fp, tp, sizep, incrementp, in get_ctt_size_v2_unconverted() 131 get_ctt_size_v2 (const ctf_dict_t *fp, const ctf_type_t *tp, in get_ctt_size_v2() argument 134 return (get_ctt_size_common (fp, tp, sizep, incrementp, in get_ctt_size_v2() 141 get_vbytes_common (ctf_dict_t *fp, unsigned short kind, in get_vbytes_common() argument 162 ctf_set_errno (fp, ECTF_CORRUPT); in get_vbytes_common() 163 ctf_err_warn (fp, 0, 0, _("detected invalid CTF kind: %x"), kind); in get_vbytes_common() [all …]
|
| H A D | ctf-lookup.c | 27 grow_pptrtab (ctf_dict_t *fp, size_t new_len) in grow_pptrtab() argument 31 if ((new_pptrtab = realloc (fp->ctf_pptrtab, sizeof (uint32_t) in grow_pptrtab() 33 return (ctf_set_errno (fp, ENOMEM)); in grow_pptrtab() 35 fp->ctf_pptrtab = new_pptrtab; in grow_pptrtab() 37 memset (fp->ctf_pptrtab + fp->ctf_pptrtab_len, 0, in grow_pptrtab() 38 sizeof (uint32_t) * (new_len - fp->ctf_pptrtab_len)); in grow_pptrtab() 40 fp->ctf_pptrtab_len = new_len; in grow_pptrtab() 47 refresh_pptrtab (ctf_dict_t *fp, ctf_dict_t *pfp) in refresh_pptrtab() argument 50 for (i = fp->ctf_pptrtab_typemax; i <= fp->ctf_typemax; i++) in refresh_pptrtab() 52 ctf_id_t type = LCTF_INDEX_TO_TYPE (fp, i, 1); in refresh_pptrtab() [all …]
|
| H A D | ctf-link.c | 44 ctf_link_input_name (ctf_dict_t *fp) in ctf_link_input_name() argument 46 if (fp->ctf_parent && fp->ctf_parent->ctf_cuname) in ctf_link_input_name() 47 return fp->ctf_parent->ctf_cuname; in ctf_link_input_name() 48 else if (fp->ctf_cuname) in ctf_link_input_name() 49 return fp->ctf_cuname; in ctf_link_input_name() 57 ctf_unnamed_cuname (ctf_dict_t *fp) in ctf_unnamed_cuname() argument 59 const char *cuname = ctf_cuname (fp); in ctf_unnamed_cuname() 94 ctf_link_add_ctf_internal (ctf_dict_t *fp, ctf_archive_t *ctf, in ctf_link_add_ctf_internal() argument 105 if ((input = ctf_dynhash_lookup (fp->ctf_link_inputs, name)) != NULL) in ctf_link_add_ctf_internal() 122 input->n = ctf_dynhash_elements (fp->ctf_link_inputs); in ctf_link_add_ctf_internal() [all …]
|
| H A D | ctf-serialize.c | 93 symtypetab_density (ctf_dict_t *fp, ctf_dict_t *symfp, ctf_dynhash_t *symhash, in symtypetab_density() argument 126 return (ctf_set_errno (fp, ENOMEM)); in symtypetab_density() 144 if (!ctf_assert (fp, !sym->st_nameidx_set)) in symtypetab_density() 150 return (ctf_set_errno (fp, ENOMEM)); in symtypetab_density() 155 ctf_err_warn (fp, 0, err, _("iterating over linker-known symbols during " in symtypetab_density() 158 return (ctf_set_errno (fp, err)); in symtypetab_density() 184 ctf_err_warn (fp, 1, 0, _("symbol %s (%x) added to CTF as a " in symtypetab_density() 195 ctf_err_warn (fp, 1, 0, _("symbol %s (%x) added to CTF as a " in symtypetab_density() 219 ctf_err_warn (fp, 0, err, _("iterating over CTF symtypetab during " in symtypetab_density() 222 return (ctf_set_errno (fp, err)); in symtypetab_density() [all …]
|
| H A D | ctf-create.c | 45 ctf_grow_ptrtab (ctf_dict_t *fp) in ctf_grow_ptrtab() argument 47 size_t new_ptrtab_len = fp->ctf_ptrtab_len; in ctf_grow_ptrtab() 52 if (fp->ctf_ptrtab == NULL) in ctf_grow_ptrtab() 54 else if ((fp->ctf_typemax + 2) > fp->ctf_ptrtab_len) in ctf_grow_ptrtab() 55 new_ptrtab_len = fp->ctf_ptrtab_len * 1.25; in ctf_grow_ptrtab() 57 if (new_ptrtab_len != fp->ctf_ptrtab_len) in ctf_grow_ptrtab() 61 if ((new_ptrtab = realloc (fp->ctf_ptrtab, in ctf_grow_ptrtab() 63 return (ctf_set_errno (fp, ENOMEM)); in ctf_grow_ptrtab() 65 fp->ctf_ptrtab = new_ptrtab; in ctf_grow_ptrtab() 66 memset (fp->ctf_ptrtab + fp->ctf_ptrtab_len, 0, in ctf_grow_ptrtab() [all …]
|
| /netbsd-src/external/gpl3/binutils.old/dist/libctf/ |
| H A D | ctf-open.c | 77 get_ctt_size_common (const ctf_dict_t *fp _libctf_unused_, in get_ctt_size_common() 105 get_ctt_size_v1 (const ctf_dict_t *fp, const ctf_type_t *tp, in get_ctt_size_v1() argument 110 return (get_ctt_size_common (fp, tp, sizep, incrementp, in get_ctt_size_v1() 119 get_ctt_size_v2_unconverted (const ctf_dict_t *fp, const ctf_type_t *tp, in get_ctt_size_v2_unconverted() argument 124 return (get_ctt_size_common (fp, tp, sizep, incrementp, in get_ctt_size_v2_unconverted() 131 get_ctt_size_v2 (const ctf_dict_t *fp, const ctf_type_t *tp, in get_ctt_size_v2() argument 134 return (get_ctt_size_common (fp, tp, sizep, incrementp, in get_ctt_size_v2() 141 get_vbytes_common (ctf_dict_t *fp, unsigned short kind, in get_vbytes_common() argument 162 ctf_set_errno (fp, ECTF_CORRUPT); in get_vbytes_common() 163 ctf_err_warn (fp, 0, 0, _("detected invalid CTF kind: %x"), kind); in get_vbytes_common() [all …]
|
| H A D | ctf-lookup.c | 27 grow_pptrtab (ctf_dict_t *fp, size_t new_len) in grow_pptrtab() argument 31 if ((new_pptrtab = realloc (fp->ctf_pptrtab, sizeof (uint32_t) in grow_pptrtab() 33 return (ctf_set_errno (fp, ENOMEM)); in grow_pptrtab() 35 fp->ctf_pptrtab = new_pptrtab; in grow_pptrtab() 37 memset (fp->ctf_pptrtab + fp->ctf_pptrtab_len, 0, in grow_pptrtab() 38 sizeof (uint32_t) * (new_len - fp->ctf_pptrtab_len)); in grow_pptrtab() 40 fp->ctf_pptrtab_len = new_len; in grow_pptrtab() 47 refresh_pptrtab (ctf_dict_t *fp, ctf_dict_t *pfp) in refresh_pptrtab() argument 50 for (i = fp->ctf_pptrtab_typemax; i <= fp->ctf_typemax; i++) in refresh_pptrtab() 52 ctf_id_t type = LCTF_INDEX_TO_TYPE (fp, i, 1); in refresh_pptrtab() [all …]
|
| H A D | ctf-link.c | 44 ctf_link_input_name (ctf_dict_t *fp) in ctf_link_input_name() argument 46 if (fp->ctf_parent && fp->ctf_parent->ctf_cuname) in ctf_link_input_name() 47 return fp->ctf_parent->ctf_cuname; in ctf_link_input_name() 48 else if (fp->ctf_cuname) in ctf_link_input_name() 49 return fp->ctf_cuname; in ctf_link_input_name() 57 ctf_unnamed_cuname (ctf_dict_t *fp) in ctf_unnamed_cuname() argument 59 const char *cuname = ctf_cuname (fp); in ctf_unnamed_cuname() 94 ctf_link_add_ctf_internal (ctf_dict_t *fp, ctf_archive_t *ctf, in ctf_link_add_ctf_internal() argument 105 if ((input = ctf_dynhash_lookup (fp->ctf_link_inputs, name)) != NULL) in ctf_link_add_ctf_internal() 122 input->n = ctf_dynhash_elements (fp->ctf_link_inputs); in ctf_link_add_ctf_internal() [all …]
|
| H A D | ctf-serialize.c | 93 symtypetab_density (ctf_dict_t *fp, ctf_dict_t *symfp, ctf_dynhash_t *symhash, in symtypetab_density() argument 126 return (ctf_set_errno (fp, ENOMEM)); in symtypetab_density() 144 if (!ctf_assert (fp, !sym->st_nameidx_set)) in symtypetab_density() 150 return (ctf_set_errno (fp, ENOMEM)); in symtypetab_density() 155 ctf_err_warn (fp, 0, err, _("iterating over linker-known symbols during " in symtypetab_density() 158 return (ctf_set_errno (fp, err)); in symtypetab_density() 184 ctf_err_warn (fp, 1, 0, _("symbol %s (%x) added to CTF as a " in symtypetab_density() 195 ctf_err_warn (fp, 1, 0, _("symbol %s (%x) added to CTF as a " in symtypetab_density() 219 ctf_err_warn (fp, 0, err, _("iterating over CTF symtypetab during " in symtypetab_density() 222 return (ctf_set_errno (fp, err)); in symtypetab_density() [all …]
|
| /netbsd-src/lib/libc/stdio/ |
| H A D | fseeko.c | 63 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 …]
|
| H A D | ungetc.c | 59 __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 …]
|
| H A D | flockfile.c | 59 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 …]
|
| /netbsd-src/sys/arch/acorn32/stand/lib/ |
| H A D | riscoscalls.S | 36 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/ |
| H A D | ctf_open.c | 114 init_symtab(ctf_file_t *fp, const ctf_header_t *hp, in init_symtab() argument 118 uint_t *xp = fp->ctf_sxlate; in init_symtab() 119 uint_t *xend = xp + fp->ctf_nsyms; in init_symtab() 173 info = *(ushort_t *)((uintptr_t)fp->ctf_buf + funcoff); in init_symtab() 174 vlen = LCTF_INFO_VLEN(fp, info); in init_symtab() 181 if (LCTF_INFO_KIND(fp, info) == CTF_K_UNKNOWN && in init_symtab() 194 ctf_dprintf("loaded %lu symtab entries\n", fp->ctf_nsyms); in init_symtab() 203 init_types(ctf_file_t *fp, const ctf_header_t *cth) in init_types() argument 206 const ctf_type_t *tbuf = (const ctf_type_t *)(fp->ctf_buf + cth->cth_typeoff); in init_types() 208 const ctf_type_t *tend = (const ctf_type_t *)(fp->ctf_buf + cth->cth_stroff); in init_types() [all …]
|
| /netbsd-src/external/cddl/osnet/dist/lib/libnvpair/ |
| H A D | nvpair_json.c | 23 #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/ |
| H A D | save.c | 48 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/ |
| H A D | save.c | 92 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/ |
| H A D | dumptab.c | 52 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/ |
| H A D | fortune.c | 255 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/ |
| H A D | t_fmemopen.c | 131 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/ |
| H A D | fpu_implode.c | 61 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/ |
| H A D | fpu_implode.c | 82 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/ |
| H A D | fileload.c | 104 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 …]
|