/illumos-gate/usr/src/contrib/ast/src/lib/libast/disc/ |
H A D | sfdcsubstr.c | 36 Sfoff_t offset; /* starting offset */ 37 Sfoff_t extent; /* size wanted */ 38 Sfoff_t here; /* current seek location */ 53 reg Sfoff_t here, parent; 65 parent = sfsk(f,(Sfoff_t)0,SEEK_CUR,disc); 112 static Sfoff_t streamseek(Sfio_t* f, Sfoff_t pos, int type, Sfdisc_t* disc) in streamseek() 114 static Sfoff_t streamseek(f, pos, type, disc) in streamseek() 116 Sfoff_t pos; 122 reg Sfoff_t here, parent; 138 { parent = sfsk(f,(Sfoff_t)0,SEEK_CUR,disc); [all …]
|
H A D | sfdcdos.c | 35 Sfoff_t logical; 36 Sfoff_t physical; 45 Sfoff_t lhere; 46 Sfoff_t llast; 47 Sfoff_t lmax; 48 Sfoff_t pmax; 49 Sfoff_t phere; 50 Sfoff_t plast; 51 Sfoff_t begin; 83 static struct map *getmapping(Dosdisc_t *dp, Sfoff_t offset, register int whence) in getmapping() [all …]
|
H A D | sfdcseekable.c | 35 Sfoff_t discard;/* sfseek(f,-1,SEEK_SET) discarded data */ 36 Sfoff_t extent; /* shadow extent */ 65 Sfoff_t addr; 73 addr = sfseek(sf,(Sfoff_t)0,SEEK_CUR); 102 static Sfoff_t skseek(Sfio_t* f, Sfoff_t addr, int type, Sfdisc_t* disc) in skseek() 104 static Sfoff_t skseek(f, addr, type, disc) in skseek() 106 Sfoff_t addr; 135 return (Sfoff_t)(-1); 138 return (Sfoff_t)(-1); 156 return (Sfoff_t)(-1); [all …]
|
H A D | sfdcunion.c | 35 Sfoff_t lower; /* its lowest end */ 44 Sfoff_t here; /* current location */ 95 static Sfoff_t unseek(Sfio_t* f, Sfoff_t addr, int type, Sfdisc_t* disc) in unseek() 97 static Sfoff_t unseek(f, addr, type, disc) in unseek() 99 Sfoff_t addr; 106 reg Sfoff_t extent, s; 191 { un->f[i].lower = sfseek(array[i],(Sfoff_t)0,1);
|
H A D | sfdcfilter.c | 115 static Sfoff_t filterseek(Sfio_t* f, Sfoff_t addr, int offset, Sfdisc_t* disc) in filterseek() 117 static Sfoff_t filterseek(f, addr, offset, disc) in filterseek() 119 Sfoff_t addr; 127 return (Sfoff_t)(-1);
|
/illumos-gate/usr/src/contrib/ast/src/lib/libast/sfio/ |
H A D | sfsk.c | 29 Sfoff_t sfsk(Sfio_t* f, Sfoff_t addr, int type, Sfdisc_t* disc) in sfsk() 31 Sfoff_t sfsk(f,addr,type,disc) in sfsk() 33 Sfoff_t addr; 38 Sfoff_t p; 44 SFMTXENTER(f, (Sfoff_t)(-1)); 49 SFMTXRETURN(f, (Sfoff_t)(-1)); 51 SFMTXRETURN(f, (Sfoff_t)(-1)); 62 SFMTXRETURN(f, (Sfoff_t)(-1)); 94 SFMTXRETURN(f, (Sfoff_t)s); 97 SFMTXRETURN(f, (Sfoff_t)(-1));
|
H A D | sftell.c | 30 Sfoff_t sftell(Sfio_t* f) in sftell() 32 Sfoff_t sftell(f) in sftell() 37 Sfoff_t p; 40 SFMTXENTER(f, (Sfoff_t)(-1)); 44 SFMTXRETURN(f, (Sfoff_t)(-1)); 51 SFMTXRETURN(f, (Sfoff_t)(f->next-f->data)); 55 p = sfseek(f,(Sfoff_t)0,SEEK_CUR);
|
H A D | sfsize.c | 29 Sfoff_t sfsize(Sfio_t* f) in sfsize() 31 Sfoff_t sfsize(f) in sfsize() 37 Sfoff_t s; 40 SFMTXENTER(f, (Sfoff_t)(-1)); 43 SFMTXRETURN(f, (Sfoff_t)(-1)); 60 { Sfoff_t e; 64 f->here = SFSK(f,(Sfoff_t)0,SEEK_CUR,disc); 72 f->here = SFSK(f,(Sfoff_t)0,SEEK_CUR,disc); 78 f->here = SFSK(f,(Sfoff_t)0,SEEK_CUR,f->disc);
|
H A D | sfmove.c | 34 Sfoff_t sfmove(Sfio_t* fr, Sfio_t* fw, Sfoff_t n, reg int rc) in sfmove() 36 Sfoff_t sfmove(fr,fw,n,rc) in sfmove() 39 Sfoff_t n; /* number of bytes/records to move. <0 for unbounded move */ 47 Sfoff_t n_move, sk, cur; 53 SFMTXENTER(fr, (Sfoff_t)0); 55 SFMTXBEGIN2(fw, (Sfoff_t)0); 66 (void)SFSEEK(fr,(Sfoff_t)(-r),SEEK_CUR); 68 (void)SFSEEK(fw,(Sfoff_t)(-w),SEEK_CUR); 97 else if((cur = SFSEEK(fr, (Sfoff_t)0, SEEK_CUR)) >= 0 ) 160 { if((Sfoff_t)(r = fr->size) > n) [all …]
|
H A D | sfseek.c | 30 static void newpos(Sfio_t* f, Sfoff_t p) in newpos() 34 Sfoff_t p; 52 Sfoff_t sfseek(Sfio_t* f, Sfoff_t p, int type) in sfseek() 54 Sfoff_t sfseek(f,p,type) in sfseek() 56 Sfoff_t p; /* place to seek to */ 60 Sfoff_t r, s; 64 SFMTXENTER(f, (Sfoff_t)(-1)); 86 SFMTXRETURN(f, (Sfoff_t)(-1)); 96 SFMTXRETURN(f, (Sfoff_t)(-1)); 101 (void)SFSK(f,(Sfoff_t)0,SEEK_CUR,f->disc); [all …]
|
H A D | sfsetbuf.c | 224 { if((f->here = SFSK(f,(Sfoff_t)0,SEEK_CUR,disc)) < 0) 227 { Sfoff_t e; 228 if((e = SFSK(f,(Sfoff_t)0,SEEK_END,disc)) >= 0) 244 if(S_ISDIR(st.st_mode) || (Sfoff_t)st.st_size < (Sfoff_t)SF_GRAIN) 247 f->here = SFSK(f,(Sfoff_t)0,SEEK_CUR,f->disc); 263 { f->extent = (Sfoff_t)st.st_size; 353 f->extent > 0 && f->extent < (Sfoff_t)_Sfpage )
|
/illumos-gate/usr/src/contrib/ast/src/lib/libast/include/ |
H A D | sfio_t.h | 35 Sfoff_t extent; /* current file size */ \ 36 Sfoff_t here; /* current physical location */ \ 47 Sfoff_t lpos; /* last seek position */ \ 83 (Sfoff_t)0, /* extent */ \ 84 (Sfoff_t)0, /* here */ \ 95 (Sfoff_t)0, /* lpos */ \ 111 (f)->extent = (Sfoff_t)(-1), /* extent */ \ 112 (f)->here = (Sfoff_t)0, /* here */ \ 123 (f)->lpos = (Sfoff_t)0, /* lpos */ \
|
H A D | sfio.h | 42 #define Sfoff_t intmax_t macro 49 typedef Sfoff_t (*Sfseek_f)_ARG_((Sfio_t*, Sfoff_t, int, Sfdisc_t*)); typedef 240 extern int sfresize _ARG_((Sfio_t*, Sfoff_t)); 252 extern Sfoff_t sfmove _ARG_((Sfio_t*, Sfio_t*, Sfoff_t, int)); 254 extern Sfoff_t sftell _ARG_((Sfio_t*)); 255 extern Sfoff_t sfseek _ARG_((Sfio_t*, Sfoff_t, int)); 278 extern Sfoff_t sfsk _ARG_((Sfio_t*, Sfoff_t, int, Sfdisc_t*)); 311 extern Sfoff_t sfsize _ARG_((Sfio_t*));
|
H A D | sfdisc.h | 66 extern Sfio_t* sfdcsubstream(Sfio_t*, Sfio_t*, Sfoff_t, Sfoff_t);
|
/illumos-gate/usr/src/contrib/ast/src/lib/libcmd/ |
H A D | tail.c | 138 Sfoff_t cur; 139 Sfoff_t end; 153 static Sfoff_t 154 tailpos(register Sfio_t* fp, register Sfoff_t number, int delim) in tailpos() 157 register Sfoff_t offset; in tailpos() 158 register Sfoff_t first; in tailpos() 159 register Sfoff_t last; in tailpos() 167 if ((first = sfseek(fp, (Sfoff_t)0, SEEK_CUR)) < 0) in tailpos() 213 pipetail(Sfio_t* infile, Sfio_t* outfile, Sfoff_t number, int delim) in pipetail() 216 register Sfoff_t n; in pipetail() [all …]
|
H A D | wc.h | 45 Sfoff_t words; 46 Sfoff_t lines; 47 Sfoff_t chars; 48 Sfoff_t longest;
|
H A D | cmp.c | 149 cmp(const char* file1, Sfio_t* f1, const char* file2, Sfio_t* f2, int flags, Sfoff_t count, Sfoff_t… in cmp() 155 register Sfoff_t lines = 1; in cmp() 158 Sfoff_t pos = 0; in cmp() 276 Sfoff_t o1 = 0; in b_cmp() 277 Sfoff_t o2 = 0; in b_cmp() 278 Sfoff_t count = -1; in b_cmp() 279 Sfoff_t differences = -1; in b_cmp()
|
H A D | join.c | 452 …(p, n, d), sfprintf(sfstdout, "[G%d#%d@%I*d:%-.8s]", __LINE__, n, sizeof(Sfoff_t), sftell(p->file[… 640 Sfoff_t lo = -1; in join() 641 Sfoff_t hi = -1; in join() 670 …if (sfseek(jp->file[0].iop, (Sfoff_t)-jp->file[0].reclen, SEEK_CUR) < 0 || !(cp1 = getrec(jp, 0, 0… in join() 680 if ((lo = sfseek(jp->file[1].iop, (Sfoff_t)0, SEEK_CUR)) < 0) in join() 750 if ((hi = sfseek(jp->file[1].iop, (Sfoff_t)0, SEEK_CUR)) < 0 || in join() 761 sfseek(jp->file[1].iop, (Sfoff_t)-1, SEEK_SET); in join() 778 sfseek(jp->file[1].iop, (Sfoff_t)0, SEEK_CUR) < hi && in join() 802 sfseek(sfstdin, (Sfoff_t)0, SEEK_END); in join() 936 if (sfseek(sfstdin,(Sfoff_t)0,SEEK_CUR) < 0) in b_join() [all …]
|
H A D | wclib.c | 169 register Sfoff_t nbytes; in wc_count() 170 register Sfoff_t nchars; in wc_count() 171 register Sfoff_t nwords; in wc_count() 172 register Sfoff_t nlines; in wc_count() 173 register Sfoff_t eline = -1; in wc_count() 174 register Sfoff_t longest = 0; in wc_count()
|
/illumos-gate/usr/src/contrib/ast/src/lib/libast/stdio/ |
H A D | fsetpos.c | 35 return sfseek(f, (Sfoff_t)pos->_sf_offset, SF_PUBLIC) == (Sfoff_t)pos->_sf_offset ? 0 : -1; in fsetpos() 45 return sfseek(f, (Sfoff_t)pos->_sf_offset, SF_PUBLIC) == (Sfoff_t)pos->_sf_offset ? 0 : -1; in fsetpos64()
|
H A D | ftell.c | 35 return (long)sfseek(f, (Sfoff_t)0, SEEK_CUR); in ftell() 45 return (int64_t)sfseek(f, (Sfoff_t)0, SEEK_CUR); in ftell64()
|
H A D | ftello.c | 35 return sfseek(f, (Sfoff_t)0, SEEK_CUR); in ftello() 45 return sfseek(f, (Sfoff_t)0, SEEK_CUR) >= 0 ? 0 : -1; in ftello64()
|
H A D | fgetpos.c | 35 return (pos->_sf_offset = sfseek(f, (Sfoff_t)0, SEEK_CUR)) >= 0 ? 0 : -1; in fgetpos() 45 return (pos->_sf_offset = sfseek(f, (Sfoff_t)0, SEEK_CUR)) >= 0 ? 0 : -1; in fgetpos64()
|
H A D | fseek.c | 35 return sfseek(f, (Sfoff_t)off, op|SF_SHARE) >= 0 ? 0 : -1; in fseek() 45 return sfseek(f, (Sfoff_t)off, op|SF_SHARE) >= 0 ? 0 : -1; in fseek64()
|
H A D | fseeko.c | 35 return sfseek(f, (Sfoff_t)off, op|SF_SHARE) >= 0 ? 0 : -1; in fseeko() 45 return sfseek(f, (Sfoff_t)off, op|SF_SHARE) >= 0 ? 0 : -1; in fseeko64()
|