From Joseph.Francis@fmr.com  Mon May 22 15:59:30 2000
Received: from gw16i.fmr.com (gw16e.fmr.com [192.223.252.80])
	by jupiter.cs.uml.edu (8.10.0/8.10.0) with SMTP id e4MJxU528168;
	Mon, 22 May 2000 15:59:30 -0400 (EDT)
Received: (from smtp@localhost)
	by gw16i.fmr.com (8.8.7/8.8.7) id PAA16444;
	Mon, 22 May 2000 15:59:29 -0400 (EDT)
Received: from msgmmk101nts.fmr.com(172.25.150.20) by gw16i.fmr.com via smap (V2.0)
	id xma016071; Mon, 22 May 00 15:58:48 -0400
Received: by msgmmk101nts.fmr.com with Internet Mail Service (5.5.2448.0)
	id <KNQD7K29>; Mon, 22 May 2000 15:58:17 -0400
Message-ID: <A91833776173D211AF7B0060B0679CE101C1ACCA@msgmro539nts.fmr.com>
From: "Francis, Joseph" <Joseph.Francis@fmr.com>
To: "'Maulik Shah'" <maushah@cs.uml.edu>,
       "Joseph A. Francis"
	 <jfrancis@cs.uml.edu>
Cc: "Francis, Joseph" <Joseph.Francis@fmr.com>,
       Bob Lechner
	 <lechner@cs.uml.edu>
Subject: RE: Revised Report (maushah)
Date: Mon, 22 May 2000 15:58:41 -0400
MIME-Version: 1.0
X-Mailer: Internet Mail Service (5.5.2448.0)
Content-Type: text/plain;
	charset="iso-8859-1"
Status: RO

I can see that you have cc'd Prof. Lechner on this.  I will put this into
the final report and post a revised copy some time late this evening.

