fix typos

This commit is contained in:
RainRat
2024-02-28 20:15:56 -08:00
parent b53a43027f
commit a3658f85ac
167 changed files with 320 additions and 320 deletions

View File

@@ -158,7 +158,7 @@ NetHackQtBind::qt_Splash()
capt->repaint();
qApp->processEvents();
} else {
splash = 0; // caller has alrady done this...
splash = 0; // caller has already done this...
}
}
@@ -591,7 +591,7 @@ int NetHackQtBind::qt_nhgetch()
* On OSX (possibly elsewhere), this prevents an infinite
* loop repeatedly issuing the complaint:
QCoreApplication::exec: The event loop is already running
* to stderr if you syncronously start nethack from a terminal
* to stderr if you synchronously start nethack from a terminal
* then switch focus back to that terminal and type ^C.
* SIGINT -> done1() -> done2() -> yn_function("Really quit?")
* in the core asks for another keystroke.
@@ -766,7 +766,7 @@ char NetHackQtBind::qt_yn_function(const char *question_,
char cbuf[20];
cbuf[0] = '\0';
// add the prompt to the messsage window
// add the prompt to the message window
NetHackQtBind::qt_putstr(WIN_MESSAGE, ATR_BOLD, message);
while (result < 0) {
@@ -848,7 +848,7 @@ void NetHackQtBind::qt_getlin(const char *prompt, char *line)
keybuffer.Drain();
}
// add the prompt with appended response to the messsage window
// add the prompt with appended response to the message window
char buf[BUFSZ + 20], *q; /* +20: plenty of extra room for visctrl() */
copynchars(buf, prompt, BUFSZ - 1);
q = eos(buf);

View File

@@ -525,7 +525,7 @@ void NetHackQtMapViewport::Clear()
{
for (int j = 0; j < ROWNO; ++j) {
//
// FIXME: map column 0 should be surpressed from being displayed
// FIXME: map column 0 should be suppressed from being displayed
//
Glyph(0, j) = GLYPH_NOTHING;
Glyphttychar(0, j) = ' ';

View File

@@ -221,7 +221,7 @@ NetHackQtGlyphs& NetHackQtSettings::glyphs()
{
// Caveat:
// 'theglyphs' will be Null if the tiles file couldn't be loaded;
// the game can still procede with an ascii map in that situation.
// the game can still proceed with an ascii map in that situation.
return *theglyphs;
}

View File

@@ -48,7 +48,7 @@
// with a separator between Cha:NN and it. Time, when active, is
// placed after Gold. Score, if enabled and active, is shown in the
// filler slot before Gold. When there are no Conditions to display,
// there is an an invisible fake one (blank icon over blank text)
// there is an invisible fake one (blank icon over blank text)
// rendered in order to preserve the vertical space they need.
//
// FIXME:
@@ -60,7 +60,7 @@
// There are separate icons for Satiated and Hungry, but Weak, Fainting,
// and Fainted all share the Hungry one. Weak should have its own,
// Fainting+Fainted should have another. The current two depict
// plates with cutlery which is a bit of an anachronism. Statiated
// plates with cutlery which is a bit of an anachronism. Satiated
// could be replaced by a figure in profile with a bulging belly,
// Hungry similar but with a slightly concave belly, Weak either a
// collapsing figure or a much larger concavity or both, Fainting/
@@ -315,7 +315,7 @@ NetHackQtStatusWindow::NetHackQtStatusWindow() :
statbox->addWidget(&time);
}
vbox->addLayout(statbox);
vbox->addWidget(&hline3); // separtor before Time+Score or Conditions
vbox->addWidget(&hline3); // separator before Time+Score or Conditions
if (spreadout) {
// when not condensed, put Time and Score on an extra row; since
// they're both optionally displayed, their row might be empty

View File

@@ -28,14 +28,14 @@
// be able to sort by role or by game start date or by save date.
// The core fetches character names from inside the files; it could
// obtain the information needed for alternate sorting. Simpler
// enchancement: instead of just showing the character name, show
// enhancement: instead of just showing the character name, show
// "name-role-race-gender-alignment".
//
// Note:
// The code in this file is not used if the program is built without
// having SELECTSAVED defined or if the run-time option 'selectsaved'
// is False. SELECTSAVED used to be forced for Qt but isn't any more.
// Howver, we include this code unconditionally.
// However, we include this code unconditionally.
//
extern "C" {

View File

@@ -22,7 +22,7 @@
// and also because this is my first major application of Qt.
//
// The problem of NetHack's getkey requirement is solved by intercepting
// key events by overiding QApplication::notify(...), and putting them in
// key events by overriding QApplication::notify(...), and putting them in
// a buffer. Mouse clicks on the map window are treated with a similar
// buffer. When the NetHack engine calls for a key, one is taken from
// the buffer, or if that is empty, QApplication::exec() is called.

View File

@@ -36,7 +36,7 @@
// used to select the shorter while still providing opportunity to type
// more of the longer command; (there are several such cases:
// "#drop[type]", "#known[class]", "#takeoff[all]", "#version[short]");
// button is left justitied (prior to addition of the filter/layout/reset
// button is left justified (prior to addition of the filter/layout/reset
// buttons, [Cancel] stretched all the way across the top of the widget);
// [Filter] toggles between normal and autocomplete when playing in normal
// or explore mode, cycles through "all", "normal", "autocomplete", and

View File

@@ -1,6 +1,6 @@
// qt_xpms.h - static xpm arrays for use in status display
//
// In alhpabetical order by array name. Probably not the best ordering...
// In alphabetical order by array name. Probably not the best ordering...
/* clang-format off */

View File

@@ -196,7 +196,7 @@ char NetHackQtYnDialog::Exec()
QString button_name = QString(visctrl((char) ch[i].cell()));
if (is_yn || is_ynq || is_ynaq || is_lr) {
// FIXME: a better way to recognize which labels should
// use alterate text is needed
// use alternate text is needed
switch (ch[i].cell()) {
case 'y':
button_name = "Yes";

View File

@@ -20,7 +20,7 @@ private:
QLineEdit *le;
QPushButton *y_btn;
// abritrary size; might need to be more sophisicated someday
// arbitrary size; might need to be more sophisticated someday
char alt_answer[26 + 1], alt_result[26 + 1];
protected:

View File

@@ -96,7 +96,7 @@ aren't familiar, talk to your local X11 guru and read the man pages.
nethack.sh automatically adds HACKDIR to your font search path. If
you (assuming you are a system administrator) can install the fonts in your
standard X11 font directory the relevent lines in nethack.sh can be removed.
standard X11 font directory the relevant lines in nethack.sh can be removed.
Alternatively, all persons playing nethack must add that "xset fp+"
command to their .xinitrc file, or whatever file they execute when starting
X11. See the note below for the alternative installation procedure

View File

@@ -68,7 +68,7 @@ NetHack*rip*foreground: black
! questions is _not_ used. Single-character prompts appear in a fixed
! position between the top of the map and the bottom of the messages.
! If False, popups appear near where the pointer is positioned so tend to
! meander around the screen depending upon where the last click ocurred.
! meander around the screen depending upon where the last click occurred.
! (The name 'slow' is misleading; this feature was originally necessitated
! by window managers which were slow putting up popup windows, but the
! fixed-position prompting can be just as useful for quick popups.)
@@ -89,7 +89,7 @@ NetHack*highlight_prompt: False
! The number of lines the message window will show without scrolling.
!NetHack*message_lines: 12
! If True, the message window has a line that seperates old and new messages.
! If True, the message window has a line that separates old and new messages.
!NetHack*message_line: True
! If True, the default, use a "fancy" style status area below the map.

View File

@@ -33,7 +33,7 @@
#include "config.h" /* #define for const for non __STDC__ compilers */
#include "lint.h" /* for nethack's nhStr() macro */
#include "winX.h" /* to make sure protoypes match corresponding functions */
#include "winX.h" /* to make sure prototypes match corresponding functions */
static XtResource resources[] = {
#define offset(field) XtOffset(WindowWidget, window.field)

View File

@@ -44,7 +44,7 @@
* + Include nethack's lint.h to get nhStr() macro.
* + Use nhStr() on string literals (or macros from <X11/StringDefs.h>
* that hide string literals) to cast away implicit 'const' in order
* to suppress "warning: assignment discards qualifers from pointer
* to suppress "warning: assignment discards qualifiers from pointer
* target type" issued by 'gcc -Wwrite-strings' as used by nethack.
* (For this file, always the second parameter to XtSetArg().)
*
@@ -82,7 +82,7 @@
#undef X11_BUILD
#include "lint.h" /* for nethack's nhStr() macro */
#include "winX.h" /* to make sure protoypes match corresponding functions */
#include "winX.h" /* to make sure prototypes match corresponding functions */
/* ":" added to both translations below to allow limited redefining of
* keysyms before testing for keysym values -- dlc */
@@ -257,7 +257,7 @@ GetDialogResponse(Widget w)
return XtNewString(s);
}
/* set the default reponse */
/* set the default response */
void
SetDialogResponse(Widget w, String s, unsigned ln)
{

View File

@@ -3616,7 +3616,7 @@ fd00
3800
3600
ENDCHAR
STARTCHAR magic sheild 3
STARTCHAR magic shield 3
ENCODING 171
SWIDTH 666 0
DWIDTH 8 0

View File

@@ -796,7 +796,7 @@ new_resource_macro(
++q; /* skip whitespace between name and value */
for (p = eos(q); --p > q && (*p == ' ' || *p == '\t'); )
continue; /* discard trailing whitespace */
*++p = '\0'; /* q..p containes macro value */
*++p = '\0'; /* q..p contains macro value */
def_rsrc_valu[numdefs] = dupstr(q);
return TRUE;
}
@@ -2120,7 +2120,7 @@ static const char *yn_choices; /* string of acceptable input */
static char yn_def;
static char yn_return; /* return value */
static char yn_esc_map; /* ESC maps to this char. */
static Widget yn_popup; /* popup for the yn fuction (created once) */
static Widget yn_popup; /* popup for the yn function (created once) */
static Widget yn_label; /* label for yn function (created once) */
static boolean yn_getting_num; /* TRUE if accepting digits */
static boolean yn_preserve_case; /* default is to force yn to lower case */
@@ -2146,7 +2146,7 @@ key_event_to_char(XKeyEvent *key)
nbytes = XLookupString(key, keystring, MAX_KEY_STRING, (KeySym *) 0,
(XComposeStatus *) 0);
/* Modifier keys return a zero lengh string when pressed. */
/* Modifier keys return a zero length string when pressed. */
if (nbytes == 0)
return '\0';
@@ -2547,7 +2547,7 @@ highlight_yn(boolean init)
if (!appResources.slow || !appResources.highlight_prompt)
return;
/* first time through, WIN_MAP isn't fully initiialized yet */
/* first time through, WIN_MAP isn't fully initialized yet */
xmap = ((map_win != WIN_ERR) ? &window_list[map_win]
: (WIN_MAP != WIN_ERR) ? &window_list[WIN_MAP] : 0);
@@ -2679,7 +2679,7 @@ init_standard_windows(void)
XtSetValues(status, args, num_args);
/*
* Realize the popup so that the status widget knows it's size.
* Realize the popup so that the status widget knows its size.
*
* If we unset MappedWhenManaged then the DECwindow driver doesn't
* attach the nethack toplevel to the highest virtual root window.
@@ -2810,7 +2810,7 @@ void
find_scrollbars(
Widget w, /* widget of interest; scroll bars are probably attached
to its parent or grandparent */
Widget last_w, /* if non-zero, don't search ancestory beyond this point */
Widget last_w, /* if non-zero, don't search ancestry beyond this point */
Widget *horiz, /* output: horizontal scrollbar */
Widget *vert) /* output: vertical scrollbar */
{

View File

@@ -706,7 +706,7 @@ check_cursor_visibility(struct xwindow *wp)
/* All values are relative to currently visible area */
#define V_BORDER 0.25 /* if this far from vert edge, shift */
#define H_BORDER 0.25 /* if this from from horiz edge, shift */
#define H_BORDER 0.25 /* if this far from horiz edge, shift */
#define H_DELTA 0.25 /* distance of horiz shift */
#define V_DELTA 0.25 /* distance of vert shift */
@@ -857,7 +857,7 @@ map_check_size_change(struct xwindow *wp)
if (new_width < map_info->viewport_width
|| new_height < map_info->viewport_height) {
/* [ALI] If the viewport was larger than the map (and so the map
* widget was contrained to be larger than the actual map) then we
* widget was constrained to be larger than the actual map) then we
* may be able to shrink the map widget as the viewport shrinks.
*/
if (map_info->is_tile) {
@@ -890,7 +890,7 @@ map_check_size_change(struct xwindow *wp)
/*
* Fill in parameters "regular" and "inverse" with newly created GCs.
* Using the given background pixel and the foreground pixel optained
* Using the given background pixel and the foreground pixel obtained
* by querying the widget with the resource name.
*/
static void
@@ -1089,7 +1089,7 @@ clear_map_window(struct xwindow *wp)
}
/*
* Retreive the font associated with the map window and save attributes
* Retrieve the font associated with the map window and save attributes
* that are used when updating it.
*/
static void

View File

@@ -648,7 +648,7 @@ menu_scrollmask(struct xwindow *wp)
return scrlmask;
}
/* if a menu is scrolled vertically and/horizontallty, return it to the top
/* if a menu is scrolled vertically and/horizontally, return it to the top
and far left */
static void
menu_unscroll(struct xwindow *wp)
@@ -715,7 +715,7 @@ x11_scroll_perminv(int arg UNUSED) /* arg is always 1 */
* We accept some extra characters that menus usually ignore:
* ^C will be treated like <escape>, leaving menu positioned as-is
* and returning to play; <delete> or <backspace> will be treated
* like <return> and <space>, reseting the menu to its top and
* like <return> and <space>, resetting the menu to its top and
* returning to play; other characters will either be rejected by
* yn_function or stay here for scrolling.
*/
@@ -779,7 +779,7 @@ X11_start_menu(winid window, unsigned long mbehavior UNUSED)
wp = &window_list[window];
if (wp->menu_information->is_menu) {
/* make sure we'ere starting with a clean slate */
/* make sure we're starting with a clean slate */
free_menu(&wp->menu_information->new_menu);
} else {
wp->menu_information->is_menu = TRUE;

View File

@@ -383,7 +383,7 @@ split(char *s,
}
/*
* Add a line of text to the window. The first line in the curcular list
* Add a line of text to the window. The first line in the circular list
* becomes the last. So all we have to do is copy the new line over the
* old one. If the line buffer is too small, then allocate a new, larger
* one.
@@ -410,7 +410,7 @@ add_line(struct mesg_info_t *mesg_info, const char *s)
}
/*
* Save a position in the text buffer so we can draw a line to seperate
* Save a position in the text buffer so we can draw a line to separate
* text from the last time this function was called.
*
* Save the head position, since it is the line "after" the last displayed
@@ -455,7 +455,7 @@ redraw_message_window(struct xwindow *wp)
* Do this the cheap and easy way. Clear the window and just redraw
* the whole thing.
*
* This could be done more effecently with one call to XDrawText() instead
* This could be done more efficiently with one call to XDrawText() instead
* of many calls to XDrawString(). Maybe later.
*
* Only need to clear if window has new text.
@@ -567,7 +567,7 @@ get_gc(Widget w, struct mesg_info_t *mesg_info)
/*
* Handle resizes on a message window. Correct saved pixel height and width.
* Adjust circle buffer to accomidate the new size.
* Adjust circle buffer to accommodate the new size.
*
* Problem: If the resize decreases the width of the window such that
* some lines are now longer than the window, they will be cut off by

View File

@@ -1704,7 +1704,7 @@ ec_scroll_to_view(int ec_indx) /* might be greater than extended_cmd_selected */
* If the extended command menu needs to be scrolled in order to move
* either the highlighted entry (extended_cmd_selected) or the target
* entry (ec_indx) into view, we want to make both end up visible.
* [Highligthed one is the first matching entry when the user types
* [Highlighted one is the first matching entry when the user types
* something, such as "adjust" after typing 'a', and will be chosen
* by pressing <return>. Target entry is one past the last matching
* entry (or last matching entry itself if at end of command list),
@@ -1886,7 +1886,7 @@ ec_key(Widget w, XEvent *event, String *params, Cardinal *num_params)
swap_fg_bg(extended_commands[extended_cmd_selected]);
}
/* advance to one past last matching entry, so that all
ambiguous choices, plus one to show thare aren't any
ambiguous choices, plus one to show there aren't any
more such, will scroll into view */
do {
if (!command_list[i + 1])

View File

@@ -78,7 +78,7 @@ delete_text(Widget w, XEvent *event, String *params, Cardinal *num_params)
}
/*
* Callback used for all text windows. The window is poped down on any key
* Callback used for all text windows. The window is popped down on any key
* or button down event. It is destroyed if the main nethack code is done
* with it.
*/

View File

@@ -50,11 +50,11 @@ differences are primarily visual. This windowport supports dymanic
resizing of the terminal window, so you can play with it to see how it
looks best to you during a game. Also, the align_status and
align_message options may be set during the game, so you can experiment
to see what arraingement looks best to you.
to see what arrangement looks best to you.
For menus, in addition to the normal configurable keybindings for menu
navigation descrived in the Guidebook, you can use the right and left
arrows to to forward or backward one page, respectively, and the home
arrows to forward or backward one page, respectively, and the home
and end keys to go to the first and last pages, respectively.
Some configuration options that are specific to or relevant to the
@@ -105,7 +105,7 @@ CONTACT
Please send any bug reports, suggestions, patches, or miscellaneous
feedback to me (Karl Garrison) at: kgarrison@pobox.com. Note that as
of this writing, I only have sporatic Internet access, so I may not get
of this writing, I only have sporadic Internet access, so I may not get
back to you right away.
Happy Hacking!

View File

@@ -36,7 +36,7 @@ DISPLAY
* Animation effects do not display properly - this could probably be
fixed with a correct implementation of the curses_delay_output function.
* Support option to set forground and background colors for individual
* Support option to set foreground and background colors for individual
windows
@@ -45,7 +45,7 @@ MENUS
(cursdial.c)
* Menus need to be able to accept a count as input, e.g. to specifiy
* Menus need to be able to accept a count as input, e.g. to specify
how many items to drop.
* Currently the "preselected" flag for an individual menu item is
@@ -79,7 +79,7 @@ MAP WINDOW
* The map window would probably benefit from a total redesign. Right
now, it uses a pad instead of a regular curses window, which causes a
number of special cases in the code to account for it, and a seperate
number of special cases in the code to account for it, and a separate
window behind it just to draw the border. It feels kludgy and
annoying!
@@ -95,7 +95,7 @@ STATUS WINDOW
Gnomish Mines) and perhaps show thermometer bars for hit points and
magical power.
* Conversely, if we have a narrower dislay, compress some of the
* Conversely, if we have a narrower display, compress some of the
labels to save space, and do not display some items that never or
rarely change (e.g. name, level and title, and alignment). Perhaps
display changes to these fields in the message window if they do
@@ -132,7 +132,7 @@ MISC
* Update documentation and in-game help to describe the newly-added
options: cursesgraphics, term_rows, term_cols, and windowborders.
* Recognize "Alt" key in a platform-independant way to allow its use
* Recognize "Alt" key in a platform-independent way to allow its use
to select extended commands. Currently this works for PDCurses. For
Ncurses, the Alt key works in an xterm or rxvt if the -meta8 flag is
passed, but I'd like to see a general way of detecting it.

View File

@@ -1097,7 +1097,7 @@ menu_win_size(nhmenu *menu)
}
/* avoid a tiny popup window; when it's shown over the endings of
old messsages rather than over the map, it is fairly easy for
old messages rather than over the map, it is fairly easy for
the player to overlook it, particularly when walking around and
stepping on a pile of 2 items; also, multi-page menus need enough
room for "(Page M of N) => " even if all entries are narrower
@@ -1669,7 +1669,7 @@ menu_select_deselect(
/* Perform the selected operation (select, unselect, invert selection)
on the given menu page. If menu_page is 0, then perform opetation on
on the given menu page. If menu_page is 0, then perform operation on
all pages in menu. Returns last page displayed. */
static int

View File

@@ -207,7 +207,7 @@ curses_create_main_windows(void)
boolean msg_vertical = (message_orientation == ALIGN_LEFT
|| message_orientation == ALIGN_RIGHT);
/* Vertical windows have priority. Otherwise, priotity is:
/* Vertical windows have priority. Otherwise, priority is:
status > inv > msg */
if (status_vertical)
set_window_position(&status_x, &status_y,
@@ -752,7 +752,7 @@ curses_init_options(void)
#ifdef PDCURSES
/* PDCurses for SDL, win32 and OS/2 has the ability to set the
terminal size programatically. If the user does not specify a
terminal size programmatically. If the user does not specify a
size in the config file, we will set it to a nice big 32x110 to
take advantage of some of the nice features of this windowport. */
if (iflags.wc2_term_cols == 0)

View File

@@ -372,7 +372,7 @@ curses_uncurse_terminal(void)
{
/* also called by panictrace_handler(), a signal handler, so somewhat
iffy in that situation; but without this, newlines behave as raw
line feeds so subseqent backtrace gets scrawled all over the screen
line feeds so subsequent backtrace gets scrawled all over the screen
and is nearly useless */
curses_cleanup();
curs_set(orig_cursor);

View File

@@ -1249,7 +1249,7 @@ curs_vert_status_vals(int win_width)
Sprintf(status_vals_long[BL_VERS],
"%*s%s", win_width - txtlen, " ", text);
} else if ((fldidx == BL_HUNGER || fldidx == BL_CAP) && *text) {
/* hunger and enbumbrance are shown side-by-side in
/* hunger and encumbrance are shown side-by-side in
a 26 character or wider window; if leading space is
present, get rid of it, then add one we're sure about */
if (*text == ' ')
@@ -1783,7 +1783,7 @@ draw_bar(boolean is_hp, int cur, int max, const char *title)
}
/* Update the status win - this is called when NetHack would normally
write to the status window, so we know somwthing has changed. We
write to the status window, so we know something has changed. We
override the write and update what needs to be updated ourselves. */
void
curses_update_stats(void)
@@ -2105,7 +2105,7 @@ draw_vertical(int x, int y, int hp, int hpmax)
wmove(win, y++, x);
wprintw(win, "%s", dungeons[u.uz.dnum].dname);
y++; /* Blank line inbetween */
y++; /* Blank line in-between */
wmove(win, y++, x);
/* Attributes. Old vertical order is preserved */

View File

@@ -21,7 +21,7 @@ typedef struct nhw {
int width; /* Usable width not counting border */
int height; /* Usable height not counting border */
int x; /* start of window on terminal (left) */
int y; /* start of window on termial (top) */
int y; /* start of window on terminal (top) */
int orientation; /* Placement of window relative to map */
boolean border; /* Whether window has a visible border */
} nethack_window;

View File

@@ -1,4 +1,4 @@
# monsters.txt - tile defintions for monsters
# monsters.txt - tile definitions for monsters
# Note: lines beginning with '# tile ' are not comments; other
# lines beginning with '#' are.
. = (71, 108, 108)

View File

@@ -1,4 +1,4 @@
# objects.txt - tile defintions for objects
# objects.txt - tile definitions for objects
# Note: lines beginning with '# tile ' are not comments; other
# lines beginning with '#' are.
. = (71, 108, 108)

View File

@@ -1,4 +1,4 @@
# other.txt - tile defintions for 'other' (walls, furniture, explosions)
# other.txt - tile definitions for 'other' (walls, furniture, explosions)
# Note: lines beginning with '# tile ' are not comments; other
# lines beginning with '#' are.
. = (71, 108, 108)

View File

@@ -326,7 +326,7 @@ safe_nhgetch(void)
/*
* return a key, or 0, in which case a mouse button was pressed
* mouse events should be returned as character postitions in the map window.
* mouse events should be returned as character positions in the map window.
* Since normal tty's don't have mice, just return a key.
*/
/*ARGSUSED*/

View File

@@ -380,7 +380,7 @@ fopen_text_file(const char *filename, const char *type)
int i;
if (tile_file != (FILE *) 0) {
Fprintf(stderr, "can only open one text file at at time\n");
Fprintf(stderr, "can only open one text file at a time\n");
return FALSE;
}

View File

@@ -600,7 +600,7 @@ xputc(int c) /* actually char, but explicitly specify its widened type */
*
* xputc() used to be declared as 'void xputc(c) char c; {}' but
* avoiding the proper type 'int' just to avoid (void) casts when
* ignoring the result can't have been sufficent reason to add it.
* ignoring the result can't have been sufficient reason to add it.
* It also had '#if apollo' conditional to have the arg be int.
* Matching putchar()'s declaration and using explicit casts where
* warranted is more robust, so we're just a jacket around that.
@@ -1009,7 +1009,7 @@ init_hilite(void)
Strcat(hilites[CLR_BLACK], scratch);
}
} else {
/* But it's concievable that hilighted black-on-black could
/* But it's conceivable that hilighted black-on-black could
* still be invisible on many others. We substitute blue for
* black.
*/

View File

@@ -582,7 +582,7 @@ msghistory_snapshot(
if (mesg && *mesg) {
snapshot_mesgs[outidx++] = mesg;
if (purge) {
/* we're taking this pointer away; subsequest history
/* we're taking this pointer away; subsequent history
updates will eventually allocate a new one to replace it */
cw->data[inidx] = (char *) 0;
cw->datlen[inidx] = 0;

View File

@@ -4305,7 +4305,7 @@ tty_status_enablefield(
* windowport that it should output all changes received
* to this point. It marks the end of a bot() cycle.
* -- fldindex could also be BL_RESET (-3), which is not really
* a field index, but is a special advisory to to tell the
* a field index, but is a special advisory to tell the
* windowport that it should redisplay all its status fields,
* even if no changes have been presented to it.
* -- ptr is usually a "char *", unless fldindex is BL_CONDITION.
@@ -4437,7 +4437,7 @@ tty_status_update(
}
/* The core botl engine sends a single blank to the window port
for carrying-capacity when its unused. Let's suppress that */
for carrying-capacity when it's unused. Let's suppress that */
if (fldidx >= 0 && fldidx < MAXBLSTATS
&& tty_status[NOW][fldidx].lth == 1
&& status_vals[fldidx][0] == ' ') {

View File

@@ -71,7 +71,7 @@ int GUILaunched = TRUE; /* We tell shared startup code in windmain.c
#define _strdup(s1) strdup(s1)
#endif
// Foward declarations of functions included in this code module:
// Forward declarations of functions included in this code module:
extern boolean main(int, char **);
static void __cdecl mswin_moveloop(void *);
@@ -170,7 +170,7 @@ WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine,
_nethack_app.bNoSounds = FALSE;
#if 0 /* GdiTransparentBlt does not render spash bitmap for whatever reason */
#if 0 /* GdiTransparentBlt does not render splash bitmap for whatever reason */
/* use system-provided TransparentBlt for Win2k+ */
ZeroMemory(&osvi, sizeof(OSVERSIONINFO));
osvi.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
@@ -206,7 +206,7 @@ WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine,
/* get command line parameters */
p = _get_cmd_arg(GetCommandLine());
p = _get_cmd_arg(NULL); /* skip first paramter - command name */
p = _get_cmd_arg(NULL); /* skip first parameter - command name */
for (argc = 1; p && argc < MAX_CMDLINE_PARAM; argc++) {
len = _tcslen(p);
if (len > 0) {
@@ -420,7 +420,7 @@ _nhapply_image_transparent(HDC hDC, int x, int y, int width, int height,
/* Mask out the transparent colored pixels on the source image. */
BitBlt(hdcSave, 0, 0, width, height, hdcBack, 0, 0, SRCAND);
/* XOR the source image with the beckground. */
/* XOR the source image with the background. */
BitBlt(hdcMem, 0, 0, width, height, hdcSave, 0, 0, SRCPAINT);
/* blt resulting image to the screen */

View File

@@ -38,7 +38,7 @@ mswin_getlin_window(const char *question, char *result, size_t result_size)
INT_PTR ret;
struct getlin_data data;
/* initilize dialog data */
/* initialize dialog data */
ZeroMemory(&data, sizeof(data));
data.question = question;
data.result = result;
@@ -402,7 +402,7 @@ calculate_player_selector_layout(plsel_data_t * data)
name_box->size.cy = (int) (24 * scale);
control_t * role_list = &data->controls[psc_role_list];
/* NOTE: we dont' scale the list view reported height as it appears these
/* NOTE: we don't scale the list view reported height as it appears these
values are the actual size the control will be drawn at using the
existing DPI value */
role_list->size.cy = list_view_height(role_list->hWnd, data->role_count);

View File

@@ -55,7 +55,7 @@ mswin_font_supports_unicode(HFONT hFont)
return FALSE;
}
/* create font based on window type, charater attributes and
/* create font based on window type, character attributes and
window device context */
cached_font *
mswin_get_font(int win_type, int attr, HDC hdc, BOOL replace)

View File

@@ -1113,7 +1113,7 @@ onWMCommand(HWND hWnd, WPARAM wParam, LPARAM lParam)
return 0;
}
// Mesage handler for about box.
// Message handler for about box.
LRESULT CALLBACK
About(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
{
@@ -1213,7 +1213,7 @@ mswin_select_map_mode(int mode)
iflags.wc_map_mode = mode;
/*
** first, check if WIN_MAP has been inialized.
** first, check if WIN_MAP has been initialized.
** If not - attempt to retrieve it by type, then check it again
*/
if (map_id == WIN_ERR)

View File

@@ -5,7 +5,7 @@
#ifndef MSWINMainWindow_h
#define MSWINMainWindow_h
/* this is a main appliation window */
/* this is a main application window */
#include "winMS.h"

View File

@@ -325,7 +325,7 @@ mswin_map_layout(HWND hWnd, LPSIZE map_size)
data->xFrontTile = max(data->xFrontTile, 1);
data->yFrontTile = max(data->yFrontTile, 1);
/* calcuate ASCII cursor height */
/* calculate ASCII cursor height */
data->yBlinkCursor = (int) ((double) CURSOR_HEIGHT * data->backScale);
data->yNoBlinkCursor = data->yBackTile;
@@ -586,7 +586,7 @@ MapWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
size.cx = LOWORD(lParam);
size.cy = HIWORD(lParam);
} else {
/* mapping factor is unchaged we just need to adjust scroll bars
/* mapping factor is unchanged we just need to adjust scroll bars
*/
size.cx = data->xFrontTile * COLNO;
size.cy = data->yFrontTile * ROWNO;

View File

@@ -299,7 +299,7 @@ MenuWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
data->is_active = FALSE;
SetWindowLongPtr(hWnd, GWLP_USERDATA, (LONG_PTR) data);
}
/* set font for the text cotrol */
/* set font for the text control */
cached_font * font = mswin_get_font(NHW_MENU, ATR_NONE, hdc, FALSE);
SendMessage(control, WM_SETFONT,
(WPARAM) font->hFont,

View File

@@ -294,7 +294,7 @@ onMSNHCommand(HWND hWnd, WPARAM wParam, LPARAM lParam)
int okkey = 0;
char tmptext[MAXWINDOWTEXT + 1];
// @@@ Ok respnses
// @@@ Ok responses
/* save original text */
strcpy(tmptext, data->window_text[MSG_LINES - 1].text);
@@ -795,7 +795,7 @@ can_append_text(HWND hWnd, int attr, const char *text)
if (data->lines_not_seen == 0)
return FALSE;
/* cannot append text with different attrbutes */
/* cannot append text with different attributes */
if (data->window_text[MSG_LINES - 1].attr != attr)
return FALSE;
@@ -803,7 +803,7 @@ can_append_text(HWND hWnd, int attr, const char *text)
if (str_end_is(data->window_text[MSG_LINES - 1].text, "\n"))
return FALSE;
/* check if the maximum string langth will be exceeded */
/* check if the maximum string length will be exceeded */
if (strlen(data->window_text[MSG_LINES - 1].text) + 2
+ /* space characters */
strlen(text) + strlen(MORE)

View File

@@ -73,7 +73,7 @@ typedef struct mswin_nethack_status_window {
mswin_status_lines * status_lines;
back_buffer_t back_buffer;
boolean blink_state; /* true = invert blink text */
boolean has_blink_fields; /* true if one or more has blink attriubte */
boolean has_blink_fields; /* true if one or more has blink attribute */
} NHStatusWindow, *PNHStatusWindow;

View File

@@ -36,7 +36,7 @@ mswin_init_text_window(void)
mswin_get_window_placement(NHW_TEXT, &rt);
}
/* create text widnow object */
/* create text window object */
ret = CreateDialog(GetNHApp()->hApp, MAKEINTRESOURCE(IDD_NHTEXT),
GetNHApp()->hMainWnd, NHTextWndProc);
if (!ret)

View File

@@ -161,10 +161,10 @@ mswin_init_nhwindows(int *argc, char **argv)
mswin_nh_input_init();
/* set it to WIN_ERR so we can detect attempts to
use this ID before it is inialized */
use this ID before it is initialized */
WIN_MAP = WIN_ERR;
/* Read Windows settings from the reqistry */
/* Read Windows settings from the registry */
/* First set safe defaults */
GetNHApp()->regMainMinX = CW_USEDEFAULT;
mswin_read_reg();
@@ -3050,7 +3050,7 @@ mswin_status_enablefield(int fieldidx, const char *nm, const char *fmt,
}
}
/* TODO: turn this into a commmon helper; multiple identical implementations */
/* TODO: turn this into a common helper; multiple identical implementations */
static int
mswin_condcolor(long bm, unsigned long *bmarray)
{
@@ -3095,7 +3095,7 @@ status_update(int fldindex, genericptr_t ptr, int chg, int percent, int color, u
windowport that it should output all changes received
to this point. It marks the end of a bot() cycle.
-- fldindex could also be BL_RESET, which is not really
a field index, but is a special advisory to to tell the
a field index, but is a special advisory to tell the
windowport that it should redisplay all its status fields,
even if no changes have been presented to it.
-- ptr is usually a "char *", unless fldindex is BL_CONDITION.
@@ -3122,7 +3122,7 @@ status_update(int fldindex, genericptr_t ptr, int chg, int percent, int color, u
use to display the text.
-- condmasks is a pointer to a set of BL_ATTCLR_MAX unsigned
longs telling which conditions should be displayed in each
color and attriubte.
color and attribute.
*/
DISABLE_WARNING_FORMAT_NONLITERAL