From: cohrs Date: Thu, 21 Sep 2006 05:09:38 +0000 (+0000) Subject: symhandling followup for Linux X-Git-Tag: MOVE2GIT~898 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=39d5f48ce021ab5afa2190f8388ff07e369dccd8;p=nethack symhandling followup for Linux - 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. --- diff --git a/include/tcap.h b/include/tcap.h index 232fd0a76..074a818d8 100644 --- a/include/tcap.h +++ b/include/tcap.h @@ -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 diff --git a/include/unixconf.h b/include/unixconf.h index 56c85a2cc..d003b6ef1 100644 --- a/include/unixconf.h +++ b/include/unixconf.h @@ -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 */ diff --git a/src/drawing.c b/src/drawing.c index 90aa72f88..a9ece3817 100644 --- a/src/drawing.c +++ b/src/drawing.c @@ -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 diff --git a/src/options.c b/src/options.c index bb0f97736..15ab6c871 100644 --- a/src/options.c +++ b/src/options.c @@ -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)); diff --git a/sys/unix/Makefile.top b/sys/unix/Makefile.top index 23bb1d7e2..e7995deaf 100644 --- a/sys/unix/Makefile.top +++ b/sys/unix/Makefile.top @@ -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) )