Commit Graph

81 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
hyousatsu f0123efa84 Fix some warnings. 2024-07-21 00:43:27 +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 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
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 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 fa4fe1fb47 libdtterm: Resolve uninitialized warnings 2021-12-24 10:50:28 -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 e10d06f210 configure/Makefiles: add checks for Xmu, Xext, and Xdmcp
We also remove sun pro specific options, and do some general cleanup
as well as remove hardcoded library refs like -lXm, -lXext, etc...
2021-12-21 16:42:22 -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
Liang Chang b816b85575 DtTerm: enable post-process output. 2021-12-03 22:10:57 +09:00
Jon Trulson 5223d0408e lib/DtTerm: fix implicit-function-declaration warnings 2021-11-12 16:14:18 -07:00
OBATA Akio 16fe76ed65 Fix to include system header files for using functions 2021-10-08 14:40:56 +09:00
Jon Trulson 2730367844 utempter: complete the implementation
Liang Chang added utempter support to the dtterm widget in
pre-autoconf CDE.  While the code itself was merged, it was still not
"turned on" for autoconf builds.

This commit completes the implementation allowing dtterm on Linux and
the BSDs to be installed without having to be setuid root -- as long
as the libutempter headers and libraries are installed.
2021-07-04 16:45:57 -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
Liang Chang ba1c6bf810 DtTerm: Add libutempter support for utmp/wtmp updates. 2021-06-02 19:56:30 -06:00
Liang Chang 82d4a8bb68 DtTerm: Add pts driver support. 2021-06-02 19:56:30 -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 248c75515e libDtTerm: fixes to build in autotools branch for freebsd 2021-06-01 18:23:46 -06:00
Jon Trulson c3d7858424 DtTerm: make it build 2019-10-26 16:34:29 -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 eb907bd68c lib/DtTerm: add automake files 2019-10-23 15:34:20 -06:00
Jon Trulson ad94f2089d dtterm: add scroll wheel support
This patch was manually added via a diff supplied from a user on the
CDE mailing list: Michele Ghisolfo <ghisolfo.m@gmail.com>
2019-10-14 14:08:43 -06:00
wmoxam 923951b414 Remove NOTDONE code 2019-10-14 11:57:41 -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
chase 90a2b2848a remove ultrix support 2018-09-30 17:27:04 -06:00
Jon Trulson b5a3c00671 DtTerm/util: remove register keyword 2018-06-27 21:58:04 -06:00
Peter Howkins 6b09b19351 libDtTerm: Change to ANSI function definition 2018-06-28 04:01:19 +01:00
Jon Trulson c1bef9e8d6 libDtTerm: Fix for a coredump seen on OpenBSD 2018-06-13 13:27:46 -06:00
chase 809c3d8bb6 Spelling fixes 2018-05-31 22:23:19 -06:00
Ulrich Wilkens 297b6bd845 Fix warnings on FreeBSD 2018-05-31 22:04:08 -06:00
Ulrich Wilkens 16fbb15ecc Fix BSD and Sun problems after coverity fixes 2018-05-31 17:46:03 -06:00
Jon Trulson 77cdabb8f6 TermPrimSetUtmp: fix lost define broken by last patch 2018-05-24 18:52:53 -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 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 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
chase 0aa8780fa1 Small spelling fixes 2018-04-25 19:40:19 -06:00