Commit Graph

60 Commits

Author SHA1 Message Date
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 3947facfa2 Remove trailing newlines 2025-12-18 22:58:24 +01: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
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
Chase b38c2b02a8 Remove detected -lcrypt flag 2022-08-06 11:31:50 -06:00
Chase edf4319548 Discontinue HPUX support 2022-07-23 17:49:33 -06:00
Peter Howkins 37e03a1820 libdtwidget: resolve uninitialized warnings 2021-12-24 10:50:27 -07:00
Jon Trulson 31774af2f2 library versioning: try to keep the versions at 2.1.0 for all platforms 2021-12-23 13:06:44 -07:00
Jon Trulson 17602b4d21 Library (.so) versioning: preserve previous library version
Ticket #120

Change libtool's shared library version info to 3:0:1 to preserve the
previous library version of 2.1.0.

See https://autotools.io/libtool/version.html for the details on how
libtool handles this versioning info.

See https://verbump.de/ for a handy 'version calculator' using
libtools rules.
2021-12-16 12:40:15 -07:00
Jon Trulson fd3be337fa lib/DtWidgets: fix implicit-function-declaration warnings 2021-11-12 15:05:56 -07:00
Jon Trulson 6d50de9448 DialogBox.c: fix ptr<->int conversion 2021-10-23 16:40:22 -06:00
Jon Trulson cc60fb8241 configure: remove freetype checks, we do not need freetype anymore 2021-07-08 16:35:51 -06:00
Jon Trulson ac8bd41373 Revert "Convert uses of XKeycodeToKeysym (deprecated) to XkbKeycodeToKeysym"
This reverts commit 15a2032626.

This is wrong - it is missing the proper include file, and the
new function takes 4 arguments not 3.
2021-07-04 13:00:51 -06:00
Jon Trulson 369b3e89d9 Begin removal of some Imakefiles, and other no longer useful cruft
This commit will not completely remove all Imake files, specifically
those for sections that have not been completed yet.

Also, the databases dir has been moved to databases-delete-later until
we have everything building and installed properly.
2021-07-03 18:23:40 -06:00
Lev Kujawski 356ac2f327 Purge unused Freetype dependency from CDE
config/cf/{DragonFly,OpenBSD,darwin}.cf: Remove Freetype imake settings
config/cf/darwinLib.tmpl: Do not link against Freetype
debian/control: Remove Freetype and Xft dependencies
*/Imakefile: Purge Freetype includes

lib/DtWidget/ComboBoxP.h
lib/DtWidget/SpinBoxP.h
programs/dtfile/ChangeDirP.c
programs/dtlogin/vgcallback.c
    Undefine USE_XFT so Motif 2.3 doesn't pull in Freetype

CDE included Freetype and Xft solely to satisfy builds of Motif with
Xft support enabled. However, as CDE only supports bitmap fonts, this
dependency was entirely superfluous and unnecessarily broke backwards
compatibility with older systems.
2021-06-02 19:56:26 -06:00
Lev Kujawski a6ea2a2d52 Centralize catgets() calls through MsgCat
CDE has relied upon catgets() implementations following a relaxed
interpretation of the XPG internationalization standard that ignored
-1, the standard error value returned by catopen, as the catalog
argument. However, this same behavior causes segmentation faults with
the musl C library.

This patch:

- Centralizes (with the exception of ToolTalk) all calls to catopen(),
  catgets(), and catclose() through MsgCat within the DtSvc library.
- Prevents calls to catgets() and catclose() that rely upon
  undefined behavior.
- Eliminates a number of bespoke catgets() wrappers, including multiple
  redundant caching implementations designed to work around a design
  peculiarity in HP/UX.
- Eases building CDE without XPG internationalization support by providing
  the appropriate macros.
2021-06-02 19:55:15 -06:00
Jon Trulson 5852c4742f Fix erroneous uses of ${prefix} rather than $(CDE_INSTALLATION_TOP)
Some Makefiles use prefix when they should be using
CDE_INSTALLATION_TOP.

Patch by Peter G.
2020-03-23 13:10:07 -06:00
Jon Trulson 11af2add7e Merge branch 'master' into autotools-conversion 2020-03-23 12:55:32 -06:00
Jon Trulson 15a2032626 Convert uses of XKeycodeToKeysym (deprecated) to XkbKeycodeToKeysym
patch supplied from Peter G.
2020-03-23 12:51:18 -06:00
Jon Trulson 7f4889f348 freetype: redo the way we detect and use
We (configure) relies on freetype-config existing and telling us what
the proper includes and libs are.
2020-01-05 18:11:52 -07:00
Jon Trulson 00dcd9c63d FreeBSD 12: get CDE to build and run
With this patch, CDE (autotools) builds and runs on fbsd 12 now.
fbsd11 should work too, but not yet tested.

You must use gmake - ie:

./configure MAKE=gmake
gmake

Seems all of the BSD's will need to use gmake for now.
2020-01-04 16:26:46 -07:00
Jon Trulson 1fc3284829 libtt, DtWidget: use new GENCPP 2019-10-30 19:48:04 -06:00
Jon Trulson 61ab4a5b95 DtWidget: make it build, change include/cppfile.inc a bit
cppfile.inc - don't set BUIT_SOURCES or CLEANFILES here as they
overwrite (or in case of the CLEANFILES +=...) ignore the settings.
Do those in the Makefile.am always.

