saturn.cs.uml.edu(128)> cvs diff . | wc > cvsdiff_pr_util_log071203.txt 1132 5284 44301 -------------------------------------------------- cvs diff . | grepdiff >> cvsdiff_pr_util_log071203.txt File: diffLines ------------------------------------------- 5:diff -r1.3 94sbde_schema.h 5 146:diff -r1.6 dprint.c 54 200:diff -r1.1 pr_accessors.c 11 211:diff -r1.4 pr_dump.c 532 643:diff -r1.10 pr_load.c 23 666:diff -r1.2 pr_log.c 419 1085:diff -r1.1.1.1 bdetree.dat 47 1132: EOF ================================================= cvs diff ./pr_util_log >> cvsdiff_pr_util_log071203.txt ----------------------------------------------------- Index: pr_util_log/94sbde_schema.h =================================================================== RCS file: /usr/proj3/case/95s523/95sbde/base/Master/bde/pr_util_log/94sbde_schema.h,v retrieving revision 1.3 diff -r1.3 94sbde_schema.h 67: Add > hcg_extern int new_version; /*pr_dump arg5: enables meets_view-now global RJL060307*/ /* NOTE: BUFSIZE is an X11 synbol. THis should be renamed - RJL060314*/ 78: Re-#define BUFSIZE 2048 /* was 256 as in chgen - RJL060712 */ > /* changed to agree with /usr/include/X11/Xlibint.h:368 - RJL060712 */ 85: #define MAXVERSIONS 1 //was 99 - RJL060308 284: Changed int dummy to unsigned long dummy ; 303: Conditioned extern "C" on __cplusplus (for .c vs..cc files): --- > #ifdef __cplusplus > extern "C" hcg_ptr pr_gen_create(size_t); > #else > extern hcg_ptr pr_gen_create(size_t); > #endif Renamed macro pr_rcount_all(tbl) as get_rcount(tbl). > #define get_rcount_all(tbl) hcg_table_seq_list[tbl##_idx].rcount Replaced macro pr_rcount with get_rcount (new arg't, same result) > /* If tbl is not a ttabbr in the view, 0 is returned. */ > /* Side-effects: find_{tbl,view}_idx() updates hcg_{tbl,view}_idx resp.*/ > /* Moved here fropm dprint.h - RJL070126 */ > /* Added '&&find_tbl_idx(#tbl)' (side effect: update hcg_tbl_idx)-RJL060806 > * Removed # from find_tbl_idx arg't. - syntax error if not a macro-RJL070126 > * Clients (e.g. dprint.c) must quote arg2= tbl to get_rcount(,) . > */ > In macro pr_find(tbl,pkey,value): Added this pre-condition: if ((tbl##curr == NULL) || (key_compare(&tbl##curr->pkey,&value)!=0)) > if ((tbl##curr == NULL) || (key_compare(&tbl##curr->pkey,&value)!=0)) \ > { \ In macro child_loop(parent,child,pkey,ckey): Added this post-condition: > assert(parent##curr!= NULL); /* RJL060228 */\ Index: pr_util_log/dprint.c =================================================================== RCS file: /usr/proj3/case/95s523/95sbde/base/Master/bde/pr_util_log/dprint.c,v retrieving revision 1.6 diff -r1.6 dprint.c 52: Added extern int find_tbl_idx(const char *) and find_view_idx(const char *); ( In pr_load.c; extern in schema.h but implicitly defined without these here: [??]) (TBD: check 'const' consistency.) In calls to dprintsd, quoted arg't2 to argument get_rcount. Index: pr_util_log/pr_accessors.c =================================================================== RCS file: /usr/proj3/case/95s523/95sbde/base/Master/bde/pr_util_log/pr_accessors.c,v retrieving revision 1.1 diff -r1.1 pr_accessors.c 5a6,8 > /* TBD: consider pr_accessors for inherited fields - RJL070208 */ > /* chgen can derive these from or build them from XX__YY macros - RJL070208 */ > 57a61 > ** [in the above macro call, the rtn value int should be void. -RJL060821] Index: pr_util_log/pr_dump.c =================================================================== RCS file: /usr/proj3/case/95s523/95sbde/base/Master/bde/pr_util_log/pr_dump.c,v retrieving revision 1.4 diff -r1.4 pr_dump.c Added comments to preamble of function dump_row(). Changed indents on switch cases. Index: pr_util_log/pr_load.c =================================================================== RCS file: /usr/proj3/case/95s523/95sbde/base/Master/bde/pr_util_log/pr_load.c,v retrieving revision 1.10 diff -r1.10 pr_load.c 173,176c173,176 > /* BUG?:strncpy appends '\0' terminator at a[len] regardless of strlen(a);*/ > /* Caution: pkey accepts all or part of a keystring, e.g.,its ttabbr prefix.*/ > /* Caution: 0 is valid hcg_tbl_idx value; return 0 implies hcg_tbl_idx = -1.*/ 203c203 < int find_view_idx(char *viewname) --- > int find_view_idx(const char *viewname) Index: pr_util_log/pr_log.c =================================================================== RCS file: /usr/proj3/case/95s523/95sbde/base/Master/bde/pr_util_log/pr_log.c,v retrieving revision 1.2 diff -r1.2 pr_log.c 20c20,22 < #define __USE_POSIX --- > #ifndef __USE_POSIX > #define __USE_POSIX - Linux: stdio.h->/usr/include/features.h:195 */ > #endif In pr_startlog (461-562:) Aded warnings about unsafe recursion. Added assert checks for string overflow. > /* Post-cond: hcg_log == 1, pr_dump to logfileDB1_name */ > /* and hcg_logfileptr=fopen(temp_file_name, "w"))!= NULL */ 631-637: > /* Function: log_parselogdata (631-707) */ > > /* [N/A if pr_init is removed and only infile is in list? */ > /* Presumably this snapshot is necessary in case other files*/ > /* are updated between logging and replay.? But this also */ > /* could cause other subtle synch problems - RJL060217] */ > > /* Function: log_do_add (730-1039) */ 785,787: > /* TBD: how much is identical? perhaps all of it - RJL060217 */ > /*TBD: share each row-class parser between pr_load and pr_log - RJL060217 */ > /* macro pr_create in *schema.h calls pr_gen_create */ > LP;} /* end log_do_add */ > LP;} /* end log_do_delete */ > /* RJL Note 060217: much shorter if pr_find returned a hcg_ptr or 0.*/ > void log_do_set_int(const char pkeychar[HCG_KEY_SIZE+1], > const char fieldname[NAMELENGTH+1],const int newval) < 1743a1765,1767 > //TBD: identify a meets_view(tbl_idx,view_idx,pkey) condition for logging: > //(pr_load.c:load_data has a NEW_VERSION block checking > //hcg_version vs. fcn(hcg_view_idx, hcg_tbl_idx). 1980c2004 < --- > EP; > LP;} /*end do_command */ 2166,2170c2192,2196 < if (hcg_log == 2) { < printf("Error: recursive pr_replay invalid - already doing replay\n"); < return -6; // hcg_log = 2 < } < assert(hcg_replay); // was assert(hcg_log==0); - RJL 040712 --- > if (hcg_log == 2||hcg_replay) { /* hcg_replay added -RJL060227 */ > printf("Error: recursive pr_replay invalid: replay in progress\n"); > return -6; // hcg_log = 2 > } > 2235c2260 < } // end pr_replay --- > } // end pr_replay (2113-2250)