diff options
author | Patrick J Volkerding <volkerdi@slackware.com> | 2009-08-26 10:00:38 -0500 |
---|---|---|
committer | Eric Hameleers <alien@slackware.com> | 2018-05-31 22:41:17 +0200 |
commit | 5a12e7c134274dba706667107d10d231517d3e05 (patch) | |
tree | 55718d5acb710fde798d9f38d0bbaf594ed4b296 /source/xap/xgames/spider.diff | |
download | current-5a12e7c134274dba706667107d10d231517d3e05.tar.gz current-5a12e7c134274dba706667107d10d231517d3e05.tar.xz |
Slackware 13.0slackware-13.0
Wed Aug 26 10:00:38 CDT 2009
Slackware 13.0 x86_64 is released as stable! Thanks to everyone who
helped make this release possible -- see the RELEASE_NOTES for the
credits. The ISOs are off to the replicator. This time it will be a
6 CD-ROM 32-bit set and a dual-sided 32-bit/64-bit x86/x86_64 DVD.
We're taking pre-orders now at store.slackware.com. Please consider
picking up a copy to help support the project. Once again, thanks to
the entire Slackware community for all the help testing and fixing
things and offering suggestions during this development cycle.
As always, have fun and enjoy! -P.
Diffstat (limited to 'source/xap/xgames/spider.diff')
-rw-r--r-- | source/xap/xgames/spider.diff | 121 |
1 files changed, 121 insertions, 0 deletions
diff --git a/source/xap/xgames/spider.diff b/source/xap/xgames/spider.diff new file mode 100644 index 000000000..b0704f147 --- /dev/null +++ b/source/xap/xgames/spider.diff @@ -0,0 +1,121 @@ +--- ./globals.h.orig 1991-09-28 12:46:20.000000000 -0500 ++++ ./globals.h 2007-02-21 20:14:54.000000000 -0600 +@@ -96,6 +96,6 @@ + Bool can_get_help_files(); + #endif + +-extern char *malloc(); +-extern char *calloc(); +-extern char *realloc(); ++extern void *malloc(); ++extern void *calloc(); ++extern void *realloc(); +--- ./movelog.c.orig 1991-09-28 12:46:17.000000000 -0500 ++++ ./movelog.c 2007-02-21 20:17:21.000000000 -0600 +@@ -22,6 +22,7 @@ + #ifdef SVR4 + #include <unistd.h> + #endif ++#include <stdlib.h> + + #define CACHE_SIZE 50 + static int move_index = 0; +@@ -33,6 +34,21 @@ + + extern int cheat_count; + ++Rank flip_ranks[NUM_RANKS] = { ++ King, Queen, Jack, Ten, Nine, Eight, Seven, ++ Six, Five, Four, Three, Deuce, Ace ++}; ++ ++static int ++card_to_int(card) ++CardPtr card; ++{ ++int val; ++ ++ val = card->suit * 13 + flip_ranks[card->rank]; ++ return (val); ++} ++ + make_deck_cache() + { + CardPtr tmp; +@@ -280,11 +296,6 @@ + } + } + +-Rank flip_ranks[NUM_RANKS] = { +- King, Queen, Jack, Ten, Nine, Eight, Seven, +- Six, Five, Four, Three, Deuce, Ace +-}; +- + static void + int_to_card(val, suit, rank) + int val; +@@ -298,16 +309,6 @@ + assert (*rank >= Ace && *suit <= King); + } + +-static int +-card_to_int(card) +-CardPtr card; +-{ +-int val; +- +- val = card->suit * 13 + flip_ranks[card->rank]; +- return (val); +-} +- + static CardPtr + find_card(cache, suit, rank) + CardPtr *cache; +@@ -709,6 +710,23 @@ + } + } + ++static int ++restore_game(str, str2) ++char *str, *str2; ++{ ++ ++ if (read_position(str) != 0) { ++ return (-1); ++ } ++ ++ init_cache(); /* clear out the move cache */ ++ ++ if (str2) ++ read_moves(str2); ++ ++ return (0); ++} ++ + read_selection(buf) + char *buf; + { +@@ -786,23 +804,6 @@ + show_message(buf); + } + +-static int +-restore_game(str, str2) +-char *str, *str2; +-{ +- +- if (read_position(str) != 0) { +- return (-1); +- } +- +- init_cache(); /* clear out the move cache */ +- +- if (str2) +- read_moves(str2); +- +- return (0); +-} +- + /* + * play the same deck again + */ |