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

@@ -25,11 +25,11 @@ Generally the build is the same as the unix build:
[Edit Oct 4, 2020:]
Resulting libaries will be in the `targets/wasm` directory for `CROSS_TO_WASM=1`.
Resulting libaries will be in the `src` directory for `WANT_LIBNH=1`.
Resulting libraries will be in the `targets/wasm` directory for `CROSS_TO_WASM=1`.
Resulting libraries will be in the `src` directory for `WANT_LIBNH=1`.
[Original text:]
Resulting libaries will be in the `src` directory.
Resulting libraries will be in the `src` directory.
WASM also has a npm module that can be published out of `sys/lib/npm-library`. After building the `nethack.js` it can be published by:
1. `cd sys/lib/npm-library`
@@ -38,13 +38,13 @@ WASM also has a npm module that can be published out of `sys/lib/npm-library`. A
## API: libnethack.a
The API is two functions:
* `nhmain(int argc, char *argv[])` - The main function for NetHack that configures the program and runs the `moveloop()` until the game is over. The arguments to this function are the [command line arguments](https://nethackwiki.com/wiki/Options) to NetHack.
* `shim_graphics_set_callback(shim_callback_t cb)` - A single function that sets a callback to gather graphics events: write a string to screen, get user input, etc. Your job is to pass in a callback and handle all the requested rendering events to show NetHack on the scrren. The callback is `void shim_callback_t(const char *name, void *ret_ptr, const char *fmt, ...)`
* `shim_graphics_set_callback(shim_callback_t cb)` - A single function that sets a callback to gather graphics events: write a string to screen, get user input, etc. Your job is to pass in a callback and handle all the requested rendering events to show NetHack on the screen. The callback is `void shim_callback_t(const char *name, void *ret_ptr, const char *fmt, ...)`
* `name` is the name of the [window function](https://github.com/NetHack/NetHack/blob/NetHack-3.7/doc/window.txt) that needs to be handled
* `ret_ptr` is a pointer to a memory space for the return value. The type expected to be returned in this pointer is described by the first character of the `fmt` string.
* `fmt` is a string that describes the signature of the callback. The first character in the string is the return type and any additional characters describe the variable arguments: `i` for integer, `s` for string, `p` for pointer, `c` for character, `v` for void. For example, if format is "vis" the callback will have no return (void), the first argument will be an integer, and the second argument will be a string. If format is "iii" the callback must return an integer, and both the arguments passed in will be integers.
* [Variadic arguments](https://www.gnu.org/software/libc/manual/html_node/Variadic-Example.html): a variable number and type of arguments depending on the `window function` that is being called. The arguments associated with each `name` are described in the [NetHack window.txt](https://github.com/NetHack/NetHack/blob/NetHack-3.7/doc/window.txt).
Where is the header file for the API you ask? There isn't one. It's three functions, just drop the forward declarations at the top of your file (or create your own header). It's more work figuring out how to install and copy around header files than it's worth for such a small API. If you disagree, feel free to sumbit a PR to fix it. :)
Where is the header file for the API you ask? There isn't one. It's three functions, just drop the forward declarations at the top of your file (or create your own header). It's more work figuring out how to install and copy around header files than it's worth for such a small API. If you disagree, feel free to submit a PR to fix it. :)
## API: nethack.js
The WebAssembly API has a similar signature to `libnethack.a` with minor syntactic differences:

View File

@@ -66,7 +66,7 @@ II. There once was a time when people built NetHack right on their DOS machine.
CROSS_TO_MSDOS=1
on your make command line.
Note: Both the fetch-cross-compiler.sh script and and the msdos
Note: Both the fetch-cross-compiler.sh script and the msdos
cross-compile and package procedures require unzip and zip to be available
on your host build system.

View File

@@ -111,7 +111,7 @@ typedef long clock_t;
#include <dos.h> /* needed for delay() */
#endif
#ifdef SCREEN_DJGPPFAST /* parts of this block may be unecessary now */
#ifdef SCREEN_DJGPPFAST /* parts of this block may be unnecessary now */
#define get_cursor(x, y) ScreenGetCursor(y, x)
#endif
@@ -134,7 +134,7 @@ int attrib_gr_normal; /* graphics mode normal attribute */
int attrib_text_intense; /* text mode intense attribute */
int attrib_gr_intense; /* graphics mode intense attribute */
uint32 curframecolor = NO_COLOR; /* current background text color */
boolean traditional = FALSE; /* traditonal TTY character mode */
boolean traditional = FALSE; /* traditional TTY character mode */
boolean inmap = FALSE; /* in the map window */
char ttycolors[CLR_MAX]; /* also used/set in options.c */

View File

@@ -1340,7 +1340,7 @@ vesa_FontPtrs(void)
}
/*
* This will verify the existance of a VGA adapter on the machine.
* This will verify the existence of a VGA adapter on the machine.
* Video function call 0x4F00 returns 0x004F in AX if successful, and
* returns a VbeInfoBlock describing the features of the VESA BIOS.
*/
@@ -1628,7 +1628,7 @@ vesa_WriteCharXY(uint32 chr, int pixx, int pixy, uint32 colour)
/*
* Draw a character with a transparent background
* Don't bother cacheing; only the position bar and the cursor use this
* Don't bother caching; only the position bar and the cursor use this
*/
static void
vesa_WriteCharTransparent(int chr, int pixx, int pixy, int colour)

