Commit Graph

633 Commits

Author SHA1 Message Date
Peter Howkins dd3fd3ddf8 lib/tt/mini_isam: Update to use strict prototypes, required for C23/GCC 15 etc 2025-12-23 17:34:45 +00:00
Chase 2081389353 il: remove ilxpm(P).h 2025-12-20 12:44:32 -07:00
Chase 36b6f82ee8 ttce2xdr: use autoconf substitutions 2025-12-20 12:32:46 -07:00
Patrick Georgi 7ab683d29a handle missing return values 2025-12-18 22:58:26 +01:00
Patrick Georgi 1b852f19a5 Remove uses of prototype argument hiding macros
Modern compilers don't use accept them, they _want_ complete prototypes.
2025-12-18 22:58:26 +01:00
Patrick Georgi 1a524cb93a lib/tt: Align types
int, long, and Recno are close enough but newer compilers became more
strict about nominal vs structural compatibility.
2025-12-18 22:58:26 +01:00
Patrick Georgi acdee57318 Fix issues with va_lists
Identified by clangsa.
2025-12-18 22:58:26 +01:00
Patrick Georgi aced075a9f lib/DtSvc: Free memory more soundly
It _probably_ works to just pass free(ptr) another two arguments, but
compilers don't like this kind of sloppiness anymore.
The call site only expects this function to free the first value,
ignoring the other two, so model that in the local wrapper function.
2025-12-18 22:58:26 +01:00
Patrick Georgi ae001c320f fix misleading indentation
Mostly to shut up the compiler, but some real bugs hidden in there.
2025-12-18 22:58:26 +01:00
Patrick Georgi dca08bc5c2 terminate warning string 2025-12-18 22:58:26 +01:00
Patrick Georgi b86eff35f0 Fix memory leaks 2025-12-18 22:58:26 +01:00
Patrick Georgi 01b9288a2b Remove FAR declarations 2025-12-18 22:58:26 +01:00
Patrick Georgi ccbf6a8f8f lib/tt: pass int by ref 2025-12-18 22:58:26 +01:00
Patrick Georgi c0ad5170c9 Avoid "bool" variable name
C23 has a type of that name.
2025-12-18 22:58:26 +01:00
Patrick Georgi 4d41663c58 Avoid conflict with X11 headers 2025-12-18 22:58:25 +01:00
Patrick Georgi 3947facfa2 Remove trailing newlines 2025-12-18 22:58:24 +01:00
Chase 44a8e2bb4f poll.h: fix ordering 2025-12-14 13:28:17 -07:00
Chase e64189f19d Feature test for poll.h 2025-12-14 13:27:55 -07:00
Jon Trulson 76b99355ce fix: t_optmgmt: Incorrect options format
From a diff file provided by Mariusz Zynel:

    Every time, every dt program gives that error on its
    start. t_optmgmt() is called once in _tt_tli_set_nodelay(), as the
    name says, to set TCP_NODELAY option for ToolTalk connections.
2025-11-15 13:09:49 -07:00
Myrrh Periwinkle 9f0f015c4d libDtWidget: Do not mix wide and narrow operations on the same stream
The current behavior is not standards conformant, and will cause the
format operation to result in empty text as glibc fails any calls to
getwc against a narrow stream with WEOF. Additionally, narrow write
operations against a wide stream appears to bypass the buffer, causing
incorrect formatting results.

