Return to BSD News archive
Xref: sserve comp.os.386bsd.questions:7758 comp.os.386bsd.development:1665
Newsgroups: comp.os.386bsd.questions,comp.os.386bsd.development
Path: sserve!newshost.anu.edu.au!munnari.oz.au!bunyip.cc.uq.oz.au!harbinger.cc.monash.edu.au!yeshua.marcam.com!usc!howland.reston.ans.net!xlink.net!zib-berlin.de!math.fu-berlin.de!nebsy.nt.fh-koeln.de!rrz.uni-koeln.de!teralon!channelz!swildner
From: swildner@channelz.GUN.de (Sascha Wildner)
Subject: Re: [FreeBSD 1.0R] How to compile XChess? [patches]
In-Reply-To: nate@bsd.coe.montana.edu's message of 5 Jan 1994 21:54:27 GMT
References: <SWILDNER.94Jan5174209@channelz.gun.de> <2gfcuj$9he@pdq.coe.montana.edu>
Sender: swildner@channelz.GUN.de (Sascha Wildner)
Organization: Frogs with dirty little lips
Date: 06 Jan 1994 22:45:10 GMT
Message-ID: <SWILDNER.94Jan6234510@channelz.GUN.de>
Lines: 145
In article <2gfcuj$9he@pdq.coe.montana.edu> nate@bsd.coe.montana.edu (Nate Williams) writes:
To be honest, your best bet would be to grab the latest version from
wherever and see if it compiles. I don't believe anyone has even
looked at XChess, we just left it in there for historic reasons. If
you get that version working, we'd be glad to roll the patches into
the next version.
What follows are the changes I made to make XChess compile. There are
still a couple of bugs left which maybe someone else will fix.
diff -cr Xchess.orig/Makefile Xchess/Makefile
*** Xchess.orig/Makefile Sat Jun 12 16:40:51 1993
--- Xchess/Makefile Thu Jan 6 23:24:52 1994
***************
*** 47,61 ****
ALLFILES = $(SOURCE) $(HFILES)
! INCLUDE = -I.
! DEFINES = -DDEF_PROGRAM=\"gnuchess\"
CFLAGS = $(DEFINES) $(INCLUDE)
LINTFLAGS = -u -z -lc -DLINT $(DEFINES) $(INCLUDE)
LINTLIB = ../lib/llib-lX.ln
#LDFLAGS = -L/usr2/X/lib -z -lX -lm
! LDFLAGS = -loldX -lX11 -z -lX -lm
GPLDFLAGS = -z -loldX -lX11 -lXMenu_p -lX -lm_p -g -pg
.c.o: $*.c
--- 47,61 ----
ALLFILES = $(SOURCE) $(HFILES)
! INCLUDE = -I. -I/usr/X386/include
! DEFINES = -DDEF_PROGRAM=\"/usr/bin/chess\"
CFLAGS = $(DEFINES) $(INCLUDE)
LINTFLAGS = -u -z -lc -DLINT $(DEFINES) $(INCLUDE)
LINTLIB = ../lib/llib-lX.ln
#LDFLAGS = -L/usr2/X/lib -z -lX -lm
! LDFLAGS = -L/usr/X386/lib -loldX -lX11 -z -lm
GPLDFLAGS = -z -loldX -lX11 -lXMenu_p -lX -lm_p -g -pg
.c.o: $*.c
diff -cr Xchess.orig/program.c Xchess/program.c
*** Xchess.orig/program.c Sat Jun 12 16:40:59 1993
--- Xchess/program.c Thu Jan 6 22:50:32 1994
***************
*** 144,151 ****
--- 144,155 ----
/* Do a poll... */
+ #ifdef __386BSD__
+ if (!(i = select(32, &rfd, &wfd, &xfd, ¬ime))) {
+ #else
if (!(i = select(32, &rfd, &wfd, &xfd, ¬ime)) &&
!from->_cnt) { /* Bad stuff... */
+ #endif
if (debug)
fprintf(stderr, "poll: nothing\n");
return (NULL);
diff -cr Xchess.orig/scrollText.c Xchess/scrollText.c
*** Xchess.orig/scrollText.c Sat Jun 12 16:41:02 1993
--- Xchess/scrollText.c Thu Jan 6 23:05:13 1994
***************
*** 624,632 ****
--- 624,638 ----
XFillRectangle(display, textInfo->scrollBar,
textInfo->bgGC,
0, 0, BARSIZE, top-1);
+ #ifdef __386BSD__
XFillRectangle(display, textInfo->scrollBar,
DEFAULT_GC, top, BARSIZE - (2*BARBORDER) - 2,
+ BARSIZE, bottom - top);
+ #else
+ XFillRectangle(display, textInfo->scrollBar,
+ DEFAULT_GC, top, BARSIZE - (2*BARBORDER) - 2,
bottom - top);
+ #endif
XFillRectangle(display, textInfo->scrollBar, DEFAULT_GC,
0, bottom+1, BARSIZE,
textInfo->h - (2 * BARBORDER) - bottom);
***************
*** 1051,1060 ****
--- 1057,1073 ----
(XID) win);
/* First, draw the arrow */
+ #ifdef __386BSD__
+ XCopyArea(display, textInfo->arrowMap, textInfo->mainWindow,
+ textInfo->CursorGC,
+ 0, 0, arrow_width, arrow_height,
+ x, y + h - arrow_height);
+ #else
XCopyArea(display, textInfo->arrowMap, textInfo->mainWindow,
textInfo->CursorGC,
0, 0, arrow_width, arrow_height,
x, y + h - arrow_height, 1);
+ #endif
/* Then draw the stem */
XDrawLine(display, textInfo->mainWindow, textInfo->CursorGC,
***************
*** 1567,1575 ****
--- 1580,1594 ----
textInfo->endLine = FindEndLine(textInfo, &(textInfo->bottomSpace));
/* Clear out bottom space region */
+ #ifdef __386BSD__
+ XClearArea(display, textInfo->mainWindow,
+ 0, textInfo->h - textInfo->bottomSpace,
+ textInfo->w, textInfo->bottomSpace, 1);
+ #else
XClearArea(display, textInfo->mainWindow,
0, textInfo->h - textInfo->bottomSpace,
textInfo->w, textInfo->bottomSpace);
+ #endif
UpdateExposures(display, textInfo);
UpdateScroll(display, textInfo);
diff -cr Xchess.orig/std.c Xchess/std.c
*** Xchess.orig/std.c Sat Jun 12 16:40:53 1993
--- Xchess/std.c Thu Jan 6 23:07:50 1994
***************
*** 344,350 ****
--- 344,352 ----
char *s;
{
fputs("Internal Error: ", stderr);
+ #ifndef __386BSD__
_doprnt(s, &args, stderr);
+ #endif
putc('\n', stderr);
kill(getpid(), SIGIOT);
--
Sascha Wildner, Am Druvendriesch 27, 50354 Huerth, Germany
GC d--- p--- c++ l- m-- s-/- !g w+ t+ r x+