View File

@@ -917,7 +917,7 @@ vga_FontPtrs(void)
}
/*
* This will verify the existance of a VGA adapter on the machine.
* This will verify the existence of a VGA adapter on the machine.
* Video function call 0x1a returns 0x1a in AL if successful, and
* returns the following values in BL for the active display:
*

View File

@@ -209,7 +209,7 @@ _CrtSetReportFile(_CRT_ASSERT, _CRTDBG_FILE_STDERR);*/
}
}
/* okay so we have the overriding and definitive locaton
/* okay so we have the overriding and definitive location
for sysconf, but only in the event that there is not a
sysconf file there (for whatever reason), check a secondary
location rather than abort. */

View File

@@ -12,7 +12,7 @@
* from this software without specific prior written permission.
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*/
/* Several minor changes were made for the NetHack distribution to satisfy
@@ -56,7 +56,7 @@ static char sccsid[] = "@(#)random.c 5.5 (Berkeley) 7/6/88";
* initialized to contain information for random number generation with that
* much state information. Good sizes for the amount of state information are
* 32, 64, 128, and 256 bytes. The state can be switched by calling the
* setstate() routine with the same array as was initiallized with
* setstate() routine with the same array as was initialized with
* initstate().
* By default, the package runs with 128 bytes of state information and
* generates far better random numbers than a linear congruential generator.
@@ -348,7 +348,7 @@ char *arg_state;
* random:
* If we are using the trivial TYPE_0 R.N.G., just do the old linear
* congruential bit. Otherwise, we do our fancy trinomial stuff, which is the
* same in all ther other cases due to all the global variables that have been
* same in all the other cases due to all the global variables that have been
* set up. The basic operation is to add the number at the rear pointer into
* the one at the front pointer. Then both pointers are advanced to the next
* location cyclically in the table. The value returned is the sum generated,

View File

@@ -309,7 +309,7 @@ setftty(void)
start_screen();
}
void intron(void) /* enable kbd interupts if enabled when game started */
void intron(void) /* enable kbd interrupts if enabled when game started */
{
#ifdef TTY_GRAPHICS
/* Ugly hack to keep from changing tty modes for non-tty games -dlc */

View File

@@ -12,14 +12,14 @@
* from this software without specific prior written permission.
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*/
/*
* Modified 12 April 1990 by Mark Adler for use on MSDOS systems with
* Microsoft C and Turbo C.
*
* Modifed 13 February 1991 by Greg Roelofs for use on VMS systems. As
* Modified 13 February 1991 by Greg Roelofs for use on VMS systems. As
* with the MS-DOS version, the setting of the file mode has been disabled.
* Compile and link normally (but note that the shared-image link option
* produces a binary only 6 blocks long, as opposed to the 137-block one

View File

@@ -54,7 +54,7 @@ DIRPERM = 0755
# per discussion in Install.X11 and Install.Qt
# Qt prefers nhtiles.bmp but can use x11tiles, and it ignores NetHack.ad.
# X11 uses those last two.
# Both can display a convential text map instead of tiles.
# Both can display a conventional text map instead of tiles.
# tty and/or curses (no extra data files outside of the dlb container):
#VARDATND =
# All X11 and/or Qt variations may also include tty or curses or both):

View File

@@ -56,7 +56,7 @@ If you are using the traditional configuration system, see Install.unx.
NetHack can support multiple user interfaces within the same binary on many
platforms. The various interface options can be specified by defining specific
variables, either on the make command line, or by setting environment variables
prior to the "make all" and "make install" steps. If you dont specify any
prior to the "make all" and "make install" steps. If you don't specify any
WANT_WIN_* customization, the build will only include traditional tty support.
As an example, to build a binary with tty + curses + X11 support, you can use

View File

@@ -16,7 +16,7 @@
//
// Your DEVELOPMENT_TEAM can be found by opening Keychain Access
// (found by Finder->Applications->Utilities). Click on "Login" key chain.
// Click on catagory "My Certificates".
// Click on category "My Certificates".
//
// Look for your "Mac Developer" certificate. Double click on
// the certificate to open a dialog that shows certificate details.

View File

@@ -14,7 +14,7 @@ ifdef MAKEFILE_SRC
ifdef WANT_WIN_QT
# when switching from Qt5 to Qt6 or vice versa, any old .moc files will be
# incompatible; get rid of them in case user hasn't run 'make spotless';
# object files are incompatable with Qt library, so get rid of them too;
# object files are incompatible with Qt library, so get rid of them too;
# Qt*.h-t are empty timestamp files and at most one should exist
QTany_H = Qt*.h-t
ifdef WANT_WIN_QT6

View File

@@ -677,7 +677,7 @@ ifdef MAKEFILE_TOP
# Installer certificate. Set DEVELOPER_CERT to the name of the certificate
# if you wish for your package to be signed for distribution.
#
# If building a package for signing, you must use sudo approriately.
# If building a package for signing, you must use sudo appropriately.
# the binaries and package using sudo but you DO NOT use sudo to sign the
# package. If you use sudo to sign the package, it will fail.
#

View File

@@ -8,7 +8,7 @@
# This hints file provides a single-user x11 build for Solaris, specifically
# for Solaris 10 and 11, but should work just fine on older versions
# Build using using included gcc and gmake, optional flex and bison come from csw for solaris 10 and included
# Build using included gcc and gmake, optional flex and bison come from csw for solaris 10 and included
# with Solaris 11
# Build NetHack off your home directory

View File

@@ -9,9 +9,9 @@
# Nethack will install suid games, and will expect to read a users .nethackrc file from
# their home directory which may be a problem on secure systems with read restricted home
# directories, not that you would problably run NetHack on such a system anyway. :)
# directories, not that you would probably run NetHack on such a system anyway. :)
# Build using using included gcc and gmake, optional flex and bison come from csw for solaris 10
# Build using included gcc and gmake, optional flex and bison come from csw for solaris 10
# and included on Solaris 11

View File

@@ -8,7 +8,7 @@
1. NetHack 3.7 was built and tested on OpenVMS on both the Integrity
and Alpha platform using the HP C V7.3 for OpenVMS compiler. While
not tested, older versions of DEC C will most likely work as compatibility
with older systems is a goal of the VMS porting team. Unfortunatly,
with older systems is a goal of the VMS porting team. Unfortunately,
ancient VAX C probably will no longer work. The set of Makefiles provided
are known to be out of date; use vmsbuild.com instead.

View File

@@ -13,7 +13,7 @@ $ ! compiler-option : either "VSIC", "VAXC", "DECC",
$ ! "GNUC" or "" or "fetchlua" !default in 3.7 is VSIC
$ ! link-option : either "SHARE[able]" or "LIB[rary]" !default SHARE
$ ! cc-switches : optional qualifiers for CC (such as "/noOpt/Debug")
$ ! linker-switches : optional qualifers for LINK (/Debug or /noTraceback)
$ ! linker-switches : optional qualifiers for LINK (/Debug or /noTraceback)
$ ! interface : "TTY" or "CURSES" or "TTY+CURSES" or "CURSES+TTY"
$ ! notes:
$ ! If the symbol "CC" is defined, compiler-option is not used (unless it
@@ -77,7 +77,7 @@ $ copy sys$input: sys$error: !p1 usage
or "GNUC" -- use GNU C to compile everything
or "LINK" -- skip compilation, just relink nethack.exe
or "SPEC[IAL]" -- just compile and link dlb.exe and recover.exe
or "FETCHLUA" -- skip compilaton, just fetch lua from lua.org
or "FETCHLUA" -- skip compilation, just fetch lua from lua.org
or "BUILDLUA" -- build [-.lib.lua]lua'LUAVER'.olb
or "" -- carry out default operation (VAXC unless 'CC' is defined)

View File

@@ -16,7 +16,7 @@
#include <starlet.h>
#endif
/* lint supression due to lack of extern.h */
/* lint suppression due to lack of extern.h */
int vms_link(const char *, const char *);
int vms_unlink(const char *);
int vms_creat(const char *, unsigned int);

View File

@@ -5,7 +5,7 @@
#include "config.h"
#include "mail.h"
/* lint supression due to lack of extern.h */
/* lint suppression due to lack of extern.h */
unsigned long init_broadcast_trapping(void);
unsigned long enable_broadcast_trapping(void);
unsigned long disable_broadcast_trapping(void);
@@ -71,7 +71,7 @@ static long pasteboard_id = 0; /* SMG's magic cookie */
* Unrecognized broadcasts result in the mail-daemon
* arriving and announcing the display text, but no scroll being created.
* If SHELL is undefined, then all broadcasts are treated as 'other'; since
* no subproceses are allowed, there'd be no way to respond to the scroll.
* no subprocesses are allowed, there'd be no way to respond to the scroll.
*
* When a scroll of mail is read by the character, readmail() extracts
* the command string and uses it for the default when prompting the
@@ -99,7 +99,7 @@ static long pasteboard_id = 0; /* SMG's magic cookie */
* Anything else results in just the message text being passed along, no
* scroll of mail so consequently no command to execute when scroll read.
* The user can set up ``$ XYZZY :== SEND'' prior to invoking NetHack if
* vanilla JNET responses to Bitnet messages are prefered.
* vanilla JNET responses to Bitnet messages are preferred.
*
* Static return buffers are used because only one broadcast gets
* processed at a time, and the essential information in each one is

View File

@@ -55,7 +55,7 @@ main(int argc, char *argv[])
atexit(byebye);
/* vms_basename(,FALSE) strips device, directory, suffix, and version;
the result is returned in a static buffer so we make a copy that
isn't at risk of gettting clobbered by core's handling of DEBUGFILES */
isn't at risk of getting clobbered by core's handling of DEBUGFILES */
progname = dupstr(vms_basename(argv[0], FALSE));
gh.hname = progname;
gh.hackpid = getpid();

View File

@@ -517,7 +517,7 @@ setftty(void)
settty_needed = TRUE;
}
/* enable kbd interupts if enabled when game started */
/* enable kbd interrupts if enabled when game started */
void
intron(void)
{

View File

@@ -43,7 +43,7 @@ extern unsigned long smg$init_term_table_by_type(), smg$del_term_table();
#define vms_ok(sts) ((sts) & 1) /* odd => success */
/* this could be static; it's only used within this file;
it won't be used at all if C_LIB$INTIALIZE gets commented out below,
it won't be used at all if C_LIB$INITIALIZE gets commented out below,
so make it global so that compiler won't complain that it's not used */
int vmsexeini(const void *, const void *, const unsigned char *);
@@ -845,11 +845,11 @@ vmsexeini(const void *inirtn_unused, const void *clirtn_unused,
* are appended rather than overwriting each other).
*
* VAX C made global variables become named program sections, to be
* compatable with Fortran COMMON blocks, simplifying mixed-language
* programs. GNU C for VAX/VMS did the same, to be compatable with
* compatible with Fortran COMMON blocks, simplifying mixed-language
* programs. GNU C for VAX/VMS did the same, to be compatible with
* VAX C. By default, DEC C makes global variables be global symbols
* instead, with its /Extern_Model=Relaxed_Ref_Def mode, but can be
* told to be VAX C compatable by using /Extern_Model=Common_Block.
* told to be VAX C compatible by using /Extern_Model=Common_Block.
*
* We don't want to force that for the whole program; occasional use
* of /Extern_Model=Strict_Ref_Def to find mistakes is too useful.
@@ -866,7 +866,7 @@ vmsexeini(const void *inirtn_unused, const void *clirtn_unused,
* So, we switch modes for this hack only. Besides, psect attributes
* for lib$initialize are different from the ones used for ordinary
* variables, so we'd need to resort to some linker magic anyway.
* (With assembly language, in addtion to having full control of the
* (With assembly language, in addition to having full control of the
* psect attributes in the source code, Macro32 would include enough
* information in its object file such that linker wouldn't need any
* extra instructions from us to make this work.) [If anyone links

View File

@@ -15,7 +15,7 @@ Windows" or NetHackW) goes to Alex Kompel who initially developed and
contributed the port.
Alex Kompel, Dion Nicolaas, Yitzhak Sapir, Derek S. Ray, Michael Allison,
Pasi Kallinen, Bart House, and Janet Walz contributed to the maintainance
Pasi Kallinen, Bart House, and Janet Walz contributed to the maintenance
of the tty and graphical windows versions of NetHack 3.7.0.
The build Makefiles and procedures produce two executables:

View File

@@ -245,7 +245,7 @@ NHV=$(subst ",,$(NHV1))
# WCURSES - window port files (curses)
# WCHAIN - window port files (chain)
# WSHR - Tile support files
# SNDSYS - sound suppport files for win32
# SNDSYS - sound support files for win32
# QT - QT window support files
INCL =../include

View File

@@ -100,9 +100,9 @@ GIT_AVAILABLE = N
#
#------------------------------------------------------------------------------
# This Makefile will attempt to auto-detect your selected target architecture
# based on Visual Studio command prompt configuration settins etc.
# based on Visual Studio command prompt configuration settings etc.
# However, if you want to manually override generation of a
# 32-bit or 64-bit build target, you can uncomment the apppropriate
# 32-bit or 64-bit build target, you can uncomment the appropriate
# TARGET_CPU line below.
#
@@ -1436,7 +1436,7 @@ $(PDCURSES_TOP)\curses.h:
# occurrence of string1 with string2 in the
# macro mymacro. Special ascii key codes may be
# used in the substitution text by preceding it
# with ^ as we have done below. Every occurence
# with ^ as we have done below. Every occurrence
# of a <tab> in $(ALLOBJ) is replaced by
# <+><return><tab>.

View File

@@ -2297,7 +2297,7 @@ void set_cp_map(void)
}
#if 0
/* early_raw_print() is used during early game intialization prior to the
/* early_raw_print() is used during early game initialization prior to the
* setting up of the windowing system. This allows early errors and panics
* to have there messages displayed.
*

View File

@@ -31,7 +31,7 @@ echo Directories look ok.
:movemakes
echo Moving Makefiles into ..\..\src for those not using Visual Studio
REM Some file movemet for those that still want to use MAKE or NMAKE and a Makefile
REM Some file movement for those that still want to use MAKE or NMAKE and a Makefile
:do_tty
if NOT exist %BINPATH%\*.* mkdir %BINPATH%
if NOT exist %BINPATH%\license copy ..\..\dat\license %BINPATH%\license >nul

View File

@@ -3,7 +3,7 @@
/* NetHack may be freely redistributed. See license for details. */
/*
* This header file is used to clear up some discrepencies with Visual C
* This header file is used to clear up some discrepancies with Visual C
* header files & NetHack before including windows.h, so all NetHack
* files should include "win32api.h" rather than <windows.h>.
*/