bdegen13\pr_load.nolog.vs.log060209.dif (pr_util_nolog is more up to date - including big bug fix at 1458,1465c1693 ============================================================================= saturn.cs.uml.edu(60)> pwd /tmp_mnt/nfs/galaxy/faculty/fac1/lechner/bde2alpha_rl/sandbox/bdeNT050526/bdegen13/bde/pr_util_nolog saturn.cs.uml.edu(61)> diff pr_load.c ../pr_util_log/pr_load.c | wc 757 3567 31210 saturn.cs.uml.edu(62)> diff pr_load.c ../pr_util_log/pr_load.c ---------------------------------------------------------------- 587,588c596,598 < * Decode the encoded key k, return key_string or empty *external_key < * Calls abb_decode, ver_decode, row_decode --- > * Decode the encoded key k, put key_string or '\0' into *external_key array > * Calls abb_decode, ver_decode, row_decode; expects external_key[KEY_SIZE+1]; > * Clients: decode_retstr + others. 593d602 < char t[10]; 595,596c604,610 < external_key[0] = '\0'; < if (k == 0) return -1; /* assert !=0 failed 0512, 0601 -RJL */ --- > char t[HCG_KEY_SIZE+1] = ""; > assert(t[0] = '\0'); > strncpy_null(external_key, t, HCG_KEY_SIZE+1); /* static in decode_rtn str(); */ > if (k == 0) > { > LP;return -1; > } 604c618 < if( (klen != OLD_ABB_LEN) && (klen != NEW_ABB_LEN) ) --- > if( ((klen = strlen(t)) != OLD_ABB_LEN) && (klen != NEW_ABB_LE N) ) ... 626,627c640 < assert(strlen(external_key)<10); < return 1; --- > LP;return 1; ... 1195c1275 < (struct pa *) ca##curr2->p##_fpp = pa##curr; \ --- > ca##curr2->p##_fpp = (struct dummy_type*) pa##curr; \ 1202,1204c1282,1286 < for (ca##temp2 = pa##curr->c##_fcp; (struct pa *) ca##temp2- >p##_fpp != pa##curr; ca##temp2 = (struct ca *)ca##temp2->p##_fpp); \ < (struct ca *) ca##temp2->p##_fpp = ca##curr2; \ < } \ --- > for ( ca##temp2 = pa##curr->c##_fcp; \ > ca##temp2->p##_fpp != (struct dummy_type*)pa##curr; \ > ca##temp2 = (struct ca *)(ca##temp2->p##_fpp) ) /*no-o p*/; \ > ca##temp2->p##_fpp = (struct dummy_type*)ca##curr2; \ > }; \ 1216c1298,1301 < for (pa##curr2 = pa; (pa##curr2 != NULL) && (key_compare(&pa##curr2->p k,&ca##curr->cf) < 0); pa##curr2 = pa##curr2->next_ptr); \ --- > for (pa##curr2 = pa; \ > (pa##curr2 != NULL) && (key_compare(&pa##curr2->pk,&ca##curr->cf) < 0); \ > pa##curr2 = pa##curr2->next_ptr;\ > ) /*no-op*/; \ ... 1239,1240d1322 < for (pa##curr2 = pa; (pa##curr2 != NULL) && (key_compare(&pa##curr2->pk,&ca##c urr->cf) < 0); pa##curr2 = pa##curr2->next_ptr); \ < if ((pa##curr2 != NULL) && (key_compare(&ca##curr->cf,&pa##curr2->pk) == 0)) \ 1242,1243c1324,1329 < ca##curr->p##_pp = pa##curr2; \ < /*(struct pa *) ca##curr->p##_fpp = pa##curr2;*/ \ --- > for( pa##curr2 = pa; \ > pa##curr2 != NULL && key_compare(&pa##curr2->pk, &ca##curr->cf) < 0; \ > pa##curr2 = pa##curr2->next_ptr \ > ) /* no-op */ ; \ > if (pa##curr2 != NULL && key_compare(&ca##curr->cf,&pa##curr2->pk) == 0 ) \ > { \ 1250,1252c1336,1340 < (struct pa*) ca##temp2->p##_fpp != pa##curr2; \ < ca##temp2 = (struct ca *)ca##temp2->p##_fpp); \ < /*(struct ca *)*/ ca##temp2->p##_fpp = (struct dummy_type*) ca##cu rr; \ --- > ca##temp2->p##_fpp != (struct dummy_type*)pa##curr2; \ > ca##temp2 = (struct ca*)(ca##temp2->p##_fpp) \ > ) /*no-op*/ ; \ > ca##temp2->p##_fpp = (struct dummy_type*)ca##curr; \ > } \ 1254a1343 > /* end macro link_parent_nobp_m */ ... 1336a1426,1429 > /***************************************************************************** */ > /* This macro is used to generate the next available primary key value for the */ > /* specified table, using the specified view. */ > /***************************************************************************** */ 1338,1343d1430 < /************************************************************************/ < /* Macro pr_gen_key composes the next available primary key value */ < /* for the specified table, from its last 3 params. */ < /* When pr_gen_pkey calls pr_gen_key, it insures tbl_abbrv is in viewname.*/ < /* When pr_check_fkey calls pr_gen_key, fkeys default to version = row = 0.*/ < /************************************************************************/ 1351d1437 < ... 1424a1658,1659 > #define TTPRNT dprint("tbl_encoding [0..9] = FO,GD,HG,HN,HA,HL,HP,HI,CG,GX\n") > 1427,1429c1662 < #define TTPRNT dprint("tbl_encoding [0..9] = FO,GD,HG,HN,HA,HL,HP,HI,CG,GX\n") < char error_table[HCG_ABBR_SIZE+1]; < /*char tempkey[HCG_KEY_SIZE+1];*/ --- > char badttabbrv[HCG_ABBR_SIZE+1]; ... 1433,1436c1666,1670 < /* skip leading whitespace (if any) from tbl_abbrv */ < /* (\t added 060126; was ++tbl_abbrv until 060126 - RJL*/ < while( *tbl_abbrv == ' '||*tbl_abbrv== '\t') tbl_abbrv++; < DP;assert(strlen(tbl_abbrv) == HCG_ABBR_SIZE); //2 or 4 - RJL060126 --- > > /* skip leading spaces (if any) from tbl_abbrv */ > > while( *tbl_abbrv == ' ') ++tbl_abbrv; > ... 1448c1684 < if (!find_tbl_idx(tbl_abbrv)) /* updates hcg_tbl_idx */ --- > if (!find_tbl_idx(tbl_abbrv)) 1450,1453c1686,1690 < strncpy_null(error_table, tbl_abbrv, HCG_ABBR_SIZE); < printf("Warning: unknown table (%s) passed to [do_]pr_add, ign ored.\n", < error_table); < LP;return; --- > strncpy_null(badttabbrv, tbl_abbrv, HCG_ABBR_SIZE+1); > // '+1' added 060204-RJL > printf("Warning: unknown table (%s) passed to pr_add, ignored. \n",badttabbrv); > /*log_pr_add (tbl_abbrv, viewname, tbl_ptr); */ > return; ... 1458,1465c1693 < { < DP;dprints("hcg_view_list.view_list[hcg_view_idx].version_list [] =\n\t%s\n", < (char*) hcg_view_list.view_list[hcg_view_idx].version_ list); < dprints("do_pr_add:1461: tbl_abbrv = %s\n",tbl_abbrv); < /*LP;return; << Removed this gratuitous and disastrous bug from 0507 25 rev. 1.4! */ < //bde crashed because following updates were skipped when < //hcg_view_list.view_list[hcg_view_idx].version_list[%d] = '\0' = 0 < } --- > return; ... 2077,2080c2331,2332 < if (tempptr1 == NULL) < tempptr1 = tempptr0-1; /* add 1 later */ < DP;printf("%d chars in filename %s\n", < (int)(tempptr1-tempptr0), (char*) tempptr1+1); --- > if (tempptr1 == NULL) tempptr1 = tempptr0-1; /* add 1 later */ > else printf("chars skipped = %d\n", (int)(tempptr1-tempptr0)); (END) ==================