Commit Graph

2310 Commits

Author SHA1 Message Date
Darryl L. Miles 0badf814c5 extraction: constify struct devMerge.next, devMergeList
Feel free to undo variables as necessary in the future as requirements change.
2025-07-27 12:49:54 -04:00
Darryl L. Miles 49115d7d06 ext2sim: gratuitous constification of localvars, struct members, prototypes
Feel free to undo variables as necessary in the future as requirements change.
2025-07-27 12:49:54 -04:00
Darryl L. Miles 7c3df3ce22 ext2sim.c: (ClientData) cast use PTR2CD() 2025-07-27 12:49:54 -04:00
Darryl L. Miles 6a0dc54af8 ext2sim.c: constify whatever the compiler let me 2025-07-27 12:49:54 -04:00
Darryl L. Miles 82a57f8714 ext2sim.c: constify string globals 2025-07-27 12:49:54 -04:00
Darryl L. Miles dc2de91668 finds.c: constify file 2025-07-27 12:49:54 -04:00
Darryl L. Miles 260e08f160 sim2simp.c: constify file 2025-07-27 12:49:54 -04:00
Darryl L. Miles 20d72e9eb2 ext2sim: constify APIs and local vars 2025-07-27 12:49:54 -04:00
Darryl L. Miles a7dd64b242 ext2sim: use strict callback prototypes 2025-07-27 12:49:54 -04:00
Darryl L. Miles 1f9ce81154 ext2sim: Makefile target for: finds sim2simp
Not a serious attempt to make these work but they appear to compile
so this helps CI to cover as much code as possible.

