/ast/src/lib/libast/hash/ |
H A D | hashlast.c | 24 /* OBSOLETE 19960229 -- use tab->root->last.{table|bucket} */ 40 hashlast(Hash_table_t* tab) argument 42 return(tab->root->last.bucket);
|
H A D | hashwalk.c | 37 hashwalk(Hash_table_t* tab, int flags, register int (*walker)(const char*, char*, void*), void* handle) argument 43 if (!(pos = hashscan(tab, flags))) 47 if ((v = (*walker)(hashname(b), (tab->flags & HASH_VALUE) ? b->value : (char*)b, handle)) < 0)
|
H A D | hashalloc.c | 43 register Hash_table_t* tab; local 65 if (!(tab = (Hash_table_t*)(*region)(handle, NiL, sizeof(Hash_table_t), 0))) 67 memset(tab, 0, sizeof(Hash_table_t)); 69 else if (!(tab = newof(0, Hash_table_t, 1, 0))) 71 tab->bucketsize = (sizeof(Hash_header_t) + sizeof(char*) - 1) / sizeof(char*); 74 tab->flags = ref->flags & ~HASH_RESET; 75 tab->root = ref->root; 82 if (!(tab->root = (Hash_root_t*)(*region)(handle, NiL, sizeof(Hash_root_t), 0))) 84 memset(tab->root, 0, sizeof(Hash_root_t)); 86 else if (!(tab [all...] |
H A D | hashdump.c | 53 dumpbucket(register Hash_table_t* tab, int flags) argument 62 sx = tab->table + tab->size; 63 for (sp = tab->table; sp < sx; sp++) 67 if (!(b->hash & HASH_DELETED) && (!(tab->flags & HASH_VALUE) || b->value)) 71 sfprintf(sfstderr, "%5d %2d :", sp - tab->table, n); 73 if (!(b->hash & HASH_DELETED) && (!(tab->flags & HASH_VALUE) || b->value)) 75 if (n = tab->root->namesize) 91 if (tab->flags & HASH_VALUE) sfprintf(sfstderr, "=0x%08lx", (long)b->value); 104 dumptable(register Hash_table_t* tab, registe argument 136 register Hash_table_t* tab; local 164 hashdump(register Hash_table_t* tab, int flags) argument [all...] |
H A D | hashfree.c | 40 hashfree(register Hash_table_t* tab) argument 53 if (!tab) return(0); 54 if (tab->table) 58 if (tab->root->local->free) 60 if (tab->root->flags & HASH_BUCKET) freebucket = tab->root->local->free; 61 else freevalue = tab->root->local->free; 63 if (region = tab->root->local->region) 64 handle = tab->root->local->handle; 65 sx = &tab [all...] |
H A D | hashscan.c | 37 * pos = hashscan(tab, flags); 47 hashscan(register Hash_table_t* tab, register int flags) argument 54 pos->tab = tab->root->last.table = tab; 56 pos->slot = tab->table - 1; 57 pos->limit = tab->table + tab->size; 58 if (tab->scope && !(flags & HASH_NOSCOPE)) 65 if (tab [all...] |
H A D | hashsize.c | 38 hashsize(register Hash_table_t* tab, int size) argument 49 if (size > 0 && size != tab->size && !(size & (size - 1))) 51 if (region = tab->root->local->region) 53 handle = tab->root->local->handle; 57 if (!new_s) tab->flags |= HASH_FIXED; 60 old_sx = (old_s = tab->table) + tab->size; 61 tab->size = size; 70 HASHMOD(tab, index); 75 if ((tab [all...] |
H A D | hashlook.c | 37 hashlook(register Hash_table_t* tab, const char* name, long flags, const char* value) argument 62 HASHMOD(tab, n); 63 for (b = tab->table[n]; b; b = b->next) 70 if (!(tab = tab->scope) || (flags & HASH_NOSCOPE)) 75 tab->root->accesses++; 76 top = tab; 77 last = &tab->root->last; 80 last->table = tab; 89 else if (tab [all...] |
/ast/src/cmd/dsslib/ip_t/ |
H A D | ptmatch.c | 30 ptmatch(Pt_t* tab, Ptaddr_t addr) argument 35 return (Ptprefix_t*)dtsearch(tab->dict, &key);
|
H A D | ptvmatch.c | 30 ptvmatch(Ptv_t* tab, unsigned char* addr) argument 35 return (Ptvprefix_t*)dtsearch(tab->dict, &key);
|
H A D | ptopen.c | 111 * insert prefix range min..max into tab 116 ptinsert(Pt_t* tab, Ptaddr_t min, Ptaddr_t max) argument 122 tab->entries++; 124 if (!(xp = (Ptprefix_t*)dtsearch(tab->dict, &key))) 125 xp = (Ptprefix_t*)dtnext(tab->dict, &key); 141 xp = (Ptprefix_t*)dtnext(tab->dict, xp); 142 dtdelete(tab->dict, pp); 148 return (Ptprefix_t*)dtinsert(tab->dict, &key); 152 * delete prefix range min..max from tab 157 ptdelete(Pt_t* tab, Ptaddr_ argument [all...] |
H A D | ptvopen.c | 130 * insert prefix range min..max into tab 135 ptvinsert(Ptv_t* tab, Ptvaddr_t min, Ptvaddr_t max) argument 141 tab->entries++; 142 fvset(tab->size, tab->r[2], 1); 143 if (fvcmp(tab->size, min, tab->r[2]) >= 0) 145 fvsub(tab->size, tab->r[3], min, tab 190 ptvdelete(Ptv_t* tab, Ptvaddr_t min, Ptvaddr_t max) argument [all...] |
/ast/src/lib/libast/string/ |
H A D | strlook.c | 31 * return pointer to name in tab with element size siz 34 * the last name in tab must be 0 40 strlook(const void* tab, size_t siz, register const char* name) argument 42 register char* t = (char*)tab;
|
H A D | strpsearch.c | 40 * name in the CC_ASCII sorted tab of num elements of 53 strpsearch(const void* tab, size_t num, size_t siz, const char* name, char** next) argument 55 register char* lo = (char*)tab;
|
H A D | strsearch.c | 32 * name in the (*comparf*)() sorted tab of num elements of 40 strsearch(const void* tab, size_t num, size_t siz, Strcmp_f comparf, const char* name, void* context) argument 42 register char* lo = (char*)tab;
|
H A D | stropt.c | 32 * parse option expression in s using options in tab with element size siz 33 * first element in tab must be a char* 43 * p matching tab entry, or name if no table 49 * names in s may be shorter than tab names 50 * longer names must have a prefix that matches a tab name 56 stropt(const char* as, const void* tab, int siz, int(*f)(void*, const void*, int, const char*), void* a) argument 89 if (tab) 91 for (p = (char**)tab; t = *p; p = (char**)((char*)p + siz))
|
H A D | ccmap.c | 43 static const unsigned char tab[] = variable 609 #define MAPS (sizeof(tab)/MAP) 637 return (unsigned char*)tab; 658 return (unsigned char*)tab + MAP * (2 * (o - 1)); 660 return (unsigned char*)tab + MAP * (2 * (i - 1) + 1); 668 a = (unsigned char*)tab + MAP * (2 * (o - 1)); 669 z = (unsigned char*)tab + MAP * (2 * (i - 1) + 1);
|
/ast/src/lib/libast/tm/ |
H A D | tmlex.c | 35 * return the tab table index that matches s ignoring case and .'s 38 * ntab and nsuf are the number of elements in tab and suf, 48 tmlex(register const char* s, char** e, char** tab, int ntab, char** suf, int nsuf) argument 54 for (p = tab, n = ntab; n-- && (x = *p); p++) 56 return p - tab; 57 if (tm_info.format != tm_data.format && tab >= tm_info.format && tab < tm_info.format + TM_NFORM) 59 tab = tm_data.format + (tab - tm_info.format); 60 if (suf && tab > [all...] |
/ast/src/cmd/3d/ |
H A D | mount3d.c | 33 Table_t* tab; local 45 tab = &state.vmap; 48 tab = &state.vpath; 51 tab = 0; 91 if ((r = mapdump(tab, NiL, 0)) >= 0 && r < size) 93 mapdump(tab, path, 0); 97 else if (tab == &state.vmap) 103 else if (!(map = search(tab, state.path.name, strlen(state.path.name), NiL, 0))) 144 else if (tab && spc) return(mapset(tab, pat [all...] |
/ast/src/lib/libvdelta/ |
H A D | vdexpand.c | 35 static int vdunfold(reg Table_t* tab) argument 37 static int vdunfold(tab) 38 reg Table_t* tab; 46 n_tar = tab->n_tar; 47 tar = tab->tar; 50 { inst = STRGETC(tab); 59 { STRGETU(tab,size); 67 STRREAD(tab,tar+t,size); 80 { STRGETU(tab,size); 88 { copy = STRGETC(tab); 130 Table_t tab; local [all...] |
H A D | vdupdate.c | 54 static int vdunfold(Utable_t* tab) argument 56 static int vdunfold(tab) 57 Utable_t* tab; 66 n_tar = tab->n_tar; 67 tar = tab->tar; 68 n_src = tab->n_src; 69 src = tab->src; 70 target = tab->target; 71 source = tab->source; 74 { if((inst = VDGETC((Vdio_t*)tab)) < 273 Utable_t tab; local [all...] |
/ast/src/cmd/std/ |
H A D | tsort.c | 101 Hash_table_t* tab; local 104 if (!(tab = hashalloc(NiL, HASH_set, HASH_ALLOCATE, 0))) 116 if (!(x = (Node_t*)hashlook(tab, b, HASH_CREATE|HASH_SIZE(sizeof(Node_t)), 0))) 138 if (pos = hashscan(tab, 0)) 146 hashfree(tab);
|
/ast/src/lib/libsum/ |
H A D | sum-crc.c | 51 Crcnum_t tab[256]; member in struct:Crc_s 56 #define CRC(p,s,c) (s = (s >> 8) ^ (p)->tab[(s ^ (c)) & 0xff]) 57 #define CRCROTATE(p,s,c) (s = (s << 8) ^ (p)->tab[((s >> 24) ^ (c)) & 0xff]) 109 for (i = 0; i < elementsof(sum->tab); i++) 119 sum->tab[i] = t; 124 for (i = 0; i < elementsof(sum->tab); i++) 129 sum->tab[i] = x;
|
/ast/src/cmd/INIT/ |
H A D | release.c | 114 string(register char* s, char* tab, int num, int siz, char** e) argument 125 for (j = 0; j < siz && buf[j] == tab[j+i]; j++)
|
/ast/src/lib/libvdelta/vd01/ |
H A D | vdupdate01.c | 52 static int vdunfold(Table_t* tab) argument 54 static int vdunfold(tab) 55 Table_t* tab; 64 n_tar = tab->n_tar; 65 tar = tab->tar; 66 n_src = tab->n_src; 67 src = tab->src; 68 target = tab->target; 69 source = tab->source; 72 { if((inst = VDGETC((Vdio_t*)tab)) < 271 Table_t tab; local [all...] |