summaryrefslogtreecommitdiff
path: root/games/xpipeman
diff options
context:
space:
mode:
authortron <tron@pkgsrc.org>1998-08-16 22:31:44 +0000
committertron <tron@pkgsrc.org>1998-08-16 22:31:44 +0000
commitd2e2bdf9a9375a4606d1609680161922d0f9bf45 (patch)
tree1a46f697b13b35c4da5fa273ce041a88f8d54b5b /games/xpipeman
parentead1e3e8c700b6c1eebcf6486572bdb1edada7f0 (diff)
downloadpkgsrc-d2e2bdf9a9375a4606d1609680161922d0f9bf45.tar.gz
Make "xpipeman" work under alpha, patches supplied by Tim Rightnour in
PR pkg/5943.
Diffstat (limited to 'games/xpipeman')
-rw-r--r--games/xpipeman/patches/patch-ac23
-rw-r--r--games/xpipeman/patches/patch-ad65
-rw-r--r--games/xpipeman/patches/patch-ae13
-rw-r--r--games/xpipeman/patches/patch-af14
4 files changed, 115 insertions, 0 deletions
diff --git a/games/xpipeman/patches/patch-ac b/games/xpipeman/patches/patch-ac
new file mode 100644
index 00000000000..2a75cd3c364
--- /dev/null
+++ b/games/xpipeman/patches/patch-ac
@@ -0,0 +1,23 @@
+--- xpipeman.h.orig Sun Aug 9 03:40:53 1998
++++ xpipeman.h Sun Aug 9 03:48:12 1998
+@@ -36,2 +36,10 @@
+ */
++
++typedef struct {
++ Pixel fg;
++ Pixel bg;
++ XtTranslations translations;
++ char *score_filename;
++} AppData;
++
+ extern Display *display;
+@@ -41,4 +49,2 @@
+ cleargc;
+-extern Pixel fg,
+- bg;
+
+@@ -119,4 +125,2 @@
+ extern void show_scores_callback();
+-
+-extern char *score_filename;
+
diff --git a/games/xpipeman/patches/patch-ad b/games/xpipeman/patches/patch-ad
new file mode 100644
index 00000000000..cb192c4e919
--- /dev/null
+++ b/games/xpipeman/patches/patch-ad
@@ -0,0 +1,65 @@
+--- main.c.orig Fri Sep 13 22:32:10 1991
++++ main.c Mon Aug 17 00:20:12 1998
+@@ -138,9 +138,7 @@
+ {"do_nothing",(XtActionProc)do_nothing_action},
+ };
+
+-Pixel fg, bg;
+-
+-XtTranslations translations;
++AppData app_data;
+
+ static XrmOptionDescRec options[] = {
+ {"-scorefile","scorefile",XrmoptionSepArg, NULL },
+@@ -148,13 +146,13 @@
+
+ static XtResource application_resources[] = {
+ {"foreground", "Foreground", XtRPixel, sizeof(Pixel),
+- (Cardinal)&fg, XtRString, (caddr_t) "Black"},
++ XtOffsetOf(AppData,fg), XtRString, (caddr_t) "Black"},
+ {"background", "Background", XtRPixel, sizeof(Pixel),
+- (Cardinal)&bg, XtRString, (caddr_t) "White"},
++ XtOffsetOf(AppData,bg), XtRString, (caddr_t) "White"},
+ {"translations","Translations", XtRTranslationTable, sizeof(XtTranslations),
+- (Cardinal)&translations, XtRString, (caddr_t)translations_str},
++ XtOffsetOf(AppData,translations), XtRString,(caddr_t)translations_str},
+ {"scorefile","Scorefile", XtRString, sizeof(String),
+- (Cardinal)&score_filename, XtRString, (caddr_t)SCORE_FILE},
++ XtOffsetOf(AppData,score_filename), XtRString,(caddr_t)SCORE_FILE},
+ };
+
+ /*----------------------------------------------------------------------*/
+@@ -177,7 +175,7 @@
+
+ XtAddActions(actions,XtNumber(actions));
+
+- XtGetApplicationResources(top_shell, 0, application_resources,
++ XtGetApplicationResources(top_shell, &app_data, application_resources,
+ XtNumber(application_resources), NULL, 0 );
+
+ top_widget = XtCreateManagedWidget(
+@@ -193,7 +191,7 @@
+ arglistplayfield,
+ XtNumber(arglistplayfield));
+
+- XtAugmentTranslations(playfield_widget,translations);
++ XtAugmentTranslations(playfield_widget,app_data.translations);
+
+ quit_command = XtCreateManagedWidget(
+ "quit_button",
+@@ -263,12 +261,12 @@
+
+ display = XtDisplay(playfield_widget);
+ playfield = XtWindow(playfield_widget);
+- gcv.foreground = fg;
+- gcv.background = bg;
++ gcv.foreground = app_data.fg;
++ gcv.background = app_data.bg;
+ gcv.function = GXcopy;
+ gc = XCreateGC(display, playfield,
+ GCForeground | GCBackground | GCFunction, &gcv);
+- gcv.foreground = bg;
++ gcv.foreground = app_data.bg;
+ cleargc = XCreateGC(display, playfield,
+ GCForeground | GCBackground | GCFunction, &gcv);
+
diff --git a/games/xpipeman/patches/patch-ae b/games/xpipeman/patches/patch-ae
new file mode 100644
index 00000000000..eb5b8969d92
--- /dev/null
+++ b/games/xpipeman/patches/patch-ae
@@ -0,0 +1,13 @@
+--- graphics.c.orig Sun Aug 9 03:51:32 1998
++++ graphics.c Sun Aug 9 03:52:35 1998
+@@ -46,2 +46,3 @@
+
++extern AppData app_data;
+
+@@ -65,4 +66,4 @@
+
+- fgcolor.pixel = fg;
+- bgcolor.pixel = bg;
++ fgcolor.pixel = app_data.fg;
++ bgcolor.pixel = app_data.bg;
+ fgcolor.flags = DoRed | DoGreen | DoBlue;
diff --git a/games/xpipeman/patches/patch-af b/games/xpipeman/patches/patch-af
new file mode 100644
index 00000000000..eca5caa9b46
--- /dev/null
+++ b/games/xpipeman/patches/patch-af
@@ -0,0 +1,14 @@
+--- score.c.orig Sun Aug 9 03:56:41 1998
++++ score.c Sun Aug 9 03:57:23 1998
+@@ -72,3 +72,3 @@
+ static FILE *scorefile = 0;
+-char *score_filename;
++extern AppData app_data;
+
+@@ -102,4 +102,4 @@
+
+- if( !(scorefile = fopen(score_filename,"r+")) ) {
+- scorefile = fopen(score_filename, "w");
++ if( !(scorefile = fopen(app_data.score_filename,"r+")) ) {
++ scorefile = fopen(app_data.score_filename, "w");
+ return;