/titanic_41/usr/src/lib/libast/common/sfio/ |
H A D | sfdisc.c | 45 { Sfdisc_t disc; member 51 static int _dccaexcept(Sfio_t* f, int type, Void_t* val, Sfdisc_t* disc) in _dccaexcept() argument 53 static int _dccaexcept(f,type,val,disc) in _dccaexcept() 57 Sfdisc_t* disc; 60 if(disc && type == SF_FINAL) 61 free(disc); 66 static ssize_t _dccaread(Sfio_t* f, Void_t* buf, size_t size, Sfdisc_t* disc) in _dccaread() argument 68 static ssize_t _dccaread(f, buf, size, disc) in _dccaread() 72 Sfdisc_t* disc; 83 for(prev = f->disc; prev; prev = prev->disc) [all …]
|
H A D | sfraise.c | 65 reg Sfdisc_t *disc, *next, *d; local 83 for(disc = f->disc; disc; ) 84 { next = disc->disc; 86 f->disc = next; 88 if(disc->exceptf) 90 if((rv = (*disc->exceptf)(f,type,data,disc)) != 0 ) 95 if((disc = next) ) 97 for(d = f->disc; d; d = d->disc) 98 if(d == disc) 101 disc = f->disc;
|
H A D | sfsize.c | 35 Sfdisc_t* disc; local 56 { for(disc = f->disc; disc; disc = disc->disc) 57 if(disc->seekf) 59 if(!_sys_stat || disc) 61 if((e = SFSK(f,0,SEEK_END,disc)) >= 0) 63 if(SFSK(f,f->here,SEEK_SET,disc) != f->here) 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 | sfpurge.c | 44 if((f->flags&SF_IOCHECK) && f->disc && f->disc->exceptf) 45 (void)(*f->disc->exceptf)(f,SF_PURGE,(Void_t*)((int)1),f->disc); 47 if(f->disc == _Sfudisc) 62 (void)SFSK(f,f->here,SEEK_SET,f->disc); 85 (void)SFSK(f,f->here,SEEK_SET,f->disc); 94 if((f->flags&SF_IOCHECK) && f->disc && f->disc->exceptf) 95 (void)(*f->disc->exceptf)(f,SF_PURGE,(Void_t*)((int)0),f->disc);
|
/titanic_41/usr/src/lib/libast/common/disc/ |
H A D | sfdcsubstr.c | 34 Sfdisc_t disc; /* sfio discipline */ member 42 static ssize_t streamio(Sfio_t* f, Void_t* buf, size_t n, Sfdisc_t* disc, int type) in streamio() argument 44 static ssize_t streamio(f, buf, n, disc, type) in streamio() 48 Sfdisc_t* disc; 56 su = (Subfile_t*)disc; 65 parent = sfsk(f,(Sfoff_t)0,SEEK_CUR,disc); 69 if(sfsk(f,here,SEEK_SET,disc) != here) 73 io = sfwr(f,buf,n,disc); 74 else io = sfrd(f,buf,n,disc); 80 sfsk(f,parent,SEEK_SET,disc); [all …]
|
H A D | sfdcslow.c | 31 static int slowexcept(Sfio_t* f, int type, Void_t* v, Sfdisc_t* disc) in slowexcept() argument 33 static int slowexcept(f, type, v, disc) in slowexcept() 37 Sfdisc_t* disc; 42 NOTUSED(disc); 48 free(disc); 67 Sfdisc_t* disc; local 69 if(!(disc = (Sfdisc_t*)malloc(sizeof(Sfdisc_t))) ) 72 disc->readf = NIL(Sfread_f); 73 disc->writef = NIL(Sfwrite_f); 74 disc->seekf = NIL(Sfseek_f); [all …]
|
H A D | sfdcfilter.c | 31 { Sfdisc_t disc; /* discipline structure */ member 40 static ssize_t filterread(Sfio_t* f, Void_t* buf, size_t n, Sfdisc_t* disc) in filterread() argument 42 static ssize_t filterread(f, buf, n, disc) in filterread() 46 Sfdisc_t* disc; /* discipline */ 52 fi = (Filter_t*)disc; 57 { if((r = sfrd(f,fi->raw,sizeof(fi->raw),disc)) > 0) 101 static ssize_t filterwrite(Sfio_t* f, const Void_t* buf, size_t n, Sfdisc_t* disc) in filterwrite() argument 103 static ssize_t filterwrite(f, buf, n, disc) in filterwrite() 107 Sfdisc_t* disc; /* discipline */ 115 static Sfoff_t filterseek(Sfio_t* f, Sfoff_t addr, int offset, Sfdisc_t* disc) in filterseek() argument [all …]
|
H A D | sfdcseekable.c | 33 { Sfdisc_t disc; /* sfio discipline */ member 41 static ssize_t skwrite(Sfio_t* f, const Void_t* buf, size_t n, Sfdisc_t* disc) in skwrite() argument 43 static ssize_t skwrite(f, buf, n, disc) in skwrite() 47 Sfdisc_t* disc; /* discipline */ 54 static ssize_t skread(Sfio_t* f, Void_t* buf, size_t n, Sfdisc_t* disc) in skread() argument 56 static ssize_t skread(f, buf, n, disc) in skread() 60 Sfdisc_t* disc; /* discipline */ 68 sk = (Seek_t*)disc; 86 if((w = sfrd(f,buf,n,disc)) <= 0) 102 static Sfoff_t skseek(Sfio_t* f, Sfoff_t addr, int type, Sfdisc_t* disc) in skseek() argument [all …]
|
H A D | sfdctee.c | 33 { Sfdisc_t disc; /* the sfio discipline structure */ member 40 static ssize_t teewrite(Sfio_t* f, const Void_t* buf, size_t size, Sfdisc_t* disc) in teewrite() argument 42 static ssize_t teewrite(f,buf,size,disc) in teewrite() 46 Sfdisc_t* disc; /* the tee discipline */ 49 reg Tee_t* te = (Tee_t*)disc; 56 return sfwr(f,buf,size,disc); 61 static int teeexcept(Sfio_t* f, int type, Void_t* data, Sfdisc_t* disc) in teeexcept() argument 63 static int teeexcept(f,type,data,disc) in teeexcept() 67 Sfdisc_t* disc; 71 free(disc); [all …]
|
H A D | sfdcunion.c | 40 Sfdisc_t disc; /* discipline structure */ member 49 static ssize_t unwrite(Sfio_t* f, const Void_t* buf, size_t n, Sfdisc_t* disc) in unwrite() argument 51 static ssize_t unwrite(f, buf, n, disc) in unwrite() 55 Sfdisc_t* disc; /* discipline */ 62 static ssize_t unread(Sfio_t* f, Void_t* buf, size_t n, Sfdisc_t* disc) in unread() argument 64 static ssize_t unread(f, buf, n, disc) in unread() 68 Sfdisc_t* disc; /* discipline */ 74 un = (Union_t*)disc; 95 static Sfoff_t unseek(Sfio_t* f, Sfoff_t addr, int type, Sfdisc_t* disc) in unseek() argument 97 static Sfoff_t unseek(f, addr, type, disc) in unseek() [all …]
|
H A D | sfdcdos.c | 41 Sfdisc_t disc; member 109 static ssize_t dos_read(Sfio_t *iop, void *buff, size_t size, Sfdisc_t* disc) in dos_read() argument 111 static ssize_t dos_read(iop, buff, size, disc) in dos_read() 115 Sfdisc_t* disc; 118 register Dosdisc_t *dp = (Dosdisc_t*)disc; 129 if((n = sfrd(iop,buff,size,disc)) <= 0) 276 static Sfoff_t dos_seek(Sfio_t *iop, Sfoff_t offset, register int whence, Sfdisc_t* disc) in dos_seek() argument 278 static Sfoff_t dos_seek(iop, offset, whence, disc) in dos_seek() 282 Sfdisc_t* disc; 285 register Dosdisc_t *dp = (Dosdisc_t*)disc; [all …]
|
H A D | sfdcdio.c | 35 { Sfdisc_t disc; /* Sfio discipline */ member 105 static ssize_t dioread(Sfio_t* f, Void_t* buf, size_t n, Sfdisc_t* disc) in dioread() argument 107 static ssize_t dioread(f, buf, n, disc) in dioread() 111 Sfdisc_t* disc; 114 return diordwr(f, buf, n, (Direct_t*)disc, SF_READ); 118 static ssize_t diowrite(Sfio_t* f, const Void_t* buf, size_t n, Sfdisc_t* disc) in diowrite() argument 120 static ssize_t diowrite(f, buf, n, disc) in diowrite() 124 Sfdisc_t* disc; 127 return diordwr(f, (Void_t*)buf, n, (Direct_t*)disc, SF_WRITE); 131 static int dioexcept(Sfio_t* f, int type, Void_t* data, Sfdisc_t* disc) in dioexcept() argument [all …]
|
/titanic_41/usr/src/lib/libast/common/cdt/ |
H A D | dtdisc.c | 32 static Void_t* dtmemory(Dt_t* dt,Void_t* addr,size_t size,Dtdisc_t* disc) in dtmemory() argument 34 static Void_t* dtmemory(dt, addr, size, disc) in dtmemory() 38 Dtdisc_t* disc; /* discipline */ 52 Dtdisc_t* dtdisc(Dt_t* dt, Dtdisc_t* disc, int type) in dtdisc() argument 54 Dtdisc_t* dtdisc(dt,disc,type) in dtdisc() 56 Dtdisc_t* disc; 65 if(!(old = dt->disc) ) /* initialization call from dtopen() */ 66 { dt->disc = disc; 67 if(!(dt->memoryf = disc->memoryf) ) 69 return disc; [all …]
|
H A D | dtopen.c | 31 Dt_t* dtopen(Dtdisc_t* disc, Dtmethod_t* meth) in dtopen() argument 33 Dt_t* dtopen(disc, meth) in dtopen() 34 Dtdisc_t* disc; in dtopen() 42 if(!disc || !meth) 52 dt->disc = NIL(Dtdisc_t*); 53 dtdisc(dt,disc,0); 59 if(disc->eventf) 62 if((e = (*disc->eventf)(dt,DT_OPEN,(Void_t*)(&data),disc)) < 0) 71 if(!disc->memoryf) 75 if(!(dt = (*disc->memoryf)(0, 0, sizeof(Dt_t), disc)) ) [all …]
|
H A D | dthash.c | 48 if(dt->disc && dt->disc->eventf && 49 (*dt->disc->eventf)(dt, DT_HASHSIZE, &n, dt->disc) > 0 ) 75 if(!(s = (Dtlink_t**)(*dt->memoryf)(dt,olds,n*sizeof(Dtlink_t*),dt->disc)) ) 113 reg Dtdisc_t* disc; local 119 disc = dt->disc; _DTDSC(disc,ky,sz,lk,cmpf); 135 if(!disc->freef && disc->link >= 0) 139 if(disc->freef) 140 (*disc->freef)(dt,_DTOBJ(t,lk),disc); 141 if(disc->link < 0) 142 (*dt->memoryf)(dt,(Void_t*)t,0,disc); [all …]
|
H A D | dtclose.c | 35 Dtdisc_t *disc; local 42 disc = dt->disc; 43 if(disc->eventf && 44 (ev = (*disc->eventf)(dt,DT_CLOSE,NIL(Void_t*),disc)) < 0) 56 (*dt->memoryf)(dt,(Void_t*)dt->data->htab,0,disc); 57 (*dt->memoryf)(dt,(Void_t*)dt->data,0,disc); 63 (*dt->memoryf)(dt, (Void_t*)dt, 0, disc); 65 if(disc->eventf) 66 (void)(*disc->eventf)(dt, DT_ENDCLOSE, NIL(Void_t*), disc);
|
H A D | dtlist.c | 40 reg Dtdisc_t* disc; local 45 disc = dt->disc; _DTDSC(disc,ky,sz,lk,cmpf); 63 { if(disc->freef || disc->link < 0) 66 if(disc->freef) 67 (*disc->freef)(dt,_DTOBJ(r,lk),disc); 68 if(disc->link < 0) 69 (*dt->memoryf)(dt,(Void_t*)r,0,disc); 80 { if(disc->makef && (type&DT_INSERT) && 81 !(obj = (*disc->makef)(dt,obj,disc)) ) 87 (dt,NIL(Void_t*),sizeof(Dthold_t),disc); [all …]
|
H A D | dttree.c | 47 Dtdisc_t* disc; local 50 disc = dt->disc; _DTDSC(disc,ky,sz,lk,cmpf); 59 { if(disc->freef || disc->link < 0) 64 if(disc->freef) 65 (*disc->freef)(dt,_DTOBJ(root,lk),disc); 66 if(disc->link < 0) 67 (*dt->memoryf)(dt,(Void_t*)root,0,disc); 98 if(_DTCMP(dt,key,k,disc,cmpf,sz) != 0) 129 if((cmp = _DTCMP(dt,key,k,disc,cmpf,sz)) == 0) 171 if((cmp = _DTCMP(dt,key,k,disc,cmpf,sz)) == 0) [all …]
|
H A D | dtnew.c | 38 eventf(Dt_t* dt, int op, void* data, Dtdisc_t* disc) in eventf() argument 40 Dc_t* dc = (Dc_t*)disc; in eventf() 49 memoryf(Dt_t* dt, void* addr, size_t size, Dtdisc_t* disc) in memoryf() argument 51 return vmresize(((Dc_t*)disc)->vm, addr, size, VM_RSMOVE); in memoryf() 59 dtnew(Vmalloc_t* vm, Dtdisc_t* disc, Dtmethod_t* meth) in dtnew() argument 64 dc.odisc = disc; in dtnew() 65 dc.ndisc = *disc; in dtnew() 71 dtdisc(dt, disc, DT_SAMECMP|DT_SAMEHASH); in dtnew()
|
H A D | dtmethod.c | 38 reg Dtdisc_t* disc = dt->disc; local 44 if(disc->eventf && 45 (*disc->eventf)(dt,DT_METH,(Void_t*)meth,disc) < 0) 57 (*dt->memoryf)(dt,(Void_t*)dt->data->htab,0,disc); 97 { reg Void_t* key = _DTOBJ(list,disc->link); 98 key = _DTKEY(key,disc->key,disc->size); 99 list->hash = _DTHSH(dt,key,disc,disc->size);
|
/titanic_41/usr/src/lib/libast/common/regex/ |
H A D | regsubcomp.c | 49 regdisc_t* disc; in regsubflags() local 66 disc = p->env->disc; in regsubflags() 68 return fatal(disc, REG_EFLAGS, s - 1); in regsubflags() 81 disc = p->env->disc; in regsubflags() 83 return fatal(disc, REG_EFLAGS, s - 1); in regsubflags() 124 regdisc_t* disc; in regsubcomp() local 126 disc = p->env->disc; in regsubcomp() 130 return fatal(disc, REG_BADPAT, NiL); in regsubcomp() 132 …sub = (regsub_t*)alloc(p->env->disc, 0, sizeof(regsub_t) + strlen(s))) || !(sub->re_ops = (regsubo… in regsubcomp() 135 alloc(p->env->disc, sub, 0); in regsubcomp() [all …]
|
H A D | regerror.c | 85 fatal(regdisc_t* disc, int code, const char* pattern) in fatal() argument 87 if (disc->re_errorf) in fatal() 90 …(*disc->re_errorf)(NiL, disc, disc->re_errorlevel, "regular expression: %s: %s", pattern, reg_erro… in fatal() 92 (*disc->re_errorf)(NiL, disc, disc->re_errorlevel, "regular expression: %s", reg_error[code+1]); in fatal()
|
/titanic_41/usr/src/lib/libast/common/misc/ |
H A D | fastfind.c | 162 findopen(const char* file, const char* pattern, const char* type, Finddisc_t* disc) in findopen() argument 194 if (disc->flags & FIND_GENERATE) in findopen() 200 fp->disc = disc; in findopen() 285 if (fp->disc->errorf) in findopen() 286 (*fp->disc->errorf)(fp, fp->disc, 2, "%s: cannot locate codes", file ? file : findcodes[2]); in findopen() 289 if (fp->disc->flags & FIND_OLD) in findopen() 299 if (fp->disc->errorf) in findopen() 300 (*fp->disc->errorf)(fp, fp->disc, ERROR_SYSTEM|2, "cannot create tmp file"); in findopen() 320 if (fp->disc->errorf) in findopen() 321 …(*fp->disc->errorf)(fp, fp->disc, ERROR_SYSTEM|2, "%s: cannot create tmp file in this directory", … in findopen() [all …]
|
/titanic_41/usr/src/lib/libast/common/vmalloc/ |
H A D | vmdisc.c | 37 Vmdisc_t* vmdisc(Vmalloc_t* vm, Vmdisc_t* disc) in vmdisc() argument 39 Vmdisc_t* vmdisc(vm, disc) in vmdisc() 41 Vmdisc_t* disc; 44 Vmdisc_t* old = vm->disc; 46 if(disc) 47 { if(disc->memoryf != old->memoryf) 50 (*old->exceptf)(vm,VM_DISC,(Void_t*)disc,old) != 0 ) 52 vm->disc = disc;
|
/titanic_41/usr/src/lib/libshell/common/sh/ |
H A D | nvdisc.c | 31 int nv_compare(Dt_t* dict, Void_t *sp, Void_t *dp, Dtdisc_t *disc) in nv_compare() argument 50 if(!fp->disc || (!fp->disc->getnum && !fp->disc->getval)) in nv_getv() 55 if(fp && fp->disc->getval) in nv_getv() 56 cp = (*fp->disc->getval)(np,fp); in nv_getv() 57 else if(fp && fp->disc->getnum) in nv_getv() 59 sfprintf(sh.strbuf,"%.*Lg",12,(*fp->disc->getnum)(np,fp)); in nv_getv() 83 if(!fp->disc || (!fp->disc->getnum && !fp->disc->getval)) in nv_getn() 85 if(!fp->disc->getnum && nv_isattr(np,NV_INTEGER)) in nv_getn() 90 if(fp && fp->disc && fp->disc->getnum) in nv_getn() 91 d = (*fp->disc->getnum)(np,fp); in nv_getn() [all …]
|