head 1.5; access; symbols pkgsrc-2013Q2:1.5.0.2 pkgsrc-2013Q2-base:1.5 pkgsrc-2012Q4:1.4.0.10 pkgsrc-2012Q4-base:1.4 pkgsrc-2012Q3:1.4.0.8 pkgsrc-2012Q3-base:1.4 pkgsrc-2012Q2:1.4.0.6 pkgsrc-2012Q2-base:1.4 pkgsrc-2012Q1:1.4.0.4 pkgsrc-2012Q1-base:1.4 pkgsrc-2011Q4:1.4.0.2 pkgsrc-2011Q4-base:1.4 pkgsrc-2011Q3:1.3.0.76 pkgsrc-2011Q3-base:1.3 pkgsrc-2011Q2:1.3.0.74 pkgsrc-2011Q2-base:1.3 pkgsrc-2011Q1:1.3.0.72 pkgsrc-2011Q1-base:1.3 pkgsrc-2010Q4:1.3.0.70 pkgsrc-2010Q4-base:1.3 pkgsrc-2010Q3:1.3.0.68 pkgsrc-2010Q3-base:1.3 pkgsrc-2010Q2:1.3.0.66 pkgsrc-2010Q2-base:1.3 pkgsrc-2010Q1:1.3.0.64 pkgsrc-2010Q1-base:1.3 pkgsrc-2009Q4:1.3.0.62 pkgsrc-2009Q4-base:1.3 pkgsrc-2009Q3:1.3.0.60 pkgsrc-2009Q3-base:1.3 pkgsrc-2009Q2:1.3.0.58 pkgsrc-2009Q2-base:1.3 pkgsrc-2009Q1:1.3.0.56 pkgsrc-2009Q1-base:1.3 pkgsrc-2008Q4:1.3.0.54 pkgsrc-2008Q4-base:1.3 pkgsrc-2008Q3:1.3.0.52 pkgsrc-2008Q3-base:1.3 cube-native-xorg:1.3.0.50 cube-native-xorg-base:1.3 pkgsrc-2008Q2:1.3.0.48 pkgsrc-2008Q2-base:1.3 cwrapper:1.3.0.46 pkgsrc-2008Q1:1.3.0.44 pkgsrc-2008Q1-base:1.3 pkgsrc-2007Q4:1.3.0.42 pkgsrc-2007Q4-base:1.3 pkgsrc-2007Q3:1.3.0.40 pkgsrc-2007Q3-base:1.3 pkgsrc-2007Q2:1.3.0.38 pkgsrc-2007Q2-base:1.3 pkgsrc-2007Q1:1.3.0.36 pkgsrc-2007Q1-base:1.3 pkgsrc-2006Q4:1.3.0.34 pkgsrc-2006Q4-base:1.3 pkgsrc-2006Q3:1.3.0.32 pkgsrc-2006Q3-base:1.3 pkgsrc-2006Q2:1.3.0.30 pkgsrc-2006Q2-base:1.3 pkgsrc-2006Q1:1.3.0.28 pkgsrc-2006Q1-base:1.3 pkgsrc-2005Q4:1.3.0.26 pkgsrc-2005Q4-base:1.3 pkgsrc-2005Q3:1.3.0.24 pkgsrc-2005Q3-base:1.3 pkgsrc-2005Q2:1.3.0.22 pkgsrc-2005Q2-base:1.3 pkgsrc-2005Q1:1.3.0.20 pkgsrc-2005Q1-base:1.3 pkgsrc-2004Q4:1.3.0.18 pkgsrc-2004Q4-base:1.3 pkgsrc-2004Q3:1.3.0.16 pkgsrc-2004Q3-base:1.3 pkgsrc-2004Q2:1.3.0.14 pkgsrc-2004Q2-base:1.3 pkgsrc-2004Q1:1.3.0.12 pkgsrc-2004Q1-base:1.3 pkgsrc-2003Q4:1.3.0.10 pkgsrc-2003Q4-base:1.3 netbsd-1-6-1:1.3.0.6 netbsd-1-6-1-base:1.3 netbsd-1-6:1.3.0.8 netbsd-1-6-RELEASE-base:1.3 pkgviews:1.3.0.4 pkgviews-base:1.3 buildlink2:1.3.0.2 buildlink2-base:1.3 netbsd-1-5-PATCH003:1.3 netbsd-1-5-PATCH001:1.1.1.1 netbsd-1-5-RELEASE:1.1.1.1 netbsd-1-4-PATCH003:1.1.1.1 netbsd-1-4-PATCH002:1.1.1.1 comdex-fall-1999:1.1.1.1 netbsd-1-4-PATCH001:1.1.1.1 netbsd-1-4-RELEASE:1.1.1.1 pkgsrc-base:1.1.1.1 TNF:1.1.1; locks; strict; comment @# @; 1.5 date 2013.01.21.05.19.46; author dholland; state dead; branches; next 1.4; 1.4 date 2011.12.20.16.18.16; author dholland; state Exp; branches; next 1.3; 1.3 date 2001.12.19.10.51.19; author tron; state Exp; branches; next 1.2; 1.2 date 2001.12.19.10.26.47; author tron; state Exp; branches; next 1.1; 1.1 date 98.10.13.00.37.33; author garbled; state Exp; branches 1.1.1.1; next ; 1.1.1.1 date 98.10.13.00.37.33; author garbled; state Exp; branches; next ; desc @@ 1.5 log @Roll the existing patches into a distfile patch. In the course of doing so: Fix the fix previously in patch-ah (for platforms where char is unsigned by default) to not generate spurious EOF indications. Improve the fixes previously in patch-a[bcdef] to put the game's state file in $HOME/.craft instead of the current directory. Use a consistent method to set $PREFIX instead of a mixture of compiler flags, patching, and SUBST. Use pkg-config to find libX11, and clean up some pkglint. @ text @$NetBSD: patch-ab,v 1.4 2011/12/20 16:18:16 dholland Exp $ - use configured installation directory properly - const correctness demanded by recent gcc --- win.hc.orig 2011-12-20 15:13:53.000000000 +0000 +++ win.hc @@@@ -42,7 +42,7 @@@@ bool bitmap_size (char name [], int &dx, /* ROUTINES text size information (deklarations) */ /*----------------------------------------------------------------------*/ -void text_size (char s [], char font [], int &dx, int &dy, int &num_lines) +void text_size (const char s [], const char font [], int &dx, int &dy, int &num_lines) {XFontStruct *font_info; Display *display; @@@@ -119,37 +119,37 @@@@ void init_default_handler () . perform_init {win_handler_init = true; if (! f_exists (".windefaults.params")) - system ("cp /home/hua/craft/.windefaults.params ."); + system ("cp " CRAFT_DIR ".windefaults.params .windefaults.params"); win_defaults = new paramreader (".windefaults"); }. } -int win_default_i (int param, char default_name []) +int win_default_i (int param, const char default_name []) {init_default_handler (); if (param != by_default) return param; else return win_default_i (default_name); } -int win_default_i (char default_name []) +int win_default_i (const char default_name []) {init_default_handler (); return win_defaults->i_param (default_name); } -char *win_default_s (char default_name []) +char *win_default_s (const char default_name []) {init_default_handler (); return win_defaults->s_param (default_name); } -int win_default_c (int param, char default_name []) +int win_default_c (int param, const char default_name []) {init_default_handler (); if (param != by_default) return param; else return win_default_c (default_name); } -int win_default_c (char default_name []) +int win_default_c (const char default_name []) {char color_name [128]; init_default_handler (); @@@@ -159,7 +159,7 @@@@ int win_default_c (char default_name []) else return win_color (color_name); } -int win_color (char name []) +int win_color (const char name []) {if (strcmp (name, "white") == 0) return 0 ; if (strcmp (name, "red") == 0) return 1 ; if (strcmp (name, "red1") == 0) return 2 ; @@@@ -263,8 +263,8 @@@@ bool win::fix_initialized = false; /* CLASS win (funktions) */ /*----------------------------------------------------------------------*/ -win::win (char title [], - char host [], +win::win (const char title [], + const char host [], int x, int y, int dx, @@@@ -512,8 +512,8 @@@@ win::win (char title [], } win::win (win *parent, - char title [], - char host [], + const char title [], + const char host [], int x, int y, int dx, @@@@ -749,7 +749,7 @@@@ win::win (win *parent, } -win::win (char title []) +win::win (const char title []) {mydisplay = XOpenDisplay (""); myscreen = DefaultScreen (mydisplay); cmap = DefaultColormap (mydisplay, myscreen); @@@@ -762,7 +762,7 @@@@ win::win (char title []) is_alien = true; } -Window win::grab (Display *dsp, Window wnd, char name []) +Window win::grab (Display *dsp, Window wnd, const char name []) {Window *children, dummy; unsigned int nchildren; int i; @@@@ -817,7 +817,7 @@@@ win::~win () #undef green #undef blue -void win::alloc_color (char name [], int no) +void win::alloc_color (const char name [], int no) {Screen *src = ScreenOfDisplay (mydisplay, myscreen); XColor c; XColor d; @@@@ -1753,7 +1753,7 @@@@ void win::shift (int x1, int y1, int x2, } -void win::text_size (char string [], int &dx, int &dy) +void win::text_size (const char string [], int &dx, int &dy) {if (is_enable) perform_get_size; @@@@ -1767,7 +1767,7 @@@@ void win::text_size (char string [], int } -void win::set_font (char name []) +void win::set_font (const char name []) {if (is_enable) perform_load; @@@@ -1795,7 +1795,7 @@@@ void win::write (int x, int y, int d) write (x, y, s); } -void win::write (int x, int y, char string []) +void win::write (int x, int y, const char string []) {if (is_enable) perform_write; @ 1.4 log @Assorted fixes and cleanup. - if we're going to supply the build makefile, it shouldn't require gmake. - don't install executable html or gif files - add patch comments - const correctness for string constants, as demanded by gcc 4.5 - avoid needing -lcompat - fix a y2038 issue PKGREVISION -> 2 @ text @d1 1 a1 1 $NetBSD: patch-ab,v 1.3 2001/12/19 10:51:19 tron Exp $ @ 1.3 log @Copy defaults file from correct location when starting "craft" on systems where "xpkwedge" is installed. Fixes PR pkg/14861 by Robert Elz. @ text @d1 1 a1 1 $NetBSD: patch-ab,v 1.2 2001/12/19 10:26:47 tron Exp $ d3 13 a15 3 --- win.hc.orig Wed Mar 19 07:21:21 1997 +++ win.hc Thu Sep 24 11:48:49 1998 @@@@ -118,8 +118,8 @@@@ d17 1 d20 1 a20 1 - if (! f_exists (".windefaults.params")) a21 1 + if (! f_exists (".windefaults.params")) d26 120 @ 1.2 log @Fix RCS Ids. @ text @d1 1 a1 1 $NetBSD$ d11 2 a12 2 + if (! f_exists ("~/.windefaults.params")) + system ("cp /usr/X11R6/share/craft/.windefaults.params ~/.windefaults.params"); @ 1.1 log @Initial revision @ text @d2 1 @ 1.1.1.1 log @Initial import of craft-3.5 a Warcraft-like game for X11 @ text @@