]> granicus.if.org Git - nethack/commitdiff
symhandling followup for Linux
authorcohrs <cohrs>
Thu, 21 Sep 2006 05:09:38 +0000 (05:09 +0000)
committercohrs <cohrs>
Thu, 21 Sep 2006 05:09:38 +0000 (05:09 +0000)
- tile2x11 would not build because drawing.c now depended on strcmpi which
was (via STRNCMPI not being defined) defined to strncmpi which is
implemented in hacklib.c which needs panic which is defined in... I gave up
on tracking down all the loose ends and changed the strcmpi to strcmp,
which means the handling is case sensitive, but it avoids a bunch of
changes to the way the util/Makefile.
- the symhandling changes introduced a chicken and the egg problem for
ASCIIGRAPH on Unix platforms, which was getting the defn from tcap.h but
that does not get included earlier enough nor often enough.  I added a defn
to unixconf.h to mimic ntconf.h, since ASCIIGRAPH is normally defined on Unix.
- options.c included an unused decl for a function named graphics_opts
- Unix Makefile was not installing "symbols".  I'm assuming this isn't
supposed to get the DLB treatment.

include/tcap.h
include/unixconf.h
src/drawing.c
src/options.c
sys/unix/Makefile.top

index 232fd0a76b6cfea0cd241efb06e95b35642063ad..074a818d8056b25d6a561c388cb00669d3c20091 100644 (file)
@@ -12,7 +12,7 @@
 #endif
 
 /* might display need graphics code? */
-#if !defined(AMIGA) && !defined(TOS) && !defined(MAC)
+#if !defined(AMIGA) && !defined(TOS) && !defined(MAC) && !defined(ASCIIGRAPH)
 # if defined(TERMLIB) || defined(OS2) || defined(MSDOS)
 #  define ASCIIGRAPH
 # endif
index 56c85a2ccf655cb206119338ec6158b94d80e791..d003b6ef13a4421220a81adfd92ba7b4695ad694 100644 (file)
@@ -56,6 +56,7 @@
 #define TEXTCOLOR      /* Use System V r3.2 terminfo color support */
                        /* and/or ANSI color support on termcap systems */
                        /* and/or X11 color */
+#define ASCIIGRAPH     /* ASCII graphics support on terminals */
 #define POSIX_JOB_CONTROL /* use System V / Solaris 2.x / POSIX job control */
                        /* (e.g., VSUSP) */
 #define POSIX_TYPES    /* use POSIX types for system calls and termios */
index 90aa72f88d6280317aba23c8296676f0969474a9..a9ece38178f31ce7a6f8688cc62bd85eba9e9b8b 100644 (file)
@@ -387,7 +387,7 @@ int nondefault;
                        (*ascgraphics_mode_callback)();
 #endif
 #ifdef TERMLIB
-               if (symhandling && !strcmpi(symhandling,"DEC")
+               if (symhandling && !strcmp(symhandling,"DEC")
                    && decgraphics_mode_callback)
                        (*decgraphics_mode_callback)();
 #endif
index bb0f9773618d165ace91bc567df74cb43fc94c78..15ab6c87147533efde61f478975fad8728df2c45 100644 (file)
@@ -463,7 +463,6 @@ STATIC_DCL char *FDECL(string_for_env_opt, (const char *, char *,BOOLEAN_P));
 STATIC_DCL void FDECL(bad_negation, (const char *,BOOLEAN_P));
 STATIC_DCL int FDECL(change_inv_order, (char *));
 STATIC_DCL void FDECL(oc_to_str, (char *, char *));
-STATIC_DCL void FDECL(graphics_opts, (char *,const char *,int,int));
 STATIC_DCL int FDECL(feature_alert_opts, (char *, const char *));
 STATIC_DCL const char *FDECL(get_compopt_value, (const char *, char *));
 STATIC_DCL boolean FDECL(special_handling, (const char *, BOOLEAN_P, BOOLEAN_P));
index 23bb1d7e269eec017771e9cf1fbfe65c6ed7359c..e7995deafe32587a7f7fb3c11192bf141b0b2c21 100644 (file)
@@ -183,6 +183,7 @@ dofiles:
                -e '}'                                  \
                -e '$$s/.*/nodlb/p' < dat/options` ;    \
        $(MAKE) dofiles-$${target-nodlb}
+       (cd dat ; cp symbols $(GAMEDIR) )
        cp src/$(GAME) $(GAMEDIR)
        cp util/recover $(GAMEDIR)
        -rm -f $(SHELLDIR)/$(GAME)
@@ -198,6 +199,9 @@ dofiles:
        -$(CHOWN) $(GAMEUID) $(SHELLDIR)/$(GAME)
        $(CHGRP) $(GAMEGRP) $(SHELLDIR)/$(GAME)
        chmod $(EXEPERM) $(SHELLDIR)/$(GAME)
+       -( cd $(GAMEDIR) ; $(CHOWN) $(GAMEUID) symbols ; \
+                       $(CHGRP) $(GAMEGRP) symbols ; \
+                       chmod $(FILEPERM) symbols )
 
 dofiles-dlb: check-dlb
        ( cd dat ; cp nhdat $(DATNODLB) $(GAMEDIR) )