Searched defs:fp (Results 1 - 25 of 204) sorted by relevance

123456789

/ast/src/cmd/tests/sfio/
H A Dtputgetl.c25 Sfio_t *fp; local
27 if(!(fp = sftmp(8)))
31 if(sfputl(fp,(long)i) < 0)
34 sfseek(fp,(Sfoff_t)0,0);
37 if((r = (int)sfgetl(fp)) != i)
H A Dtputgetm.c25 Sfio_t *fp; local
27 if(!(fp = sftmp(8)))
31 if(sfputm(fp, (Sfulong_t)i, (Sfulong_t)100000) < 0)
34 sfseek(fp,(Sfoff_t)0,0);
37 if((r = (unsigned int)sfgetm(fp,(Sfulong_t)100000)) != i)
H A Dtputgetu.c25 Sfio_t *fp; local
27 if(!(fp = sftmp(8)))
31 if(sfputu(fp,i) < 0)
34 sfseek(fp,(Sfoff_t)0,0);
37 if((r = (unsigned int)sfgetu(fp)) != i)
H A Dtsfstr.c24 Sfio_t *fp; local
27 if(!(fp = sfstropen()) )
30 if(sfwrite(fp,"0123456789abcd",15) != 15)
33 if(!(s = sfstrseek(fp, -5, SEEK_CUR)) )
38 if(!(s = sfstruse(fp)) )
43 if(!(s = sfstrseek(fp, 0, SEEK_END)) )
46 if(!(s = sfstrrsrv(fp, 64*1024)) )
48 if(strcmp(sfstrbase(fp),"0123456789") != 0)
51 if(sfstrbuf(fp, buf, sizeof(buf), 0) < 0)
53 if(sfstrbase(fp) !
[all...]
H A Dtwrrd.c27 Sfio_t *fp; local
33 if(!(fp = sftmp(0)))
37 if(sfwrite(fp,wbuf,sizeof(wbuf)) != sizeof(wbuf))
40 sfseek(fp,(Sfoff_t)0,0);
41 sfset(fp,SF_WRITE,0);
42 sfsetbuf(fp,NIL(char*),0);
43 sfsetbuf(fp,NIL(char*),(size_t)SF_UNBOUND);
46 { if(sfread(fp,rbuf,sizeof(rbuf)) != sizeof(rbuf))
H A Dtputgetd.c26 Sfio_t *fp; local
28 if(!(fp = sfopen(NIL(Sfio_t*), tstfile("sf", 0), "w+")) )
36 if(sfputd(fp,f) < 0)
39 sfseek(fp,(Sfoff_t)0,0);
41 { if((v = sfgetd(fp)) == f)
H A Dtputgetr.c43 Sfio_t *fp; local
47 if(!(fp = sftmp(8)))
50 sfset(fp,SF_LINE,1);
53 if(sfputr(fp,buf,'\n') <= 0)
57 sfseek(fp,(Sfoff_t)0,0);
61 if(!(s = sfgetr(fp,'\n',1)))
67 sfseek(fp,(Sfoff_t)0,0);
68 s = sfgetr(fp,'\0',1);
71 s = sfgetr(fp,'\0',-1);
74 if(sfvalue(fp) !
[all...]
/ast/src/lib/libast/misc/
H A Dmimetype.c51 mimetype(Mime_t* mp, Sfio_t* fp, const char* file, struct stat* st) argument
68 return magictype(mp->magic, fp, file, st);
/ast/src/lib/librecsort/
H A Drskeydump.c31 dump(register Rskey_t* kp, Sfio_t* sp, register Rskeyfield_t* fp, const char* type) argument
33 dump(kp, sp, fp, type)
36 register Rskeyfield_t* fp;
40 sfprintf(sp, "%s[%d]\n", type, fp->index);
41 sfprintf(sp, "\tbegin field = %d\n", fp->begin.field);
42 sfprintf(sp, "\t begin char = %d\n", fp->begin.index);
43 sfprintf(sp, "\t end field = %d\n", fp->end.field);
44 sfprintf(sp, "\t end char = %d\n", fp->end.index);
45 sfprintf(sp, "\t ccode = %d\n", fp->code);
46 sfprintf(sp, "\t coder = %c\n", fp
68 register Rskeyfield_t* fp; local
[all...]
H A Drskeymeth.c62 * list rs method names on fp
67 rskeylist(register Rskey_t* kp, Sfio_t* fp, int usage) argument
69 rskeylist(kp, fp, usage)
71 Sfio_t* fp;
81 n += sfprintf(fp, "[+%s?%s]", (*methods[i])->name, (*methods[i])->desc);
83 n += sfprintf(fp, "%-10s %s\n", (*methods[i])->name, (*methods[i])->desc);
H A Drskeyopen.c123 register Rskeyfield_t* fp; local
129 while (fp = np)
131 np = fp->next;
132 if (fp->freetrans)
133 vmfree(Vmheap, fp->trans);
134 vmfree(Vmheap, fp);
137 while (fp = np)
139 np = fp->next;
140 vmfree(Vmheap, fp);
/ast/src/cmd/mailx/port/
H A Dmimetype.c97 mimetype(Mime_t* mp, Sfio_t* fp, const char* file, struct stat* st) argument
114 return magictype(mp->magic, fp, file, st);
/ast/src/cmd/pack/
H A Dhuffputhdr.c38 register Sfio_t *fp = outfile; local
40 sfputc(fp,HUFFMAG1);
41 sfputc(fp,HUFFMAG2);
44 sfputc(fp,hp->insize>>(7*CHAR_BIT));
45 sfputc(fp,hp->insize>>(6*CHAR_BIT));
46 sfputc(fp,hp->insize>>(5*CHAR_BIT));
47 sfputc(fp,hp->insize>>(4*CHAR_BIT));
48 sfputc(fp,0);
51 sfputc(fp,hp->insize>>(3*CHAR_BIT));
52 sfputc(fp,h
[all...]
/ast/src/cmd/pax/
H A Dpax-bzip.c29 bzip_getprologue(Pax_t* pax, Format_t* fp, Archive_t* ap, File_t* f, unsigned char* buf, size_t size) argument
H A Dpax-compress.c29 compress_getprologue(Pax_t* pax, Format_t* fp, Archive_t* ap, File_t* f, unsigned char* buf, size_t size) argument
H A Dpax-vczip.c29 vczip_getprologue(Pax_t* pax, Format_t* fp, Archive_t* ap, File_t* f, unsigned char* buf, size_t size) argument
H A Dpax-gzip.c29 gzip_getprologue(Pax_t* pax, Format_t* fp, Archive_t* ap, File_t* f, unsigned char* buf, size_t size) argument
H A Dpax-xz.c29 xz_getprologue(Pax_t* pax, Format_t* fp, Archive_t* ap, File_t* f, unsigned char* buf, size_t size) argument
/ast/src/lib/libcmd/
H A Dhead.c75 register Sfio_t* fp; local
129 fp = sfstdin;
130 sfset(fp, SF_SHARE, 1);
132 else if (!(fp = sfopen(NiL, cp, "r")))
141 sfmove(fp, NiL, skip, delim);
142 if (sfmove(fp, sfstdout, keep, delim) < 0 && !ERROR_PIPE(errno) && errno != EINTR)
144 if (fp != sfstdin)
145 sfclose(fp);
H A Dpids.c59 key(void* handle, Sffmt_t* fp, const char* arg, char** ps, Sflong_t* pn) argument
65 if (!(s = fp->t_str) || streq(s, "pid"))
H A Drev.c119 register Sfio_t *fp; local
150 fp = sfstdin;
151 else if(!(fp = sfopen((Sfio_t*)0,cp,"r")))
158 line = rev_line(fp,sfstdout,sftell(fp));
160 line = rev_char(fp,sfstdout);
161 if(fp!=sfstdin)
162 sfclose(fp);
/ast/src/lib/libcs/
H A Dmsgblast.c44 struct statvfs* fp; local
167 (ap++)->pointer = (void*)(fp = (struct statvfs*)vp);
168 fp->f_bsize = msggetu(&b, e);
169 fp->f_frsize = msggetu(&b, e);
170 fp->f_blocks = msggetu(&b, e);
171 fp->f_bfree = msggetu(&b, e);
172 fp->f_bavail = msggetu(&b, e);
173 fp->f_files = msggetu(&b, e);
174 fp->f_ffree = msggetu(&b, e);
175 fp
[all...]
/ast/src/cmd/builtin/
H A Dasa.c111 register Sfio_t *fp; local
135 fp = sfstdin;
136 else if (!(fp = sfopen(NiL, cp, "r")))
142 n = asa(fp, sfstdout,reclen);
143 if (fp != sfstdin)
144 sfclose(fp);
/ast/src/cmd/cs/
H A D6263.c36 actionf(register Css_t* css, register Cssfd_t* fp, Cssdisc_t* disc) argument
45 if (fp->status == CS_POLL_READ)
47 if ((n = csread(css->state, fp->fd, path, sizeof(path) - 1, CS_LINE)) <= 1)
67 cswrite(css->state, fp->fd, s, n);
/ast/src/cmd/cs/vcs_src/
H A Difs_rsh.c43 FILE *fp; local
61 if( (fp = popen( buf, "rw" )) == NULL )
68 while( fgets( buf, sizeof(buf), fp ) != NULL )
71 fclose( fp );
88 if( (fp = popen( buf, "rw" )) == NULL )
90 fclose( fp );

Completed in 42 milliseconds

123456789