Path: utzoo!news-server.csri.toronto.edu!cs.utexas.edu!uunet!mcsun!hp4nl!fwi.uva.nl!smagt From: smagt@fwi.uva.nl (Patrick van der Smagt) Newsgroups: comp.ai.neural-nets Subject: Patches for RCS X11R4 - diff Keywords: rochester connectionist simulator, X11R4 Message-ID: <1991Mar12.083618.27824@fwi.uva.nl> Date: 12 Mar 91 08:36:18 GMT Sender: news@fwi.uva.nl Organization: FWI, University of Amsterdam Lines: 105 Nntp-Posting-Host: chris.fwi.uva.nl I gathered there might be interest for this, and Look Here! somebody just requested it: the patches to upgrade the X11 graphics interface of the rochester connectionist simulator from R3 to R4. Part of it I obtained from stolcke%icsib12.Berkeley.EDU@jade.berkeley.edu (Andreas Stolcke), the rest I added myself. Sorry, it's a diff file so you have to patch by hand. I also made an ed script; for those of you who dare to use that, it's in the next message. Patrick van der Smagt >In case you don't want to wait for the `offical' patch, here's one that >got the X interface to work under X11R4, tested on Sun4/SunOS4.0.3 and >Sun3/SunOS3.5. > >It assumes you have applied the first two MIT fixes to the >X11R4 distribution (although this might not really be necessary) and you >compiled and installed the Xaw library with the backwards compatibility >option. > >The following stuff in XGI needed fixing: > > o Compile everything with -DXAW_BC. > o Add -lXext for linkage of the final simulator. > o Most popup shells have to be topLevelShells to allow window manager > interaction. > o Add a width arg to the "display_box" widget to stop it from > complaining about `width/height zero'. > o Remove an incompatible access to the guts of a Panel widget in > display_panel.c. > >Eventually one wants to get rid of the XAW_BC stuff and make use of the >new R4 features (such as the menus in Xaw), but for the time being these >couple of changes should do the job. > >Apply the patch with `patch -p0' at the root of the simulator distribution >and then remake makesim and src/xgi. You also might have to patch the >top-level makefile to point to the X11R4 installation. > >Andreas diff src/xgi/Makefile src/xgi.R3/Makefile 19c19 < FLAGS = $(CFLAGS) -I$(IDIR) -I$(XINCROOT) -DXAW_BC -Dindex=list_index --- > FLAGS = $(CFLAGS) -I$(IDIR) -I$(XINCROOT) diff src/xgi/control_panel.c src/xgi.R3/control_panel.c 434c434 < gi_layout_panel = XtCreatePopupShell("LAYOUT",topLevelShellWidgetClass, --- > gi_layout_panel = XtCreatePopupShell("LAYOUT",transientShellWidgetClass, 743c743 < namepopup = XtCreatePopupShell("RCS HELP",topLevelShellWidgetClass, --- > namepopup = XtCreatePopupShell("RCS HELP",transientShellWidgetClass, diff src/xgi/display_panel.c src/xgi.R3/display_panel.c 47,48c47 < #include < #include --- > #include 875,876c874 < {XtNheight, (XtArgVal) 100 }, < {XtNwidth, (XtArgVal) 100 }, --- > {XtNheight, (XtArgVal) 0 }, 934c932 < ipanel->popup = XtCreatePopupShell("display_shell",topLevelShellWidgetClass, --- > ipanel->popup = XtCreatePopupShell("display_shell",transientShellWidgetClass, 955a954 > a[0].value = (XtArgVal) 100; 978c977 < /* the next two statements depend on the internals of VPaned.c --- > /* the next two statements depend on the internals of VPaned.c */ 981d979 < */ 983c981 < /* change the cursor on the graphics panel to a crosshair */ --- > /* change the cursor on the graphics panel to a crosshair */ Common subdirectories: src/xgi/icon and src/xgi.R3/icon diff src/xgi/info_panel.c src/xgi.R3/info_panel.c 191c191 < ipanel->popup = XtCreatePopupShell("info_shell",topLevelShellWidgetClass, --- > ipanel->popup = XtCreatePopupShell("info_shell",transientShellWidgetClass, 314a315 > ForceBuildLineTable(ip->text); /* grepped from X11/lib/Xaw/Text.c */ diff bin/makesim-dist makesim-dist.R3 233,236c233 < if test "$graphics" -a "$xwindows" < then < cflag="$cflag -I$xincroot -DXAW_BC" < fi --- > 511c508 < gflag=" -lm -L$xusrlibdir -lXaw -lXmu -lXt -lXext -lX11" --- > gflag=" -lm -L$xusrlibdir -lXaw -lXmu -lXt -lX11"