/ast/src/cmd/tests/sfio/ |
H A D | tputgetl.c | 25 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 D | tputgetm.c | 25 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 D | tputgetu.c | 25 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 D | tsfstr.c | 24 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 D | twrrd.c | 27 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 D | tputgetd.c | 26 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 D | tputgetr.c | 43 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 D | mimetype.c | 51 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 D | rskeydump.c | 31 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 D | rskeymeth.c | 62 * 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 D | rskeyopen.c | 123 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 D | mimetype.c | 97 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 D | huffputhdr.c | 38 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 D | pax-bzip.c | 29 bzip_getprologue(Pax_t* pax, Format_t* fp, Archive_t* ap, File_t* f, unsigned char* buf, size_t size) argument
|
H A D | pax-compress.c | 29 compress_getprologue(Pax_t* pax, Format_t* fp, Archive_t* ap, File_t* f, unsigned char* buf, size_t size) argument
|
H A D | pax-vczip.c | 29 vczip_getprologue(Pax_t* pax, Format_t* fp, Archive_t* ap, File_t* f, unsigned char* buf, size_t size) argument
|
H A D | pax-gzip.c | 29 gzip_getprologue(Pax_t* pax, Format_t* fp, Archive_t* ap, File_t* f, unsigned char* buf, size_t size) argument
|
H A D | pax-xz.c | 29 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 D | head.c | 75 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 D | pids.c | 59 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 D | rev.c | 119 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 D | msgblast.c | 44 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 D | asa.c | 111 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 D | 6263.c | 36 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 D | ifs_rsh.c | 43 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 );
|