$RBGB/probj.vs.srcDiffs060116.2340 [Only] pr_util_nolog/*/probj contains obsolete copies of bde/src/*.cc files. ------------------ venus.cs.uml.edu(150)> lg pr_util_nolog/a*/probj/*.cc | wc 34 306 3096 venus.cs.uml.edu(151)> lg pr_util_log/a*/probj/*.cc | wc ls: No match. 0 0 0 venus.cs.uml.edu(152)> lg pr_util_log/i*/probj/*.cc | wc ls: No match. 0 0 0 venus.cs.uml.edu(153)> lg pr_util_nolog/i*/probj/*.cc | wc ls: No match. 0 0 0 ------------------- 4300 diff lines: pr_util_*log/*/probj/*.cc is uniformly out of date. -------- grep '\+\+\+\+\+\+\+\+\+\+' $RBGB/probj.vs.srcDiffs060116.2340 | wc 35 37 1714 -------------- I removed these files after saving this record. - RJL060116 venus.cs.uml.edu(157)> rm pr_util_nolog/alpha/probj/*.cc =============================================================== Script started on Mon Jan 16 23:37:05 2006 ... .tcshrc exits [venus.cs.uml.edu1](1)> pwd /tmp_mnt/nfs/galaxy/faculty/fac1/lechner/bde2alpha_rl/sandbox/bdeNT050526/bdegen13/bde [venus.cs.uml.edu1](2)> date 060116:2337 ---------------------------------- [venus.cs.uml.edu1](3)> foreach f ( `ls pr_util_*log/*/probj/*.cc` ) foreach? echo "+++++++++++++++++++++++++++++++++++++++++++" foreach? echo $f foreach? diff $f $RBGB/src foreach? end +++++++++++++++++++++++++++++++++++++++++++ pr_util_nolog/alpha/probj/bde.cc 13a14,19 > // Revision 1.8 2006/01/15 22:37:15 lechner > // Expanded comment re: startlog at line 128 > // > // Revision 1.7 2005/10/23 07:27:33 lechner > // Added one comment line. > // 104c110 < "$Id: bde.cc,v 1.6 2005/07/30 01:28:41 lechner Exp $"; --- > "$Id: bde.cc,v 1.8 2006/01/15 22:37:15 lechner Exp $"; 124a131,133 > // #ifdef STARTLOG , call pr_startlog() in fileio.cc -RJL050909 > // (where to call startlog ? before main loop? -RJL051215) > 183d191 < +++++++++++++++++++++++++++++++++++++++++++ pr_util_nolog/alpha/probj/bendpt.cc +++++++++++++++++++++++++++++++++++++++++++ pr_util_nolog/alpha/probj/bendptops.cc 16a17,22 > // Revision 1.8 2005/12/10 02:06:18 lechner > // Removed local decl of topobject (line 269); it is extern in graph.h. > // > // Revision 1.7 2005/12/10 01:59:36 lechner > // Added decl. line ?66: Ggroup * topobject; > // 112c118 < "$Id: bendptops.cc,v 1.6 2005/05/03 06:56:06 lechner Exp $"; --- > "$Id: bendptops.cc,v 1.8 2005/12/10 02:06:18 lechner Exp $"; +++++++++++++++++++++++++++++++++++++++++++ pr_util_nolog/alpha/probj/buttonevent.cc 11a12,20 > // Revision 1.11 2005/12/10 03:21:46 lechner > // > // Reformatted state trace output before switch (selected.getstate()) {...}: > // if (GraphIsDisplayed || ( selected.getstate() == SGrph_create ) ) > // > { dprintdd("State=%x:buttonevent=%d; ",selected.getstate(),event->type); > // > dprintdd("at mouse position x=%d, y=%d\n", event->x, event->y); > // switch(selected.getstate()) {... > // TBD: check for self-loops to initial states: (getting obsolete Out-Of-State errors). > // 146c155 < "$Id: buttonevent.cc,v 1.10 2005/05/03 06:56:06 lechner Exp $"; --- > "$Id: buttonevent.cc,v 1.11 2005/12/10 03:21:46 lechner Exp $"; 148c157 < --- > // Only one function dobuttonevent() inside: 156c165 < extern int GraphIsDisplayed; // altered in fileio rand graphops.cc --- > extern int GraphIsDisplayed; // altered in fileio.cc and graphops.cc 160a170 > 179c189 < { --- > {EP; 185c195 < --- > // TBD: check XtPointer asgnmt to int c below. 198d207 < 202c211,212 < { --- > { dprintdd("State=%x:buttonevent=%d; ",selected.getstate(),event->type); > dprintdd("at mouse position x=%d, y=%d\n", event->x, event->y); 437c447 < //WHY display this in ALL cases? - RJL)40918 --- > //WHY display this in ALL cases? - RJL040918 441c451 < } // end dobuttonevent --- > LP;} // end dobuttonevent +++++++++++++++++++++++++++++++++++++++++++ pr_util_nolog/alpha/probj/captionops.cc 14c14 < "$Id: captionops.cc,v 1.5 2005/05/29 01:58:54 lechner Exp $"; --- > "$Id: captionops.cc,v 1.7 2005/12/11 20:49:35 lechner Exp $"; 17a18,23 > // Revision 1.7 2005/12/11 20:49:35 lechner > // Minor comment changes. > // > // Revision 1.6 2005/10/23 07:31:54 lechner > // Made id local, not static, in two functions. Minor cosmetic changes. > // 192c198,199 < --- > //extern Ggroup* topobject; //in graph.h; = new in init.cc; > // for caption_create and caption_resize 255d261 < 347c353 < hcg_key id; --- > hcg_key id = 0; // local now- no longer static (=0 added by RJL050909_ 376c382 < else {}; //%%SCDBUA4: null selection1 => no-op --- > else {}; //%%SCDBUA4: null selection1 => no-op & no TR 408c414,415 < DPS(SCCDBUG2a);id = selection2->getid(); --- > DPS(SCCDBUG2a); > id = selection2->getid(); 479c486 < hcg_key id; --- > hcg_key id; // local, no longer static 512a520 > 557a566 > 634,635c643,644 < (unsigned long)cs, (unsigned int)(cs->getid())); < --- > (unsigned long)cs, (unsigned long)(cs->getid())); > //what scoped id is first updated by dprintdd's getid above??? - RJL050909 649c658 < selected.changeAttribState(SCCR);//change-State --- > selected.changeAttribState(SCCR);//change-State; id undef ??? 689c698 < else { //%%SCCRBDG3: new selection: --- > else { //%%SCCRBDG3: new selection: [WHO SETS id??-RJL050909 831c840,841 < ///////////////////////////////////////////////////// --- > > /////////////////////// 841-863 ////////////////////////////// 834d843 < 854c863 < //caption_resize.cc041113:1-316--->captionops.cc041119:520-816 --- > //caption_resize.cc 841-863 856c865 < /***************************************************** --- > /********************* addcaptiontext 865-959 ******************************** 877c886 < { --- > {EP; 919d927 < //if (last_child(CG,GX,CGid)) { //(GXcurr->CGid_fpp==CGcurr) 923a932 > //if (last_child(CG,GX,CGid)) break; 924a934 > assert ((struct CG*)GXcurr->CGid_fpp == CGcurr); 941c951 < DP; pr_add( "94sbdeview", GX, (hcg_ptr)GX_elt ) ; --- > DP; pr_add( "94sbdeview", GX, (hcg_ptr)GX_elt ) ; // sets CGcurr, CGid_pp etc. 945c955 < // (void) new captiontext(GX_elt); --- > // (void) new captiontext(GX_elt); // Unresolved - RJL050909; 947a958 > // Conjecture: Since CG has GX-child-set, ReDraw CG does child_loop(CG,GX...)?? 949c960 < } // end addcaptiontext --- > LP;} // end addcaptiontext (865-959) 951d961 < #if 0 952a963,964 > #if 0 > /* 963-1004: N/A to bdegen13: using XB -RJL060116*/ 954d965 < 957c968 < * node:next_text_child() --- > * caption::next_text_child() +++++++++++++++++++++++++++++++++++++++++++ pr_util_nolog/alpha/probj/cursor.cc +++++++++++++++++++++++++++++++++++++++++++ pr_util_nolog/alpha/probj/dialog.cc +++++++++++++++++++++++++++++++++++++++++++ pr_util_nolog/alpha/probj/display.cc 11a12,25 > // Revision 1.12 2005/10/23 07:35:50 lechner > // Added EP (Enter Proc) and LP (Leave Proc) macro calls xxi > // that log procedure entry and return to stdout. > // > // Revision 1.11 2005/08/26 01:16:53 lechner > // 245: Removed warning: unsigned int format, pointer arg (arg 3). > // > // Revision 1.10 2005/08/23 22:03:47 lechner > // Fixed a typo in " if (!(hasType(cHN->HNid, HN)))"/ > // > // Revision 1.9 2005/08/12 04:28:11 lechner > // Replaced a failed assert by this workaround circa l. 233: > // if (!(hasType(cHN->HNid, HN) {... printf .. LP;return;} > // 158c172 < "$Id: display.cc,v 1.8 2005/05/03 07:02:57 lechner Exp $"; --- > "$Id: display.cc,v 1.12 2005/10/23 07:35:50 lechner Exp $"; 209c223 < { --- > {EP; 212c226 < //EP; --- > 217c231,232 < } --- > LP;} // end ReDraw > 218a234 > /*************************** node::Draw: 231-308 *********************************** 220d235 < /********************************************************************* 231c246 < { --- > {EP; 233d247 < assert(hasType(cHN->HNid, HN)); 235c249,256 < //EP; --- > > //assert(hasType(cHN->HNid, HN));//abort 050811 > if (!(hasType(cHN->HNid, HN))) { > > fprintf(stderr, "cHN = %px is wrong type-ignored\n", cHN); > //was %ul; ==> display.cc:245: warning: unsigned int format, pointer arg (arg 3)-RJL050825 > LP;return; > } 291c312 < } // end node::Draw --- > LP;} // end node::Draw (:231-308) 302c323 < { // Linker fails (unresolved) if omitted - RJL 040602 --- > {EP; // Linker fails (unresolved) if omitted - RJL 040602 304c325 < } // graph::Draw() --- > LP;} // graph::Draw() 316c337 < { --- > {EP; 331c352 < //EP; --- > // 358c379,380 < } // end caption::Draw() --- > LP;} // end caption::Draw() > 366d387 < * 376,377c397,398 < void text::Draw() < { --- > void text::Draw() //#if 0 - for text class is XB in bdesym RJL > {EP; 389c410 < } --- > LP;} 391a413 > 436c458 < { --- > {EP; 442c464 < //EP; --- > // 470c492 < return; // no link can be drawn; accidental selection of invisible HP is possible! --- > LP;return; // no link can be drawn; accidental selection of invisible HP is possible! 564c586 < } //end hlink::Draw() --- > LP;} //end hlink::Draw() +++++++++++++++++++++++++++++++++++++++++++ pr_util_nolog/alpha/probj/draw.cc 8a9,18 > // Revision 1.10 2006/01/15 22:39:09 lechner > // A few comment changes only. > // > // Revision 1.9 2005/10/23 07:37:55 lechner > // Added EP (Enter Proc) and LP (Leave Proc) macro calls > // that log procedure entry and exit to stdout. > // > // Revision 1.8 2005/08/12 04:29:36 lechner > // Disabled some verbose DC and WC debug printouts. > // 169c179 < "$Id: draw.cc,v 1.7 2005/05/03 06:56:07 lechner Exp $"; --- > "$Id: draw.cc,v 1.10 2006/01/15 22:39:09 lechner Exp $"; 240c250 < * for old version, see ./oldccfiles/drawDC2WC2DCold.cc --- > * Old version in ./oldccfiles/drawDC2WC2DCold.cc? [Not in $RBGB-RJL060114] 241a252,254 > // scroll/scale never changed! - RJL040925: > // initClasses.cc:166:int sbx = 0, sby = 0, scalefactor = 0; > 243c256 < { //DC can be event->x,y (ints) --- > {EP; //DC can be event->x,y (ints) 254,255c267,268 < tx = (ix + sbx); < ty = (iy + sby); --- > tx = (ix + sbx); //why add? scrollbar is right not left? - RJL060114 > ty = (iy + sby); //why add? scrollbar is bottom not top? - RJL060114 262,263c275,277 < return; < } // end DCtoWC (rev050212 and 050225-26) --- > LP;return; > LP;} // end DCtoWC (rev050212 and 050225-26) > 264a279 > 266c281 < { //DCtoWC for node w and h without the scrolbar adjustments --- > {EP; //DCtoWC for node w and h without the scrolbar adjustments 276,277c291,293 < return; < } // end scaleDCtoWC --- > LP;return; > LP;} // end scaleDCtoWC > 292c308 < { --- > {EP; 294c310 < //EP; dprintd("scalefactor = %d\n", scalefactor); --- > // dprintd("scalefactor = %d\n", scalefactor); 309,310c325,326 < return; < } // end WCtoDC (new 050212; rev. 050225) --- > LP;return; > LP;} // end WCtoDC (new 050212; rev. 050225) 313c329 < { //WCtoDC for node w and h without the scrolbar adjustments --- > {EP; //WCtoDC for node w and h without the scrolbar adjustments 323,324c339,340 < return; < } // end --- > LP;return; > LP;} // end 346c362 < { --- > {EP; 358c374 < } --- > LP;} 377c393 < { --- > {EP; 391c407 < } --- > LP;} 407c423 < { --- > {EP; 413c429 < } --- > LP;} 423c439 < { --- > {EP; 428c444 < } --- > LP;} 443c459 < { --- > {EP; 448c464 < } --- > LP;} 462c478 < { --- > {EP; 467c483 < } --- > LP;} 473c489 < { --- > {EP; 478c494 < } --- > LP;} 490c506 < { --- > {EP; 497c513 < } --- > LP;} 511c527 < { --- > {EP; 525c541 < } --- > LP;} 537c553 < { --- > {EP; 551c567 < } --- > LP;} 563c579 < { --- > {EP; 578c594 < } --- > LP;} 589c605 < { --- > {EP; 603c619 < } --- > LP;} 614c630 < { --- > {EP; 620c636 < } --- > LP;} 632c648 < { --- > {EP; 638c654 < } --- > LP;} 648c664 < { --- > {EP; 656c672 < } --- > LP;} 761c777 < { --- > {EP; 850c866 < } --- > LP;} 901c917 < } // end switch whichBpt --- > LP;} // end switch whichBpt 911c927 < } // end drawArrow --- > LP;} // end drawArrow 962c978 < { --- > {EP; 969c985 < EP; --- > 1017c1033 < } // end set_segment_GC() --- > LP;} // end set_segment_GC() +++++++++++++++++++++++++++++++++++++++++++ pr_util_nolog/alpha/probj/edit.cc +++++++++++++++++++++++++++++++++++++++++++ pr_util_nolog/alpha/probj/fileio.cc 1d0 < // This version 75866 Apr 11 00:11 fileio.cc; 4/23 local version lost - RJL 26a26,103 > // Revision 1.32 2006/01/15 23:09:10 lechner > // Added comments. Other changes: > // 1196, 1211, 1271: Added dump_row calls for new HG and its title CG and GX-rows: > // > // 1255-1259: Changed dependence of title text offset fields beginx,beginy > // from canvas widget width,height to Caption size CGwidth,CGheight. > // E.g., < beginx = width/2+2; ---> beginx = CGcurr->CGwidth/2.0+2 > // > // 1622-26: #defined and #ifdef tested STARTLOG as well as BDELOG > // before calling pr_startlog. //TBD: Make this a bde command line option. > // > // 1653: Add dprintsd call in CreateHGDialogBox() > // > // 2108: Add fprintf call in doexit() > // > // Revision 1.31 2005/12/10 03:11:25 lechner > // Added misc comments. > // Added macro to print ttabbrev list in encoded order: > // > #define TTPRNT dprint("tbl_encoding [0..9] = FO,GD,HG,HN,HA,HL,HP,HI,CG,GX\n") > // > // Commented out (#if 0) dosave definition (1023-1060). > // Fixed this line: > // > pr_set_flt( CG_elt, CGheight, d_gcheight ) ;//was CGwidth - RJL051127 > // Added 2 pixels to these assignments (1228,1230:) > // > beginx = width/2+2; > // > beginy = -height/2+2; > // and added (1237:) > // > pr_set_str( GX_elt, grphcaption, title); // added 051202 - RJL > // and added pr_add call to add graph title string as a GXrow of a CG: > // // pr_add is necessary after pr_set_key above. > // pr_add( "94sbdeview", GX, (hcg_ptr)GX_elt ) ; > // LP;} // end HGtitle GX c'tor > // (TBFixed: CG border height is too large- size of rectangular node now) > // Added line 1354 to print table type index order: > // > TTPRNT; > // Commented out redundant local function prototypes (doexit, docancel, dosave). > // Removed 'LP;' prefix to 'return' inside comments (globally substituted, N/A there). > // Expanded login_name handling (2147-2156:) because getlogin() fails on Linux. > // Fixed line 2290: > // > else if (strlen(dat_infile) > 0) { // (was if ...==0 - RJL051202) > // > // Revision 1.30 2005/10/23 07:51:35 lechner > // Replaced XP with LP (macro was renamed). > // Circa line 955 added NULL HGcurr check where assert failed: > // > if (HGcurr==NULL) { > // > DP;fprintf(stderr, "Can't do SAVE-AS - invalid HG_pkey; pr_find(...) failed\n"); > // Circa line 1349: restored child_loop mistakenly identified with XB class > // in updatedisplaylist: > // > if (HGcurr==NULL) { > // > DP;fprintf(stderr, "Can't do SAVE-AS - invalid HG_pkey; pr_find(...) failed\n"); > // Circa line 1571: Added to try to enable logging at open-file point: > // > #ifdef BDELOG > // > pr_startlog(infile, GetBDEViewDefsFile()); > // > #endif > // > // Revision 1.29 2005/08/26 03:58:10 lechner > // Changed logic in functions GetBDENewDatFile, GetBDEDatFileList. > // > // Revision 1.28 2005/08/26 02:16:57 lechner > // Inserted {EP: and EP;} and EP;return macro calls to trace nested function entry/exit. > // > // Revision 1.27 2005/08/25 19:06:14 lechner > // Rearranged steps in GetBDEDatFileList() lines 2250... > // > // Revision 1.26 2005/08/23 22:13:46 lechner > // Simplified logic involving DEFAULT_LIB_PATH, lines 1930... > // > // Added code to imitate bde_newdat and bde_viewdefs code style > // around lines 2180... in GetBDENewDatFile(), > // 2230... in GetBDEDatFileList() and 2290... in GetBDEViewDefsFile(). > // > // Re-indented this file - TBD: do this in gen_load_data.c > // > // Revision 1.25 2005/08/12 04:34:45 lechner > // Added if (filename!= NULL) ...else brackets > // around a dprintdd statement. > // Changed malloc and sprintf of title string. > // 28c105 < // Updated comment re: files that #include loaddefaults.h. --- > // Updated comment re: files that include loaddefaults.h. 96c173 < // Moved meets_view prototype after #includes for typedef hcg_key.; --- > // Moved meets_view prototype after includes for typedef hcg_key.; 132c209 < // #included loaddefaults.h" for d_* defaults; insured that d_shape[1] == null --- > // included loaddefaults.h" for d_* defaults; insured that d_shape[1] == null 519c596 < "$Id: fileio.cc,v 1.24 2005/07/31 03:17:19 lechner Exp $"; --- > "$Id: fileio.cc,v 1.32 2006/01/15 23:09:10 lechner Exp $"; 536d612 < // #include (in strings.h) 538d613 < //#include // for eventtype #defines 579a655,657 > /* in pr_dump.c: */ > extern void dump_row(char*, char*, FILE*, char*, int, char*); > 581c659 < /* in pr_log.c: */ --- > /* can't say #ifdef BDELOG 1 above; externs are in pr_log.c: */ 586a665 > 596c675 < // set in left_menu_cb, used in graphobject.cc --- > // set in leftmenu_cb.cc, used in graphobject.cc 674a754,783 > // macro to print ttabbrev list in encoded order: > #define TTPRNT dprint("tbl_encoding [0..9] = FO,GD,HG,HN,HA,HL,HP,HI,CG,GX\n") > > /*********************************************************** > * #ifdef DEBUG, prints row-couns for each table in bde's view: - RJL06016 > * Client: real_load, line 1861 below. > * Pre-cond: view contains at least these 10 tables. > * (A loop would require laborious conversion of case# to tblabbr ) > ********************************************************** */ > void printrowcounts(char* viewname) > {EP; > #ifdef DEBUG > char tblabbr[4]; > tblabbr[3] = '\0'; > if (strcmp(viewname, "94sbdeview")== 0) { > dprint("\tTable:\tRows:\n"); > dprintsd("\t%s:\t%d\n", "FO", pr_rcount(viewname, FO)); > dprintsd("\t%s:\t%d\n", "GD", pr_rcount(viewname, GD)); > dprintsd("\t%s:\t%d\n", "HG", pr_rcount(viewname, HG)); > dprintsd("\t%s:\t%d\n", "HN", pr_rcount(viewname, HN)); > dprintsd("\t%s:\t%d\n", "HA", pr_rcount(viewname, HA)); > dprintsd("\t%s:\t%d\n", "HL", pr_rcount(viewname, HL)); > dprintsd("\t%s:\t%d\n", "HP", pr_rcount(viewname, HP)); > dprintsd("\t%s:\t%d\n", "HI", pr_rcount(viewname, HI)); > dprintsd("\t%s:\t%d\n", "CG", pr_rcount(viewname, CG)); > dprintsd("\t%s:\t%d\n", "GX", pr_rcount(viewname, GX)); > } > #endif > LP;} // end printrowcounts > 721c830 < { --- > {EP; 748,749c857,858 < return (0); // added 2k0713 - RJL < } --- > LP;return (0); // added 2k0713 - RJL > LP;} 755c864 < * returns : None --- > * LP;returns : None 766c875 < { --- > {EP; 791,792c900,901 < return (0); // added 2k0713 - RJL < } --- > LP;return (0); // added 2k0713 - RJL > LP;} 798c907 < returns : None --- > LP;returns : None 814c923 < { --- > {EP; 823c932 < } --- > EP;} 840c949 < { --- > {EP; 842c951 < } --- > EP;} 856c965 < { --- > {EP; 865c974 < EP; --- > 911c1020,1026 < assert(HGcurr != NULL); // WHY is this safe????-RJL050606 --- > //assert(HGcurr != NULL); // Unsafe-failed 050830: > // can't SAVE-AS with blank HG-table and unselectable HGrow-RJL050606 > if (HGcurr==NULL) { > DP;fprintf(stderr, "Can't do SAVE-AS - invalid HG_pkey; pr_find(...) failed\n"); > if ( filename != (char *) NULL ) free( filename ); > LP;return; // new - RJL050830 > } 925c1040 < } // end real_saveas --- > LP;} // end real_saveas 937c1052 < { --- > {EP; 939,942c1054,1055 < /* < filenamemessage("/tmp/bdegraph.ps"); < */ < } --- > /* filenamemessage("/tmp/bdegraph.ps"); */ > LP;} 962,975c1075 < { < #if 0 < FILE *del_file; < < // Added by Wenchin Chen on Aug,22,93 < if ((del_file = fopen("dipak_undo","r")) != NULL) { < system("rm -f dipak_undo"); < free(del_file); < dip_sav_id = NULL; < dipak_j = 0; < } < exit(0); < #endif < --- > {EP; 978c1078 < } --- > LP;} 990,992c1090,1092 < < void dosave() < { --- > #if 0 > void dosave() // (1023-1060) (vs. 2019-2040 ???) > {EP; 999c1099 < * then return . --- > * then LP;return . 1003,1004c1103,1104 < help_dialog( " DB not saved: o file name specified " ); < return ; --- > help_dialog( " DB not saved: no file name specified " ); > LP;return ; 1028,1029c1128,1129 < } // end dosave < --- > LP;} // end dosave (1023-1060) > #endif 1045c1145 < { --- > {EP; 1057c1157 < } --- > LP;} 1060c1160 < /*********************1060:1173****************************************************** --- > /********************* 1162:1275 ******************************************** 1074c1174 < { --- > {EP; 1076c1176 < //hcg_key parentHGid; // TBD: move to HN.HGid2 as optional expansion - RJL --- > 1079c1179 < float canvas_centerx, canvas_centery; // depends on canvas width/height --- > float canvas_centerx, canvas_centery; 1119,1120d1218 < // HG-fields depend on char* loginname, char* GetCurrentDateAndTime, char* title < // So call HGcreate(char* loginname, char* GetCurrentDateAndTime, char* title); 1122,1124c1220,1222 < assert(HG_elt != NULL); //Failed -crashed 040228:1115 < pr_set_str(HG_elt, FSid, "FS010000"); // non-key - FS-row TBD. < pr_set_str(HG_elt, HNid, "HN010000"); // non-key -Obsolete????? --- > assert(HG_elt != NULL); //Above line crashed 040228:1115 > pr_set_str(HG_elt, FSid, "FS010000"); // not used; is_key = 0 > pr_set_str(HG_elt, HNid, "HN010000"); // not used; is_key = 0 1132c1230 < pr_set_str(HG_elt, HGtitle, title); //not a CG->GX-child string --- > pr_set_str(HG_elt, HGtitle, title); //or set CGcurr->GXid_fcp->grphcaption? 1134c1232 < pr_add("94sbdeview", HG, (hcg_ptr)HG_elt); //HGid == 0 -RJL050727 --- > pr_add("94sbdeview", HG, /*(hcg_ptr)*/ HG_elt); //HGid == 0 -RJL050727 1137c1235 < // BUG:(HG_elt->HGid == 0): pr_add FAILS - RJL050727 --- > pr_dump_row(HG, viewname, stderr, "stderr", 0, "a"); 1142d1239 < // end of potential constructor HGcreate(). 1145,1146d1241 < // CG-fields depend on fkey HG_pkey above, flt canvas_centerx/y, flt d_gcwidth/height < // so call CGcreate(hcg_key HG_pkey, char* date_time, char* title); 1150c1245 < pr_set_flt( CG_elt, CGcentery, canvas_centery ) ; --- > pr_set_flt( CG_elt, CGcentery, canvas_centery ) ; // Why not near top? 1152c1247 < pr_set_flt( CG_elt, CGwidth, d_gcheight ) ; --- > pr_set_flt( CG_elt, CGheight, d_gcheight ) ;//was CGwidth - RJL051127 1154,1155c1249,1250 < // End of CG-row ctor CGcreate() < --- > // End of CG-row ctor > pr_dump_row(CG, viewname, stderr, "stderr", 0, "a"); 1168c1263 < // Javier/Kathy/Lon --- > // Why is (default?) height == 0? 1173c1268 < // a CG COULD hold GX-lines with content: author date version etc. as well as title) --- > // CG COULD hold GX-line content: author date version etc. as well as title 1177,1178c1272,1273 < //dprintd("XtIsSensitive(leftmenu) = %d\n", XtIsSensitive(leftmenu)); < } // end CreateNewGraph (1057:1173) --- > dprintd("XtIsSensitive(leftmenu) = %d\n", XtIsSensitive(leftmenu)); > LP;} // end CreateNewGraph (1057:1275) 1181,1182c1276,1277 < void CreateInitialGraphCaption( char *title ) < // precond: a valid parent ptr CGcurr - RJL 2k0902 --- > void CreateInitialGraphCaption( char *title ) //creates GX child of CGcurr > // precond: a valid parent ptr CGcurr (= CG_elt in CreateNewGraph) - RJL 2k0902 1184c1279 < { --- > {EP; 1190,1191c1285,1286 < int width,height;// font-dependent textbox dimensions < // char *tempid; --- > int width, height; //title text size [DC int pixels?] > char *tempid; 1195d1289 < 1200,1206c1294,1299 < beginx = width/2; < beginy = -height/2; < // tempid = "DA010009"; < < // GX-fields depend on fkey CGcurr->CGid, flt beginx/y,origin=0.0 < // so call GXcreate(hcg_key CGid, float beginx/y); < // perhaps default field values are sufficient for most of these. --- > beginx = CGcurr->CGwidth/2.0+2; // float, centered > beginy = -CGcurr->CGheight/2.0+2;// float, centered > #ifdef DEBUG > printf("GX.title beginx,beginy = %f,%f\n", beginx, beginy);//RJL060114 > #endif > tempid = "DA000000";//100009 -> 000000 - RJL051127 1209,1210c1302,1303 < pr_set_key( GX_elt, CGid, CGcurr->CGid); < pr_set_str( GX_elt, DAid, "DA010009") ; --- > pr_set_key( GX_elt, CGid, CGcurr->CGid); // OK - pr_add will be called > pr_set_str( GX_elt, DAid, tempid ) ; // non-key 1213a1307,1308 > pr_set_str( GX_elt, grphcaption, title); // added 051202 - RJL > // pr_add is necessary after pr_set_key above. [How about ReDraw? - RJL060114] 1215,1217c1310,1313 < < GXcurr = GX_elt; //added - RJL060115 < } // end HGtitle GX c'tor --- > #ifdef DEBUG > pr_dump_row(GX, viewname, stderr, "stderr", 0, "a"); > #endif > LP;} // end HGtitle GX c'tor 1230c1326 < { --- > {EP; 1232c1328 < } --- > LP;} 1249c1345 < { --- > {EP; 1251c1347 < EP; --- > 1269c1365 < } // end donew() --- > LP;} // end donew() 1277c1373 < returns : None --- > LP;returns : None 1305c1401,1403 < /* moved from bdeReplay to fileio.cc --- > /* NOTE: creates List of node, hlink, caption class objects for cHG > * to be drawn by topobject->Draw; LIFO List begins at topobject->subobjects. > * Moved from bdeReplay to fileio.cc 1308c1406 < * of new HN/outgoing-HL/CG struct ptrs --- > * of new HN+outgoing-HL+CG struct ptrs 1312a1411,1412 > * Clients: RealDisplayGraph(), Replay_LoadGraph() in fileio.cc > * with arg = HGcurr or HG (or cHG?) 1315c1415,1416 < { --- > {EP; > TTPRNT; // verifies last item is first CG? 1319c1420 < EP; --- > 1326c1427 < child_loop(HN,HL,HLid1,HNid1) //pre-cond: source of link must be in this HN --- > child_loop(HN,HL,HLid1,HNid1) //pre-cond: link source is HNid1 1335,1336c1436,1438 < #if 0 < // Added by 96f523 BDECODE Group for XB text? --- > // Omit because captionext uses XB. How are GX rows added to CG? - RJL060116 > // TBD: check that Draw does child_loop(CG, GX,..) -RJL060116 > // Added by 96f523 BDECODE Group for XB text class- N/A - RJL050909 1338c1440 < // if (GXcurr != NULL) (void) new captiontext(GXcurr); --- > // if (GXcurr != NULL) (void) new captiontext(GXcurr);//#if 0 1340,1342c1442,1444 < #endif < } < } // end updatedisplaylist --- > } // end child_loop(HG,CG,...) > DP;topobject->Ggroup::doDump(); > LP;} // end updatedisplaylist 1346c1448 < * Description: This function displays the graph chosen by the user. --- > * Description: Callback function to display graph chosen by the user. 1352,1353c1454,1455 < * RJL020328: this is not an artifact from a version in which the user < * typed in an HGid from which to pr_find HGcurr; it is actually used. --- > * RJL020328: this is NOT an artifact - it is actually used. > * (An earlier version called pr_find after the user typed in an HGid.) 1360c1462 < { --- > {EP; 1362c1464 < int graphOK; // return status of RealDisplayGraph --- > int graphOK; // LP;return status of RealDisplayGraph 1368,1370c1470,1472 < EP; < dprints("%s: Calling XmStringGetLtoR(cbs->value)\n", __FUNCTION__); < dprint("(Expecting value = the displayed ASCII HG-table row)\n"); --- > > DP;dprint("Calling XmStringGetLtoR(cbs->value)\n"); > dprint("\t(Expecting value = displayed ASCII HG-table row)\n"); 1373a1476 > 1377a1481 > 1384c1488 < dprintsd("%s: RealDisplayGraph returned graphOK = %d\n", __FUNCTION__, graphOK); --- > dprintsd("%s: RealDisplayGraph LP;returned graphOK = %d\n", __FUNCTION__, graphOK); 1391c1495 < // dprintd("XtIsSensitive(leftmenu) = %d\n", XtIsSensitive(leftmenu)); --- > dprintd("XtIsSensitive(leftmenu) = %d\n", XtIsSensitive(leftmenu)); 1400c1504 < } //end DisplayGraph --- > LP;} //end DisplayGraph 1406c1510 < * If can't find the HG-row, returns 0 with HGcurr == NULL. --- > * If can't find the HG-row, LP;returns 0 with HGcurr == NULL. 1419c1523 < { --- > {EP; 1421c1525 < char* hg_string_ptr = hg_string; // char* ---> & - RJL 0400609 --- > char* hg_string_ptr = hg_string; // char* ---> & - RJL 040609 1425c1529 < EP; --- > 1440c1544 < // pr_find must NOT return without a value, which is returned from RealDisplayGraph. --- > // pr_find must NOT LP;return without a value, which is returned from RealDisplayGraph. 1442c1546 < // then pr_find set HGcurr to NULL which aborted bde on return to --- > // then pr_find set HGcurr to NULL which aborted bde on LP;return to 1447c1551 < return(0); --- > LP;return(0); 1459c1563 < updatedisplaylist(HGcurr); // in bdeReplay.cc - RJL 020501 --- > updatedisplaylist(HGcurr); // in fileio.cc (was in bdeReplay.cc) 1465c1569 < return(1); --- > LP;return(1); 1467c1571 < } // end RealDisplayGraph --- > LP;} // end RealDisplayGraph 1481c1585 < { --- > {EP; 1484c1588 < } --- > LP;} 1496c1600 < { --- > {EP; 1502c1606 < } --- > LP;} 1504,1505c1608,1609 < /********************* 1502-1638 ***************************************** < * Description: This function creates the selection box for the HG table --- > /********************* 1611-1801 ***************************************** > * Description: CreateHGDialogBox() creates the selection box for the HG table 1507c1611 < * made to DisplayGraph(). If the user selects a new graph, --- > * made to DisplayGraph(). If the user selects 'New', 1512c1616,1619 < * NONE. --- > * NONE [? - RJL060105: > * Currently it seems to do much more: > * E.g., it calls pr_init and pr_load on infile or current_file > * Graph Select dialog may not be needed if only one HGrow exists.] 1526c1633,1638 < * ******************************************************************** */ --- > * Callbacks: > * XmNokCallback is DisplayGraph > * XmNapplyCallback is NewGraphCallback > * XmNnoMatchCallback is NoMatchCallback > * ******************************************************** */ > 1528,1529c1640,1642 < //iff needed (null infile or "SR" not found) < // infile is NULL when called from graph_select ; --- > // iff needed (either null infile or "SR" not found): > // infile may not exist as passed as argv[1]; > // infile is NULL when called from graph_select 1533c1646,1647 < #define STRING_SIZE 127 --- > int HGrowsize; > EP; dprints("arg1 = infile = %s\n",infile); /* trace entries */ 1535c1649,1650 < XmStringTable str_list; --- > XmStringTable str_list; // fill from hg_row[HGrowsize]: > // 1748: str_list[i++] = XmStringCreateSimple(hg_row); 1537c1652,1653 < int number_of_graphs = 0; --- > int number_of_graphs; // update to pr_rcount("94sbdeview", HG) > 1540c1656,1657 < char hg_row[STRING_SIZE]; /* may truncate HG_row if too small - RJL */ --- > HGrowsize = sizeof(struct HG) + 2*(HCG_KEY_SIZE+1); //HGid + (TBD)FSid.-RJL060115 > char hg_row[HGrowsize]; /* so won't truncate HG_row - RJL */ 1542c1659 < EP; /* trace entries */ --- > DP;dprintd("\tAllocated: HGrow[HGrowsize=%s]\n", HGrowsize); 1545c1662 < if ( infile != (char *) NULL ) /* read specified file */ --- > if ( infile == (char *) NULL ) /* read specified file */ 1546a1664,1672 > //060115: now do this case FIRST, BEFORE calling pr_init and pr_load. > //infile is NULL: get current_filename from > //XmCreateSelectionDialog to select HGid to display? - RJL 94/8/2 > // ^^^^Doesn't make sense here! Gets HGid not filename > //We really want to select filename first, then HG-row - RJL051215 > number_of_graphs = 0; > dialog = XmCreateSelectionDialog(toplevel, current_filename, NULL, 0); > } // if infile == NULL > else { 1553c1679 < pr_init( GetBDEViewDefsFile(), GetBDEDatFileList(infile) ); //hcg_init* = 1 --- > DP;pr_init( GetBDEViewDefsFile(), GetBDEDatFileList(infile) ); //hcg_init* = 1 1555c1681,1684 < //RJL040904: BAD if replay log from other apps which have 'VN non-bdeviewname' cmds? --- > // real_load calls printrowcounts("94sbdeview"); - a debug aid - RJL060115: > number_of_graphs = pr_rcount("94sbdeview", HG); // valid AFTER pr_loading? > > // (TBD: what happens if infile does not exist?) - RJL060115 1556a1686,1708 > ////////////////(experimental code - MOve out of this function.) //////// > //RJL040904: BAD if replay log from other apps which have 'VN otherviewname' cmds? > // New - RJL050909: try to enable logging at file-opening: > // (regardless of hcg_log or hcg_replay? > //TBD: Make this STARTLOG bde command line option > > #define STARTLOG > #ifdef STARTLOG > // A temp fix to enable logging. It may already be a logfile command. > DP; > // BDELOG compiles log/replay code into pr_util_log. This starts logging. > #ifdef BDELOG > fprintf(stdout, "Calling pr_startlog with infile = \"%s\"\n", infile); > pr_startlog(infile, GetBDEViewDefsFile()); //write checkpt infileDB1.dat? > #endif > #ifndef BDELOG > fprintf(stderr, "Can't call startlog; BDELOG and pr_util_log are required.\n"); > #endif > #endif > ////////////////////////////////////////// > // is dialog needed? - non-NULL infile is already defined - RJL060115 > // TBD: check if this makes sure it exists, or prompts for new selection? > dprints("Infile is \"%s\" BEFORE XmCreateSelectionDialog\n", infile); 1559,1566c1711,1715 < } < else { < //infile is NULL: get current_filename from < // ^^^^Don't make sense here! Gets HGid not filename < //XmCreateSelectionDialog to select HGid to display - RJL 94/8/2 < dialog = XmCreateSelectionDialog(toplevel, current_filename, NULL, 0); < } < // What's the diff between the two CreateHGDialog arglists above??????????????????/ --- > dprints("Infile is \"%s\" AFTER XmCreateSelectionDialog\n", infile); > // Do we want to copy infile to current_filename? - RJL060115 > } // if infile != NULL > > // What's the diff in arg2 between the two CreateHGDialog calls above?? 1568,1574c1717,1726 < // (pr_load(view, infile) or current_filename?) < // What is pr_rcount(..,HG) if infile is empty? < number_of_graphs = pr_rcount("94sbdeview", HG); // from pr_load( , infile)) < dprintd("pr_rcount(viewname, HG) is %d\n", number_of_graphs); < // What if current_filename is NULL? < //skip Graph Select if pr_count(view, HG) == 1 - RJL 030802 < if (number_of_graphs == 1) { // display HGrow 1 by default --- > // TBD: pr_load(view, {infile or current_filename})? > // What is pr_rcount(..,HG) if infile is empty? (is number_of_graphs==0?) > // pr_init and pr_load were called on infile IFF infile != NULL - RJL060115 > > number_of_graphs = pr_rcount("94sbdeview", HG); // valid AFTER pr_loading? > DP;dprintd("pr_rcount(viewname, HG) is %d\n", number_of_graphs); > // if current_filename is NULL, number_of_graphs = 0; // WHY? - RJL060115 > dprintsd("Current_filename %s has %d HG-rows\n", > current_filename, number_of_graphs); > if (number_of_graphs == 1) { // skip Graph Selection; display HGrow 1 1576a1729,1730 > DP;dprintsd("RealDisplayGraph(hg_key=%s) returns HGstatus = %d\n", > hg_key, HGstatus); 1579,1580d1732 < < dprintd("RealDisplayGraph(hg_key) returns HGstatus = %d\n", HGstatus); 1582c1734 < //dprintd("XtIsSensitive(leftmenu) = %d\n", XtIsSensitive(leftmenu)); --- > DP;dprintd("XtIsSensitive(leftmenu) = %d\n", XtIsSensitive(leftmenu)); 1584c1736 < return; --- > LP;return; //:1723; was :1628 1589c1741,1743 < str_list = (XmStringTable)XtMalloc(number_of_graphs * STRING_SIZE); --- > str_list = (XmStringTable)XtMalloc(number_of_graphs * HGrowsize); /*was 127*/ > > //WARNING: HGrowsize AFTER decoding HGid is an estimate! - RJL060115 1600a1755,1760 > #if 0 > #define table_loop(viewname,tbl) \ > if (find_view_idx(viewname)) \ > for (tbl##curr = tbl; tbl##curr != NULL; tbl##curr = tbl##curr->next_ptr)\ > if (meets_view(tbl##_idx,hcg_view_idx,tbl##curr->tbl##id)) > #endif 1612c1772 < // dprintd("XtIsSensitive(leftmenu) = %d\n", XtIsSensitive(leftmenu)); --- > dprintd("XtIsSensitive(leftmenu) = %d\n", XtIsSensitive(leftmenu)); 1635d1794 < // (if not done on return to client real_load Replay_LoadGraph or graph_select): 1636a1796 > //(if not done on return to client real_load Replay_LoadGraph or graph_select): 1638,1639c1798,1799 < // dprintd("XtIsSensitive(leftmenu) = %d\n", XtIsSensitive(leftmenu)); < return; // ==> immediate SIGSEGV crash on reading bde_2HG.dat - RJL 040521 --- > dprintd("XtIsSensitive(leftmenu) = %d\n", XtIsSensitive(leftmenu)); > LP;return; // ==> immediate SIGSEGV crash on reading bde_2HG.dat - RJL 040521 1641c1801,1802 < } // end CreateHGDialogBox (line 1502-1639) --- > > LP;} // end CreateHGDialogBox (line 1611-1801) 1665c1826 < { --- > {EP; 1679c1840 < XtFree( error_msg ); --- > DP;XtFree( error_msg ); // crash 051203 1686c1847 < ReDraw(); --- > DP;ReDraw(); 1692c1853 < CreateHGDialogBox(current_filename); --- > DP; CreateHGDialogBox(current_filename); 1694,1696c1855,1857 < // RJL 040520: crash on return from CreateHGDialogBox(), no stack < // RJL 040708: CreateHGDialogBox now calls tSetSensitive(leftmewnu, True) < dprint("fileio.cc:1569: CreateHGDialogBox return is at fileio.cc:(oneHGrow?1448:1502)\n"); --- > // RJL 040520: crash on LP;return from CreateHGDialogBox(), no stack > // RJL 040708: CreateHGDialogBox now calls XtSetSensitive(leftmenu, True) > dprint("fileio.cc:1741: CreateHGDialogBox returns at fileio.cc:(oneHGrow?1628:1683)\n"); 1699c1860,1863 < } // end real_load --- > > printrowcounts("94sbdeview"); // #ifdef DEBUG; new - RJL060116 > > LP;} // end real_load 1710c1874 < { --- > {EP; 1712c1876 < } --- > LP;} 1728c1892 < { --- > {EP; 1752c1916 < } --- > LP;} 1755c1919 < /*************************************************************************** --- > /******************* 1788:1897 ******************************************** 1777c1941 < { --- > {EP; 1822,1823c1986,1987 < // graphobject and left_menu_cb use and set d_shape[0] only < // In left_menu_cb and graphobject d_shape[0] is 'C','R' etc.. --- > // graphobject.cc and leftmenu_cb.cc use and set d_shape[0] only > // In leftmenu_cb.cc and graphobject.cc, d_shape[0] is 'C','R' etc.. 1883c2047 < } --- > LP;} 1885c2049 < // end load_defaults(1648:1757) --- > // end load_defaults(1788:1897) 1906c2070 < { --- > {EP; 1917d2080 < 1920d2082 < 1926,1935c2088,2095 < < #ifdef DEFAULT_LIB_PATH < strcpy (LibPath, DEFAULT_LIB_PATH); < if (LibPath[strlen(LibPath)] != '/') // make sure the file is < strcat (LibPath, "/"); // found in the /lib directory < sprintf (filename, "%s%s", LibPath, FOfile_name); < #else < strcpy (filename, FOfile_name); // file need to be in the /src directory < #endif < --- > // The getenv() function returns a pointer to a string containing the value in > // the current environment if such a string is present. If such a string is > // not present, a null pointer is returned. > strcpy(LibPath,getenv("DEFAULT_LIB_PATH")); > if (LibPath == (char*)NULL) //work-around if getenv fails. > strcpy(LibPath, "../lib"); > sprintf (filename, "%s/%s", LibPath, FOfile_name); > DP;dprints("LibPath = \"%s\"\n", LibPath); //RJL050825 1937,1938c2097 < pr_load( "94sbdedefaultsView", filename); /* pr_init first? - RJL 040601 */ < //why should FOcurr be initialized yet? - RJL 2k0713 --- > pr_load( "94sbdedefaultsView", filename); /* ../lib/FOfile_name */ 1945,1948c2104,2105 < #if 0 < free( filelist ); < #endif < } --- > // free( filelist ); > } // end if !FOloaded 1953c2110 < } // end load_FOtable --- > LP;} // end load_FOtable 1961c2118 < { --- > {EP; 1970,1972c2127 < return (0); < } < return (1); --- > LP;return (0); 1973a2129,2130 > LP;return (1); > LP;} 1985,1986c2142,2143 < void dosave(Widget, XtPointer, XmAnyCallbackStruct *) < { --- > void dosave(Widget, XtPointer, XmAnyCallbackStruct *) //(2019-2040) vs. 1023-1060 ??? > {EP; 1993c2150 < return ; --- > LP;return ; 2006c2163 < } // end dosave --- > LP;} // end dosave (2019-2040) 2014c2171 < // --- > // Clients: doexit, fileio.cc only 2017c2174 < { --- > {EP; 2019c2176 < } --- > LP;} 2025,2026c2182,2183 < // Function : Pop down dialog widget and exit < // Added by : 93fbde(OOM) --- > // Function : Pop down dialog widget callback: printSTEVcounts and exit > // Added by : 93fbde(OOM); printSTEVcounts called by RJL041129 2029,2030d2185 < //extern void printEventStats(FILE*, int); //in init.cc < //extern void printStateEntries(FILE*, int); // in init.cc 2034,2035c2189,2192 < { < EP; docancel(0, 0, 0); // calls XtPopdown above. --- > {EP; > fprintf(stdout, > "\n\tdoexit called: bde main loop exits; \n\n"); > docancel(0, 0, 0); // calls XtPopdown above. 2037c2194 < } --- > LP;}// end doexit 2051c2208 < { --- > {EP; 2053,2055c2210,2212 < void doexit(Widget, XtPointer, XmAnyCallbackStruct *); < void docancel(Widget, XtPointer, XmAnyCallbackStruct *); < void dosave(); --- > //void doexit(Widget, XtPointer, XmAnyCallbackStruct *); > //void docancel(Widget, XtPointer, XmAnyCallbackStruct *); > //void dosave(); 2092c2249 < } // end create_exit_dialogbox --- > LP;} // end create_exit_dialogbox 2104a2262 > * Revised 051202 - RJL 2106d2263 < 2108,2112c2265,2275 < { < char *login_name = getlogin(); // [linux] may return NULL ptr - RJL041012 < DP;if (login_name!=NULL) { < dprints("getlogin returns login_name = %s\n", login_name); < return( login_name ); --- > {EP; > static char login_name[13] = "Unknown"; > if (getlogin() != 0) { //fails on mercury - RJL051202 > strncpy(login_name, getlogin(), 12); > login_name[12] = '\0'; > dprints("login name = %s\n ", login_name); > LP;return login_name; > } > else { //probable Linux entry pt > dprint("login name = \"Unknown\"\n"); > LP;return "Unknown"; 2114,2119c2277 < else { < dprint("getlogin fails; username defaults to UserUnknown\n"); < return "UserUnknown"; < } < } < --- > LP;} //end GetUserName 2132c2290 < { --- > {EP; 2153d2310 < /* convert to all upper case */ 2155a2313 > LP;return( buf ); 2157,2159c2315 < return( buf ); < < } --- > LP;} //end GetCurrentDateAndTime 2166c2322 < * This routine returns the name of the bdenew.dat file. The --- > * This routine LP;returns the name of the bdenew.dat file. The 2176a2333 > * Client: GetBDEDatFileList:fileio.cc:2247 2180c2337 < { --- > {EP; 2182c2339,2345 < static char tmpfilename[PATH_MAX /*+ FILENAME_MAX*/]; --- > static char tmpfilename[PATH_MAX]; > static char bde_lib_path[PATH_MAX]; > /* New code imitates bde_newdat and bde_viewdefs code style - RJL050815 */ > if (getenv("DEFAULT_LIB_PATH")!= (char*)NULL) > strcpy(bde_lib_path, getenv("DEFAULT_LIB_PATH")); > else > strcpy(bde_lib_path, "../lib"); 2184,2187c2347,2351 < if ( bde_newdat == (char *) NULL ) < if ( ( bde_newdat = getenv( "BDE_NEWDAT" ) ) == (char *) NULL ) < { < sprintf(tmpfilename, "%s/%s", DEFAULT_LIB_PATH, BDENEW); --- > if ( getenv( "BDE_NEWDAT" ) != (char *) NULL ) > bde_newdat = getenv( "BDE_NEWDAT" ); > else bde_newdat = "bdenew.dat"; /* BDENEW is "bdenew.dat" -RJL*/ > > sprintf(tmpfilename, "%s/%s", bde_lib_path, bde_newdat); 2189,2190c2353 < printf("Using default bdenew.dat: %s\n", bde_newdat); < } --- > DP; dprintss("bde_lib_path:%s; bde_newdat:%s\n",bde_lib_path,bde_newdat); 2192,2193c2355,2356 < return( bde_newdat ); < } --- > LP;return( bde_newdat ); > LP;} // end GetBDENewDatFile 2220c2383 < { --- > {EP; 2223,2233c2386,2412 < char tmpfile[PATH_MAX /*+ FILENAME_MAX*/]; // Do we need sum? < char Font_file[PATH_MAX /*FILENAME_MAX*/]; // maximum path space allocated < char LibPath[PATH_MAX]; // by unix, found in < < #ifdef DEFAULT_LIB_PATH < strcpy (LibPath, DEFAULT_LIB_PATH); < if (LibPath[strlen(LibPath)] != '/') // make sure the file is < strcat (LibPath, "/"); // found in the /lib directory < sprintf (Font_file, "%s%s", LibPath, "fonts.dat"); < #else < strcpy (Font_file, "fonts.dat"); // file needs to be in /src directory --- > char tmpfile[PATH_MAX]; > char LibPath[PATH_MAX] = "";; // PATH_MAX=1023, in > char Font_file[PATH_MAX] = "";//RJL050815 > > /* New code imitates bde_newdat and bde_viewdefs code style - RJL050815 */ > // The getenv() function returns a pointer to a string containing the value in > // the current environment if such a string is present. If such a string is > // not present, a null pointer is returned. > // if (LibPath == (char*)NULL) > // strcpy(LibPath, getenv("DEFAULT_LIB_PATH")); > if (getenv("DEFAULT_LIB_PATH")== (char*)NULL) //getenv returns NULL on fail > strcpy(LibPath, "../lib/"); //make the path "../lib" > else strcpy(LibPath, getenv("DEFAULT_LIB_PATH"));//use DEFAULT_LIB_PATH > if (LibPath[strlen(LibPath)-1] != '/') > strcat (LibPath, "/"); // make the path end in '/' > DP; dprintss("LibPath:%s; Font_file:%s\n", LibPath, Font_file); > sprintf (Font_file, "%s%s", (char*)LibPath, "fonts.dat"); > > if (dat_infile == (char *) NULL ){ //call GetBDENewDatFile() > new_datfile = GetBDENewDatFile(); // at line 2185 > sprintf(tmpfile, "%s %s", new_datfile, Font_file); > DP;dprints("dat_infile is NULL; new_datfile is \"%s\"\n", new_datfile); > } > else if (strlen(dat_infile) > 0) { // (was if ...==0 - RJL051202) > DP;dprintds("non-NULL dat_infile has %u chars; file list is \"%s\"\n", > (int)strlen(dat_infile), tmpfile); > } 2235,2236d2413 < // I assume src above means runtime $CWD - RJL 040603 < #endif 2238c2415 < // pr_init is looking for a list of filenames separated by spaces. --- > // pr_init expects a list of filenames separated by spaces: 2241,2244d2417 < else { // append fonts file to new dat file < new_datfile = GetBDENewDatFile(); < sprintf(tmpfile, "%s %s", new_datfile, Font_file); < } 2245a2419 > DP;dprints("GetBDEDatFileList gets file list = %s\n", tmpfile); 2248d2421 < 2251,2252c2424,2425 < < return( tempfile ); // 99s523 rgantyal,vdhamoda --- > DP; dprintss("GetBDEDatFileList(\"%s\") returns %s\n", dat_infile, tempfile); > LP;return( tempfile ); // 99s523 rgantyal,vdhamoda 2261c2434 < * This routine returns the name of the BDE view definitions file. --- > * This routine LP;returns the name of the BDE view definitions file. 2265c2438 < * The previous routine was returning a list of files on the stack. Due --- > * The previous routine was LP;returning a list of files on the stack. Due 2280c2453 < { --- > {EP; 2283a2457,2462 > static char *bde_lib_path = (char*)NULL; // RJL050815 > > /* New code imitates bde_newdat and bde_viewdefs code style - RJL050815 */ > if (bde_lib_path == (char*)NULL) > if ((bde_lib_path = getenv("DEFAULT_LIB_PATH")) == (char*)NULL) > bde_lib_path = "../lib"; 2288c2467 < sprintf(tmpfilename, "%s/%s", DEFAULT_LIB_PATH, VIEWDEFS); --- > sprintf(tmpfilename, "%s/%s", bde_lib_path, VIEWDEFS); 2295d2473 < 2298,2304c2476,2480 < < return( tempfile ); // 99s523 vdhamoda,rgantyal < < /* return( bde_viewdefs ); */ < < < } --- > DP; dprintss("bde_lib_path:%s; bde_viewdefs file:%s\n",bde_lib_path, tempfile); > LP;return( tempfile ); // 99s523 vdhamoda,rgantyal > /* LP;return( bde_viewdefs ); */ > /* WHat about static tmpfilename? free or retain? - RJL051202*/ > LP;} 2326d2501 < 2335c2510 < --- > EP; 2337c2512,2514 < return error_msg[0]; --- > { > LP;return error_msg[0]; > } 2340c2517,2519 < return error_msg[1]; --- > { > LP;return error_msg[1]; > } 2344c2523 < return error_msg[2]; --- > LP;return error_msg[2]; // line 2394 2349c2528 < return(0); --- > LP;return((char*)NULL); // was return 0 - RJL051113 2351c2530 < } --- > LP;} // end GetFileStatus() 2374c2553 < { ///^^^^^^^^^^^^^^^^^^^^^^0x0, ^^^^^^^^^^^^^0x3d (both BAD) --- > {EP; ///^^^^^^^^^^^^^^^^^^^^^^0x0, ^^^^^^^^^^^^^0x3d (both BAD) 2378c2557 < EP; if (filename!= NULL) dprintdd("strlen(filename)=%d, strlen(graph_title)=%d\n", --- > if (filename!= NULL) dprintdd("strlen(filename)=%d, strlen(graph_title)=%d\n", 2396c2575,2577 < } --- > LP;} //end UpdateTitleOfBDEWindow > > 2410c2591 < { --- > {EP; 2432,2433c2613,2614 < return (0); < } // end create_replay_dialogbox --- > LP;return (0); > LP;} // end create_replay_dialogbox 2449c2630 < { --- > {EP; 2460c2641 < EP;/* trace entries */ --- > /* trace entries */ 2486c2667 < } // end real_replay --- > LP;} // end real_replay 2490c2671 < /************************************************************************** --- > /*************************** 2531:2583 ************************************** 2503c2684 < #ifdef BDELOG, if(ReplayReady==2) Replay_LoadGraph(logfile ); --- > * #ifdef BDELOG, if(ReplayReady==2) Replay_LoadGraph(logfile ); 2512c2693 < { --- > {EP; 2519c2700 < EP; --- > 2545a2727 > // pr_startlog is NOT called here since replay is acive-RJL050909 2555c2737 < //dprintd("XtIsSensitive(leftmenu) = %d\n", XtIsSensitive(leftmenu)); --- > dprintd("XtIsSensitive(leftmenu) = %d\n", XtIsSensitive(leftmenu)); 2562,2563c2744,2745 < } // end Replay_LoadGraph < /* end fileio.cc(:2544) */ --- > LP;} // end Replay_LoadGraph > /* end fileio.cc(:2583) */ +++++++++++++++++++++++++++++++++++++++++++ pr_util_nolog/alpha/probj/font.cc +++++++++++++++++++++++++++++++++++++++++++ pr_util_nolog/alpha/probj/fprint.cc 39a40,48 > // Revision 1.22 2005/10/25 17:55:04 lechner > // Fixed a bug in filename extraction. > // > // Revision 1.21 2005/10/20 20:14:43 lechner > // Added checks to retain periods in filename before its type extension. > // > // Revision 1.20 2005/10/20 19:50:59 lechner > // Added comments before revision to allow >= 2 period chars in current_filename > // 238c247 < "$Id: fprint.cc,v 1.19 2005/05/27 03:02:56 lechner Exp $"; --- > "$Id: fprint.cc,v 1.22 2005/10/25 17:55:04 lechner Exp $"; 279c288 < extern void load_FOtable(char *); --- > extern void load_FOtable(char *); // in fileio.cc 479a489 > 483,490c493 < // < // tfragala-May/6/95: Bug exists. If print w/o filename (e.g. a new graph) < // BDE will crash. Unsure as to bug location at this date. < // < < /* < * If Filename is empty, then give it the name bdegraph < */ --- > // If Filename is empty, then give it the name bdegraph 495d497 < 496a499,501 > // Pre-condition: *current_filename not a directory; type extension optional. > // Post-condition: *pfile has no type extension in either case. > char* scanptr; 500,504c505,509 < /* < * Get the name from .dat < */ < < if ((charptr = strchr(current_filename, '.')) == NULL) --- > // [untested] Rev. 051019, 051024 to allow more than one "." > // in current_filenam and strip off any last type extension. > scanptr = current_filename; > charptr = strrchr(scanptr, '.'); // ptr to last '.' or NULL > if (charptr = NULL) 506d510 < /* assumes a null-terminated filename!? - RJL */ 508,510c512,513 < strncpy(pfile, current_filename, (charptr - current_filename)); < pfile[charptr - current_filename] = '\0'; < printf("current_filename = %s\n", pfile); //RJL Debug check 94/3/11 --- > strncpy(pfile, scanptr, (charptr - scanptr)); > pfile[(charptr-scanptr)] = '\0'; 511a515,516 > assert(scanptr == current_filename); // assumed invariant. > printf("filepathname = %s\n", pfile); 529a535 > // 16 errno values are possible if rtrnval == -1 - RJL051019 542a549 > // Couldn't an existing wrapper be used? - RJL051019 +++++++++++++++++++++++++++++++++++++++++++ pr_util_nolog/alpha/probj/graphobject.cc 19a20,65 > // Revision 1.23 2006/01/15 23:31:20 lechner > // [Comments added.] > // graphobject *Ggroup::findbyindex (hcg_key id): > // 557-565: Change return(obj) to break; both returns now at end. > // 564: > assert(obj==NULL || obj->getid()==id); // added 060114 - RJL > // > // 1031a1039,1161: Added new function HNselect() + supporting macros. > // New function: hcg_key HNselect(float mx, float my) returns HNid pkey, > // iff selection is unique, otherwise returns 0 for non-HN or empty or multihple HN selection. > // Uses loaded database components of diagram HGid instead of graphobjectlist. > // Converts mouse position from DC to WC first. > // Searches List (using findbyindex) for current and currentselection only if successful. > // 1163-1270 Could be template-specialized to HN or CG. > // 1727,1732d1862: Removed printing of (const) 'tbl' cases FO and GD; > // instead, note FO and GD in default:: case. > // > // Revision 1.22 2005/12/11 04:59:08 lechner > // Major revs (cvs diff > 500 lines): mostly comments and asseerts Plus: > // Line 372: #define TTPRNT dprint("tbl_encoding [0..9] = FO,GD,HG,HN,HA,HL,HP,HI,CG,GX\n") > // Line 417: void Ggroup::PrintGraphObjectList(){... > // //override in subclasses node, hlink, caption > // > // Line 854: Call PrintGraphObjectList(); > // Added debug printouts based on hasType(id, {HN, HL or CG}) > // > // Comments recommend (TBD) gencpp make class pairs HN,HL,CG and node,hlink,caption > // with two-way linking to singleton child (HN--..node,HL---..hlink,CG--..caption) > // > // Refactored select_HN: 1075:1084: to test hasType first on each object; > // Only call select(x,y) when hasType(id, HN) > // > // 1648-1732: Revised Ggroup::doDump(): > // > // Revision 1.21 2005/11/27 03:23:23 lechner > // Added debugging rouine doPrint() to emit HG, HN, HL, CG, and node attributes. > // doPrint is adapted from doDump(; Also added more comments. Compiles; TBTested. > // > // Revision 1.20 2005/10/23 08:06:51 lechner > // Added '#define cs currentselection' > // Added EP and LP macro calls to log proc entry and exit. > // In Ggroup::doDump():1573: moved fclose() out of fopen failure case. > // ---------------------------------------------------------------------r > // > // Revision 1.19 2005/08/12 04:36:19 lechner > // Changed new node(HNcurr) to new node(HN_elt); > // 313c359 < "$Id: graphobject.cc,v 1.18 2005/07/31 03:19:28 lechner Exp $"; --- > "$Id: graphobject.cc,v 1.23 2006/01/15 23:31:20 lechner Exp $"; 342d387 < #include "prototype.h" //includes bde20.h with typedef enum WhichBpt 343a389 > #include "prototype.h" //includes bde20.h with typedef enum WhichBpt 348d393 < // #define hasType(key, ttabbr) ((&key)?(strstr(decode_retstr(&key),#ttabbr)?1:0):0) 350a396,398 > // In 94sbde_schema.h:782:#define hasType(key, ttabbr) > // ((&key)?(strstr(decode_retstr(&key),#ttabbr)?1:0):0) > 353a402 > 355a405,409 > #define TTPRNT dprint("tbl_encoding [0..9] = FO,GD,HG,HN,HA,HL,HP,HI,CG,GX\n") > > //EP and LP: graphobject.cc:1211: `printf' cannot be used as a function -051128 > > 357c411 < // client: Ggroup::select_CG(), line 967 --- > // client: Ggroup::select_CG(), line 967 , 1041 367c421 < // extern char viewname[MAXVIEWNAMELEN]; // In schema.hh- RJL050529 --- > // extern char viewname[MAXVIEWNAMELEN]; // In schema.h- RJL050529 383a438 > 384a440 > 390c446,462 < extern void updatedisplaylist(struct HG *cHG); --- > extern void updatedisplaylist(struct HG *cHG);//in fileio.cc > > /*************************************************/ > > void Ggroup::PrintGraphObjectList() > {EP; > graphobject* obj; > List *current; > /* print id[0|1] for list of subobjects */ > for (current = subobjects; current != (List *) NULL; current = current -> next) > { > if ((obj = current->object) != (graphobject *) NULL) { > printf("%lux%1d ", obj->getid(), obj->getselected()); > } > } > dprint("\n"); > LP;} //end PrintGraphObjectList 401c473,476 < // Prepend new object to existing (backward) List of subobjects. --- > // Prepend 'this' to existing (backward) List object->subobjects. > // TBCHecked: initial List object is the graph with id=HGid? > // To verify this?: traverse list until next=NULL and assert id = HGcurr->id > 403c478 < { --- > {EP; 408a484 > // (no objects yet) PrintGraphObjectList(object); // macro below 410,411c486 < } // end graphobject() < --- > LP;} // end graphobject() 413c488 < /************************************************ --- > /************************************************** 422c497 < { --- > {EP; 426c501 < } --- > LP;} 429c504 < /* Why not report an error also, plus returning NULL? */ --- > /* Why not report an error also, plus LP;returning NULL? */ 431c506,507 < hcg_ptr graphobject::getcurr(void) { --- > hcg_ptr graphobject::getcurr(void) > { 437c513 < * Assigns the object instance id 'this' to the global 'currentselection'. --- > * Assigns the object instance ref. 'this' to the global 'currentselection'. 445c521 < { --- > {EP; 447a524 > // Must caller always unselect first? 451c528 < --- > // Pre-condition: this refers to a valid object. How to verify? (with getid()? 455c532 < }//end selectObject --- > LP;}//end selectObject 459,460c536,538 < * findbyindex searches the List of graphical objects < * and returns the one with a matching id (or NULL). --- > * findbyindex searches the List at topobject->subobjects > * and returns the graohobject *obj with a matching id (or NULL). > * [A more accurate name is findbykey, analogous to pr_find_key - RJL060114] 468c546,548 < * NONE. --- > * NONE (Alters local vars current and obj) - RJL060114. > * Pre-conditions: > * subobjects is a valid List entry point; (only topobject has it now-RJL060114) 478d557 < /* Removed GENV6 option - RJL 2k0901 */ 481c560 < { --- > {EP; 484,485c563,564 < /* do linear depth-first search through list of subobjects */ < /* ??? The list has depth one now - so don't need recursion? - RJL */ --- > /* do linear depth-first search through sublists of objects */ > /* (The list has depth one now - so don't need recursion yet - RJL */ 488,491c567,570 < if ((obj = current->object->findbyindex(id)) < != (graphobject *) NULL) < { DP; printf("findbyindex(id = %lx) returns obj=%p\n", id, obj); < return(obj); --- > if ((obj = current->object->findbyindex(id)) //<-- recursion! > != (graphobject *) NULL) { > DP; printf("findbyindex(id = %lx) returns obj=%p\n", id, obj); > LP;break; //exit for loop with obj; -RJL060114 494,495c573 < < /* not found */ --- > if (obj==NULL) {/* not found */ 497c575 < return((graphobject *) NULL); --- > //LP;return((graphobject *) NULL); // moved out of loop - RJL060114 498a577,582 > else { > DP; printf("findbyindex(id = %lx) returns obj=%p\n", id, obj); > } > assert(obj==NULL || obj->getid()==id); // added 060114 - RJL > LP;return obj; > } //end Ggroup::findbyindex 511c595 < { --- > {EP; 520c604 < delete next; //Is NULL ptr OK here? - RJL 040517 --- > delete next; // delete List tail? Is NULL ptr OK here? - RJL 040517 523c607 < } --- > LP;} 532a617,618 > * RJL 051126: That would be nasty - violates encapsulation > * But notification (View to Model) is appropriate. 539c625 < { --- > {EP; 549,550c635 < // call getid() methid and pr_find to set up < // current pointer --- > // call getid() method and pr_find to set up current pointer 553c638 < return(rv); --- > LP;return(rv); 572c657 < // call getid() methid and pr_find to set up --- > // call getid() method and pr_find to set up 574,579c659 < // call pr_delete to delete from network < // database. < < } < return(this); < } --- > // call pr_delete to delete from network database. 580a661,665 > LP;return(this); > } // end else > } //end List::ListRemoveItem > > 594,595c679,680 < // Why isn't this argument GENV6/8 dependent? - RJL < { --- > > {EP; 597c682 < } --- > LP;} 609,610c694,695 < //WHy isn't this argument GENV6/8 dependent? - RJL < { --- > > {EP; 612c697 < } --- > LP;} 616c701 < --- > /* for XB text block only - RJL */ 625,627c710,713 < { < cXB = XB; < } --- > {EP; > cXB = XB; ///Why isn't this passXB? it is for CG/HN passCG/passHN??? > LP;} > //Note this is commented out - it is for bdesym's XB superclass. 629a716 > 638a726,730 > /* RJL051114: should be named 'isSelected': returns 0 or 1. > * here, the hcg_ptr is cHN (or cCG or cHL) so client can do cs = cHN; > * but select(x,y) client cannot, until the type of this row is known. > * so hasType can be used like RTTI in C++. > */ 640c732 < { --- > {EP; 645c737 < return(1); --- > { LP;return(1); } 647,648c739,740 < return(0); < } --- > { LP;return(0); } > } //end node::select 664c756 < { --- > {EP; 669a762,763 > // arg1 is ignored - why? (may make sense with xorGC - -RJL050908 > // which would alternately draw and erase the extra border. 671,672c765 < < /* Now highlight the corresponding shape. Full width and height are passed; */ --- > /* highlight the corresponding shape. Full width and height are passed;*/ 703c796 < } // end node::highlight --- > LP;} // end node::highlight 716,717c809,810 < { < EP; dprint("Why called? This is a no-opd\n"); // RJL040928 --- > {EP; > dprint("Why called? This is a no-opd\n"); // RJL040928 721c814,816 < } --- > // Do centerx/y/height/width exist for HG's????-RJL050908 > // It might maks sense for the HG-table widget selected HG-row??? > LP;} 733c828 < { --- > {EP; 736c831 < } --- > LP;} 750c845 < { --- > {EP; 752c847 < //int objcount = 0; // uinused var - 040903.2330 --- > //int objcount = 0; // unused var - 040903.2330 755,757c850,852 < EP; < assert (topobject != NULL); < current = topobject->subobjects; --- > > assert (topobject != NULL); // can we assert (hasType(id=getid(), HG));??? > current = topobject->subobjects; // most recent object (prepended to List) 758a854,855 > // Ggroup::doPrint();//debug: print each HN's id,x,y,w,h to stdout. > // then doPrint prints each component of cHG via pr_dump_row. 772,773c869,891 < return; < } // end doDraw --- > LP;return; > } // end Ggroup::doDraw > > > > //new debug printout of display list element properties > //to fix select_??: - RJL051126 > void Ggroup::doPrint(void) //RJL051126 (!= private doprint) > { //pre-condition: (topobject != NULL, HG* = last [NOT FIRST!] object type > EP; > List *current; > struct HN* pHN; > struct CG* pCG; > struct HL* pHL; > int objcount = 0; // unused var - 040903.2330 > graphobject *ob; > // Ggroup*topobject>List*subobjects->object[->next]... points to HG-components > // print ({HN,CG}id, x, y, w, h; HLid, HP1x,HP1y,HP2x,HP2y > // and call pr_dump_row on each object > > assert (topobject != NULL); > current = topobject->subobjects; > assert(current!= NULL); // RJL051210 774a893 > PrintGraphObjectList(); 775a895,926 > while(current) { //print HG, HN, HL or CG object on list > hcg_key id; > assert(current!= NULL); > ob = (graphobject *) current->object; > assert(ob!= NULL); > id = ob->getid(); > dprintdd("doPrint: objcount = %d, pkey=%ux\n", > ++objcount, id ); //TBTested-RJL040714 > printf("hasType id = %lux =? HN, HL, CG) is %d, %d, %d\n", id, > hasType(id, HN), hasType(id, HL), hasType(id, CG)); > if (hasType(id, HN)) { > pHN = (struct HN*)ob->getcurr(); > printf("HN: id = %lux; cx,cy = %f,%f; w,h = %f,%f; \n", > pHN->HNid, pHN->centerx, pHN->centery, pHN->width, pHN->height); > } > else if (hasType(id, CG)) { > pCG = (struct CG*)ob->getcurr(); > printf("CG: id = %lux; cx,cy = %f,%f; w,h = %f,%f; \n", > pCG->CGid, pCG->CGcenterx, pCG->CGcentery, pCG->CGwidth, pCG->CGheight); > } > else if (hasType(id,HL)) { > pHL = (struct HL*)ob->getcurr(); > printf("HL: id = %lux; HNid1:%lux, HNid2:%lux\n", > pHL->HLid, pHL->HNid1, pHL->HNid2); > } > else printf("List object not HG,HN,HL or CG: ob %px has id %lux\n", ob, id); //RJL051210 > current = current->next; > } // exit dowhile iff current = NULL (this works - RJL 040529) > DP;dprintd("\tobjcount = %d\n", objcount); > LP;return; > > } // end Ggroup::doPrint() 801,802c952,953 < void Ggroup::doselection (int absx, int absy) < { --- > void Ggroup::doselection (int absx, int absy) //:901-996: > {EP;dprintdd("x=%d,y=%d)\n", absx, absy); 848,849c999,1002 < < ; // null for body --- > { > dprintd("id=%lux,", current->object->getid()); > dprintd("pkey=%lux\n", (hcg_key)(current->object->getcurr())); > } 854c1007 < --- > // (==> currentselection = this; selected = 1; highlight(1); ) 864a1018,1022 > { > dprintd("id=%lux,", current->object->getid()); > dprintd("pkey=%lux\n", (hcg_key)(current->object->getcurr())); > } > 885c1043 < ((graphobject *) current->object)->selectObject(); --- > ((graphobject *) (current->object))->selectObject(); //added () - RJL051210 887c1045 < DP; printf("Selected object id %lx at %d,%d\n", --- > DP; printf("Selected object id %lux at <%d,%d>\n", 889c1047 < } //topobject->subobjects->object->getcurr() yields XXcurr.RJL040813 --- > } //topobject->subobjects->object->getcurr() yields cs [NOT XXcurr.RJL040813] 892c1050 < currentselection = 0; --- > assert(currentselection==NULL); 895c1053,1114 < } // end Ggroup::doselection --- > LP;} // end Ggroup::doselection: 901-1036 (was 996) > > //////////////////// (997- 1115) ///////////////////////////////////////////// > // HNselect(): extracted from HNselected.cc test case - RJL060114 > // HNselect() uses HNgetfldname functions in pr_accessors.c. > // These are augmented by other HN macros or methods below. > // DCtoWC is called on mouse position first. - RJL060113 > // HNselect is called from the existing select_HN wrapper. > // > // This algorithm tests ALL HNrows of the currrent HG > // and counts the number of selected HNrows (doubling its cost . > // If none, or more than one, HN-row contains mouse position , > // selectHN returns 0 and displays and fprints a 'RETRY' message.) > // If exactly one HNrow contains , selectHN returns the non-zero > // pkey HNid of that row and updates HNcurr. > // > // Pre-conditions: HGcurr is the currently displayed diagram. > // Post-conditions: alters HNcurr iff new HN is selected: > // [If a unique HNrow is selected, updates HNcurr and returns HNcurr->HNid; > // Otherwise returns 0, displays type of failure and reports it to stdout.] > // > // This algorithm would also work on CG; or define template method select > // with type T = struct HN or struct CG; or use select > // on a shape subclass that is 1::1 associated with HN or CG. > // Or select where T is HN or CG and shape is a shape subclass. > > // New additions for HNselect() function: > // These macros follow style of pr_accessors.c. > // They should become custom in-line methods of class HN. > > #define HNgetHalfwidth (HNcurr->width/2) /*derived attribute*/ > #define HNgetHalfheight (HNcurr->height/2) /*derived attribute*/ > > #define HNgetTop (HNcurr->centery - HNgetHalfheight) /*derived attribute*/ > #define HNgetBottom (HNcurr->centery + HNgetHalfheight) /*derived attribute*/ > #define HNgetLeft (HNcurr->centerx - HNgetHalfwidth) /*derived attribute*/ > #define HNgetRight (HNcurr->centerx + HNgetHalfwidth) /*derived attribute*/ > // HNisSelected() compares mouse position against derived attributes of HN. > #define HNisSelected(mx, my) \ > ((HNgetLeft < mx) && (HNgetRight > mx) && (HNgetTop < my) && (HNgetBottom > my)) > > // ********************************************* > // HNselect (class method TBD) - RJL060114 > // Compares mouse position against derived attributes > // of each HN child of displayed HG. > // Returns unique selected HNid pkey and updates HNcurr, > // or returns 0 and sets HNcurr = 0 . > // ********************************************* > hcg_key HNselect(float mx, float my) > {EP; > int numberSelected = 0; > struct HN *HNptr = 0, *HNsave; > char* noSelectionMsg = "RETRY: No Node at this mouse position\n"; > char* multipleSelectionsMsg = "RETRY: Multiple Nodes Selected\n"; > HNsave = HNcurr; // for restoral > child_loop(HG, HN, HNid, HGid) { //alters HNcurr, counts selections > > if (HNisSelected(mx, my)) { > numberSelected++; > HNptr = HNcurr; > }; > } //end child_loop 896a1116,1145 > if (numberSelected == 1) { > HNcurr = HNptr; //side effect: updates HNcurr to last selected HN > return (HNcurr->HNid); // pr_find will check cached HNcurr; > } > else { > if (numberSelected == 0) { > displayMessage(noSelectionMsg); > fprintf(stderr, noSelectionMsg); > } > else { // > 1 > displayMessage(multipleSelectionsMsg); > fprintf(stderr, multipleSelectionsMsg); > } > } // end if numberSelected else > HNcurr = 0; //HNsave; // cancel side effect > LP; return ((hcg_key) 0); // return NULL pkey > } //end HNselect (1036-1115) > > > ///////////////// graphobject.cc:1038-1082 //////////////////////////////////////// > // New select_HN.cc - revised by RJL060114 > // Calls HNselect now, passing float mx,my after DCtoWC conversion > // > // Pre-conditions: valid HGcurr->HGid, for graph displayed on canvas. > // Post-conditions: On failure, obj and current = 0 and HNcurr unchanged > // On unique selection, updates HNcurr and HNcurr->HNid = obj->getid() > // and cs = currentselection = this. > // CAUTION: expected side effects not all checked.-RJL060114 > // x and y is mouse position at which selection is requested. > // WARNING: ignores nested objects in recursitve List -RJL060114 897a1147,1181 > void Ggroup:: select_HN(Widget w, int x, int y) > {EP; > hcg_key id; > List* current; > unselect(); // ==> selected = 0, highlight(0); > graphobject* obj = 0; > hcg_key HNpk = 0; // pkey HNid iff found and unique > float mx, my; // mouse position > DCtoWC(x,y, &mx,&my); // x,y is mouse position (DC) > HNpk = HNselect(mx,my); // searches all HN children of HGcurr. > > if (HNpk != 0){ > // HN pkey found at HNcurr; find object that refers to it: > current = topobject->subobjects; > while (current!= NULL) { // check getid() of each object > if (current->object->getid() == HNpk) > dprintd("select_HN: Found HNid=%d\n", HNpk); > break; > current = current->next; > } > assert(current->object->getid() == HNpk);//HNpk exists in this HG > } // end if > if (current!= NULL){ > // restore post-conditions of select_HN wrapper (TBD?) > obj = current->object; // don't need findbyindex(id); > obj->selectObject(); // updates: cs = this, selected=1, highlight(1); > HNcurr = (struct HN*)(obj->getcurr()); > assert(obj->getid() == HNpk && HNcurr->HNid == HNpk); > } > LP;return; > }// end select_HN (graphobject.cc:1038-1082) > > #if 0 > /* old version - deprectated - RJL060114 */ > /*************************************************************/ 924a1209,1218 > * I.e. if chgen or gencpp declared table ListElement as a superclass LE > * of HN, HL, CG, then HNid in the object could be replaced by LEid > * (and LEid_pp) in HN, HL, CG; also, LE would contain a subclass ref. > * which is the union (struct dummy_type*) of {HNid_fcp OR HGid_fcp OR HLid_fcp}. > * > * Alternatively (and preferably) each HN, HL or CG would delegate to a > * singleton child-set of one LE-row; LE woUld then contain one of > * HNid_fcp OR HGid_fcp OR HLid_fcp, and its corresponding parent fkey > * HNid, CGid or HLid. The parent HN, CG or HL will NOT need a schema change. > * pr_add from chgen13 will maintain LEid_fcp in each HN, CG and HL . 929,932c1223,1230 < { < hcg_key id; < List *current; // pointer to the list of objects < #define cs currentselection --- > {EP; > List *current; // pointer to object in display list > hcg_key id; // moved up 060114-RJL > dprintdd("\t\tMouse Coordinates (DC): x=%d, y=%d\n", x,y); > doPrint();// Ggroup:: emit HN,HL,CG components of current HG. > > > // Is now in graph.h - RJL050909: with #define cs currentselection 936,937c1234,1235 < < /* while point not inside object or object not an HN) */ --- > // advance current while point not inside object or object not an HN: > assert(topobject->subobjects!= NULL); 940,950c1238,1260 < { DP; dprintd("current = %px\n", (int)current); < // updated RJL041220 to simplify logic and nested calls < if (((graphobject*)current->object )->select(x, y)/*!=NULL*/) //cs!=0 < { < id = (cs!=NULL)?((hcg_key)cs->getid()):0; < if ((id>0)&&hasType(id, HN)) < { DP; dprintdd ("HN found: id=%ux, cs = %px\n", id, (int)cs); < break; < } < } < } // exit loop with id of selected HN or id = 0 and cs == NULL --- > { DP; > cs = 0; // New 051112: make sure nonzero junk ptr is not getting thru. > // 051210: test hasType first; skip select(x,y) until hasType(id, HN) > // 051210: this is practical for objects already on list. > // It is refactorable for child_loop (HG,HN,HNid,HGid) > id = (cs!=NULL)?((hcg_key)(cs->getid())):0; // hcg_key or 0 - new 051210 > if (hasType(id, HN) > && ((graphobject*)current->object)->select(x, y)) > // have found a HN and it is selected: > > { > current->object->selectObject(); > //from select_CG|HL?//restored 051130-RJL > // Effects: currentselection = this, selected=1, highlight(1); > > DP; printf ("HN found: id=%lux, cs = %px\n", id, cs); > break;//exit for loop > } // end if hasType(id, HN) && current->object)->select(x, y) succeeds. > > //else continue, ignoring type HL or CG on List. > } // exit for loop with id of selected HN or !hasType(id, HN) or cs = id = 0 > assert((id==0)||hasType(id, HN)); // crash 041220, 050209, 051112 > 952c1262 < { DP; dprint("HN NOT found: current==NULL => cs = 0\n"); --- > { DP; dprint("HN NOT found: current==NULL => cs = id = 0\n"); 953a1264 > id = 0; 955,956c1266,1276 < else { < DP; dprintdd("id=%x, hasType(id,HN)=%d\n\n", id, hasType(id,HN)); --- > else if (!hasType(id, HN)) // current != NULL > { > DP; dprintd( > "selected id = %x is NOT of type HN; reset current = cs = id to 0", id); > current = 0; > cs = 0; > id = 0; > } > else //current!= NULL && id has type HN > { > DP; dprintdd("id=%lux, hasType(id,HN)=%d\n\n", id, hasType(id,HN)); 958,960c1278,1279 < dprintd("id = %dx; assert(id ==0||hasType(id,HN)\n",id);//RJL050309 < assert((id==0)||hasType(id, HN)); // crash 041220, and 050209 < //hasType was redefined failsafe in *schema.h: --- > assert((id==0)||hasType(id, HN)); // crash 041220, 050209, 051112 > 962c1281 < //#define hasType(key,ttabbr) --- > //#define hasType(key,ttabbr) //(in schema.h:1230 in graph.h; 964d1282 < //(in schema.h:1230 in graph.h; 966,968c1284,1286 < return; < } < // end void Ggroup::select_HN() --- > LP;return; > } // end void Ggroup::select_HN() > #endif //end of old version of select_HN 987c1305 < * Updates global variable currentselection --- > * Updates global variable cs = currentselection 998c1316 < // w: canvas, x, y: mouse position (DC) event->x,event->y --- > // w: canvas; x, y: mouse position (DC) event->x,event->y 1001,1002c1319,1320 < List *current; // pointer to the list of objects < unselect(); //void graphobject::unselect(){selected = 0;highlight(0);}; --- > List *current; // pointer to the list of objects; clashes with l. 951 ??? > EP; unselect(); //void graphobject::unselect(){selected = 0;highlight(0);}; 1010c1328 < || (!hasType((id=(hcg_key)currentselection->getid()), CG)) ); --- > || (!hasType((id=(hcg_key)cs->getid()), CG)) ); 1013c1331 < assert(HNorHLorCGisSelected); // Invariant: #define'd line 321- RJL050225 --- > assert(HNorHLorCGisSelected); // Invariant: #define'd line 365- RJL050225 1018,1023c1336,1340 < current != NULL && < (((graphobject*)current->object)->select(x, y) == 0); < current = current->next < ) < { // mouse is inside HN, HL or CG: < assert(HNorHLorCGisSelected); // Invariant: #define'd line 321- RJL050225 --- > (current != NULL && > (((graphobject*)current->object)->select(x, y) == 0)); > current = current->next) > { //IFF mouse is inside HN, HL or CG, current!=NULL and select(x,y)!= 0 > assert(HNorHLorCGisSelected); // Invariant: #define'd line 365- RJL050225 1025c1342 < //94sbde_schema.h:1234:#define hasType(key, ttabbr) --- > //94sbde_schema.h:1234:#define hasType(hcg_key, ttabbr) 1027,1028c1344,1345 < if (hasType((id=(hcg_key)currentselection->getid()), CG)) break; < } --- > if (hasType((id = cs->getid()), CG)) break; > }// may exit without hastype(...,CG) succeeding(no break): (==> current == 0?) 1030,1031c1347,1348 < current,currentselection,(unsigned int)id); < assert(current==NULL||hasType(id,CG)); --- > current,cs,(unsigned int)id); > assert(current==NULL||hasType(id,CG));//failed 050826 on title CG:(height==0) 1034a1352 > // and current!=0 below 1036c1354 < currentselection = NULL; --- > cs= NULL; // and return 0 since current == NULL 1038c1356 < return (current!=0); --- > LP;return (current!=NULL); // why return 0 or 1? 1081,1083c1399 < < < unselect(); //void graphobject::unselect(){selected = 0;highlight(0);}; --- > EP; unselect(); //void graphobject::unselect(){selected = 0;highlight(0);}; 1086c1402 < // if(currentselection == NULL) return; --- > // if(cs == NULL) return; 1093c1409 < (!hasType((id=(hcg_key)currentselection->getid()), HL)) ); --- > (!hasType((id=(hcg_key)cs->getid()), HL)) ); 1101,1102c1417,1418 < currentselection = NULL;//does selectObject do this? < return; --- > cs = NULL;//does selectObject do this? > LP;return; 1114c1430 < * Pre-conditions: HG_pkey = HGcurr->HGid is valid parent; --- > * Pre-conditions: HGcurr!= 0 && HG_pkey = HGcurr->HGid is a valid parent; 1119c1435 < { --- > {EP; 1121c1437 < //WARNING: I may have lost a few declarations removing conbflicts - RJL50502 --- > //WARNING: I may have lost a few declarations removing conflicts - RJL50502 1123c1439,1440 < extern float d_gcwidth, d_gcheight; // default CaptionGraph size --- > extern float d_gcwidth; > extern float d_gcheight; // default CaptionGraph size 1128a1446,1447 > assert(HGcurr!=0); > assert(hasType(HGcurr->HGid, HG)); 1138,1139c1457,1458 < ReDraw(); // This should merely draw this NEW CG rect, NOT the entire graph!??? < } --- > ReDraw(); // should merely draw NEW CG rect, NOT the entire graph!??? > LP;} 1154c1473 < { --- > {EP; 1199,1200c1518,1519 < return; < } --- > LP;return; > } // end switch(d_shape[0]) 1217,1219c1536,1538 < // (void) new node(HNcurr); // construct the Ggroup object referencing HNcurr. < (void) new node(HN_elt); // construct the Ggroup object referencing HN_elt. < } // end Ggroup::addnode --- > (void) new node(HN_elt); // construct the graphobject referencing HN_elt. > PrintGraphObjectList(); > LP;} // end Ggroup::addnode 1242c1561 < hcg_key HNid1, HNid2; --- > hcg_key HNid1, HNid2; //:1354 1255,1256c1574,1575 < < assert(firstselect!=NULL && currentselection!= NULL); --- > EP;//1367 > assert(firstselect!=NULL && cs!= NULL); 1258c1577 < HNid2 = currentselection->getid(); --- > HNid2 = cs->getid(); 1261c1580 < HN2curr = (struct HN*)(currentselection->getcurr()); --- > HN2curr = (struct HN*)(cs->getcurr()); 1266,1267c1585,1586 < xlast = currentselection->getcenterx(); /* added 'x' - RJL */ < ylast = currentselection->getcentery(); /* likewise - RJL */ --- > xlast = cs->getcenterx(); /* added 'x' - RJL */ > ylast = cs->getcentery(); /* likewise - RJL */ 1275c1594 < hcg_key currentHNid = currentselection->getid(); // likewise - RJL --- > hcg_key currentHNid = cs->getid(); // likewise - RJL 1306,1307c1625,1626 < currentselection->getcenterx(), < currentselection->getcentery(), --- > cs->getcenterx(), > cs->getcentery(), 1311c1630 < strcpy (shapetype1, currentselection->getshape());//RJL040906 --- > strcpy (shapetype1, cs->getshape());//RJL040906 1313,1316c1632,1635 < currentselection->getcenterx(), < currentselection->getcentery(), < currentselection->getwidth(), < currentselection->getheight(), --- > cs->getcenterx(), > cs->getcentery(), > cs->getwidth(), > cs->getheight(), 1362c1681,1682 < updatedisplaylist(HGcurr); // added - RJL040907 --- > // updatedisplaylist(HGcurr); //added - RJL040907, Removed - RJL051114: > // BendPts are retrieved from database not display list. 1364c1684,1685 < } // end Ggroup::addlink :1560 --- > PrintGraphObjectList(); > LP;} // end Ggroup::addlink:1473 (nolog) 1379c1700 < { --- > {EP; 1384,1386c1705,1707 < assert(currentselection != 0); < id = currentselection->getid(); < HNcurr = (struct HN*)currentselection->getcurr(); --- > assert(cs != 0); > id = cs ->getid(); > HNcurr = (struct HN*)cs ->getcurr(); 1394c1715 < { assert(linkobj->getcurr() == HLcurr); // RJL 040830 --- > { assert((struct HL*)linkobj->getcurr() == HLcurr); // RJL 040830 1401c1722 < { assert(linkobj->getcurr() == HLcurr); // RJL040830 --- > { assert((struct HL*)linkobj->getcurr() == HLcurr); // RJL040830 1406c1727 < } // end Ggroup::dorecalc --- > LP;} // end Ggroup::dorecalc 1427c1748 < { --- > {EP; 1431c1752 < } --- > LP;} 1443c1764 < { --- > {EP; 1445c1766 < } --- > LP;} 1462c1783 < { --- > {EP; int rtnval = 0; 1468c1789 < return(1); --- > rtnval = 1; 1470,1472c1791,1792 < else < return(0); < } // end caption::select[ed?] --- > LP;return rtnval; > } // end caption::select 1475c1795 < * Description: doDump traverses List* topobject->subobjects (new 040517) --- > * Description: doDump traverses List* topobject->subobjects->obj??? (new 040517) 1494c1814,1815 < --- > // Call: topobject->doDump(); > // TBD: Pass viewname to control output - RJL051215 1496,1497c1817,1819 < { < List *currentlp; // local currentlp subobject --- > {EP; > #ifdef DEBUG > List *currentlp; // init to topobject->subobjects below 1502a1825 > hcg_key obid = 0; 1505,1506d1827 < < EP; 1508,1514d1828 < // topobject is global = root of List* subobjects < graphdump_fp = fopen("graphDump.txt", "a"); //append, for pr_dump_row < < if (graphdump_fp == NULL) { < dprint("doDump:Failed to open file graphDump.txt\n"); < return; < } 1515a1830 > // topobject is global ptr to root of List* subobjects 1517,1519d1831 < // in graph.h graphobject subclass node: < // hcg_ptr getcurr() { return (hcg_ptr) cHN; } < 1521,1522c1833,1836 < if (currentlp == NULL) < dprint("currentlp == NULL - cannot do Ggroup::doDump\n"); --- > if (currentlp == NULL) { > dprint("currentlp==NULL:(List empty)- exit from Ggroup::doDump\n"); > return; > } 1524,1526c1838,1857 < fprintf(graphdump_fp, < "\nAppending diagram at currentlp = %p. with HGid = %s to graphDump.txt\n", < currentlp, decode_retstr((hcg_key*)HGcurr)); --- > graphdump_fp = fopen("graphDump.txt", "a"); //append, for pr_dump_row > if (graphdump_fp == NULL) { > dprint("doDump:Failed to open file graphDump.txt\n"); > LP;return; > } > } > // dump objects now: > TTPRNT; // print ttype encoding sequence > PrintGraphObjectList(); // this is a Ggroup:: method? > printf("\tdoDump: currentlp = topobject->subobjects = %px\n", currentlp); > printf("\tdoDump: currenttlp->object->getcurr() = %px\n", > (hcg_ptr)currentlp->object->getcurr()); > printf("\tdoDump: currenttlp->object->getid() = %lux\n", > (hcg_key)(currentlp->object->getid())); > > // print List objects via pr_dump_row: > fprintf(graphdump_fp, "\nAppending diagram to graphDump.txt\n"); > //RJL 051126: fails - reports pkey FO00000* (* times) + garbled binary line - 051130 > //Problem: 051201: A different msg appears - and I can't find it: > //"Appending diagram at currentlp = 0x810c588. with HGid = FO000000 to graphDump.txt" 1528a1860 > hcg_ptr rp; 1532c1864,1867 < tblabbr = get_abbr((hcg_key*)ob, abb ); --- > rp = (hcg_ptr)(ob->getcurr()); > obid = (hcg_key)(ob->getid()); > > tblabbr = get_abbr( (hcg_key*) &obid, abb ); //- RJL051210 1535,1538c1870,1871 < dprints("tblabbr = %s\n", tblabbr); < dprintd("doDraw: while currentlp: objcount = %d\n", ++objcount); < dprintd("Ggroup::doDraw: ob->Draw on (hcg_key)*pkey=%x\n", (unsigned) ob->getid()); < dprintd("Ggroup::doDraw: ob->Draw on (hcg_key)*pkey=%lx\n", (unsigned long) ob->getid()); --- > dprints("doDump: tblabbr = %s; ", tblabbr); > dprintd("objcount = %d\n",++objcount); 1541c1874 < const char* tbltypes = "FO GD HG HN HA HL HP HI CG GX"; --- > const char* tbltypes = "FO GD HG HN HA HL HP HI CG GX"; //bytes[0..29] 1544,1545d1876 < hcg_ptr rp; < rp = (hcg_ptr)(ob->getcurr()); 1546a1878 > 1559,1561c1891,1894 < default: dprintd("doDump default case: ignore tblidx = %d\n", tblidx); < } < //Only case 5 failed, with HLcurr = 0 SIGSEGV - RJL 040630 --- > default: dprintsd( > "default: tblabbr=%s,tblidx=%d, should not be in graphobjectlist \n", > tblabbr,tblidx); > } // end switch(tblidx) 1563,1566c1896,1899 < } // exit dowhile iff currentlp = NULL < } // exit else < fclose(graphdump_fp); < return; --- > } // exit while currentlp != NULL > fclose(graphdump_fp); // Moved inside 'else' - RJL050831 > #endif > LP;return; +++++++++++++++++++++++++++++++++++++++++++ pr_util_nolog/alpha/probj/graphops.cc 18a19,21 > // Revision 1.7 2005/10/23 08:08:14 lechner > // Added EP and LP to log proc entry and exit. > // 182c185 < "$Id: graphops.cc,v 1.6 2005/05/03 06:56:09 lechner Exp $"; --- > "$Id: graphops.cc,v 1.7 2005/10/23 08:08:14 lechner Exp $"; 253c256 < { --- > {EP; 256c259 < /* Select the graph */ --- > /* Select the graph_create menu option */ 284c287 < } // end graph_create --- > LP;} // end graph_create 312c315 < { --- > {EP; 344c347 < } // end graph_select --- > LP;} // end graph_select 373c376 < { --- > {EP; 416c419 < } // end graph_delete --- > LP;} // end graph_delete 490c493 < { --- > {EP; 492c495 < EP; dprintds("Deleting? HGid=%lx, title = %4\n", HGcurr->HGid, HGcurr->HGtitle); --- > dprintds("Deleting? HGid=%lx, title = %4\n", HGcurr->HGid, HGcurr->HGtitle); 507c510 < } // end DeleteSelectedGraph callback --- > LP;} // end DeleteSelectedGraph callback +++++++++++++++++++++++++++++++++++++++++++ pr_util_nolog/alpha/probj/handler.cc 9a10,15 > // Revision 1.5 2005/12/10 03:27:04 lechner > // > #include "dprint.h" (was ../dprint.h; added pr_util:[no]log to $Includes. > // TBD: Fix this problem: > // // Since Keypress callback was installed, CTRL-C does not save to bdeabort.dat??? > // Added 'EP;' and 'LP;' macro calls to trace handler.cc functions. > // 78c84 < "$Id: handler.cc,v 1.4 2005/05/03 06:56:09 lechner Exp $"; --- > "$Id: handler.cc,v 1.5 2005/12/10 03:27:04 lechner Exp $"; 114c120 < #include "../dprint.h" --- > #include "dprint.h" 141a148 > // Since Keypress callback was installed, CTRL-C does not save to bdeabort.dat??? 151a159 > /* Isn't handler DISABLED during pr_dump itself?? - RJL051204 */ 168c176 < fflush(stdout); --- > fflush(stdout); //duplicated inside one case above? - RJL051204 175,176c183 < exit (1); < } --- > LP;exit (1); 177a185 > LP;} 190c198 < { --- > {EP; 227c235 < return (1); --- > {LP; return (1);} 244,245c252,253 < return (0); < } --- > LP;return (0); > LP;} 259c267 < { --- > {EP; 276c284 < } --- > LP;} 296c304 < { --- > {EP; 309c317 < } --- > LP;} 321c329 < { --- > {EP; 329c337 < } --- > LP;} +++++++++++++++++++++++++++++++++++++++++++ pr_util_nolog/alpha/probj/help.cc +++++++++++++++++++++++++++++++++++++++++++ pr_util_nolog/alpha/probj/hlink.cc +++++++++++++++++++++++++++++++++++++++++++ pr_util_nolog/alpha/probj/infodialog.cc +++++++++++++++++++++++++++++++++++++++++++ pr_util_nolog/alpha/probj/infomessage.cc +++++++++++++++++++++++++++++++++++++++++++ pr_util_nolog/alpha/probj/init.cc 28a29,56 > // Revision 1.15 2005/12/18 03:39:45 lechner > // Bug fix to get beyond check for "SR" command in pr_load.c. > // Added these stmts after the do while loop > // in function checkIfStartCmd() at init.cc:895-933: > // {idx = 0; hcg_read_next(); hcg_parse(hcg_buffer,hcg_t,&idx);} > // > // Revision 1.14 2005/12/10 02:46:51 lechner > // Some comments added, deleted or edited. Added TBD comments for replay.. > // Restored this fontList line (as a trial run; no basis): > // //"*fontList:-*-courier-bold-r-*--12-*=tag1",/* and see line 545*/ > // "*fontList:-*-courier-bold-r-*--12-*=tag1", /* restored to try - RJL051202 */ > // Altered "bde.form.scrollwindow.height:680", width, and canvas.height properties. > // Altered: "bde.width: 360",//was 360-RJL051130 > // Changed switch(etype) to trace only button events 4,5 +33 - RJL051202 > // Fixed 051203 BUG: event type code offset by one from event type name > // Shortened the event trace line to do 'printf("\t EI#%4d:ET%2d:%14s<%d,%d>",...' > // Fixed logic to reset repcount to 0 when etype changes, even in default case. > // > // Revision 1.13 2005/10/23 08:12:30 lechner > // Reduced several stmts to ' if (PASS) PASScount++;' > // Minor cosmetic changes. > // > // Revision 1.12 2005/08/23 23:16:34 lechner > // Replaced #ifndef LOG by #ifdef BDELOG (references exist only #ifdef BDELOG). > // > // Revision 1.11 2005/08/23 23:07:16 lechner > // Added #ifndef LOG \ ReplayStateValue replayState; //was in bdeReplay.cc > // 261c289 < "$Id: init.cc,v 1.10 2005/07/31 03:18:20 lechner Exp $"; --- > "$Id: init.cc,v 1.15 2005/12/18 03:39:45 lechner Exp $"; 296,299d323 < //#define STATE0 0 < //#define STATE1 1 < //#define STATE2 2 < 304,306c328,333 < // replayState values: in init.cc and bdeReplay.cc: < typedef enum{STATE0, STATE1, STATE2} ReplayStateValue; < extern ReplayStateValue replayState; /*enum {STATE0, STATE1, STATE2}*/ --- > // replayState clients are init.cc and bdeReplay.cc: > // typedef enum{STATE0, STATE1, STATE2} ReplayStateValue; in prototype.h > //#ifndef LOG (Why? Only referenced inside #ifdef BDELOG) > #ifdef BDELOG > ReplayStateValue replayState; /*enum {STATE0, STATE1, STATE2}*/ > #endif 336a364 > extern "C" void dump_row( char*, char*, FILE*, char*, int, char* ); //in pr_dump.c 352,353c380,381 < < static int ChkInvalidCmdLineOptions( int, char ** ); --- > // WHY static? - RJL06 0116 > /*static*/ int ChkInvalidCmdLineOptions( int, char ** ); 358a387 > extern int ReplayReady; //in bdeReplay.cc; used in init.cc, bdeReplay.cc 369,370d397 < extern int ReplayReady; //in bdeReplay.cc; used in dialog.cc, init.cc, bdeReplay.cc < 406,407c433,434 < { < EP;fprintf(etsfp, "\n\t Event Type Statistics:\n"); --- > {EP; > fprintf(etsfp, "\n\t Event Type Statistics:\n"); 418c445 < } // end printEventStats --- > LP;} // end printEventStats 443c470 < { --- > {EP; 446c473 < EP;fprintf(secfp, "\n\t State Entry Counts:\n"); --- > fprintf(secfp, "\n\t State Entry Counts:\n"); 457c484 < } // end printStateEntries --- > LP;} // end printStateEntries 466c493 < { --- > {EP; 478,479c505,506 < return; < } // end printSTEVcounts --- > LP;return; > LP;} // end printSTEVcounts 482c509 < // called from main in bde.cc --- > // lines 510-904: called from main in bde.cc 484c511 < { --- > {EP; 490c517 < APP_DATA data; --- > APP_DATA data; // 2 Strings: {gd_defaults, viewdefs) 495,497c522,523 < < //"*fontList:-*-courier-bold-r-*--12-*=tag1", < --- > //"*fontList:-*-courier-bold-r-*--12-*=tag1",/* and see line 545*/ > "*fontList:-*-courier-bold-r-*--12-*=tag1", /*restored to try-RJL051202*/ 505,507c531,533 < "bde.form.scrollwindow.height: 570", < "bde.form.scrollwindow.width: 360", /* from 650 to 360 - RJL040721 */ < "bde.form.scrollwindow.canvas.height: 550", --- > "bde.form.scrollwindow.height: 680", /* was 630 */ > "bde.form.scrollwindow.width: 460", /* from 650 to 360(040721) to 460 (051204) */ > "bde.form.scrollwindow.canvas.height: 650",/* from 550 - RJL051130*/ 510c536,540 < --- > "bde.height: 630",//was 630-RJL051130 > "bde.width: 360",//was 360-RJL051130 > NULL > }; // end String fallbacks[] > // I moved next 3 comment lines out of above array. - RJL051204 514,518d543 < "bde.height: 630", < "bde.width: 530", < NULL < }; // end String fallbacks[] < EP; 527d551 < 530c554,555 < is always left in argv regardless */ --- > is always left in argv regardless > */ 538c563 < fontlist = XmFontListCreate(font1, "tag1"); --- > fontlist = XmFontListCreate(font1, "tag1"); //and see line 504 -RJKL051202 662a688,689 > /* steps replay by one logfile cmd line on each key 's' press */ > /* WARNING: check if this disabled CTRL-C exit handler (no bdeabort.dat) - RJL051204*/ 673c700 < //////// Create Node Dialog (What is this ???) /////// --- > //////// Create Node Dialog (What is this ??? - whenever sw is used?) 683c710 < initClasses(); --- > DP;initClasses(); 684a712 > 695c723 < --- > pr_dump_row(GD, viewname, stderr, "stderr", 0, "a");//check non-empty 697c725 < // If this fails, now does the default behavior in fileio.cc get invoked? --- > // If this fails, how does the default behavior in fileio.cc get invoked? 699c727,733 < /*** BDE replay modifications by Sathya - Begin ***/ --- > /* TBD: Try to pr_load checkpoint file fileDB1.dat as a logfile command.? > * TBD: permit Replay as default - and load DB as above; > * TBD: Then, infile can include changes and/or [re-]load. > * TBD: THen diagram file is special case of log file: > * [= <"SR": pr_load fileDB1.dat; "SP"; normal editing> ???-RJL051204] > * (replacing Replay_LoadGraph below) > */ 701c735,736 < if ( argc == 1 ) /* No Data or Replay file argument passed to bde */ --- > /*** BDE replay modifications by Sathya - Begin ***/ > if ( argc == 1 ) /* No argv[1]: Data or Replay file argument not passed to bde */ 703,704c738,739 < // ReplayReady = 0; // Commented - RJL050606 < hcg_log = 0; --- > ReplayReady = 0; // Commented - RJL050606; (don't-care? - RJL060115) > hcg_log = 0; // No Data or Replay file argument passed to bde 706,708c741,743 < printf("No input file (argc=%d); use File Open;\n", argc); < printf("Optional Start Replay (SR) command on infile line 1 begins replay.\n"); < printf("Or else click Options -> Start Log to log database changes.\n"); --- > printf("No input file argv[1]; - use File/Open dialog;\n"); > printf("If infile begins with \"SR\" (StartReplay command), begin replay.\n"); > printf("Else log database changes by Options -> StartLog ... StopLog\n"); 710c745 < else // pre-cond: argv[1] is infilename --- > else // pre-cond: argc > 1; argv[1] should be infilename; 712d746 < DP; isStartCmd = checkIfStartCmd(argv[1]); // skip commments, look for "SR" 713a748,751 > // returns enum value in {NULLfile, diagramfile, replaylog} > // opens file argv[1], skips comments, looks for "SR" on first line, closes file. > DP; isStartCmd = checkIfStartCmd(argv[1]); > dprintd("checkIfStartCmd(argv[1]) returns isStartCmd = %d\n", isStartCmd);//060115 716d753 < 718,719c755 < < fprintf(stderr, "File %s not found; exiting bde\n\n", argv[1]); --- > fprintf(stderr, "bde input file %s not found; exiting bde\n\n", argv[1]); 724,726c760,764 < //ReplayReady = 0; // comment pfx removed 021028 - RJL < hcg_log = 0; // open datafile - call startlog to log < hcg_replay = 0; // New state flag: quasi-indep. of hcg_log - RJL 040712 --- > ReplayReady = 0; // comment pfx removed 021028 - RJL > //hcg_log = 0; // open datafile - call startlog to log > // What if logging has already begun? -RJL060115 > //hcg_replay = 0; // New state flag: quasi-indep. of hcg_log - RJL 040712 > // What if replay has already begun? -RJL060115 730a769 > //TBD: after SP (StopReplay) should HG-row selection be entered, or defaulted? 731a771 > //Why CreateHGDialogBox if already KNOW current_filename?? - RJL060115 736,737c776 < < case replaylog: // Pre-cond: found "SR" command - RJL 040712) --- > case replaylog: // Pre-cond: found "SR" command && BDELOG #defined.- RJL 040712) 740c779 < replayState = STATE0;// #ifdef BDELOG - can this be moved to bdeReplay? --- > replayState = STATE0;// #ifdef BDELOG - can we move this to bdeReplay? 745a785,786 > // Where is type extension removed? - RJL > dprints("Replay file name is %s\n", logfile); 754,755c795,798 < displayMessage("logging is not supported - recompile with -DBDELOG"); < break; --- > DP;displayMessage("bde.exe from xmkmfnolog.csh does not support replay; \n"); > displayMessage("Rebuild bde with xmkmflog.csh and configurelog.h\n"); > dprint("Rebuild bde with xmkmflog.csh and configurelog.h. Exit bde. \n"); > exit(0); 768,769c811,812 < // enable left_menu actions: - RJL040708; < // where is XtSetSensitive(left_menu, True) ? - RJL 040712 --- > // enable leftmenu actions: - RJL040708; > // check for XtSetSensitive(leftmenu, True)//was left_menu 040712; RJL060115 776d818 < 791a834 > 796c839 < eventCount += 1; // count all events; compare to PASScount below --- > eventCount++; //+= 1; count all events; compare to PASScount below 800,802c843,844 < repcount++; // only count repeats, print afer change < else { < /************** --- > repcount++; // only count repeats, print after change > else { // etype changed: 804c846,847 < case 0: // NotUsed --- > switch(etype) { //changed to trace only button events 4,5 +33 - RJL051202 > //case 0: // NotUsed 808,819c851,862 < case 7: // EnterNotify < case 8: // LeaveNotify < case 9: // FocusIn < case 10: // FocusOut < case 12: // Expose (see docanvasexposure in InitClases.cc) < case 13: //GraphicsExpose < case 14: // NoExpose < case 17: // DestroyNotify < case 18: // UnmapNotify < case 19: // MapNotify < case 21: // Reparentnotify < case 22: // ConfigureNotify --- > //case 7: // EnterNotify > //case 8: // LeaveNotify > // case 9: // FocusIn > // case 10: // FocusOut > //case 12: // Expose (see docanvasexposure in InitClases.cc) > //case 13: //GraphicsExpose > //case 14: // NoExpose > //case 17: // DestroyNotify > //case 18: // UnmapNotify > //case 19: // MapNotify > //case 21: // Reparentnotify > //case 22: // ConfigureNotify 821d863 < ************/ 822a865 > // 051203: BUG: event type code offset by one from event type name 824,825c867,868 < "\t EI#%4d: new ET#%2d:%16s at <%d,%d> ", < eventCount,etype,eventname[etype], --- > "\t EI#%4d:ET%2d:%14s<%d,%d>", > eventCount,oldtype,eventname[oldtype],//was etype - RJL051204 829,830c872 < printf("\t(after %d repeats of prior ET#%2d)", < repcount+1, oldtype); --- > printf("(%d)", repcount); 833d874 < oldtype = etype;//new event type 834a876,882 > oldtype = etype;//remember this event type > break; > default: /* all etypes except 4,5,33:*/ > oldtype = etype;//remember this event type > if (repcount>0) > repcount = 0; > break; 835a884 > 837,840c886 < if (!PASS) fprintf(stdout, < "PASScount = %4d, PASS == 0 for event type %d: %s\n", < PASScount, etype, eventname[etype]); < PASScount += ((PASS)?1:0); // count PASS = success --- > if (PASS) PASScount++; // PASScount <= eventcnt 842a889 > }// end switch(etype) 855,856c902,903 < return (error); //if error != 0, init() is a no-op. < } // end init() --- > LP;return (error); //if error != 0, init() is a no-op. > } // end init() :503-904 859c906 < /* ******************************************************************** --- > /* ************************* 907-963 ******************************************* 864c911,913 < --- > ///BUG: need to read one more line before the "SR" field check below - RJL051217 > //WHY? read_next removed again after do-while - RJL 060116 > // since hcg_t already contains a non-comment token - RJL060116 866c915 < { --- > {EP; 871a921 > IsReplayLogFile nextState; //3 possible values 879,880c929,930 < idx = 0; // restart for next line parse < hcg_read_next(); --- > idx = 0; // restart for next line parse; > hcg_read_next();// side effect: hcg_ascii_fp advances. 883,886c933,939 < } < while ( char1=='/' && ((char2=='*') || (char2=='/')) ); //skip comment lines < < fclose(hcg_ascii_fp); /* pr_load reopens this file or infileDB1.dat */ --- > } // skips /_* or /_/ -prefixed lines; does NOT parse multi-line comments. > while ( (char1=='/') && ((char2=='*')||(char2=='/')) ); > // end do-while > > // Not a comment: look for "SR" in char1 and char2 > // "SR" may already be in char1,char2: remove idx = 0; hcg_read_next(); > // hcg_parse(hcg_buffer,hcg_t,&idx); // first non-comment token; added-RJL051217 888,894c941,950 < if (strlen(hcg_t) == 2 && char1=='S' && char2=='R') < return (replaylog); //'Start Replay' command < else return (diagramfile); < } // end if !NULL < else { // (hcg_ascii_fp == NULL) < fprintf(stderr, "File %s not found; exiting bde\n\n", fname); < return (NULLfile); --- > if ( (strlen(hcg_t)==2) && (hcg_t[0]=='S') && (hcg_t[1]=='R') ) > { > dprintd("checkIfStartCmd found token \"SR\"; return replaylog = %d\n", replaylog); > nextState = replaylog; // ==> 'Start Replay' > } > else > { > dprintsd("checkIfStartCmd found token = \"%s\", returns diagramfile = %d\n", > hcg_t, diagramfile); > nextState = diagramfile; // not a comment, not "SR"; ==> may be a tbl-row or junk. 896c952,962 < } // end checkIfStartCmd() --- > fclose(hcg_ascii_fp); // pr_load reopens this file or infileDB1.dat > } // end if !NULL > else { > // (hcg_ascii_fp == NULL) ; Should bde go to File Open Selection Dialog? > dprintsd( > "\nFile \"%s\" not found: checkIfStartCmd returns NULLfile = %d:\n", > fname, NULLfile); > nextState = NULLfile; > } // end else (NULL) > LP;return(nextState); > } // end checkIfStartCmd() (908-963) 921,922c987,988 < static int ChkInvalidCmdLineOptions( int argc, char **argv ) < { --- > int ChkInvalidCmdLineOptions( int argc, char **argv ) > {EP; 928c994 < /* first argument is program name - skip it */ --- > /* first argument is program name - skip i=0 */ +++++++++++++++++++++++++++++++++++++++++++ pr_util_nolog/alpha/probj/initClasses.cc 8a9,11 > // Revision 1.6 2005/12/11 20:49:37 lechner > // Minor comment changes. > // 116c119 < "$Id: initClasses.cc,v 1.5 2005/05/03 06:56:09 lechner Exp $"; --- > "$Id: initClasses.cc,v 1.6 2005/12/11 20:49:37 lechner Exp $"; 272c275 < { --- > {EP; 297c300 < } // end docanvasexposure --- > LP;} // end docanvasexposure +++++++++++++++++++++++++++++++++++++++++++ pr_util_nolog/alpha/probj/leftmenu.cc 96c96 < --- > #include "dprint.h" 111c111 < { --- > {EP; 315c315 < } // end init_leftmenu --- > LP;} // end init_leftmenu +++++++++++++++++++++++++++++++++++++++++++ pr_util_nolog/alpha/probj/leftmenu_cb.cc 18a19,21 > // Revision 1.9 2005/12/10 03:38:48 lechner > // #included "dprint.h" instead of ../dprint.h; $TOPDIR now in $INCLUDES. > // 187c190 < "$Id: leftmenu_cb.cc,v 1.8 2005/05/03 06:56:10 lechner Exp $"; --- > "$Id: leftmenu_cb.cc,v 1.9 2005/12/10 03:38:48 lechner Exp $"; 203c206 < #include "../dprint.h" // for EP and DP macros --- > #include "dprint.h" // for EP and DP macros +++++++++++++++++++++++++++++++++++++++++++ pr_util_nolog/alpha/probj/linkops.cc +++++++++++++++++++++++++++++++++++++++++++ pr_util_nolog/alpha/probj/menubar.cc 13a14,16 > // Revision 1.5 2005/12/11 05:00:30 lechner > // Added line 99: #include "94sbde_schema.h" /* for dprint.h */ > // 84c87 < "$Id: menubar.cc,v 1.4 2005/05/03 06:56:10 lechner Exp $"; --- > "$Id: menubar.cc,v 1.5 2005/12/11 05:00:30 lechner Exp $"; 98a102 > #include "94sbde_schema.h" /* for dprint.h */ +++++++++++++++++++++++++++++++++++++++++++ pr_util_nolog/alpha/probj/menubar_cb.cc 9,12c9,12 < // Routines : file_cb() < // edit_cb() < // config_cb() < // help_cb() --- > // Routines : file_cb() // Most important > // edit_cb() // Not used - RJL051215 > // config_cb() // node text mode used (toggle HN.name vs. HA) > // help_cb() //Not used - RJL051215 17a18,32 > // Revision 1.9 2006/01/15 23:32:54 lechner > // Comments and {EP;...LP;} insertions only. > // > // Revision 1.8 2005/12/11 05:22:26 lechner > // Added this line: #include "94sbde_schema.h" /* for dprint.h */ > // Added 3 arguments to a dosave call: dosave(menubar, NULL, 0); > // Changed tmpfilename to helpfilename as destination of 5 help messages > // > // Revision 1.7 2005/08/23 23:20:31 lechner > // Conditionally #defined DEFAULT_LIB_PATH "../lib"; (also in configure.h) > // This is a work-around, preferably solved in Imakefiles. > // > // Revision 1.6 2005/07/25 01:43:27 lechner > // One comment change > // 89c104 < "$Id: menubar_cb.cc,v 1.5 2005/06/08 02:47:08 lechner Exp $"; --- > "$Id: menubar_cb.cc,v 1.9 2006/01/15 23:32:54 lechner Exp $"; 102a118,119 > #include "94sbde_schema.h" /* for dprint.h */ > 120c137 < { --- > {EP; 131c148 < dosave(); --- > dosave(menubar, NULL, 0); //RJL051202 143c160 < } --- > LP;} 154c171 < { --- > {EP; 183,184c200,201 < } < } --- > } // end switch(item) > LP;} //end edit_cb 195c212 < { --- > {EP; 214c231 < startreplay(toplevel); --- > startreplay(toplevel); //#ifdef BDELOG 218d234 < // TBD: disable this menu option ifndef BDELOG 220a237 > 226c243 < } // end config_cb() --- > LP;} // end config_cb() 238c255 < { --- > {EP; 240,241c257,260 < char tmpfilename[PATH_MAX + FILENAME_MAX]; < --- > char helpfilename[PATH_MAX + FILENAME_MAX]; > #ifndef DEFAULT_LIB_PATH > #define DEFAULT_LIB_PATH "../lib" > #endif 244c263 < sprintf(tmpfilename, "%s/bde.help", DEFAULT_LIB_PATH); --- > sprintf(helpfilename, "%s/bde.help", DEFAULT_LIB_PATH); 247c266 < sprintf(tmpfilename, "%s/diagram.help", DEFAULT_LIB_PATH); --- > sprintf(helpfilename, "%s/diagram.help", DEFAULT_LIB_PATH); 250c269 < sprintf(tmpfilename, "%s/file.help", DEFAULT_LIB_PATH); --- > sprintf(helpfilename, "%s/file.help", DEFAULT_LIB_PATH); 253c272 < sprintf(tmpfilename, "%s/edit.help", DEFAULT_LIB_PATH); --- > sprintf(helpfilename, "%s/edit.help", DEFAULT_LIB_PATH); 256c275 < sprintf(tmpfilename, "%s/setup.help", DEFAULT_LIB_PATH); --- > sprintf(helpfilename, "%s/setup.help", DEFAULT_LIB_PATH); 260,261c279,280 < helpfile(tmpfilename); < } --- > helpfile(helpfilename); > LP;} +++++++++++++++++++++++++++++++++++++++++++ pr_util_nolog/alpha/probj/msgBox.cc +++++++++++++++++++++++++++++++++++++++++++ pr_util_nolog/alpha/probj/nodeops.cc 19a20,34 > // Revision 1.17 2005/12/11 05:07:36 lechner > // Added misc. comments; > // Added line 793: selected.changeAttribState(SResize_node2);// new, bugfix - RJL051113 > // > // Revision 1.16 2005/11/11 23:09:01 lechner > // Only added 2 comments. > // > // Revision 1.15 2005/10/23 08:23:39 lechner > // Added macro CAS: #define CAS selected.changeAttribState > // Added EP and LP to log proc entry/exit. > // Added CAS() to switch(event) cases > // to log self-transitions (event with no change of state) > // Circa lines 773-805: Restored case SResize_node1 code > // which had been lost during editing. > // 35c50 < // (cvs diff -r1.11.2.21 nodeops.cc|wc returns 346 lines) --- > // (cvs diff -r1.11.2.21 nodeops.cc|wc LP;returns 346 lines) 224c239 < "$Id: nodeops.cc,v 1.14 2005/05/29 02:09:02 lechner Exp $"; --- > "$Id: nodeops.cc,v 1.17 2005/12/11 05:07:36 lechner Exp $"; 250a266 > 252c268 < //reselect in captionops.cc updates static currentselection and returns it. --- > //reselect in captionops.cc updates static currentselection and LP;returns it. 258a275 > #define CAS selected.changeAttribState 277c294 < /*************************************************************************** --- > /************** node_create: 287-329 ************************************* 294c311 < { --- > {EP; 299,300c316,318 < //TBD: assert((state==SCtxt)&&(HNcurr!=NULL)); < /* At this point, we are in the Node Create state */ --- > > > /* At this point, we are in the Node Create state (SCnode in state.h) */ 317c335,336 < } // end node_create --- > CAS(SCnode);// no change CAS=selected.changeAttribState (record this self-TR) > LP;} // end node_create:287-329 348c367 < { --- > {EP; 365a385 > CAS(SDnode1); // no change 367a388 > CAS(SDnode1); // no change 370a392 > CAS(SDnode1);// no change 372c394 < } --- > } // end switch(button_op) 374d395 < 386c407 < else //%%SD2BDG2/A2 --- > else { //%%SD2BDG2/A2 387a409,410 > CAS(SDnode2);// no change > } 390a414 > CAS(SDnode2);// no change 393a418 > CAS(SDnode2); // no change 397a423,425 > CAS(SDnode2); // no change > break; > } //end switch(BUTTON_OP) 399d426 < } 401d427 < 407c433 < } --- > } // end switch(state) 409,410c435 < } < // end void node_delete() --- > LP;} // end void node_delete() 434c459 < { --- > {EP; topobject->Ggroup::doDump(); // assert HGcurr!= NULL; append HGcurr to graphDump.txt 470a496 > CAS(SMove); //no change 501a528 > CAS(SMove);//no change 505,507c532,535 < else // %%SMBMG2=!G1; A2=no-op; same state < break; //end %%SMBM - case BUTTON_MOVED < --- > else { // %%SMBMG2=!G1; A2=no-op; same state > CAS(SMove);//no change > break; > } //end %%SMBMA2 - case BUTTON_MOVED 527a556 > CAS(SMove);//no change 531a561 > CAS(SMove);//no change 533,535c563 < }//%%end SM < break; //end %%SM state SMove < --- > }//%%end switch(button_op) 542,544c570,572 < } // end switch(state) < < } // end node_move (374:501) --- > } //%%end switch(state) > DP;topobject->Ggroup::doDump(); // assert HGcurr!= NULL; append HGcurr to graphDump.txt > LP;} // end node_move (374:501) 555c583 < { --- > {EP; 565c593 < //getwidth/height returns half-width/height --- > //getwidth/height LP;returns half-width/height 583c611 < } // end position_text (504:539) --- > LP;} // end position_text (504:539) 615c643 < { --- > {EP;topobject->Ggroup::doDump(); // assert HGcurr!= NULL; append HGcurr to graphDump.txt 637a666 > CAS(SResize); // no change 641c670,672 < DPS(SRBMA1:no-op); break;//end %SRBMA1 --- > DPS(SRBMA1:no-op); > CAS(SResize); // no change > break;//end %SRBMA1 646a678 > CAS(SResize); // no change 656a689 > CAS(SResize); // no change; (Moved inside-RJL051213) 663a697 > // CAS(SResize); (moved into else/if - N/A to else else) 667a702 > CAS(SResize); // no change 698c733,734 < //Same state; wait for BUTTON_MOVED or BUTTON_UP; --- > CAS(SResize_node); // no change > //Same state; wait for BUTTON_MOVED or BUTTON_UP; and confirm 719c755 < --- > //No more wevents in this state; go to SRN1 next (below): 728a765 > // These cases are for an invalid node selection: retry here - RJL 730a768 > CAS(SResize_node); // no change 733a772 > CAS(SResize_node); // no change 738a778 > CAS(SResize_node); // no change 742c782,822 < //%%end SRN1 = case SResize_node1 --- > //%%end SRN = case SResize_node > > // case SResize_node1 = SRN1 goes here: how is it differ from SRN2? > //COnjecture: only diff is first-time; add CAS(SRN2) in SRN1BM action -RJL051005 > > > > case SResize_node1: //%%SRN1; handle first BUTTON_MOVED or _UP - added 051005-RJL > switch(button_op) { > case BUTTON_MOVED_EVENT: //%%SRN1BM: > DPS(SRN1BMA1); > assert(hasType(id,HN)); // failed 041011,12: invalid id > HNcurr = (struct HN*)currentselection->getcurr(); // re-eval. > dprintdd("id = %lx, HNid = %lx\n", id, HNcurr->HNid);//HNcurr==0 041128 > //TBD: update doresize so client initializes first move-RJL041021 > DP;doresize(event->x, event->y, > center_x, center_y, id, 0); //1=>first_time; from SRNBDA4 > selected.changeAttribState(SResize_node2);// new, bugfix - RJL051113 > //CAS(SResize_node1); // self-transition: handle each incremental move > break; //%%end SRN1BMA1 = case BUTTON_MOVED > > case BUTTON_UP_EVENT: //%%doSRN12BUA1=same action for SRN1,SRN2 BUA1 > // This only happens if click on node without mouse motion: No Resize! > DPS(SRN1BUA1); > doSNR12BUA1(center_x, center_y); > ReDraw(); // added 050212 (Why here, if no resize? > //reenter state SResize_node for THIS node > DP;selected.changeAttribState(SResize_node); //reconfirm > //to SRN: reconfirm or reselect to repeat NodeResize > break; //end %%SRN1BUA1 = case BUTTON_UP > > case BUTTON_DOWN_EVENT: //%%SRN1BD - this is a 'can't happen' case > DPS(SRN1BD: Illegal); assert(0);//Abort here > CAS(SResize_node1); > break;//end %%SRN1BDA1 > default: /* illegal value for button_op variable */ > PostErrorMsg(SResize_node1); > CAS(SResize_node1); > break; > } // end switch(button_op) > break; //end%%SRN1 = case SResize_node1 added - RJL051005 753a834 > CAS(SResize_node2); 760,761c841 < //reenter state SResize_node for THIS node < DP;selected.changeAttribState(SResize_node); //reconfirm --- > //reenter state SResize_node: can reconfirm and move node again 762a843 > DP;selected.changeAttribState(SResize_node); 773,774c854 < break; // RJL041021 < //end %%SRN2 = case SResize_node2 --- > break; //end%%SRN2 = case SResize_node2 - RJL041021 783,784c863,864 < < } // end node_resize() (542:813) --- > DP;topobject->Ggroup::doDump(); // assert HGcurr!= NULL; append HGcurr to graphDump.txt > LP;} // end node_resize() (542:813) 790c870 < { // cx,cy = node center --- > {EP; // cx,cy = node center 820,821c900,901 < return; < } // end doSNR12BUA1 (815-852 --- > LP;return; > LP;} // end doSNR12BUA1 (815-852 832c912 < /* getwidth/getheight returns halfwidth/halfheight */ --- > /* getwidth/getheight LP;returns halfwidth/halfheight */ 839c919 < { --- > {EP; topobject->Ggroup::doDump(); // assert HGcurr!= NULL; append HGcurr to graphDump.txt 848c928 < EP;assert(currentselection!=0 && id == HNcurr->HNid && \ --- > assert(currentselection!=0 && id == HNcurr->HNid && \ 866,867c946,948 < return; < } // end doresize --- > DP;topobject->Ggroup::doDump(); // assert HGcurr!= NULL; append HGcurr to graphDump.txt > LP;return; > LP;} // end doresize 871c952 < { --- > {EP; 904,905c985,986 < return; < } // end drawshape() --- > LP;return; > LP;} // end drawshape() 919c1000 < //Pre-condition: currentselection->getid returns a valid HNid; --- > //Pre-condition: currentselection->getid LP;returns a valid HNid; 923c1004 < { --- > {EP; 981c1062 < } // end addattr --- > LP;} // end addattr 994c1075 < { --- > {EP; 1054c1135 < } // end chgattr --- > LP;} // end chgattr 1079c1160 < { --- > {EP; 1086c1167 < return (text *)topobject->findbyindex(pr_get_key(HAcurr, XBid)); --- > LP;return (text *)topobject->findbyindex(pr_get_key(HAcurr, XBid)); 1090,1092c1171 < return textobj->nextsibling(); < } < return 0; /* no children */ --- > LP;return textobj->nextsibling(); 1093a1173,1174 > LP;return 0; /* no children */ > LP;} +++++++++++++++++++++++++++++++++++++++++++ pr_util_nolog/alpha/probj/select.cc +++++++++++++++++++++++++++++++++++++++++++ pr_util_nolog/alpha/probj/smselect.cc 17a18,25 > // Revision 1.11 2005/12/11 05:16:45 lechner > // Line 564: Trace msg. shortened to > // "\nNextST:0x%x=%16s<---- // Line 660: Commented out an obsolete error message; self-looping in an initial state > // is now traced on stderr. > // Line 718: Trace msg. shortened to > // "\n\nNewSTD:0x%x=%16s<--- // 164c172 < "$Id: smselect.cc,v 1.10 2005/05/03 06:56:11 lechner Exp $"; --- > "$Id: smselect.cc,v 1.11 2005/12/11 05:16:45 lechner Exp $"; 452c460 < fprintf(stderr,"changeState: state=NState=0x%x\n", NState); --- > fprintf(stderr,"changeState to NState=0x%x\n", NState); 475c483 < fprintf(stderr, "ST %s 0x%x=%i \n",statename[st-1], st, st); --- > fprintf(stderr, "ST %s %i=0x%x \n",statename[st-1], st, st); 528c536 < "State Error: changestate() moves to secondary state %i\n",st); --- > "State Error: changestate() moves to secondary state %d\n",st); // was %i [? -RJL051130 564,566c572,574 < "\nNewMode:TR# %d: 0x%x=%16s -------------->0x%x=%s \n", < transCount++, state, statename[state-1], < st, statename[st-1]); --- > "\nNextST:0x%x=%16s<---- st, statename[st-1], > state, statename[state-1], transCount++); 569d576 < //DP; dprintdd("Line529:after state=st;: state=%d, st=%d\n", state,st); 624a632 > 629d636 < 649c656 < /* State Log. */ --- > /* State Log. Update 0511112: No longer an error: CAS doesw self-transition */ 661,662c668,671 < fprintf(stderr, < "State Error: changeAttribState() used to change to primary state\n"); --- > /*RJL 051112: Not an error: CAS implements a self-transition for logging purposes > * fprintf(stderr, > * "State Error: changeAttribState() used to change to primary state\n"); > */ 667,668d675 < < 715c722 < "State Error: changeAttribState() used to change to unimplemented state\n"); --- > "State Error: changeAttribState() used to change to unimplemented state:\n"); 718,724c725,730 < fprintf(stderr, "\nIn-Mode Trans#%d: 0x%x=%s ---------------> 0x%x=%s\n", < transCount++, state, statename[state-1], < st,statename[st-1]);//RJL040709; reversed args 041129 < stateentry[st]++; //for init.cc:printStateEntries() < state = st; < DP; dprintdd("Line668: after state=st: state=%d, st=%d\n", state,st); < --- > fprintf(stderr, > "\n\nNewSTD:0x%x=%16s<--- st, statename[st-1], > state, statename[state-1], transCount++); > stateentry[st]++; //in init.cc for printStateEntries() - RJL041024 > state = st; // range 1..103; (moved inside of else - RJL 030801) +++++++++++++++++++++++++++++++++++++++++++ pr_util_nolog/alpha/probj/strdup.cc 9a10,12 > // Revision 1.5 2005/12/11 05:24:55 lechner > // Added the line #include "dprint.h" for dprint calls. > // 64c67 < "$Id: strdup.cc,v 1.4 2005/05/03 06:56:11 lechner Exp $"; --- > "$Id: strdup.cc,v 1.5 2005/12/11 05:24:55 lechner Exp $"; 78c81 < --- > #include "dprint.h" 81a85,86 > * Returns ptr to malloc'ated copy of, same length as, input string. > * (Warning: New string is null-terminated iff old one was.)-RJL051202 94a100 > //if (s_len>132) {DP;dprintd("WARNING: strdup:strlen=%d >132 bytes\n", s_len);} //make cannot find dprint.c so forget about this? 97,102d102 < < < < < < +++++++++++++++++++++++++++++++++++++++++++ pr_util_nolog/alpha/probj/text.cc 11a12,14 > // Revision 1.11 2005/10/23 08:25:18 lechner > // Added EP and LP to log proc entry/exit. > // 189c192 < "$Id: text.cc,v 1.10 2005/05/29 02:10:54 lechner Exp $"; --- > "$Id: text.cc,v 1.11 2005/10/23 08:25:18 lechner Exp $"; 223,224c226,227 < { < } --- > {EP; > LP;} 227,228c230,231 < { < } --- > {EP; > LP;} 231,232c234,235 < { < } --- > {EP; > LP;} 249c252 < { --- > {EP; 352c355 < } // end ok_callback for text dialog --- > LP;} // end ok_callback for text dialog 366c369 < { --- > {EP; 368c371 < } --- > LP;} 386c389 < { --- > {EP; 391,392c394,395 < return((dx>=0 && dy>=0 && dx<=width && dy<=height)?1:0); < } --- > LP;return((dx>=0 && dy>=0 && dx<=width && dy<=height)?1:0); > LP;} 395c398 < { --- > {EP; 405c408 < } --- > LP;} 410c413 < { --- > {EP; 416c419 < } --- > LP;} 421c424 < { --- > {EP; 431c434 < } --- > LP;} 453c456 < { --- > {EP; 464c467 < } --- > LP;} 480c483 < { --- > {EP; 543c546 < } // end node_expand/*fit*/_to_text --- > LP;} // end node_expand/*fit*/_to_text +++++++++++++++++++++++++++++++++++++++++++ pr_util_nolog/alpha/probj/textops.cc 16a17,22 > // Revision 1.16 2005/12/11 20:49:38 lechner > // Minor comment changes. > // > // Revision 1.15 2005/10/23 08:26:43 lechner > // Added EP and LP to log proc entry/exit. > // 260c266 < "$Id: textops.cc,v 1.14 2005/05/29 02:07:43 lechner Exp $"; --- > "$Id: textops.cc,v 1.16 2005/12/11 20:49:38 lechner Exp $"; 345c351 < { --- > {EP; 430a437,438 > //how do we know id is valid? try assert(id == currentselection->getid(); as in above mutex case. > assert(id == currentselection->getid()); //if not, forgot getid here 460c468 < } // end text create --- > LP;} // end text create 465c473 < { --- > {EP; 501c509 < } // end create_HNtext --- > LP;} // end create_HNtext 504c512 < { --- > {EP; 512,513c520,521 < return; < } // end create_HLtext --- > LP;return; > LP;} // end create_HLtext 518c526 < { --- > {EP; 527,528c535,536 < return; < } // end create_CGtext --- > LP;return; > LP;} // end create_CGtext 545c553 < { --- > {EP; 739c747 < } // end Text Delete --- > LP;} // end Text Delete 758c766 < { --- > {EP; 766d773 < EP; 1211c1218 < } // end text_move (lines ~736:1231) --- > LP;} // end text_move (lines ~736:1231) 1216,1217c1223,1224 < // see analogous event->type map to eventname[type] in eventtypelist.h < { --- > // see analogous event->type map to eventname[type] in eventNameList.h > {EP; 1322c1329 < } // end PostErrorMsg --- > LP;} // end PostErrorMsg 1326c1333 < //Remaining function definitions kept for future XB class method ref. --- > //1333-1541: Remaining function definitions kept for future XB class method ref. 1330c1337 < { --- > {EP; 1334c1341 < } --- > LP;} 1358c1365 < { --- > {EP; 1362,1364c1369,1370 < if (HAcurr) < return (text *)topobject->findbyindex(pr_get_key(HAcurr, XBid)); < return 0; --- > if (HAcurr){ > LP;return (text *)topobject->findbyindex(pr_get_key(HAcurr, XBid)); 1366c1372,1373 < --- > LP;return 0; > LP;} 1379c1386 < * o valid cGX member with valid XBid. --- > * o valid cGX member with valid XBid. <<<<< {EP; 1392,1394c1399,1400 < if (GXcurr) < return (text *)topobject->findbyindex(pr_get_key(GXcurr, XBid)); < return 0; --- > if (GXcurr) { > LP;return (text *)topobject->findbyindex(pr_get_key(GXcurr, XBid)); 1395a1402,1403 > LP;return 0; > LP;} 1416c1424 < { --- > {EP; 1467c1475 < return textobj; --- > LP;return textobj; 1470,1472c1478,1479 < return 0; < } < --- > LP;return 0; > LP;} 1497c1504 < { --- > {EP; 1533c1540 < } --- > LP;} [venus.cs.uml.edu1](4)> exit script done on Mon Jan 16 23:37:42 2006