33 Commits

Author SHA1 Message Date
gottfriedleibniz d79382bbfe Run codespell on README, build, and source files. (#824)
* 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
2026-04-10 11:01:50 -07:00
Rhialto The M 8175ad07bc Fix UB when calling ctype functions. (#570)
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.
2023-06-12 11:43:50 -07:00
Fish (David B. Trout) 629d9a80b6 Crash on unexpected ("impossible") switch case
[skip travis]  (more commits coming...)
2021-10-01 19:22:48 -07:00
Fish (David B. Trout) ef86c24194 Fix skey handling part 4 of 6 (temporary breakage):
Start using new skey functions

[skip travis]
2021-08-01 08:32:29 -07:00
Fish (David B. Trout) 6952a34967 Copyright 2021 [skip travis] 2021-03-02 23:17:24 -08:00
Fish (David B. Trout) 0037fe2123 Hardware Loader message tweak
[skip travis]
2021-01-02 21:32:55 -08:00
Peter J. Jansen b7f11e002c Corrected Pull Request #337
The walking region/segment/page table fix had still
a few errors around variables "pages" and "tables".
2020-12-26 10:27:02 +01:00
Ivan Warren e35e174665 Refactor whenever possible snprintf(bfr,bfrsz,...) to MSGBUF(bfr,...) when the size is sizeof(bfr) 2020-12-13 16:56:09 +01:00
erik b4c7fee88a Walk region/segment/page tables in HW Load 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!
2020-12-06 12:09:42 -08:00
Fish (David B. Trout) 78b65f2167 EXTREMELY minor cosmetic (remove some blank lines, etc)
[skip travis]
2020-12-06 11:38:05 -08:00
Fish (David B. Trout) a95df9c6e1 Eliminate need for thread signaling in most other places 2019-04-06 23:15:52 -07:00
Fish (David B. Trout) 0ce6c4285d Replace LOGMSG with WRMSG 2019-04-06 13:09:31 -07:00
Fish (David B. Trout) 8b1353d454 (more misc cosmetic changes) 2019-04-06 11:55:12 -07:00
Fish (David B. Trout) 7bea8c8c62 Remove LONG obsoleted NLS support macro and fix code 2018-08-08 10:48:05 -07:00
Fish (David B. Trout) 588fe19bce (fwd ref) 2018-05-08 10:01:09 -07:00
Fish (David B. Trout) bed228f2f3 (be consistent) 2018-03-08 13:27:47 -08:00
Fish (David B. Trout) 2c44efc3b1 Add "Q Public License" banner to files that are missing it 2018-03-08 13:27:34 -08:00
Fish (David B. Trout) a22e26e108 Use capital (C) in Copyright message 2018-03-08 13:27:34 -08:00
Fish (David B. Trout) c80e60a2ce LARGE Cosmetic: many renames and added comments:
_ARCHMODE1/2/3    ==>  _ARCH_NUM_0/1/2
ARCH_370/390/900  ==>  ARCH_370/390/900_IDX
GEN_ARCHCOUNT     ==>  NUM_GEN_ARCHS
GEN_MAXARCH       ==>  NUM_INSTR_TAB_PTRS
zz_func           ==>  instr_func
2018-03-08 13:25:44 -08:00
Fish (David B. Trout) 76acfb981c Add 'nnn' bit number to facility bit related FEATURE defines 2018-03-08 13:25:22 -08:00
Fish (David B. Trout) aef707576b Use ISO/C99 printf/scanf format specifiers (part 2):
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.
2015-11-05 19:41:19 -08:00
Fish (David B. Trout) 75482f961d Revert to selective disabling of GCC diagnostics 2015-10-20 07:55:01 -07:00
Fish (David B. Trout) f2f776d433 Move ccfixme/ccnowarn tests to configure.ac where they belong:
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!
2015-10-19 08:35:35 -07:00
Fish (David B. Trout) 4c0205d6d8 Use DISABLE_GCC_WARNING macro for portability:
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.
2015-10-17 08:25:29 -07:00
John P. Hartmann 2591a758d4 Fix some more clang warnings. Rework atomics to test correctly. 2015-10-15 19:26:46 +02:00
Fish (David B. Trout) 298532d083 Eliminate some HIGHLY UNDESIRABLE platform specific tests:
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.
2014-10-27 07:11:34 -07:00
Enrico Sorichetti c396a57818 Fixed some (silenced others) clang warnings
more to analyze and fix for linux
2014-10-08 12:49:31 +02:00
Fish (David B. Trout) 71c2123a58 Fix some warnings 2013-09-13 22:18:13 -07:00
dasdman 04105a396f Cleanup warning messages for formatting U64 fields. 2013-08-30 12:34:13 -07:00
Fish (David B. Trout) adeff64969 savecore/loadcore/load_main tweaks:
savecore/loadcore: issue periodic progress messages
  load_main: greatly improve original poor performance
2013-07-11 17:13:25 -07:00
Fish (David B. Trout) 01bcccca8f Correct the signatures of created thread functions 2013-05-26 09:19:08 -07:00
Jan Jaeger da21d68934 Remove variable arrays which are not supported by all compilers in all circumstances 2012-04-30 15:40:20 +10:00
Jan Jaeger 78cf21849c Preliminary / experimental FCP DASD support 2012-04-29 21:13:28 +10:00