summaryrefslogtreecommitdiffstats
path: root/gnu
diff options
context:
space:
mode:
authordg <dg@FreeBSD.org>1994-01-07 11:10:42 +0000
committerdg <dg@FreeBSD.org>1994-01-07 11:10:42 +0000
commita9274b5d2eb1fd76fc79c3b5a8d762230f0e9222 (patch)
tree72354958917cddf82d04490731edadc4a54e840f /gnu
parentd50dbe52e28ccee574f86f1a2a35becd1ee36126 (diff)
downloadFreeBSD-src-a9274b5d2eb1fd76fc79c3b5a8d762230f0e9222.zip
FreeBSD-src-a9274b5d2eb1fd76fc79c3b5a8d762230f0e9222.tar.gz
From: swildner@channelz.GUN.de (Sascha Wildner)
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.
Diffstat (limited to 'gnu')
-rw-r--r--gnu/games/chess/Xchess/Makefile10
-rw-r--r--gnu/games/chess/Xchess/program.c8
-rw-r--r--gnu/games/chess/Xchess/scrollText.c19
-rw-r--r--gnu/games/chess/Xchess/std.c6
4 files changed, 34 insertions, 9 deletions
diff --git a/gnu/games/chess/Xchess/Makefile b/gnu/games/chess/Xchess/Makefile
index c6afd8f..d8892e2 100644
--- a/gnu/games/chess/Xchess/Makefile
+++ b/gnu/games/chess/Xchess/Makefile
@@ -1,5 +1,5 @@
-# RCS Info: $Revision: 1.5 $ on $Date: 86/11/26 12:09:19 $
-# $Source: /users/faustus/xchess/RCS/Makefile,v $
+# RCS Info: $Revision: 1.1.1.1 $ on $Date: 1993/06/12 14:41:05 $
+# $Source: /a/cvs/386BSD/src/gnu/chess/Xchess/Makefile,v $
# Copyright (c) 1985 Wayne A. Christopher, U. C. Berkeley CAD Group
#
# Makefile for xchess.
@@ -47,15 +47,15 @@ SOURCE = $(CFILES)
ALLFILES = $(SOURCE) $(HFILES)
-INCLUDE = -I.
+INCLUDE = -I. -I/usr/X386/include
-DEFINES = -DDEF_PROGRAM=\"gnuchess\"
+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 = -loldX -lX11 -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 --git a/gnu/games/chess/Xchess/program.c b/gnu/games/chess/Xchess/program.c
index 876f29c..59df70c 100644
--- a/gnu/games/chess/Xchess/program.c
+++ b/gnu/games/chess/Xchess/program.c
@@ -20,8 +20,8 @@ file named COPYING. Among other things, the copyright notice
and this notice must be preserved on all copies. */
-/* RCS Info: $Revision: 1.2 $ on $Date: 86/11/23 17:18:10 $
- * $Source: /users/faustus/xchess/RCS/program.c,v $
+/* RCS Info: $Revision: 1.1.1.1 $ on $Date: 1993/06/12 14:41:13 $
+ * $Source: /a/cvs/386BSD/src/gnu/chess/Xchess/program.c,v $
* Copyright (c) 1986 Wayne A. Christopher, U. C. Berkeley CAD Group
* Permission is granted to do anything with this code except sell it
* or remove this message.
@@ -144,8 +144,12 @@ program_get()
/* Do a poll... */
+#ifdef __386BSD__
+ if (!(i = select(32, &rfd, &wfd, &xfd, &notime))) {
+#else
if (!(i = select(32, &rfd, &wfd, &xfd, &notime)) &&
!from->_cnt) { /* Bad stuff... */
+#endif
if (debug)
fprintf(stderr, "poll: nothing\n");
return (NULL);
diff --git a/gnu/games/chess/Xchess/scrollText.c b/gnu/games/chess/Xchess/scrollText.c
index 4320710..847b41c 100644
--- a/gnu/games/chess/Xchess/scrollText.c
+++ b/gnu/games/chess/Xchess/scrollText.c
@@ -624,9 +624,15 @@ struct txtWin *textInfo; /* Text window information */
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,10 +1057,17 @@ int col; /* Color of indicator */
(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,9 +1580,15 @@ struct txtWin *textInfo; /* Text window information */
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 --git a/gnu/games/chess/Xchess/std.c b/gnu/games/chess/Xchess/std.c
index c839b91..cba72a7 100644
--- a/gnu/games/chess/Xchess/std.c
+++ b/gnu/games/chess/Xchess/std.c
@@ -20,8 +20,8 @@ file named COPYING. Among other things, the copyright notice
and this notice must be preserved on all copies. */
-/* RCS Info: $Revision: 1.1 $ on $Date: 86/11/01 17:08:40 $
- * $Source: /users/faustus/xchess/RCS/std.c,v $
+/* RCS Info: $Revision: 1.1.1.1 $ on $Date: 1993/06/12 14:41:07 $
+ * $Source: /a/cvs/386BSD/src/gnu/chess/Xchess/std.c,v $
* Copyright (c) 1985 Wayne A. Christopher, U. C. Berkeley CAD Group
*
* Utility routines.
@@ -344,7 +344,9 @@ fatal(s, args)
char *s;
{
fputs("Internal Error: ", stderr);
+#ifndef __386BSD__
_doprnt(s, &args, stderr);
+#endif
putc('\n', stderr);
kill(getpid(), SIGIOT);
OpenPOWER on IntegriCloud