Groups | Search | Server Info | Login | Register


Groups > comp.windows.x > #607

Re: xbattle 4.0 (portability) fixes

From Eli the Bearded <*@eli.users.panix.com>
Newsgroups comp.windows.x
Subject Re: xbattle 4.0 (portability) fixes
Date 2026-02-12 06:53 +0000
Organization Some absurd concept
Message-ID <eli$2602120117@qaz.wtf> (permalink)
References <qZVISAjhMUt39DyW@violet.siamics.net> <10mj1hs$109s6$6@dont-email.me>

Show all headers | View raw


In comp.windows.x, Lawrence DOliveiro <ldo@nz.invalid> wrote:
> On Wed, 11 Feb 2026 08:37:07 +0000, Ivan Shmakov wrote:
                 ^^^^

> Is the distinction between "copyleft" and "non-commercial" really that
> subtle, that some people are capable of being confused by it? The two
> have nothing to do with each other, no matter what the xbattle
> developer(s) may think.
> 
> In particular, "copyleft" is a well-defined concept, while
> "non-commercial" is not.

That's very easy for you to say 34 years after the code was packaged.
The license included probably dates to the 1991 release (I found a date
of "10/1/91" in one file, the README just says "1991"), but the tar file
referenced has all September 1992 files. The nuances of different open
source licenses were not well publicized at the time. The FSF probably
didn't have a website in September 1992.

After applying Ivan's patches, I also needed to add some includes to
main.c, and then changed the C standard in the Makefile. Note that
the Makefile is generated by xmkmf, and not included in the source.
I don't know enough imake to know if/how I should have modified that.

--- a/main.c
+++ b/main.c
@@ -1,4 +1,6 @@
 #include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
   
 /**** x include files ****/
 #include <X11/Xlib.h>

--- a/Makefile
+++ b/Makefile
@@ -323,7 +323,7 @@ MODLDCOMBINEFLAGS = -r
       PROJECTROOT = /usr
 
       CDEBUGFLAGS = -g -O2 -fno-strict-aliasing
-        CCOPTIONS =
+        CCOPTIONS = -std=c89
 
       ALLINCLUDES = $(INCLUDES) $(EXTRA_INCLUDES) $(TOP_INCLUDES) $(INSTALLED_INCLUDES) $(STD_INCLUDES)
        ALLDEFINES = $(ALLINCLUDES) $(STD_DEFINES) $(PROTO_DEFINES) $(THREADS_DEFINES) $(MODULE_DEFINES) $(DEFINES) $(EXTRA_DEFINES)


That got me an executible that runs, but all I can get it to do is spit
out usage.

$ /xbattle -hex -board 100  -horizon 20  -map  -localmap
USAGE: xbattle
                -<c1>      <display>      display name side uses color c1 with
                                          default color to b/w mapping
                -<c1><c2>  <display>      display name side uses color c1 with
                                          b/w terminals using b/w shade c2
                -hex                      Use hexagonal display 
[... many lines ...]

So I'm not sure how to actually run it. Possibly a read of the code
would be helpful.

Elijah
------
might look at the start-up code tomorrow

Back to comp.windows.x | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

xbattle 4.0 (portability) fixes Ivan Shmakov <ivan@siamics.netREMOVE.invalid> - 2026-02-11 08:37 +0000
  Re: xbattle 4.0 (portability) fixes Lawrence D’Oliveiro <ldo@nz.invalid> - 2026-02-11 22:58 +0000
    Re: xbattle 4.0 (portability) fixes Eli the Bearded <*@eli.users.panix.com> - 2026-02-12 06:53 +0000
      Re: xbattle 4.0 (portability) fixes Lawrence D’Oliveiro <ldo@nz.invalid> - 2026-02-12 19:11 +0000
        Re: xbattle 4.0 (portability) fixes Eli the Bearded <*@eli.users.panix.com> - 2026-02-12 23:57 +0000
          Re: xbattle 4.0 (portability) fixes Ivan Shmakov <ivan@siamics.netREMOVE.invalid> - 2026-02-13 21:15 +0000
          Re: xbattle 4.0 (portability) fixes Lawrence D’Oliveiro <ldo@nz.invalid> - 2026-02-13 21:51 +0000

csiph-web