Searched refs:tab (Results 1 - 25 of 71) sorted by relevance

123

/ast/src/lib/libast/hash/
H A Dhashlast.c24 /* OBSOLETE 19960229 -- use tab->root->last.{table|bucket} */
40 hashlast(Hash_table_t* tab) argument
42 return(tab->root->last.bucket);
H A Dhashalloc.c43 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 Dhashfree.c40 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 Dhashscan.c37 * 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 Dhashsize.c38 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 Dhashlook.c37 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...]
H A Dhashdump.c53 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 Dhashwalk.c37 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)
/ast/src/cmd/dsslib/ip_t/
H A Dptvopen.c130 * 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...]
H A Dptmatch.c30 ptmatch(Pt_t* tab, Ptaddr_t addr) argument
35 return (Ptprefix_t*)dtsearch(tab->dict, &key);
H A Dptvmatch.c30 ptvmatch(Ptv_t* tab, unsigned char* addr) argument
35 return (Ptvprefix_t*)dtsearch(tab->dict, &key);
H A Dptopen.c111 * 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...]
/ast/src/lib/libvdelta/
H A Dvdexpand.c35 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 Dvdupdate.c54 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...]
H A Dvddelta.c53 static int vdputinst(Table_t* tab, uchar* begs, uchar* here, reg int copy, int n_copy) argument
55 static int vdputinst(tab, begs, here, copy, n_copy)
56 Table_t* tab;
67 c_addr = (here-tab->tar)+tab->n_src; /* current address */
80 { if((d = copy - tab->recent[n]) < 0 || d >= best)
85 if(best >= I_MORE && tab->quick[n = copy%K_QSIZE] == copy)
97 K_UPDATE(tab->quick,tab->recent,tab
150 vdfold(Table_t* tab, reg uchar* fold, reg uchar* endfold, int target) argument
303 vdprocess(Table_t* tab) argument
378 Table_t tab; local
[all...]
H A Dvdsqueeze.c51 static int vdputinst(Table_t* tab, uchar* begs, uchar* here, reg int copy, int n_copy) argument
53 static int vdputinst(tab, begs, here, copy, n_copy)
54 Table_t* tab;
66 c_addr = here-tab->tar; /* current address */
79 { if((d = copy - tab->recent[n]) < 0 || d >= best)
84 if(best >= I_MORE && tab->quick[n = copy%K_QSIZE] == copy)
96 K_UPDATE(tab->quick,tab->recent,tab->rhere,copy);
116 STRPUTC(tab, i_ad
140 vdfold(Table_t* tab) argument
278 Table_t tab; local
[all...]
H A Dvdelhdr.h228 #define STRPUTC(tab,c) (*(tab)->delta++ = (uchar)(c))
229 #define STRWRITE(tab,s,n) {memcpy((tab)->delta,(s),(n)); (tab)->delta += (n);}
230 #define STRPUTU(tab,u,buf) \
234 memcpy((tab)->delta,s,v); (tab)->delta += v; \
236 #define STRGETC(tab) (*(tab)
[all...]
/ast/src/lib/libvdelta/vd01/
H A Dvdupdate01.c52 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...]
H A Dvddelta01.c57 static int vdputinst(Table_t* tab, uchar* begs, uchar* here, Match_t* match, int n_copy) argument
59 static int vdputinst(tab, begs, here, match, n_copy)
60 Table_t* tab;
71 c_addr = (here-tab->tar)+tab->n_src; /* current address */
77 best = copy = match - tab->base;
84 { if((d = copy - tab->recent[n]) < 0 || d >= best)
89 if(best >= I_MORE && tab->quick[n = copy%K_QSIZE] == copy)
101 K_UPDATE(tab->quick,tab
158 vdfold(Table_t* tab, int output) argument
323 Table_t tab; local
[all...]
/ast/src/lib/libast/tm/
H A Dtmlex.c35 * 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/lib/libast/string/
H A Dstrlook.c31 * 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 Dstrsearch.c32 * 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 Dstropt.c32 * 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))
/ast/src/cmd/3d/
H A Dmount3d.c33 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/cmd/std/
H A Dtsort.c101 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);

Completed in 27 milliseconds

123