From lechner Thu Apr 4 00:19:25 1996 Subject: Re: your mail - I fixed gen_defines/encode declaration bug. To: rconnell@jupiter.cs.uml.edu (Robert M Connell) Date: Thu, 4 Apr 1996 00:19:24 -0500 (EST) RJLRef: $CASE/gen/ver_10{bugfix.2apr96 COngratulations on finding such a latent bug - there since genv8. ANd the routine that discoverd it is not even used any more (see my comment at DisplayGraph definition). Pr_add calls encode often. I wonder why we never noticed this and why bde seems to run well in pr_loading anyway! I made the change and remade chgenv10 for all platforms. ------------------------------------------------------------ > > Proposed By: 1996 Spring BDESYM Team > Date : April 2, 1996 > > Description of Problem : > ---------------------- > > The src/fileio.cc file will not compile with due to the fact that > the function prototype for the macro encode() is incorrect in the > pr_util/.h header file. Since this file is generated > by CHGEN simply fixing the .h is not appropriate. A change to CHGEN source > is required. > > Source Code Error : > ----------------- > > 94LC -DLCWC -DDEFAULT_LIB_PATH=\"/usr/proj3/case/96s523/rconnell/94sint/lib\" -g -I/usr/include -I.././include -I.././pr_util -I/u > sr/local/lib/g++-include fileio.cc > fileio.cc: In function `void DisplayGraph(struct _WidgetRec *, void *, struct XmSelectionBoxCallbackStruct *)': > fileio.cc:1192: passing `char *' as argument 1 of `encode(long unsigned int *, char *)' > fileio.cc: In function `void CreateHGDialogBox(char *)': > fileio.cc:1311: warning: implicit declaration of function `int meets_view(...)' > *** Error code 1 > > Stop. > *** Error code 1 > > > Differences in header and source : > -------------------------------- > > .h defines the encode() function prototype macro as : > encode(hcg_key *, char *) > > fileio.cc expects it to be in the following format : > encode(char *, hcg_key *) > > The actual function in pr_load.c is defined encode(char *, hcg_key *) > > Recommended Fix : > --------------- > > To fix this problem requires a 1 line code modification in the CHGEN source > code. The unit gen_defines.c is the module which generates the header file > would need the fix. >