Permalink
Browse files

Remove nethack stuff

  • Loading branch information...
1 parent af205db commit 45d5f6e5272b9c60a8445b491d92b295e03091ea @amade committed May 30, 2012
Showing with 5 additions and 181 deletions.
  1. +2 −4 src/Makefile.in
  2. +0 −9 src/acconfig.h
  3. +0 −3 src/comm.c
  4. +1 −1 src/etc/completer.zsh
  5. +0 −7 src/extern.h
  6. +0 −1 src/layer.c
  7. +0 −132 src/nethack.c
  8. +1 −6 src/process.c
  9. +0 −17 src/screen.c
  10. +1 −1 src/socket.c
View
@@ -64,15 +64,15 @@ CFILES= screen.c ansi.c fileio.c mark.c misc.c resize.c socket.c \
search.c tty.c term.c window.c utmp.c loadav.c putenv.c help.c \
termcap.c input.c attacher.c pty.c process.c display.c comm.c \
kmapdef.c acls.c logfile.c layer.c \
- sched.c nethack.c encoding.c canvas.c layout.c viewport.c \
+ sched.c encoding.c canvas.c layout.c viewport.c \
list_display.c list_generic.c list_window.c \
lua.c script.c python.c
OFILES= screen.o ansi.o fileio.o mark.o misc.o resize.o socket.o \
search.o tty.o term.o window.o utmp.o loadav.o putenv.o help.o \
termcap.o input.o attacher.o pty.o process.o display.o comm.o \
kmapdef.o acls.o logfile.o layer.o \
list_generic.o list_display.o list_window.o \
- sched.o nethack.o encoding.o canvas.o layout.o viewport.o \
+ sched.o encoding.o canvas.o layout.o viewport.o \
lua.o script.o python.o
all: screen
@@ -331,8 +331,6 @@ layer.o: layout.h viewport.h canvas.h layer.c config.h screen.h os.h ansi.h acls
comm.h layer.h term.h image.h display.h window.h extern.h
sched.o: layout.h viewport.h canvas.h sched.c config.h screen.h os.h ansi.h acls.h \
comm.h layer.h term.h image.h display.h window.h extern.h logfile.h
-nethack.o: layout.h viewport.h canvas.h nethack.c config.h screen.h os.h ansi.h acls.h \
- comm.h layer.h term.h image.h display.h window.h extern.h
encoding.o: layout.h viewport.h canvas.h encoding.c config.h screen.h os.h ansi.h acls.h \
comm.h layer.h term.h image.h display.h window.h extern.h
layout.o: layout.h viewport.h canvas.h layout.c config.h screen.h os.h ansi.h acls.h \
View
@@ -99,15 +99,6 @@
#endif
/*
- * As error messages are mostly meaningless to the user, we
- * try to throw out phrases that are somewhat more familiar
- * to ...well, at least familiar to us NetHack players.
- */
-#ifndef NONETHACK
-# define NETHACK
-#endif /* NONETHACK */
-
-/*
* If screen is installed with permissions to update /etc/utmp (such
* as if it is installed set-uid root), define UTMPOK.
*/
View
@@ -145,9 +145,6 @@ struct comm comms[RC_LAST + 1] =
{ "mousetrack", NEED_DISPLAY | ARGS_01, },
{ "msgminwait", ARGS_1, },
{ "msgwait", ARGS_1, },
-#ifdef NETHACK
- { "nethack", ARGS_1, },
-#endif
{ "next", ARGS_0, },
{ "nonblock", NEED_DISPLAY|ARGS_01, },
{ "number", CAN_QUERY|NEED_FORE|ARGS_01, },
@@ -37,7 +37,7 @@
'-v[Print "Screen version 3.09.11beta (FAU) 11-Oct-01".]' \
'-wipe[Do nothing, just clean up SocketDir.]' \
'-x[Attach to a not detached screen. (Multi display mode).]' \
- '-X[Execute <cmd> as a screen command in the specified session.]:Handling Tag screencmd:( acladd addacl aclchg acldel aclgrp aclumask activity allpartial at attrcolor autodetach autonuke bce bell_msg bind bindkey break breaktype bufferfile c1 caption charset chdir clear colon command compacthist console copy copy_reg crlf debug defc1 defautonuke defbce defbreaktype defcharset defescape defflow defgr defhstatus defkanji deflogin defmode defmonitor defobuflimit defscrollback defshell defsilence defslowpaste defutf8 defwrap defwritelock defzombie detach dinfo displays digraph dumptermcap echo escape exec fit flow focus gr hardcopy hardcopy_append hardcopydir hardstatus height help history hstatus info ins_reg kill lastmsg license lockscreen log logfile login logtstamp mapdefault mapnotnext maptimeout markkeys meta monitor msgminwait msgwait multiuser nethack next nonblock number obu!
+ '-X[Execute <cmd> as a screen command in the specified session.]:Handling Tag screencmd:( acladd addacl aclchg acldel aclgrp aclumask activity allpartial at attrcolor autodetach autonuke bce bell_msg bind bindkey break breaktype bufferfile c1 caption charset chdir clear colon command compacthist console copy copy_reg crlf debug defc1 defautonuke defbce defbreaktype defcharset defescape defflow defgr defhstatus defkanji deflogin defmode defmonitor defobuflimit defscrollback defshell defsilence defslowpaste defutf8 defwrap defwritelock defzombie detach dinfo displays digraph dumptermcap echo escape exec fit flow focus gr hardcopy hardcopy_append hardcopydir hardstatus height help history hstatus info ins_reg kill lastmsg license lockscreen log logfile login logtstamp mapdefault mapnotnext maptimeout markkeys meta monitor msgminwait msgwait multiuser next nonblock number obu!
!
flimit only other partial password paste pastefont pow_break pow_detach pow_detach_msg prev printcmd process quit readbuf readreg redisplay register remove removebuf reset resize screen scrollback select sessionname setenv shell shelltitle silence silencewait sleep slowpaste sorendition split startup_message stuff su term termcap terminfo termcapinfo time title unsetenv utf8 vbell vbell_msg vbellwait verbose version wall width windows wrap writebuf writelock xoff xon zombie defzombie)'
case $state in
View
@@ -376,9 +376,6 @@ extern void ExitOverlayPage (void);
extern int LayProcessMouse (struct layer *, unsigned char);
extern void LayProcessMouseSwitch (struct layer *, int);
-/* nethack.c */
-extern const char *DoNLS (const char *);
-
/* encoding.c */
extern void InitBuiltinTabs (void);
extern struct mchar *recode_mchar (struct mchar *, int, int);
@@ -568,10 +565,6 @@ extern gid_t real_gid;
extern uid_t eff_uid;
extern uid_t real_uid;
-#ifdef NETHACK
-extern int nethackflag;
-#endif
-
#if defined(TIOCSWINSZ) || defined(TIOCGWINSZ)
extern struct winsize glwz;
#endif
View
@@ -571,7 +571,6 @@ void LMsg(int err, const char *fmt, ...)
struct canvas *cv;
va_start(ap, fmt);
- fmt = DoNLS(fmt);
(void)vsnprintf(p, sizeof(buf) - 100, fmt, ap);
va_end(ap);
if (err) {
View
@@ -1,132 +0,0 @@
-/* Copyright (c) 2008, 2009
- * Juergen Weigert (jnweiger@immd4.informatik.uni-erlangen.de)
- * Michael Schroeder (mlschroe@immd4.informatik.uni-erlangen.de)
- * Micah Cowan (micah@cowan.name)
- * Sadrul Habib Chowdhury (sadrul@users.sourceforge.net)
- * Copyright (c) 1993-2002, 2003, 2005, 2006, 2007
- * Juergen Weigert (jnweiger@immd4.informatik.uni-erlangen.de)
- * Michael Schroeder (mlschroe@immd4.informatik.uni-erlangen.de)
- * Copyright (c) 1987 Oliver Laumann
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program (see the file COPYING); if not, see
- * http://www.gnu.org/licenses/, or contact Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
- *
- ****************************************************************
- */
-
-#include "config.h"
-#include "screen.h"
-#include "extern.h"
-
-struct nlstrans {
- char *from;
- char *to;
-};
-
-#ifdef NETHACK
-static struct nlstrans nethacktrans[] = {
- {"Cannot lock terminal - fork failed",
- "Cannot fork terminal - lock failed"},
- {"Got only %d bytes from %s",
- "You choke on your food: %d bytes from %s"},
- {"Copy mode - Column %d Line %d(+%d) (%d,%d)",
- "Welcome to hacker's treasure zoo - Column %d Line %d(+%d) (%d,%d)"},
- {"First mark set - Column %d Line %d",
- "You drop a magic marker - Column %d Line %d"},
- {"Copy mode aborted",
- "You escaped the dungeon."},
- {"Filter removed.",
- "You have a sad feeling for a moment..."},
- {"Window %d (%s) killed.",
- "You destroy poor window %d (%s)."},
- {"Window %d (%s) is now being monitored for all activity.",
- "You feel like someone is watching you..."},
- {"Window %d (%s) is no longer being monitored for activity.",
- "You no longer sense the watcher's presence."},
- {"empty buffer",
- "Nothing happens."},
- {"switched to audible bell.",
- "Suddenly you can't see your bell!"},
- {"switched to visual bell.",
- "Your bell is no longer invisible."},
- {"The window is now being monitored for %d sec. silence.",
- "You feel like someone is waiting for %d sec. silence..."},
- {"The window is no longer being monitored for silence.",
- "You no longer sense the watcher's silence."},
- {"No other window.",
- "You cannot escape from window %d!"},
- {"Logfile \"%s\" closed.",
- "You put away your scroll of logging named \"%s\"."},
- {"Error opening logfile \"%s\"",
- "You don't seem to have a scroll of logging named \"%s\"."},
- {"Creating logfile \"%s\".",
- "You start writing on your scroll of logging named \"%s\"."},
- {"Appending to logfile \"%s\".",
- "You add to your scroll of logging named \"%s\"."},
- {"Detach aborted.",
- "The blast of disintegration whizzes by you!"},
- {"Empty register.",
- "Nothing happens."},
- {"[ Passwords don't match - checking turned off ]",
- "[ Passwords don't match - your armor crumbles away ]"},
- {"Aborted because of window size change.",
- "KAABLAMM!!! You triggered a land mine!"},
- {"Out of memory.",
- "Who was that Maude person anyway?"},
- {"getpwuid() can't identify your account!",
- "An alarm sounds through the dungeon...\nThe Keystone Kops are after you!"},
- {"Must be connected to a terminal.",
- "You must play from a terminal."},
- {"No Sockets found in %s.\n",
- "This room is empty (%s).\n"},
- {"New screen...",
- "Be careful! New screen tonight."},
- {"Child has been stopped, restarting.",
- "You regain consciousness."},
- {"There are screens on:",
- "Your inventory:"},
- {"There is a screen on:",
- "Your inventory:"},
- {"There are several screens on:",
- "Prove thyself worthy or perish:"},
- {"There is a suitable screen on:",
- "You see here a good looking screen:"},
- {"There are several suitable screens on:",
- "You may wish for a screen, what do you want?"},
- {"%d socket%s wiped out.",
- "You hear %d distant explosion%s."},
- {"Remove dead screens with 'screen -wipe'.",
- "The dead screen%s touch%s you. Try 'screen -wipe'."},
- {"Illegal reattach attempt from terminal %s.",
- "'%s' tries to touch your session, but fails."},
- {"Could not write %s",
- "%s is too hard to dig in"},
- {0, 0}
-};
-#endif
-
-const char *DoNLS(const char *from)
-{
-#ifdef NETHACK
- struct nlstrans *t;
-
- if (nethackflag) {
- for (t = nethacktrans; t->from; t++)
- if (strcmp(from, t->from) == 0)
- return t->to;
- }
-#endif
- return from;
-}
View
@@ -3766,11 +3766,6 @@ static void StuffFin(char *buf, int len, char *data)
if (ParseSwitch(act, &compacthist) == 0 && msgok)
OutputMsg(0, "%scompacting history lines", compacthist ? "" : "not ");
break;
-#ifdef NETHACK
- case RC_NETHACK:
- (void)ParseOnOff(act, &nethackflag);
- break;
-#endif
case RC_HARDCOPY_APPEND:
(void)ParseOnOff(act, &hardcopy_append);
break;
@@ -5484,7 +5479,7 @@ static int MoreWindows()
Msg(0, "No window available");
return 0;
}
- Msg(0, m, fore->w_number); /* other arg for nethack */
+ Msg(0, m, fore->w_number);
return 0;
}
View
@@ -151,9 +151,6 @@ char *screenencodings;
int cjkwidth;
-#ifdef NETHACK
-int nethackflag = 0;
-#endif
int maxwin;
struct layer *flayer;
@@ -275,9 +272,6 @@ int main(int argc, char **argv)
#ifdef LOADAV
debug("LOADAV\n");
#endif
-#ifdef NETHACK
- debug("NETHACK\n");
-#endif
#ifdef TERMINFO
debug("TERMINFO\n");
#endif
@@ -645,16 +639,6 @@ int main(int argc, char **argv)
if (sty && *sty == 0)
sty = 0;
}
-#ifdef NETHACK
- if (!(nethackflag = (getenv("NETHACKOPTIONS") != NULL))) {
- char nethackrc[MAXPATHLEN];
-
- if (home && (strlen(home) < (MAXPATHLEN - 20))) {
- sprintf(nethackrc, "%s/.nethackrc", home);
- nethackflag = !access(nethackrc, F_OK);
- }
- }
-#endif
if ((LoginName = getlogin()) != NULL) {
if ((ppp = getpwnam(LoginName)) != (struct passwd *)0)
@@ -1554,7 +1538,6 @@ void MakeNewEnv()
char *p = B; \
va_list ap; \
va_start(ap, fmt); \
- fmt = DoNLS(fmt); \
(void)vsnprintf(p, sizeof(B) - 100, fmt, ap); \
va_end(ap); \
if (err) \
View
@@ -284,7 +284,7 @@ int FindSocket(int *fdp, int *nfoundp, int *notherp, char *match)
if (wipeflag)
Msg(0, "%d socket%s wiped out.", nwipe, nwipe > 1 ? "s" : "");
else
- Msg(0, m, ndead > 1 ? "s" : "", ndead > 1 ? "" : "es"); /* other args for nethack */
+ Msg(0, m, ndead > 1 ? "s" : "", ndead > 1 ? "" : "es");
}
if (firsts != -1) {
sprintf(SocketPath + sdirlen, "/%s", firstn);

0 comments on commit 45d5f6e

Please sign in to comment.