Paul
Kingston
CS
91.592 Spring 2002
Final
Report (02s592 Project)
Abstract: This
report gives a brief overview of the contributions made to bde this
semester. The following is a list
of high-level tasks undertaken:
·
Evaluation
of platform-independent GUI toolkits.
·
Prototype
demonstration using the FOX GUI toolkit.
·
Demonstration
and addition of various Xt callback functions.
·
Testing
of bde remotely via X server software.
·
Evaluation
of named pipes for use in bde.
Details: The
following explains each of the above bulleted items in greater detail.
Evaluation
of platform-independent GUI toolkits (PIGUIs):
At the
beginning of the semester some bde porting issues were discussed. Particularly the desire to make bde a
cross-platform application. That
is, to satisfy the widest range of users, it is desirable for bde to be able to
be built and run on a variety of platforms. Several ports of bde already exist including a Windows
version and a Java version.
However these ports are not as well maintained as the flagship OSF-UNIX
version of bde. In an effort to
develop a single bde source tree which can be more easily built for a variety
of platforms, it was determined that bde could benefit from a
platform-independent toolkit from which to code the user interface. With the UI written with such a
toolkit, bde could take the first large steps toward the goal of a single
source tree supporting multiple platforms.
First a
variety of online sources were consulted to assemble a master list of available
PIGUIs. Next the list was filtered
based on several factors, including number of platforms supported, licensing
and support availability. The
toolkits in the filtered list were then evaluated individually. This list is included in this report as
Appendix A.
Prototype
demonstration using the FOX GUI toolkit:
The
recommendation after the above-outlined evaluation was to use the FOX toolkit (http://www.fox-toolkit.org/fox.html). A prototype bde GUI was
then composed to demonstrate feasibility.
The source code file, MyFOXApp.cpp is located in the following
directory:
/usr/proj3/case/02s592/pkingsto/bde/extra/FOX
After presenting the prototype it was determined that the focus
for the semester should be on other bde tasks, and so the PIGUI porting effort
was abandoned.
Demonstration
and addition of various Xt callback functions:
Introducing
replay functionality into bde necessitated the need for new Xt callback
functions which would initiate the stepping through the replay log. There were three Xt callback functions
which were good candidates for providing this functionality: XtAppAddInput(), XtAppAddTimeOut() and
XtAppAddWorkProc(). A brief
description of these function is given here:
XtAppAddInput: The
procedure passed as an argument is executed when the contents of the specified
file change. Note that for use
with bde, the file specified was <sdtin>, meaning that the passed
procedure would execute whenever the <enter> key was pressed.
XtAppAddTimeOut: The
procedure passed as an argument is executed after the specified time period has
elapsed.
XtAppAddWorkProc: The
procedure passed as an argument is executed when there are no other events in
the application’s event queue.
Proof
of concept programs were written for each of the three functions listed
above. The source code for these
programs is located in the following directory:
/usr/proj3/case/02s592/pkingsto/bde/extra/callbacks
These functions were then customized for use with bde. Their definitions reside in the bde
source code file init.cc.
Because it makes no sense to have more than one of these active at any
one time, so it was determined that the XtAppAddTimeOut() function should be
active by default. The remaining
two callback functions are listed in init.cc but are commented out.
Listing of code additions for these Xt callback functions is given
in Appendix B, build logs are given in Appendix C and testing information is
given in Appendix D.
Testing
of bde remotely via X server software:
In a
distributed-bde system there will be users accessing bde from a variety of
platforms and locations.
Determining the processing load the current version of bde introduces
when accessed remotely is important when designing future distributed
versions. The current version of
bde was tested remotely over a cable modem connection using Windows X server
software. Test runs were tried at
varying times of day from 6AM to 2AM.
The results were dramatic – the response time of the system running bde
was far too slow to be usable.
Evaluation
of named pipes for use in bde:
It was proposed that client applications, rather than writing to a
log file, could instead directly send replay messages to bde via an
inter-process communication mechanism such as a named pipe. A pair of demonstration programs were
found which demonstrate the use of a named pipe (called FIFOs in UNIX). These demonstration programs are
located in the following directory:
/usr/proj3/case/02s592/pkingsto/bde/extra/fifo
\
Appendix
A: Report Submitted on PIGUIs
Evaluation of OpenGL Cross-Platform GUI
Toolkits
Of the
100 or so OpenGL cross-platform windowing toolkits listed on the OpenGL web
page:
http://www.opengl.org/users/apps.hardware/applications/devtools.html
the
following four appear to be the most promising. I have summed up the features of each below:
·
GLT http://www.nigels.com/glt/
Type of toolkit: C++
interface to GLUT with extra features
Platforms supported: Same
as GLUT - Win32, X11
Pros:
Has
a menu class
Cons:
Should
be considered an Alpha release
Support:
Mailing
list
License:
GNU
LGPL
·
GLUI http://www.cs.unc.edu/~rademach/glui/
Type of toolkit: C++
wrapper for GLUT with extra features
Platforms supported: Same
as GLUT - Win32, X11
Pros: Very
rich set of widgets, Support for multiple user interface windows
Cons: No
additional menu support
Support: Single
email address
License: GNU
LGPL
·
FLTK (Fast
Lightweight Toolkit) http://www.fltk.org/
Type of toolkit: C++
GUI toolkit with OpenGL
Platforms supported: Same
as GLUT - Win32, X11 and MacOS
Pros: Has
a UI builder called "FLUID", menu support
Cons: Not
sure about multiple windows and external events
Support: Newsgroups
License: GNU
PL
·
FOX http://www.fox-toolkit.org/fox.html
Type of toolkit: C++
interface to OpenGL
Platforms supported: Same
as GLUT - Win32, X11 and most UNIX flavors were mentioned
Pros: Support
for external events, multiple windows
Cons: Not
sure if there are any
Support: Mailing
list with archives
License: GNU
LGPL
Recommendation:
Of the
four above, the last candidate, "FOX" appears to be the best
choice. A large number of
platforms are supported and external events and multiple windows are supported. The “FLTK” toolkit appears to be
likewise promising. I would
recommend that both these toolkits be evaluated further to see if they can be
employed in bde development.
Appendix
B: Code Additions for Xt Callbacks
The following is the output of a diff command showing the code
additions made to init.cc and fileio.cc to implement the Xt callback functions.
init.cc
saturn.cs.uml.edu> diff ./init.cc
~lechner/bde2alpha_rl/sandbox/bde/src/init.cc
185,186d184
< #include <stdio.h>
< #include <stdlib.h>
190,191d187
< #include <Xm/Xm.h>
< #include <Xm/Label.h>
205,207d200
< ///////////////// Constants
////////////////////////////////////////
< #define XTAPPADDTIMEOUT_INTERVAL 5000
<
227c220
< extern void ReplayFunc();
---
>
246,251d238
< static void TimerFunc ( XtPointer
clientData, XtIntervalId *id );
<
< static void InputFunc ( XtPointer
clientData, int *fid, XtInputId *id );
<
< static Boolean WorkProcFunc (
XtPointer clientData );
<
517,525c504
<
< ////////////////////////Replay
callbacks////////////////////////
< TimerFunc( ( XtPointer) canvas,
NULL );
< /* Other X11 callbacks -
uncomment as needed
< XtAppAddWorkProc( app,
WorkProcFunc, canvas );
< XtAppAddInput( app, fileno (
stdin ), (XtPointer)XtInputReadMask,
<
InputFunc, canvas );
< */
<
---
>
623,702d601
<
<
<
/******************************************************
< * Function: ReplayFunc
< *
< * Description: Calls the replay_log() function.
<
******************************************************
< void ReplayFunc()
< {
< if(ReplayReady == 1)
< {
< if( replay_log() == STATE2 )
< ReplayReady
= 0;
< }
< }
< */
<
<
/******************************************************
< * Function: TimerFunc
< *
< * Description: Calls ReplayFunc() repeatedly at a time
interval
< *
specified by the constant XTAPPADDTIMEOUT_INTERVAL.
<
******************************************************/
< static void TimerFunc( XtPointer
clientData, XtIntervalId *id )
< {
< Widget w = (Widget)clientData;
<
< /* call ReplayFunc */
< ReplayFunc();
<
< /* re-register this timeout function to be
called again */
< XtAppAddTimeOut ( XtWidgetToApplicationContext (
w ),
<
XTAPPADDTIMEOUT_INTERVAL,
<
TimerFunc, ( XtPointer ) w );
< }
<
<
/******************************************************
< * Function: WorkProcFunc
< *
< * Description: Calls ReplayFunc() repeatedly when the
system is idle.
<
******************************************************/
< static Boolean WorkProcFunc (
XtPointer clientData )
< {
< Widget w = (Widget)clientData;
<
< /* call ReplayFunc */
< ReplayFunc();
<
< if(ReplayReady == 1)
< return (FALSE); /* return FALSE if there's still
work to do */
< else
< return (TRUE);
< }
<
<
/******************************************************
< * Function: InputFunc
< *
< * Description: Calls ReplayFunc() whenever the
<Return> key is pressed
<
******************************************************/
< static void InputFunc( XtPointer
clientData, int *fid, XtInputId *id )
< {
< char buf[1024];
<
< Widget w = (Widget)clientData;
<
< /* call ReplayFunc */
< ReplayFunc();
<
< /* clean out the stdin buffer */
< /* fread( buf, sizeof(char), 1024, *fid ); */
< /* read(*fid, buf, 1024); */
< char ch;
< for (;;)
< {
< ch = getchar();
< if(ch == EOF)
< break;
< }
< }
fileio.cc:
saturn.cs.uml.edu> diff ./fileio.cc
~lechner/bde2alpha_rl/sandbox/bde/src/fileio.cc
559c559
< void ReplayFunc();
---
>
2230,2242c2230
<
/**************************************************************************
< * Function : ReplayFunc
< *
< * Description: Calls the replay_log()
function.
<
**************************************************************************/
< void ReplayFunc()
< {
< if(ReplayReady == 1)
< {
< if( replay_log() == STATE2 )
< ReplayReady
= 0;
< }
< }
---
>
Appendix C: Build Log
To build bde successfully, the following steps can be taken:
1) Copy entire source tree from
~lechner/bde2alpha_rl/sandbox/bde to a local directory:
saturn.cs.uml.edu> cp –R ~lechner/bde2alpha_rl/sandbox/bde .
2) Edit source files to include the
code changes listed in Appendix B.
3) From your local bde directory, run
make:
saturn.cs.uml.edu> make
The build procedure should show the
following output:
saturn.cs.uml.edu> make
making all in ./pr_util...
making all in ./src...
g++ -c -DDEBUG
-DString_REDEFINE_NOT_NEEDED -DBDE_SCHEMA="96subde_schema.h"
-DBDE_VIEW="94sbdeview" -DS94LC -DLCWC -DDEFAULT_LIB_PATH=\"../lib\" -DBDELOG
-g -Wall -I/usr/include
-I../include -I../pr_util
-I/usr/local/lib/g++-include bendpt.cc
bendpt.cc:143: warning: `char rcsid[59]'
defined but not used
../pr_util/94sbde_schema.h:1108: warning:
`char * hcg_tbl_abbr[10]' defined but not used
g++ -c -DDEBUG
-DString_REDEFINE_NOT_NEEDED -DBDE_SCHEMA="96subde_schema.h"
-DBDE_VIEW="94sbdeview" -DS94LC -DLCWC -DDEFAULT_LIB_PATH=\"../lib\" -DBDELOG
-g -Wall -I/usr/include
-I../include -I../pr_util
-I/usr/local/lib/g++-include bendptops.cc
bendptops.cc:91: warning: `char rcsid[62]'
defined but not used
../pr_util/94sbde_schema.h:1108: warning:
`char * hcg_tbl_abbr[10]' defined but not used
g++ -c -DDEBUG
-DString_REDEFINE_NOT_NEEDED
-DBDE_SCHEMA="96subde_schema.h"
-DBDE_VIEW="94sbdeview" -DS94LC -DLCWC -DDEFAULT_LIB_PATH=\"../lib\" -DBDELOG
-g -Wall -I/usr/include
-I../include -I../pr_util
-I/usr/local/lib/g++-include bde.cc
bde.cc:64: warning: `char rcsid[56]'
defined but not used
../pr_util/94sbde_schema.h:1108: warning:
`char * hcg_tbl_abbr[10]' defined but not used
g++ -c -DDEBUG
-DString_REDEFINE_NOT_NEEDED -DBDE_SCHEMA="96subde_schema.h"
-DBDE_VIEW="94sbdeview" -DS94LC -DLCWC -DDEFAULT_LIB_PATH=\"../lib\" -DBDELOG
-g -Wall -I/usr/include
-I../include -I../pr_util
-I/usr/local/lib/g++-include bdeReplay.cc
../pr_util/94sbde_schema.h:1108: warning:
`char * hcg_tbl_abbr[10]' defined but not used
g++ -c -DDEBUG
-DString_REDEFINE_NOT_NEEDED -DBDE_SCHEMA="96subde_schema.h"
-DBDE_VIEW="94sbdeview" -DS94LC -DLCWC -DDEFAULT_LIB_PATH=\"../lib\" -DBDELOG
-g -Wall -I/usr/include
-I../include -I../pr_util
-I/usr/local/lib/g++-include buttonevent.cc
buttonevent.cc:112: warning: `char
rcsid[64]' defined but not used
../pr_util/94sbde_schema.h:1108: warning:
`char * hcg_tbl_abbr[10]' defined but not used
g++ -c -DDEBUG
-DString_REDEFINE_NOT_NEEDED -DBDE_SCHEMA="96subde_schema.h"
-DBDE_VIEW="94sbdeview" -DS94LC -DLCWC -DDEFAULT_LIB_PATH=\"../lib\" -DBDELOG -g -Wall -I/usr/include -I../include
-I../pr_util
-I/usr/local/lib/g++-include captionops.cc
captionops.cc:14: warning: `char
rcsid[63]' defined but not used
../pr_util/94sbde_schema.h:1108: warning:
`char * hcg_tbl_abbr[10]' defined but not used
g++ -c -DDEBUG
-DString_REDEFINE_NOT_NEEDED -DBDE_SCHEMA="96subde_schema.h"
-DBDE_VIEW="94sbdeview" -DS94LC -DLCWC -DDEFAULT_LIB_PATH=\"../lib\" -DBDELOG
-g -Wall -I/usr/include
-I../include -I../pr_util
-I/usr/local/lib/g++-include cursor.cc
cursor.cc:51: warning: `char rcsid[55]'
defined but not used
g++ -c -DDEBUG
-DString_REDEFINE_NOT_NEEDED -DBDE_SCHEMA="96subde_schema.h"
-DBDE_VIEW="94sbdeview" -DS94LC -DLCWC -DDEFAULT_LIB_PATH=\"../lib\" -DBDELOG -g -Wall -I/usr/include -I../include
-I../pr_util
-I/usr/local/lib/g++-include dialog.cc
dialog.cc:124: warning: `char rcsid[59]'
defined but not used
../pr_util/94sbde_schema.h:1108: warning:
`char * hcg_tbl_abbr[10]' defined but not used
g++ -c -DDEBUG
-DString_REDEFINE_NOT_NEEDED -DBDE_SCHEMA="96subde_schema.h"
-DBDE_VIEW="94sbdeview" -DS94LC -DLCWC -DDEFAULT_LIB_PATH=\"../lib\" -DBDELOG
-g -Wall -I/usr/include
-I../include -I../pr_util
-I/usr/local/lib/g++-include display.cc
display.cc:62: warning: `char rcsid[60]'
defined but not used
../pr_util/94sbde_schema.h:1108: warning:
`char * hcg_tbl_abbr[10]' defined but not used
g++ -c -DDEBUG
-DString_REDEFINE_NOT_NEEDED -DBDE_SCHEMA="96subde_schema.h"
-DBDE_VIEW="94sbdeview" -DS94LC -DLCWC -DDEFAULT_LIB_PATH=\"../lib\" -DBDELOG
-g -Wall -I/usr/include
-I../include -I../pr_util
-I/usr/local/lib/g++-include draw.cc
draw.cc:52: warning: `char rcsid[53]'
defined but not used
../pr_util/94sbde_schema.h:1108: warning:
`char * hcg_tbl_abbr[10]' defined but not used
g++ -c -DDEBUG
-DString_REDEFINE_NOT_NEEDED -DBDE_SCHEMA="96subde_schema.h"
-DBDE_VIEW="94sbdeview" -DS94LC -DLCWC -DDEFAULT_LIB_PATH=\"../lib\" -DBDELOG -g -Wall -I/usr/include -I../include
-I../pr_util
-I/usr/local/lib/g++-include edit.cc
edit.cc:69: warning: `char rcsid[58]'
defined but not used
../pr_util/94sbde_schema.h:1108: warning:
`char * hcg_tbl_abbr[10]' defined but not used
g++ -c -DDEBUG
-DString_REDEFINE_NOT_NEEDED -DBDE_SCHEMA="96subde_schema.h"
-DBDE_VIEW="94sbdeview" -DS94LC -DLCWC -DDEFAULT_LIB_PATH=\"../lib\" -DBDELOG -g -Wall -I/usr/include -I../include
-I../pr_util
-I/usr/local/lib/g++-include fileio.cc
fileio.cc: In function `char *
GetCurrentDateAndTime()':
fileio.cc:1948: warning: `%y' yields only
last 2 digits of year
fileio.cc: At top level:
fileio.cc:395: warning: `char rcsid[61]'
defined but not used
../pr_util/94sbde_schema.h:1108: warning:
`char * hcg_tbl_abbr[10]' defined but not used
g++ -c -DDEBUG
-DString_REDEFINE_NOT_NEEDED -DBDE_SCHEMA="96subde_schema.h"
-DBDE_VIEW="94sbdeview" -DS94LC -DLCWC -DDEFAULT_LIB_PATH=\"../lib\" -DBDELOG
-g -Wall -I/usr/include
-I../include -I../pr_util
-I/usr/local/lib/g++-include font.cc
font.cc:55: warning: `char rcsid[58]'
defined but not used
../pr_util/94sbde_schema.h:1108: warning:
`char * hcg_tbl_abbr[10]' defined but not used
g++ -c -DDEBUG
-DString_REDEFINE_NOT_NEEDED -DBDE_SCHEMA="96subde_schema.h"
-DBDE_VIEW="94sbdeview" -DS94LC -DLCWC -DDEFAULT_LIB_PATH=\"../lib\" -DBDELOG
-g -Wall -I/usr/include -I../include
-I../pr_util
-I/usr/local/lib/g++-include fprint.cc
fprint.cc:196: warning: `char rcsid[61]'
defined but not used
../pr_util/94sbde_schema.h:1108: warning:
`char * hcg_tbl_abbr[10]' defined but not used
g++ -c -DDEBUG
-DString_REDEFINE_NOT_NEEDED -DBDE_SCHEMA="96subde_schema.h"
-DBDE_VIEW="94sbdeview" -DS94LC -DLCWC -DDEFAULT_LIB_PATH=\"../lib\" -DBDELOG
-g -Wall -I/usr/include
-I../include -I../pr_util
-I/usr/local/lib/g++-include graphobject.cc
graphobject.cc:174: warning: `char
rcsid[65]' defined but not used
../pr_util/94sbde_schema.h:1108: warning:
`char * hcg_tbl_abbr[10]' defined but not used
g++ -c -DDEBUG
-DString_REDEFINE_NOT_NEEDED -DBDE_SCHEMA="96subde_schema.h"
-DBDE_VIEW="94sbdeview" -DS94LC -DLCWC -DDEFAULT_LIB_PATH=\"../lib\" -DBDELOG
-g -Wall -I/usr/include
-I../include -I../pr_util
-I/usr/local/lib/g++-include graphops.cc
graphops.cc:127: warning: `char rcsid[61]'
defined but not used
../pr_util/94sbde_schema.h:1108: warning:
`char * hcg_tbl_abbr[10]' defined but not used
g++ -c -DDEBUG
-DString_REDEFINE_NOT_NEEDED -DBDE_SCHEMA="96subde_schema.h"
-DBDE_VIEW="94sbdeview" -DS94LC -DLCWC -DDEFAULT_LIB_PATH=\"../lib\" -DBDELOG
-g -Wall -I/usr/include
-I../include -I../pr_util
-I/usr/local/lib/g++-include handler.cc
handler.cc:47: warning: `char rcsid[60]'
defined but not used
g++ -c -DDEBUG
-DString_REDEFINE_NOT_NEEDED -DBDE_SCHEMA="96subde_schema.h"
-DBDE_VIEW="94sbdeview" -DS94LC -DLCWC -DDEFAULT_LIB_PATH=\"../lib\" -DBDELOG
-g -Wall -I/usr/include
-I../include -I../pr_util
-I/usr/local/lib/g++-include help.cc
help.cc:41: warning: `char rcsid[52]'
defined but not used
g++ -c -DDEBUG
-DString_REDEFINE_NOT_NEEDED -DBDE_SCHEMA="96subde_schema.h"
-DBDE_VIEW="94sbdeview" -DS94LC -DLCWC -DDEFAULT_LIB_PATH=\"../lib\" -DBDELOG
-g -Wall -I/usr/include
-I../include -I../pr_util
-I/usr/local/lib/g++-include hlink.cc
hlink.cc:141: warning: `char rcsid[58]'
defined but not used
../pr_util/94sbde_schema.h:1108: warning:
`char * hcg_tbl_abbr[10]' defined but not used
g++ -c -DDEBUG
-DString_REDEFINE_NOT_NEEDED -DBDE_SCHEMA="96subde_schema.h"
-DBDE_VIEW="94sbdeview" -DS94LC -DLCWC -DDEFAULT_LIB_PATH=\"../lib\" -DBDELOG
-g -Wall -I/usr/include
-I../include -I../pr_util
-I/usr/local/lib/g++-include infodialog.cc
infodialog.cc:42: warning: `char
rcsid[64]' defined but not used
g++ -c -DDEBUG
-DString_REDEFINE_NOT_NEEDED -DBDE_SCHEMA="96subde_schema.h"
-DBDE_VIEW="94sbdeview" -DS94LC -DLCWC -DDEFAULT_LIB_PATH=\"../lib\" -DBDELOG
-g -Wall -I/usr/include
-I../include -I../pr_util
-I/usr/local/lib/g++-include infomessage.cc
infomessage.cc:43: warning: `char
rcsid[59]' defined but not used
g++ -c -DDEBUG
-DString_REDEFINE_NOT_NEEDED -DBDE_SCHEMA="96subde_schema.h"
-DBDE_VIEW="94sbdeview" -DS94LC -DLCWC -DDEFAULT_LIB_PATH=\"../lib\" -DBDELOG
-g -Wall -I/usr/include -I../include
-I../pr_util
-I/usr/local/lib/g++-include init.cc
init.cc:172: warning: `char rcsid[57]'
defined but not used
../pr_util/94sbde_schema.h:1108: warning:
`char * hcg_tbl_abbr[10]' defined but not used
g++ -c -DDEBUG
-DString_REDEFINE_NOT_NEEDED -DBDE_SCHEMA="96subde_schema.h"
-DBDE_VIEW="94sbdeview" -DS94LC -DLCWC -DDEFAULT_LIB_PATH=\"../lib\" -DBDELOG
-g -Wall -I/usr/include
-I../include -I../pr_util
-I/usr/local/lib/g++-include initClasses.cc
initClasses.cc:65: warning: `char
rcsid[64]' defined but not used
../pr_util/94sbde_schema.h:1108: warning:
`char * hcg_tbl_abbr[10]' defined but not used
g++ -c -DDEBUG
-DString_REDEFINE_NOT_NEEDED -DBDE_SCHEMA="96subde_schema.h"
-DBDE_VIEW="94sbdeview" -DS94LC -DLCWC -DDEFAULT_LIB_PATH=\"../lib\" -DBDELOG
-g -Wall -I/usr/include
-I../include -I../pr_util
-I/usr/local/lib/g++-include leftmenu.cc
leftmenu.cc:59: warning: `char rcsid[61]'
defined but not used
g++ -c -DDEBUG
-DString_REDEFINE_NOT_NEEDED -DBDE_SCHEMA="96subde_schema.h"
-DBDE_VIEW="94sbdeview" -DS94LC -DLCWC -DDEFAULT_LIB_PATH=\"../lib\" -DBDELOG
-g -Wall -I/usr/include
-I../include -I../pr_util
-I/usr/local/lib/g++-include leftmenu_cb.cc
leftmenu_cb.cc:156: warning: `char
rcsid[64]' defined but not used
g++ -c -DDEBUG
-DString_REDEFINE_NOT_NEEDED -DBDE_SCHEMA="96subde_schema.h"
-DBDE_VIEW="94sbdeview" -DS94LC -DLCWC -DDEFAULT_LIB_PATH=\"../lib\" -DBDELOG
-g -Wall -I/usr/include
-I../include -I../pr_util
-I/usr/local/lib/g++-include linkops.cc
linkops.cc:69: warning: `char rcsid[60]'
defined but not used
../pr_util/94sbde_schema.h:1108: warning:
`char * hcg_tbl_abbr[10]' defined but not used
g++ -c -DDEBUG
-DString_REDEFINE_NOT_NEEDED -DBDE_SCHEMA="96subde_schema.h"
-DBDE_VIEW="94sbdeview" -DS94LC -DLCWC -DDEFAULT_LIB_PATH=\"../lib\" -DBDELOG
-g -Wall -I/usr/include
-I../include -I../pr_util
-I/usr/local/lib/g++-include menubar.cc
menubar.cc:67: warning: `char rcsid[60]'
defined but not used
g++ -c -DDEBUG
-DString_REDEFINE_NOT_NEEDED -DBDE_SCHEMA="96subde_schema.h"
-DBDE_VIEW="94sbdeview" -DS94LC -DLCWC -DDEFAULT_LIB_PATH=\"../lib\" -DBDELOG
-g -Wall -I/usr/include
-I../include -I../pr_util
-I/usr/local/lib/g++-include menubar_cb.cc
menubar_cb.cc:62: warning: `char
rcsid[63]' defined but not used
g++ -c -DDEBUG
-DString_REDEFINE_NOT_NEEDED -DBDE_SCHEMA="96subde_schema.h"
-DBDE_VIEW="94sbdeview" -DS94LC -DLCWC -DDEFAULT_LIB_PATH=\"../lib\" -DBDELOG
-g -Wall -I/usr/include
-I../include -I../pr_util
-I/usr/local/lib/g++-include msgBox.cc
msgBox.cc:45: warning: `char rcsid[54]'
defined but not used
../pr_util/94sbde_schema.h:1108: warning:
`char * hcg_tbl_abbr[10]' defined but not used
g++ -c -DDEBUG
-DString_REDEFINE_NOT_NEEDED -DBDE_SCHEMA="96subde_schema.h"
-DBDE_VIEW="94sbdeview" -DS94LC -DLCWC -DDEFAULT_LIB_PATH=\"../lib\" -DBDELOG
-g -Wall -I/usr/include
-I../include -I../pr_util
-I/usr/local/lib/g++-include nodeops.cc
nodeops.cc:129: warning: `char rcsid[61]'
defined but not used
../pr_util/94sbde_schema.h:1108: warning:
`char * hcg_tbl_abbr[10]' defined but not used
g++ -c -DDEBUG
-DString_REDEFINE_NOT_NEEDED -DBDE_SCHEMA="96subde_schema.h"
-DBDE_VIEW="94sbdeview" -DS94LC -DLCWC -DDEFAULT_LIB_PATH=\"../lib\" -DBDELOG
-g -Wall -I/usr/include
-I../include -I../pr_util
-I/usr/local/lib/g++-include select.cc
select.cc:61: warning: `char rcsid[59]'
defined but not used
../pr_util/94sbde_schema.h:1108: warning:
`char * hcg_tbl_abbr[10]' defined but not used
g++ -c -DDEBUG
-DString_REDEFINE_NOT_NEEDED -DBDE_SCHEMA="96subde_schema.h"
-DBDE_VIEW="94sbdeview" -DS94LC -DLCWC -DDEFAULT_LIB_PATH=\"../lib\" -DBDELOG
-g -Wall -I/usr/include
-I../include -I../pr_util
-I/usr/local/lib/g++-include smselect.cc
smselect.cc:110: warning: `char rcsid[61]'
defined but not used
../pr_util/94sbde_schema.h:1108: warning:
`char * hcg_tbl_abbr[10]' defined but not used
g++ -c -DDEBUG
-DString_REDEFINE_NOT_NEEDED -DBDE_SCHEMA="96subde_schema.h"
-DBDE_VIEW="94sbdeview" -DS94LC -DLCWC -DDEFAULT_LIB_PATH=\"../lib\" -DBDELOG
-g -Wall -I/usr/include
-I../include -I../pr_util
-I/usr/local/lib/g++-include strdup.cc
strdup.cc:43: warning: `char rcsid[60]'
defined but not used
g++ -c -DDEBUG
-DString_REDEFINE_NOT_NEEDED -DBDE_SCHEMA="96subde_schema.h"
-DBDE_VIEW="94sbdeview" -DS94LC -DLCWC -DDEFAULT_LIB_PATH=\"../lib\" -DBDELOG
-g -Wall -I/usr/include
-I../include -I../pr_util
-I/usr/local/lib/g++-include text.cc
text.cc:120: warning: `char rcsid[57]'
defined but not used
../pr_util/94sbde_schema.h:1108: warning:
`char * hcg_tbl_abbr[10]' defined but not used
g++ -c -DDEBUG
-DString_REDEFINE_NOT_NEEDED -DBDE_SCHEMA="96subde_schema.h"
-DBDE_VIEW="94sbdeview" -DS94LC -DLCWC -DDEFAULT_LIB_PATH=\"../lib\" -DBDELOG
-g -Wall -I/usr/include -I../include
-I../pr_util
-I/usr/local/lib/g++-include textops.cc
textops.cc:173: warning: `char rcsid[60]'
defined but not used
../pr_util/94sbde_schema.h:1108: warning:
`char * hcg_tbl_abbr[10]' defined but not used
rm -f bde
cxx -o bde -O2 -call_shared -L/usr/lib bendpt.o
bendptops.o
bde.o
bdeReplay.o
buttonevent.o
captionops.o
cursor.o
dialog.o
display.o
draw.o
edit.o
fileio.o
font.o
fprint.o
graphobject.o
graphops.o
handler.o
help.o
hlink.o
infodialog.o
infomessage.o
init.o
initClasses.o
leftmenu.o
leftmenu_cb.o
linkops.o
menubar.o
menubar_cb.o
msgBox.o
nodeops.o
select.o
smselect.o
strdup.o
text.o
textops.o ../pr_util/pr_util.a -lXm -lXt -lX11 -lm
ld (prelink):
../pr_util/pr_util.a(pr_log.o):
replay_log: multiply defined
ld:
../pr_util/pr_util.a(pr_log.o):
replay_log: multiply defined
Unresolved:
__builtin_new
__throw
__builtin_delete
terminate__Fv
__rtti_si
__rtti_user
__eprintf
*** Exit 1
Stop.
*** Exit 1
Stop.
4) Change your working directory to
./src:
saturn.cs.uml.edu> cd src
5) Execute the following custom link:
saturn.cs.uml.edu> g++ -g -o bde.exe
-L/usr/lib bendpt.o bendptops.o bde.o bdeReplay.o buttonevent.o captionops.o
cursor.o dialog.o display.o draw.o edit.o fileio.o font.o fprint.o
graphobject.o graphops.o handler.o help.o hlink.o infodialog.o infomessage.o
init.o initClasses.o leftmenu.o leftmenu_cb.o linkops.o menubar.o menubar_cb.o
msgBox.o nodeops.o select.o smselect.o strdup.o text.o textops.o
../pr_util/pr_util.a -lXm -lXt -lX11 -lm
You should now have a bde.exe executable located in your .src
directory.
Appendix D: Testing
of Xt Callback Functions
Tests were performed using Sathya’s test data and log files: mylogDB1.dat and mylog.txt,
respectively. Both files were
placed in the same directory as the bde.exe executable and then bde was invoked
via the command-line:
saturn.cs.uml.edu> bde.exe mylog.txt
Three tests were run, each after uncommenting a particular
callback function and commenting out the other two then rebuilding bde. The results are as follows:
Test A: TimerFunc( ( XtPointer) canvas, NULL )
was uncommented in init.cc, XtAppAddWorkProc(…) and XtAppAddInput(…) were
commented out.
Results: The replay of the log file occurred in
steps of 5 second increments, exactly as expected.
Test B: XtAppAddWorkProc( app, WorkProcFunc,
canvas ) was uncommented in init.cc, TimerFunc(…) and XtAppAddInput(…) were
commented out.
Results: The replay of the log file occurred in
steps more frequent than that of Test A, as expected. I was testing remotely via an X server, so the steps appeared
to be 2 or 3 seconds apart.
However if testing at the console without network latency, I would
expect much more frequent steps.
Test C: XtAppAddInput(app, fileno(stdin),
(XtPointer)XtInputReadMask, InputFunc, canvas ) was uncommented in init.cc, TimerFunc(…)
and XtAppAddWorkProc(…) were commented out.
Results: The replay of the log file occurred in
steps, one step per press of the <return> key, as expected.
Summary of testing: All tests were
successful and performed as expected.