* chore: run codespell on source/header files
Fixes most reported typos discovered by codespell (while trying to be
unopinionated about American vs. British English).
* chore: run codespell on build/readme files
Compiling Hercules with gcc 10 produces many warnings like this one:
```
CC hao.lo
In file included from /usr/include/ctype.h:97,
from hstdinc.h:117,
from hao.c:17:
hao.c: In function 'hao_message':
hao.c:812:37: warning: array subscript has type 'char' [-Wchar-subscripts]
812 | if (isdigit(p[2]))
| ^
```
Gcc should really present these as compile time errors, since each and every
one represents a potential case of Undefined Behaviour.
I changed (almost) all of these calls, except a few where the parameter was an
int that just came from a getc()-type function.
Function 'hwl_loadfile' in scescsi.c fixed to load requested file by properly walking the Region and/or Segment and Page tables. Closes GitHub Issue #185 and Pull Request #337.
Note: overall fix was developed by Erik, but the logic is actually Fish's, so blame Fish if any problems are discovered! I've committed the fix under his name (with his permission) so that he gets overal credit for the fix since it was his hard work that determined what the problem was and how it should be fixed. Thank you, Erik!
Previous commit (9daf9f4426) should have been labeled "part 1". This commit is part 2 which completes the transition.
NOTE: this commit also fixes "xpndsize_cmd" incorrectly coded with an ARCH_DEP variable type (RADR) which is a huge no-no in a non-ARCH_DEP module.
1. Ideally we should not ever be testing for specific compiler versions:
> The Autoconf approach is to test for features, not
> to test for compiler version and then infer features
> from the version. If you need webbed feet, then test
> for webbed feet; don't ask "Are you a duck?”.
2. Remove redundant DISABLE_GCC_WARNING statements as warning should already have been disabled by ccnowarn.h header.
REMINDER: remember to do autogen && configure again since configure.ac was updated!
Always use our existing DISABLE_GCC_WARNING (or DISABLE_MSVC_WARNING, etc) macros to disable a compiler warning since #pragma statements are compiler-specific and thus other platform compilers will barf on the other's #pragma statement.
Those of you who have added platform specific tests to Hercules (e.g. #if __APPLE__, #if __SOLARIS__, #if __FreeBSD, etc) PLEASE STOP DOING THAT! Design a configure.ac test for the needed feature or functionality instead (or add the platform specific test to ONLY hostopts.h) and then #define your own HAVE_FEATURE_ABCXYZ and use that instead.
Refer to the "_TODO.txt" document for more information and the reason why this is important.