We still need a better way to preprocess generic files.  cppfile.inc
will only work for one file per Makefile...
2019-10-26 15:05:52 -06:00
Jon Trulson 369308b737 The great includes migration of 2019 (autotools)
Ok - so one of the steps in building CDE is an early phase called the
includes phase (make includes).  At this point, all of the public
header files are exported to exports/include/Dt, DtI, ...

Then, the software is built using that include dir.

This of course does not work in autotools.  Much of the software does
things like #include <Dt/something.h>, so in order for the build to
succeed, this behavior must be represented/replicated in some way.

It seems the usual way of dealing with this is to place all public
headers (and in some projects, ALL headers) into a toplevel include
directory.

We now do this for all public headers - they have been moved from
wherever they were and placed in the appropriate spot in includes/

This will break the Imake 'make includes' phase unless the Imakefiles
are fixed (remove the HEADERS = stuff, and the incdir defines).  This
has not been done at this point since in reality, once autotools works
properly, there will be no need for the Imake stuff anymore, and I
intend to get rid of it.

This is just a warning for now - Imake builds in this tree will now
fail at the 'includes' stage.

This commit is only the migration.  In upcoming commits, libtt will be
fixed so that the hack being used before to get around this problem is
removed as there will no longer be any need.

And then the autotools work continues...
2019-10-25 17:01:34 -06:00
Jon Trulson 1d7ed3a17e autotools: many fixups, SUN->SOLARIS, typos, etc
This should allow an autoregen and ./confiure to work.  We only
generate Makefiles for lib/* and ./Makefile for now.  We'll ad more as
we go along.

Make still fails as we need to figure out TT - tirpc lib, rpcgen,
etc.  But it's a start!
2019-10-23 17:34:55 -06:00
Chase 91b0497ba0 lib/DtWidget: add automake file 2019-10-23 15:34:20 -06:00
chase dd68514e4f Remove hpversion.h from repository
This patch removes hpversion.h from the repository, this also untangles a
lot of ifdef mess. This closes bug CDExc19524.
2018-10-06 17:00:38 -06:00
Jon Trulson 3b1316112a DtWidget: remove register keyword 2018-06-27 21:58:04 -06:00
chase 6bf175ef2d Remove apollo support 2018-06-24 16:22:37 -06:00
chase 809c3d8bb6 Spelling fixes 2018-05-31 22:23:19 -06:00
chase 4f5e7fe5e3 Use POSIX macros for linux 2018-05-24 18:22:55 -06:00
chase 164e695cd0 remove OSF1 support 2018-05-24 14:25:26 -06:00
chase 0fa51f280f Use /var/spool instead of /usr/spool and /var/mail instead of /usr/mail 2018-05-20 12:30:32 -06:00
chase 07900bd93b Remove Unixware and openserver support 2018-05-20 12:13:07 -06:00
chase 8a4f389634 Remove UXPDS support 2018-05-15 20:27:22 -06:00
chase 3ccf3a8b86 Add missing license headers on *.hh files and others 2018-05-12 15:49:13 -06:00
chase 33d2749ea3 Last of the spelling fixed 2018-04-28 12:36:44 -06:00
chase 1fe5a550b2 Fix typo in license headers 2018-04-28 12:30:20 -06:00
Peter Howkins 73b6311a83 libDtWidget: Resolve some Coverity warnings 2018-03-31 00:15:05 +01:00
alx ae16363537 DtWidget: resolved some compiler warnings 2015-07-23 18:51:48 -06:00
alx c67763c82d DtWidget: added appropriate KeyPress event handler to DtIcon widget 2015-07-23 18:51:43 -06:00
Jon Trulson e18ac00c82 DtWidget: Coverity (memory corruption) 2014-12-26 14:10:01 -07:00
Peter Howkins 407aa2c4b7 libDtWidget: Resolve some static analyser warnings
prevent usage of potentially unitialised variables.
2014-12-23 20:05:01 +00:00
Ulrich Wilkens 29294e0373 Fix FreeBSD 10.1 build 2014-11-20 17:48:57 -07:00
Ulrich Wilkens 01d6c363fa OpenIndiana and Solaris port 2014-10-28 13:40:11 -06:00
alx f6adc98dd7 DtWidget: Don't free random pointer on Control widget destruction 2014-03-23 23:07:52 -06:00
Ulrich Wilkens 2712d5f787 NetBSD port 2014-02-22 19:12:19 -07:00
Eugene Doudine 4c56765da3 Fix for several segfaults in dtwm that happen with UTF-8 locale and were caused by unckeked XmeRenderTableGetDefaultFont return value 2014-02-22 19:07:52 -07:00
Ulrich Wilkens 2d08153289 correction of message files 2013-09-15 19:35:53 -06:00
Peter Howkins 37c30d32f7 lidtwidget: Resolve 74 -Wunused-variable warnings 2012-11-06 13:56:11 +00:00