/ast/src/lib/libast/stdio/ |
H A D | _stdvbuf.c | 29 _stdsetvbuf(Sfio_t* f, char* buf, int type, size_t size) argument 31 return setvbuf(f, buf, type, size);
|
H A D | fmemopen.c | 27 fmemopen(void* buf, size_t size, const char* mode) argument 29 STDIO_PTR(0, "fmemopen", Sfio_t*, (void*, size_t, const char*), (buf, size, mode)) 31 return sfnew(NiL, buf, size, -1, SF_STRING|_sftype(mode, NiL, NiL, NiL));
|
H A D | setvbuf.c | 27 setvbuf(Sfio_t* f, char* buf, int type, size_t size) argument 29 STDIO_INT(f, "setvbuf", int, (Sfio_t*, char*, int, size_t), (f, buf, type, size)) 42 if (size == 0) 43 size = SF_BUFSIZE; 45 sfsetbuf(f, (Void_t*)buf, size);
|
/ast/src/lib/libcodex/ |
H A D | codexsize.c | 25 * set expected output size 31 codexsize(Sfio_t* sp, Sfoff_t size) argument 33 return sfraise(sp, CODEX_SIZE, &size);
|
/ast/src/lib/libast/sfio/ |
H A D | sfresize.c | 29 int sfresize(Sfio_t* f, Sfoff_t size) argument 31 int sfresize(f, size) 33 Sfoff_t size; 40 if(size < 0 || f->extent < 0 || 49 if(f->extent >= size) 50 { if((f->flags&SF_MALLOC) && (f->next - f->data) <= size) 51 { size_t s = (((size_t)size + 1023)/1024)*1024; 53 if(s < f->size && (d = realloc(f->data, s)) ) 55 f->size = s; 59 memclear((char*)(f->data+size), (in [all...] |
/ast/src/cmd/dsslib/ip_t/ |
H A D | ivopen.c | 26 ivopen(Ivdisc_t* disc, Ivmeth_t* meth, int size, const char* options) argument 30 if (!disc || !meth || !(iv = newof(0, Iv_t, 1, 3 * size))) 36 fvset(size, iv->unit, 1); 37 iv->r1 = iv->unit + size; 38 iv->r2 = iv->r1 + size; 39 iv->size = size;
|
H A D | ptvstats.c | 48 bits = a->size * 8; 49 if (!(addresses = (unsigned char**)newof(0, unsigned char, (2 * (bits + 1)) * (sizeof(unsigned char*) + a->size), 0))) 57 total_prefixes = total_addresses + a->size; 58 v = total_prefixes + a->size; 62 v += a->size; 64 v += a->size; 68 if (fvcmp(a->size, a->r[3], a->r[1]) < 0) 70 fvnot(a->size, a->r[3], a->r[3]); 71 fvadd(a->size, addresses[b], addresses[b], a->r[1]); 72 fvadd(a->size, total_addresse [all...] |
H A D | ptvaddresses.c | 34 fvset(a->size, r, 0); 35 fvset(a->size, a->r[1], 1); 38 fvsub(a->size, a->r[0], ap->max, ap->min); 39 fvadd(a->size, a->r[0], a->r[0], a->r[1]); 40 fvadd(a->size, r, r, a->r[0]);
|
H A D | ptvlib.h | 50 fvset((t)->size, (t)->r[1], 1); \ 53 fvcpy((t)->size, (t)->r[2], _pt_p->min); \ 56 fvcpy((t)->size, (t)->r[0], (t)->r[2]); \ 57 fvset((t)->size, (t)->r[3], 1); \ 58 b = (t)->size * 8; \ 61 if (fvcmp((t)->size, (t)->r[3], (t)->r[1]) < 0) \ 63 if (fvodd((t)->size, (t)->r[0])) \ 65 fvlsh((t)->size, (t)->r[4], (t)->r[3], 1); \ 66 fvsub((t)->size, (t)->r[5], (t)->r[4], (t)->r[1]); \ 67 fvior((t)->size, ( [all...] |
H A D | ptvinvert.c | 35 if (t = ptvopen(a->disc, a->size)) 37 fvset(a->size, a->r[0], 0); 38 fvset(a->size, a->r[1], 1); 41 if (fvcmp(a->size, a->r[0], ap->min) < 0) 43 fvsub(a->size, a->r[2], ap->min, a->r[1]); 47 fvadd(a->size, a->r[0], ap->max, a->r[1]); 49 fvset(a->size, a->r[2], 0); 50 if (fvcmp(a->size, a->r[0], a->r[1]) > 0 || !dtsize(a->dict)) 52 fvset(a->size, a->r[2], 0); 53 fvsub(a->size, [all...] |
/ast/src/lib/libast/vmalloc/ |
H A D | vmgetmem.c | 37 Void_t* vmgetmem(Vmalloc_t* vm, Void_t* data, size_t size) argument 39 Void_t* vmgetmem(vm, data, size) 42 size_t size; 47 if (data || size) 48 return vmresize(vm, data, size, VM_RSMOVE|VM_RSCOPY|VM_RSZERO);
|
/ast/src/lib/libvcodex/ |
H A D | vcqsort.c | 36 void vcqsort(Void_t* list, ssize_t n, ssize_t size, Vccompare_f comparf, Void_t* disc) argument 38 void vcqsort(list, n, size, sortf, disc) 41 ssize_t size; /* size in byte of each object */ 53 { if((*comparf)(base, base+size, disc) > 0) 54 SWAP(base, base+size, size); 59 { if((*comparf)(base, base + l*size, disc) >= 0) 62 SWAP(base + l*size, base + r*size, siz [all...] |
H A D | vcbuffer.c | 28 Vcchar_t* _vcbuffer(Vcodex_t* vc, Vcchar_t* trunc, ssize_t size, ssize_t head) argument 30 Vcchar_t* _vcbuffer(vc, trunc, size, head) 33 ssize_t size; /* the size needed for buffered data */ 50 if(trunc >= b->buf && trunc < b->buf+b->size) 59 if(size < 0 ) /* just free the buffer */ 60 { /**/DEBUG_SET(Busy, Busy - b->size); 63 /**/DEBUG_PRINT(2,"size=%d\n",b->size); 65 vc->busy -= b->size; [all...] |
/ast/src/lib/libast/astsa/ |
H A D | vmalloc.c | 42 vp->size = sizeof(vp->current->data); 66 _vm_resize(register Vmalloc_t* vp, void* o, unsigned long size) argument 73 vp->last = size; 74 if (o && size < z) 76 if ((o ? (size - z) : size) > vp->size) 78 n = (size > sizeof(vp->current->data)) ? (size - sizeof(vp->current->data)) : 0; 83 vp->size [all...] |
/ast/src/lib/libvdelta/ |
H A D | vdexpand.c | 41 reg int size, copy; local 55 size = A_TGET(inst); 56 else if(A_ISHERE(inst)) /* locally coded ADD size */ 57 size = A_LGET(inst); 58 else /* non-local ADD size */ 59 { STRGETU(tab,size); 60 size = A_GET(size); 62 if((t+size) > n_tar) /* out of sync */ 64 c_addr += size; 121 vdexpand(Void_t* target, int size, Void_t* delta) argument [all...] |
/ast/src/lib/libdss/ |
H A D | dssmagic.c | 33 dssmagic(Dss_t* dss, Sfio_t* sp, const char* name, const char* type, uint32_t version, size_t size) argument 45 magic.size = size; 47 while (size < sizeof(magic)) 48 size += magic.size; 49 for (n = size; size > sizeof(magic); size--)
|
/ast/src/cmd/mailx/port/ |
H A D | dtsize.c | 92 reg int size; local 96 if(dt->data->size < 0) /* !(dt->data->type&DT_HASH) */ 98 dt->data->size = dtcount(dt->data->here); 101 for(size = 0; t; t = t->right) 102 size += 1; 103 dt->data->size = size; 107 return dt->data->size;
|
/ast/src/cmd/3d/ |
H A D | ftruncate3d.c | 36 ftruncate64(int fd, off64_t size) argument 45 if (!fscall(NiL, MSG_ftruncate, 0, fd, size)) 51 for (m = state.trap.size - 1; m >= 0; m--) 56 n = state.trap.size; 57 state.trap.size = m; 58 r = (*state.trap.intercept[m].call)(&state.trap.intercept[m], MSG_truncate, SYS3D_ftruncate64, (void*)fd, (void*)&size, NiL, NiL, NiL, NiL); 59 state.trap.size = n; 62 r = (*realf)(fd, size); 67 fscall(mp, MSG_ftruncate, 0, fd, size); 70 fscall(mp, MSG_ftruncate, 0, fd, size); 79 ftruncate3d(int fd, off_t size) argument [all...] |
H A D | truncate3d.c | 36 truncate643d(const char* path, off64_t size) argument 46 if (!fscall(NiL, MSG_truncate, 0, path, size)) 54 for (m = state.trap.size - 1; m >= 0; m--) 59 n = state.trap.size; 60 state.trap.size = m; 61 r = (*state.trap.intercept[m].call)(&state.trap.intercept[m], MSG_truncate, SYS3D_truncate64, (void*)sp, (void*)&size, NiL, NiL, NiL, NiL); 62 state.trap.size = n; 65 r = (*realf)(sp, size); 70 fscall(mp, MSG_truncate, 0, path, size); 73 fscall(NiL, MSG_truncate, 0, path, size); 82 truncate3d(const char* path, off_t size) argument [all...] |
/ast/src/lib/libast/hash/ |
H A D | hashsize.c | 33 * change table size and rehash 34 * size must be a power of 2 38 hashsize(register Hash_table_t* tab, int size) argument 49 if (size > 0 && size != tab->size && !(size & (size - 1))) 54 new_s = (Hash_bucket_t**)(*region)(handle, NiL, sizeof(Hash_bucket_t*) * size, 0); 56 else new_s = newof(0, Hash_bucket_t*, size, [all...] |
/ast/src/cmd/tests/vmalloc/ |
H A D | tsafemalloc.c | 35 size_t size[N_ALLOC]; member in struct:_thread_s 43 size_t size, total; local 49 { size = random() % 1024 + 1; 50 if(!(tdata->list[k] = malloc(size)) ) 51 terror("Thread %d: failed to malloc(%d), total=%d", thread, size, total); 53 { tdata->size[k] = size; 54 total += size; 55 memset(tdata->list[k], 1, size); 62 { size [all...] |
/ast/src/lib/libast/string/ |
H A D | swapop.c | 35 * if size<0 then (-size) used and (-size==4)&&(op==3) => op=7 40 swapop(const void* internal, const void* external, int size) argument 46 if ((z = size) < 0) 54 if (size < 0 && z == 4 && op == 3)
|
/ast/src/lib/libdll/ |
H A D | dllfind.c | 33 * if path!=0 then library path up to size chars copied to path with trailing 0 38 dllfind(const char* lib, const char* ver, int flags, char* path, size_t size) argument 43 if ((id = error_info.id) && (dll = dllplug(id, lib, ver, flags, path, size))) 45 return dllplug(NiL, lib, ver, flags, path, size);
|
/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 31 if (size < 3 || buf[0] != 0x42 || buf[1] != 0x5a || buf[2] != 0x68) 33 ap->uncompressed = ap->io->size * 7;
|
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 31 if (size < 2 || buf[0] != 0x1f || buf[1] != 0x9d) 33 ap->uncompressed = ap->io->size * 3;
|