saturn.cs.uml.edu(56)> cat>pr_util.vs.dot4.bde.pr_util.dif renamed bdegen13.bde.pr_util.vs.bde.pr_util.dif ----------------------- saturn.cs.uml.edu(53)> diff pr_util ../../bde/pr_util|wc 1275 4287 80076 saturn.cs.uml.edu(54)> diff pr_util ../../bde/pr_util | grepdiff 1:diff -bitw pr_util/94sbde_schema.h ../../bde/pr_util/94sbde_schema.h 48:diff -bitw pr_util/Imakefile ../../bde/pr_util/Imakefile 85:Only in ../../bde/pr_util: Imakefile.log 86:diff -bitw pr_util/Makefile ../../bde/pr_util/Makefile 110:Only in ../../bde/pr_util: Makefile#GENSRCS.050529 111:Only in pr_util: lut.c <<<<<<<<<<<<<< ---------------------------- diff pr_util ../../bde/pr_util >> pr_util.vs.dot4.bde.pr_util.dif ------------------------------------------------ : diff -bitw pr_util/94sbde_schema.h ../../bde/pr_util/94sbde_schema.h 6c6 < /***************************************************************/ --- > /***********************************************************************/ 22c22 < /***************************************************************/ --- > /***********************************************************************/ 25c25 < /***************************************************************/ --- > /***********************************************************************/ 27c27,30 < #define CHGEN_QUALIFIERS "" --- > #ifndef CHGEN_RELEASE_DATE > #define CHGEN_RELEASE_DATE "16 June 2005, 23:15 EDT" > #endif > #define CHGEN_QUALIFIERS " -ansi -nobp" 66,67d68 < extern char* DATE_OF_CHGEN_RELEASE;/*in chgen_release_date.c -RJL050708*/ < 212,216d212 < /*The following structures hold metadata about the schema and its types.*/ < /*They are equivalent to metaschema tables SV, TT, TS, VN and VV. */ < /*Some day the metadata tables will replace these hcg_structs in chgen */ < /*as well as in its application support via the generated pr_*.c files. */ < /*****************************************************************/ 223,225d218 < /* view_name is the view name in viewdefs file; mode is 'r', 'w' or 'a'; */ < /* version_list[tableindex] holds version# [1..99] for each table in view.*/ < /* version_list[tableindex] is x00 if this table is not in the view.*/ 284c277 < /* This following is a type definition for generic pointers */ --- > /* This following is a type definition for generic porinters */ 413c406,411 < hcg_extern char viewname[MAXVIEWNAMELEN]; --- > #ifdef MAIN > char viewname[MAXVIEWNAMELEN] = "\0"; /* Last viewname used by pr_add */ > #else > extern char viewname[MAXVIEWNAMELEN]; > #endif > Common subdirectories: pr_util/CVS and ../../bde/pr_util/CVS diff -bitw pr_util/Imakefile ../../bde/pr_util/Imakefile 3,6d2 < * Revision 1.14 2005/07/22 01:07:11 lechner < * Made $CASE/gen/ver_13/chgen/executables/chgen the default generator. < * Added lut.c and lut.o to GENSRCS and GENOBJS (#includes "lut.h") < * 154,155c150 < ##CHGEN = $(CASE)/04f522/lechner/genv13SBLMMM_Final/chgen/executables/$(HOSTTYPE)/chgen13 < CHGEN = $(CASE)/gen/ver_13/chgen/executabales/$(HOSTTYPE)/chgen13 --- > CHGEN = $(CASE)/04f522/lechner/genv13SBLMMM_Final/chgen/executables/$(HOSTTYPE)/chgen13 181,183d175 < /* I added lut.c to GENSRCS, lut.h to GENOBJS. - RJL050721 */ < /* (copied from $CASE/gen/ver_13/chgen/src/pr_util) - RJL050721 */ < 185,186c177,180 < GENFLAGS = -metafile -log < --- > GENFLAGS = -ansi \ > -metafile \ > -log \ > -nobp 195d188 < lut.c \ 206d198 < lut.o \ 209c201,203 < GENFLAGS = -metafile --- > GENFLAGS = -ansi \ > -metafile \ > -nobp 218d211 < lut.c \ 228d220 < lut.o \ Only in ../../bde/pr_util: Imakefile.log diff -bitw pr_util/Makefile ../../bde/pr_util/Makefile 5c5 < # Makefile generated from "Imake.tmpl" and --- > # Makefile generated from "Imake.tmpl" and 1192c1192 < BDE_LIB_PATH = ../lib --- > BDE_LIB_PATH = lib 1202,1203c1202 < # #CHGEN = $(CASE)/04f522/lechner/genv13SBLMMM_Final/chgen/executables/$(HOSTTYPE)/chgen13 < CHGEN = $(CASE)/gen/ver_13/chgen/executabales/$(HOSTTYPE)/chgen13 --- > CHGEN = $(CASE)/04f522/lechner/genv13SBLMMM_Final/chgen/executables/$(HOSTTYPE)/chgen13 1212c1211,1213 < GENFLAGS = -metafile --- > GENFLAGS = -ansi \ > -metafile \ > -nobp 1221d1221 < lut.c \ 1231d1230 < lut.o \ Only in ../../bde/pr_util: Makefile#GENSRCS.050529 Only in pr_util: lut.c Only in pr_util: lut.h Only in ../../bde/pr_util: makebde050603.0110 Only in ../../bde/pr_util: makepr_util.050529 diff -bitw pr_util/pr_delete.c ../../bde/pr_util/pr_delete.c 129c129 < --- > #ifdef DEBUG 130a131 > #endif 133a135 > /* this should be a macro - RJL 050617: */ diff -bitw pr_util/pr_dump.c ../../bde/pr_util/pr_dump.c 80,81c80 < if ((hcg_view_list.view_list[hcg_view_idx].version_list[hcg_tbl_idx] != '\0') && < (hcg_ts_list[hcg_tbl_idx].ts_list[hcg_view_list.view_list[hcg_view_idx].version_list[hcg_tbl_idx]].rcount > 0)) --- > if (hcg_ts_list[hcg_tbl_idx].ts_list[tslistIndex].rcount > 0) diff -bitw pr_util/pr_free.c ../../bde/pr_util/pr_free.c 31c31 < /* virtual database tables (and log a FR command iff chgen had -log option).*/ --- > /* virtual database tables. */ ==================================================================================== diff -bitw pr_util/pr_load.c ../../bde/pr_util/pr_load.c 1d0 < /* Start of gen_pr_utils output to pr_load.c */ 7,8d5 < /* pr_load.c sources (sequential): */ < /* gen_pr_utils gen_pr_init gen_pr_add gen_load_data gen_pr_load*/ 44,50c41,47 < extern int btree_insert_node(btree_node_st**, char*, int); < extern int lut_does_node_exist(lut_st*, char*); < extern int btree_does_node_exist(btree_node_st*, char*); < extern int btree_destroy(btree_node_st*, btree_node_st*); < extern int btree_create(lut_st*); < extern int btree_wt(btree_node_st*); < extern void btree_initialized(void); --- > int btree_insert_node(btree_node_st**, char*, int); > int lut_does_node_exist(lut_st*, char*); > int btree_does_node_exist(btree_node_st*, char*); > int btree_destroy(btree_node_st*, btree_node_st*); > int btree_create(lut_st*); > int btree_wt(btree_node_st*); > void btree_initialized(void); 54,57c51 < extern void hcg_parse (char * , char * , int *); < extern void mystrcpy (char * , char * , int, int); < extern void strncpy_null (char * , char * , int); < extern void logstr(char*); --- > #ifdef GENLOG 58a53 > extern void logstr(char*); 60,64d54 < extern char* logfile; < < < #ifndef GENLOG < void logstr(char* s) {/*no-op*/}; 69,70c59,62 < void logwait(void){/* a no-op */}; < int pr_replay(char * u, char *v , int w, int x) {return 0;}; --- > #else > void logwait(void){ }; /* <<<<<---- a no-op */ > extern void logstr(char*); > extern int pr_replay(char *, char *, int, int);/* #ifdef GENLOG */ 75d66 < char* logfile = "dummylogfilename"; 89,90c80 < #ifndef GENPR < /****************************************************************/ --- > /******************************************************************************/ 95c85 < /****************************************************************/ --- > /******************************************************************************/ 130,133c120 < /* end GENPR_dependent compilation */ < /* to avoid duplicate defs in chgen/src/lut.c - RJL050710 */ < #endif < /*********************************************************/ --- > /******************************************************************************/ 137c124 < /*********************************************************/ --- > /******************************************************************************/ 144c131 < /*********************************************************/ --- > /******************************************************************************/ 153c140 < /*********************************************************/ --- > /******************************************************************************/ 171c158 < /*********************************************************/ --- > /******************************************************************************/ 178c165 < /*********************************************************/ --- > /******************************************************************************/ 222c209 < /*********************************************************/ --- > /******************************************************************************/ 226c213 < /*********************************************************/ --- > /******************************************************************************/ 229c216 < /*********************************************************/ --- > /******************************************************************************/ 232c219 < return(hcg_view_list.view_list[view_idx].version_list[tbl_idx] == (get_version(&pkey))); --- > return(1); 235c222 < /*********************************************************/ --- > /******************************************************************************/ 239c226 < /*********************************************************/ --- > /******************************************************************************/ 279,280c266 < #ifndef GENPR < /*********************************************************/ --- > /******************************************************************************/ 288c274 < /*********************************************************/ --- > /******************************************************************************/ 310,311d295 < /* end GENPR_dependent compilation to avoid duplicate defs in lut.c */ < #endif 324,325c308 < (hcg_view_list.view_list[hcg_view_idx].mode == 'w') && < (hcg_view_list.view_list[hcg_view_idx].version_list[tbl_idx] != '\0')) --- > (hcg_view_list.view_list[hcg_view_idx].mode == 'w') ) 331a315,1225 > > > /*----------------------------------------------------------- > * > * Source File : lut.c > * > * This file contains code for look up table > * and binary tree mainipulations used by chgen and gen > * developed for spring 1993 project... > *----------------------------------------------------------- > */ > > #ifndef HCG_KEY_SIZE /* used to determine context of lut */ > /* code use so that includes are not*/ > /* multiply defined */ > > #include > #include > #include > #include "lut.h" > > #endif > > char *lut_get_name(); > > /* > ************************************************************ > * Function : is_string_null > * > * Abstract : function to determine if string is NULL... > * > * Created by : T. Cunningham > * > * Creation Date : 4/14/93 > * > * Modified : > * > ************************************************************ > */ > bool > is_string_null(p_string) > char *p_string; > { > /* local variables */ > > > /**************************************/ > > if(*p_string == '\0') > { > return(TRUE); > } > > return(FALSE); > > } /* end is_string_null */ > > /* > ************************************************************ > * Function : lut_display > * > * Abstract : Function to display look up table... > * > * Created by : T. Cunningham > * > * Creation Date : 4/14/93 > * > * Modified : > * > ************************************************************ > */ > int > lut_display(p_lut, max_num) > lut_st *p_lut; > int max_num; > { > /* local variables */ > > int idx; > > char *p_str; > /**************************************/ > > printf("\nLook Up Table Output \n"); > printf( "---- -- ----- ------\n\n"); > for(idx=0; idx { > /*p_str = (char *)lut_get_name(p_lut, idx);*/ > > p_str = (char *)lut_get_name(p_lut, idx); > > if( p_str != NULL) > { > printf("%4d. %s\n", idx, p_str); > } > } > > > return(0); > > } /* end lut_display */ > > /* > ************************************************************ > * Function : lut_init > * > * Abstract : Function to initialize the elements of the > * look up table structure... > * > * Created by : T. Cunningham > * > * Creation Date : 4//93 > * > * Modified : > * > ************************************************************ > */ > int > lut_init(p_lut, type) > lut_st *p_lut; /* ptr to lut */ > lut_type type; /* type of lut to create */ > { > /* local variables */ > > int idx; > char *p_ch; > > /**************************************/ > > p_lut->type = type; > p_lut->p_btree_root = NULL; > p_lut->num_elements = 0; > > for(idx=0; idx { > p_ch = (char *) p_lut->names[idx]; > *p_ch = '\0'; > } > > return(0); > > } /* end lut_init */ > > > > > /* > ************************************************************ > * Function : lut_insert_element > * > * Abstract : Function to insert an element into a look up table. > * > * Created by : T. Cunnigham > * > * Creation Date : 4/13/92 > * > * Modified : > * > ************************************************************ > */ > int > lut_insert_element(lut_st *p_lut, char *name) > { > /* local variables */ > > int test, > idx, > loop, > len; > > /**************************************/ > > len = strlen(name); > > switch(p_lut->type) > { > case ABBR_TBL_TYPE : > if( (len != ABBR_SIZE_BIG) && (len != ABBR_SIZE_SMALL)) > { > printf("%s : Input character string != required abbreviation size...\n", name); > return(ERROR); > } > else > { > /*************************************/ > /* check if abbrv is AAA thru ZZZ */ > /*************************************/ > for(idx=0; idx < len; idx++) > { > if((name[idx] > 'Z') || (name[idx] < 'A') ) > { > printf("%s : Invalid abbreviation passed to insert funct...\n", name); > return(ERROR); > } > } > } > break; > > case VER_TBL_TYPE : > if(len != VER_SIZE) > { > printf("Input character string != required version size...\n"); > return(ERROR); > } > else > { > /****************************************************/ > /* check if version is between 0 and MAX_VER_NUMBER */ > /****************************************************/ > test = atoi(name); > if((test < 0) || (test > MAX_VER_NUMBER)) > { > printf("%s : Invalid version number passed to insert funct. \n", name); > return(ERROR); > } > > > /*************************************/ > /* check to see if there are already */ > /* MAX_VER_ELEMENTS in the table... */ > /*************************************/ > if(p_lut->num_elements >= MAX_VER_ELEMENTS) > { > printf("Version look up table already full...\n"); > printf("Only allowed to have %d indexes...\n", > MAX_VER_ELEMENTS); > return(ERROR); > } > } > break; > default : > printf("%s : Unknown table type input to lut_insert_element routine...\n",name); > return(ERROR); > break; > } > > > > > /**************************************/ > /* check btree to see if abbrv exists */ > /* if exists do not add to table */ > /**************************************/ > > if((test = btree_does_node_exist(p_lut->p_btree_root, name)) != ERROR) > { > return(test); > } > > > /*************************************/ > /* find next available slot in table */ > /*************************************/ > > idx = 0; > loop = TRUE; > > while(idx < LUT_NUM_ELEMENTS) > { > if(is_string_null(p_lut->names[idx])) > { > strcpy((char *) p_lut->names[idx], name); > > p_lut->num_elements++; > > btree_insert_node(&p_lut->p_btree_root, name, idx); > > return(idx); > } > > idx++; > > } /* end while */ > > printf("No slots available for element insertion...\n"); > return(ERROR); > > } /* end lut_insert_element */ > > > /* > ************************************************************ > * Function : lut_delete_element > * > * Abstract : Function to delete an entry in the look up table. > * > * Created by : T. Cunningham > * > * Creation Date : 4/13/93 > * > * Modified : > * > ************************************************************ > */ > int > lut_delete_element(p_lut, index) > lut_st *p_lut; > int index; > { > /* local variables */ > > char *p_ch; > /**************************************/ > > if(index > LUT_NUM_ELEMENTS) > { > printf("ERROR - Requested index > look up table size...\n"); > return(ERROR); > } > > if(is_string_null(p_lut->names[index])) > { > printf("ERROR - Requested index to delete does not exist...\n"); > return(ERROR); > } > > printf("Deleting lut element # %d\n", index); > > p_ch = (char *) p_lut->names[index]; > *p_ch = '\0'; > p_lut->num_elements--; /* decrement number of elements in lut */ > > printf("Destroying binary tree\n"); > btree_destroy(p_lut->p_btree_root, (btree_node_st *)NULL); > > printf("Recreating binary tree\n"); > p_lut->p_btree_root = NULL; > btree_create(p_lut); > > return(0); > > } /* end lut_delete_element */ > > > /* > ************************************************************ > * Function : lut_does_node_exist > * > * Abstract : Function to accept a character string > * and return the index of that array in the > * look up table. > * Return a ERROR if the string does not exist > * in the table... > * > * Created by : T. Cunningham > * > * Creation Date : 5/6/93 > * > * Modified : > * > ********************************************************** > */ > > int > lut_does_node_exist(p_lut, name) > lut_st *p_lut; > char name[]; > { > > int ret_stat; > > > if(p_lut == NULL) > { > printf("Null ptr passed as lut address...\n"); > return(ERROR); > } > > ret_stat = btree_does_node_exist(p_lut->p_btree_root, name); > > return(ret_stat); > > } /* end lut_does_node_exist */ > > > > /* > ************************************************************ > * Function : lut_get_name > * > * Abstract : Function to accept an index number and return > * the abbreviation name corresponding to the > * index number... > * > * returns a character pointer. > * > * Created by : T. Cunningham > * > * Creation Date : 4/13/92 > * > * Modified : > * > ************************************************************ > */ > char > *lut_get_name(p_lut, index) > lut_st *p_lut; > int index; > { > /* local variables */ > > > /**************************************/ > > if(index <= LUT_NUM_ELEMENTS) > { > if(is_string_null(p_lut->names[index])) > { > return(NULL); > } > else > { > return((char *)p_lut->names[index]); > } > } > else > { > printf("Invalid index input to lut_get_name...\n"); > return(NULL); > } > > } /* end lut_get_name */ > > > /* > ************************************************************ > * Function : abbr_lut_create > * > * Abstract : Function to create a lut from an array of > * strings... > * Returns ERROR if failure occurred or > * returns (0) if successful.... > * > * Created by : T. Cunningham > * > * Creation Date : 5/2/93 > * > * Modified : > * > ************************************************************ > */ > int > abbr_lut_create(p_lut, p_abbr, num_strings) > lut_st *p_lut; > char *p_abbr[]; > int num_strings; > { > int ret_stat, > idx; > > > lut_init(p_lut, ABBR_TBL_TYPE); > > /* build the lut table and btree */ > for(idx=0; idx { > ret_stat = lut_insert_element(p_lut, p_abbr[idx]); > if(ret_stat == ERROR) > { > printf("Error inserting string : %s into lut...\n", > p_abbr[idx]); > return(ERROR); > } > } > > return(0); > > } /* abbr_lut_create */ > > > /* > ************************************************************ > * Function : btree_print_node > * > * Abstract : This is a recursive function to print out > * the nodes of a binary tree in depth first order. > * > * Created by : T. Cunningham > * > * Creation Date : 4/14/93 > * > * Modified : > * > ************************************************************ > */ > int > btree_print_node(p_node) > btree_node_st *p_node; > { > /* local variables */ > > > > /**************************************/ > if(p_node == NULL) > { > return(0); > } > > printf("%8s %7d %6d\n",p_node->name, p_node->num, p_node->weight); > > btree_print_node(p_node->p_left); > btree_print_node(p_node->p_right); > > return(0); > > } /* end btree_print_node */ > > > > > /* > *********************************************************** > * Function : btree_display_nodes > * > * Abstract : Function to traverse the btree and print out > * each node in a depth first fashion. > * > * Created by : T. Cunningham > * > * Creation Date : 4/14/93 > * > * Modified : > * > ************************************************************ > */ > int > btree_display_nodes(p_root) > btree_node_st *p_root; > { > /* local variables */ > > > /**************************************/ > printf("\n\nAbbreviation Index Weight - Binary Tree Output\n"); > printf( "------------ ----- ------\n\n"); > > btree_print_node(p_root); > > return(0); > > } /* end btree_display_nodes */ > > > > > /* > *********************************************************** > * Function : btree_does_node_exist > * > * Abstract : Function to determine if abbreviation exists > * in the lut binary tree. > * > * returns : index number of abbreviation > * or ERROR if it does not exist. > * > * Created by : T. Cunningham > * > * Creation Date : 4/14/93 > * > * Modified : > * > ************************************************************ > */ > int > btree_does_node_exist(p_node, name) > btree_node_st *p_node; > char name[]; > { > /* local variables */ > > int test, > ret_stat; > > /**************************************/ > > if(p_node == NULL) > { > return(ERROR); > } > > if( (test = strcmp(p_node->name, name)) == 0) > { > return(p_node->num); > } > > ret_stat = btree_does_node_exist(p_node->p_left, name); > if(ret_stat >= 0) > { > return(ret_stat); > } > > > ret_stat = btree_does_node_exist(p_node->p_right, name); > if(ret_stat >= 0) > { > return(ret_stat); > } > else > { > return(ERROR); > } > > } /* end btree_does_node_exist */ > > > /* > ************************************************************ > * Function : btree_insert_node > * > * Abstract : Function to insert a node into an existing btree, > * or if btree does not exist create a new one and > * insert the node as the root. > * > * Created by : T. Cunningham > * > * Creation Date : 4/14/93 > * > * Modified : > * > ************************************************************ > */ > int > btree_insert_node(p_new, abbr, index) > btree_node_st **p_new; > char abbr[]; > int index; > { > /* local variables */ > > int test; > > /**************************************/ > > btree_node_st *p_temp, > *p_node; > > /**************************************************/ > /* first check if btree exists - if not create it */ > /**************************************************/ > if(*p_new == NULL) > { > p_node = (btree_node_st *) calloc(sizeof(btree_node_st), 1); > > strcpy(p_node->name, abbr); > > p_node->num = index; > p_node->weight = 2; > p_node->p_right = NULL; > p_node->p_left = NULL; > > > *p_new = p_node; > return(0); > } > > > /* insert into existing binary tree */ > > p_temp = *p_new; > > /*******************************************/ > /* check out if abbreviation already exists */ > /* if so return the index of the abbrev */ > /********************************************/ > test = strcmp(p_temp->name, abbr); > > if(test == 0) > { > /* node exists */ > printf("Node : %s Already exists...\n", p_temp->name); > return(0); > } > else if (test < 0) /* insert into right child */ > { > btree_insert_node(&p_temp->p_right, abbr, index); > } > else if (test > 0) /* insert into left child */ > { > btree_insert_node(&p_temp->p_left, abbr, index); > } > > > p_temp->weight = btree_wt(p_temp->p_left) + btree_wt(p_temp->p_right); > > return(0); > > } /* end btree_insert_node */ > > > > /* > ************************************************************ > * Function : btree_create > * > * Abstract : Function to create the btree from the look up table. > * > * Created by : T. Cunningham > * > * Creation Date : 4/14/93 > * > * Modified : > * > ************************************************************ > */ > int > btree_create(p_lut) > lut_st *p_lut; > { > /* local variables */ > > int idx; > > char *p_abbr; /* ptr to abbreviation */ > > /**************************************/ > > /* traverse the lut */ > > for(idx=0; idx < LUT_NUM_ELEMENTS; idx++) > { > /* get next element in the lut */ > > p_abbr = lut_get_name(p_lut, idx); > if(p_abbr != NULL) > { > /* add to btree */ > > btree_insert_node(&p_lut->p_btree_root, p_abbr, idx); > } > > } /* end for */ > > > return(0); > > } /* end btree_create */ > > > /* > ************************************************************ > * Function : btree_destroy > * > * Abstract : Function to delete the binary tree and > * free up the memory allocated to the tree. > * > * Created by : T. Cunningham > * > * Creation Date : 4/15/93 > * > * Modified : > * > *********************************************************** > */ > int > btree_destroy(p_node, p_back) > btree_node_st *p_node; > btree_node_st *p_back; > { > /* local variables */ > > char child_dir; > /**************************************/ > > if(p_back == NULL) > { > /* this is a root node */ > child_dir = 'N'; > } > else if(p_back->p_right == p_node) > { > /* this is a right child of the parent */ > > child_dir = 'R'; > } > else if(p_back->p_left == p_node) > { > /* this is a left child of the parent */ > > child_dir = 'L'; > } > > > > /* if leaf node */ > if( (p_node->p_left == NULL) && (p_node->p_right == NULL)) > { > /***********************/ > /* this is a leaf node */ > /***********************/ > > /* set parent ptr to this node to NULL */ > > if(child_dir == 'R') > { > p_back->p_right = NULL; > } > else if(child_dir == 'L') > { > p_back->p_left = NULL; > } > else > { > /* node is root */ > } > > free(p_node); > > return(0); > } > > > /* not a leaf node */ > > if(p_node->p_left == NULL) > { > /*****************************/ > /* node has right child only */ > /*****************************/ > > btree_destroy(p_node->p_right, p_node); > } > else /* left node exists */ > { > if(p_node->p_right == NULL) > { > /****************************/ > /* node has left child only */ > /****************************/ > btree_destroy(p_node->p_left, p_node); > } > else > { > /***********************************/ > /* node has two children */ > /***********************************/ > > btree_destroy(p_node->p_left, p_node); > btree_destroy(p_node->p_right, p_node); > } > } > > > > > /*******************************************/ > /* If you get here you are now a leaf node */ > /* All of your subtrees have been deleted */ > /*******************************************/ > > /* set parent ptr to this node to NULL */ > > if(child_dir == 'R') > { > p_back->p_right = NULL; > } > else if(child_dir == 'L') > { > p_back->p_left = NULL; > } > else > { > /* node is root */ > } > > free(p_node); > > return(0); > > } /* end btree_destroy */ > > > > > > > > /* > **************************************************************** > * Function : btree_wt > * > * Abstract : Function to give a weight to each node in the tree > * The weight is based on number of nodes below it. > * This is used for balencing btrees - however the > * the balence code was not included in this gen > * version due to a lack of time to debug it... > * > * Created by : D. Pinkney > * > * Creation Date :?????? > * > * Modified : > * > ********************************************************** > */ > int > btree_wt(t) /* returns weight of tree or 1 otherwise */ > btree_node_st *t; > { > if (t == (btree_node_st *) NULL) > { > return(1); > } > else > { > return(t->weight); > } > > } /* end btree_wt */ > > 391c1285 < if( (tmp = (char *)lut_get_name(&hcg_table_abbrev_lut, (int)abi)) != NULL ) --- > if( (tmp = (char *)lut_get_name(&hcg_table_abbrev_lut, abi)) != NULL ) 735,736d1628 < /* end of gen_pr_utils output to pr_load.c */ < /* start of gen_pr_init output to pr_load.c */ 761a1654 > 1087d1979 < /* end of gen_pr_init output to pr_load.c */ 1320c2212 < hcg_ptr pr_gen_create ( size_t size ) --- > hcg_ptr pr_gen_create ( unsigned long size ) 1326c2218 < } /* end pr_gen_create */ --- > } 1401d2292 < /* start of gen_pr_add output to pr_load.c */ 1437,1438d2327 < if (hcg_view_list.view_list[hcg_view_idx].version_list[hcg_tbl_idx] == '\0') < return; 1554,1556c2443 < /* start of gen_load_data output to pr_load.c */ < /******************************************************************************/ < /* This routine is used to read the (already open) datafile and call pr_add */ --- > /******************************************************************************//* This routine is used to read the (already open) datafile and call pr_add */ 1574c2461 < //extern char *logfile; --- > extern char *logfile; 1610,1611c2497,2498 < dprint("TBD: Load checkpoint *DB1 then replay logfile. < "); --- > dprints("Replay logfile is %s \n", logfile); > /* is logfile known ? */ 1643,1648d2529 < if (hcg_view_list.view_list[hcg_view_idx].version_list[hcg_tbl_idx] == '\0') < { < hcg_read_next(); < continue; < } < 1707d2587 < /* start of gen_pr_parse output to pr_load.c */ 1927,1929d2806 < /* end of gen_pr_parse output to pr_load.c */ < /* end of gen_load_data output to pr_load.c */ < /* start of gen_pr_???? output to pr_load.c */ 1943a2821,2822 > /* extern char *logfile; */ > /* Added by Genlog 5/8/96 to log pr_load */ 1945d2823 < /* Removed logfile decl'n - RJL050719 */ 1968c2846 < /* check for global args to load_data below: - RJL 040622 */ --- > /* check for global args to load_data below: =- RJL 040622 */ 1980c2858,2864 < dprints("data file %s contains StartReplay = 'SR' cmd:\n", file_name); --- > #ifdef GENLOG > dprints( "load_data found SR cmd - calling pr_replay on file %s\n", > file_name); > dprintdd("hcg_log = %d, hcg_replay = %d\n", hcg_log, hcg_replay); > replayStatus = pr_replay(viewname, file_name, 1, 1); > #else > dprints("data file \"%s\" contains StartReplay (\"SR\") cmd:\n", file_name); 1982a2867,2868 > #endif > 1985c2871 < /* Replay updates can be done by 's' Keypress callback - one at a time */ --- > /* Replay updates can be done by 's' Keypress callback - one transaction at a time */ 2054d2939 < /* end of gen_pr_load.c output to pr_load.c */ Only in ../../bde/pr_util: pr_load.c050619.0130 diff -bitw pr_util/pr_stats.c ../../bde/pr_util/pr_stats.c 1c1 < /**************************************************************/ --- > /******************************************************************************/ 5c5 < /**************************************************************/ --- > /******************************************************************************/ 11c11 < /***************************************************************/ --- > /******************************************************************************/ 14c14 < /**************************************************************/ --- > /******************************************************************************/ 34c34 < fprintf(hcg_stats_fp,"Chgen Version : %s (%s)\n",CHGEN_VERSION, DATE_OF_CHGEN_RELEASE); --- > fprintf(hcg_stats_fp,"Chgen Version : %s (%s)\n",CHGEN_VERSION,CHGEN_RELEASE_DATE); Only in pr_util: prfiles.050721:0040 Only in pr_util: saveprfiles.csh ========================================================