Home
last modified time | relevance | path

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

12345678910>>...38

/dflybsd-src/usr.sbin/ppp/
H A Dfsm.c129 struct fsm *fp = (struct fsm *)v; in StoppedTimeout() local
131 log_Printf(fp->LogLevel, "%s: Stopped timer expired\n", fp->link->name); in StoppedTimeout()
132 if (fp->OpenTimer.state == TIMER_RUNNING) { in StoppedTimeout()
134 fp->link->name, fp->name); in StoppedTimeout()
135 timer_Stop(&fp->OpenTimer); in StoppedTimeout()
137 if (fp->state == ST_STOPPED) in StoppedTimeout()
138 fsm2initial(fp); in StoppedTimeout()
142 fsm_Init(struct fsm *fp, const char *name, u_short proto, int mincode, in fsm_Init() argument
147 fp->name = name; in fsm_Init()
148 fp->proto = proto; in fsm_Init()
[all …]
/dflybsd-src/contrib/binutils-2.34/libctf/
H A Dctf-open.c80 get_ctt_size_common (const ctf_file_t *fp _libctf_unused_, in get_ctt_size_common()
108 get_ctt_size_v1 (const ctf_file_t *fp, const ctf_type_t *tp, in get_ctt_size_v1() argument
113 return (get_ctt_size_common (fp, tp, sizep, incrementp, in get_ctt_size_v1()
122 get_ctt_size_v2_unconverted (const ctf_file_t *fp, const ctf_type_t *tp, in get_ctt_size_v2_unconverted() argument
127 return (get_ctt_size_common (fp, tp, sizep, incrementp, in get_ctt_size_v2_unconverted()
134 get_ctt_size_v2 (const ctf_file_t *fp, const ctf_type_t *tp, in get_ctt_size_v2() argument
137 return (get_ctt_size_common (fp, tp, sizep, incrementp, in get_ctt_size_v2()
227 init_symtab (ctf_file_t *fp, const ctf_header_t *hp, in init_symtab() argument
231 uint32_t *xp = fp->ctf_sxlate; in init_symtab()
232 uint32_t *xend = xp + fp->ctf_nsyms; in init_symtab()
[all …]
H A Dctf-create.c36 ctf_grow_ptrtab (ctf_file_t *fp) in ctf_grow_ptrtab() argument
38 size_t new_ptrtab_len = fp->ctf_ptrtab_len; in ctf_grow_ptrtab()
43 if (fp->ctf_ptrtab == NULL) in ctf_grow_ptrtab()
45 else if ((fp->ctf_typemax + 2) > fp->ctf_ptrtab_len) in ctf_grow_ptrtab()
46 new_ptrtab_len = fp->ctf_ptrtab_len * 1.25; in ctf_grow_ptrtab()
48 if (new_ptrtab_len != fp->ctf_ptrtab_len) in ctf_grow_ptrtab()
52 if ((new_ptrtab = realloc (fp->ctf_ptrtab, in ctf_grow_ptrtab()
54 return (ctf_set_errno (fp, ENOMEM)); in ctf_grow_ptrtab()
56 fp->ctf_ptrtab = new_ptrtab; in ctf_grow_ptrtab()
57 memset (fp->ctf_ptrtab + fp->ctf_ptrtab_len, 0, in ctf_grow_ptrtab()
[all …]
H A Dctf-lookup.c72 ctf_lookup_by_name (ctf_file_t *fp, const char *name) in ctf_lookup_by_name() argument
82 return (ctf_set_errno (fp, EINVAL)); in ctf_lookup_by_name()
107 ntype = fp->ctf_ptrtab[LCTF_TYPE_TO_INDEX (fp, type)]; in ctf_lookup_by_name()
110 ntype = ctf_type_resolve_unsliced (fp, type); in ctf_lookup_by_name()
113 fp->ctf_ptrtab[LCTF_TYPE_TO_INDEX (fp, ntype)]) == 0) in ctf_lookup_by_name()
115 (void) ctf_set_errno (fp, ECTF_NOTYPE); in ctf_lookup_by_name()
120 type = LCTF_INDEX_TO_TYPE (fp, ntype, (fp->ctf_flags & LCTF_CHILD)); in ctf_lookup_by_name()
129 for (lp = fp->ctf_lookups; lp->ctl_prefix != NULL; lp++) in ctf_lookup_by_name()
148 if (fp->ctf_tmp_typeslicelen >= (size_t) (q - p) + 1) in ctf_lookup_by_name()
150 memcpy (fp->ctf_tmp_typeslice, p, (size_t) (q - p)); in ctf_lookup_by_name()
[all …]
H A Dctf-types.c26 ctf_type_isparent (ctf_file_t *fp, ctf_id_t id) in ctf_type_isparent() argument
28 return (LCTF_TYPE_ISPARENT (fp, id)); in ctf_type_isparent()
32 ctf_type_ischild (ctf_file_t * fp, ctf_id_t id) in ctf_type_ischild() argument
34 return (LCTF_TYPE_ISCHILD (fp, id)); in ctf_type_ischild()
41 ctf_member_iter (ctf_file_t *fp, ctf_id_t type, ctf_member_f *func, void *arg) in ctf_member_iter() argument
43 ctf_file_t *ofp = fp; in ctf_member_iter()
50 if ((type = ctf_type_resolve (fp, type)) == CTF_ERR) in ctf_member_iter()
53 if ((tp = ctf_lookup_by_id (&fp, type)) == NULL) in ctf_member_iter()
56 (void) ctf_get_ctt_size (fp, tp, &size, &increment); in ctf_member_iter()
57 kind = LCTF_INFO_KIND (fp, tp->ctt_info); in ctf_member_iter()
[all …]
H A Dctf-string.c26 ctf_strraw_explicit (ctf_file_t *fp, uint32_t name, ctf_strs_t *strtab) in ctf_strraw_explicit() argument
28 ctf_strs_t *ctsp = &fp->ctf_str[CTF_NAME_STID (name)]; in ctf_strraw_explicit()
37 && fp->ctf_syn_ext_strtab != NULL) in ctf_strraw_explicit()
38 return ctf_dynhash_lookup (fp->ctf_syn_ext_strtab, in ctf_strraw_explicit()
47 && name >= ctsp->cts_len && name < fp->ctf_str_prov_offset) in ctf_strraw_explicit()
48 return ctf_dynhash_lookup (fp->ctf_prov_strtab, in ctf_strraw_explicit()
61 ctf_strraw (ctf_file_t *fp, uint32_t name) in ctf_strraw() argument
63 return ctf_strraw_explicit (fp, name, NULL); in ctf_strraw()
69 ctf_strptr (ctf_file_t *fp, uint32_t name) in ctf_strptr() argument
71 const char *s = ctf_strraw (fp, name); in ctf_strptr()
[all …]
/dflybsd-src/lib/libc/stdio/
H A Dungetc.c53 __submore(FILE *fp) in __submore() argument
58 if (fp->_ub._base == fp->_ubuf) { in __submore()
64 fp->_ub._base = p; in __submore()
65 fp->_ub._size = BUFSIZ; in __submore()
66 p += BUFSIZ - sizeof(fp->_ubuf); in __submore()
67 for (i = sizeof(fp->_ubuf); --i >= 0;) in __submore()
68 p[i] = fp->_ubuf[i]; in __submore()
69 fp->pub._p = p; in __submore()
72 i = fp->_ub._size; in __submore()
73 p = realloc(fp->_ub._base, (size_t)(i << 1)); in __submore()
[all …]
H A Dfreopen.c54 freopen(const char * __restrict file, const char * __restrict mode, FILE *fp) in freopen() argument
61 fclose(fp); in freopen()
66 FLOCKFILE(fp); in freopen()
78 if (fp->pub._flags == 0) { in freopen()
79 FUNLOCKFILE(fp); in freopen()
83 if ((dflags = _fcntl(fp->pub._fileno, F_GETFL)) < 0) { in freopen()
85 fclose(fp); in freopen()
86 FUNLOCKFILE(fp); in freopen()
92 fclose(fp); in freopen()
93 FUNLOCKFILE(fp); in freopen()
[all …]
H A Drefill.c48 lflush(FILE *fp) in lflush() argument
52 if ((fp->pub._flags & (__SLBF|__SWR)) == (__SLBF|__SWR)) { in lflush()
53 FLOCKFILE(fp); in lflush()
54 ret = __sflush(fp); in lflush()
55 FUNLOCKFILE(fp); in lflush()
65 __srefill(FILE *fp) in __srefill() argument
72 ORIENT(fp, -1); in __srefill()
74 fp->pub._r = 0; /* largely a convenience for callers */ in __srefill()
77 if (fp->pub._flags & __SEOF) in __srefill()
81 if ((fp->pub._flags & __SRD) == 0) { in __srefill()
[all …]
H A Dfseek.c51 fseek(FILE *fp, long offset, int whence) in fseek() argument
60 FLOCKFILE(fp); in fseek()
61 ret = _fseeko(fp, (off_t)offset, whence, 1); in fseek()
62 FUNLOCKFILE(fp); in fseek()
69 fseeko(FILE *fp, off_t offset, int whence) in fseeko() argument
78 FLOCKFILE(fp); in fseeko()
79 ret = _fseeko(fp, offset, whence, 0); in fseeko()
80 FUNLOCKFILE(fp); in fseeko()
91 _fseeko(FILE *fp, off_t offset, int whence, int ltest) in _fseeko() argument
102 if ((seekfn = fp->_seek) == NULL) { in _fseeko()
[all …]
H A Dfgetln.c53 __slbexpand(FILE *fp, size_t newsize) in __slbexpand() argument
60 if (fp->_lb._size >= newsize) in __slbexpand()
62 if ((p = realloc(fp->_lb._base, newsize)) == NULL) in __slbexpand()
64 fp->_lb._base = p; in __slbexpand()
65 fp->_lb._size = newsize; in __slbexpand()
77 fgetln(FILE *fp, size_t *lenp) in fgetln() argument
83 FLOCKFILE(fp); in fgetln()
84 ORIENT(fp, -1); in fgetln()
86 if (fp->pub._r <= 0 && __srefill(fp)) { in fgetln()
88 FUNLOCKFILE(fp); in fgetln()
[all …]
H A Dstdio.c52 FILE *fp = cookie; in __sread() local
54 return(_read(fp->pub._fileno, buf, (size_t)n)); in __sread()
60 FILE *fp = cookie; in __swrite() local
62 return (_write(fp->pub._fileno, buf, (size_t)n)); in __swrite()
68 FILE *fp = cookie; in __sseek() local
70 return (lseek(fp->pub._fileno, (off_t)offset, whence)); in __sseek()
84 _sread(FILE *fp, char *buf, int n) in _sread() argument
88 ret = (*fp->_read)(fp->_cookie, buf, n); in _sread()
90 if (fp->pub._flags & __SOFF) { in _sread()
91 if (fp->_offset <= OFF_MAX - ret) in _sread()
[all …]
H A Dfvwrite.c48 __sfvwrite(FILE *fp, struct __suio *uio) in __sfvwrite() argument
60 if (prepwrite(fp) != 0) in __sfvwrite()
64 #define COPY(n) (void)memcpy((void *)fp->pub._p, (void *)p, (size_t)(n)) in __sfvwrite()
77 if (fp->pub._flags & __SNBF) { in __sfvwrite()
83 w = _swrite(fp, p, MIN(len, BUFSIZ)); in __sfvwrite()
89 } else if ((fp->pub._flags & __SLBF) == 0) { in __sfvwrite()
103 if ((fp->pub._flags & (__SALC | __SSTR)) == in __sfvwrite()
104 (__SALC | __SSTR) && fp->pub._w < len) { in __sfvwrite()
105 size_t blen = fp->pub._p - fp->_bf._base; in __sfvwrite()
111 fp->pub._w = len + 128; in __sfvwrite()
[all …]
H A Dfflush.c51 fflush(FILE *fp) in fflush() argument
55 if (fp == NULL) in fflush()
57 FLOCKFILE(fp); in fflush()
71 if ((fp->pub._flags & (__SWR | __SRW)) == 0) in fflush()
74 retval = __sflush(fp); in fflush()
75 FUNLOCKFILE(fp); in fflush()
84 __fflush(FILE *fp) in __fflush() argument
88 if (fp == NULL) in __fflush()
90 if ((fp->pub._flags & (__SWR | __SRW)) == 0) in __fflush()
93 retval = __sflush(fp); in __fflush()
[all …]
/dflybsd-src/games/battlestar/
H A Dsave.c40 FILE *fp; in restore() local
44 if ((fp = fopen(filename, "r")) == 0) { in restore()
47 fread(&WEIGHT, sizeof WEIGHT, 1, fp); in restore()
48 fread(&CUMBER, sizeof CUMBER, 1, fp); in restore()
49 fread(&ourclock, sizeof ourclock, 1, fp); in restore()
50 fread(&tmp, sizeof tmp, 1, fp); in restore()
53 fread(location[n].link, sizeof location[n].link, 1, fp); in restore()
54 fread(location[n].objects, sizeof location[n].objects, 1, fp); in restore()
56 fread(inven, sizeof inven, 1, fp); in restore()
57 fread(wear, sizeof wear, 1, fp); in restore()
[all …]
/dflybsd-src/games/fortune/fortune/
H A Dfortune.c209 display(FILEDESC *fp) in display() argument
215 open_fp(fp); in display()
216 fseeko(fp->inf, Seekpts[0], SEEK_SET); in display()
217 for (Fort_len = 0; fgets(line, sizeof line, fp->inf) != NULL && in display()
218 !STR_ENDSTRING(line, fp->tbl); Fort_len++) { in display()
219 if (fp->tbl.str_flags & STR_ROTATED) in display()
228 if (fp->tbl.str_flags & STR_COMMENTS in display()
229 && line[0] == fp->tbl.str_delim in display()
230 && line[1] == fp->tbl.str_delim) in display()
450 FILEDESC *fp; in add_file() local
[all …]
/dflybsd-src/games/rogue/
H A Dsave.c87 FILE *fp; in save_into_file() local
111 if ( ((fp = fopen(sfile, "w")) == NULL) || in save_into_file()
119 r_write(fp, (char *) &detect_monster, sizeof(detect_monster)); in save_into_file()
120 r_write(fp, (char *) &cur_level, sizeof(cur_level)); in save_into_file()
121 r_write(fp, (char *) &max_level, sizeof(max_level)); in save_into_file()
122 write_string(hunger_str, fp); in save_into_file()
123 write_string(login_name, fp); in save_into_file()
124 r_write(fp, (char *) &party_room, sizeof(party_room)); in save_into_file()
125 write_pack(&level_monsters, fp); in save_into_file()
126 write_pack(&level_objects, fp); in save_into_file()
[all …]
/dflybsd-src/libexec/bootpd/
H A Ddumptab.c55 FILE *fp; in dumptab() local
100 if ((fp = fopen(filename, "w")) == NULL) { in dumptab()
106 fprintf(fp, "\n# %s %s.%d\n", progname, VERSION, PATCHLEVEL); in dumptab()
107 fprintf(fp, "# %s: dump of bootp server database.\n", filename); in dumptab()
108 fprintf(fp, "# Dump taken %s", ctime(&t)); in dumptab()
109 fwrite(legend, 1, sizeof(legend) - 1, fp); in dumptab()
114 dump_host(fp, hp); in dumptab()
115 fprintf(fp, "\n"); in dumptab()
118 fclose(fp); in dumptab()
131 dump_host(FILE *fp, struct host *hp) in dump_host() argument
[all …]
/dflybsd-src/contrib/byacc/
H A Doutput.c6 #define CountLine(fp) (!rflag || ((fp) == code_file)) argument
35 putc_code(FILE * fp, int c) in putc_code() argument
37 if ((c == '\n') && (fp == code_file)) in putc_code()
39 putc(c, fp); in putc_code()
43 putl_code(FILE * fp, const char *s) in putl_code() argument
45 if (fp == code_file) in putl_code()
47 fputs(s, fp); in putl_code()
51 puts_code(FILE * fp, const char *s) in puts_code() argument
53 fputs(s, fp); in puts_code()
57 puts_param_types(FILE * fp, param *list, int more) in puts_param_types() argument
[all …]
/dflybsd-src/usr.sbin/config/
H A Dmkioconf.c56 write_device_resources(FILE *fp, struct device *dp) in write_device_resources() argument
61 fprintf(fp, "struct config_resource %s_resources[] = {\n", devstr(dp)); in write_device_resources()
67 fprintf(fp, "\t{ \"at\",\tRES_STRING,\t{ (long)\"%s\" }},\n", buf); in write_device_resources()
71 fprintf(fp, "\t{ \"drive\",\tRES_INT,\t{ %d }},\n", dp->d_drive); in write_device_resources()
75 fprintf(fp, "\t{ \"target\",\tRES_INT,\t{ %d }},\n", dp->d_target); in write_device_resources()
79 fprintf(fp, "\t{ \"lun\",\tRES_INT,\t{ %d }},\n", dp->d_lun); in write_device_resources()
83 fprintf(fp, "\t{ \"bus\",\tRES_INT,\t{ %d }},\n", dp->d_bus); in write_device_resources()
87 fprintf(fp, "\t{ \"flags\",\tRES_INT,\t{ 0x%x }},\n", dp->d_flags); in write_device_resources()
91 fprintf(fp, "\t{ \"disabled\",\tRES_INT,\t{ %d }},\n", dp->d_disabled); in write_device_resources()
95 fprintf(fp, "\t{ \"port\",\tRES_INT,\t { %s }},\n", dp->d_port); in write_device_resources()
[all …]
/dflybsd-src/stand/lib/
H A Dufs.c128 struct file *fp = (struct file *)f->f_fsdata; in read_inode() local
129 struct fs *fs = fp->f_fs; in read_inode()
156 fp->f_di = dp[ino_to_fsbo(fs, inumber)]; in read_inode()
166 fp->f_blkno[level] = -1; in read_inode()
167 fp->f_buf_blkno = -1; in read_inode()
184 struct file *fp = (struct file *)f->f_fsdata; in block_map() local
185 struct fs *fs = fp->f_fs; in block_map()
217 *disk_block_p = fp->f_di.di_db[file_block]; in block_map()
230 if (file_block < fp->f_nindir[level]) in block_map()
232 file_block -= fp->f_nindir[level]; in block_map()
[all …]
/dflybsd-src/sys/sys/
H A Dfile2.h45 struct file *fp, in fo_read() argument
52 fhold(fp); in fo_read()
53 error = (*fp->f_ops->fo_read)(fp, uio, cred, flags); in fo_read()
54 fdrop(fp); in fo_read()
60 struct file *fp, in fo_write() argument
67 fhold(fp); in fo_write()
68 error = (*fp->f_ops->fo_write)(fp, uio, cred, flags); in fo_write()
69 fdrop(fp); in fo_write()
75 struct file *fp, in fo_ioctl() argument
83 fhold(fp); in fo_ioctl()
[all …]
/dflybsd-src/contrib/ldns/drill/
H A Ddrill_util.c145 print_class_type(FILE *fp, ldns_rr *r) in print_class_type() argument
150 fprintf(fp, " %s", lt->name); in print_class_type()
152 fprintf(fp, " CLASS%d", ldns_rr_get_class(r)); in print_class_type()
157 fprintf(fp, " RRSIG "); in print_class_type()
160 fprintf(fp, " DNSKEY "); in print_class_type()
163 fprintf(fp, " DS "); in print_class_type()
172 print_ds_abbr(FILE *fp, ldns_rr *ds) in print_ds_abbr() argument
178 ldns_rdf_print(fp, ldns_rr_owner(ds)); in print_ds_abbr()
179 fprintf(fp, " %d", (int)ldns_rr_ttl(ds)); in print_ds_abbr()
180 print_class_type(fp, ds); in print_ds_abbr()
[all …]
/dflybsd-src/sys/kern/
H A Dkern_descrip.c104 static void fsetfd_locked(struct filedesc *fdp, struct file *fp, int fd);
107 static void ffree(struct file *fp);
159 fdp->fd_files[fdp->fd_lastfile].fp == NULL && in fdfixup_locked()
188 struct file *fp; in fclearcache() local
203 fp = fdn->fp; in fclearcache()
222 KASSERT(fp == fdc->fp, in fclearcache()
224 fp, fdc->fp)); in fclearcache()
225 fdc->fp = NULL; in fclearcache()
234 atomic_add_int(&fp->f_count, -1); in fclearcache()
253 KASSERT(fp == fdc->fp, in fclearcache()
[all …]
/dflybsd-src/gnu/usr.bin/rcs/lib/
H A Drcskeep.c118 getoldkeys(fp) in getoldkeys() argument
119 register RILE *fp; in getoldkeys()
141 if (!fp) {
142 if (!(fp = Iopen(workname, FOPEN_R_WORK, (struct stat*)0))) {
163 Igeteof_(fp, c, goto ok;)
179 Igeteof_(fp, c, break;)
187 if (!keepid(0, fp, &prevauthor))
192 if (!(c = keepdate(fp)))
199 getval(fp, (struct buf*)0, false) &&
200 keeprev(fp) &&
[all …]

12345678910>>...38