Fix this by changing all write operations against the reformatted output
file stream to be wide operations, and reopening the temporary input
file before performing any wide read operations.
2025-06-13 18:16:32 +07:00
b'Jon Trulson bb0a127a84 Merge /u/runlevel5/cde/ branch print-help-gcc15 into master
https://sourceforge.net/p/cdesktopenv/code/merge-requests/75/
2025-04-16 18:35:44 +00:00
Trung Lê 37aaaf424e tt/mini_isam: explicitly declare compfunc parameters
qsort() needs compfunc(const void *, const void *) instead of (char *, char *)
2025-04-16 00:01:20 +10:00
Trung Lê 509c722936 tt/ttauth: Update print_help()
Ensure callers use 2 parameters for the call
2025-04-01 10:06:56 +11:00
hyousatsu 121510cb72 DtMmdb: fix a crash occurs when creating bookmark. 2024-07-21 00:43:27 +00:00
hyousatsu f0123efa84 Fix some warnings. 2024-07-21 00:43:27 +00:00
hyousatsu c79224b367 DtMmdb: replace ostring with std::string. 2024-07-16 09:05:46 +00:00
hyousatsu c7ade43d86 DtMmdb: replace Berkeley DB with LMDB. 2024-07-16 09:05:38 +00:00
Paul Ward 8479874104 dtterm: Fix title and icon Sun esc seqs 2024-03-02 12:29:50 -07:00
Patrick Georgi d8a43c0b49 DtTerm/TermPrim: check pointer before traversing 2024-01-05 18:44:19 -07:00
Patrick Georgi c48ec3adff lib/DtTerm: Remove dead assignments, initializations and increments
This shouldn't change behavior (or even object code) at all because
those assignments are all without effect. Removing that code removes
noise which helps working with code analysis tools.
2024-01-05 18:44:19 -07:00
Patrick Georgi a5b5eb0f80 lib/DtTerm: Fix copy&paste error
This avoids using an uninitialized variable by using the initialized
variable that is obviously the right one in the context.
2024-01-05 18:44:19 -07:00
Patrick Georgi e2aa3e665b DtTerm/TermPrimUtil: Use mkstemp instead of mktemp 2024-01-03 22:51:58 +01:00
Patrick Georgi 9dca44513c DtTerm/TermPrimUtil: Use 6 'X's in mktemp template
Some implementations (e.g. glibc) require that, while implementations
that are fine with 5 of them still work the same (just with one more
constant letter)
2024-01-03 22:51:50 +01:00
hyousatsu b577546819 tt: make the ttserver process events properly. 2023-06-12 09:48:42 +00:00
hyousatsu 760d36bfe9 dtlogin: use sessreg to manage utmp/wtmp. 2023-03-27 08:48:27 +00:00
Jon Trulson 1f101d22f0 lib/DtHelp: strmove(): return memmove() result 2023-02-18 15:50:28 -07:00
Cy Schubert 8a24d70d5e Fix build under LLVM15
Fix many -Wint-conversion errors such as the example below, including
an aso atomics error.

connect.c:87:12: error: incompatible pointer to integer conversion initializing 'LONG' (aka 'int') with an expression of type 'void *' [-Wint-conversion]
   DB_ADDR mdba = NULL;   /* db address of current member record */
           ^      ~~~~
2023-02-18 14:47:38 -07:00
hyousatsu d500c61527 DtTerm: fix a segfault by allocating a string dynamically. 2023-01-12 15:07:20 +00:00
Jon Trulson f0494103c3 Delete all unused/obsolete .elist files
These (export lists) aren't needed on modern compilers and haven't
been for quite awhile (like 2+ decades).
2022-08-06 17:59:05 -06:00
Jon Trulson 2d0c4d6d39 Kill off OSMAJORVERSION and OSMINORVERSION defines/cpp flags
This has meant very little for a long time as configure.ac just
hardcoded these values depending on the current OS versions at the
time.

The only place where this is really 'needed' is XlationSvc.c in DtSvc
so that differences between locale specifications on various versions
of an OS can be accounted for. So for now, we just define those when
building DtSvc.

We could probably safely remove them as well with an update to the
Xlate locale DB to remove ancient cruft we don't care about anymore.

For various other modules, like dtlogin, dtsession, etc we just use
the code that was already being used due to the hardcoded values we've
had for the last 10-ish years.
2022-08-06 17:57:44 -06:00
Jon Trulson 37367d5e12 libtt: remove OPT_LOCAL_MOUNT_TYPE, OS_VERSION - never used anywhere
OS_VERSION was used with a '#if defined(sun)', but since it was never
set anywhere it just omitted that block.  If the block turns up to be
broken on sun systems, then someone will fix it properly.
2022-08-06 17:57:44 -06:00
Chase 45cee195bd Generify source code
Previously we would fail in some parts of the code if we did not have a
premade configuration, now we use any code that was marked as Linux, BSD and
Solaris as our basis in order to support building unknown Unix systems.
2022-08-06 11:31:51 -06:00
Chase 06863e826e lib/DtTerm/TermPrim: clean up defines 2022-08-06 11:31:50 -06:00
Chase b38c2b02a8 Remove detected -lcrypt flag 2022-08-06 11:31:50 -06:00
Chase 60e60b9836 configure: detect libm 2022-07-31 18:33:49 -06:00
Chase 9a9d586e87 configure: detect libdl 2022-07-31 18:33:49 -06:00
Chase edf4319548 Discontinue HPUX support 2022-07-23 17:49:33 -06:00
Peter Howkins 1f5ec7f034 Allow the window manager to handle centered, fit and fill backdrops 2022-07-06 17:00:49 -06:00
Liang Chang c3b1d645a9 DtUtil1: fix a pointer casting issue. 2022-04-15 13:33:24 -04:00
Liang Chang 1adb29e6a7 tt: remove an unnecessary macro definition. 2022-03-25 16:02:53 -06:00