Lines Matching defs:bucket

306 	NODE *bucket, *next;
311 for (bucket = symbol->var_array[i]; bucket != NULL; bucket = next) {
312 next = bucket->ahnext;
313 unref(bucket->ahvalue);
314 unref(bucket); /* unref() will free the ahname_str */
416 register NODE *bucket;
421 for (bucket = symbol->var_array[hash1]; bucket != NULL;
422 bucket = bucket->ahnext) {
427 s1_str = bucket->ahname_str;
428 s1_len = bucket->ahname_len;
434 return bucket;
482 register NODE *bucket;
497 bucket = assoc_find(symbol, subs, hash1);
498 if (bucket != NULL) {
500 return &(bucket->ahvalue);
525 getnode(bucket);
526 bucket->type = Node_ahash;
536 bucket->flags |= MALLOC;
537 bucket->ahname_ref = 1;
538 emalloc(bucket->ahname_str, char *, subs->stlen + 2, "assoc_lookup");
539 bucket->ahname_len = subs->stlen;
541 memcpy(bucket->ahname_str, subs->stptr, subs->stlen);
542 bucket->ahname_str[bucket->ahname_len] = '\0';
546 bucket->ahvalue = Nnull_string;
547 bucket->ahnext = symbol->var_array[hash1];
548 symbol->var_array[hash1] = bucket;
549 return &(bucket->ahvalue);
563 register NODE *bucket, *last;
584 for (bucket = symbol->var_array[hash1]; bucket != NULL;
585 last = bucket, bucket = bucket->ahnext) {
594 s1_str = bucket->ahname_str;
595 s1_len = bucket->ahname_len;
605 bucket = NULL; /* The array is empty. */
607 if (bucket == NULL) {
618 last->ahnext = bucket->ahnext;
620 symbol->var_array[hash1] = bucket->ahnext;
621 unref(bucket->ahvalue);
622 unref(bucket); /* unref() will free the ahname_str */
766 NODE *bucket;
782 for (bucket = symbol->var_array[i]; bucket != NULL;
783 bucket = bucket->ahnext) {
786 (int) bucket->ahname_len,
787 (int) bucket->ahname_len,
788 bucket->ahname_str);
789 pr_node(bucket->ahvalue);
833 NODE **old, **new, *chain, *bucket;
859 getnode(bucket);
860 bucket->type = Node_ahash;
861 bucket->flags |= MALLOC;
862 bucket->ahname_ref = 1;
868 emalloc(bucket->ahname_str, char *, chain->ahname_len + 2, "dup_table");
869 bucket->ahname_len = chain->ahname_len;
871 memcpy(bucket->ahname_str, chain->ahname_str, chain->ahname_len);
872 bucket->ahname_str[bucket->ahname_len] = '\0';
874 bucket->ahvalue = dupnode(chain->ahvalue);
880 bucket->ahnext = new[i];
881 new[i] = bucket;
984 /* find the bucket where it belongs */
988 /* link the node into the chain at that bucket */
1005 NODE *bucket, *next, *list;
1017 for (bucket = symbol->var_array[i]; bucket != NULL; bucket = next) {
1018 next = bucket->ahnext;
1019 if (bucket->ahname_ref == 1) {
1020 free(bucket->ahname_str);
1021 bucket->ahname_str = NULL;
1022 bucket->ahname_len = 0;
1027 *r = *bucket;
1028 unref(bucket);
1029 bucket = r;
1030 bucket->flags |= MALLOC;
1031 bucket->ahname_ref = 1;
1032 bucket->ahname_str = NULL;
1033 bucket->ahname_len = 0;
1035 bucket->ahnext = list;
1036 list = bucket;
1045 for (bucket = symbol->var_array[i]; bucket != NULL; bucket = next) {
1046 next = bucket->ahnext;
1049 unref(bucket->ahvalue);
1052 if (bucket->ahname_ref == 1) {
1053 bucket->ahvalue = make_str_node(bucket->ahname_str,
1054 bucket->ahname_len, ALREADY_MALLOCED);
1055 bucket->ahname_str = NULL;
1056 bucket->ahname_len = 0;
1060 bucket->ahvalue = make_string(bucket->ahname_str, bucket->ahname_len);
1062 *r = *bucket;
1063 unref(bucket);
1064 bucket = r;
1065 bucket->flags |= MALLOC;
1066 bucket->ahname_ref = 1;
1067 bucket->ahname_str = NULL;
1068 bucket->ahname_len = 0;
1071 bucket->ahnext = list;
1072 list = bucket;