Commit Graph

15 Commits

Author SHA1 Message Date
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 934fe32436 textio: constify various internal
This maybe a little gratuitous (as I'm not convinced all changed lines
are being compiled)
2025-02-23 10:24:40 -05:00
Darryl L. Miles c92ded99df textio: constify various data 2025-02-23 10:24:40 -05:00
Darryl L. Miles 7e1692800b textio: contify various APIs 2025-02-23 10:24:40 -05:00
Darryl L. Miles 906e02c898 K&R textio/*.c: bulk forward reference function prototype conversion
K&R obsolete syntax removal for C23 compatibility series
2025-02-23 10:24:40 -05:00
Tim Edwards 1cec414618 Added the contents of the "readline" module back. This is
generally unused, as it is incompatible with the Tcl/Tk build of
magic.  However, I had not intended to remove it, only move the
name from "readline-4.3" to "readline".  But "readline/readline"
was in .gitignore, which caused the contents to be removed from
the repository.  This commit restores those files, and also
prevents the readline directory Makefile from making a symbolic
link called "readline" to itself, which was causing compile-time
issues.  The readline code is only kept for backwards compatibility
with ancient versions of magic not using the Tcl/Tk interpreter.
2025-01-10 09:58:57 -05:00
Darryl L. Miles efcf36f348 Remove superfluous parenthesis around regular type declarations 2025-01-04 11:31:17 -05:00
Darryl L. Miles 272dda3c84 TCL9: TxResetTerminal(bool force) added arguments
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.
2025-01-04 11:08:01 -05:00
Darryl L. Miles fb8f7b94aa LookupStructFull() constify call-site
txInput.c: LookupStructFull() constify call-site
DBlabel.c: LookupStructFull() constify call-site
2024-12-26 15:20:58 -05:00
Darryl L. Miles bfd818fbd3 textio/txInput.c non-void function does not return a value
This function is related to libreadline rl_pre_input_hook callback
which is invoked as (not making use of any function return value):

readline.c:    (*rl_pre_input_hook) ();

The general prototype for this function is:

rltypedefs.h:typedef int rl_hook_func_t PARAMS((void));

So the resolution is to provide a known value as the return value, which
resolves the concern.

SonarCloud
textio/txInput.c:550 non-void function does not return a value
https://sonarcloud.io/project/issues?open=AZJB17NwNGfDNup0Rj5G&id=dlmiles_magic
2024-10-01 12:36:13 -04:00
Johan Euphrosine 96eb275622 quick and dirty emscripten port 2023-07-12 00:31:37 +09:00
Alessandro De Laurenzis 68cecd5382 C99 code compat when configured with no TCL support 2022-10-29 06:07:46 +02:00
Brad Smith 662a041dba Make use of termios on OpenBSD 2022-09-02 23:52:34 -04:00
Tim Edwards 2af38a4191 Updates from running the fix-ending-whitespace script. 2020-05-23 17:13:14 -04:00
Tim Edwards 231a299b16 Initial commit at Tue Apr 25 08:41:48 EDT 2017 by tim on stravinsky 2017-04-25 08:41:48 -04:00