7,8d6 < /* Added referential integrity check: HA-childsets, circa l.1089 R 020618*/ < /* error when these were declared under case HA (line 1095): */ 39c37,38 < extern int meets_view(int, int, hcg_key); /* in pr_load.c */ --- > > extern int meets_view(int, int, hcg_key); 42,45c41 < extern void pr_del(int); /* int??? - REQUIRES XXcurr ptr */ < #ifdef BDELOG /* changed ifndef to ifdef - RJL 020501 */ < extern "C" int replay_log(void); /* in bdeReplay.cc */ < #endif --- > extern void pr_del(int); /* REQUIRES XXcurr ptr */ 46a43,46 > /* In bdeReplay.cc */ > #ifdef BDELOG > extern "C" int replay_log(void); > #endif 56c56 < void HAverify(void); /* debug aid - RJL 020619 */ --- > void HAverify(void); 59,60c59,60 < // buffers for replay_log STATE1 command interpreter: < char temp_tbl[HCG_KEY_SIZE+1]; --- > /* buffers for replay_log */ > char temp_tbl[HCG_KEY_SIZE+1]; 66,69d65 < /*This belongs in pr_replay - RJL 020427 */ < //assert(near_realtime==1||near_realtime==0); < //assert(near_realtime>=0 && near_realtime<=1); < 83,84c79 < < /* enumeration of command names as integers: */ --- > /* enumeration of command names as integers */ 86,87c81,82 < enum {SetIntCmd,SetFltCmd,SetKeyCmd,SetStrCmd,WaitCmd,DeleteCmd, < StartCmd,FreeCmd,InitCmd,LoadCmd,StopCmd,ViewNameCmd,AddRowCmd} --- > enum {SetIntCmd, SetFltCmd, SetKeyCmd, SetStrCmd, WaitCmd, DeleteCmd, > StartCmd, FreeCmd, InitCmd, LoadCmd, StopCmd, ViewNameCmd, AddRowCmd} 89c84 < replayCode command; // for switch(command) --- > replayCode command; 91,92d85 < // macros to avoid scattered #ifdefs below < // depend on argcount after format string 94a88,89 > #define dprintf1arg(string, arg1) if (dbg) printf(string, arg1); > #define dprintf2args(string, arg1, arg2) if (dbg) printf(string, arg1, arg2); 96,103c91,93 < #define dprintf1arg(string,arg1) if (dbg) printf(string, arg1); < < #define dprintf2args(string,arg1,arg2) if (dbg) printf(string, arg1, arg2); < < < /********************************************************************/ < /* Global variables */ < /********************************************************************/ --- > /******************************************************************************/ > /* Global variables */ > /******************************************************************************/ 108,111c98,101 < /************************************************************************ < * * < * trivial function for signal handler * < ************************************************************************/ --- > /**************************************************************************** > * * > * trivial function for signal handler * > ***************************************************************************/ 484d473 < /* also make sure replay is not on - RJL 020506 */ 486c475 < if (hcg_log!=0) // if(hcg_log) caused runtime error - RJL 020506 --- > if (hcg_log != 0 ) 488c477,478 < if (hcg_log == 1){ --- > if (hcg_log == 1 ) > { 492,493c482,483 < else if (hcg_log == 2) < printf("Error: pr_startlog called when replay was not off.\n"); --- > else if ( hcg_log == 2) > printf("Error: pr_startlog called when logging was not off.\n"); 502,503c492,495 < /* set global hcg_logfile to file name of log file (w/out extension) */ < for (i = strlen(file_name); (i>=0) && (file_name[i]!= '.'); i--); --- > /* set global hcg_logfile to file name of log file (w/out extention) */ > for (i = strlen(file_name); > (i>=0) && (file_name[i]!= '.'); > i--); 505c497 < if (i<0) /* no extension */ --- > if (i<0) /* no extention */ 508c500 < else /* remove extension */ --- > else /* remove extention */ 523c515 < /* Database saved to name of log file + "DB1" */ --- > /* Database saved to name of log file + "DB1" */ 615c607 < /* Arguments: newlist = returned list of file names */ --- > /* Arguments: newlist - a list of files separated by commas */ 619,620d610 < /* first line of input file contains token "LogDataFile" */ < /* and token filename; temp file name is temp##filename. */ 629,630c619 < char datafile[NAMELENGTH],token[BUFSIZE]; < char tempfname[NAMELENGTH],tempnewlist[BUFSIZE]; --- > char datafile[NAMELENGTH],token[BUFSIZE],tempfname[NAMELENGTH],tempnewlist[BUFSIZE]; 691c680 < dprintf1arg("Unlinked file %s.\n",token); --- > dprintf1arg("Unlinked %s.\n",token); 1012d1000 < /* RJL: Is called only from case IN (pr_init command).*/ 1046d1033 < /* SIDE EFFECTS: alters hcg_tbl_idx and XXcurr */ 1051,1053c1038,1040 < /* removed copy buffer pkey - not needed - RJL 020625 */ < find_tbl_idx(pkeychar);/* sets hcg_tbl_idx??? RJL 020625 */ < if(encode(pkeychar,&hcg_k) ==1) /* was pkey - RJL */ --- > > find_tbl_idx(pkeychar); > if(encode(pkeychar,&hcg_k) ==1) 1055c1042 < dprintf1arg("Found DL with pkey %s.\n", pkeychar); --- > dprintf1arg("Found DL with pkey %s.\n",pkeychar); 1092,1096d1078 < HAverify(); /* Defined at end of pr_delete - RJL 020619 */ < /* unsigned long HAtmp; undeclared errorx; - moved up */ < #if defined DEBUG < printf("\tHAcurr before pr_find and log_delete: %xl /n", HAcurr); < #endif 1098,1100c1080,1081 < if (HAcurr == NULL) { < printf("log_delete: HAcurr=NULL, HAid %s not found.\n", pkeychar); < } --- > if (HAcurr == NULL) > printf("log_delete: %s not found.\n", pkeychar); 1621c1602 < } /* end log_do_set_key */ --- > } 1628c1609 < /* Created by : Rob Rassmann */ --- > /* Created by : Rob Rassmann */ 1630c1611 < /* Creation Date : 12/12/98 */ --- > /* Creation Date : 12/12/98 */ 1795c1776,1784 < } // end log_do_set_str */ --- > } > > > /************************************************************/ > /* Function:encode_token */ > /* */ > /* This function is imported from bdeReplay.cc */ > /* */ > /************************************************************/ 1797,1998c1786,1946 < /* extracted from bdeReplay.cc - RJL 020429 */ < /***************************** < * Imported command interpreter, encode_token and switch(command) < * from bdeReplay.cc; moved rest to state model design in bdeReplay.cc < * - RJL 020429 < ********************************/ < < replayCode < encode_token(char *token) { < /* encode_token converts first token on a logfile line to an < * enumerated replayCode type, cast to an int switch(command) argument. < * Moved to pr_log.c where chgen can produce it - RJL 020427 < */ < < int tokenlength = strlen(token); < if (tokenlength==10) { < if (strcmp(token,"PR_SET_INT") == 0) return SetIntCmd; < else if (strcmp(token,"PR_SET_FLT") == 0) return SetFltCmd; < else if (strcmp(token,"PR_SET_KEY") == 0) return SetKeyCmd; < else if (strcmp(token,"PR_SET_STR") == 0) return SetStrCmd; < } < else if (tokenlength==2) { //ordered by decreasing frrequency < if (strcmp(token,"WA") == 0) return WaitCmd; < else if (strcmp(token,"DL") == 0) return DeleteCmd; < else if (strcmp(token,"SR") == 0) return StartCmd; < else if (strcmp(token,"FR") == 0) return FreeCmd; < else if (strcmp(token,"IN") == 0) return InitCmd; < else if (strcmp(token,"LD") == 0) return LoadCmd; < else if (strcmp(token,"SP") == 0) return StopCmd; < else if (strcmp(token,"VN") == 0) return ViewNameCmd; < } < else < //expect table row to be pr_added < return AddRowCmd; // default < } // end encode_token < < < /* do_command: replay logfile command interpreter - < * called from bde/src/bdeReplay.cc: int replay_log(void) callback STATE0/1/2. < * ZCao 02s592 and RJL 020429 */ < /* calls hcg_parse and log_do_set* */ < < int do_command(char* hcg_buffer, char* token, int idx) < { < extern FILE * logfile_fp; < char temp[BUFSIZE]; < /* parse error when vars declared inside case: RJL 020430 */ < int totMsec; < int temp_newint; < float temp_newflt; < char temp_newstr[BUFSIZE+1]; < char datalist[BUFSIZE]; < char tempdatalist[BUFSIZE]; < char logviewname[NAMELENGTH]; < char datafile[NAMELENGTH]; < char newdatafile[NAMELENGTH]; < char temppkey[BUFSIZE]; < char *addlist; < < idx = 0; < hcg_parse(hcg_buffer,token,&idx); < command = encode_token(token); // RJL 020427 - rev. 020304 < dprintf2args("Token=%s, Command = %d\n", token, command); < < switch((int)command) { < < case WaitCmd: < /* get the wait times */ < hcg_parse(hcg_buffer,temp,&idx); < < /* convert seconds and milliseconds to milliseconds */ < totMsec = atoi(temp); < dprintf1arg("Found WA with total milliseconds %d.\n",totMsec); < < /* must do the wait */ < if ((near_realtime ==1) && (totMsec > 0)) < log_sleep(totMsec); < // TBD: see if XtAppAddTimer can support WAits instead < break; < < case DeleteCmd: < hcg_parse(hcg_buffer,temp_newkey,&idx); < assert(strlen(temp_newkey) == HCG_KEY_SIZE);/* \0 not counted */ < log_do_delete(temp_newkey); < break; < < case SetIntCmd: < // int temp_newint; < hcg_parse(hcg_buffer,temp_tbl,&idx); < hcg_parse(hcg_buffer,temp_field,&idx); < hcg_parse(hcg_buffer,temp_newval,&idx); < temp_newint = atoi(temp_newval); < log_do_set_int(temp_tbl,temp_field,temp_newint); < break; < < case SetFltCmd: < //float temp_newflt; < hcg_parse(hcg_buffer,temp_tbl,&idx); < hcg_parse(hcg_buffer,temp_field,&idx); < hcg_parse(hcg_buffer,temp_newval,&idx); < temp_newflt = atof(temp_newval); < log_do_set_flt(temp_tbl,temp_field,temp_newflt); < break; < < case SetKeyCmd: < hcg_parse(hcg_buffer,temp_tbl,&idx); < hcg_parse(hcg_buffer,temp_field,&idx); < hcg_parse(hcg_buffer,temp_newkey,&idx); < log_do_set_key(temp_tbl,temp_field,temp_newkey); < // TBD: Check that log_do_set_key encodes the keyvalue < break; < < case SetStrCmd: < //char temp_newstr[BUFSIZE+1]; < hcg_parse(hcg_buffer,temp_tbl,&idx); < hcg_parse(hcg_buffer,temp_field,&idx); < hcg_parse(hcg_buffer,temp_newstr,&idx); < log_do_set_str(temp_tbl,temp_field,temp_newstr); < break; < < case InitCmd: < //char datalist[BUFSIZE]; < //char tempdatalist[BUFSIZE]; < < hcg_parse(hcg_buffer,viewname,&idx); < hcg_parse(hcg_buffer,temp,&idx); < strcpy(datalist,strstr(hcg_buffer, temp)); < convert2temp(datalist,tempdatalist); < dprintf2args("Found IN with viewname %s, datalist=%s.\n",viewname,temp); < pr_init(viewname,tempdatalist); < hcg_ascii_fp = logfile_fp; /* reset the file pointer */ < break; < < < case LoadCmd: < //char logviewname[NAMELENGTH]; < //char datafile[NAMELENGTH]; < //char newdatafile[NAMELENGTH]; < hcg_parse(hcg_buffer,logviewname,&idx); < hcg_parse(hcg_buffer,datafile,&idx); < sprintf(newdatafile,"temp%s",datafile); < dprintf2args("Found LD: viewname:%s,datafile:%s.\n",\ < logviewname, newdatafile); < pr_load(logviewname,newdatafile); < hcg_ascii_fp = logfile_fp; /* restore? the file pointer */ < break; < < < case FreeCmd: < dprintf("Found FR.\n"); < pr_free(); < /* clearObjects(); in replay_log: check if clearCanvas implied? */ < /* Don't redraw HG-row - DB is empty; - RJL */ < break; < < case ViewNameCmd: < hcg_parse(hcg_buffer,viewname,&idx); < dprintf1arg("Found VN with viewname %s.\n",viewname); < strcpy(hcg_viewname,viewname); < break; < < case StopCmd: < dprintf("Found SP\n"); < replayState = STATE2; // GO TO STATE2 < break; < < case AddRowCmd: < default: < //char temppkey[BUFSIZE], *addlist; < if (strlen(token)!= HCG_KEY_SIZE) // pkey, 8 or 12 bytes < printf("Logfile: unknown command '%s' - ignored\n", token); < else < strcpy(temppkey,token); < hcg_parse(hcg_buffer,temp, &idx); < addlist = (char *)strstr(hcg_buffer, temp); < if (find_tbl_idx(temppkey)==0) { < dprintf1arg("Unknown pkey %s: skipping \n", token); < } < else { < dprintf2args("Found Add with pkey %s, rest %s.\n",temppkey,addlist); < log_do_add(hcg_viewname,hcg_table_seq_list[hcg_tbl_idx]. < ttabbrev,addlist); < } < break; // AddRow is the default case < < } // end switch(command) < return (command); /* needed for second switch(command) which */ < /* decides if displaygraph and ReDraw are needed */ < } // end do_command() - in pr_log.c < < < /**$RL/pr_util/pr_log.c l.1976: **************************************** < * pr_replay() - sets up file environment for callback replay_log.cc * < * Precondition: Two files exist: logfile.* has update commands, * < * and logfileDB1.dat has initial database checkpoint TBLoaded * < * near_realtime==1 implies perform WAit commands; * < * take_endsnapshop==1 implies checkpointlogfileDB3.dat at end. * < * replay_log is a callback; it will NOT return to pr_log.c; * < * It returns replayState=0/1/2 or a negative error code to X11. * < *********************************************************************** < */ < /************************************************************/ --- > replayCode encode_token( char *token ) > { > int tokenlength = strlen(token); > if ( tokenlength == 10 ) { > if (strcmp(token, "PR_SET_INT") == 0) return SetIntCmd; > else if (strcmp(token, "PR_SET_FLT") == 0) return SetFltCmd; > else if (strcmp(token, "PR_SET_KEY") == 0) return SetKeyCmd; > else if (strcmp(token, "PR_SET_STR") == 0) return SetStrCmd; > } > else if (tokenlength == 2) { > if (strcmp(token, "WA") == 0) return WaitCmd; > else if (strcmp(token, "DL") == 0) return DeleteCmd; > else if (strcmp(token, "SR") == 0) return StartCmd; > else if (strcmp(token, "FR") == 0) return FreeCmd; > else if (strcmp(token, "IN") == 0) return InitCmd; > else if (strcmp(token, "LD") == 0) return LoadCmd; > else if (strcmp(token, "SP") == 0) return StopCmd; > else if (strcmp(token, "VN") == 0) return ViewNameCmd; > } > else > return AddRowCmd; > } /*end encode_token*/ > > > /************************************************************/ > /* Function:do_command */ > /* */ > /* This function is command interpreter for replay logfile */ > /* */ > /************************************************************/ > > int do_command( char *hcg_buffer, char *token, int idx) > { > extern FILE * logfile_fp; > char temp[BUFSIZE]; > int totMsec; > int temp_newint; > float temp_newflt; > char temp_newstr[BUFSIZE+1]; > char datalist[BUFSIZE]; > char tempdatalist[BUFSIZE]; > char logviewname[NAMELENGTH]; > char datafile[NAMELENGTH]; > char newdatafile[NAMELENGTH]; > char temppkey[BUFSIZE]; > char *addlist; > > idx = 0; > hcg_parse(hcg_buffer,token,&idx); > command = encode_token(token); > dprintf2args("Token =%s, Command = %d\n", token, command); > switch((int)command) { > > case WaitCmd: > /* get the wait times */ > hcg_parse(hcg_buffer,temp,&idx); > /* convert seconds and milliseconds to milliseconds */ > totMsec = atoi(temp); > dprintf1arg("Found WA with total milliseconds %d.\n",totMsec); > if ((near_realtime ==1) && (totMsec > 0)) > log_sleep(totMsec); > break; > > case DeleteCmd: > hcg_parse(hcg_buffer,temp_newkey,&idx); > assert(strlen(temp_newkey) == HCG_KEY_SIZE); > log_do_delete(temp_newkey); > break; > > case SetIntCmd: > // int temp_newint; > hcg_parse(hcg_buffer,temp_tbl,&idx); > hcg_parse(hcg_buffer,temp_field,&idx); > hcg_parse(hcg_buffer,temp_newval,&idx); > temp_newint = atoi(temp_newval); > log_do_set_int(temp_tbl,temp_field,temp_newint); > break; > > case SetFltCmd: > //float temp_newflt; > hcg_parse(hcg_buffer,temp_tbl,&idx); > hcg_parse(hcg_buffer,temp_field,&idx); > hcg_parse(hcg_buffer,temp_newval,&idx); > temp_newflt = atof(temp_newval); > log_do_set_flt(temp_tbl,temp_field,temp_newflt); > break; > > case SetKeyCmd: > hcg_parse(hcg_buffer,temp_tbl,&idx); > hcg_parse(hcg_buffer,temp_field,&idx); > hcg_parse(hcg_buffer,temp_newkey,&idx); > log_do_set_key(temp_tbl,temp_field,temp_newkey); > break; > > case SetStrCmd: > hcg_parse(hcg_buffer,temp_tbl,&idx); > hcg_parse(hcg_buffer,temp_field,&idx); > hcg_parse(hcg_buffer,temp_newstr,&idx); > log_do_set_str(temp_tbl,temp_field,temp_newstr); > break; > > case InitCmd: > hcg_parse(hcg_buffer,viewname,&idx); > hcg_parse(hcg_buffer,temp,&idx); > strcpy(datalist,strstr(hcg_buffer, temp)); > convert2temp(datalist,tempdatalist); > dprintf2args("Found IN with viewname %s, datalist=%s.\n",viewname,temp); > pr_init(viewname,tempdatalist); > hcg_ascii_fp = logfile_fp; /* reset the file pointer */ > break; > > case LoadCmd: > hcg_parse(hcg_buffer,logviewname,&idx); > hcg_parse(hcg_buffer,datafile,&idx); > sprintf(newdatafile,"temp%s",datafile); > dprintf2args("Found LD: viewname:%s,datafile:%s.\n",logviewname, newdatafile); > pr_load(logviewname,newdatafile); > hcg_ascii_fp = logfile_fp; > break; > > case FreeCmd: > dprintf("Found FR.\n"); > pr_free(); > break; > > case ViewNameCmd: > hcg_parse(hcg_buffer,viewname,&idx); > dprintf1arg("Found VN with viewname %s.\n",viewname); > strcpy(hcg_viewname,viewname); > break; > > case StopCmd: > dprintf("Found SP\n"); > replayState = STATE2; > break; > > case AddRowCmd: > default: > if (strlen(token)!= HCG_KEY_SIZE) > printf("Logfile: unknown command '%s' - ignored\n", token); > else > strcpy(temppkey,token); > hcg_parse(hcg_buffer,temp, &idx); > addlist = (char *)strstr(hcg_buffer, temp); > if (find_tbl_idx(temppkey)==0) { > dprintf1arg("Unknown pkey %s: skipping \n", token); > } > else { > dprintf2args("Found Add with pkey %s, rest %s.\n",temppkey,addlist); > log_do_add(hcg_viewname,hcg_table_seq_list[hcg_tbl_idx]. > ttabbrev,addlist); > } > break; // AddRow is the default case > > } // end switch(command) > return (command); /* needed for second switch(command) which */ > > } /*end do_command */ > > > /************************************************************/ 2026,2028c1974 < < int pr_replay(char *view, char logfile[NAMELENGTH], < int near_realtime, int take_endsnapshot) --- > int pr_replay(char *view,char logfile[NAMELENGTH],int near_realtime,int take_endsnapshot) 2030,2036c1976,1980 < /* NOTE: init.cc has -r replayfile option */ < /* Two files are assumed: logfile has update commands, */ < /* logfileDB1.dat has initial database checkpoint TBLoaded */ < < char filelist[BUFSIZE], tempfilelist[BUFSIZE]; < char tempvar[BUFSIZE], logfiledb[NAMELENGTH]; < int retval; // if application is not bde (BDELOG not defined) --- > /*unused: FILE *log_fp;*/ > char filelist[BUFSIZE], tempfilelist[BUFSIZE],tempvar[BUFSIZE], logfiledb[NAMELENGTH]; > int retval; > > assert( near_realtime == 0 || near_realtime == 1); 2038d1981 < assert(near_realtime==0 || near_realtime==1);//pre-condition 2068,2074c2011 < < /* Build list of filenames from lines declaring */ < /* 'LogDataFile filename' in file "logdata.txt": */ < /* and copy their data to temp##filename */ < /* Append these nams + logfile##DB1.dat to filelist */ < < log_parselogdata(tempfilelist); --- > log_parselogdata(tempfilelist); 2076,2078d2012 < #ifdef DEBUG < printf("filelist: %s \n\n",filelist); < #endif 2080,2101c2014,2025 < /* reserve pkey ranges and load the database */ < /* TBD: get rid of the bdetest binding here - RJL 020430 */ < /* Check if view needs a default, since .viewdefs is a list */ < < pr_init("../lib/bdetest.viewdefs", filelist); < pr_load(view, logfiledb); < // del_tempfiles(tempfilelist); /* moved here - RJL 020430 */ < < /* load logfileDB1.dat BEFORE replay */ < /* bde's pr_load must discover "SR" in logfile */ < /* in order to call pr_replay. */ < /* Pr_replay will not replay the log under X11: */ < /* For bde, the X11 event handler is installed by fileio.cc */ < /* and enabled by setting hcg_log = 2 and replayState = STATE0*/ < < #ifndef BDELOG < /* NOT using bde's X11 GUI: replay completely: */ < /* WARNING 020618: implicit declaration of function `replay_log' */ < retval = replay_log(); //(void arglist now - RJL 020501) < if (retval != 0) { < hcg_log = 0; < return(retval); // to pr_load client --- > dprintf1arg("filelist: %s \n\n", filelist); > > /* initialize & load the database */ > pr_init("../lib/bdetest.viewdefs",filelist); > pr_load(view,logfiledb); > > /* replay the log */ > #ifndef BDELOG > retval = replay_log(); > if ( retval != 0 ) { > hcg_log = 0; > return(retval); 2103c2027 < /* In bde, this is a replay_log STATE2 function - RJL 020429 */ --- > 2106,2107c2030,2031 < sprintf(tempvar,"%sDB3.dat",logfile); < pr_dump(view, tempvar,0,"w"); --- > sprintf(tempvar,"%sDB3.dat",logfile); > pr_dump(view, tempvar,0,"w"); 2110,2113d2033 < /* delete interim datafiles */ < /* Why not do this earlier? del_tempfiles moved up - RJL 020430 */ < < hcg_log = 0; /* replay no longer active */ 2114a2035 > hcg_log = 0; 2116c2037 < } // end pr_replay(). --- > } 2119,2162d2039 < void HAverify(void) { < /* custom referential integrity test for HA table - RJL 020618 */ < /* this version will abort on first failed assertion */ < /* TBD: make sure viewname doesn't need log_ or hcg_ prefix. */ < /* save initial pointers */ < /* int HNrowcnt=0; int HArowcnt=0; int HAchildcnt=0; */ < /* RJL 020618: ???The above line breaks gcc; I moved it to top */ < /* -------------- < * pr_log.c: In function `log_do_delete': < * pr_log.c:1093: parse error before `int' < * pr_log.c:1110: `HNrowcnt' undeclared (first use in this function) < * pr_log.c:1113: `HAchildcnt' undeclared (first use in this function) < * ------------ < */ < int HNrowcnt=0; int HArowcnt=0; int HAchildcnt=0; < struct HA *HAtemp; < struct HN *HNtemp; < HAtemp = HAcurr; /* save HAcurr */ < HArowcnt = 0; < table_loop(viewname, HA) { < printf("\t\tHArow %d, HAid = %x, HNid = %x\n", ++HArowcnt, < (unsigned int) HAcurr->HAid, (unsigned int) HAcurr->HNid); < assert(HAcurr->HNid_pp != NULL); < assert(HAcurr->HNid_fpp != NULL); < } < HNtemp = HNcurr; < HNrowcnt = 0; < table_loop(viewname, HN) { < printf( "\tHNrow %d: HNid = %x \n", < ++HNrowcnt, (unsigned int)HNcurr->HNid); < HAchildcnt = 0; < child_loop(HN,HA,HAid,HNid) { < printf("\t\tHAchild %d, HAid = %x, HNid = %x\n", ++HAchildcnt, < (unsigned int) HAcurr->HAid, (unsigned int) HAcurr->HNid); < assert(HAcurr->HNid_pp == HNcurr); < assert(HAcurr->HNid == HNcurr->HNid); < if last_child(HN, HA, HNid) /* RJL 020619 */ < assert ((struct HN*) HAcurr->HNid_fpp == HNcurr); < } /* child_loop - exits at last child */ < } /* table_loop */ < /* restore initial pointers */ < HNcurr = HNtemp; < HAcurr = HAtemp; < } /* End of HAverify integrity test - RJL */