ext2sim_main standalone does not link (probably due to unclean cross
module dependencies that now exist due to libutil.a being a heap where
anything with no modular home ends up)
2025-07-27 12:49:54 -04:00
Darryl L. Miles 975411f40b ext2sim.c: forward declaration prototypes 2025-07-27 12:49:54 -04:00
Darryl L. Miles 4b855fef13 ext2sim: use 'const' with 'rcsid' 2025-07-27 12:49:54 -04:00
Darryl L. Miles 2f2fd85af0 ext2sim: fixup prototypes for TxError() MainExit()
Correct return and argument types.
Use of <stdarg.h> with modern compiler.
2025-07-27 12:49:54 -04:00
Darryl L. Miles bb6e55efb1 ext2sim: Ensure main() have return type and arguments 2025-07-27 12:49:54 -04:00
Darryl L. Miles 22e8ab847c K&R ext2sim/*.c: bulk function implementation conversion
K&R obsolete syntax removal for C23 compatibility series
2025-07-27 12:49:54 -04:00
Darryl L. Miles cef9e0bede ext2sim: Remove non-existent function fwd-decl
int _ext2sim_start();
2025-07-27 12:49:54 -04:00
Darryl L. Miles 27a91ee5a3 net2ir: use 'const' with 'rcsid' 2025-07-27 12:47:15 -04:00
Darryl L. Miles b6ec131355 K&R net2ir/** 2025-07-27 12:47:15 -04:00
Darryl L. Miles 105f8a728d K&R magic/** 2025-07-27 12:46:38 -04:00
Darryl L. Miles 0b29b1cc12 fix GrTextSizePtr API interface return type consistency
commit 86b5d591d from 20241004 by me, modified return type of
GrTextSize API in the graphics from 'void' to 'int' to convey
and error scenario to indicate when 'r' was not filled in for
the caller, but this is a multi graphics driver API interface
so requires all downstream graphics engines to also support
the return type change.

This API can error and indicates when 'Rect *r' was
successfully updated.
2025-07-27 12:45:51 -04:00
Darryl L. Miles 2173d03b14 netlist.c: whitespace only cleanup 2025-07-27 12:44:42 -04:00
Darryl L. Miles d7935930ad F42: fix for etext symbol glibc 2.29+
The man page end(3) changed as well over time to support the new definition.

This was revised from 2.41+ to 2.29+ as it seems top relate to a mix of
Kernel / Glibc / Compiler and the new defintion probably works on any
older system.
2025-07-27 12:44:42 -04:00
Darryl L. Miles 3fd0798312 CalmaRdpt.c: -Wall -O3 savedef used uninitialized
GCC11 -Wall -Wpedantic -O3
2025-07-27 12:43:59 -04:00
Darryl L. Miles 5d8cfdc760 CalmaRdpt.c: -Wall -O3 snprintf("polygon%5d")
Finds this a problem still.

GCC11 -Wall -Wpedantic -O3
2025-07-27 12:43:59 -04:00
Darryl L. Miles 046401cbd8 Use HAVE_SYS_TIME_H and TIME_WITH_SYS_TIME from autoconf where possible 2025-07-27 12:43:04 -04:00
Darryl L. Miles 957904a389 configure: autoconf regen (2.69) AC_HEADER_TIME 2025-07-27 12:43:04 -04:00
Darryl L. Miles c695980145 configure.in: Add AC_HEADER_TIME 2025-07-27 12:43:04 -04:00
Darryl L. Miles df0623a435 include <unistd.h> where necessary in files using API calls
When global <sys/mman.h> was removed from tile.h it also removed
<unistd.h> nearby.  This exposes the lack of <unistd.h> being
included where needed using APIs like close()/read()/unlink()/isatty()
the WASM build seems to show this as the header file set is structured
differently.
2025-07-27 12:42:05 -04:00
Darryl L. Miles 4023ed9da0 tiles: Remove TiJoinFree() now that TiJoin[XY]1() exists and all use-cases utilize 2025-07-27 12:42:05 -04:00
Darryl L. Miles fd50bc1f4d TiJoin[XY]1 API introduction at all call sites 2025-07-27 12:42:05 -04:00
Darryl L. Miles 489f4fe057 tile.h: move #include <sys/mman.h> into tile.c
tile.h is included by a large part of the project, but the definitions
in sys/mman.h are only needed by the implementation code inside tile.c
so this reduces project wide include dependencies.
2025-07-27 12:42:05 -04:00
Darryl L. Miles f8ef715608 tiles: Make TiFree() easier to inline for compiler
Removal of unnecessary function call indirection into TileStoreFree()
since TiFree() is has multiple implementation already and we can
customize TiFree() directly as required.

Move the function definitions into the tile.h to they are visible to
compiler during code generation to consider inline potential.

This has made global 'Tile *TileStoreFreeList' more visible.
2025-07-27 12:42:05 -04:00
Darryl L. Miles db8e790aea TiJoin[XY]1() API introduction 2025-07-27 12:42:05 -04:00
Darryl L. Miles a6fd0ed320 DBtiles.c: DBFreePaintPlane() remove the TiFree() deferred assumption
The comment indicates the expectation that TiFree() is deferred-by-one,
which would be true if freeMalloc() was used but since the custom mmap()
allocator technically this is not true.

The TiFree() allocator is single-threaded and separate from libc so the
assumption is still kind of true but for different reasons
(single-threaded).

But since it doesn't really cost anything (other than a few lines of
code a human needs to read) the compiler would be expected to perform a
load (which it was going to do anyway) into a caller-saves register over
the function call.
Most of the other function state is invalidated anyway due to the heavy
linked-list navigation and low number of local variables, I would not
think there is much register allocation pressure.

TODO this code can be tested by confirming zero allocations are active
and by invalidating (poison) all fields inside TiFree().
2025-07-27 12:42:05 -04:00
Darryl L. Miles 15e5b36f52 tile.h: TiFreeIf/TiFree1() API 2025-07-27 12:42:05 -04:00
Darryl L. Miles 1eb2231bbf configure: autoconf regen (2.69) AC_C_INLINE AC_C_RESTRICT 2025-07-27 12:42:05 -04:00
Darryl L. Miles 52d3feac73 configure.in: AC_C_INLINE AC_C_RESTRICT 2025-07-27 12:42:05 -04:00
R. Timothy Edwards d4f487266f Updating the version number to go along with the merge of a bunch
of pull requests (about half of those pending) from Darryl Miles.
2025-07-26 20:54:46 -04:00
Darryl L. Miles c534eb318d magic/main.c: add missing ifdef SCHEME_INTERPRETER 2025-07-26 17:48:31 -04:00
Darryl L. Miles cc57510019 textio/txCommands.c: add missing ifdef SCHEME_INTERPRETER 2025-07-26 17:48:31 -04:00
Darryl L. Miles bcc9852cba configuration: #ifdef LEF_MODULE
Enclosed symbols only seem available with when this ifdef.
2025-07-26 17:48:31 -04:00
Darryl L. Miles bfefc7196e configuration: #ifdef CIF_MODULE
Enclosed symbols only seem available with when this ifdef.
2025-07-26 17:48:31 -04:00
Darryl L. Miles 22c074537d configuration: #ifdef ROUTE_MODULE
Enclosed symbols only seem available with when this ifdef.
2025-07-26 17:48:31 -04:00
Darryl L. Miles 534a56376a DBcellsrch.c: #ifdef ROUTE_MODULE around hook to update MZAttachHintPlanes()
When building without this module MZInit() does not get called and
MZAttachHintPlanes() does not guard against that situation.

To allow unused code to be pruned from final binary, better to remove
the cross module hook breaking the dependency.
2025-07-26 17:48:31 -04:00
Darryl L. Miles 142b7e5a78 tclmagic.c: memleak Tcl ref counting over Eval memory leak
API docs indicate the original usage seems ok.
Calling Tcl_GetIndexFromObj() is allowed with a refcount == 0.
But in actual usage it leaks the Tcl_NewStringObj() memory across the
Tcl_EvalObjv() call like the object accounting system doesn't work on
that anymore (because the use of Tcl_EvalObjv() disrupted things).

Looking at the code nearby it increments refs (for all recently created
objs) and decrements around Tcl_EvalEx() for the actual data the 'eval'
needs pinned and is working on.

If we just repeat this same pattern but with 'objv0' the memory leak is
gone.  The decrement must wake it up / make it remember what to do.
So this required covering all the exit paths to decrement as well.
2025-07-26 17:46:59 -04:00
Darryl L. Miles 7029971c33 configure: autoconf regen (2.69) AC_HEADER_STDBOOL 2025-07-26 17:44:45 -04:00
Darryl L. Miles bfbdf45b88 C23: use AC_HEADER_STDBOOL #include <stdbool.h> 2025-07-26 17:44:45 -04:00
Darryl L. Miles 35d455fd72 C23: CmdSubrs.c fixup deprecated isascii() 2025-07-26 17:44:45 -04:00
Darryl L. Miles 9e181f0d2e rtrTravers.c: missing const
This is to remove the constness warning.
2025-07-26 17:38:19 -04:00
Darryl L. Miles a53f71d5c6 GHA: appimage10: Add support for EL10 2025-07-26 17:29:19 -04:00