cvs diff: Diffing . Index: Imakefile =================================================================== RCS file: /usr/proj3/case/95s523/95sbde/base/Master/bde/Imakefile,v retrieving revision 1.27 diff -r1.27 Imakefile 153d152 < #include "configure.h" 173a173,174 > * 3 ways to signal linux: > * #define linux, #define LinuxArchitecture, $HOSTTYPE==i386-linux. 180a182,185 > /* configure.h #defines LOG then #ifdeef LOG #defines GENlog,BELOG */ > > #include "configure.h" > 225c230 < /* INDEPENDENTLY: USE94LC #defines -DS94LC and USELCWC #defines -DLCWC : */ --- > /* INDEPENDENTLY - USE94LC #defines -DS94LC and USELCWC #defines -DLCWC */ 235,236c240,241 < /* #define BDELOG in #included configure;h: */ < /* RJL 020401: What about BDEREPLAY and BDEONEOF? */ --- > /* #define BDELOG in #included configure.h */ > /* RJL 020401 - What about BDEREPLAY and BDEONEOF? */ 239c244 < /* RJL 020402: GENDEFINES is passed to the CC command in pr_util */ --- > /* RJL 020402- GENDEFINES is passed to the CC command in pr_util */ 247a253 > 250a257 > 252,253c259 < BDEDEFINES = $(BDEUSERDEFINES) $(S94LCDEFINE) -DBDELOG \ < $(DCLCDEFINE) -DDEFAULT_LIB_PATH=\"$(BDE_LIB_PATH)\" --- > BDEDEFINES = $(BDEUSERDEFINES) $(S94LCDEFINE) -DBDELOG $(DCLCDEFINE) -DDEFAULT_LIB_PATH=\"$(BDE_LIB_PATH)\" 258,259c264 < BDEDEFINES = $(BDEUSERDEFINES) $(S94LCDEFINE) \ < $(DCLCDEFINE) -DDEFAULT_LIB_PATH=\"$(BDE_LIB_PATH)\" --- > BDEDEFINES = $(BDEUSERDEFINES) $(S94LCDEFINE) $(DCLCDEFINE) -DDEFAULT_LIB_PATH=\"$(BDE_LIB_PATH)\" 300,301c305,306 < /* Define a 4-way branch to the obj and bin directories: */ < #ifdef LOG --- > /* Define a 4-way branch to the obj and bin directories */ > #ifdef GENLOG 305c310 < #ifndef LOG --- > #ifndef GENLOG 314c319,320 < /* SUBDIRS not respected by linux make for PRDIR -RJL050810 */ --- > /* SUBDIRS not respected by either make for PRDIR -RJL050810 */ > 329,333c335,341 < < IMAKE_CMD = $(IMAKE) -DUseInstalled -Dnostdinc \ < -I/usr/lib/X11/config -I$(XmLIB) \ < $(IMAKE_DEFINES) < --- > #ifdef LOG > IMAKE_CMD = $(IMAKE) -DUseInstalled -Dnostdinc -DLOG -I/usr/lib/X11/config -I$(XmLIB) $(IMAKE_DEFINES) > /* export LOG - maybe sh needs this? */ > #else > IMAKE_CMD = $(IMAKE) -DUseInstalled -Dnostdinc -I/usr/lib/X11/config -I$(XmLIB) $(IMAKE_DEFINES) > #endif > /* -DDEFAULT_LIB_PATH is part of CPLUSPLUSFLAGS in PassCDebugFlags */ Index: configure.h =================================================================== RCS file: /usr/proj3/case/95s523/95sbde/base/Master/bde/configure.h,v retrieving revision 1.17 diff -r1.17 configure.h 185a186,188 > > /* without #def...LOG..., xmkmf on alpha ignores -DLOG */ > /* #define LOG 1 */ 195a199 > 198,199c202,204 < /* ../lib works for bde/src/Makefile but bde's Makefile expects ./lib < * else xmkmf -a aborts. (configure.h is #included in Imakefiles AND src code) --- > /* ../lib works in bde/* e.g. bde/src/Makefile or bde/test/, > * but bde's Makefile expects ./lib else xmkmf -a aborts. > * (configure.h is #included in Imakefiles AND src code) Index: linknolog.csh =================================================================== RCS file: /usr/proj3/case/95s523/95sbde/base/Master/bde/linknolog.csh,v retrieving revision 1.3 diff -r1.3 linknolog.csh 1c1 < #%/usr/bin/csh --- > #!/usr/bin/csh cvs diff: Diffing doc cvs diff: Diffing doc/idraw cvs diff: Diffing executables cvs diff: Diffing executables/alpha cvs diff: Diffing executables/dec cvs diff: Diffing executables/decstation cvs diff: Diffing executables/i386-linux cvs diff: Diffing executables/vax cvs diff: Diffing include Index: include/bde.h =================================================================== RCS file: /usr/proj3/case/95s523/95sbde/base/Master/bde/include/bde.h,v retrieving revision 1.4 diff -r1.4 bde.h 7a8,9 > * It also declares a global structure used to copy the bendpoint values, > * which is probably out of place here. - RJL050813 50a53,55 > // Add Local typedef because on both linux AND saturn > // make fails to see String defin. - RJL050813 > typedef char *String; 59c64,69 < //extern "C" { --- > // these brackets don't affect X11 @include String errors.050814-RJL > // Making them conditional, as in /usr/include/X11 - RJL050813 > #ifdef __cplusplus > extern "C" { > #endif > 84c94,96 < //}; --- > #ifdef __cplusplus > } > #endif Index: include/prototype.h =================================================================== RCS file: /usr/proj3/case/95s523/95sbde/base/Master/bde/include/prototype.h,v retrieving revision 1.7 diff -r1.7 prototype.h 131a132,133 > typedef char* String; // Added to bde.h - so imake sees String type.-RJL050715 > Index: include/std.h =================================================================== RCS file: /usr/proj3/case/95s523/95sbde/base/Master/bde/include/std.h,v retrieving revision 1.2 diff -r1.2 std.h 33a34,37 > /* but it's there now: - RJL050812 - fix typo 050814 1300: insert '_' below: > mercury.cs.uml.edu(240)> lg /usr/include/_*_/stddef.h > -rw-r--r-- 1 root root 227 Jan 20 2000 /usr/include/linux/stddef.h > */ cvs diff: Diffing lib cvs diff: Diffing mpr_util cvs diff: Diffing pr_util Index: pr_util/Imakefile =================================================================== RCS file: /usr/proj3/case/95s523/95sbde/base/Master/bde/pr_util/Imakefile,v retrieving revision 1.16 diff -r1.16 Imakefile 6,9d5 < * Revision 1.15 2005/07/24 01:49:00 lechner < * This checks in pr_*.c and 94*.h files generated by chgen13 on 050723. < * Only a few isolated warnings remain. Circa 900 lines of pr_load.c < * were removed, and lut.c from chgen/src was used insted in pr_load.c. 11,127c7,9 < * Revision 1.14 2005/07/22 01:07:11 lechner < * Made $CASE/gen/ver_13/chgen/executables/chgen the default generator. < * Added lut.c and lut.o to GENSRCS and GENOBJS (#includes "lut.h") < * < * Revision 1.13 2005/06/08 01:30:37 lechner < * Checkin of pr_util/Imakefile with chgen run disabled. < * < * Revision 1.12 2005/05/29 02:40:32 lechner < * Updated CHGEN to < * $(CASE)/04f522/lechner/genv13SBLMMM_Final/chgen/executables/$(HOSTTYPE)/chgen13 < * < * Revision 1.11 2005/05/18 02:38:14 lechner < * #defined GENV13 and pointed to the new genv13 project version of chgen: < * $CASE/04f522/sboddire/ProjectNoTag/chgen/executables/chgen < * < * Revision 1.10 2005/05/02 03:31:40 lechner < * Resolved merge conflictts in favor of bde2alpha_rv branch. < * < * < * Revision 1.4.2.21 2005/02/25 00:34:11 lechner < * < * cvs diff pr_util 050223: No changes except hasType macro in 94sbde_schema.h < * < * Revision 1.4.2.20 2004/11/29 20:10:19 lechner < * Added $Log line to insert cvs rev comments in pr_*.c and *schema.h. < * < * Revision 1.4.2.19 2004/04/06 02:29:31 lechner < * Added comments only. < * < * Revision 1.4.2.18 2004/04/03 05:22:47 lechner < * Added a comment: < * Caution: accidentally updating schema.sch will clobber pr_*.c < * < * Revision 1.4.2.17 2003/10/21 01:34:57 lechner < * Added dprint.c/.o to this Imakefile - RJL 031020 < * < * Revision 1.4.2.16 2002/09/29 06:44:27 lechner < * Removed BDEONEOF and BDEREPLAY flags; using only BDELOG now. < * < * Revision 1.4.2.15 2002/04/11 04:04:13 lechner < * Fixed a punctuation on -log \ line of a macro body. < * < * Revision 1.4.2.14 2002/04/06 07:59:38 lechner < * Fixed bug in makedepend; no longer assume DELOG and BDEREPLAY are mutex; < * Prior version caused many symbols to vanish - pr*.c were not compiled. < * < * Revision 1.4.2.13 2002/04/01 21:19:43 lechner < * Replaced BDELOG by GENLOG, BDEBOTH by BDEONEOF < * < * Revision 1.4.2.12 2002/03/12 00:51:31 lechner < * Upgraded Imakefile to GENV12; pr_logging conditional on BDELOG. < * < * Revision 1.4.2.11 2001/12/09 06:53:47 lechner < * Fixed pr_util.a macro-arg-passing and line break in macro definition < * < * Revision 1.4.2.10 2001/12/04 06:21:58 lechner < * No changes < * < * Revision 1.4.2.9 2001/12/04 03:17:05 lechner < * Protected GENSRCS from clean: delete action. < * 'touch schema/94sbde_schema.sch' will re-run chgen < * < * Revision 1.4.2.8 2001/12/03 23:45:46 lechner < * Fixed nested comment bug in line 4 of Imakefile < * < * Revision 1.4.2.7 2000/09/26 02:17:03 lechner < * Third try at removing ALL the imbedded /_* or *_/ brackets :-( < * It took hours to find this new imbedded commment error - RJL 011203.1830 < * < * Revision 1.4.2.6 2000/09/26 02:10:20 lechner < * I removed the SAME error from my previous Revision Comment :-) < * < * Revision 1.4.2.5 2000/09/26 02:03:22 lechner < * I removed this imbedded-comment error from Imakefile: < * 65:/_* -ansi sets cli_ansi in chgen.c to select # not /_*_*_/ < * and #fld not "fld"*_/ < * < * Revision 1.4.2.4 2000/09/23 01:15:09 lechner < * Option -Wall added, option to use pre-genlog versions removed - RJL 2k0922 < * < * Revision 1.4.2.3 2000/04/20 15:17:18 ntansala < * insert pr_startlog and pr_stoplog function in fileio.cc and < * replace "Using Gen v10.2" by "Using Gen v11" in bde.cc < * < * Revision 1.4.2.2 2000/04/06 07:10:21 lechner < * I checked in 7 updated files and added tag bde2alpha_rjl < * Files include 3 Imakefiles, bde/{configure.h,aareadme,src/fileio.cc, < * executables/bde} < * < * Revision 1.4.2.1 1999/05/19 22:19:36 vdhamoda < * bde2alpha_rv_final < * < * Revision 1.4 1996/08/17 05:41:41 mboisver < * Here are changes made by prior classes that were never checked in. Without < * these changes, the bde does not function properly. All of these changes were < * taken from /usr/proj3/case/95s523/95sbde/bde/src < * < *Revision 1.3 1995/05/22 20:27:54 rdias < *Added debug options for the pr_utilities. < * < *Revision 1.2 1995/01/16 23:08:51 lechner < *Fixed # syntax error after cvs admin -c\ \_* Imakefile in this subdiry today. < * < * Revision 1.1.1.1 1995/01/04 06:03:59 lechner < * Imported 94fbde tree to 95sbde < * < * Revision 1.4 1994/04/12 17:04:35 jrichard < * fixed make depend warning by executing chgen upon make depend < * < * Revision 1.3 1994/04/12 03:20:23 jrichard < * changed make clean so it cleaned up the *.c and *.h files chgen < * generates < * < * Revision 1.2 1994/04/07 21:36:23 jrichard < * version of Imakefile with support for GENV8 and many bugs fixed < * < ******************************************************************* --- > *******************************************************************/ > /* New pr_util_[no]log Imakefile for separate $HOSTYPE subtrees.-RJL050805 */ > /* 147,157d28 < #ifdef GENV10 < CHGEN = /usr/proj3/case/97f522/bde2java/hhuang/chgen/executables/${HOSTTYPE}/chgen10.2 < #endif < < #ifdef GENV11 < CHGEN = /usr/proj3/case/99s523/genmerge/chgenv11/chgen/executables/chgen < #endif < < #ifdef GENV12 < CHGEN = /usr/proj3/case/gen/ver_12/sjaganat/executables/${HOSTTYPE}/chgen12 < #endif 160a32,33 > #endif > /* prior executables: 164c37,40 < #endif --- > */ > > /* WHY THE '.'? RJL050805*/ > .SCHEMASRCS = /schema/94sbde_schema.sch 166c42,46 < SCHEMASRCS = ../schema/94sbde_schema.sch --- > #ifdef BDELOG > SCHEMA_INCLUDE = $(TOP)/pr_util_log > #else > SCHEMA_INCLUDE = $(TOP)/pr_util_nolog > #endif 168d47 < SCHEMA_INCLUDE = $(TOP)/pr_util 175,180d53 < /* I added #ifdef GENV10 so pr_log is conditionally included - RJL */ < /* this is risky - an explicit LOG flag should be used, not GEN version */ < /* e.g. #ifdef BDELOG, include pr_log.* */ < /* On bde2alpha_rv branch, ignore prior versions, use genv11 now- RJL 2k0922 */ < /* New: conditionally include pr_log.* files below - usleep invalid - RJL */ < /* Now all depends on GENLOG only - RJL 020923 */ 187,188d59 < /* WARNING: dprint.h updates do not cause dprint.c recompilation!??-RJL041129 */ < 191a63,66 > /* Bug fix 050806.2007: had been using OBJDIR (for src) not PROBJDIR: */ > > PROBJDIR = ./$(HOSTTYPE)/probj > 207,215c82,90 < pr_load.o \ < pr_free.o \ < pr_dump.o \ < pr_delete.o \ < pr_log.o \ < pr_stats.o \ < pr_accessors.o \ < lut.o \ < dprint.o --- > $(PROBJDIR)/pr_load.o \ > $(PROBJDIR)/pr_free.o \ > $(PROBJDIR)/pr_dump.o \ > $(PROBJDIR)/pr_delete.o \ > $(PROBJDIR)/pr_log.o \ > $(PROBJDIR)/pr_stats.o \ > $(PROBJDIR)/pr_accessors.o \ > $(PROBJDIR)/lut.o \ > $(PROBJDIR)/dprint.o 230,237c105,112 < pr_load.o \ < pr_free.o \ < pr_dump.o \ < pr_delete.o \ < pr_stats.o \ < pr_accessors.o \ < lut.o \ < dprint.o --- > $(PROBJDIR)/pr_load.o \ > $(PROBJDIR)/pr_free.o \ > $(PROBJDIR)/pr_dump.o \ > $(PROBJDIR)/pr_delete.o \ > $(PROBJDIR)/pr_stats.o \ > $(PROBJDIR)/pr_accessors.o \ > $(PROBJDIR)/lut.o \ > $(PROBJDIR)/ dprint.o 239a115,118 > > /* was in GenerateLib...:$(GENSRCS): schemafile */ > /* $(CHGEN) $(GENFLAGS) schemafile */ > 241,243d119 < /*$(GENSRCS): schemafile */ @@\ < /* $(CHGEN) $(GENFLAGS) schemafile */ @@\ < @@\ 256a133 > 258c135,136 < GenerateLibFromSchema($(SCHEMASRCS),pr_util.a) --- > > GenerateLibFromSchema($(SCHEMASRCS),$(PROBJDIR)/pr_util.a) Index: pr_util/pr_load.c =================================================================== RCS file: /usr/proj3/case/95s523/95sbde/base/Master/bde/pr_util/pr_load.c,v retrieving revision 1.8 diff -r1.8 pr_load.c 44d43 < extern int lut_init(lut_st *, lut_type); 60,61c59,60 < extern void strncpy_null (char * , char * , int); < extern void logstr(char*); --- > extern void strncpy_null (char * , char * , int); > extern void logstr(char*); 65a65 > 67d66 < /* define vars in pr_log.c (not compiled) but referenced in pr_util.*/ 70a70,71 > extern char* logfile; /* in pr_log.c */ > 74a76,77 > /* moved here from schema.h - no other user in bde/{src pr_util} */ > /* this was inside #ifndef SCHEMA_LOADED...#endif there */ 147,148c150,151 < /* If successful, the global hcg_tbl_idx is set to its idx>=0, and 1 is */ < /* returned. Otherwise, the hcg_tbl_idx is set to -1, and 0 is returned. */ --- > /* If successful, the global hcg_tbl_idx is set to its idx, and 1 is */ > /* returned. Otherwise, the hcg_tbl_idx is set to 0, and 0 is returned. */ 151c154 < /* Not-found case set hcg_tbl_idx to -1 (was 0 - RJL 040521) */ --- > /* Not-found case set hcg_tbl_idx to 0 (changed to -1 - RJL 040521) */ 154c157 < /* ALWAYS check return value: hcg_tbl_idx=0 is legal and mis-leads on fail. RJL040611 */ --- > /* ALWAYS check return value - hcg_tbl_idx=0 is real and mis-leads on fail. RJL040611 */ 156,159c159,161 < { < char tmpabb[HCG_ABBR_SIZE+1]; /* strncpy fills target with '\0's */ < strncpy(tmpabb, hcg_table_seq_list[hcg_tbl_idx].ttabbrev, HCG_ABBR_SIZE); < if (strncmp(pkey,tmpabb,HCG_ABBR_SIZE) == 0) --- > { char tmpabb[HCG_ABBR_SIZE+1]; > strncpy(tmpabb, hcg_table_seq_list[hcg_tbl_idx].ttabbrev, HCG_ABBR_SIZE); > if (strncmp(pkey,tmpabb,HCG_ABBR_SIZE) == 0) 161,165c163,167 < /* else search: */ < for (hcg_tbl_idx=0; hcg_tbl_idx < HCG_NUM_TABLES; hcg_tbl_idx++) < { /* strncpy restored inside loop - RJL 040522 */ < strncpy(tmpabb, hcg_table_seq_list[hcg_tbl_idx].ttabbrev,HCG_ABBR_SIZE); < if (strncmp(pkey, tmpabb, HCG_ABBR_SIZE) == 0) --- > /* else search: */ > for (hcg_tbl_idx=0; hcg_tbl_idx < HCG_NUM_TABLES; hcg_tbl_idx++) > { /* strncpy restored inside loop - RJL 040522 */ > strncpy(tmpabb, hcg_table_seq_list[hcg_tbl_idx].ttabbrev,HCG_ABBR_SIZE); > if (strncmp(pkey, tmpabb, HCG_ABBR_SIZE) == 0) 167,169c169,171 < } < hcg_tbl_idx = -1; /* was HCG_NUM_TABLES on loop exit - RJL 040614 */ < return(0); --- > } > hcg_tbl_idx = -1; /* was HCG_NUM_TABLES on loop exit - RJL 040614 */ > return(0); 629c631 < } /* end decode() */ --- > } 633d634 < * What if k1 or k2 is NULL? 637d637 < assert((k1!= NULL) & (k2!= NULL));/*RJL050728*/ 724c724 < nkey = null_key_p; /* 0x0 */ --- > nkey = null_key_p; 737,739d736 < /* end of gen_pr_utils output to pr_load.c */ < /* +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/ < void printviewlist(void); // added to check versionlist at pr_load.c:1433-050801 740a738 > /* end of gen_pr_utils output to pr_load.c */ 742,743c740 < < /********************** pr_init(): 740-1030 ***************************************/ --- > /******************************************************************************/ 768d764 < 770a767,781 > /* Genlog - 5/7/96: log call to pr_init */ > char log_text[BUFSIZE]; > FILE *logdata_fp; > EP; > if (hcg_log) > { > printf("Warning: pr_init() called during log session"); > printf("may cause unexpected results.\n"); > } > logwait(); > sprintf(log_text, "IN %s %s\n", viewdef_filename, filelist); > logstr(log_text); > > /* End Genlog addition */ > 787c798,844 < /* See Notes on concurrent log and replay for DBDE, moved to end - RJL050731*/ --- > /* Added by Genlog 5/7/96 */ > /* For the capture of datafile [logging info?] if NOT in replay session */ > /* THE INTENT OF THIS IS UNCLEAR TO ME - RJL 031019 */ > /* if (hcg_log != 2) { */ /* why not if(hcg_log == 1) (logging has been activated)?*/ > if (hcg_log == 1) { /* try to open a file for LATER replay - RJL 040425 */ > if ((logdata_fp = fopen("logdata.txt", "w")) == NULL) { > printf("pr_init(): can not open logdata.txt to WRITE the log data\n"); > exit(2); /* is it safe for pr_init to preserve hcg_log = 1? */ > > } > } > /* End Genlog Addition*/ > > /* RJL 040425: Notes on concurrent log and replay for DBDE: > * For concurrent log and replay, do we need hcg_log? > * Pre-condition: > * pr_load must do pr_init's pkey-range-updates while replaying a file > * with "SR" + checkpoint file table rows or equivalent "LD" command; > * replay is complicated because discovering "SR" in infile.dat implies > * pr_init and pr_load of infileDB1.dat, then replaying log_data.txt. > > * Replay is simplified if infile.dat replaces log_data.txt > * and pr_loading infileDB1.dat is replaced by inline checkpoint tables > * or an equivalent "LD" replay command. > * Replay then means load checkpoint table rows followed by changelog commands > * without handling multiple files (unless the "LD" command refers to a file). > * The initial "SR" command is superfluous but can be retained for now. > > * Bde will redraw the canvas whenever updates to the memory-resident > * tables affect the selected and displayed HG. It does this now by calling > * clear/updatedisplaylist/ReDraw (but not pr_free). > * The bde clients also log updates (but ONLY locally originated ones - > * NOT those from remote client updates in the file or stream being replayed). > > * Bde local editing must be interrupted by X11 to sample the replay file or stream. > * X11 supports user-defined callbacks XtAppAddInput and XtAppAddWorkProc for this. > * X11 calls these only when the local Xevent buffer is empty. > * DBDE clients may need to slow down so narrow-band links can keep up with > * the server-merged broadcast stream of remotely-originated changes. > > * For the 02f522 Hominid replay project, the 's' Keypress callback was used. > * But in 02s > * http://www.cs.uml.edu/~lechner/02s592/pkingsto > * Paul Kingston wrote and tested XtAppAddInput and XtAppAddWorkProc (without linking > * them into bde). His work should be re-used in 04s522/dbde. > * RJL 040425 > */ 796c853 < { --- > { 799c856 < { --- > { 802,803c859,860 < } < infile_is_open = 1; --- > } > infile_is_open = 1; 809a867 > 811,812c869 < /* READ ALL LINES FROM EACH FILE: copy to local filename */ < hcg_read_next(); /* fills hcg_buffer */ --- > /* Added by Genlog 5/7/96 to log pr_init */ 814,815c871,879 < while ( !feof(hcg_ascii_fp) )/* if hcg_log == 1, append infile data rows to logdata.txt */ < /* and check pkey validity and range */ --- > if (hcg_log == 1) { > FILE * localptr; /* added 040602 -RJL */ > /*logging is on: add Keyword+filename to logdata_fp*/ > fprintf(logdata_fp, "LogDataFile %s\n", localptr); > } > /* End Genlog Addition */ > /* READ ALL LINES FROM EACH FILE: copy to local filename */ > hcg_read_next(); /* fills hcg_buffer */ > while ( !feof(hcg_ascii_fp) ) 817,823c881,893 < //DP;dprints("hcg_buffer: %s\n", hcg_buffer); < idx = 0; < hcg_parse(hcg_buffer,hcg_t,&idx); < if (!find_tbl_idx(hcg_t)) /* caches and may alter hcg_tbl_idx - RJL 040622 */ < { < strncpy_null(error_table, hcg_t, HCG_ABBR_SIZE); < printf("pr_init Warning: unknown table %s found in scanned datafile %s, ignored.\n", --- > /* if hcg_log == 1, append infile data rows to logdata.txt */ > /* and check pkey validity and range */ > /* Genlog 5/7/96: log table rows [to be] copied to logdata_fp file */ > if (hcg_log == 1) /* was != 2 (not in replay) - RJL 040622 */ > fprintf(logdata_fp, "%s\n",hcg_buffer); > /* End Genlog Addition */ > //DP;dprints("hcg_buffer: %s\n", hcg_buffer); > idx = 0; > hcg_parse(hcg_buffer,hcg_t,&idx); > if (!find_tbl_idx(hcg_t)) /* caches+may alter hcg_tbl_idx - RJL040622*/ > { > strncpy_null(error_table, hcg_t, HCG_ABBR_SIZE); > printf("pr_init Warning: unknown table %s found in scanned datafile %s, ignored.\n", 825,830c895,900 < hcg_read_next(); < continue; < } < if(strlen(hcg_t) != HCG_KEY_SIZE) < { < printf("pr_init Warning: invalid keysize %d for key %s, must be %d, ignored.\n", --- > hcg_read_next(); > continue; > } > if(strlen(hcg_t) != HCG_KEY_SIZE) > { > printf("pr_init Warning: invalid keysize %d for key %s, must be %d, ignored.\n", 832,834c902,904 < hcg_read_next(); < continue; < } --- > hcg_read_next(); > continue; > } 836,837c906,907 < ver_chars = (HCG_KEY_SIZE == 8)? 2 :3; /*size of version number subfield of pkey */ < --- > ver_chars = (HCG_KEY_SIZE == 8)? 2 :3; > /*size of version number subfield of pkey */ 839,843c909,913 < strncpy_null(temp_verstring, (char *)&hcg_t[HCG_ABBR_SIZE], ver_chars); < vernbr = atoi(temp_verstring); < if (vernbr > MAXVERSIONS || vernbr < 0) < { < printf("Warning: invalid version %d for key %s, exiting.\n", --- > strncpy_null(temp_verstring, (char *)&hcg_t[HCG_ABBR_SIZE], ver_chars); > vernbr = atoi(temp_verstring); > if (vernbr > MAXVERSIONS || vernbr < 0) > { > printf("Warning: invalid version %d for key %s, exiting.\n", 845,856c915,926 < exit(0); /* exit closes (hcg_ascii_fp)? */ < } < if(encode(hcg_t, &hcg_k) != 1) /* alters hcg_key hcg_k */ < { < printf("Warning: Invalid key %s, ignored.\n", hcg_t); < hcg_read_next(); < continue; < } < hcg_row = get_row(&hcg_k); < hcg_version = get_version(&hcg_k); < dprintdd("hcg_row = %d, hcg_version = %d in ", < hcg_row, hcg_version);DP; /* newline in DP */ --- > exit(0); /* exit closes (hcg_ascii_fp)? */ > } > if(encode(hcg_t, &hcg_k) != 1) /* alters hcg_key hcg_k */ > { > printf("Warning: Invalid key %s, ignored.\n", hcg_t); > hcg_read_next(); > continue; > } > hcg_row = get_row(&hcg_k); > hcg_version = get_version(&hcg_k); > dprintdd("hcg_row = %d, hcg_version = %d in ", > hcg_row, hcg_version);DP; /* newline in DP */ 859c929 < /* This reported 1-char pkeys only during load of table FO - RJL 040616 */ --- > /* This reported 1-char pkeys during load of table FO - RJL 040616 */ 861c931 < hcg_ts_list[hcg_tbl_idx].ts_list[hcg_version].maxrow = hcg_row; --- > hcg_ts_list[hcg_tbl_idx].ts_list[hcg_version].maxrow = hcg_row; 865c935 < hcg_table_seq_list[hcg_tbl_idx].maxver = hcg_version; --- > hcg_table_seq_list[hcg_tbl_idx].maxver = hcg_version; 868,869c938,939 < hcg_read_next(); < } /* while (!feof(hcg_ascii_fp))*/ --- > hcg_read_next(); > } /* end while (!feof(hcg_ascii_fp))*/ 871c941 < if (infile_is_open){ --- > if (infile_is_open){ 874,876c944,974 < } < hcg_parse(filelist,scan_filename,&fnidx);/* get next infile name */ < } /* while scan_filename */ --- > } > hcg_parse(filelist,scan_filename,&fnidx);/* get next infile name */ > } /* while scan_filename */ > if (hcg_log == 1) /* added 040622 - RJL */ > fclose(logdata_fp); /* done copying infiles */ > > /* Added by Genlog 5/7/96 to log pr_init */ > /* if (hcg_log != 2) why? =RK:04042 only 5-crashed bde below-RJL 040530 */ > /* if (hcg_log == 1) */ > /* This crashed bde 040530:1150 - RJL: */ > /* End Genlog Addition */ > /* filelist is effectively consumed by now. */ > > /*===================read viewdefs===============================*/ > /* shouldn't this have been done earlier ? - RJL 040622 */ > /* (maybe not if scan filelist gets pkey ranges BEFORE pr_load is called?) */ > /* Open viewdef_filename to load view defs : > * filename = *.viewdefs; > * file format: > * These should be 2 meta-schema table types ([DV]---<[VE]) - RJL 040615 > * define_view 94sbdedefaultsView read > * view_element 94sbdedefaultsView GD 0 > * ... > * define_view 94sbdeview update (All highest versions for update) > * view_element 94sbdeview HG 0 > * ... > * NOTE: viewnames MUST be declared before their resp[ective view_elements. > * BUT: view_elements need NOT be placed directly under their define_View parent. > * E.g., ALL viewnames may be declared before ANY view elements > * (due to the redundant viewname prefix to each view_elelement line).- RJL 040622 > */ 881c979 < printf("can not open %s to find view definitions\n", viewdef_filename); --- > printf("can not open %s to find view definitions\n", viewdef_filename); 998,1000c1096,1098 < /* update hcg_view+_list.view_list[hcg_view_idx].version_list[hcg_tbl_idx]: */ < if (hcg_version > 0) /* absolute version no. */ < hcg_view_list.view_list[hcg_view_idx].version_list[hcg_tbl_idx] = --- > /* update hcg_view+_list.view_list[hcg_view_idx].version_list[hcg_tbl_idx]: */ > if (hcg_version > 0) /* absolute version no. */ > hcg_view_list.view_list[hcg_view_idx].version_list[hcg_tbl_idx] = 1002,1003c1100,1101 < else /* maxver + negative version offset */ < hcg_view_list.view_list[hcg_view_idx].version_list[hcg_tbl_idx] = --- > else /* maxver + negative version offset */ > hcg_view_list.view_list[hcg_view_idx].version_list[hcg_tbl_idx] = 1005,1007c1103,1105 < hcg_read_next(); /* added 040622 - RJL */ < continue; /* added 040622 - RJL */ < } /* end if view_element */ --- > hcg_read_next(); /* added 040622 - RJL */ > continue; /* added 040622 - RJL */ > } /* end if view_element */ 1030,1032c1128,1130 < hcg_initialized = 1;/* prevent redo; enable dump to bde_abort.dat */ < DP; printviewlist(); // to debug version_list on FILE/New < }/* end pr_init (740:1030)*/ --- > hcg_initialized = 1;/* prevent redo of pr_init; enable dump to bde_abort.dat */ > /*DP;*/ > }/* end pr_init (1592:1922)*/ 1064c1162 < /* specified table row type. It also flushes the block to binary 0 (zero), so */ --- > /* specified table type. It also flushes the block to binary 0 (zero), so */ 1075c1173 < /* linked into the table's row chain at the alphabetically correct location, */ --- > /* linked into the tables row chain at the alphabetically correct location, */ 1077,1079c1175,1176 < /* Calls dup_row_warning if elt is already in table. */ < /* Assumes and maintains tbl rows in ascending pkey order */ < /* Post-condition: tbl##curr is set to tbl##elt = new element address. */ --- > /* Calls dup_row_warning if elt is already in table. */ > /* Assumes and maintains tbl rows in ascending pkey order */ 1082c1179 < if (tbl == NULL) /* first row of new table */\ --- > if (tbl == NULL) \ 1086d1182 < /* next = current or NULL? */\ 1090c1186 < { /* append new row */\ --- > { \ 1096c1192 < { /* insert prior */\ --- > { \ 1185,1187c1281 < for (pa##curr2 = pa; \ < (pa##curr2 != NULL) && (key_compare(&pa##curr2->pk,&ca##curr->cf) < 0);\ < pa##curr2 = pa##curr2->next_ptr); \ --- > for (pa##curr2 = pa; (pa##curr2 != NULL) && (key_compare(&pa##curr2->pk,&ca##curr->cf) < 0); pa##curr2 = pa##curr2->next_ptr); \ 1332c1426 < next_row_no = (hcg_ts_list[tt##idx].ts_list[version_no].maxrow+1);\ --- > next_row_no = (hcg_ts_list[tt##idx].ts_list[(int)hcg_view_list.view_list[hcg_view_idx].version_list[tt##idx]].maxrow+1);\ 1378a1473,1620 > > /*************************************************************************/ > /* Function : log_pr_add */ > /* */ > /* Abstract : This function is used to log a pr_add transaction */ > /* The tbl indicates which table is having a row added. */ > /* tbl_ptr points to the record to be added. */ > /**************************************************************************/ > /* TBD: Define a macro for all these cases. No need for repetitious code */ > /* Pre-condition: hcg_log == 1 */ > /* Pre-condition: exists FILE* hcg_logfileptr open for output */ > /* Pre-cond failed 040712: pr_startlog was not called to open it */ > > //New state model for logging/replay - RJL 040712; (not tested for state 3 yet) > // See preamble to pr_load.c; do log_pr_add iff (hcg_log) > > void log_pr_add (char *tbl, char *viewname, hcg_ptr tbl_ptr) > { > FILE* hcg_logfileptr; // pre-cond: already open (by startllog?)- RJL 040708 > char outkey[3][HCG_KEY_SIZE+1]; // updated by decode(outkey[j], anykeyfield) > int idx; > EP; > /* pre-condition: logging is turned on by startlog(); */ > //assert(hcg_log); /* failed 040713.0130 - RJL 040713 */ > if (!hcg_log) { > dprint("WARNING: log_pr_add call with hcg_log = 0, ignored.\n"); > return; > } > > assert(find_tbl_idx(tbl)); /* alters tbl##curr; exit if NULL */ > if (hcg_log){ > > idx = hcg_tbl_idx; > > /* Write to hcg_logfile based on idx */ > /* TBD: make this a switch on idx = enumerated ttabbrev symbols */ > if (idx==0) > { > FOcurr=(struct FO *) tbl_ptr; > hcg_update_version(&FOcurr->FOid,FO_idx,0); > decode(outkey[0], &FOcurr->FOid); > PrintCheck(fprintf(hcg_logfileptr, > " %-8s %-50s %-50s %-2s %-15s\n", > outkey[0], FOcurr->xfont, FOcurr->psfontname, > FOcurr->psfontsize, FOcurr->bdefont)); > } > if (idx==1) > { > GDcurr=(struct GD *) tbl_ptr; > hcg_update_version(&GDcurr->GDid,GD_idx,0); > decode(outkey[0], &GDcurr->GDid); > PrintCheck(fprintf(hcg_logfileptr, > " %-8s %-10s %8.4f %8.4f %-4s %-25s %-10s %-10s %8.4f %8.4f\n", > outkey[0], GDcurr->shape, GDcurr->width, GDcurr->height, > GDcurr->hsegpattern, GDcurr->txtfont, GDcurr->location, > GDcurr->justify, GDcurr->gcwidth, GDcurr->gcheight)); > } > if (idx==2) > { > HGcurr=(struct HG *) tbl_ptr; > hcg_update_version(&HGcurr->HGid,HG_idx,0); > decode(outkey[0], &HGcurr->HGid); > PrintCheck(fprintf(hcg_logfileptr, " %-8s %-8s %-8s %-12s %-12s %-12s %-60s\n" > , outkey[0], HGcurr->FSid, HGcurr->HNid, HGcurr->HGauthor, HGcurr->HGcreated, HGcurr->HGlastmod > , HGcurr->HGtitle)); > } > if (idx==3) > { > HNcurr=(struct HN *) tbl_ptr; > hcg_update_version(&HNcurr->HNid,HN_idx,0); > decode(outkey[0], &HNcurr->HNid); > hcg_update_version(&HNcurr->HGid,HG_idx,0); > decode(outkey[1], &HNcurr->HGid); > PrintCheck(fprintf(hcg_logfileptr, " %-8s %-8s %-8s %-1s %8.4f %8.4f %8.4f %8.4f %-25s %8.4f %8.4f %8d %8d %-20s\n" > , outkey[0], outkey[1], HNcurr->FSid, HNcurr->shape, HNcurr->centerx, HNcurr->centery > , HNcurr->width, HNcurr->height, HNcurr->txtfont, HNcurr->txtoffsetx, HNcurr->txtoffsety, HNcurr->txtwidth > , HNcurr->txtheight, HNcurr->nodename)); > } > if (idx==4) > { > HAcurr=(struct HA *) tbl_ptr; > hcg_update_version(&HAcurr->HAid,HA_idx,0); > decode(outkey[0], &HAcurr->HAid); > hcg_update_version(&HAcurr->HNid,HN_idx,0); > decode(outkey[1], &HAcurr->HNid); > PrintCheck(fprintf(hcg_logfileptr, " %-8s %-8s %-8s %8.4f %8.4f %8.4f %8d %8d %-25s %-60s\n" > , outkey[0], outkey[1], HAcurr->DAid, HAcurr->txtoffsetx, HAcurr->txtoffsety, HAcurr->HAorigin > , HAcurr->txtwidth, HAcurr->txtheight, HAcurr->txtfont, HAcurr->hlabel)); > } > if (idx==5) > { > HLcurr=(struct HL *) tbl_ptr; > hcg_update_version(&HLcurr->HLid,HL_idx,0); > decode(outkey[0], &HLcurr->HLid); > hcg_update_version(&HLcurr->HNid1,HN_idx,0); > decode(outkey[1], &HLcurr->HNid1); > hcg_update_version(&HLcurr->HNid2,HN_idx,0); > decode(outkey[2], &HLcurr->HNid2); > PrintCheck(fprintf(hcg_logfileptr, " %-8s %-8s %-8s %8d %8d\n" > , outkey[0], outkey[1], outkey[2], HLcurr->HPcount, HLcurr->allvisible)); > } > if (idx==6) > { > HPcurr=(struct HP *) tbl_ptr; > hcg_update_version(&HPcurr->HPid,HP_idx,0); > decode(outkey[0], &HPcurr->HPid); > hcg_update_version(&HPcurr->HLid,HL_idx,0); > decode(outkey[1], &HPcurr->HLid); > PrintCheck(fprintf(hcg_logfileptr, " %-8s %-8s %8.4f %8.4f %8d %-4s\n" > , outkey[0], outkey[1], HPcurr->HPx, HPcurr->HPy, HPcurr->is_visible, HPcurr->hsegpattern)); > } > if (idx==7) > { > HIcurr=(struct HI *) tbl_ptr; > hcg_update_version(&HIcurr->HIid,HI_idx,0); > decode(outkey[0], &HIcurr->HIid); > hcg_update_version(&HIcurr->HLid,HL_idx,0); > decode(outkey[1], &HIcurr->HLid); > PrintCheck(fprintf(hcg_logfileptr, " %-8s %-8s %-8s %8.4f %8.4f %8.4f %8d %8d %-25s %-40s\n" > , outkey[0], outkey[1], HIcurr->DIid, HIcurr->HIorigin, HIcurr->tbeginx, HIcurr->tbeginy > , HIcurr->txtwidth, HIcurr->txtheight, HIcurr->txtfont, HIcurr->hlabel)); > } > if (idx==8) > { > CGcurr=(struct CG *) tbl_ptr; > hcg_update_version(&CGcurr->CGid,CG_idx,0); > decode(outkey[0], &CGcurr->CGid); > hcg_update_version(&CGcurr->HGid,HG_idx,0); > decode(outkey[1], &CGcurr->HGid); > PrintCheck(fprintf(hcg_logfileptr, " %-8s %-8s %8.4f %8.4f %8.4f %8.4f\n" > , outkey[0], outkey[1], CGcurr->CGcenterx, CGcurr->CGcentery, CGcurr->CGwidth, CGcurr->CGheight)); > } > if (idx==9) > { > GXcurr=(struct GX *) tbl_ptr; > hcg_update_version(&GXcurr->GXid,GX_idx,0); > decode(outkey[0], &GXcurr->GXid); > hcg_update_version(&GXcurr->CGid,CG_idx,0); > decode(outkey[1], &GXcurr->CGid); > PrintCheck(fprintf(hcg_logfileptr, " %-8s %-8s %-8s %8.4f %-25s %8.4f %8.4f %8d %8d %-128s\n" > , outkey[0], outkey[1], GXcurr->DAid, GXcurr->GXorigin, GXcurr->txtfont, GXcurr->txtoffsetx > , GXcurr->txtoffsety, GXcurr->txtwidth, GXcurr->txtheight, GXcurr->grphcaption)); > } > } /* end if hcg_log */ > } /* end log_pr_add */ > > > /* end of gen_pr_add output to pr_load.c */ 1380c1622 < /************************* 1405-1555 ******************************************/ --- > /******************************************************************************/ 1391c1633 < --- > /*char tempkey[HCG_KEY_SIZE+1];*/ 1392a1635,1637 > char VNstring[NAMELENGTH] = "VN "; > > /* skip leading spaces (if any) from tbl_abbrv */ 1394c1639 < /* skip leading spaces [or \t?] (if any) from tbl_abbrv */ --- > while( *tbl_abbrv == ' ') ++tbl_abbrv; 1396d1640 < while((*tbl_abbrv==' ') || (*tbl_abbrv==' ')) /*++*/tbl_abbrv++; 1400a1645 > /*log_pr_add(tbl_abbrv, viewname, tbl_ptr); */ 1405a1651 > /*log_pr_add (tbl_abbrv, viewname, tbl_ptr); */ 1411a1658 > /*log_pr_add (tbl_abbrv, viewname, tbl_ptr); */ 1413,1421d1659 < } /* hcg_tbl_idx now set >= 0 */ < < if (hcg_view_list.view_list[hcg_view_idx].version_list[hcg_tbl_idx] == '\0'){ < DP; printf( < "pr_add failed: empty version_list:hcg_view_idx=%d,hcg_tbl_idx=%d\n", < hcg_view_idx,hcg_tbl_idx);/*RJL050727,0731*/ < printf( < "hcg_view_list.view_list[hcg_view_idx].version_list[hcg_tbl_idx]\n"); < return; 1422a1661,1662 > if (hcg_view_list.view_list[hcg_view_idx].version_list[hcg_tbl_idx] == '\0') > return; 1424,1425c1664 < hcg_version = < hcg_view_list.view_list[hcg_view_idx].version_list[hcg_tbl_idx]; --- > hcg_version = hcg_view_list.view_list[hcg_view_idx].version_list[hcg_tbl_idx]; 1442a1682,1683 > assert(strlen(viewname)>0); > log_pr_add ("FO", viewname, FOelt); /* iff hcg_log */ 1453a1695 > log_pr_add ("GD", viewname, GDelt); 1465a1708 > log_pr_add ("HG", viewname, HGelt); 1476a1720 > log_pr_add ("HN", viewname, HNelt); 1486a1731 > log_pr_add ("HA", viewname, HAelt); 1494a1740 > log_pr_add ("HL", viewname, HLelt); 1502a1749 > log_pr_add ("HP", viewname, HPelt); 1512a1760 > log_pr_add ("HI", viewname, HIelt); 1519a1768 > log_pr_add ("CG", viewname, CGelt); 1529a1779 > log_pr_add ("GX", viewname, GXelt); 1532,1535c1782 < default: /* bad table type? */ < DP; fprintf(stderr, "Bad tbl_abbr=%s\n", < hcg_table_seq_list[hcg_tbl_idx].ttabbrev); < break; --- > 1537,1539d1783 < hcg_ts_list[hcg_tbl_idx].ts_list[hcg_version].maxrow++; < /* What about hcg_ts_list[hcg_tbl_idx].maxrow? */ < /* (like hcg_table_seq_list[hcg_tbl_idx].rcount++; above) - RJL050731 */ 1540a1785 > hcg_ts_list[hcg_tbl_idx].ts_list[hcg_version].maxrow++; 1542c1787 < } /* end do_pr_add 1405-1555*/ --- > } /* end do_pr_add */ 1563a1809,1810 > //extern char *logfile; > /* int hcg_replay; - Quandary: bootstrap m*.h may not have this declaration?-RJL050526 */ 1596c1843 < { /* Only test on FIRST line of file???-RJL050727 */ --- > { 1914,1915d2160 < /* end of gen_pr_parse.c output to pr_load.c */ < /* end of gen_load_data.c output to pr_load.c */ 1917c2162,2164 < /* start of gen_pr_load.c output to pr_load.c */ --- > /* end of gen_pr_parse output to pr_load.c */ > /* end of gen_load_data output to pr_load.c */ > /* start of gen_pr_???? output to pr_load.c */ 1932a2180,2191 > /* Removed logfile decl'n - RJL050719 */ > /* Added by Genlog 5/8/96 to log pr_load */ > /* extern char *logfile; */ > char log_text[BUFSIZE]; > EP; > if ( hcg_log == 1 ) { > logwait(); > sprintf(log_text,"LD %s %s\n", viewname, file_name); > logstr(log_text); > } > /* End Genlog Addition */ > 1966,1967c2225 < DP; < #ifdef GENLOG --- > DP; 1972,1977c2230 < #else < dprints("data file \"%s\" contains StartReplay (\"SR\") cmd:\n", file_name); < dprint("Rebuild bde with chgen -log option to replay.\n"); < exit(3); /* TBD: Pick error # */ < #endif < --- > 2016,2017c2269,2270 < } < } /* end pr_find_bt() */ --- > } > } 2049,2083d2301 < /* RJL 040425: (moved down 050731) Notes on concurrent log and replay for DBDE: < * For concurrent log and replay, do we need hcg_log? < * Pre-condition: < * pr_load must do pr_init's pkey-range-updates while replaying a file < * with "SR" + checkpoint file table rows or equivalent "LD" command; < * replay is complicated because discovering "SR" in infile.dat implies < * pr_init and pr_load of infileDB1.dat, then replaying log_data.txt. < < * Replay is simplified if infile.dat replaces log_data.txt < * and pr_loading infileDB1.dat is replaced by inline checkpoint tables < * or an equivalent "LD" replay command. < * Replay then means load checkpoint table rows followed by changelog commands < * without handling multiple files (unless the "LD" command refers to a file). < * The initial "SR" command is superfluous but can be retained for now. < < * Bde will redraw the canvas whenever updates to the memory-resident < * tables affect the selected and displayed HG. It does this now by calling < * clear/updatedisplaylist/ReDraw (but not pr_free). < * The bde clients also log updates (but ONLY locally originated ones - < * NOT those from remote client updates in the file or stream being replayed). < < * Bde local editing must be interrupted by X11 to sample the replay file or stream. < * X11 supports user-defined callbacks XtAppAddInput and XtAppAddWorkProc for this. < * X11 calls these only when the local Xevent buffer is empty. < * DBDE clients may need to slow down so narrow-band links can keep up with < * the server-merged broadcast stream of remotely-originated changes. < < * For the 02f522 Hominid replay project, the 's' Keypress callback was used. < * But in 02s < * http://www.cs.uml.edu/~lechner/02s592/pkingsto < * Paul Kingston wrote and tested XtAppAddInput and XtAppAddWorkProc (without linking < * them into bde). His work should be re-used in 04s522/dbde. < * RJL 040425 < */ < 2085,2097d2302 < < void printviewlist(void) < { < int i,j; < for (i = 0; i < hcg_view_list.num_views; i++) { < printf("version list for viewlist[%d]:\n", i); < for (j=0; j #/ ******************************************************************* > ## The '#' is a comment to Makefiles; /_* is not.-RJHL0050812 > # ** $Log: Imakefile,v $ > # ** Revision 1.2 2005/08/12 19:21:58 lechner > # ** Fixed a missing '/*' typo, changed to PRDIR = $(TOP)/pr_util_log > # ** > # ** Revision 1.1 2005/08/12 03:18:02 lechner > # ** Major revision of Imakefiles used by xmkmf -a [-DLOG], to support > # ** a more elaborate bde build tree for two $HOSTTYPES and optional > # ** change-log creation and replay capability. > # ** > # ** Separate Makefiles are generated in src, pr_util_log and pr_util_nolog > # ** by three Imakefiles in bde, src and these subdirectories. > # ** Chgen [-log] should regenerate pr_util_nolog [pr_util_log]content. > # ** Separate obj .o and executable .exe files can now be maintained > # ** on $HOSTTYPEs i386-linux and alpha. > # ** > # ** (Caveat: Executing xmkmf -a [-DLOG] should produce Makefiles > # ** that work in subtree pr_util_nolog [pr_util_log], but currently > # ** they both update pr_util_nolog/$HOSTTYPE/obj from bde/src. -RJL050811) > # ** > # ** The directory tree for builds under bde is now: > # ** {src, {pr_util_nolog, pr_util_log}/$HOSTTYPE/{probj, obj, bin}} > # ** Imake assumes that this tree exists (TBD: check out empty from CVS). > # ** Defined CXXLINK to link with g++ or cxx and replace link[no]log.csh > # ** > # ** Revision 1.16 2005/07/31 03:21:44 lechner > # ** Corrected spelling of CHGEN symbol definition. > # ** > # ************************************************************ > # ** This Imakefile is for bde/pr_util_log. - RJL050805 > # ** It updates files in bde/{pr_util_log/{,$(HOSTTYPE)/{obj,bin}} > # ** See -r 1.16 of bde/pr_util/Imakefile for earlier revs. > # ** > # ******************************************************************** > # ** subst -Wall for -w - RJL 2k0712 > # ** add pr_stats.c, pr_stats.o - RJL 2k0718 > # ** In bde/configure,h, #define BDELOG to generate and use pr_log.c > # ** or #define BDEREPLAY to replay from logdata.txt. > # ** This now adds GENLOG instead of BDELOG to GENDFINES -RJL 020401 > # ** > # ** Add this to GenerateLibFromSchema' to run chgen > # ** and create pr_*.c, *schema.h: > # ** $(GENSRCS): schemafile > # ** $(CHGEN) $(GENFLAGS) schemafile > # ** > # ************************************************************* > # ** configure.h #defines GENVxx, GENLOG, and > # ** optional BDELOG (or BDEREPLAY, and BDEONEOF) > # ** To resolve a double-maintenance problem, > # ** GENVERSION is assigned in bde/Imakefile > # ** and substituted into -D$(GENVERSION) > # ** (NEW_VERSION flag is used in genv11/src/Makefile, not at runtime) > # ** > # ** bde/Imakefile #includes configure.h which has optional -DGENLOG > # ** This adds GENLOG and (app-specific) -DBDELOG to BDEDEFINES > # ** Both BDELOG and BDEREPLAY need pr_log.c: > # ** WARNING: dprint.h updates do not cause dprint.c recompilation!??-RJL041129 > # ** > # ** I added (and checked-in) lut.c to GENSRCS, lut.h to GENOBJS. - RJL050721 > # ** (copied from $CASE/gen/ver_13/chgen/src/pr_util) - RJL050721 > # ** GENLOG changes conditional code in pr_*.c and adds new file pr_log.c: > # ** Moved all comments to top - RJL050807 > # **/ 82c83 < PRDIR = $(TOP)/pr_util_log --- > PRDIR = $(TOP)/pr_util_nolog 93c94,95 < INCLUDES = -I/usr/include -I$(TOPINCLUDE) -I$(SCHEMA_INCLUDE) --- > INCLUDES = -I/usr/include -I$(TOPINCLUDE) -I$(SCHEMA_INCLUDE) -I$(TOP) > 151,152c153,156 < #else < EXT = ; --- > #endif > > #ifdef linux > EXT = 156,157c160,161 < copysources: @@\ < $(CP) $(GENSRCS) $(PROBJDIR) @@\ --- > copysources: $(GENSRCS) $(TOP)/dprint.h $(PRDIR)/94sbde_schema.h $(PRDIR)/lut.h @@\ > $(CP) $(GENSRCS) $(PROBJDIR) @@\ 159c163,164 < $(CP) $(PRDIR)/lut.h $(PROBJDIR) @@\ --- > $(CP) $(PRDIR)/94sbde_schema.h $(PROBJDIR) @@\ > $(CP) $(PRDIR)/lut.h $(PROBJDIR) @@\ cvs diff: Diffing pr_util_nolog Index: pr_util_nolog/Imakefile =================================================================== RCS file: /usr/proj3/case/95s523/95sbde/base/Master/bde/pr_util_nolog/Imakefile,v retrieving revision 1.1 diff -r1.1 Imakefile 147c147,148 < #else EXT = ; --- > #else > EXT = ; cvs diff: Diffing schema cvs diff: cannot find schema/95sbde_schema.sch cvs diff: cannot find schema/96subde_schema.sch cvs diff: Diffing schema/altSchemas cvs diff: Diffing src Index: src/Imakefile =================================================================== RCS file: /usr/proj3/case/95s523/95sbde/base/Master/bde/src/Imakefile,v retrieving revision 1.11 diff -r1.11 Imakefile 1,125c1,125 < /******************************************************************* < * $Log: Imakefile,v $ < * Revision 1.11 2005/08/12 04:23:05 lechner < * Major rev. to accomodate builds in two pr_util-[no]log subtrees. < * Added or redefined these symbols < * PRDIR PROBJDIR OBJDIR BINDIR LOCAL_LIBRARIES SCHEMA_INCLUDE < * and these make targets: copysources: $(OBJDIR)/%.o: $(OBJS): < * < * Revision 1.10 2005/07/25 01:49:57 lechner < * Introduced symbols SRC1 and OBJ1 before bdeReplay.* is added. < * < * Revision 1.9 2005/07/22 00:08:26 lechner < * Added '_' circa line 80: "...after doing 'cvs admin -c\ \_* Imakefile' here." < * Did the same in earlier comment brackets inside rev history text that aborted xmkmf. < * < * Revision 1.8 2005/06/08 01:40:37 lechner < * 238a237,242 < * > /_* bdeReplay.cc is now made conditional on BDELOG - RJ050606 *_/ < * > < * > #ifdef BDELOG < * > OBJS = $(OBJS) bdeReplay.o < * > SRCS = $(SRCS) bdeReplay.cc < * > #endif < * < * Revision 1.7 2005/05/30 01:16:43 lechner < * Corrected two typos in rev. history < * < * Revision 1.6 2005/05/02 03:37:30 lechner < * Resolved merge conflicts in favor of bde2alpha_rv branch. < * < * Revision 1.4.4.11 2004/04/12 18:57:14 lechner < * < * Removed spurious nextged comment which aborted make in bde/src. < * < * Revision 1.4.4.10 2004/04/03 04:18:30 lechner < * Removed comment ' /*EXTRA_LIBRARIES = -lXm -lXt -lX11 -lm -lbsd ' < * < * Revision 1.4.4.9 2003/10/21 01:38:39 lechner < * Removed dprint.cc - it is now in bde/pr_util/dprint.c - RJL 031020 < * < * Revision 1.4.4.8 2003/10/14 01:42:54 lechner < * Changed EXTRA_LIBRARIES to -lXm -lXt -lX11 -lm -lbsd (bsd was bsdmalloc) < * Made two mutex .o and .cc lists - new one for Linux, old one for alpha < * < * Revision 1.4.4.7 2003/08/19 17:15:41 lechner < * Moved conditional inclusion of bdeReplay inside outer-level #ifdef BDELOG < * to satisfy Linux' make limitation?. < * < * Revision 1.4.4.6 2002/09/29 05:30:53 lechner < * Added dprintf.* and localized #ifdef BDELOG condition < * < * Revision 1.4.4.5 2002/06/21 23:04:39 lechner < * Added new bdeReplay.{c,o} to Imakefile. < * < * Revision 1.4.4.4 2002/03/12 00:56:50 lechner < * Modified comments to say that BDELOG in configue.h compiles pr_*log calls. < * < * Revision 1.4.4.3 2000/09/23 02:24:11 lechner < * I did cvs ci bde, to be followed by cvs tag bde2alpha.2k0922 bde and cvs co; < * checkin updates the repository, tag adds a new tag to current branch (tag bde2apha_rv), < * in the repository but not locally, amd cvs co makes the local version have that tag. < * < * Revision 1.4.4.2 2000/04/06 07:10:30 lechner < * I checked in 7 updated files and added tag bde2alpha_rjl < * Files include 3 Imakefiles, bde/{configure.h,aareadme,src/fileio.cc, < * executables/bde} < * < * Revision 1.4.4.1 1999/05/19 22:19:38 vdhamoda < * bde2alpha_rv_final < * < * Revision 1.5 1996/12/18 19:41:12 cparisi < * BDECODE project 96f523 < * adds XB structure. Moves some of the text attributes < * from HA/GX to XB. links HA and GX to XB. < * Adds new "text" class that consolidates some of the test operations. < * < < * Revision 1.4 1996/03/12 01:12:47 lechner < * I removed buttons.cc and buttons.o below - no longer in use - RJL 96/3/11 < * < * Revision 1.3 1995/10/18 22:06:33 rdias < * Created a function GetBDEDatFIleList that creats a filelist that pr_init < * uses to initialize the database. The fonts.dat file is always appended < * to the end of the filelist. This is so that pr_init initializes the < * database and the font option table is loaded into the database when < * the print comand is executed. < * < * In file fprint.cc the BoundingBox postscript command is added to the < * prologue of the postscript file. This createa a 8.5 X 11 inch bounding < * box around the BDE diagram. This diagram can now be included in Latex etc. < * < * Revision 1.2 1995/01/16 23:11:07 lechner < * Fixed syntax error (# for *) after doing 'cvs admin -c\ \_* Imakefile' here. < * < * Revision 1.1.1.1 1995/01/04 06:04:01 lechner < * Imported 94fbde tree to 95sbde < * < * Revision 1.8 1994/04/18 15:29:25 mtorpey < * Fixed a minor bug dealing with imake on remus. < * < * Revision 1.7 1994/04/16 20:05:21 jrichard < * Fixed a bug in linux support < * < * Revision 1.6 1994/04/11 19:58:37 jrichard < * alphabetized the src and obj list so you can easily tell how far along < * in the compile you are < * < * Revision 1.5 1994/04/11 15:20:50 jrichard < * support for LinuxArchitecture < * < * Revision 1.4 1994/04/09 15:03:55 dgrant < * Added msgBox.cc to list of SRCS. < * < * Revision 1.3 1994/04/09 14:38:14 dgrant < * Added msgBox.o to list of OBJS. < * < * Revision 1.2 1994/04/07 21:36:10 jrichard < * version of Imakefile with support for GENV8 and many bugs fixed < * < *******************************************************************/ < < *******************************************************************/ < /* This Imakefile builds bde/{src,pr_util_log} with make -DLOG option */ < /* New bde tree - RJL050805; for prior Imakefile rev history see -r 1.9 */ < /* #ifdef LOG, configure.h #defines BDELOG => use pr_log/bdeRreplay */ --- > # ******************************************************************* > # * The '#' prefix prevents alpha passing non-commment junk to Makefile > # * $Log: Imakefile,v $ > # * Revision 1.11 2005/08/12 04:23:05 lechner > # * Major rev. to accomodate builds in two pr_util-[no]log subtrees. > # * Added or redefined these symbols > # * PRDIR PROBJDIR OBJDIR BINDIR LOCAL_LIBRARIES SCHEMA_INCLUDE > # * and these make targets: copysources: $(OBJDIR)/%.o: $(OBJS): > # * > # * Revision 1.10 2005/07/25 01:49:57 lechner > # * Introduced symbols SRC1 and OBJ1 before bdeReplay.* is added. > # * > # * Revision 1.9 2005/07/22 00:08:26 lechner > # * Added '_' circa line 80: "...after doing 'cvs admin -c\ \_* Imakefile' here." > # * Did the same in earlier comment brackets inside rev history text that aborted xmkmf. > # * > # * Revision 1.8 2005/06/08 01:40:37 lechner > # * 238a237,242 > # * > /_* bdeReplay.cc is now made conditional on BDELOG - RJ050606 *_/ > # * > > # * > #ifdef BDELOG > # * > OBJS = $(OBJS) bdeReplay.o > # * > SRCS = $(SRCS) bdeReplay.cc > # * > #endif > # * > # * Revision 1.7 2005/05/30 01:16:43 lechner > # * Corrected two typos in rev. history > # * > # * Revision 1.6 2005/05/02 03:37:30 lechner > # * Resolved merge conflicts in favor of bde2alpha_rv branch. > # * > # * Revision 1.4.4.11 2004/04/12 18:57:14 lechner > # * > # * Removed spurious nextged comment which aborted make in bde/src. > # * > # * Revision 1.4.4.10 2004/04/03 04:18:30 lechner > # * Removed comment ' /_*EXTRA_LIBRARIES = -lXm -lXt -lX11 -lm -lbsd ' > # * > # * Revision 1.4.4.9 2003/10/21 01:38:39 lechner > # * Removed dprint.cc - it is now in bde/pr_util/dprint.c - RJL 031020 > # * > # * Revision 1.4.4.8 2003/10/14 01:42:54 lechner > # * Changed EXTRA_LIBRARIES to -lXm -lXt -lX11 -lm -lbsd (bsd was bsdmalloc) > # * Made two mutex .o and .cc lists - new one for Linux, old one for alpha > # * > # * Revision 1.4.4.7 2003/08/19 17:15:41 lechner > # * Moved conditional inclusion of bdeReplay inside outer-level #ifdef BDELOG > # * to satisfy Linux' make limitation?. > # * > # * Revision 1.4.4.6 2002/09/29 05:30:53 lechner > # * Added dprintf.* and localized #ifdef BDELOG condition > # * > # * Revision 1.4.4.5 2002/06/21 23:04:39 lechner > # * Added new bdeReplay.{c,o} to Imakefile. > # * > # * Revision 1.4.4.4 2002/03/12 00:56:50 lechner > # * Modified comments to say that BDELOG in configue.h compiles pr_*log calls. > # * > # * Revision 1.4.4.3 2000/09/23 02:24:11 lechner > # * I did cvs ci bde, to be followed by cvs tag bde2alpha.2k0922 bde and cvs co; > # * checkin updates the repository, tag adds a new tag to current branch (tag bde2apha_rv), > # * in the repository but not locally, amd cvs co makes the local version have that tag. > # * > # * Revision 1.4.4.2 2000/04/06 07:10:30 lechner > # * I checked in 7 updated files and added tag bde2alpha_rjl > # * Files include 3 Imakefiles, bde/{configure.h,aareadme,src/fileio.cc, > # * executables/bde} > # * > # * Revision 1.4.4.1 1999/05/19 22:19:38 vdhamoda > # * bde2alpha_rv_final > # * > # * Revision 1.5 1996/12/18 19:41:12 cparisi > # * BDECODE project 96f523 > # * adds XB structure. Moves some of the text attributes > # * from HA/GX to XB. links HA and GX to XB. > # * Adds new "text" class that consolidates some of the test operations. > # * > > # * Revision 1.4 1996/03/12 01:12:47 lechner > # * I removed buttons.cc and buttons.o below - no longer in use - RJL 96/3/11 > # * > # * Revision 1.3 1995/10/18 22:06:33 rdias > # * Created a function GetBDEDatFIleList that creats a filelist that pr_init > # * uses to initialize the database. The fonts.dat file is always appended > # * to the end of the filelist. This is so that pr_init initializes the > # * database and the font option table is loaded into the database when > # * the print comand is executed. > # * > # * In file fprint.cc the BoundingBox postscript command is added to the > # * prologue of the postscript file. This createa a 8.5 X 11 inch bounding > # * box around the BDE diagram. This diagram can now be included in Latex etc. > # * > # * Revision 1.2 1995/01/16 23:11:07 lechner > # * Fixed syntax error (# for *) after doing 'cvs admin -c\ \_* Imakefile' here. > # * > # * Revision 1.1.1.1 1995/01/04 06:04:01 lechner > # * Imported 94fbde tree to 95sbde > # * > # * Revision 1.8 1994/04/18 15:29:25 mtorpey > # * Fixed a minor bug dealing with imake on remus. > # * > # * Revision 1.7 1994/04/16 20:05:21 jrichard > # * Fixed a bug in linux support > # * > # * Revision 1.6 1994/04/11 19:58:37 jrichard > # * alphabetized the src and obj list so you can easily tell how far along > # * in the compile you are > # * > # * Revision 1.5 1994/04/11 15:20:50 jrichard > # * support for LinuxArchitecture > # * > # * Revision 1.4 1994/04/09 15:03:55 dgrant > # * Added msgBox.cc to list of SRCS. > # * > # * Revision 1.3 1994/04/09 14:38:14 dgrant > # * Added msgBox.o to list of OBJS. > # * > # * Revision 1.2 1994/04/07 21:36:10 jrichard > # * version of Imakefile with support for GENV8 and many bugs fixed > # * > # ******************************************************************* > # * This Imakefile builds bde/{src,pr_util_log} with make -DLOG option > # * New bde tree - RJL050805; for prior Imakefile rev history see -r 1.9 > # * #ifdef LOG, configure.h #defines BDELOG => use pr_log/bdeRreplay > # */ 142,143c142,143 < OBJDIR = $(PRDIR)/$(HOSTTYPE)/obj < BINDIR = $(PRDIR)/$(HOSTTYPE)/bin --- > OBJDIR = $(PRDIR)/$(HOSTTYPE)/obj > BINDIR = $(PRDIR)/$(HOSTTYPE)/bin 167c167,168 < -I$(SCHEMA_INCLUDE) -I/usr/local/lib/g++-include --- > -I$(SCHEMA_INCLUDE) -I/usr/local/lib/g++-include > 169,170d169 < /* Why use g++-include #ifdef USEDECC, which uses cxx? - RJL 2k0322 */ < /* What is purpose of EXTRA_LIBRARIES if USEDECC is NOT #defined ? */ 181a181,253 > OBJTMP = . > OBJS1 = \ > $(OBJTMP)/bendpt.o \ > $(OBJTMP)/bendptops.o \ > $(OBJTMP)/bde.o \ > $(OBJTMP)/buttonevent.o \ > $(OBJTMP)/captionops.o \ > $(OBJTMP)/cursor.o \ > $(OBJTMP)/dialog.o \ > $(OBJTMP)/display.o \ > $(OBJTMP)/draw.o \ > $(OBJTMP)/edit.o \ > $(OBJTMP)/fileio.o \ > $(OBJTMP)/font.o \ > $(OBJTMP)/fprint.o \ > $(OBJTMP)/graphobject.o \ > $(OBJTMP)/graphops.o \ > $(OBJTMP)/handler.o \ > $(OBJTMP)/help.o \ > $(OBJTMP)/hlink.o \ > $(OBJTMP)/infodialog.o \ > $(OBJTMP)/infomessage.o \ > $(OBJTMP)/init.o \ > $(OBJTMP)/initClasses.o \ > $(OBJTMP)/leftmenu.o \ > $(OBJTMP)/leftmenu_cb.o \ > $(OBJTMP)/linkops.o \ > $(OBJTMP)/menubar.o \ > $(OBJTMP)/menubar_cb.o \ > $(OBJTMP)/msgBox.o \ > $(OBJTMP)/nodeops.o \ > $(OBJTMP)/select.o \ > $(OBJTMP)/smselect.o \ > $(OBJTMP)/strdup.o \ > $(OBJTMP)/text.o \ > $(OBJTMP)/textops.o > > > SRCS1 = \ > bde.cc \ > bendpt.cc \ > bendptops.cc \ > buttonevent.cc \ > captionops.cc \ > cursor.cc \ > dialog.cc \ > display.cc \ > draw.cc \ > edit.cc \ > fileio.cc \ > font.cc \ > fprint.cc \ > graphobject.cc \ > graphops.cc \ > handler.cc \ > help.cc \ > hlink.cc \ > infodialog.cc \ > infomessage.cc \ > init.cc \ > initClasses.cc \ > leftmenu.cc \ > leftmenu_cb.cc \ > linkops.cc \ > menubar.cc \ > menubar_cb.cc \ > msgBox.cc \ > nodeops.cc \ > select.cc \ > smselect.cc \ > strdup.cc \ > text.cc \ > textops.cc 183,254c255,258 < OBJS = \ < $(OBJDIR)/bendpt.o \ < $(OBJDIR)/bendptops.o \ < $(OBJDIR)/bde.o \ < $(OBJDIR)/buttonevent.o \ < $(OBJDIR)/captionops.o \ < $(OBJDIR)/cursor.o \ < $(OBJDIR)/dialog.o \ < $(OBJDIR)/display.o \ < $(OBJDIR)/draw.o \ < $(OBJDIR)/edit.o \ < $(OBJDIR)/fileio.o \ < $(OBJDIR)/font.o \ < $(OBJDIR)/fprint.o \ < $(OBJDIR)/graphobject.o \ < $(OBJDIR)/graphops.o \ < $(OBJDIR)/handler.o \ < $(OBJDIR)/help.o \ < $(OBJDIR)/hlink.o \ < $(OBJDIR)/infodialog.o \ < $(OBJDIR)/infomessage.o \ < $(OBJDIR)/init.o \ < $(OBJDIR)/initClasses.o \ < $(OBJDIR)/leftmenu.o \ < $(OBJDIR)/leftmenu_cb.o \ < $(OBJDIR)/linkops.o \ < $(OBJDIR)/menubar.o \ < $(OBJDIR)/menubar_cb.o \ < $(OBJDIR)/msgBox.o \ < $(OBJDIR)/nodeops.o \ < $(OBJDIR)/select.o \ < $(OBJDIR)/smselect.o \ < $(OBJDIR)/strdup.o \ < $(OBJDIR)/text.o \ < $(OBJDIR)/textops.o < < < SRCS1 = bde.cc \ < bendpt.cc \ < bendptops.cc \ < buttonevent.cc \ < captionops.cc \ < cursor.cc \ < dialog.cc \ < display.cc \ < draw.cc \ < edit.cc \ < fileio.cc \ < font.cc \ < fprint.cc \ < graphobject.cc \ < graphops.cc \ < handler.cc \ < help.cc \ < hlink.cc \ < infodialog.cc \ < infomessage.cc \ < init.cc \ < initClasses.cc \ < leftmenu.cc \ < leftmenu_cb.cc \ < linkops.cc \ < menubar.cc \ < menubar_cb.cc \ < msgBox.cc \ < nodeops.cc \ < select.cc \ < smselect.cc \ < strdup.cc \ < text.cc \ < textops.cc < --- > #ifndef BDELOG > OBJS = $(OBJS1) > SRCS = $(SRCS1) > #endif 256,257c260,261 < OBJS = $(OBJS) $(OBJDIR)/bdeReplay.o < SRCS = $(SRCS) bdeReplay.cc --- > OBJS = $(OBJS1) $(OBJTMP)/bdeReplay.o > SRCS = $(SRCS1) bdeReplay.cc 260c264 < C = cp -p --- > CP = cp -p 262,263d265 < copysources: < $(CP) $(SRCS) $(OBJDIR) 265c267 < /* Patterns work on gnu linux make only */ --- > # /* Patterns work on gnu linux make only */ 271c273 < /* alpha make needs $(*) with '.cc' suffix */ --- > # /* alpha make needs $(*) with '.cc' suffix */ 275a278,280 > > copysources: > $(CP) $(SRCS) $(OBJDIR) Index: src/display.cc =================================================================== RCS file: /usr/proj3/case/95s523/95sbde/base/Master/bde/src/display.cc,v retrieving revision 1.9 diff -r1.9 display.cc 240c240 < if (!(hasType(cHN->HNid, HN)) { --- > if (!(hasType(cHN->HNid, HN))) { Index: src/fileio.cc =================================================================== RCS file: /usr/proj3/case/95s523/95sbde/base/Master/bde/src/fileio.cc,v retrieving revision 1.25 diff -r1.25 fileio.cc 1930,1937c1930,1933 < #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 --- > strcpy(LibPath,getenv("DEFAULT_LIB_PATH")); > if (LibPath == (char*)NULL) > strcpy(LibPath, "../lib"); > sprintf (filename, "%s/%s", LibPath, FOfile_name); 1940,1941c1936 < pr_load( "94sbdedefaultsView", filename); /* pr_init first? - RJL 040601 */ < //why should FOcurr be initialized yet? - RJL 2k0713 --- > pr_load( "94sbdedefaultsView", filename); /* ../lib/FOfile_name */ 1943,1944c1938,1939 < printf ("loaded Font Options Table \n"); < FOloaded = 1; // set a flag to indicate the table is loaded --- > printf ("loaded Font Options Table \n"); > FOloaded = 1; // set a flag to indicate the table is loaded 1947,1951c1942,1944 < printf("FO table has NULL pointer FOcurr - report this bug - RJL \n"); < #if 0 < free( filelist ); < #endif < } --- > printf("FO table has NULL pointer FOcurr - report this bug - RJL \n"); > // free( filelist ); > } // end if !FOloaded 2180c2173,2174 < * --- > * Client: GetBDEDatFileList:fileio.cc:2247 > * 2185c2179,2185 < 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 ((char*)bde_lib_path == (char*)NULL) > strcpy(bde_lib_path, getenv("DEFAULT_LIB_PATH")); > if (bde_lib_path == (char*)NULL) > strcpy(bde_lib_path, "../lib"); 2187,2190c2187,2191 < if ( bde_newdat == (char *) NULL ) < if ( ( bde_newdat = getenv( "BDE_NEWDAT" ) ) == (char *) NULL ) < { < sprintf(tmpfilename, "%s/%s", DEFAULT_LIB_PATH, BDENEW); --- > if ( bde_newdat == (char *) NULL ) > bde_newdat = getenv( "BDE_NEWDAT" ); > if ( bde_newdat == (char *) NULL ) { > /* BDENEW is "bdenew.dat" -RJL*/ > sprintf(tmpfilename, "%s/%s", bde_lib_path, BDENEW); 2193,2194c2194,2196 < } < --- > } > DP; dprintss("bde_lib_path:%s; bde_newdat:%s\n",bde_lib_path,bde_newdat); > 2196c2198 < } --- > } // end GetBDENewDatFile 2226,2236c2228,2238 < 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 */ > if (LibPath == (char*)NULL) > strcpy(LibPath, getenv("DEFAULT_LIB_PATH")); > if (LibPath == (char*)NULL) > strcpy(LibPath, "./"); //make the path "./" > if (LibPath[strlen(LibPath)] != '/') > strcat (LibPath, "/"); // make the path end in '/' 2238,2239c2240,2241 < // I assume src above means runtime $CWD - RJL 040603 < #endif --- > DP; dprintss("LibPath:%s; Font_file:%s\n", LibPath, Font_file); > sprintf (Font_file, "%s%s", (char*)LibPath, "fonts.dat"); 2241,2242c2243,2244 < // pr_init is looking for a list of filenames separated by spaces. < sprintf(tmpfile, "%s %s", dat_infile, Font_file); --- > // pr_init is looking for a list of filenames separated by spaces. > sprintf(tmpfile, "%s %s", dat_infile, Font_file); 2245,2246c2247,2248 < new_datfile = GetBDENewDatFile(); < sprintf(tmpfile, "%s %s", new_datfile, Font_file); --- > new_datfile = GetBDENewDatFile(); // at line 2185 > sprintf(tmpfile, "%s %s", new_datfile, Font_file); 2249,2250c2251,2252 < if (tempfile != NULL) // rgantyal,vdhamoda < free(tempfile); // rgantyal,vdhamoda --- > if (tempfile != NULL) // rgantyal,vdhamoda > free(tempfile); // rgantyal,vdhamoda 2283c2285 < { --- > { 2286a2289,2294 > 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"; 2291c2299 < sprintf(tmpfilename, "%s/%s", DEFAULT_LIB_PATH, VIEWDEFS); --- > sprintf(tmpfilename, "%s/%s", bde_lib_path, VIEWDEFS); 2297,2298c2305 < free(tempfile); // 99s523 vdhamoda,rgantyal < --- > free(tempfile); // 99s523 vdhamoda,rgantyal 2300,2303c2307,2309 < strcpy(tempfile, tmpfilename); // 99s523 vdhamoda,rgantyal < < return( tempfile ); // 99s523 vdhamoda,rgantyal < --- > strcpy(tempfile, tmpfilename); // 99s523 vdhamoda,rgantyal > DP; dprintss("bde_lib_path:%s; bde_viewdefs file:%s\n",bde_lib_path, tempfile); > return( tempfile ); // 99s523 vdhamoda,rgantyal 2305,2307c2311 < < < } --- > } Index: src/menubar_cb.cc =================================================================== RCS file: /usr/proj3/case/95s523/95sbde/base/Master/bde/src/menubar_cb.cc,v retrieving revision 1.5 diff -r1.5 menubar_cb.cc 241c241,243 < --- > #ifndef DEFAULT_LIB_PATH > #define DEFAULT_LIB_PATH "../lib" > #endif cvs diff: Diffing symtxt cvs diff: Diffing test cvs diff: cannot find test/hi.dat cvs diff: Diffing tools