minimal damage control. make void functions void.

pleases clang, still happy on gcc
okay sthen@
This commit is contained in:
espie 2017-04-16 10:59:51 +00:00
parent af2ea6805e
commit a4a97f9d9e
3 changed files with 122 additions and 13 deletions

View File

@ -1,6 +1,6 @@
$OpenBSD: patch-gfx_c,v 1.2 2008/10/10 22:58:16 sthen Exp $
--- gfx.c.orig Sat Sep 28 18:46:10 1991
+++ gfx.c Sat Aug 2 19:41:42 2008
$OpenBSD: patch-gfx_c,v 1.3 2017/04/16 10:59:51 espie Exp $
--- gfx.c.orig Sat Sep 28 19:46:10 1991
+++ gfx.c Sun Apr 16 12:08:18 2017
@@ -15,6 +15,7 @@
*/
#include "defs.h"
@ -9,7 +9,20 @@ $OpenBSD: patch-gfx_c,v 1.2 2008/10/10 22:58:16 sthen Exp $
#ifdef ROUND_CARDS
#include <X11/Xmu/Drawing.h>
@@ -166,7 +167,7 @@ unsigned long redpixel;
@@ -111,6 +112,12 @@ static GC backgc;
static int back_delta_x, back_delta_y; /* how much to modify the TS origin by */
+/* all ints because of K&R promotion rules */
+void draw_did(int suit, int x, int y);
+void draw_center_pip(int suit, int x, int y);
+void draw_six_pips(int suit, int x, int y);
+void draw_eight_pips(int suit, int x, int y);
+
#ifndef SMALL_CARDS
static Bool card_is_clipped; /* optimizer for card drawing */
#endif
@@ -166,7 +173,7 @@ unsigned long redpixel;
gcflags |= GCFont;
textgc = XCreateGC(dpy, RootWindow(dpy, screen), gcflags, &gcv);
@ -18,3 +31,59 @@ $OpenBSD: patch-gfx_c,v 1.2 2008/10/10 22:58:16 sthen Exp $
tmpmap = XCreateBitmapFromData(dpy, RootWindow(dpy, screen),
logo_bits, logo_width, logo_height);
@@ -566,6 +573,7 @@ force_redraw()
*
* REMIND -- spread the deck a bit to show that there's more
*/
+void
redraw_deck(x, y, w, h)
int x, y, w, h;
{
@@ -599,6 +607,7 @@ CardPtr tmp;
}
+void
redraw_card_piles(x, y, w, h)
int x, y, w, h;
{
@@ -641,6 +650,7 @@ CardPtr tmp;
}
+void
redraw_card_stacks(x, y, w, h)
int x, y, w, h;
{
@@ -1011,6 +1021,7 @@ int w, h;
*
* location is for center of pip
*/
+void
draw_did(suit, x, y)
Suit suit;
int x,y;
@@ -1051,6 +1062,7 @@ int w, h;
/*
* draws big center pip
*/
+void
draw_center_pip(suit, x, y)
Suit suit;
int x,y;
@@ -1110,6 +1122,7 @@ int x,y;
draw_did(suit, x + CARD_COL3_X, y + CARD_ROW5_Y);
}
+void
draw_six_pips(suit, x, y)
Suit suit;
int x, y;
@@ -1129,6 +1142,7 @@ int x, y;
draw_did(suit, x + CARD_COL3_X, y + CARD_ROW5_Y);
}
+void
draw_eight_pips(suit, x, y)
Suit suit;
int x,y;

View File

@ -1,5 +1,5 @@
--- movelog.c.orig Sat Sep 28 19:46:17 1991
+++ movelog.c Sat May 22 23:29:46 2010
+++ movelog.c Sun Apr 16 12:11:24 2017
@@ -17,6 +17,7 @@
#include "defs.h"
#include "globals.h"
@ -8,7 +8,7 @@
#include <sys/file.h>
#include <ctype.h>
#ifdef SVR4
@@ -31,7 +32,10 @@ static int cache_size = 0;
@@ -31,7 +32,11 @@ static int cache_size = 0;
int deck_cache[NUM_CARDS];
int deck_index = 0;
@ -16,10 +16,34 @@
extern int cheat_count;
+static int card_to_int(CardPtr);
+static int restore_game(char *, char *);
+void read_file(char *fname);
make_deck_cache()
{
@@ -745,6 +749,7 @@ char *fname;
@@ -93,6 +98,7 @@ Bool *exposed;
*exposed = (val >= 14);
}
+void
undo()
{
int val;
@@ -572,6 +578,7 @@ int val;
}
}
+void
write_file(fname, confirmer)
char *fname;
Bool (*confirmer)();
@@ -739,12 +746,14 @@ char *fname;
}
}
+void
read_file(fname)
char *fname;
{
FILE *fp;
char buf[1024], buf2[1024];
char *dp;
@ -27,7 +51,7 @@
fname = remove_newlines(fname);
if ((fp = fopen(fname, "r")) == NULL) {
@@ -756,7 +761,8 @@ char *dp;
@@ -756,7 +765,8 @@ char *dp;
/* read card string */
dp = buf;
@ -37,7 +61,7 @@
if (*dp == '\n') /* ignore any CR */
continue;
if (*dp == '.')
@@ -767,7 +773,8 @@ char *dp;
@@ -767,7 +777,8 @@ char *dp;
/* read moves string */
dp = buf2;

View File

@ -1,6 +1,6 @@
$OpenBSD: patch-spider_c,v 1.2 2008/10/10 22:58:16 sthen Exp $
--- spider.c.orig Sat Sep 28 18:46:12 1991
+++ spider.c Sat Aug 2 19:41:42 2008
$OpenBSD: patch-spider_c,v 1.3 2017/04/16 10:59:51 espie Exp $
--- spider.c.orig Sat Sep 28 19:46:12 1991
+++ spider.c Sun Apr 16 12:09:09 2017
@@ -17,7 +17,7 @@
#include "defs.h"
#include "globals.h"
@ -10,7 +10,15 @@ $OpenBSD: patch-spider_c,v 1.2 2008/10/10 22:58:16 sthen Exp $
static void fix_coords();
int deltamod = 0;
@@ -619,7 +619,7 @@ Type type;
@@ -218,6 +218,7 @@ int num;
/*
* deal hand of 10
*/
+void
deal_next_hand(log)
Bool log;
{
@@ -619,7 +620,7 @@ Type type;
return (type_names[type]);
}
@ -19,3 +27,11 @@ $OpenBSD: patch-spider_c,v 1.2 2008/10/10 22:58:16 sthen Exp $
/*
@@ -936,6 +937,7 @@ char buf[128];
/*
* print cards in list
*/
+void
expand(list)
CardList list;
{