* Add new README.WebSocket.md to OTHER Visual Studio projects too!
(Again, this was MY fault for not mentioning them in my PR approval, NOT the fault of the PR's author.)
My bad! I missed these in my final Review/Approval of PR #840:
1. Add new README.WebSocket.md to VS2008 .vcproj
2. Fix Contents links in new README (links must be lowercase)
3. Add link to new README to Primary README's "Features and Operation" section
This was MY fault (for not mentioning them in my review)), NOT the fault of the PR's author.
* Add WebSocket console transport (WSCNSLPORT) alongside the existing telnet console
* Added documentation and fix for vs2008
* Added IronTerm as a webterminal reference
* Fix MOD_RULES2.msvc to include wscnsl
Some browsers e.g. Safari on iphone, convert text entered into smart text [ case changed, spell check, left and right quotes, etc.] . Stop this happening and pass what the user typed in ASCII to Hercules.
* Add new httml files to dist_pkgdata_DATA
* Add new html files to distribution package data
* Update System Log link to point to console.html
* Refactor fishgui.html with modern JavaScript
* Update frameset structure in hercules.html
* Add new console html handlers
syslog provides scrolling log viewer.
cmd handles keyboard input and help screen - USE ALT-H for Help.
console replaces the old frames and decouples cmd entry and log handling.
* Remove HTML_EXPIRE_SECS definition and add mod_time
Enabler for fixing browser caching pages even when changed.
* Modify http_timestring for GMT and add headers
Updated http_timestring to use gmtime for HTTP compliance and added Last-Modified header in response.
This changes allows the browser to refresh the page only if it has changed on the server
* refactor: cleanup va_start/va_end
- Missing va_end statements;
- Incorrect va_copy ordering in BFR_VSNPRINTF;
- Sanitize snprintf results or ensure buffer is initially \0'd.
* refactor: introduce vasprintf
Replace dynamic format string allocation (i.e., incrementing a buffer by
a fixed amount until vsnprintf returns success) with vasprintf.
Polyfill'ing for builds that do not include the GNU extension.
Address issue whereby commands submitted via the cgi-bin/tasks/cmd route were duplicated in the log.
Ensure on the JSON api that if using "index" all available newly added lines are returned (subtle interaction with msgbuf cookie if set!)
Removed hard coded link to syslog in IPL (user can just click on System Log in the "tasks" panel.
* Address miscellaneous compiler warnings
This commit looks through all compiler warnings generated by clang and
MSVC (including Windows ARM64) and picks the low hanging fruit.
Compiling (clang version 20.1.8) with added flags:
-Wno-incompatible-pointer-types
-Wno-pointer-sign
-Wno-unused-but-set-variable
-Wno-unused-local-typedef
Changes:
bootstrap.c: warning : format specifies type 'unsigned int' but the argument has type 'DWORD' (aka 'unsigned long')
ctc: warning : unused variable 'saw_if'
dyn76.c: warning : variable 'R4' is used uninitialized whenever 'if' condition is false
getopt.c: warning : a function definition without a prototype is deprecated in all versions of C and is not supported in C23
hdl.c: warning : unused parameter 'flag' [-Wunused-parameter]
msgenu.h: ... an invalid preprocessing token [-Winvalid-token-paste]
tt32api.h: warning : non-portable path to file 'tt32if.h'; specified path differs in case from file name on disk
vstore.h: warning : absolute value function 'labs' given an argument of type '__ptrdiff_t' (aka 'long long') but has parameter of type 'long' which may cause truncation of value
zvector2.c: remove '_USE_128_' define that was moved to zvector.h
---
Compiling (cl.exe version 19.50.35725) with added flags:
/W4 /wd4323 /wd4152 /wd4703 /wd4201
Changes:
warning C4245: 'function': conversion from 'int' to 'BYTE', signed/unsigned mismatch (compiling source file control.c)
warning C4389: '!=': signed/unsigned mismatch (compiling source file control.c)
warning C4100: 'secs': unreferenced parameter (compiling source file netsupp.c)
warning C4100: 'iFlags': unreferenced parameter (compiling source file tuntap.c)
---
Compiling (gcc (Ubuntu 15.2.0-4ubuntu4) 15.2.0):
Compiling (gcc (GCC) 16.0.1 20260305 (Red Hat 16.0.1-0)):
Wunterminated-string-initialization was introduced in GCC-15. An
alternate solution would be to use: __attribute__((nonstring))
Changes:
loadmem.c:102:32: warning: initializer-string for array of ‘char’ truncates NUL terminator but destination lacks ‘nonstring’ attribute (9 chars into 8 available) [-Wunterminated-string-initialization]
---
Compiling (clang version 22.1.1 (Fedora 22.1.1-2.fc44))
Compiling (gcc (GCC) 16.0.1 20260305 (Red Hat 16.0.1-0))
Changes:
cgibin.c:1662:1: warning: ‘/*’ within comment [-Wcomment]
dasdcat.c:463:13: warning: variable ‘trks’ set but not used [-Wunused-but-set-variable=]
dasdpdsu.c:172:13: warning: variable ‘trks’ set but not used [-Wunused-but-set-variable=]
hscutl.c:1325:15: warning: initialization discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
hscutl.c:1326:15: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
msgenu.h:222:33: warning: ‘off_size’ may be used uninitialized [-Wmaybe-uninitialized] (after fixing above)
transact.c:230:13: warning: variable ‘effective_addr2’ set but not used [-Wunused-but-set-variable=]
transact.c:708:9: warning: variable ‘effective_addr1’ set but not used [-Wunused-but-set-variable=]
* VS2013: fix compile error
C99 Compliant floating-point classification macros were introduced in
VS2013; see: https://devblogs.microsoft.com/cppblog/c99-library-support-in-visual-studio-2013/
* w32stape.c: CAS multi-threaded initialization
Use Compare-and-Swap in initialization functions that may be called from
multiple threads.
* opcode.h: avoid declaring ops w/ dynamic instructions
Allows modification of the storage class specifier and attributes of
undefined instructions (UNDEF_INST).
* ctc_lcs.c: ensure pszTUNDevice is free'd
'pszTUNDevice = strdup( DEF_NETDEV );' is definitely lost.
pszOATFilename check included to follow convention.
* cckddasd.c: ensure dasdsfn is free'd
1. ckd_dasd_init_handler invokes cckd_sf_parse_sfn
2. ckd_dasd_init_handler invokes ckd64_dasd_init_handler
3. ckd64_dasd_init_handler invokes cckd_sf_parse_sfn
Leaving previous dasdsfn dangling. Given how 'dasdsfn' is managed (e.g.,
in attach_device and dasd_close_device), it may be more elegant to
compare the previous dasdsfn to the current pathname and throwing a
warning if they are different.
* config.c: ensure prev_buf is free'd
* panel.c: zero prev_psw
To avoid instances of memcmp'ing random stack data with curr_psw.
* control.c: zero newregs tlb
ARCH_DEP( maddr_l ) may reference tlb.asb and tlb.common - ensure
newregs in program_return does not reference garbage stack data.
* cckddasd64.c: zero L2_pad
To avoid feeding random stack data to syscalls later on (e.g., write in
cckd64_write).
* panel.c: ensure messages are null delimited
Uses of string.h functions and regexec assume the string is null
delimited. This may not be true with some _PANMSG msg uses.
* ecpsvm.c: ensure buffer is null delimited
* refactor: CPU_BITMAP formatting
When CPU_BITMAP is __uint128_t and F_CPU_BITMAP is '"%16.16"PRIX64',
random/clobbered stack data will be referenced in the associated libc
formatting routines used by fwritemsg due to the different stack
alignment requirements of the variadic arguments.
* refactor: reorganize history_init
panel_command may be invoked (e.g., 'LPARNUM BASIC') prior to the panel
display thread being initialized. This can lead to history_add being
invoked prior to history_init (causing dangling pointers).
* cckddasd64: zero the entire free block to avoid writing garbage to underlying file
Per MemorySanitizer
* w32util.c: set_thread_name buffer overflow
Ensures correct nNumberOfArguments argument on x64. Updated the struct
definition to match the Microsoft documentation:
https://learn.microsoft.com/en-us/visualstudio/debugger/tips-for-debugging-threads
SetThreadDescription was introduced in Windows 10 version 1607, so
Kernel32.dll could technically be probed to see if that export exists.
* 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