> -----Original Message-----
> From:	Maulik Shah [SMTP:maushah@cs.uml.edu]
> Sent:	Monday, May 22, 2000 1:48 PM
> To:	Joseph A. Francis
> Cc:	Joseph.Francis@fmr.com; Bob Lechner
> Subject:	Revised Report (maushah)
> 
> Ref: $CASE/bdelog2ks/maushah/docs/myFinalReport.txt
> Software Engineering I (91.523) Spring 2000
> Submitted by: Maulik Shah (maushah)
> 
> Files modified-
> /bde/src/bendpt.cc
> /bde/src/bendptops.cc
> /bde/src/captionops.cc
> /bde/src/dialog.cc
> /bde/src/fileio.cc
> /bde/src/hlink.cc
> /bde/src/initClasses.cc
> /bde/src/leftmenu_cb.cc
> /bde/src/linkops.cc
> /bde/src/nodeops.cc
> /bde/src/select.cc
> /bde/src/text.cc
> /bde/src/textops.cc
> 
> Ref: $CASE/bdelog2ks/maushah/genv11_0502/bde/src/*.cc
> Removal of unwanted GENv6 condition loops. I refracted the code by
> removal of GENv6 conditional loops, which were no longer in effect since
> we ran GENv11.
> 
> Ref: $CASE/bdelog2ks/maushah/genv11_0502/bde/src/*.cc
> Changed #if 0 to #ifdef 0 since the previous part got me into trouble
> with xmkmf -a (imake). After the change to #ifdef 0, xmkmf did not fail
> since xmkmf runs the makefiles in ~/bde2alpha_rv/ and make runs genv11 to
> make pr_util. Thus to maintain code consistency, I modified #if 0 to
> #ifdef 0. 
> 
> Ref: $CASE/bdelog2ks/maushah/genv11_0502/bde/src/bendpt.cc
> Log Report: // $Log: bendpt.cc,v $
> Revision 1.5.2.2  2000/05/17 22:28:48  maushah
>  *** empty log message ***           
> (My system lost connection while check-in. When I restored working,  the
> file was checked-in but with an empty log message.)
> Modifications made:
> (line 172 of 755)
> // Removed Genv6 condition              maushah 05/15/00  
> (line 303 of 755)
> // Removed Genv6 condition              maushah 05/15/00  
> (line 366 of 755)
> // Removed Genv6 condition              maushah 05/15/00  
> (line 730 of 755)
> // Removed Genv6 condition              maushah 05/15/00  
> (line 737 of 755)
> #ifdef 0                        // maushah 05/15/00   
> 
> Ref: $CASE/bdelog2ks/maushah/genv11_0502/bde/src/bendptops.cc
> Log Report: $Log: bendptops.cc,v $
> // Revision 1.4.2.1  2000/05/17 22:32:11  maushah
> // Removed Genv6 code 
> Modifications made:
> (line 302 of 436)
> // Removed Genv6 condition                      maushah 05/15/00
> 
> Ref: $CASE/bdelog2ks/maushah/genv11_0502/bde/src/captionops.cc
> Log Report: $Log: captionops.cc,v $
> // Revision 1.2.2.3  2000/05/18 02:46:58  maushah
> // Removed GENv6 condition.
> // When selected_caption is set to the currentselection, the
> // currentselection was not checked for NULL pointers, if currentselection
> // = NULL, bde would freeze.
> // Simplified if-condition loops.
> Modifications made:
> (line 183 of 736)
> //                        unselect();                   maushah 2k0502 
> (line 211 of 736)
> if(currentselection != NULL && selected_caption != currentselection){
>                         selected_caption = currentselection;
> // maushah 2k0502 (added one condition in if-loop)
> // When selected_caption is set to the currentselection, the
> // currentselection was not checked for NULL pointers, if currentselection
> // = NULL, bde would freeze.
> (line 412 of 736)
>  //                      unselect();                  maushah 2k0502 
> (line 507 of 736)
> // Removed Genv6 condition                      maushah 05/15/00 
> (line 548 of 736)
> // Removed Genv6 condition                      maushah 05/15/00 
> (line 553 of 736)
> // Removed Genv6 condition                      maushah 05/15/00 
> (line 594 of 736)
> /****************** Start code caption_fit_to_text*********************
> // This method is designed to resize the caption so that it will fit
> // around the text snug.  It prevents the text from touching the border
> // of the caption.  It also, prevents too much white space between the
> // text and border of the caption.
> //
> // Maulik Shah (maushah) 05/02/00
> 
> void caption_fit_to_text( str_data *data, char *globalfontname )
> {
>     char shape[10];
>     hcg_key id;              
>   
>     id = (hcg_key)currentselection->getid();
>     pr_find(CG,CGid,id );
>     strcpy(CGcurr->captionname,data->str);
>     strcpy(CGcurr->txtfont,globalfontname);
>     getDimensions(CGcurr->captionname,CGcurr->txtfont,
>                   &CGcurr->txtwidth,&CGcurr->txtheight);
> 
>     strcpy( shape, currentselection->getshape() );    
> 
>     float center_x = currentselection->getcenterx();
>     float center_y = currentselection->getcentery();
>     float height = CGcurr->txtheight * 2;
>     float width = CGcurr->txtwidth + height;
> 
>     switch( shape[0] ) {
>       case 'C':  // Circle
>         break;
>       case 'R':  // Rectangle or RoundRect
>         CGcurr->txtoffsetx = CGcurr->txtwidth / 2 + 2;
>         CGcurr->txtoffsety = -CGcurr->txtheight / 2;
>         drawrectangular( center_x, center_y, width, height );
>         currentselection->setradius( width, height );
>         break;             
>       case 'E':  // Ellipse
>         break;
>       case 'I':  // Input
>         break;
>       case 'O':  // Output
>         break;
>       case 'F':  // File
>       case 'B':  // Buffer
>         CGcurr->txtoffsetx = CGcurr->txtwidth / 2 + 2;
>         CGcurr->txtoffsety = -CGcurr->txtheight / 2;
>         drawfile( center_x, center_y, width, height );
>         currentselection->setradius( width, height );
>         break;
>       }
> 
>     topobject->dorecalc((hcg_key)currentselection->getid());
> }
> 
> ********* End Code caption_fit_to_text*************************/
> (Code is commented out since the functionality isnt completely resolved.
> BDE crashes with sigseg11 and sigseg2 and aborts by saving. Hence I
> commented the code until the bug is fixed.)
> 
> Ref: $CASE/bdelog2ks/maushah/genv11_0502/bde/src/dialog.cc
> Log Report: $Log: dialog.cc,v $
> // Revision 1.5.2.2  2000/05/17 22:35:26  maushah
> // Mispelled word 'rectangle'..corrected while createRadiobutton()
> Modifications made:
> (line 621 of 1226)
>       rrect = createRadioButton(radio, "rectangle", "Rectangle",
>                                 doToggle, d_shape[0]);
> 
> Ref: $CASE/bdelog2ks/maushah/genv11_0502/bde/src/fileio.cc
> Log Report:  $Log: fileio.cc,v $
> // Revision 1.15.2.5  2000/05/17 22:36:48  maushah
> // Changed #if 0 to #ifdef 0  
> Modifications made:
> (line 777 of 2128)
> #ifdef 0                                // maushah 05/15/00      
> (line 1046 of 2128)
> #ifdef 0                                // maushah 05/15/00      
> (line 1071 of 2128)
> #ifdef 0                                // maushah 05/15/00      
> (line 1641 of 2128)
> #ifdef 0                                // maushah 05/15/00      
> (line 1672 of 2128)
> #ifdef 0                                // maushah 05/15/00      
> (line 1686 of 2128)
> #ifdef 0                                // maushah 05/15/00      
> (line 1691 of 2128)
> #ifdef 0                                // maushah 05/15/00      
> (Changed #if 0 to #ifdef 0 since the previous part got me into trouble
> with xmkmf -a (imake). After the change to #ifdef 0, xmkmf did not fail
> since xmkmf runs the makefiles in ~/bde2alpha_rv/ and make runs genv11 to
> make pr_util. Thus to maintain code consistency, I modified #if 0 to
> #ifdef 0.)
> 
> Ref: $CASE/bdelog2ks/maushah/genv11_0502/bde/src/hlink.cc
> Log Report:  $Log: hlink.cc,v $
> // Revision 1.7.2.2  2000/05/17 22:38:37  maushah
> // Removed Genv6 code
> Modifications made:
> (line 165 of 1564)
> // Removed Genv6 condition              maushah 05/15/00 
> (line 1293 of 1564)
> // Removed Genv6 condition              maushah 05/15/00 
> (line 1307 of 1564)
> // Removed Genv6 condition              maushah 05/15/00 
> (line 1388 of 1564)
> // Removed Genv6 condition              maushah 05/15/00 
> (line 1397 of 1564)
> // Removed Genv6 condition              maushah 05/15/00 
> (line 1410 of 1564)
> // Removed Genv6 condition              maushah 05/15/00 
> (Removal of unwanted GENv6 condition loops. I refracted the code by
> removal of GENv6 conditional loops, which were no longer in effect since
> we ran GENv11. )
> 
> Ref: $CASE/bdelog2ks/maushah/genv11_0502/bde/src/initClasses.cc
> Log Report: $Log: initClasses.cc,v $
> // Revision 1.3.2.2  2000/05/17 22:39:22  maushah
> // Changed #if 0 to #ifdef 0
> Modifications made:
> (line 170 of 254)
> #ifdef 0                                // maushah 05/15/00 
> (Changed #if 0 to #ifdef 0 since the previous part got me into trouble
> with xmkmf -a (imake). After the change to #ifdef 0, xmkmf did not fail
> since xmkmf runs the makefiles in ~/bde2alpha_rv/ and make runs genv11 to
> make pr_util. Thus to maintain code consistency, I modified #if 0 to
> #ifdef 0.)
> 
> Ref: $CASE/bdelog2ks/maushah/genv11_0502/bde/src/leftmenu_cb.cc
> Log Report: $Log: leftmenu_cb.cc,v $
> // Revision 1.6.2.3  2000/05/18 00:57:14  maushah
> // Changed the default button_set to 1 to represent RECTANGLE as the
> // default shape.button_set is the parameter which specifies what intial
> // button value is set
> Modifications made:
> (line 545 of 1065)
>  valuemenu = XmVaCreateSimpleOptionMenu(w, "valuemenu",
>                                 shape, 'S', 1,  .....)
> 
> In GENv10.2, the left menu bar on BDE showed the default node shape as
> Circle while the default node shape was Rectangle. That needed to change
> the default button set (a parameter which specifies what initial button
> value is set to) to 1 (default shape=Rectangle) from 0 (default
> shape=Circle).
> The fix is checked in.
> 
> Ref: $CASE/bdelog2ks/maushah/genv11_0502/bde/src/linkops.cc
> Log Report: $Log: linkops.cc,v $
> // Revision 1.4.2.1  2000/05/17 22:41:09  maushah
> // Removed Genv6 code
> Modifications made:
> (line 414 of 555)
> // Removed Genv6 condition                      maushah 05/15/00 
> (line 425 of 555)
> //                   unselect();              maushah 05/15/00 
> (line 435 of 555)
> // Removed Genv6 condition                      maushah 05/15/00  
> (line 467 of 555)
> // Removed Genv6 condition                      maushah 05/15/00  
> (Removal of unwanted GENv6 condition loops. I refracted the code by
> removal of GENv6 conditional loops, which were no longer in effect since
> we ran GENv11. )   
> 
> Ref: $CASE/bdelog2ks/maushah/genv11_0502/bde/src/nodeops.cc
> Log Report: $Log: nodeops.cc,v $
> // Revision 1.11.2.2  2000/05/17 22:42:17  maushah
> // Removed Genv6 condition
> Modifications made:
> (line 139 of 985)
> // Removed Genv6 condition               maushah 05/15/00
> (line 315 of 985)
> // Removed Genv6 condition               maushah 05/15/00
> (line 337 of 985)
> // Removed Genv6 condition               maushah 05/15/00
> (line 360 of 985)
> // Removed Genv6 condition               maushah 05/15/00
> (line 415 of 985)
> // Removed Genv6 condition               maushah 05/15/00
> (line 467 of 985)
> // Removed Genv6 condition               maushah 05/15/00
> (line 489 of 985)
> //                 unselect();           maushah 05/15/00
> (line 529 of 985)
> // Removed Genv6 condition                      maushah 05/15/00  
> (line 569 of 985)
> // Removed Genv6 condition                      maushah 05/15/00  
> (line 594 of 985)
> // Removed Genv6 condition                      maushah 05/15/00  
> (line 622 of 985)
> // Removed Genv6 condition                      maushah 05/15/00  
> (line 629 of 985)
> // Removed Genv6 condition                      maushah 05/15/00  
> (line 779 of 985)
> // Removed Genv6 condition                      maushah 05/15/00  
> (line 855 of 985)
> // Removed Genv6 condition                      maushah 05/15/00  
> (line 864 of 985)
> // Removed Genv6 condition                      maushah 05/15/00  
> (line 872 of 985)
> // Removed Genv6 condition                      maushah 05/15/00  
> (line 896 of 985)
> // Removed Genv6 condition                      maushah 05/15/00  
> (line 925 of 985)
> // Removed Genv6 condition                      maushah 05/15/00  
> (line 934 of 985)
> // Removed Genv6 condition                      maushah 05/15/00  
> (line 942 of 985)
> // Removed Genv6 condition                      maushah 05/15/00  
> (line 966 of 985)
> // Removed Genv6 condition                      maushah 05/15/00  
> (Removal of unwanted GENv6 condition loops. I refracted the code by
> removal of GENv6 conditional loops, which were no longer in effect since
> we ran GENv11. ) 
> 
> Ref: $CASE/bdelog2ks/maushah/genv11_0502/bde/src/select.cc
> Log Report: $Log: select.cc,v $
> // Revision 1.3.4.2  2000/05/17 22:42:58  maushah
> // Changed #if 0 to #ifdef 0
> Modifications made:
> (line 99 of 144)
> #ifdef 0                                // maushah 05/15/00 
> (Changed #if 0 to #ifdef 0 since the previous part got me into trouble
> with xmkmf -a (imake). After the change to #ifdef 0, xmkmf did not fail
> since xmkmf runs the makefiles in ~/bde2alpha_rv/ and make runs genv11 to
> make pr_util. Thus to maintain code consistency, I modified #if 0 to
> #ifdef 0.)
> 
> Ref: $CASE/bdelog2ks/maushah/genv11_0502/bde/src/text.cc
> Log Report: $Log: text.cc,v $
> // Revision 1.7.2.1  2000/05/17 22:43:40  maushah
> // Removed Genv6 condition
> Modifications made:
> (line 138 of 376)
> // Removed Genv6 condition              maushah 05/15/00
> (line 170 of 376)
> /*    extern int add_caption_name_flag; //maushah 05/02/00 */
> (line 172 of 376)
> // Removed Genv6 condition              maushah 05/15/00
> (line 184 of 376)
> /*        // maushah 05/17/00 Allow text to fit into caption
>         if( add_caption_name_flag ) {
>             trim(data->fontname);
>             load_font(data->fontname,xorGC);
>             XDrawString(XtDisplay(canvas),XtWindow(canvas),xorGC,
>                         data->cur_x,data->cur_y,
>                         data->cur_val,strlen(data->cur_val));
>             trim(globalfontname);
>             load_font(globalfontname,copyGC);
>             XDrawString(XtDisplay(canvas),XtWindow(canvas),copyGC,
>                         data->x,data->y,data->str,strlen(data->str));
>             caption_fit_to_text( data, globalfontname );
>         } else {
>             ReplaceSpacesInText(data->str,'_');
>             strcpy(new_string, data->str);
>             currentselection->addattr(data->x,data->y);
>         }
> maushah 05/02/00        */
> (line 243 of 376)
> // Removed Genv6 condition              maushah 05/15/00
> (Code is commented out since the caption_fit_to_text functionality isnt
> completely resolved. BDE crashes with sigseg11 and sigseg2 and aborts by
> saving. Hence I commented the code until the bug is fixed.)
> 
> Ref: $CASE/bdelog2ks/maushah/genv11_0502/bde/src/text.cc  
> Log Report: $Log: textops.cc,v $
> // Revision 1.7.2.2  2000/05/17 22:45:09  maushah
> // Removed Genv6 condition and changed #if 0 to #ifdef 0
> // Removed unnecessary if-loop condition check
> Modifications made:
> (line 182 of 1163)
> // Removed Genv6 condition                      maushah 05/15/00 
> (line 198 of 1163)
> int add_caption_name_flag = 1; // maushah 05/02/00
> (I forgot to comment this one out since it is also related to the
> caption_to_fit_text capability)
> (line 199 of 1163)
> // Removed Genv6 condition                      maushah 05/15/00
> (line 219 of 1163)
> // Removed Genv6 condition                      maushah 05/15/00
> (line 324 of 1163)
> // Removed Genv6 condition                      maushah 05/15/00
> (line 398 of 1163)
> // Removed Genv6 condition                      maushah 05/15/00
> (line 468 of 1163)
>  /*if(add_caption_name_flag ) {
>                                   tempx = currentselection->getcenterx() -
>                                         GXcurr->txtoffsetx;
>                                   textData.cur_x = (int)(tempx);
>                                   tempy = currentselection->getcentery() -
>                                         GXcurr->txtoffsety;
>                                   textData.cur_y = (int)(tempy);
>                                   strcpy((char *)textData.cur_val,(char
> *)HNcurr->nodename);
>                                   textData.fontname = CGcurr->txtfont;
>                                   XmTextSetString(
>                                      XmSelectionBoxGetChild( textDialog,
> XmDIALOG_TEXT),
>                                      CGcurr->nodename);
>                                   strcpy((char *)textData.str," ");
>                                 }
>                                 else
>                                   XmTextSetString(
>                                     XmSelectionBoxGetChild( textDialog,
> XmDIALOG_TEXT),
>                                     "");
> // maushah 05/02/00 trying to fit text within a caption.
>                                     */
> (Code is commented out since the caption_fit_to_text functionality isnt
> completely resolved. BDE crashes with sigseg11 and sigseg2 and aborts by
> saving. Hence I commented the code until the bug is fixed.)
> (line 549 of 1163)
> // Removed Genv6 condition                      maushah 05/15/00 
> (line 622 of 1163)
> // Removed Genv6 condition                      maushah 05/15/00 
> (line 683 of 1163)
> // Removed Genv6 condition                      maushah 05/15/00 
> (line 693 of 1163)
> //        unselect();                           maushah 05/15/00  
> (line 717 of 1163)
> #ifdef 0                                // maushah 05/15/00 
> (line 721 of 1163)
> // maushah 05/15/00-- Removed unnecessary if-loop condition check
> (Removal of unwanted GENv6 condition loops. I refracted the code by
> removal of GENv6 conditional loops, which were no longer in effect since
> we ran GENv11. )
> 
> Ref:$CASE/bdelog2ks/NEW_VERSION_bugs_ms.2k0413
> NEW_VERSION is used when BUILDING chgen; when chgen runs it controls
> whether CODE to check on View name (subschema tables)  and table version
> #s is GENERATED in pr_*.c. (These are not in CVS - only
> the Imakefile is.) 
> 
> pr_init precedes pr_load. pr-init parses a list of local *.dat files and
> scans these files to verify that the specified version numbers by the
> Views to be used did not contain overlapping pkeys;  pr_init also finds
> the largest pkey in use for each VERSION of each table in the View.
> pr_add assigns consecutive pkeys after that.
> 
> The version number part of this approach was abandoned because it is
> incompatible with future cvs version management of bde *.dat  files. But
> -DNEW_VERSION disabled View as well as  version checks.
> Right now, in bde, pr_init (or pr_load) only scans the single opened file
> and pkeys are only unique within that file. (Merging files with the same
> tables but concatenation is only possible after translating pkeys of one
> file  so they don't conflict with the other.)
> 
> The View part (selecting subgraphs of the ERD) is important to
> selectively filter relevant tables e.g. for input and output Views during
> schema converters like bde2htm, bde2sch, and bde2STD and
> ....For now, it is disabled in bde as not relevant during diagram editing.
> 
> I inspected gen_pr_add and found this comment re: NEW_VERSION that also
> bypasses the version test:
> --------
> 
> gen_pr-add.c line 19:
> 
> inserted NEWVERSION flag for 0  version problem -CEM 19/11/92-
> 
> gen_pr_add line 170:
> 
> #ifndef NEW_VERSION
> 
> fprintf(prload_fp, "\
> if (hcg_view_list.view_list[hcg_view_idx].version_list[hcg_tbl_idx] == '
> \\0')\n\
> return;\n\");
> #endif
> 
> My conclusion is that (barring any other context that reverses the effect
> of
> NEW_VERSION definition) we only need to add -DNEW_VERSION  to the
> chgen run command in pr_util/Imakefile to bypass this undesired test.
> (When genv11 runs, it also needs NEW_VERSION defined, as it is an
> application of pr_util from the metaschema. The Makefile to
> build gen11 already does this).
> 
> I did a cvs diff -r bde2alpha_rv first, then cvs update; (if I don't
> already have sticky bde/CVS/Tag = bde2alpha_rv then I need to cvs update
> -b bde2alpha_rv bde first. That will make the tag stick to my directory
> (confirm to check that bde/CVS/Tag = bde2alpha_rv). 
> Meanwhile, cvs co -r bde2alpha_rv  $BDEROOT works to checked out and
> build bde and add sticky tag bde2alpha_rv in your workspace.
> 
> *** TBD *** (Currently working)
> Note: I haven't yet added comments about caption_fit_to_text in my report
> yet, since the bug is just reported and not yet fixed. The effects would
> reflect code changes in three files:
> 
> $CASE/bdelog2ks/maushah/genv11_0502/bde/src/captionops.cc
> $CASE/bdelog2ks/maushah/genv11_0502/bde/src/textops.cc
> $CASE/bdelog2ks/maushah/genv11_0502/bde/src/text.cc
> 
> Nodes and Captions are not the same.
> Node text is in HN--->HA lines and Caption text is in CG--->GX lines.
> 
> Captions and Nodes ARE both resizable - from center outward, which is
> hard to control, because text does NOT stick to upper left corner but to
> center during resize.


