From a3658f85accf9de1af88cff7a447fb93ac74759e Mon Sep 17 00:00:00 2001 From: RainRat Date: Wed, 28 Feb 2024 20:15:56 -0800 Subject: [PATCH] fix typos --- Cross-compiling | 4 ++-- DEVEL/code_style.txt | 2 +- DEVEL/hooksdir/NHtext | 2 +- DEVEL/nhgitset.pl | 2 +- Porting | 4 ++-- dat/Rog-strt.lua | 2 +- dat/data.base | 4 ++-- dat/minend-2.lua | 2 +- dat/quest.lua | 4 ++-- dat/themerms.lua | 2 +- dat/tribute | 12 ++++++------ doc/Guidebook.mn | 8 ++++---- doc/Guidebook.tex | 8 ++++---- doc/Guidebook.txt | 6 +++--- doc/config.nh | 2 +- doc/fixesX-X-X.txt | 2 +- doc/lua.adoc | 2 +- doc/nethack.6 | 2 +- doc/nethack.txt | 2 +- doc/options.txt | 2 +- doc/sound.txt | 2 +- doc/tmac.n | 2 +- doc/window.txt | 2 +- include/config.h | 4 ++-- include/decl.h | 2 +- include/display.h | 4 ++-- include/global.h | 2 +- include/hack.h | 14 +++++++------- include/integer.h | 2 +- include/mondata.h | 2 +- include/monsters.h | 8 ++++---- include/objclass.h | 2 +- include/objects.h | 4 ++-- include/patchlevel.h | 4 ++-- include/rm.h | 4 ++-- include/skills.h | 2 +- include/unixconf.h | 2 +- include/wintype.h | 2 +- sound/windsound/windsound.c | 2 +- src/apply.c | 2 +- src/attrib.c | 4 ++-- src/ball.c | 2 +- src/bones.c | 4 ++-- src/cmd.c | 8 ++++---- src/decl.c | 2 +- src/detect.c | 4 ++-- src/dig.c | 2 +- src/display.c | 10 +++++----- src/do_name.c | 2 +- src/do_wear.c | 6 +++--- src/dogmove.c | 2 +- src/drawing.c | 2 +- src/dungeon.c | 2 +- src/eat.c | 2 +- src/end.c | 4 ++-- src/engrave.c | 4 ++-- src/hacklib.c | 4 ++-- src/insight.c | 12 ++++++------ src/invent.c | 10 +++++----- src/makemon.c | 2 +- src/mhitm.c | 4 ++-- src/mhitu.c | 2 +- src/mkobj.c | 4 ++-- src/mon.c | 8 ++++---- src/monmove.c | 2 +- src/music.c | 2 +- src/nhlsel.c | 2 +- src/objnam.c | 12 ++++++------ src/options.c | 12 ++++++------ src/pickup.c | 2 +- src/pray.c | 2 +- src/restore.c | 2 +- src/role.c | 4 ++-- src/rumors.c | 6 +++--- src/sfstruct.c | 2 +- src/shk.c | 6 +++--- src/sounds.c | 2 +- src/sp_lev.c | 4 ++-- src/steal.c | 2 +- src/teleport.c | 4 ++-- src/timeout.c | 6 +++--- src/trap.c | 2 +- src/uhitm.c | 10 +++++----- src/utf8map.c | 2 +- src/vault.c | 2 +- src/version.c | 2 +- src/vision.c | 6 +++--- src/windows.c | 2 +- src/wizard.c | 2 +- src/zap.c | 6 +++--- sys/libnh/README.md | 10 +++++----- sys/msdos/Install.dos | 2 +- sys/msdos/video.c | 4 ++-- sys/msdos/vidvesa.c | 4 ++-- sys/msdos/vidvga.c | 2 +- sys/share/pcmain.c | 2 +- sys/share/random.c | 6 +++--- sys/share/unixtty.c | 2 +- sys/share/uudecode.c | 4 ++-- sys/unix/Makefile.top | 2 +- sys/unix/NewInstall.unx | 2 +- sys/unix/XCode.xcconfig | 2 +- sys/unix/hints/include/misc.370 | 2 +- sys/unix/hints/macOS.370 | 2 +- sys/unix/hints/solaris | 2 +- sys/unix/hints/solaris-playground | 4 ++-- sys/vms/Install.vms | 2 +- sys/vms/vmsbuild.com | 4 ++-- sys/vms/vmsfiles.c | 2 +- sys/vms/vmsmail.c | 6 +++--- sys/vms/vmsmain.c | 2 +- sys/vms/vmstty.c | 2 +- sys/vms/vmsunix.c | 10 +++++----- sys/windows/Install.windows | 2 +- sys/windows/Makefile.mingw32 | 2 +- sys/windows/Makefile.nmake | 6 +++--- sys/windows/consoletty.c | 2 +- sys/windows/nhsetup.bat | 2 +- sys/windows/win32api.h | 2 +- util/dlb_main.c | 2 +- win/Qt/qt_bind.cpp | 8 ++++---- win/Qt/qt_map.cpp | 2 +- win/Qt/qt_set.cpp | 2 +- win/Qt/qt_stat.cpp | 6 +++--- win/Qt/qt_svsel.cpp | 4 ++-- win/Qt/qt_win.cpp | 2 +- win/Qt/qt_xcmd.cpp | 2 +- win/Qt/qt_xpms.h | 2 +- win/Qt/qt_yndlg.cpp | 2 +- win/Qt/qt_yndlg.h | 2 +- win/X11/Install.X11 | 2 +- win/X11/NetHack.ad | 4 ++-- win/X11/Window.c | 2 +- win/X11/dialogs.c | 6 +++--- win/X11/ibm.bdf | 2 +- win/X11/winX.c | 12 ++++++------ win/X11/winmap.c | 8 ++++---- win/X11/winmenu.c | 6 +++--- win/X11/winmesg.c | 8 ++++---- win/X11/winmisc.c | 4 ++-- win/X11/wintext.c | 2 +- win/curses/Readme.txt | 6 +++--- win/curses/Todo.txt | 10 +++++----- win/curses/cursdial.c | 4 ++-- win/curses/cursinit.c | 4 ++-- win/curses/cursmain.c | 2 +- win/curses/cursstat.c | 6 +++--- win/curses/curswins.c | 2 +- win/share/monsters.txt | 2 +- win/share/objects.txt | 2 +- win/share/other.txt | 2 +- win/share/safeproc.c | 2 +- win/share/tiletext.c | 2 +- win/tty/termcap.c | 4 ++-- win/tty/topl.c | 2 +- win/tty/wintty.c | 4 ++-- win/win32/NetHackW.c | 8 ++++---- win/win32/mhdlg.c | 4 ++-- win/win32/mhfont.c | 2 +- win/win32/mhmain.c | 4 ++-- win/win32/mhmain.h | 2 +- win/win32/mhmap.c | 4 ++-- win/win32/mhmenu.c | 2 +- win/win32/mhmsgwnd.c | 6 +++--- win/win32/mhstatus.c | 2 +- win/win32/mhtext.c | 2 +- win/win32/mswproc.c | 10 +++++----- 167 files changed, 320 insertions(+), 320 deletions(-) diff --git a/Cross-compiling b/Cross-compiling index 31db08c42..eb17b155a 100644 --- a/Cross-compiling +++ b/Cross-compiling @@ -479,7 +479,7 @@ Cross-compiler pre-built binary downloads: 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. @@ -554,7 +554,7 @@ Cross-compiler url: https://github.com/bebbo/amiga-gcc make update [Note that you may have to take ownership of the files in the bebbo - repo via chown before succesfully carrying out the next steps] + repo via chown before successfully carrying out the next steps] make clean make clean-prefix diff --git a/DEVEL/code_style.txt b/DEVEL/code_style.txt index 0f0edcea0..593f0a9fc 100644 --- a/DEVEL/code_style.txt +++ b/DEVEL/code_style.txt @@ -207,7 +207,7 @@ Others are more elaborate: * This is * another comment. */ -This style is usually used with sentence punctation, particularly if they +This style is usually used with sentence punctuation, particularly if they contain more than one sentence. End-of-line comments which need to span lines diff --git a/DEVEL/hooksdir/NHtext b/DEVEL/hooksdir/NHtext index 8e0d9a9c2..7128c0d31 100755 --- a/DEVEL/hooksdir/NHtext +++ b/DEVEL/hooksdir/NHtext @@ -55,7 +55,7 @@ if($ARGV[0] eq "--clean"){ } # XXX for now, there isn't any - if we get called, we subst. No options for now. -# get relevent config info +# get relevant config info #XXX #git check-attr -a $ARGV[1] diff --git a/DEVEL/nhgitset.pl b/DEVEL/nhgitset.pl index 03bb63f4b..e29cae2b4 100755 --- a/DEVEL/nhgitset.pl +++ b/DEVEL/nhgitset.pl @@ -306,7 +306,7 @@ nhgitset.pl installs NetHack-specific setup after a C (or after changes to the desired configuration, which are installed by re-running nhgitset.pl). -The follwing options are available: +The following options are available: B<-f> Force. Do not use this unless the program requests it. diff --git a/Porting b/Porting index 726015933..1abba0d93 100644 --- a/Porting +++ b/Porting @@ -242,13 +242,13 @@ interpreter during game execution. There is no longer a build-time level compiler. Instead, the level descriptions have been converted to Lua and are inserted into the game package -for processing by the embeded Lua interpreter during game execution. +for processing by the embedded Lua interpreter during game execution. 5.3 Dungeon Compiler There is no longer a build-time dungeon compiler. Instead, the dungeon description has been converted to Lua and is inserted into the game package for -processing by the embeded Lua interpreter during game execution. +processing by the embedded Lua interpreter during game execution. 5.4 Run-time Options diff --git a/dat/Rog-strt.lua b/dat/Rog-strt.lua index c7c111773..55bf11969 100644 --- a/dat/Rog-strt.lua +++ b/dat/Rog-strt.lua @@ -43,7 +43,7 @@ des.map([[ local streets = selection.floodfill(0,12) -- The down stairs is at one of the 4 "exits". The others are mimics, --- mimicing stairwells. +-- mimicking stairwells. local place = { {33,0}, {0,12}, {25,20}, {75,05} } shuffle(place) diff --git a/dat/data.base b/dat/data.base index e2ad92530..505c1b17d 100644 --- a/dat/data.base +++ b/dat/data.base @@ -21,7 +21,7 @@ # prevents "orc mummy" and "orc zombie" from matching. # # A citation of "[]" indicates arbitrary text written by developers or -# contributers. Falling off the end of an entry without any citation +# contributors. Falling off the end of an entry without any citation # implies "[]". # # Some entries include blank lines to separate paragraphs but many don't. @@ -5300,7 +5300,7 @@ statue* # but players are unlikely to picture anything like that when they find one stethoscope Tool used to listen closely to adjacent sound, typically by - a medical practioner to listen to a patient's heart, lungs, + a medical practitioner to listen to a patient's heart, lungs, or pulse. # joke suggested by stethoscope; a zillion things could be added but these # ought to suffice diff --git a/dat/minend-2.lua b/dat/minend-2.lua index fefdba486..e85e45870 100644 --- a/dat/minend-2.lua +++ b/dat/minend-2.lua @@ -55,7 +55,7 @@ if percent(50) then end end --- uncontroled arrival (via trap door, level teleport) will be in the central +-- uncontrolled arrival (via trap door, level teleport) will be in the central -- portion of level to prevent ending up stuck in the treasure area, whether -- arriving from above or below (despite this being bottom of Mines branch, -- hero might arrive from below by invoking Wiz role's Eye of the Aethiopica) diff --git a/dat/quest.lua b/dat/quest.lua index ecf8944f9..9df0ff86c 100644 --- a/dat/quest.lua +++ b/dat/quest.lua @@ -902,7 +902,7 @@ with good conscience. "\"I will impale your head on my caduceus for all to see.\"", "\"There is no materia medica in your sack which will cure you of me!\"", "\"Do not fight too hard, I want your soul strong, not weakened!\"", - "\"You should have stopped studying at vetenary.\"", + "\"You should have stopped studying at veterinary.\"", }, encourage = { "\"Remember, %p, to always wash your hands before operating.\"", @@ -2568,7 +2568,7 @@ the handiwork of %ns henchlings everywhere.]], %o from me! "It only proves how desperate he has become that he sends %ra to -try and defeat me. When this day is over, I will have you enslaved +try to defeat me. When this day is over, I will have you enslaved in the mines where you will rue the day that you ever entered %i."]], }, diff --git a/dat/themerms.lua b/dat/themerms.lua index 9f898a195..c651643b3 100644 --- a/dat/themerms.lua +++ b/dat/themerms.lua @@ -348,7 +348,7 @@ themerooms = { }); end, - -- Random dungeon feature in the middle of a odd-sized room + -- Random dungeon feature in the middle of an odd-sized room function() local wid = 3 + (nh.rn2(3) * 2); local hei = 3 + (nh.rn2(3) * 2); diff --git a/dat/tribute b/dat/tribute index f05076019..9cfbb78d1 100644 --- a/dat/tribute +++ b/dat/tribute @@ -1817,7 +1817,7 @@ yards away rather than the innocent bystander at whom it was aimed. %e passage # p. 26 (first and second paragraphs are actually end of one section, # start of next one; first 'Thunder rolled...' had three dot -# ellipsis, second has four, elipsis plus final period-- +# ellipsis, second has four, ellipsis plus final period-- # first changed to four here so that they match) %passage 3 Thunder rolled.... @@ -4198,7 +4198,7 @@ Cheese with Chunky Pickle, I think." THEY DO SUCH MARVELOUS THINGS WITH SANDWICHES THESE DAYS. -"Oh... and Bacon Surpise." +"Oh... and Bacon Surprise." REALLY? WHAT IS SO SURPRISING ABOUT BACON? @@ -5789,7 +5789,7 @@ saw what happened to the others! /You/ got your fingers burned!." # # 4 new passages added for 3.7 # -# p. 24 (elipsis occurs at start of paragraph; Quite Reverend Oats has opened +# p. 24 (ellipsis occurs at start of paragraph; Quite Reverend Oats has opened # /The Book of Om/ at random and is reading the passage found there) %passage 9 "... silence is an answer that begs three more questions. Seek and you will @@ -6934,7 +6934,7 @@ merely didn't know where everything else was. [The Amazing Maurice and His Educated Rodents, by Terry Pratchett] %e passage -# pp. 298-300 (Keith has challanged the professional rat piper and offered +# pp. 298-300 (Keith has challenged the professional rat piper and offered # to rid the town of rats for a much lower price; Sardines is # one of the Educated Rodents, known for dancing all the time; # "hwun/two/three/four/" is run-together "one /two/ three /four/"; @@ -7512,7 +7512,7 @@ very thought of written-down things. "They think written words are even more powerful," whispered the toad. "They think all writing is magic. Words worry them. See their swords? -They glow in the presense of lawyers." +They glow in the presence of lawyers." "All /right/," said Tiffany. "We're getting somewhere. I promise not to write his name down. [...]" @@ -7788,7 +7788,7 @@ Cradle and the House and the Flock and the Three Old Ladies, One With a Squint, Carrying the Bucket of Fish to Market When They Meet the Donkey, although you need two people for that one, and I only ever did it once, and Betsy Tupper scratched her nose at the wrong moment and I had to get -some scissors to to cut her loose..." +some scissors to cut her loose..." [A Hat Full of Sky, by Terry Pratchett] %e passage diff --git a/doc/Guidebook.mn b/doc/Guidebook.mn index 41d64aef9..f884ddb89 100644 --- a/doc/Guidebook.mn +++ b/doc/Guidebook.mn @@ -3651,7 +3651,7 @@ See the \(lqConfiguring Menu Colors\(rq section. Change the way messages are shown in the top status line. See the \(lqConfiguring Message Types\(rq section. .lp ROGUESYMBOLS -Custom symbols for for the rogue level's symbol set. +Custom symbols for the rogue level's symbol set. See \fISYMBOLS\fP below. .lp SOUND Define a sound mapping. @@ -3906,7 +3906,7 @@ picked up, even if .op autopickup is also on and they are in .op pickup_types -or match a positive autopickup exception (defualt on). Persistent. +or match a positive autopickup exception (default on). Persistent. .lp disclose Controls what information the program reveals when the game ends. Value is a space separated list of prompting/category pairs @@ -4344,7 +4344,7 @@ To remove an entry that has been previously set without removing others, precede the first entry in the list with a minus sign, \f(CRparanoid_confirmation:-swim\fP. To both add some new entries and remove some old ones, you can use -mulitple \fIparanoid_confirmation\fP option settings, or you can +multiple \fIparanoid_confirmation\fP option settings, or you can use the \(oq\f(CR+\fP\(cq form and list entries to be added by their name and entries to be removed by \(oq\f(CR!\fP\(cq and name. The positive (no \(oq!\(cq) and negative (with \(oq!\(cq) entries @@ -4866,7 +4866,7 @@ If NetHack can, it should use this size font for the status window. .lp font_size_text If NetHack can, it should use this size font for text windows. .lp fullscreen -If NetHack can, it should try and display on the entire screen rather than +If NetHack can, it should try to display on the entire screen rather than in a window. .lp "guicolor " Use color text and/or highlighting attributes when displaying some diff --git a/doc/Guidebook.tex b/doc/Guidebook.tex index 9509455cf..fef06e8e9 100644 --- a/doc/Guidebook.tex +++ b/doc/Guidebook.tex @@ -3827,7 +3827,7 @@ On Windows, the name is \mbox{``.nethackrc''} location in the folder The file may not exist, but it is a normal ASCII text file and can be created with any text editor. -After runing {\it NetHack\/} for the first time, you should find a default +After running {\it NetHack\/} for the first time, you should find a default template for ths configuration file named \mbox{``.nethackrc.template''} in \mbox{{``\%USERPROFILE\%\textbackslash NetHack\textbackslash''}}. If you have not created the configuration file, {\it NetHack\/} will create @@ -3985,7 +3985,7 @@ Change the way messages are shown in the top status line. See the ``Configuring Message Types`` section. %.lp \item[\bb{ROGUESYMBOLS}] -Custom symbols for for the rogue level's symbol set. +Custom symbols for the rogue level's symbol set. See {\it SYMBOLS} below. %.lp \item[\bb{SOUND}] @@ -4767,7 +4767,7 @@ To remove an entry that has been previously set without removing others, precede the first entry in the list with a minus sign, ``{\it paranoid\verb+_+confirmation:-swim\/}. To both add some new entries and remove some old ones, you can use -mulitple {\it paranoid\verb+_+confirmation\/} option settings, or you can +multiple {\it paranoid\verb+_+confirmation\/} option settings, or you can use the `{\tt \verb|+|}' form and list entries to be added by their name and entries to be removed by `{\tt !}' and name. The positive (no `!') and negative (with `!') entries @@ -5358,7 +5358,7 @@ If {\it NetHack\/} can, it should use this size font for the status window. If {\it NetHack\/} can, it should use this size font for text windows. %.lp \item[\ib{fullscreen}] -If {\it NetHack\/} can, it should try and display on the entire screen rather than in a window. +If {\it NetHack\/} can, it should try to display on the entire screen rather than in a window. %.lp \item[\ib{guicolor}] Use color text and/or highlighting attributes when displaying some diff --git a/doc/Guidebook.txt b/doc/Guidebook.txt index e38c29136..c6485ea84 100644 --- a/doc/Guidebook.txt +++ b/doc/Guidebook.txt @@ -4119,7 +4119,7 @@ dropped_nopick If this option is on, items you dropped will not be automatically picked up, even if autopickup is also on and they are in - pickup_types or match a positive autopickup exception (defualt on). + pickup_types or match a positive autopickup exception (default on). Persistent. disclose @@ -4603,7 +4603,7 @@ tack Remove. To remove an entry that has been previously set with- out removing others, precede the first entry in the list with a mi- nus sign, paranoid_confirmation:-swim. To both add some new entries - and remove some old ones, you can use mulitple paranoid_confirmation + and remove some old ones, you can use multiple paranoid_confirmation option settings, or you can use the `+' form and list entries to be added by their name and entries to be removed by `!' and name. The positive (no `!') and negative (with `!') entries can be intermixed. @@ -5182,7 +5182,7 @@ If NetHack can, it should use this size font for text windows. fullscreen - If NetHack can, it should try and display on the entire screen + If NetHack can, it should try to display on the entire screen rather than in a window. guicolor diff --git a/doc/config.nh b/doc/config.nh index d8be02055..e1903861b 100644 --- a/doc/config.nh +++ b/doc/config.nh @@ -123,7 +123,7 @@ # Objects will try to keep their inventory letters #OPTIONS=fixinv -# Try and display on the entire screen rather than in a window. +# Try to display on the entire screen rather than in a window. #OPTIONS=fullscreen # If more information is available for an object looked at with diff --git a/doc/fixesX-X-X.txt b/doc/fixesX-X-X.txt index b6a012577..4ce05819f 100644 --- a/doc/fixesX-X-X.txt +++ b/doc/fixesX-X-X.txt @@ -4,7 +4,7 @@ General Fixes and Modified Features ----------------------------------- -Fixes to Post-X.X.X Problems that Were Exposed Via git Respository +Fixes to Post-X.X.X Problems that Were Exposed Via git Repository ------------------------------------------------------------------ diff --git a/doc/lua.adoc b/doc/lua.adoc index f5744eaac..c7f9803ce 100644 --- a/doc/lua.adoc +++ b/doc/lua.adoc @@ -880,7 +880,7 @@ Example: Create a room region, which can be irregular; use the boundary <<_map_characters,map character>> to restrict the floodfilled area. If using the first form with a selection and "lit", the lit area will extend -outward 1 space from the selection to attempt to accomodate adjacent walls, +outward 1 space from the selection to attempt to accommodate adjacent walls, regardless of whether they are actually walls or not. If using "unlit", this will not happen. diff --git a/doc/nethack.6 b/doc/nethack.6 index 0a6cf75bc..478f99f5d 100644 --- a/doc/nethack.6 +++ b/doc/nethack.6 @@ -395,7 +395,7 @@ hexadecimal, then exit. can be used to cause NetHack to show where it is expecting to find various files. Among other things it shows the path to and name for the player's -run-time configuration file, a text file which can be editted to +run-time configuration file, a text file which can be edited to customize aspects of how the game operates. .PP .BR \-\-usage " or " \-\-help diff --git a/doc/nethack.txt b/doc/nethack.txt index fe36ea63b..bbe28ccab 100644 --- a/doc/nethack.txt +++ b/doc/nethack.txt @@ -162,7 +162,7 @@ DESCRIPTION --showpaths can be used to cause NetHack to show where it is expecting to find various files. Among other things it shows the path to and name for the player's run-time configuration file, a text file which - can be editted to customize aspects of how the game operates. + can be edited to customize aspects of how the game operates. --usage or --help will display information similar to this manual page, then exit. Use `nethack --usage | more' to read it a page at a time. diff --git a/doc/options.txt b/doc/options.txt index a0bed376b..a07b316cc 100644 --- a/doc/options.txt +++ b/doc/options.txt @@ -100,7 +100,7 @@ and the optfn_xxxx() function is expected to react and set the option based on the string values that parseoptions() passes to it. req get_val is passed a buffer from its caller that the optfn_xxxx() is -expected to fill with the current value of the opton. +expected to fill with the current value of the option. req do_handler is called during doset() operations processing in response to player selections, most likely from the 'O' option-setting menu. The diff --git a/doc/sound.txt b/doc/sound.txt index abcc4ec68..6af2a9707 100644 --- a/doc/sound.txt +++ b/doc/sound.txt @@ -282,7 +282,7 @@ gc.chosen_soundlib ga.active_soundlib a usersound mappings reference -iflags.sounds is the master on/off swith to control whether any audio +iflags.sounds is the master on/off switch to control whether any audio is produced by the soundlib interface iflags.voice is the master on/off switch for voices produced by diff --git a/doc/tmac.n b/doc/tmac.n index 270a78a06..0d445d34d 100644 --- a/doc/tmac.n +++ b/doc/tmac.n @@ -50,7 +50,7 @@ .\" Version 1.6 March 15, 1989 Matt.Bishop@dartmouth.edu .\" ..!bear.dartmouth.edu!bishop .\" Fixed a bug in footnote handling (again, sigh ...) This one -.\" occurred when the the "fo" trap position was reset just beneath +.\" occurred when the "fo" trap position was reset just beneath .\" the current line; the footnote overflow trap would kick in and .\" never be closed. .\" diff --git a/doc/window.txt b/doc/window.txt index c45e809fd..0d24b67c9 100644 --- a/doc/window.txt +++ b/doc/window.txt @@ -470,7 +470,7 @@ status_update(int fldindex, genericptr_t ptr, int chg, int percentage, \ 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 (-2), 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. diff --git a/include/config.h b/include/config.h index 6ea2ec8d5..96351d3ca 100644 --- a/include/config.h +++ b/include/config.h @@ -690,7 +690,7 @@ typedef unsigned char uchar; /* #define DUMPLOG */ /* End-of-game dump logs */ -#define USE_ISAAC64 /* Use cross-plattform, bundled RNG */ +#define USE_ISAAC64 /* Use cross-platform, bundled RNG */ /* TEMPORARY - MAKE UNCONDITIONAL BEFORE RELEASE */ /* undef this to check if sandbox breaks something */ @@ -716,7 +716,7 @@ typedef unsigned char uchar; #include "global.h" /* Define everything else according to choices above */ /* Place the following after #include [platform]conf.h in global.h so that - overrides are possible in there, for things like unix-specfic file + overrides are possible in there, for things like unix-specific file paths. */ #ifdef LIVELOG diff --git a/include/decl.h b/include/decl.h index 0e14e18f1..d13ebe9e8 100644 --- a/include/decl.h +++ b/include/decl.h @@ -747,7 +747,7 @@ struct instance_globals_o { boolean opt_need_promptstyle; /* pickup.c */ - int oldcap; /* last encumberance */ + int oldcap; /* last encumbrance */ /* restore.c */ struct fruit *oldfruit; diff --git a/include/display.h b/include/display.h index b97b1d8e4..aaefeea66 100644 --- a/include/display.h +++ b/include/display.h @@ -25,7 +25,7 @@ * sensemon() * * Returns true if the hero can sense the given monster. This includes - * monsters that are hiding or mimicing other monsters. + * monsters that are hiding or mimicking other monsters. * * [3.7] Note: the map doesn't display any monsters when hero is swallowed * (or display non-adjacent, non-submerged ones when hero is underwater), @@ -656,7 +656,7 @@ enum glyph_offsets { (Ugender)) /* - * Change the given glyph into it's given type. Note: + * Change the given glyph into its given type. Note: * 1) Pets, detected, and ridden monsters are animals and are converted * to the proper monster number. * 2) Bodies are all mapped into the generic CORPSE object diff --git a/include/global.h b/include/global.h index 0b531f32a..98769352f 100644 --- a/include/global.h +++ b/include/global.h @@ -517,7 +517,7 @@ typedef struct color_and_attr { #define LL_DIVINEGIFT 0x0008L /* Sacrifice gifts, crowning */ #define LL_LIFESAVE 0x0010L /* Use up amulet of lifesaving */ #define LL_CONDUCT 0x0020L /* Break conduct - not reported early-game */ -#define LL_ARTIFACT 0x0040L /* bestowed, found, or manifactured */ +#define LL_ARTIFACT 0x0040L /* bestowed, found, or manufactured */ #define LL_GENOCIDE 0x0080L /* Logging of genocides */ #define LL_KILLEDPET 0x0100L /* Killed a tame monster */ #define LL_ALIGNMENT 0x0200L /* changed alignment, temporary or permanent */ diff --git a/include/hack.h b/include/hack.h index f6be51f7b..556d1371a 100644 --- a/include/hack.h +++ b/include/hack.h @@ -61,7 +61,7 @@ /* bitmask flags for corpse_xname(); PFX_THE takes precedence over ARTICLE, NO_PFX takes precedence over both */ #define CXN_NORMAL 0 /* no special handling */ -#define CXN_SINGULAR 1 /* override quantity if greather than 1 */ +#define CXN_SINGULAR 1 /* override quantity if greater than 1 */ #define CXN_NO_PFX 2 /* suppress "the" from "the Unique Monst */ #define CXN_PFX_THE 4 /* prefix with "the " (unless pname) */ #define CXN_ARTICLE 8 /* include a/an/the prefix */ @@ -682,7 +682,7 @@ enum optset_restrictions { set_viaprog = 2, /* may be set via extern program, not seen in game */ set_gameview = 3, /* may be set via extern program, displayed in game */ set_in_game = 4, /* may be set via extern program or set in the game */ - set_wizonly = 5, /* may be set set in the game if wizmode */ + set_wizonly = 5, /* may be set in the game if wizmode */ set_wiznofuz = 6, /* wizard-mode only, but not by fuzzer */ set_hidden = 7 /* placeholder for prefixed entries, never show it */ }; @@ -769,9 +769,9 @@ struct sinfo { int saving; /* creating a save file */ int restoring; /* reloading a save file */ int in_moveloop; /* normal gameplay in progress */ - int in_impossible; /* reportig a warning */ + int in_impossible; /* reporting a warning */ int in_docrt; /* in docrt(): redrawing the whole screen */ - int in_self_recover; /* processsing orphaned level files */ + int in_self_recover; /* processing orphaned level files */ int in_checkpoint; /* saving insurance checkpoint */ int in_parseoptions; /* in parseoptions */ int in_role_selection; /* role/race/&c selection menus in progress */ @@ -786,7 +786,7 @@ struct sinfo { used in the curses interface to avoid arrow keys when user is doing something other than entering a command or direction and in the Qt interface to suppress menu commands in similar conditions; - readchar() alrways resets it to 'otherInp' prior to returning */ + readchar() always resets it to 'otherInp' prior to returning */ int input_state; /* whether next key pressed will be entering a command */ #ifdef TTY_GRAPHICS /* resize_pending only matters when handling a SIGWINCH signal for tty; @@ -926,7 +926,7 @@ typedef struct { long count; /* holds current line count for default style file, field count for binary style */ boolean structlevel; /* traditional structure binary saves */ - boolean fieldlevel; /* fieldlevel saves saves each field individually */ + boolean fieldlevel; /* fieldlevel saves each field individually */ boolean addinfo; /* if set, some additional context info from core */ boolean eof; /* place to mark eof reached */ boolean bendian; /* set to true if executing on big-endian machine */ @@ -1204,7 +1204,7 @@ typedef uint32_t mmflags_nht; /* makemon MM_ flags */ #define ONAME_RANDOM 0x0080U /* something created an artifact randomly * with mk_artifact() (mksboj or mk_player) * or m_initweap() (lawful Angel) */ -/* flag congrolling potential livelog event of finding an artifact */ +/* flag controlling potential livelog event of finding an artifact */ #define ONAME_KNOW_ARTI 0x0100U /* hero is already aware of this artifact */ /* flag for suppressing perm_invent update when name gets assigned */ #define ONAME_SKIP_INVUPD 0x0200U /* don't call update_inventory() */ diff --git a/include/integer.h b/include/integer.h index 43e8d22d8..6ce6054e3 100644 --- a/include/integer.h +++ b/include/integer.h @@ -5,7 +5,7 @@ /* integer.h -- provide sized integer types * * We try to sort out a way to provide sized integer types - * in here. The strong preference is to try and let a + * in here. The strong preference is to try to let a * compiler-supplied header file set up the types. * * If your compiler is C99 conforming and sets a value of diff --git a/include/mondata.h b/include/mondata.h index 10ffcea8a..80a177f76 100644 --- a/include/mondata.h +++ b/include/mondata.h @@ -161,7 +161,7 @@ #define is_rider(ptr) \ ((ptr) == &mons[PM_DEATH] || (ptr) == &mons[PM_FAMINE] \ || (ptr) == &mons[PM_PESTILENCE]) -/* note: placeholder monsters are used for corposes of zombies and mummies; +/* note: placeholder monsters are used for corpses of zombies and mummies; PM_DWARF and PM_GNOME are normal monsters, not placeholders */ #define is_placeholder(ptr) \ ((ptr) == &mons[PM_ORC] || (ptr) == &mons[PM_GIANT] \ diff --git a/include/monsters.h b/include/monsters.h index e7a82d863..e19f0b891 100644 --- a/include/monsters.h +++ b/include/monsters.h @@ -37,10 +37,10 @@ * then the value(s) can be plugged in here and monstr.c deleted. * [Note that some monsters might warrant manually calculated * difficulty, on a case by case basis, instead of blindly using - * the default value produced by makedefs. Or fix the algoritm + * the default value produced by makedefs. Or fix the algorithm * used by makedefs to generate a more appropriate value....] * - * TODO: difficulty is closely releated to level; its field ought + * TODO: difficulty is closely related to level; its field ought * to be moved sooner in the permonst struct so that it can become * part of LVL() instead of remaining an orphan near the end. * @@ -3276,7 +3276,7 @@ M1_SWIM | M1_AMPHIBIOUS | M1_ANIMAL | M1_NOHANDS | M1_CARNIVORE, M2_HOSTILE, 0, 4, CLR_BROWN, BABY_CROCODILE), - /* trivia: before monster corspes were implemented, "lizard corpse" + /* trivia: before monster corpses were implemented, "lizard corpse" was a specific type of item */ MON(NAM("lizard"), S_LIZARD, LVL(5, 6, 6, 10, 0), (G_GENO | 5), @@ -3797,7 +3797,7 @@ M3_INFRAVISION | M3_INFRAVISIBLE, 7, HI_DOMESTIC, HIGH_ELF), #endif - /* attendants used to be lawful but have been changed to netural because + /* attendants used to be lawful but have been changed to neutral because grow_up() promotes them to healer and the latter is always neutral */ MON(NAM("attendant"), S_HUMAN, LVL(5, 12, 10, 10, 0), G_NOGEN, diff --git a/include/objclass.h b/include/objclass.h index 309b19d47..7e1af7fab 100644 --- a/include/objclass.h +++ b/include/objclass.h @@ -66,7 +66,7 @@ struct objclass { Bitfield(oc_tough, 1); /* hard gems/rings */ Bitfield(oc_spare1, 6); /* padding to align oc_dir + oc_material; - * can be canabalized for other use; + * can be cannibalized for other use; * aka 6 free bits */ Bitfield(oc_dir, 3); diff --git a/include/objects.h b/include/objects.h index cab496346..3413d154f 100644 --- a/include/objects.h +++ b/include/objects.h @@ -1015,7 +1015,7 @@ OBJECT(OBJ("Bell of Opening", "silver bell"), FOOD_CLASS, prob, delay, wt, nutrition / 20 + 5, 0, 0, 0, 0, \ nutrition, color, sn) /* All types of food (except tins & corpses) must have a delay of at least 1. - * Delay on corpses is computed and is weight dependant. + * Delay on corpses is computed and is weight dependent. * Domestic pets prefer tripe rations above all others. * Fortune cookies can be read, using them up without ingesting them. * Carrots improve your vision. @@ -1037,7 +1037,7 @@ FOOD("meat stick", 0, 1, 1, 0, FLESH, 5, CLR_BROWN, /* formerly "huge chunk of meat" */ FOOD("enormous meatball", 0, 20,400, 0, FLESH,2000, CLR_BROWN, ENORMOUS_MEATBALL), -/* special case because it's not mergable */ +/* special case because it's not mergeable */ OBJECT(OBJ("meat ring", NoDes), BITS(1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, FLESH), 0, FOOD_CLASS, 0, 1, 5, 1, 0, 0, 0, 0, 5, CLR_BROWN, MEAT_RING), diff --git a/include/patchlevel.h b/include/patchlevel.h index 02d5573e2..54e30beb2 100644 --- a/include/patchlevel.h +++ b/include/patchlevel.h @@ -85,7 +85,7 @@ * defined to force it back into effect * update_inventory() after leash goes slack * player assigned name for monsters, specific objects, or object types could be - longer than what was intented to be allowed; for 'curses', much longer + longer than what was intended to be allowed; for 'curses', much longer * windows: added winflexbison to travis-ci configuration to permit full build of * levcomp and dgncomp * windows: a bad chdir specified in win/win32/dgnstuff.mak caused full build to @@ -155,7 +155,7 @@ * Fixed stale 'thrownobj' pointer for returning thrown aklys while engulfed * Fixed uarmh null pointer dereference if a helm of opposite alignment came * off due to being polymorphed - * Fixed 'object lost' panic when attempting to crawl of of the water during + * Fixed 'object lost' panic when attempting to crawl out of the water during * emergency disrobing/dropping * Running now stops when moving over engravings so you can tell where they are * Fixed detection of unseen/secret doors which failed to find monsters hiding diff --git a/include/rm.h b/include/rm.h index df30650f3..4c5dd546c 100644 --- a/include/rm.h +++ b/include/rm.h @@ -269,7 +269,7 @@ struct rm { /* * Add wall angle viewing by defining "modes" for each wall type. Each - * mode describes which parts of a wall are finished (seen as as wall) + * mode describes which parts of a wall are finished (seen as wall) * and which are unfinished (seen as rock). * * We use the bottom 3 bits of the flags field for the mode. This comes @@ -356,7 +356,7 @@ struct rm { #define looted flags /* used for throne, tree, fountain, sink, door */ #define icedpool flags /* used for ice (in case it melts) */ #define emptygrave flags /* no corpse in grave */ -/* horizonal applies to walls, doors (including sdoor); also to iron bars +/* horizontal applies to walls, doors (including sdoor); also to iron bars even though they don't have separate symbols for horizontal and vertical */ #define blessedftn horizontal /* a fountain that grants attribs */ #define disturbed horizontal /* kicking or engraving on a grave's headstone diff --git a/include/skills.h b/include/skills.h index ecce9542d..307694cfb 100644 --- a/include/skills.h +++ b/include/skills.h @@ -82,7 +82,7 @@ enum p_skills { /* * These are the standard weapon skill levels. It is important that - * the lowest "valid" skill be be 1. The code calculates the + * the lowest "valid" skill be 1. The code calculates the * previous amount to practice by calling practice_needed_to_advance() * with the current skill-1. To work out for the UNSKILLED case, * a value of 0 needed. diff --git a/include/unixconf.h b/include/unixconf.h index c8dd49dd6..2c0d133e2 100644 --- a/include/unixconf.h +++ b/include/unixconf.h @@ -96,7 +96,7 @@ /* #define DEF_PAGER "/usr/bin/less" */ /* - * Define PORT_HELP to be the name of the port-specfic help file. + * Define PORT_HELP to be the name of the port-specific help file. * This file is found in HACKDIR. * Normally, you shouldn't need to change this. * There is currently no port-specific help for Unix systems. diff --git a/include/wintype.h b/include/wintype.h index 4fe8e1ecd..794be9ad3 100644 --- a/include/wintype.h +++ b/include/wintype.h @@ -94,7 +94,7 @@ typedef struct glyph_map_entry { /* glyph plus additional info if you add fields or change the ordering, fix up the following: g_info initialization in display.c - nul_glyphinfo initialization in diplay.c + nul_glyphinfo initialization in display.c */ typedef struct gi { int glyph; /* the display entity */ diff --git a/sound/windsound/windsound.c b/sound/windsound/windsound.c index 01e05b7e0..8ccfe9f65 100644 --- a/sound/windsound/windsound.c +++ b/sound/windsound/windsound.c @@ -301,7 +301,7 @@ maybe_preinsert_directory(int32_t findsound_approach, char *exedir, char *buf, s int largest_basename = 35; /* findsound_approach = sff_havdir_append_rest means a directory name will be - * inserted into the begining of buf and the remaining parts of the + * inserted into the beginning of buf and the remaining parts of the * resource/file name will be appended by * get_sound_effect_filename(seid, buf, sizeof buf, findsound_approach) * when it sees the sff_havedir_append_rest indicator. diff --git a/src/apply.c b/src/apply.c index b5a7632be..106132bfc 100644 --- a/src/apply.c +++ b/src/apply.c @@ -1886,7 +1886,7 @@ is_valid_jump_pos(coordxy x, coordxy y, int magic, boolean showmsg) coord uc, tc; struct rm *lev = &levl[u.ux][u.uy]; /* we want to categorize trajectory for use in determining - passage through doorways: horizonal, vertical, or diagonal; + passage through doorways: horizontal, vertical, or diagonal; since knight's jump and other irregular directions are possible, we flatten those out to simplify door checks */ int diag, traj; diff --git a/src/attrib.c b/src/attrib.c index dfa0b71b0..f2b997209 100644 --- a/src/attrib.c +++ b/src/attrib.c @@ -240,11 +240,11 @@ losestr(int num, const char *knam, schar k_format) losehp(dmg, knam, k_format); if (Upolyd) { - /* if still polymorhed, reduce you-as-monst maxHP; never below 1 */ + /* if still polymorphed, reduce you-as-monst maxHP; never below 1 */ u.mhmax -= min(dmg, u.mhmax - 1); } else if (!waspolyd) { /* not polymorphed now and didn't rehumanize when taking damage; - reduce max HP, but not below below uhpmin */ + reduce max HP, but not below uhpmin */ if (u.uhpmax > uhpmin) setuhpmax(max(u.uhpmax - dmg, uhpmin)); } diff --git a/src/ball.c b/src/ball.c index 7f76485ea..1cbfb1d7c 100644 --- a/src/ball.c +++ b/src/ball.c @@ -634,7 +634,7 @@ drag_ball(coordxy x, coordxy y, int *bc_control, already_in_rock = FALSE; switch (dist2(x, y, uball->ox, uball->oy)) { - /* two spaces diagonal from ball, move chain inbetween */ + /* two spaces diagonal from ball, move chain in-between */ case 8: *chainx = (uball->ox + x) / 2; *chainy = (uball->oy + y) / 2; diff --git a/src/bones.c b/src/bones.c index 34d2539d1..00e89b3fd 100644 --- a/src/bones.c +++ b/src/bones.c @@ -333,7 +333,7 @@ fixuporacle(struct monst *oracle) break; if (o_ridx != ridx && ridx < SIZE(gr.rooms)) { - /* room found and she's not not in it, so try to move her there */ + /* room found and she's not in it, so try to move her there */ cc.x = (gr.rooms[ridx].lx + gr.rooms[ridx].hx) / 2; cc.y = (gr.rooms[ridx].ly + gr.rooms[ridx].hy) / 2; if (enexto(&cc, cc.x, cc.y, oracle->data)) { @@ -758,7 +758,7 @@ fix_ghostly_obj(struct obj *obj) if (!obj->ghostly) return; switch(obj->otyp) { - /* asymetrical weapons */ + /* asymmetrical weapons */ case BOW: case ELVEN_BOW: case ORCISH_BOW: diff --git a/src/cmd.c b/src/cmd.c index dc8aac76f..1c9e804a6 100644 --- a/src/cmd.c +++ b/src/cmd.c @@ -669,9 +669,9 @@ doextlist(void) continue; if (!onelist && pass != wizc) continue; - /* command descripton might get modified on the fly */ + /* command description might get modified on the fly */ cmd_desc = efp->ef_desc; - /* suppress part of the descripton for #genocided if it + /* suppress part of the description for #genocided if it doesn't apply during the current game */ if (!wizard && !discover && (efp->flags & GENERALCMD) != 0 /* minor optimization */ @@ -1457,7 +1457,7 @@ static int wiz_flip_level(void) { static const char choices[] = "0123", - prmpt[] = "Flip 0=randomly, 1=vertically, 2=horizonally, 3=both:"; + prmpt[] = "Flip 0=randomly, 1=vertically, 2=horizontally, 3=both:"; /* * Does not handle @@ -4447,7 +4447,7 @@ wiz_mon_diff(void) } } if (!trouble) - putstr(win, 0, "No monster difficulty discrepencies were detected."); + putstr(win, 0, "No monster difficulty discrepancies were detected."); display_nhwindow(win, FALSE); destroy_nhwindow(win); return ECMD_OK; diff --git a/src/decl.c b/src/decl.c index a7fff02eb..2f8af0349 100644 --- a/src/decl.c +++ b/src/decl.c @@ -97,7 +97,7 @@ const char *fqn_prefix_names[PREFIX_COUNT] = { const schar xdir[N_DIRS_Z] = { -1, -1, 0, 1, 1, 1, 0, -1, 0, 0 }; const schar ydir[N_DIRS_Z] = { 0, -1, -1, -1, 0, 1, 1, 1, 0, 0 }; const schar zdir[N_DIRS_Z] = { 0, 0, 0, 0, 0, 0, 0, 0, 1, -1 }; -/* redordered directions, cardinals first */ +/* reordered directions, cardinals first */ const schar dirs_ord[N_DIRS] = { DIR_W, DIR_N, DIR_E, DIR_S, DIR_NW, DIR_NE, DIR_SE, DIR_SW }; diff --git a/src/detect.c b/src/detect.c index a3c8b06c8..101ef2fe7 100644 --- a/src/detect.c +++ b/src/detect.c @@ -1301,7 +1301,7 @@ use_crystal_ball(struct obj **optr) if (ch == DEF_MIMIC_DEF) ch = DEF_MIMIC; - /* checking furnture before objects allows '_' to find altars + /* checking furniture before objects allows '_' to find altars (along with other furniture) instead of finding iron chains */ if (def_char_is_furniture(ch) >= 0) { ret = furniture_detect(); @@ -2121,7 +2121,7 @@ dump_map(void) boolean blankrow, toprow; /* - * Squeeze out excess vertial space when dumping the map. + * Squeeze out excess vertical space when dumping the map. * If there are any blank map rows at the top, suppress them * (our caller has already printed a separator). If there is * more than one blank map row at the bottom, keep just one. diff --git a/src/dig.c b/src/dig.c index ff5d9aceb..288bbbe7b 100644 --- a/src/dig.c +++ b/src/dig.c @@ -2004,7 +2004,7 @@ unearth_objs(int x, int y) /* * The organic material has rotted away while buried. As an expansion, - * we could add add partial damage. A damage count is kept in the object + * we could add partial damage. A damage count is kept in the object * and every time we are called we increment the count and reschedule another * timeout. Eventually the object rots away. * diff --git a/src/display.c b/src/display.c index 1892c2da9..aaca92865 100644 --- a/src/display.c +++ b/src/display.c @@ -514,10 +514,10 @@ display_monster( mgendercode = mon->female ? FEMALE : MALE; /* - * We must do the mimic check first. If the mimic is mimicing something, + * We must do the mimic check first. If the mimic is mimicking something, * and the location is in sight, we have to change the hero's memory * so that when the position is out of sight, the hero remembers what - * the mimic was mimicing. + * the mimic was mimicking. */ if (mon_mimic && (sightflags == PHYSICALLY_SEEN)) { switch (M_AP_TYPE(mon)) { @@ -558,7 +558,7 @@ display_monster( obj.ox = x; obj.oy = y; obj.otyp = mon->mappearance; - /* might be mimicing a corpse or statue */ + /* might be mimicking a corpse or statue */ obj.corpsenm = has_mcorpsenm(mon) ? MCORPSENM(mon) : PM_TENGU; map_object(&obj, !sensed); break; @@ -573,7 +573,7 @@ display_monster( } /* switch M_AP_TYPE() */ } - /* If mimic is unsuccessfully mimicing something, display the monster. */ + /* If mimic is unsuccessfully mimicking something, display the monster. */ if (!mon_mimic || sensed) { int num; @@ -1485,7 +1485,7 @@ mimic_light_blocking(struct monst *mtmp) } /* - * Block/unblock light depending on what a mimic is mimicing and if it's + * Block/unblock light depending on what a mimic is mimicking and if it's * invisible or not. Should be called only when the state of See_invisible * changes. */ diff --git a/src/do_name.c b/src/do_name.c index d050359ad..32b96fc38 100644 --- a/src/do_name.c +++ b/src/do_name.c @@ -1985,7 +1985,7 @@ x_monnam( * This monster has become important, for the moment anyway. * As the hero's consumer, it is worthy of ARTICLE_THE. * Also, suppress invisible as that particular characteristic - * is unimportant now and you can see it's interior anyway. + * is unimportant now and you can see its interior anyway. */ article = ARTICLE_THE; suppress |= SUPPRESS_INVISIBLE; diff --git a/src/do_wear.c b/src/do_wear.c index a97ddd4e9..e2fa3b813 100644 --- a/src/do_wear.c +++ b/src/do_wear.c @@ -531,7 +531,7 @@ Helmet_off(void) return 0; } -/* hard helms provide better protection against against falling rocks */ +/* hard helms provide better protection against falling rocks */ boolean hard_helmet(struct obj *obj) { @@ -992,7 +992,7 @@ Amulet_on(void) break; } case AMULET_OF_FLYING: - /* setworn() has already set extrinisic flying */ + /* setworn() has already set extrinsic flying */ float_vs_flight(); /* block flying if levitating */ if (Flying) { boolean already_flying; @@ -1099,7 +1099,7 @@ learnring(struct obj *ring, boolean observed) { int ringtype = ring->otyp; - /* if effect was observeable then we usually discover the type */ + /* if effect was observable then we usually discover the type */ if (observed) { /* if we already know the ring type which accomplishes this effect (assumes there is at most one type for each effect), diff --git a/src/dogmove.c b/src/dogmove.c index 9b2cad10c..22ba0976c 100644 --- a/src/dogmove.c +++ b/src/dogmove.c @@ -1383,7 +1383,7 @@ static const struct qmchoices { int mndx; /* type of pet, 0 means any */ char mlet; /* symbol of pet, 0 means any */ unsigned mappearance; /* mimic this */ - uchar m_ap_type; /* what is the thing it is mimicing? */ + uchar m_ap_type; /* what is the thing it is mimicking? */ } qm[] = { /* Things that some pets might be thinking about at the time */ { PM_LITTLE_DOG, 0, PM_KITTEN, M_AP_MONSTER }, diff --git a/src/drawing.c b/src/drawing.c index dca1b4066..83dff55c5 100644 --- a/src/drawing.c +++ b/src/drawing.c @@ -94,7 +94,7 @@ def_char_to_objclass(char ch) /* * Convert a character into a monster class. This returns the _first_ - * match made. If there are are no matches, return MAXMCLASSES. + * match made. If there are no matches, return MAXMCLASSES. * Used in detect.c, options.c, read.c, sp_lev.c, and lev_main.c */ int diff --git a/src/dungeon.c b/src/dungeon.c index 6d35f51a4..a78622a81 100644 --- a/src/dungeon.c +++ b/src/dungeon.c @@ -3154,7 +3154,7 @@ count_feat_lastseentyp( switch (gl.lastseentyp[x][y]) { #if 0 /* levels that have these tend of have a lot of them */ /* - * FIXME? due to theme rooms, lots of levels have an incresed + * FIXME? due to theme rooms, lots of levels have an increased * chance of having these so automatic annotations for them may * have become more worthwhile now. */ diff --git a/src/eat.c b/src/eat.c index 9dbe1da48..73a887a11 100644 --- a/src/eat.c +++ b/src/eat.c @@ -156,7 +156,7 @@ static const struct { { "", 0, 0, 0 } }; #define TTSZ SIZE(tintxts) -/* called after mimicing is over */ +/* called after mimicking is over */ static int eatmdone(void) { diff --git a/src/end.c b/src/end.c index 9289db604..6045ff9a7 100644 --- a/src/end.c +++ b/src/end.c @@ -74,7 +74,7 @@ ATTRNORETURN extern void nethack_exit(int) NORETURN; #include #endif -/* What do we try and in what order? Tradeoffs: +/* What do we try to in what order? Tradeoffs: * libc: +no external programs required * -requires newish libc/glibc * -requires -rdynamic @@ -1660,7 +1660,7 @@ fuzzer_savelife(int how) ++remedies; } if (!rn2(3 + 3 * remedies)) { - /* confer temporary resistances for first 8 properities: + /* confer temporary resistances for first 8 properties: fire, cold, sleep, disint, shock, poison, acid, stone */ for (propidx = 1; propidx <= 8; ++propidx) { if (!u.uprops[propidx].intrinsic diff --git a/src/engrave.c b/src/engrave.c index 1ab7cc0a7..3d81b9ec0 100644 --- a/src/engrave.c +++ b/src/engrave.c @@ -1571,9 +1571,9 @@ disturb_grave(coordxy x, coordxy y) struct rm *lev = &levl[x][y]; if (!IS_GRAVE(lev->typ)) { - impossible("Disturing grave that isn't a grave? (%d)", lev->typ); + impossible("Disturbing grave that isn't a grave? (%d)", lev->typ); } else if (lev->disturbed) { - impossible("Disturing already disturbed grave?"); + impossible("Disturbing already disturbed grave?"); } else { You("disturb the undead!"); lev->disturbed = 1; diff --git a/src/hacklib.c b/src/hacklib.c index f8a5a475d..ae265a5f3 100644 --- a/src/hacklib.c +++ b/src/hacklib.c @@ -588,7 +588,7 @@ strNsubst( const char *rp; unsigned len = (unsigned) strlen(orig); int ocount = 0, /* number of times 'orig' has been matched */ - rcount = 0; /* number of subsitutions made */ + rcount = 0; /* number of substitutions made */ for (bp = inoutbuf, op = workbuf; *bp && op < &workbuf[BUFSZ - 1]; ) { if ((!len || !strncmp(bp, orig, len)) && (++ocount == n || n == 0)) { @@ -1273,7 +1273,7 @@ strbuf_empty(strbuf_t *strbuf) strbuf_init(strbuf); } -/* strbuf_nl_to_crlf() converts all occurences of \n to \r\n */ +/* strbuf_nl_to_crlf() converts all occurrences of \n to \r\n */ void strbuf_nl_to_crlf(strbuf_t *strbuf) { diff --git a/src/insight.c b/src/insight.c index 7d65c9b00..78b172686 100644 --- a/src/insight.c +++ b/src/insight.c @@ -6,7 +6,7 @@ * Enlightenment and Conduct+Achievements and Vanquished+Extinct+Geno'd * and stethoscope/probing feedback. * - * Most code used to reside in cmd.c, presumeably because ^X was originally + * Most code used to reside in cmd.c, presumably because ^X was originally * a wizard mode command and the majority of those are in that file. * Some came from end.c where it is used during end of game disclosure. * And some came from priest.c that had once been in pline.c. @@ -1027,7 +1027,7 @@ status_enlightenment(int mode, int final) Sprintf(buf, "%s blind", (HBlinded & FROMOUTSIDE) != 0L ? "permanently" : (HBlinded & FROMFORM) ? "innately" - /* better phrasing desparately wanted... */ + /* better phrasing desperately wanted... */ : Blindfolded_only ? "deliberately" /* timed, possibly combined with blindfold */ : "temporarily"); @@ -1741,7 +1741,7 @@ attributes_enlightenment( (u.uhitinc < 0) ? "increasing" : (u.uhitinc < 4 * gu.urole.spelarmr / 5) ? "partly offsetting" - : (u.uhitinc < gu.urole.spelarmr) ? "nearly offseting" + : (u.uhitinc < gu.urole.spelarmr) ? "nearly offsetting" : "overcoming"); you_have(buf, ""); } @@ -1978,7 +1978,7 @@ doattributes(void) } void -youhiding(boolean via_enlghtmt, /* englightment line vs topl message */ +youhiding(boolean via_enlghtmt, /* enlightenment line vs topl message */ int msgflag) /* for variant message phrasing */ { char *bp, buf[BUFSZ]; @@ -2601,7 +2601,7 @@ vanqsort_cmp( case VANQ_ALPHA_MIX: name1 = mons[indx1].pmnames[NEUTRAL]; name2 = mons[indx2].pmnames[NEUTRAL]; - res = strcmpi(name1, name2); /* caseblind alhpa, low to high */ + res = strcmpi(name1, name2); /* caseblind alpha, low to high */ break; case VANQ_MCLS_HTOL: case VANQ_MCLS_LTOH: @@ -2892,7 +2892,7 @@ num_extinct(void) return n; } -/* collect both genocides and extintctions, skipping uniques */ +/* collect both genocides and extinctions, skipping uniques */ static int num_gone(int mvflags, int *mindx) { diff --git a/src/invent.c b/src/invent.c index 97825059e..dfd9c243c 100644 --- a/src/invent.c +++ b/src/invent.c @@ -965,7 +965,7 @@ merged(struct obj **potmp, struct obj **pobj) * addinv) or when an object in the hero's inventory has been polymorphed * in-place. * - * It may be valid to merge this code with with addinv_core2(). + * It may be valid to merge this code with addinv_core2(). */ void addinv_core1(struct obj *obj) @@ -1210,7 +1210,7 @@ hold_another_object( dropy(obj); /* now put it back again :-) */ return obj; } else if (wasUpolyd && !Upolyd) { - /* loose your grip if you revert your form */ + /* lose your grip if you revert your form */ if (drop_fmt) pline(drop_fmt, drop_arg); obj_extract_self(obj); @@ -1412,7 +1412,7 @@ delobj_core( boolean update_map; /* obj_resists(obj,0,0) protects the Amulet, the invocation tools, - and Rider corspes */ + and Rider corpses */ if (!force && obj_resists(obj, 0, 0)) { /* player might be doing something stupid, but we * can't guarantee that. assume special artifacts @@ -1793,7 +1793,7 @@ getobj( *bp++ = HANDS_SYM; *bp++ = ' '; /* put a space after the '-' in the prompt */ break; - case GETOBJ_DOWNPLAY: /* acceptable but not shown as likely chioce */ + case GETOBJ_DOWNPLAY: /* acceptable but not shown as likely choice */ case GETOBJ_EXCLUDE_INACCESS: /* nothing currently gives this for '-' but * theoretically could if wearing gloves */ case GETOBJ_EXCLUDE_SELECTABLE: /* ditto, I think... */ @@ -5106,7 +5106,7 @@ dopramulet(void) /* using display_inventory() instead of prinv() allows player to use 'm "' to force and menu and be able to choose amulet - in order to perform a context-sensitve item action */ + in order to perform a context-sensitive item action */ lets[0] = obj_to_let(uamul), lets[1] = '\0'; (void) dispinv_with_action(lets, TRUE, "Amulet"); diff --git a/src/makemon.c b/src/makemon.c index e620741fb..882c035ad 100644 --- a/src/makemon.c +++ b/src/makemon.c @@ -188,7 +188,7 @@ m_initweap(struct monst *mtmp) if (!rn2(3)) { /* lance and dwarvish mattock used to be in midst of the polearms but use different skills from polearms - and aren't appropriates choices for human soliders */ + and aren't appropriates choices for human soldiers */ do { w1 = rn1(BEC_DE_CORBIN - PARTISAN + 1, PARTISAN); } while (objects[w1].oc_skill != P_POLEARMS); diff --git a/src/mhitm.c b/src/mhitm.c index 56b27ea08..3e401f395 100644 --- a/src/mhitm.c +++ b/src/mhitm.c @@ -811,7 +811,7 @@ engulf_target(struct monst *magr, struct monst *mdef) return FALSE; /* if attacker is phasing in solid rock and defender can't move there, - or vice versa, don't allow engulf to succeeed; otherwise expelling + or vice versa, don't allow engulf to succeed; otherwise expelling might not be able to place attacker and defender both back on map; when defender is the hero, a sanity_check complaint about placing the hero on top of a monster can occur */ @@ -886,7 +886,7 @@ gulpmm( dx = mdef->mx; dy = mdef->my; /* - * Leave the defender in the monster chain at it's current position, + * Leave the defender in the monster chain at its current position, * but don't leave it on the screen. Move the aggressor to the * defender's position. */ diff --git a/src/mhitu.c b/src/mhitu.c index 25c3e5fd4..055700e57 100644 --- a/src/mhitu.c +++ b/src/mhitu.c @@ -477,7 +477,7 @@ mattacku(struct monst *mtmp) /* Orcs like to steal and eat horses and the like */ if (!rn2(is_orc(mtmp->data) ? 2 : 4) && m_next2u(mtmp)) { /* attack your steed instead; 'bhitpos' and 'notonhead' are - already set from tagetting hero */ + already set from targeting hero */ i = mattackm(mtmp, u.usteed); if ((i & M_ATTK_AGR_DIED) != 0) return 1; diff --git a/src/mkobj.c b/src/mkobj.c index 5044d59c1..a7751f3a8 100644 --- a/src/mkobj.c +++ b/src/mkobj.c @@ -628,7 +628,7 @@ clear_splitobjs(void) * the caller to provide a valid context for the swap. When done, obj will * still exist, but not on any chain. * - * Note: Don't use use obj_extract_self() -- we are doing an in-place swap, + * Note: Don't use obj_extract_self() -- we are doing an in-place swap, * not actually moving something. */ void @@ -1508,7 +1508,7 @@ shrink_glob( /* format "Your/Shk's/The [partly eaten] glob of " into globnambuf[] before shrinking the glob; Yname2() calls yname() - which calls xname() which ordinarly leaves "partly eaten" to + which calls xname() which ordinarily leaves "partly eaten" to doname() rather than inserting that itself; ask xname() to add that when appropriate */ iflags.partly_eaten_hack = TRUE; diff --git a/src/mon.c b/src/mon.c index 2118a5afe..c9c7540f9 100644 --- a/src/mon.c +++ b/src/mon.c @@ -1671,7 +1671,7 @@ mpickstuff(struct monst *mtmp) } obj_extract_self(otmp3); /* remove from floor */ (void) mpickobj(mtmp, otmp3); /* may merge and free otmp3 */ - /* let them try and equip it on the next turn */ + /* let them try to equip it on the next turn */ check_gear_next_turn(mtmp); newsym(mtmp->mx, mtmp->my); return TRUE; /* pick only one object */ @@ -4316,7 +4316,7 @@ maybe_unhide_at(coordxy x, coordxy y) } /* monster/hero tries to hide under something at the current location; - if used by monster creation, should only happen during during level + if used by monster creation, should only happen during level creation, otherwise there will be message sequencing issues */ boolean hideunder(struct monst *mtmp) @@ -4875,7 +4875,7 @@ newcham( if (is_rider(olddata)) return 0; /* make Nazgul and erinyes immune too, to reduce chance of - anomalous extinction feedback during final disclsoure */ + anomalous extinction feedback during final disclosure */ if (mbirth_limit(monsndx(olddata)) < MAXMONNO) return 0; /* cancelled shapechangers become uncancelled prior @@ -5309,7 +5309,7 @@ angry_guards(boolean silent) if (nct) { /* seen/sensed adjacent guard(s) */ Sprintf(buf, "guard%s", plur(nct)); pline_The("%s %s angry!", buf, vtense(buf, "get")); - } else if (sct) { /* seen/sensed non-adjcent guard(s) */ + } else if (sct) { /* seen/sensed non-adjacent guard(s) */ Sprintf(buf, "guard%s", plur(sct)); pline("%s %s %s approaching!", (sct == 1) ? "An angry" : "Angry", diff --git a/src/monmove.c b/src/monmove.c index 321b73c5d..31c0ba0f1 100644 --- a/src/monmove.c +++ b/src/monmove.c @@ -311,7 +311,7 @@ disturb(struct monst *mtmp) * not stealthy or (mon is an ettin and 9/10) AND * (mon is not a nymph, jabberwock, or leprechaun) or 1/50 AND * Aggravate or mon is (dog or human) or - * (1/7 and mon is not mimicing furniture or object) + * (1/7 and mon is not mimicking furniture or object) */ if (couldsee(mtmp->mx, mtmp->my) && mdistu(mtmp) <= 100 && (!Stealth || (mtmp->data == &mons[PM_ETTIN] && rn2(10))) diff --git a/src/music.c b/src/music.c index d7fe2b2c6..06ebe724a 100644 --- a/src/music.c +++ b/src/music.c @@ -657,7 +657,7 @@ do_improvisation(struct obj *instr) (do_spec && same_old_song) ? "produces a familiar, lilting melody" : (do_spec) ? "produces a lilting melody" - : (same_old_song) ? "twangs a familar tune" + : (same_old_song) ? "twangs a familiar tune" : "twangs"); else You_feel("soothing vibrations."); diff --git a/src/nhlsel.c b/src/nhlsel.c index 4b04d243b..bb3a44451 100644 --- a/src/nhlsel.c +++ b/src/nhlsel.c @@ -868,7 +868,7 @@ l_selection_gradient(lua_State *L) cvt_to_abscoord(&x, &y); cvt_to_abscoord(&x2, &y2); /* maxdist is required because there's no obvious default value for it, - * whereas mindist has an obvious defalt of 0 */ + * whereas mindist has an obvious default of 0 */ maxdist = get_table_int(L, "maxdist"); mindist = get_table_int_opt(L, "mindist", 0); diff --git a/src/objnam.c b/src/objnam.c index 95082c121..4682624db 100644 --- a/src/objnam.c +++ b/src/objnam.c @@ -423,7 +423,7 @@ fruit_from_name( char *altfname; unsigned k; /* - * note: named fruits are case-senstive... + * note: named fruits are case-sensitive... */ if (highest_fid) @@ -663,7 +663,7 @@ xname_flags( case VENOM_CLASS: case TOOL_CLASS: /* note: lenses or towel prefix would overwrite poisoned weapon - prefix if both were simultaneously posssible, but they aren't */ + prefix if both were simultaneously possible, but they aren't */ if (typ == LENSES) Strcpy(buf, "pair of "); else if (is_wet_towel(obj)) @@ -1539,7 +1539,7 @@ doname_base( : "weapon in", hand_s); - /* we just added a parenthesized pharse, but the right paren + /* we just added a parenthesized phrase, but the right paren might be absent if the appended string got truncated */ if (!Blind && bpspaceleft && bp_eos[-1] == ')') { if (gw.warn_obj_cnt && obj == uwep @@ -3995,7 +3995,7 @@ readobjnam_preparse(struct _readobjnam_data *d) and less than 15 (owt < 300) */ d->gsize = 2; } else if (!strncmpi(d->bp, "large ", l = 6)) { - /* "large" might be part of monster name (dog, cat, koboold, + /* "large" might be part of monster name (dog, cat, kobold, mimic) or object name (box, round shield) rather than prefix for glob size */ if (strncmpi(d->bp + l, "glob", 4) && !strstri(d->bp + l, " glob")) @@ -4198,7 +4198,7 @@ readobjnam_postparse1(struct _readobjnam_data *d) * referred to as a "pair of". E.g. We should double if the player * types "pair of spears", but not if the player types "pair of * lenses". Luckily (?) all objects that are referred to as pairs - * -- boots, gloves, and lenses -- are also not mergable, so cnt is + * -- boots, gloves, and lenses -- are also not mergeable, so cnt is * ignored anyway. */ if (!strncmpi(d->bp, "pair of ", 8)) { @@ -5440,7 +5440,7 @@ shield_simple_name(struct obj *shield) return "shield"; } -/* for completness */ +/* for completeness */ const char * shirt_simple_name(struct obj *shirt UNUSED) { diff --git a/src/options.c b/src/options.c index 92a6d2a2f..d290fcc5d 100644 --- a/src/options.c +++ b/src/options.c @@ -161,7 +161,7 @@ static const struct paranoia_opts { latter requires at least two letters; "e"at vs "ex"plore, "cont"inue eating vs "C"onfirm; "wand"-break vs "Were"-change, both require at least two letters during config processing but use - one letter with case-senstivity for 'm O's interactive menu; + one letter with case-sensitivity for 'm O's interactive menu; if any entry or alias beginning with 'n' gets added, aside from "none", the parsing to accept "nofoo" to mean "!foo" will need fixing */ { PARANOID_CONFIRM, "Confirm", 1, "Paranoia", 2, @@ -263,7 +263,7 @@ static NEARDATA const char *perminv_modes[][3] = { * + a number or '#' - reserved for counts * + an upper or lower case US ASCII letter - used for accelerators * + ESC - reserved for escaping the menu - * + NULL, CR or LF - reserved for commiting the selection(s). NULL + * + NULL, CR or LF - reserved for committing the selection(s). NULL * is kind of odd, but the tty's xwaitforspace() will return it if * someone hits a . * + a default object class symbol - used for object class accelerators @@ -3222,7 +3222,7 @@ optfn_pickup_types( op = tbuf; /* restore */ else if (abuf[0] == 'm') use_menu = TRUE; - /* note: abuf[0]=='a' is already handled via clearing the + /* note: abuf[0]=='a' is already handled via clearing the old value (above) as a default action */ } if (use_menu) { @@ -6382,7 +6382,7 @@ handler_windowborders(void) mode_name = windowborders_text[i]; any.a_int = i + 1; /* index 'i' matches the numeric setting for windowborders, - so allow corresponding digit as group accellerator */ + so allow corresponding digit as group accelerator */ add_menu(tmpwin, &nul_glyphinfo, &any, 'a' + i, '0' + i, ATR_NONE, clr, mode_name, MENU_ITEMFLAGS_NONE); } @@ -6896,7 +6896,7 @@ initoptions_init(void) && !strcmpi(windowprocs.name, gc.cmdline_windowsys)) /* ignore any windowtype:foo in RC file or NETHACKOPTIONS */ iflags.windowtype_locked = TRUE; - /* should't need cmdline_windowsys beyond here */ + /* shouldn't need cmdline_windowsys beyond here */ free((genericptr_t) gc.cmdline_windowsys), gc.cmdline_windowsys = NULL; } @@ -9538,7 +9538,7 @@ int sym_val(const char *strval) /* up to 4*BUFSZ-1 long; only first few chars matter */ { - char buf[QBUFSZ], tmp[QBUFSZ]; /* to hold trucated copy of 'strval' */ + char buf[QBUFSZ], tmp[QBUFSZ]; /* to hold truncated copy of 'strval' */ buf[0] = '\0'; if (!strval[0] || !strval[1]) { /* empty, or single character */ diff --git a/src/pickup.c b/src/pickup.c index 10a88988b..3256ff734 100644 --- a/src/pickup.c +++ b/src/pickup.c @@ -1853,7 +1853,7 @@ pickup_object( if (res <= 0) return res; - /* Whats left of the special case for gold :-) */ + /* What's left of the special case for gold :-) */ if (obj->oclass == COIN_CLASS) disp.botl = TRUE; if (obj->quan != count && obj->otyp != LOADSTONE) diff --git a/src/pray.c b/src/pray.c index 047c989ed..99154656f 100644 --- a/src/pray.c +++ b/src/pray.c @@ -258,7 +258,7 @@ in_trouble(void) && (!u.uswallow || !attacktype_fordmg(u.ustuck->data, AT_ENGL, AD_BLND))) return TROUBLE_BLIND; - /* deafness isn't it's own trouble; healing magic cures deafness + /* deafness isn't its own trouble; healing magic cures deafness when it cures blindness, so do the same with trouble repair */ if ((HDeaf & TIMEOUT) > 1L) return TROUBLE_BLIND; diff --git a/src/restore.c b/src/restore.c index 1281d2596..b74473062 100644 --- a/src/restore.c +++ b/src/restore.c @@ -550,7 +550,7 @@ restgamestate(NHFILE *nhfp) of unpaid items before shopkeeper's bill is available is a no-no; named fruit names aren't accessible yet either [3.6.2: moved perm_invent from flags to iflags to keep it out of - save files; retaining the override here is simpler than trying to + save files; retaining the override here is simpler than trying to figure out where it really belongs now] */ defer_perm_invent = iflags.perm_invent; iflags.perm_invent = FALSE; diff --git a/src/role.c b/src/role.c index 23e1c40c7..ec03a8b03 100644 --- a/src/role.c +++ b/src/role.c @@ -2082,7 +2082,7 @@ role_init(void) * place where it actually matters for the hero is in set_uasmon() * and that can use mons[race] rather than mons[role] for this * particular property. Despite the comment, it is checked--where - * needed--via instrinsic 'Infravision' which set_uasmon() manages. + * needed--via intrinsic 'Infravision' which set_uasmon() manages. */ /* Fix up infravision */ if (mons[gu.urace.mnum].mflags3 & M3_INFRAVISION) { @@ -2876,7 +2876,7 @@ setup_rolemenu( } } /* !filtering implies reset_role_filtering() where we want to - mark this role as preseleted if current filter excludes it */ + mark this role as preselected if current filter excludes it */ add_menu(win, &nul_glyphinfo, &any, thisch, 0, ATR_NONE, clr, an(rolenamebuf), (!filtering && !role_ok) diff --git a/src/rumors.c b/src/rumors.c index 0412dbb19..643a73968 100644 --- a/src/rumors.c +++ b/src/rumors.c @@ -170,7 +170,7 @@ getrumor( (void) dlb_fclose(rumors); if (count >= 50) impossible("Can't find non-cookie rumor?"); - else if (!gi.in_mklev) /* avoid exercizing wisdom for graffiti */ + else if (!gi.in_mklev) /* avoid exercising wisdom for graffiti */ exercise(A_WIS, (adjtruth > 0)); } else { couldnt_open_file(RUMORFILE); @@ -444,7 +444,7 @@ get_rnd_line( return buf; /* 'rumors' is about 3/4 of the way to the limit on a 16-bit config for the whole, roughly 3/8 of the way for either half; all active - configuations these days are at least 32-bits anyway */ + configurations these days are at least 32-bits anyway */ nhassert(filechunksize <= INT_MAX); /* essential for rn2() */ /* @@ -836,7 +836,7 @@ init_CapMons(void) unsigned mndx, mgend; /* the first CapMonstCnt entries come from mons[].pmnames[] and - the next CapBogonCnt entries from from the 'bogusmons' file; + the next CapBogonCnt entries from the 'bogusmons' file; there is an extra entry for Null at the end, but that is only useful to force non-zero array size in case both mons[] and bogusmons get modified to have no applicable monster names */ diff --git a/src/sfstruct.c b/src/sfstruct.c index 6c15b185f..78fc6e694 100644 --- a/src/sfstruct.c +++ b/src/sfstruct.c @@ -46,7 +46,7 @@ static FILE *bw_FILE[MAXFD] = {0,0,0,0,0}; * Once buffered IO (stdio) has been enabled on the file * associated with a descriptor via fdopen(): * - * 1. If you use bufoff and bufon to try and toggle the + * 1. If you use bufoff and bufon to try to toggle the * use of write vs fwrite; the code just tracks which * routine is to be called through the tracking * variables and acts accordingly. diff --git a/src/shk.c b/src/shk.c index a2ab74c8f..086024113 100644 --- a/src/shk.c +++ b/src/shk.c @@ -828,7 +828,7 @@ pick_pick(struct obj *obj) } /* - Decide whether two unpaid items are mergable; caller is responsible for + Decide whether two unpaid items are mergeable; caller is responsible for making sure they're unpaid and the same type of object; we check the price quoted by the shopkeeper and also that they both belong to the same shk. */ @@ -1094,7 +1094,7 @@ obfree(struct obj *obj, struct obj *merge) if (!merge) { bp->useup = 1; obj->unpaid = 0; /* only for doinvbill */ - /* for used up glob, put back origial weight in case it gets + /* for used up glob, put back original weight in case it gets formatted ('I x' or itemized billing) with 'wizweight' On */ if (obj->globby && !obj->owt && has_omid(obj)) obj->owt = OMID(obj); @@ -1712,7 +1712,7 @@ dopay(void) /* allow 'm p' to request a menu for menustyle:traditional; for other styles, it will do the opposite; that doesn't make a whole lot of sense for a 'request-menu' prefix, but otherwise - it would simply be reduncant and there wouldn't be any way to + it would simply be redundant and there wouldn't be any way to skip the menu when hero owes for multiple items */ if (iflags.menu_requested) via_menu = !via_menu; diff --git a/src/sounds.c b/src/sounds.c index 5a2d12ee0..ebd8ed8d8 100644 --- a/src/sounds.c +++ b/src/sounds.c @@ -1461,7 +1461,7 @@ tiphat(void) for (range = 1; range <= BOLT_LIM + 1; ++range) { x += u.dx, y += u.dy; if (!isok(x, y) || (range > 1 && !couldsee(x, y))) { - /* switch back to coordinates for previous interation's 'mtmp' */ + /* switch back to coordinates for previous iteration's 'mtmp' */ x -= u.dx, y -= u.dy; break; } diff --git a/src/sp_lev.c b/src/sp_lev.c index ba71a3bd2..a19d91408 100644 --- a/src/sp_lev.c +++ b/src/sp_lev.c @@ -3491,7 +3491,7 @@ lspo_object(lua_State *L) 0, /* buried */ 0, /* lit */ 0, 0, 0, 0, /* eroded, locked, trapped, recharged */ - 0, 0, 0, 0, /* invis, greased, broken, achievment */ + 0, 0, 0, 0, /* invis, greased, broken, achievement */ }; #if 0 int nparams = 0; @@ -7062,7 +7062,7 @@ static const struct luaL_Reg nhl_functions[] = { - automatically add shuffle(array) - automatically add align = { "law", "neutral", "chaos" } and shuffle it. (remove from lua files) - - grab the header comments from des-files and add add them to the lua files + - grab the header comments from des-files and add them to the lua files */ diff --git a/src/steal.c b/src/steal.c index 092835e0c..8327b6147 100644 --- a/src/steal.c +++ b/src/steal.c @@ -246,7 +246,7 @@ remove_worn_item( * but that would need a lot more cooperation by callers. It's a * tradeoff between protecting the player against unintentional hangup * and defending the game against deliberate hangup when player sees a - * message about something undesireable followed by --More--. + * message about something undesirable followed by --More--. */ oldinuse = obj->in_use; obj->in_use = 1; diff --git a/src/teleport.c b/src/teleport.c index 7853f8546..e1a4d2e82 100644 --- a/src/teleport.c +++ b/src/teleport.c @@ -557,7 +557,7 @@ teleds(coordxy nux, coordxy nuy, int teleds_flags) int collect_coords( coord *ccc, /* pointer to array of at least size ROWNO*(COLNO-1) */ - coordxy cx, coordxy cy, /* center point, not necessarly */ + coordxy cx, coordxy cy, /* center point, not necessarily */ int maxradius, /* how far from center to go collecting spots; * 0 means collect entire map */ unsigned cc_flags, /* incl_center: put in output list @@ -621,7 +621,7 @@ collect_coords( * (unshown) 4's will be mixed together, and so forth. * * If caller processes the output list in order, the closest viable - * spot will be chosen. If a compeletely random spot is preferred, + * spot will be chosen. If a completely random spot is preferred, * the list can be requested to be unscrambled and then the caller * can shuffle it, overriding the collection rings. A filter function * could be used to skip everything after the first acceptable spot. diff --git a/src/timeout.c b/src/timeout.c index ca480d983..15d7a4771 100644 --- a/src/timeout.c +++ b/src/timeout.c @@ -815,7 +815,7 @@ nh_timeout(void) Your("temporary ability to survive burning has ended."); break; case WWALKING: - /* [see fire reeistance] */ + /* [see fire resistance] */ if (!Wwalking) Your("temporary ability to walk on liquid has ended."); break; @@ -1315,7 +1315,7 @@ lantern_message(struct obj *obj) } /* - * Timeout callback for for objects that are burning. E.g. lamps, candles. + * Timeout callback for objects that are burning. E.g. lamps, candles. * See begin_burn() for meanings of obj->age and obj->spe. */ void @@ -2016,7 +2016,7 @@ wiz_timeout_queue(void) intrinsic = u.uprops[p].intrinsic; if (intrinsic & TIMEOUT) { if (specindx > 0 && i >= specindx) { - putstr(win, 0, " -- settable via #wizinstrinc only --"); + putstr(win, 0, " -- settable via #wizintrinsic only --"); specindx = 0; } /* timeout value can be up to 16777215 (0x00ffffff) but diff --git a/src/trap.c b/src/trap.c index 0f0729fde..3f7a51c45 100644 --- a/src/trap.c +++ b/src/trap.c @@ -4994,7 +4994,7 @@ drain_en(int n, boolean max_already_drained) /* * FIXME? - * u.uenmax should probably have a higher mininum than 0; + * u.uenmax should probably have a higher minimum than 0; * perhaps u.ulevel or (u.ulevel + 1) / 2 */ if (u.uenmax < 1) { diff --git a/src/uhitm.c b/src/uhitm.c index 5c90b8c29..6932d12af 100644 --- a/src/uhitm.c +++ b/src/uhitm.c @@ -837,7 +837,7 @@ hmon_hitmon_barehands(struct _hitmon_data *hmd, struct monst *mon) if (hmd->mdat == &mons[PM_SHADE]) { hmd->dmg = 0; } else { - /* note: 1..2 or 1..4 can be substantiallly increased by + /* note: 1..2 or 1..4 can be substantially increased by strength bonus or skill bonus, usually both... */ hmd->dmg = rnd(!martial_bonus() ? 2 : 4); hmd->use_weapon_skill = TRUE; @@ -1393,8 +1393,8 @@ hmon_hitmon_dmg_recalc(struct _hitmon_data *hmd, struct obj *obj) for dual attacks, 3/4 of the strength bonus is used; when both attacks hit, overall bonus is 3/2 rather than doubled; melee hit with two-handed weapon uses 3/2 strength bonus to - appoximately match double hit with two-weapon ('approximate' - becase udaminc skews in favor of two-weapon); the 3/2 factor + approximately match double hit with two-weapon ('approximate' + because udaminc skews in favor of two-weapon); the 3/2 factor for two-handed strength does not apply to polearms unless hero is simply bashing with one of those and does not apply to jousting because lances are one-handed */ @@ -2813,7 +2813,7 @@ mhitm_ad_tlpt( if (Half_physical_damage) mhm->damage *= 2; /* doesn't actually increase damage; * we only get here if half the - * original damage would would have + * original damage would have * been fatal, so double reduced * damage will be less than original */ if (mhm->damage < 1) { /* implies (tmphp <= 1) */ @@ -5308,7 +5308,7 @@ hmonas(struct monst *mon) be Null, and we want to track that for passive() */ originalweapon = (altwep && uswapwep) ? &uswapwep : &uwep; if (uswapwep /* set up 'altwep' flag for next iteration */ - /* only consider seconary when wielding one-handed primary */ + /* only consider secondary when wielding one-handed primary */ && uwep && (uwep->oclass == WEAPON_CLASS || is_weptool(uwep)) && !bimanual(uwep) /* only switch if not wearing shield and not at artifact; diff --git a/src/utf8map.c b/src/utf8map.c index 8001963cd..6ee0c19d6 100644 --- a/src/utf8map.c +++ b/src/utf8map.c @@ -314,7 +314,7 @@ glyph_find_core(const char *id, struct find_struct *findwhat) actual comparison part by generating them once, ahead of the bulk of the potential parsings. We can later free up all the memory those names consumed once the bulk parsing is - overwith. + over with. */ diff --git a/src/vault.c b/src/vault.c index b902f7ffd..c2b279738 100644 --- a/src/vault.c +++ b/src/vault.c @@ -466,7 +466,7 @@ invault(void) return; } if (Strangled || is_silent(gy.youmonst.data) || gm.multi < 0) { - /* [we ought to record whether this this message has already + /* [we ought to record whether this message has already been given in order to vary it upon repeat visits, but discarding the monster and its egd data renders that hard] */ if (Deaf) { diff --git a/src/version.c b/src/version.c index 5485158f6..c25785069 100644 --- a/src/version.c +++ b/src/version.c @@ -407,7 +407,7 @@ check_version( return TRUE; } -/* this used to be based on file date and somewhat OS-dependant, +/* this used to be based on file date and somewhat OS-dependent, but now examines the initial part of the file's contents */ boolean uptodate(NHFILE *nhfp, const char *name, unsigned long utdflags) diff --git a/src/vision.c b/src/vision.c index 5b69fd273..64b1aaea1 100644 --- a/src/vision.c +++ b/src/vision.c @@ -173,7 +173,7 @@ does_block(int x, int y, struct rm *lev) if (obj->otyp == BOULDER) return 1; - /* Mimics mimicing a door or boulder or ... block light. */ + /* Mimics mimicking a door or boulder or ... block light. */ if ((mon = m_at(x, y)) && (!mon->minvis || See_invisible) && is_lightblocker_mappear(mon)) return 1; @@ -797,7 +797,7 @@ vision_recalc(int control) /* * At this point we know that the row position is *not* in normal - * sight. That is, the position is could be seen, but is dark + * sight. That is, the position could be seen, but is dark * or LOS is just plain blocked. * * Update the position if: @@ -805,7 +805,7 @@ vision_recalc(int control) * the glyph -- E.g. darken room spot, etc. * o If we now could see the location (yet the location is not * lit), but previously we couldn't see the location, or vice - * versa. Update the spot because there there may be an + * versa. Update the spot because there may be an * infrared monster there. */ } else { diff --git a/src/windows.c b/src/windows.c index 7078eb6bb..525bb00da 100644 --- a/src/windows.c +++ b/src/windows.c @@ -1776,7 +1776,7 @@ adjust_menu_promptstyle(winid window, color_attr *style) } /* - * Common code point leading into the interface-specifc + * Common code point leading into the interface-specific * add_menu() to allow single-spot adjustments to the parameters, * such as those done by menu_colors. */ diff --git a/src/wizard.c b/src/wizard.c index 6454532d5..b5101f96d 100644 --- a/src/wizard.c +++ b/src/wizard.c @@ -610,7 +610,7 @@ nasty(struct monst *summoner) * and 20 are neutral. [These numbers are up date for * 3.7.0; the ones in the next paragraph are not....] * - * Neutral caster, used for late-game harrassment, + * Neutral caster, used for late-game harassment, * has 18/42 chance to stop the inner loop on each * critter, 24/42 chance for another iteration. * Lawful caster has 28/42 chance to stop unless the diff --git a/src/zap.c b/src/zap.c index 3609c3a8a..eb07ca773 100644 --- a/src/zap.c +++ b/src/zap.c @@ -508,7 +508,7 @@ bhitm(struct monst *mtmp, struct obj *otmp) if (mtmp->isshk && !*u.ushops) hot_pursuit(mtmp); } else if (M_AP_TYPE(mtmp)) - seemimic(mtmp); /* might unblock if mimicing a boulder/door */ + seemimic(mtmp); /* might unblock if mimicking a boulder/door */ } /* note: gb.bhitpos won't be set if swallowed, but that's okay since * reveal_invis will be false. We can't use mtmp->mx, my since it @@ -4604,7 +4604,7 @@ dobuzz( int spell_type; int hdmgtype = Hallucination ? rn2(6) : damgtype; - /* if its a Hero Spell then get its SPE_TYPE */ + /* if it's a Hero Spell then get its SPE_TYPE */ spell_type = is_hero_spell(type) ? SPE_MAGIC_MISSILE + damgtype : 0; if (u.uswallow) { @@ -6098,7 +6098,7 @@ makewish(void) "made %s first artifact wish - %s", uhis(), wish); else livelog_printf((LL_WISH | maybe_LL_arti), "wished for %s", wish); - /* TODO? maybe generate a second event decribing what was received since + /* TODO? maybe generate a second event describing what was received since those just echo player's request rather than show actual result */ const char *verb = ((Is_airlevel(&u.uz) || u.uinwater) ? "slip" : "drop"), diff --git a/sys/libnh/README.md b/sys/libnh/README.md index 4458cbab0..b887b5730 100644 --- a/sys/libnh/README.md +++ b/sys/libnh/README.md @@ -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: diff --git a/sys/msdos/Install.dos b/sys/msdos/Install.dos index 879e73c60..108e117a4 100644 --- a/sys/msdos/Install.dos +++ b/sys/msdos/Install.dos @@ -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. diff --git a/sys/msdos/video.c b/sys/msdos/video.c index 03ca3f18f..3b1d20934 100644 --- a/sys/msdos/video.c +++ b/sys/msdos/video.c @@ -111,7 +111,7 @@ typedef long clock_t; #include /* 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 */ diff --git a/sys/msdos/vidvesa.c b/sys/msdos/vidvesa.c index 31598de34..330ced994 100644 --- a/sys/msdos/vidvesa.c +++ b/sys/msdos/vidvesa.c @@ -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) diff --git a/sys/msdos/vidvga.c b/sys/msdos/vidvga.c index 8f9025aa6..8e50ccca8 100644 --- a/sys/msdos/vidvga.c +++ b/sys/msdos/vidvga.c @@ -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: * diff --git a/sys/share/pcmain.c b/sys/share/pcmain.c index 5230c7aa6..ec8ff0c70 100644 --- a/sys/share/pcmain.c +++ b/sys/share/pcmain.c @@ -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. */ diff --git a/sys/share/random.c b/sys/share/random.c index 5c94a03c0..bb045e01a 100644 --- a/sys/share/random.c +++ b/sys/share/random.c @@ -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, diff --git a/sys/share/unixtty.c b/sys/share/unixtty.c index c45df4ef8..44fbadc6a 100644 --- a/sys/share/unixtty.c +++ b/sys/share/unixtty.c @@ -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 */ diff --git a/sys/share/uudecode.c b/sys/share/uudecode.c index 5726c79a2..f3a2cb764 100644 --- a/sys/share/uudecode.c +++ b/sys/share/uudecode.c @@ -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 diff --git a/sys/unix/Makefile.top b/sys/unix/Makefile.top index fe733d908..957bfe81e 100644 --- a/sys/unix/Makefile.top +++ b/sys/unix/Makefile.top @@ -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): diff --git a/sys/unix/NewInstall.unx b/sys/unix/NewInstall.unx index 8ef6c693e..97e066df9 100644 --- a/sys/unix/NewInstall.unx +++ b/sys/unix/NewInstall.unx @@ -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 diff --git a/sys/unix/XCode.xcconfig b/sys/unix/XCode.xcconfig index 06ce911fa..212b93f89 100644 --- a/sys/unix/XCode.xcconfig +++ b/sys/unix/XCode.xcconfig @@ -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. diff --git a/sys/unix/hints/include/misc.370 b/sys/unix/hints/include/misc.370 index a6d87edc9..7f8c40439 100644 --- a/sys/unix/hints/include/misc.370 +++ b/sys/unix/hints/include/misc.370 @@ -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 diff --git a/sys/unix/hints/macOS.370 b/sys/unix/hints/macOS.370 index 047bff67b..c031cdc69 100755 --- a/sys/unix/hints/macOS.370 +++ b/sys/unix/hints/macOS.370 @@ -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. # diff --git a/sys/unix/hints/solaris b/sys/unix/hints/solaris index 9d02d4bd3..1f3e22e64 100644 --- a/sys/unix/hints/solaris +++ b/sys/unix/hints/solaris @@ -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 diff --git a/sys/unix/hints/solaris-playground b/sys/unix/hints/solaris-playground index b44bccf27..1c75b0766 100644 --- a/sys/unix/hints/solaris-playground +++ b/sys/unix/hints/solaris-playground @@ -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 diff --git a/sys/vms/Install.vms b/sys/vms/Install.vms index 732988792..730eb47f3 100644 --- a/sys/vms/Install.vms +++ b/sys/vms/Install.vms @@ -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. diff --git a/sys/vms/vmsbuild.com b/sys/vms/vmsbuild.com index f2b1b9b29..3f2ca521e 100755 --- a/sys/vms/vmsbuild.com +++ b/sys/vms/vmsbuild.com @@ -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) diff --git a/sys/vms/vmsfiles.c b/sys/vms/vmsfiles.c index 6385626c5..885b4c5f1 100644 --- a/sys/vms/vmsfiles.c +++ b/sys/vms/vmsfiles.c @@ -16,7 +16,7 @@ #include #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); diff --git a/sys/vms/vmsmail.c b/sys/vms/vmsmail.c index e761fb68c..d29fdb888 100644 --- a/sys/vms/vmsmail.c +++ b/sys/vms/vmsmail.c @@ -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 diff --git a/sys/vms/vmsmain.c b/sys/vms/vmsmain.c index 4a848d11b..91f9817ff 100644 --- a/sys/vms/vmsmain.c +++ b/sys/vms/vmsmain.c @@ -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(); diff --git a/sys/vms/vmstty.c b/sys/vms/vmstty.c index 17c6f949b..8dc0dfe4f 100644 --- a/sys/vms/vmstty.c +++ b/sys/vms/vmstty.c @@ -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) { diff --git a/sys/vms/vmsunix.c b/sys/vms/vmsunix.c index 993e893f2..de147bf96 100644 --- a/sys/vms/vmsunix.c +++ b/sys/vms/vmsunix.c @@ -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 diff --git a/sys/windows/Install.windows b/sys/windows/Install.windows index bfa057860..55bd6b3ab 100644 --- a/sys/windows/Install.windows +++ b/sys/windows/Install.windows @@ -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: diff --git a/sys/windows/Makefile.mingw32 b/sys/windows/Makefile.mingw32 index 51ff26eaa..146ba86a1 100644 --- a/sys/windows/Makefile.mingw32 +++ b/sys/windows/Makefile.mingw32 @@ -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 diff --git a/sys/windows/Makefile.nmake b/sys/windows/Makefile.nmake index a23b2dd68..ab15dce8b 100644 --- a/sys/windows/Makefile.nmake +++ b/sys/windows/Makefile.nmake @@ -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 in $(ALLOBJ) is replaced by # <+>. diff --git a/sys/windows/consoletty.c b/sys/windows/consoletty.c index cbbba5160..39305a150 100644 --- a/sys/windows/consoletty.c +++ b/sys/windows/consoletty.c @@ -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. * diff --git a/sys/windows/nhsetup.bat b/sys/windows/nhsetup.bat index 4875cc2c7..d365c1558 100755 --- a/sys/windows/nhsetup.bat +++ b/sys/windows/nhsetup.bat @@ -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 diff --git a/sys/windows/win32api.h b/sys/windows/win32api.h index ba19ec912..d37daf7f3 100644 --- a/sys/windows/win32api.h +++ b/sys/windows/win32api.h @@ -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 . */ diff --git a/util/dlb_main.c b/util/dlb_main.c index e56485607..09f1432ce 100644 --- a/util/dlb_main.c +++ b/util/dlb_main.c @@ -418,7 +418,7 @@ main(int argc UNUSED_if_no_DLB, char **argv UNUSED_if_no_DLB) xexit(EXIT_FAILURE); } - /* caculate directory size */ + /* calculate directory size */ dir_size = 40 /* header line (see below) */ + ((nfiles + 1) * 11) /* handling+file offset+SP+newline */ + slen + (long) strlen(DLB_DIRECTORY); /* file names */ diff --git a/win/Qt/qt_bind.cpp b/win/Qt/qt_bind.cpp index 2b297a085..7acf32ba6 100644 --- a/win/Qt/qt_bind.cpp +++ b/win/Qt/qt_bind.cpp @@ -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); diff --git a/win/Qt/qt_map.cpp b/win/Qt/qt_map.cpp index 0d0effce4..cda5d775b 100644 --- a/win/Qt/qt_map.cpp +++ b/win/Qt/qt_map.cpp @@ -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) = ' '; diff --git a/win/Qt/qt_set.cpp b/win/Qt/qt_set.cpp index a4a2195e5..2823e4dc0 100644 --- a/win/Qt/qt_set.cpp +++ b/win/Qt/qt_set.cpp @@ -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; } diff --git a/win/Qt/qt_stat.cpp b/win/Qt/qt_stat.cpp index eec91ad56..34dc3e2d1 100644 --- a/win/Qt/qt_stat.cpp +++ b/win/Qt/qt_stat.cpp @@ -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 diff --git a/win/Qt/qt_svsel.cpp b/win/Qt/qt_svsel.cpp index 191fb8887..ffe22a19c 100644 --- a/win/Qt/qt_svsel.cpp +++ b/win/Qt/qt_svsel.cpp @@ -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" { diff --git a/win/Qt/qt_win.cpp b/win/Qt/qt_win.cpp index 1e37337ad..1f356399c 100644 --- a/win/Qt/qt_win.cpp +++ b/win/Qt/qt_win.cpp @@ -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. diff --git a/win/Qt/qt_xcmd.cpp b/win/Qt/qt_xcmd.cpp index 4310ad249..505949398 100644 --- a/win/Qt/qt_xcmd.cpp +++ b/win/Qt/qt_xcmd.cpp @@ -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 diff --git a/win/Qt/qt_xpms.h b/win/Qt/qt_xpms.h index 43b055e34..7ea343590 100644 --- a/win/Qt/qt_xpms.h +++ b/win/Qt/qt_xpms.h @@ -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 */ diff --git a/win/Qt/qt_yndlg.cpp b/win/Qt/qt_yndlg.cpp index 40696ac41..4dc355cbc 100644 --- a/win/Qt/qt_yndlg.cpp +++ b/win/Qt/qt_yndlg.cpp @@ -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"; diff --git a/win/Qt/qt_yndlg.h b/win/Qt/qt_yndlg.h index e6c1bcdef..0dd5d39e1 100644 --- a/win/Qt/qt_yndlg.h +++ b/win/Qt/qt_yndlg.h @@ -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: diff --git a/win/X11/Install.X11 b/win/X11/Install.X11 index 3738ba4f4..0f822aeb7 100644 --- a/win/X11/Install.X11 +++ b/win/X11/Install.X11 @@ -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 diff --git a/win/X11/NetHack.ad b/win/X11/NetHack.ad index fca3afcf9..22e2c6bae 100644 --- a/win/X11/NetHack.ad +++ b/win/X11/NetHack.ad @@ -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. diff --git a/win/X11/Window.c b/win/X11/Window.c index 64f690a6e..82cb5a1c6 100644 --- a/win/X11/Window.c +++ b/win/X11/Window.c @@ -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) diff --git a/win/X11/dialogs.c b/win/X11/dialogs.c index 37d81313b..11664c198 100644 --- a/win/X11/dialogs.c +++ b/win/X11/dialogs.c @@ -44,7 +44,7 @@ * + Include nethack's lint.h to get nhStr() macro. * + Use nhStr() on string literals (or macros from * 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) { diff --git a/win/X11/ibm.bdf b/win/X11/ibm.bdf index f2b77f31b..399d6dff5 100644 --- a/win/X11/ibm.bdf +++ b/win/X11/ibm.bdf @@ -3616,7 +3616,7 @@ fd00 3800 3600 ENDCHAR -STARTCHAR magic sheild 3 +STARTCHAR magic shield 3 ENCODING 171 SWIDTH 666 0 DWIDTH 8 0 diff --git a/win/X11/winX.c b/win/X11/winX.c index 89bb76059..eb0565024 100644 --- a/win/X11/winX.c +++ b/win/X11/winX.c @@ -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 */ { diff --git a/win/X11/winmap.c b/win/X11/winmap.c index ab43b339b..9a4272a3a 100644 --- a/win/X11/winmap.c +++ b/win/X11/winmap.c @@ -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 diff --git a/win/X11/winmenu.c b/win/X11/winmenu.c index aa19b2567..d4188ac22 100644 --- a/win/X11/winmenu.c +++ b/win/X11/winmenu.c @@ -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 , leaving menu positioned as-is * and returning to play; or will be treated - * like and , reseting the menu to its top and + * like and , 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; diff --git a/win/X11/winmesg.c b/win/X11/winmesg.c index 7cfc1af10..9f18e7323 100644 --- a/win/X11/winmesg.c +++ b/win/X11/winmesg.c @@ -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 diff --git a/win/X11/winmisc.c b/win/X11/winmisc.c index 5bc622e4a..33f790e04 100644 --- a/win/X11/winmisc.c +++ b/win/X11/winmisc.c @@ -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 . 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]) diff --git a/win/X11/wintext.c b/win/X11/wintext.c index 1891ce413..6f2f6f4ff 100644 --- a/win/X11/wintext.c +++ b/win/X11/wintext.c @@ -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. */ diff --git a/win/curses/Readme.txt b/win/curses/Readme.txt index cd07069f0..2cc207238 100644 --- a/win/curses/Readme.txt +++ b/win/curses/Readme.txt @@ -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! diff --git a/win/curses/Todo.txt b/win/curses/Todo.txt index e942a6fa0..552ddbf57 100644 --- a/win/curses/Todo.txt +++ b/win/curses/Todo.txt @@ -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. diff --git a/win/curses/cursdial.c b/win/curses/cursdial.c index e0f25aa12..e2ca1f265 100644 --- a/win/curses/cursdial.c +++ b/win/curses/cursdial.c @@ -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 diff --git a/win/curses/cursinit.c b/win/curses/cursinit.c index 28fe2fd15..40bf3f8cb 100644 --- a/win/curses/cursinit.c +++ b/win/curses/cursinit.c @@ -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) diff --git a/win/curses/cursmain.c b/win/curses/cursmain.c index 9a9fc3888..66a298d86 100644 --- a/win/curses/cursmain.c +++ b/win/curses/cursmain.c @@ -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); diff --git a/win/curses/cursstat.c b/win/curses/cursstat.c index 326512226..9a2e4bab3 100644 --- a/win/curses/cursstat.c +++ b/win/curses/cursstat.c @@ -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 */ diff --git a/win/curses/curswins.c b/win/curses/curswins.c index fb76dae93..8e4d03b39 100644 --- a/win/curses/curswins.c +++ b/win/curses/curswins.c @@ -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; diff --git a/win/share/monsters.txt b/win/share/monsters.txt index 0d3341f82..3c3dbefac 100644 --- a/win/share/monsters.txt +++ b/win/share/monsters.txt @@ -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) diff --git a/win/share/objects.txt b/win/share/objects.txt index 7ce7c8d80..1b3f3b556 100644 --- a/win/share/objects.txt +++ b/win/share/objects.txt @@ -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) diff --git a/win/share/other.txt b/win/share/other.txt index ae44ceda9..fb875b809 100644 --- a/win/share/other.txt +++ b/win/share/other.txt @@ -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) diff --git a/win/share/safeproc.c b/win/share/safeproc.c index 953da949a..3786fc0d4 100644 --- a/win/share/safeproc.c +++ b/win/share/safeproc.c @@ -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*/ diff --git a/win/share/tiletext.c b/win/share/tiletext.c index b5f7be700..b2e71caf6 100644 --- a/win/share/tiletext.c +++ b/win/share/tiletext.c @@ -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; } diff --git a/win/tty/termcap.c b/win/tty/termcap.c index a5ecb67e9..ad3b42313 100644 --- a/win/tty/termcap.c +++ b/win/tty/termcap.c @@ -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. */ diff --git a/win/tty/topl.c b/win/tty/topl.c index c1e93cd41..82965a6df 100644 --- a/win/tty/topl.c +++ b/win/tty/topl.c @@ -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; diff --git a/win/tty/wintty.c b/win/tty/wintty.c index 031a2a6ab..8813898b0 100644 --- a/win/tty/wintty.c +++ b/win/tty/wintty.c @@ -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] == ' ') { diff --git a/win/win32/NetHackW.c b/win/win32/NetHackW.c index a235ac992..3103f8045 100644 --- a/win/win32/NetHackW.c +++ b/win/win32/NetHackW.c @@ -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 */ diff --git a/win/win32/mhdlg.c b/win/win32/mhdlg.c index 6246b4362..491aa270d 100644 --- a/win/win32/mhdlg.c +++ b/win/win32/mhdlg.c @@ -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); diff --git a/win/win32/mhfont.c b/win/win32/mhfont.c index 638fac5aa..291acacbc 100644 --- a/win/win32/mhfont.c +++ b/win/win32/mhfont.c @@ -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) diff --git a/win/win32/mhmain.c b/win/win32/mhmain.c index 3d405e106..231d829a1 100644 --- a/win/win32/mhmain.c +++ b/win/win32/mhmain.c @@ -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) diff --git a/win/win32/mhmain.h b/win/win32/mhmain.h index e25bd5145..c4aea5ce2 100644 --- a/win/win32/mhmain.h +++ b/win/win32/mhmain.h @@ -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" diff --git a/win/win32/mhmap.c b/win/win32/mhmap.c index af19ee1b3..172301b86 100644 --- a/win/win32/mhmap.c +++ b/win/win32/mhmap.c @@ -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; diff --git a/win/win32/mhmenu.c b/win/win32/mhmenu.c index fe53bab0a..4ae34bbc8 100644 --- a/win/win32/mhmenu.c +++ b/win/win32/mhmenu.c @@ -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, diff --git a/win/win32/mhmsgwnd.c b/win/win32/mhmsgwnd.c index 7a2529267..6807be60a 100644 --- a/win/win32/mhmsgwnd.c +++ b/win/win32/mhmsgwnd.c @@ -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) diff --git a/win/win32/mhstatus.c b/win/win32/mhstatus.c index ab62b6c7a..d96992c93 100644 --- a/win/win32/mhstatus.c +++ b/win/win32/mhstatus.c @@ -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; diff --git a/win/win32/mhtext.c b/win/win32/mhtext.c index a2e8862ac..c51b50eb1 100644 --- a/win/win32/mhtext.c +++ b/win/win32/mhtext.c @@ -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) diff --git a/win/win32/mswproc.c b/win/win32/mswproc.c index 8a61e9751..e40c8a307 100644 --- a/win/win32/mswproc.c +++ b/win/win32/mswproc.c @@ -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