Support gcc -Werror=format-security which is used by default on Fedora.
ext2spice/ext2spice.c: format not a string literal and no format arguments
extflat/EFargs.c: likewise
windows/windCmdNR.c: likewise
Looks to be used as integer bitmask which is flagged by compiler warning
as dubious, when using compiler provided type 'bool' from stdbool.h
in C99 instead of unsigned char type.
C29 bool type compatibility
The type is actually an enum (assumed to be int by default) but relies
on the magic typedef to (unsigned char) so we make this explicit and
better document what the real type is.
I guess in the past it was really a bool with only 2 states NONE|TEXT.
C29 bool type compatibility
Was looking to implement this feature and found it was already
implemented but is a secret feature.
Updated documentation and modified implementation so it is possible
a user can discover the feature via usage such as "quit -help -invalid"
like other commands.
FUN2CD() on a function pointer still raises -Wpedantic warning due to the
officially undefined behaviour as defined by C standards.
So added FUN2CD() and CD2FUN() to at least mark the call-sites to help
with identification and ignoring -Wpedantic based on the source file
context given in the compiler output.
Use of (void*) with pointer arithmetic warning removal.
But more so as it is in a macro (all be it local to file) which will
take on the form of the type passed as argument when the 'offset' looks
to be always be specified in bytes.
cb_heap_kill_t callback typedef created
Invoked from HeapKill()
No active callback implementation in the codebase.
callback interface (from hash.h):
marked @invoke call-site
the former code attempted to determine the precision and generate
an output without unnecessary trailing zeros. Unfortunately there
were counterexamples that fail to be formatted correctly, as found
by Mark Martin, and which generate output that has roundoff error.
Reimplemented the method using code found on StackOverflow, which
appears to solve the problem more robustly.
GHA obsoleted macos-12 so we move to macos-13 for Intel. Building with oldest
Intel image to provide feedback of continued expected support on that platform,
while ARM64 builds with latest to check the other end of their SDKs.
Lock the TCL version via brew to 8.6+ (currently the project is not expected to
build on TCL9 until other work is completed) so this is causing build failure.
Added additional diagnostics to show the location of executables/DSOs if they
got built from the tree.
Introduced GHA timeout clamping (MacOS default shell seems not to behave under
CI as well as Linux does, re signal/pipe handling)
'brew install tcl-tk@8' appears to append the @8 to the installed path such as
/usr/local/opt/tcl-tk@8 which configure needs to know. configure_mac updated
to detect this now TCL9 is the default version that maybe installed at the old
location. Then there is the issue of both TCL versions being installed
side-by-side on the same system causing more issues over selection.
There are 3 states for CLOSE_xxxxxx with 3 different values.
Issue introduced from 2f7f76bf9 merged since tag:8.3.509
This affected the scenarios using non-zero non-one values such as:
#define CLOSE_DONE 2
This looks the result of an original bug where the forward declaration
had a type mismatch with the real method, so the method implementation
prototype was taken as the correct one. The forward decl was rewritten
with the correct prototype signature.
Maybe this is the cause of CIF data once drawn into view does not always
seem to always erase after disabling and a redraw ?
This did not work as expected. Maybe that indicate this should have
a slighlt restructure so the tcl.h definition is always given a chance
to provide type.
Or maybe autoconf should detect the type and provide in config.h ?
This seems like it has 2 use cases.
Internal console management around reprinting command prompt, but many
modes of operation delegate the prompt processing to tkcon or readline.
Process termination to restore the termios.
In the TCL8 to TCL9 porting information it was indicated the
sentinal NULL termination should be cast (char *) with API
call Tcl_AppendResult().
This was already in place for most of the codebase this
resolves the last few places.
The Tcl_Exit() replacement proc takes charge of calling exit()
So this function can be easily migrated to libc atexit() which will
now run during exit() not just before. Which seems ok for the purpose
of restoring the termios state of the tty.
This solution seems compatible with TCL8 as well so all calls to this
removed API are removed.
Note this patch also removes the invalidation (of the callback so
the deefault use of Tcl_Exit() is restored) before returning from
this function. atexit() usage can not be invalidated after
registration but that can be controlled with application flag
checked inside the callback function if needed.
I have observed scenarios where I need to issue 'reset' manually
after exiting magic, still understanding better the build types
and scenarios that triggers this.