~dannf/ubuntu/saucy/screen/lp1213278-from-debian

« back to all changes in this revision

Viewing changes to nethack.c

  • Committer: Bazaar Package Importer
  • Author(s): Nathaniel McCallum
  • Date: 2004-09-03 15:15:33 UTC
  • Revision ID: james.westby@ubuntu.com-20040903151533-px02yqlrchs4fv2t
Tags: upstream-4.0.2
ImportĀ upstreamĀ versionĀ 4.0.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* Copyright (c) 1993-2002
 
2
 *      Juergen Weigert (jnweiger@immd4.informatik.uni-erlangen.de)
 
3
 *      Michael Schroeder (mlschroe@immd4.informatik.uni-erlangen.de)
 
4
 * Copyright (c) 1987 Oliver Laumann
 
5
 *
 
6
 * This program is free software; you can redistribute it and/or modify
 
7
 * it under the terms of the GNU General Public License as published by
 
8
 * the Free Software Foundation; either version 2, or (at your option)
 
9
 * any later version.
 
10
 *  
 
11
 * This program is distributed in the hope that it will be useful,
 
12
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
13
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
14
 * GNU General Public License for more details.
 
15
 *
 
16
 * You should have received a copy of the GNU General Public License
 
17
 * along with this program (see the file COPYING); if not, write to the
 
18
 * Free Software Foundation, Inc.,
 
19
 * 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA
 
20
 *
 
21
 ****************************************************************
 
22
 */
 
23
 
 
24
#include "config.h"
 
25
#include "screen.h"
 
26
 
 
27
#ifdef NETHACK
 
28
extern int nethackflag;
 
29
#endif
 
30
 
 
31
struct nlstrans {
 
32
    char *from;
 
33
    char *to;
 
34
};
 
35
 
 
36
#ifdef NETHACK
 
37
static struct nlstrans nethacktrans[] = {
 
38
{"Cannot lock terminal - fork failed",
 
39
         "Cannot fork terminal - lock failed"},
 
40
{"Got only %d bytes from %s",
 
41
         "You choke on your food: %d bytes from %s"},
 
42
{"Copy mode - Column %d Line %d(+%d) (%d,%d)",
 
43
        "Welcome to hacker's treasure zoo - Column %d Line %d(+%d) (%d,%d)"},
 
44
{"First mark set - Column %d Line %d",
 
45
        "You drop a magic marker - Column %d Line %d"},
 
46
{"Copy mode aborted",
 
47
        "You escaped the dungeon."},
 
48
{"Filter removed.",
 
49
        "You have a sad feeling for a moment..."},
 
50
{"Window %d (%s) killed.",
 
51
        "You destroy poor window %d (%s)."},
 
52
{"Window %d (%s) is now being monitored for all activity.",
 
53
        "You feel like someone is watching you..."},
 
54
{"Window %d (%s) is no longer being monitored for activity.",
 
55
        "You no longer sense the watcher's presence."},
 
56
{"empty buffer",
 
57
        "Nothing happens."},
 
58
{"switched to audible bell.",
 
59
        "Suddenly you can't see your bell!"},
 
60
{"switched to visual bell.",
 
61
        "Your bell is no longer invisible."},
 
62
{"The window is now being monitored for %d sec. silence.",
 
63
        "You feel like someone is waiting for %d sec. silence..."},
 
64
{"The window is no longer being monitored for silence.",
 
65
        "You no longer sense the watcher's silence."},
 
66
{"No other window.",
 
67
        "You cannot escape from window %d!"},
 
68
{"Logfile \"%s\" closed.",
 
69
        "You put away your scroll of logging named \"%s\"." },
 
70
{"Error opening logfile \"%s\"",
 
71
        "You don't seem to have a scroll of logging named \"%s\"."},
 
72
{"Creating logfile \"%s\".",
 
73
        "You start writing on your scroll of logging named \"%s\"."},
 
74
{"Appending to logfile \"%s\".",
 
75
        "You add to your scroll of logging named \"%s\"."},
 
76
{"Detach aborted.",
 
77
        "The blast of disintegration whizzes by you!"},
 
78
{"Empty register.",
 
79
        "Nothing happens."},
 
80
{"[ Passwords don't match - checking turned off ]",
 
81
        "[ Passwords don't match - your armor crumbles away ]"},
 
82
{"Aborted because of window size change.",
 
83
        "KAABLAMM!!!  You triggered a land mine!"},
 
84
{"Out of memory.",
 
85
        "Who was that Maude person anyway?"},
 
86
{"getpwuid() can't identify your account!",
 
87
        "An alarm sounds through the dungeon...\nThe Keystone Kops are after you!"},
 
88
{"Must be connected to a terminal.",
 
89
        "You must play from a terminal."},
 
90
{"No Sockets found in %s.\n",
 
91
        "This room is empty (%s).\n"},
 
92
{"New screen...",
 
93
        "Be careful!  New screen tonight."},
 
94
{"Child has been stopped, restarting.",
 
95
        "You regain consciousness."},
 
96
{"There are screens on:",
 
97
        "Your inventory:"},
 
98
{"There is a screen on:",
 
99
        "Your inventory:"},
 
100
{"There are several screens on:",
 
101
        "Prove thyself worthy or perish:"},
 
102
{"There is a suitable screen on:",
 
103
        "You see here a good looking screen:"},
 
104
{"There are several suitable screens on:",
 
105
        "You may wish for a screen, what do you want?"},
 
106
{"%d socket%s wiped out.",
 
107
        "You hear %d distant explosion%s."},
 
108
{"Remove dead screens with 'screen -wipe'.",
 
109
        "The dead screen%s touch%s you. Try 'screen -wipe'."},
 
110
{"Illegal reattach attempt from terminal %s.",
 
111
        "'%s' tries to touch your session, but fails."},
 
112
{"Could not write %s",
 
113
        "%s is too hard to dig in"},
 
114
{0, 0}
 
115
};
 
116
#endif
 
117
 
 
118
char *
 
119
DoNLS(from)
 
120
char *from;
 
121
{
 
122
#ifdef NETHACK
 
123
  struct nlstrans *t;
 
124
 
 
125
  if (nethackflag)
 
126
    {
 
127
      for (t = nethacktrans; t->from; t++)
 
128
        if (strcmp(from, t->from) == 0)
 
129
          return t->to;
 
130
    }
 
131
#endif
 
132
  return from;
 
133
}