Commit Graph

473 Commits

Author SHA1 Message Date
Peter Howkins 5b1c87fb43 libDtSearch: Coverity 86119 2018-07-02 23:26:51 +01:00
Peter Howkins 7ecbdc866c libDtSearch: Coverity 86602 2018-07-02 23:23:44 +01:00
Peter Howkins 96c6c5068a libDtSearch: Coverity 86426 2018-07-02 23:21:07 +01:00
Peter Howkins 013f452864 libDtSearch: Coverity 86816 2018-07-02 23:18:00 +01:00
Peter Howkins c96a2cfa51 libDtSearch: Coverity 87018 2018-07-02 23:15:57 +01:00
Peter Howkins 95d6b64800 libDtSearch: Coverity 176038 2018-07-02 23:13:43 +01:00
Peter Howkins aa1bfc0ab3 libDtSearch: Coverity 86579 2018-07-02 23:11:36 +01:00
Peter Howkins f0917ee2b5 libDtSearch: Coverity 87032 2018-07-02 23:09:29 +01:00
Peter Howkins 889650ea45 libDtSearch: Coverity 86944 2018-07-02 23:07:39 +01:00
Peter Howkins 0876476cae libDtSearch: Coverity 86856 2018-07-02 23:01:54 +01:00
Peter Howkins c8233c9200 libDtSearch: Coverity 86804 2018-07-02 22:59:03 +01:00
Peter Howkins d7225fde79 libDtSearch: Coverity 86780 2018-07-02 22:55:42 +01:00
Peter Howkins 5854fdca38 libDtSearch: Coverity 86768 2018-07-02 22:53:49 +01:00
Peter Howkins 85166ef293 libDtSearch: Coverity 86762 2018-07-02 22:51:16 +01:00
Peter Howkins 68986baef8 libDtSearch: Coverity 86698 2018-07-02 22:48:20 +01:00
Jon Trulson dc7807b13b slib/mp_rpc_server: TIRPC: force a listen() call on the server socket
With earlier versions of RPC and TIRPC it seems that svctcp_create()
calles listen() on the socket (as seen by debugger and strace).
Tooltalk expects this behavior.

However, with newer systems (ArchLinux 5/18+ and similar bleeding edge
versions of SuSE's equivalent: Tumbleweed), this behavior seems to
have changed.

ttsession goes into an infinite loop trying to accept() a connection
in the TIRPC library (via svc_getreqset()).

It appears listen() is no longer called on the socket when it is
created via svctcp_create().  The hack in this commit, always causes
listen() to be called on the socket, and seems to resolve the problem.

But it is a hack I think.  I don't know if this is the correct
behavior of svctcp_create() or we were just lucky before.
2018-07-01 19:45:09 -06:00
Jon Trulson c0388656dc tt/mini_isam: add new isam_prototypes.h include file and fix up problems
There were a variety of potential 64b problems due to the complete
lack of prototype declarations.  So, we add a file, isam_prototypes.h,
generated mostly by the 'cproto' tool.

We also fixed up some errors that having proper prototypes pointed
out, mainly in passing ints where pointers were expected and vice
versa.  The iserase() function was supposed to accept a char *, but
was defined as only accepting a char.  Fun stuff like that.
2018-06-30 20:13:39 -06:00
Jon Trulson 0d39bd186f tt/mini_isam: remove all ancient sccsid blocks 2018-06-30 19:10:10 -06:00
Jon Trulson bc7e64195e tt/mini_isam: use proper include, get rid of ultrix strdup 2018-06-30 19:00:20 -06:00
Peter Howkins 1294f15d16 libDtSearch: Remove unused C files that have now disapeared with removal of #defines 2018-06-29 19:07:09 +01:00
Peter Howkins 32eb933929 libDtSearch: Convert to ANSI function definitions and use proper prototypes (which causes more warnings 2018-06-29 18:43:11 +01:00
Peter Howkins bcdb2dd909 libDtSearch: Tidy up the LOCK and DBN macro madness 2018-06-29 16:16:21 +01:00
Peter Howkins 60edbd3491 libDtSearch: Untangle large numbers of TASK_ macros that were all unused code 2018-06-29 01:45:29 +01:00
Peter Howkins 86b9a0fee4 libDtSearch: remove NO_COUNTRY code which is always off for CDE 2018-06-29 01:04:55 +01:00
Peter Howkins 9d921ba219 libDtSearch: NO_TIMESTAMP is always on for CDE 2018-06-29 00:47:03 +01:00
Peter Howkins a1ad4ae25b libDtSearch: SINGLE_USER is always defined for CDE 2018-06-29 00:45:23 +01:00
Peter Howkins 550f278889 libDtSearch: NO_TRANS is always on for CDE 2018-06-29 00:43:46 +01:00
Peter Howkins 162fd49971 libDtSearch: Remove define ONE_DB which is always off for CDE 2018-06-29 00:34:56 +01:00
Peter Howkins e5b3c011c6 libDtSearch: Remove optional code for NO_DBN which is not used on CDE 2018-06-29 00:15:06 +01:00
Peter Howkins 605a21046a libDtSearch: remove optional code MULTI_TASK that is not used on CDE 2018-06-29 00:07:36 +01:00
Peter Howkins af9f0e9033 libDtSearch: Enable compiling with const support, remove ability to build without const support. 2018-06-28 19:17:42 +01:00
Peter Howkins 144bca4af7 libDtSearch: Remove optional support for ancient DOS far pointer 2018-06-28 18:59:15 +01:00
Jon Trulson d0dd809b74 lib/tt/mini_isam: remove register keyword 2018-06-27 22:26:18 -06:00
Jon Trulson b0fd79a680 tt/bin: remove register keyword 2018-06-27 22:00:56 -06:00
Jon Trulson 34436c7725 tt/lib: remove register keyword 2018-06-27 22:00:56 -06:00
Jon Trulson 904a48b822 lib/pam: remove register keyword 2018-06-27 21:59:18 -06:00
Jon Trulson d5eff36867 lib/pam/examples/login: remove register keyword 2018-06-27 21:59:18 -06:00
Jon Trulson 02c70c739d lib/csa: remove register keyword 2018-06-27 21:59:18 -06:00
Jon Trulson 3b1316112a DtWidget: remove register keyword 2018-06-27 21:58:04 -06:00
Jon Trulson b5a3c00671 DtTerm/util: remove register keyword 2018-06-27 21:58:04 -06:00
Jon Trulson 00aafb206e DtSvc/DtUtil2: remove register keyword 2018-06-27 21:58:04 -06:00
Jon Trulson f446ca54e9 DtSvc/DtUtil1: remove register keyword 2018-06-27 21:58:04 -06:00
Jon Trulson dbef83212a DtSvc/DtEncap: remove register keyword 2018-06-27 21:58:04 -06:00
Jon Trulson 11ad65226d DtSvc/DtCodelibs: remove register keyword 2018-06-27 21:58:04 -06:00
Jon Trulson 57ce407976 lib/DtSearch: remove register keyword 2018-06-27 21:58:04 -06:00
Jon Trulson 8e48100c12 DtSearch/raima: remove register keyword 2018-06-27 21:58:04 -06:00
Jon Trulson b9d605c8ea lib/DtPrint: remove register keyword 2018-06-27 21:58:04 -06:00
Jon Trulson 5b5ac72691 lib/DtHelp: remove register keyword 2018-06-27 21:58:04 -06:00
Jon Trulson 2760adaab3 lib/DtHelp/jpeg: remove register keyword 2018-06-27 21:58:04 -06:00
Jon Trulson e9d0d91cad lib/DtHelp/il: remove register keyword 2018-06-27 21:58:04 -06:00
Peter Howkins 020d592338 libtt: Change to ANSI function definitions 2018-06-28 04:06:47 +01:00
Peter Howkins 6b09b19351 libDtTerm: Change to ANSI function definition 2018-06-28 04:01:19 +01:00
Peter Howkins ba513278b9 libDtSvc: Change to ANSI function definitions 2018-06-28 03:58:49 +01:00
Peter Howkins a5fa1313c4 libDtMrm: Change to ANSI function definitions 2018-06-28 03:56:02 +01:00
Peter Howkins e6f38a9910 libcsa: Change to ANSI function definitions 2018-06-28 03:54:49 +01:00
Peter Howkins e43dbc5460 libDtHelp: Change to ANSI function definitions 2018-06-28 03:53:31 +01:00
chase 6bf175ef2d Remove apollo support 2018-06-24 16:22:37 -06:00
Jon Trulson 8c1ad2d3a8 libtt: if local hostname lookup fails, default to localhost
A recurring problem, mainly on the BSD's, and also on some Linux
installations, is a failure for ttsession to start and any clients
trying to attach to it failing due to having a hostname that is not
associated with an IP address.

This is due to code which looks up the hostname, and if it does not
have a valid host record, then TT just fails.

This has required those users to add an alias for their host name in
their /etc/hosts file.

With this commit, this should no longer be necessary.  Now, if
_XGethostbyname() fails when looking up the local name, a default of
"localhost" is used, which should always exist.

This was run tested on Linux and FreeBSD 11.1.  It was compile tested
on OpenBSD 6.2.
2018-06-20 16:59:34 -06:00
Jon Trulson ac883b6972 FreeBSD 11: Fix clang (v6) builds
While CDE builds fine with gcc6 on FreeBSD 11, the default clang build
was broken in a few places.  This commit allows CDE to build now using
the default clang 6 system compiler.
2018-06-14 18:32:35 -06:00
Jon Trulson 825a504a11 XPM: Replace calls to XmeXpm*() with regular Xpm*()
This is no longer needed on modern Motif's.
2018-06-14 16:50:57 -06:00
Jon Trulson c1bef9e8d6 libDtTerm: Fix for a coredump seen on OpenBSD 2018-06-13 13:27:46 -06:00
Jon Trulson 0ec25848e9 cde: change version to 2.2.4a, for a development release 2018-06-08 13:03:39 -06:00
Jon Trulson a05ab67e12 XlationSvc: remove a "'" added in previous spelling commit that causes warnings 2018-05-31 22:23:19 -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 07f272122d Fix Linux rpc problems with new glibc 2018-05-31 18:00:22 -06:00
Ulrich Wilkens 16fbb15ecc Fix BSD and Sun problems after coverity fixes 2018-05-31 17:46:03 -06:00
Jon Trulson 3495287b78 tt_xdr_utils: fix up some warnings 2018-05-25 11:16:04 -06:00
Jon Trulson 7f9634010b tt_old_db: use TT_DB_OK instead of NULL 2018-05-25 10:23:18 -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 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 6d3a19d8f9 Even more spelling fixed 2018-04-28 12:36:33 -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
Peter Howkins 9088d6b54e libtt: Fixes for Coverity fixes that I thought I'd already fixed. 2018-04-24 00:05:56 +01:00
Peter Howkins 68de09848b Merge branch 'cde-fixups-1' of ssh://git.code.sf.net/p/cdesktopenv/code into cde-fixups-1 2018-04-23 02:21:30 +01:00
chase 07722f5c13 More spelling fixes 2018-04-22 12:15:08 -06:00
chase 1817f335c6 Fix various spelling errors 2018-04-22 12:14:43 -06:00
Peter Howkins 22071fd62a libtt: Further coverity fixes 2018-04-20 22:57:47 +01:00
Peter Howkins 02d43dabe6 libtt: Coverity fixes related to uninitialised fields in classes. 2018-04-18 01:28:03 +01:00
Peter Howkins caef8edac0 various: You cannot use the destination of snprintf as one of the srcs, undefined 2018-04-14 01:23:48 +01:00
Peter Howkins fee6003be1 libtt: More coverity fixes 2018-04-13 19:08:50 +01:00
Jon Trulson 17101b6f4c Enable TIRPC support for Linux
This is enabled by default.  To disable, add:

in the config/cf/site.def or host.def file.

You will need to have the libtirpc-dev package installed.

The benefit is that you will no longer need to run rpcbind in insecure
mode (the -i option).  There are other benefits we may be able to take
advantage of in the future, like supporting IPV6 for ToolTalk.
2018-04-12 21:00:34 -06:00
Peter Howkins 691dffb076 lidtsvc: coverity fixes 2018-04-12 01:38:02 +01:00
Peter Howkins 91bb9a037a libtt: resolve coverity issues related to double close() 2018-04-12 00:04:13 +01:00
Peter Howkins 30ad8e35e5 libtt: Resolve coverity warnings 2018-04-11 19:31:03 +01:00
Jon Trulson f4e3cb8327 dthelp/FormatUtils: fix coredump in dthelpgen due to free() of a bad address 2018-04-10 16:30:25 -06:00
Peter Howkins ccab0597ed libdtterm: Resolve coverity issues 2018-04-04 19:48:23 +01:00
Jon Trulson 4e61c62742 libDtSearch/dtsrapi.c: Coverity CID 86857; dest buf too small 2018-04-02 17:02:16 -06:00
Peter Howkins acc3d8868a libdtsvc: Resolve coverity warnings related to 'dereference before null check' related to free() 2018-04-02 22:10:46 +01:00
Peter Howkins b0c5941e3e libdtsvc: Compiler warning prevention 2018-04-02 21:31:50 +01:00
Jon Trulson 78110e7921 libtt/isrepair.c: coverity CID 86705; uninit ptr read 2018-04-01 14:25:34 -06:00
Jon Trulson 5729327cc8 dtexec,DtSvc/MsgLog.c: coverity CID 89585; resource leak 2018-04-01 13:54:22 -06:00
Jon Trulson 9412da725b libtt/tt_file_system.C: coverity CID 86024; array vs singlton 2018-03-31 19:05:35 -06:00
Jon Trulson 2c2fb1151d csa/match.c: coverity CID 87204; bad free; WTF 2018-03-31 18:36:22 -06:00
Jon Trulson 4543bc6192 libtt/process.c: coverity CID 87051; use after free 2018-03-31 18:08:02 -06:00
Jon Trulson 6cd0391409 libtt/db_server_svc.C: coverity CID 87060; string overflow 2018-03-31 18:02:11 -06:00
Peter Howkins 73b6311a83 libDtWidget: Resolve some Coverity warnings 2018-03-31 00:15:05 +01:00
Peter Howkins 50a96959f0 libtt: Resolve some compiler warnings 2018-03-28 21:34:08 +01:00
Peter Howkins 637abd5d5c Resolve some coverity warnings 2018-03-08 23:03:21 +00:00
alx 5669c8a60f libtt: pass proper flags to getfsstat, log error message and exit if it fails 2017-07-29 12:42:49 -06:00
alx ae7dd95cc4 ttsession: don't segfault if host name isn't properly set 2016-12-31 15:14:59 -07:00
alx c855ee9765 libDtSvc: added Xinerama support to _DtMessageDialog 2016-12-31 15:14:43 -07:00
Swift Griggs 1fdcd4c93d Patches from pkgsrc-WIP 2016-08-05 11:21:06 -06:00
Jon Trulson a173dd3b3b release: update version to 2.2.4, update HISTORY 2016-06-19 12:46:29 -06:00
Peter Howkins 2ea057d511 Disable all code related to libXp
deprecated and mostly no longer included on current OSes
2016-04-20 20:17:22 +01:00
Jon Trulson 10742f3679 ttcp: fix missing arg to fprintf 2015-12-18 09:55:20 -07: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
Douglas Carmichael ecdf9eba10 Changed memcpy() to memmove() to stop coredumping on OpenBSD 5.7. 2015-06-21 17:07:41 -06:00
Jon Trulson 14b9e2efa3 cde: change revision to 2.2.3 2015-05-09 16:58:46 -06:00
Ulrich Wilkens 8b38d9ea49 Fix broken build on OpenBSD 2015-05-09 16:21:32 -06:00
Ulrich Wilkens 2b8b5f25b5 Support for new Solaris/OpenIndiana versions 2015-05-09 16:19:08 -06:00
Stuart Brady 0306c7c6f2 DtTerm: fix formatted text in history buffer
Formatted text currently gets corrupted by DtTerm when copied into its
history buffer.

As soon as a line of text is copied into the history, the text of each
segment of formatted text is altered so that it contains the text from
the start of the line.  For example:

    echo -e '\e[1mbold\e[m \e[4munderlined\e[m'

When the text has scrolled off the screen, scrolling back to it reveals:

    boldbbold under

This is fixed by adding the calls to _DtTermPrimBufferGetCharacterPointer
that were missing which would update the buffer pointer when inserting
text into the history buffer.
2015-05-05 16:47:05 -06:00
Peter Howkins 5c8f66a07d libDtSvc: Resolve 28 compiler warnings. 2015-01-14 14:10:55 +00:00
Peter Howkins 49266f9019 libDtPrint: Resolve the 1 remaining compiler warning. 2015-01-14 11:43:58 +00:00
Peter Howkins f8f04a5977 libDtHelp: Resolve 11 compiler warnings. 2015-01-14 11:41:38 +00:00
Matthew Howkins 2863b839e5 libtt: Change to standard function prototypes in ttauth. Fix some compiler warnings by adding #includes 2014-12-30 17:31:46 +00:00
Matthew Howkins be49dc56bc libtt: Fix some uninitialized variables detected by Coverity 2014-12-30 17:31:38 +00:00
Jon Trulson 7484c6f88b DtXinerama: no need to check unsigned int < 0 (CID:86121) 2014-12-27 14:14:59 -07:00
Jon Trulson 4c6e66ceb8 tt/mini_isam: Coverity (memory corruption, moderate) 2014-12-26 16:15:53 -07:00
Jon Trulson 6f45dde569 tt/mini_isam: Coverity (memory corruption, moderate) 2014-12-26 16:15:25 -07:00
Jon Trulson ce7bdf9f62 ttsession: Coverity (memory corruption, moderate) 2014-12-26 16:14:35 -07:00
Jon Trulson e45843bc95 ttauth: Coverity (memory corruption, moderate) 2014-12-26 16:13:07 -07:00
Jon Trulson 3013374988 csa: Coverity (memory corruption, moderate) 2014-12-26 16:00:55 -07:00
Jon Trulson 50de34a933 DtTerm: Coverity (memory corruption, moderate) 2014-12-26 15:59:52 -07:00
Jon Trulson cedb47114f DtTerm: Coverity (memory corruption, moderate) 2014-12-26 15:58:50 -07:00
Jon Trulson c18f109032 DtSvc/DtUtil2: Coverity (memory corruption, moderate) 2014-12-26 15:57:47 -07:00
Jon Trulson 775008571d DtSvc/DtUtil1: Coverity (memory corruption, moderate) 2014-12-26 15:56:10 -07:00
Jon Trulson 9d26729d65 DtSvc/DtEncap: Coverity (memory corruption, moderate) 2014-12-26 15:55:02 -07:00
Jon Trulson 48cfb46a97 DtSvc: Coverity (memory corruption, moderate) 2014-12-26 15:54:08 -07:00
Jon Trulson 80b516d021 DtSearch: remove bogus debug block 2014-12-26 15:52:33 -07:00
Jon Trulson 17379a3fc0 DtHelp: Coverity (memory corruption, moderate) 2014-12-26 15:50:41 -07:00
Jon Trulson 7887e99477 DtHelp: Coverity (memory corruption, moderate) 2014-12-26 15:49:43 -07:00
Jon Trulson f719d20b6c ttauth: Coverity (memory corruption) 2014-12-26 14:12:10 -07:00
Jon Trulson e18ac00c82 DtWidget: Coverity (memory corruption) 2014-12-26 14:10:01 -07:00
Jon Trulson b0548ce111 DtTerm: Coverity (memory corruption) 2014-12-26 14:08:24 -07:00
Jon Trulson fa0074904b DtSvc: Coverity (memory corruption) 2014-12-26 14:06:26 -07:00
Jon Trulson 2d89ad036a DtSvc: Coverity (memory corruption) 2014-12-26 14:03:17 -07:00
Jon Trulson 9751abddff DtHelp: Coverity (memory corruption) 2014-12-26 13:42:23 -07:00
Matthew Howkins caf4929c41 libtt: Fix 'Missing return statement' errors detected by static analysis 2014-12-23 22:04:59 +00: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
Ulrich Wilkens 42e891d9e7 Resolve many build warnings
This patch fixes many warnings from the beginning of the build up to
and including the depend stage. Nearly all warnings should be gone
even with -Wall.
2014-09-23 17:57:50 -06:00
Ulrich Wilkens c3f74eec17 FreeBSD 10 clang port 2014-07-27 12:32:35 -06:00
Jon Trulson 8d0551bfda Version change to 2.2.2 2014-07-23 16:16:57 -06:00
Eugene Doudine 4e2adc1f8e Fixes the bug, which caused dtterm to show stripes of wrong color between text lines when using fontsets that include fonts of slightly different heights.
The cause of the bug was that X*DrawImageString draws background
according to the extents of the given string, not to extents of the font set,
which determine terminal line height.

Now, when such a situation is detected, the background is cleared before
drawing the characters.
2014-05-03 22:11:41 -06:00
Jon Trulson 0254ebc0b4 xtclient.c: fix debug statement regarding fd number 2014-03-24 19:54:37 -06:00
Jon Trulson 3c35e2d14d xtclient.c, spcd_event.c: stop referencing fds_bits directly 2014-03-24 19:37:09 -06:00
Jon Trulson 4312a1190b cleanup: eliminate missing sentinel warnings 2014-03-24 18:26:10 -06:00
Jon Trulson 9b699d3fb1 linux: build with thread safety and REENTRANT enabled.
There was a check in linux.cf for the Linux libc version that didn't
work, since these were never set anywhere.  Presumably current Xorg
imake sets these, but since we aren't using that... (yet)

As a result, the build assumed that thread-safe API's were not
supported.  Setting the default libc major version to '6' allows the
proper build to take place.  libc5 was never threadsafe and no one has
probably used it in over 10 years.

As a result, some earlier porting fixes that referenced '__fds_bits'
on linux systems had to be reverted as these are not valid in an MT
environment.  They are also not neccessary when building in such an
environment, as the normal 'fds_bits' works fine.

This patch defintely needs testing on many linux systems.
2014-03-24 17:15:40 -06:00
alx f6adc98dd7 DtWidget: Don't free random pointer on Control widget destruction 2014-03-23 23:07:52 -06:00
Jon Trulson ddb4933039 tt_xdr_utils.h: fix build error on linux/bsd introduced with illumos initial patch.
The linux's and BSD's need the 'struct XDR::xdr_ops ops' declaration,
whereas I guess sun does not.
2014-03-22 16:54:24 -06:00
Peter Tribble 468d576030 initial illumos port 2014-03-22 16:33:11 -06:00
Jon Trulson 3c14b8b5ce libcsa: fix up some stupidness. 2014-03-12 17:00:07 -06:00
Ulrich Wilkens d24fd29b52 Fix dtfile and dtterm on NetBSD 2014-03-11 13:06:55 -06:00
Jon Trulson 9f0fbc3015 mp_rpc_server.C: limit iteration of svc_fdset to FD_SETSIZE, as per spec.
In init() there was code iterating over all of the possible file
descriptors in a svc_fdset.  fdsets are limited to FD_SETSIZE.  This
caused coredumps on FreeBSD 10, and possibly other hidden issues.

Moving to poll(), rather than select() would be better, but is a bigger
job.  For now, just limit to the FD_SETSIZE that select() requires.
2014-03-10 14:49:37 -06:00
Jon Trulson b147e0ce12 libDtTerm: add include <stdio.h> so FILE is properly defined.
TermPrim/TermPrimDebug.h references FILE without including the
required header file.  I am not sure why this hasn't shown up before.
2014-03-09 00:21:40 -07:00
Jon Trulson 8f648927eb Version change to 2.2.1 2014-03-01 15:48:49 -07: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 6b0da8f335 Introduction of BSDArchitecture 2013-10-20 16:23:40 -06:00
Ulrich Wilkens 2d08153289 correction of message files 2013-09-15 19:35:53 -06:00
Ulrich Wilkens 4ec9658299 dtinfo other files 2013-08-29 19:47:51 -06:00
Ulrich Wilkens a4ab06ac1e lib/DtHelp: added missing include. 2013-07-25 18:29:33 -06:00
Pascal Stumpf 7e0a9517e3 Silence lots of warnings in lib/DtHelp.
* 64bit warnings
* Missing prototypes
* explicit parentheses / brackets

There's still some work to be done, but, as always, it's a start ...
2013-07-22 17:19:13 -06:00
Pascal Stumpf 0c165f56f5 kill a few more warnings in DtPrint 2013-07-22 17:15:34 -06:00
Pascal Stumpf dc0e8ea74d Kill most warnings in lib/DtTerm.
Mostly missing headers, explicit parentheses and new prototypes.

Some Caveats:
* I haven't compile-tested the SVR4 getpty file, it might need another tweak
* There were operator precedence bugs in TermPrimCursor.c and TermPrimRender.c
  (^ vs. !=).  This might change behaviour, but at least I haven't experienced
  any crashes ...
* This adds a little more dependencies for include ordering, but unless we
  want to play the "headers that include headers that include headers..." game,
  this is unavoidable.
2013-07-22 17:12:07 -06:00
Pascal Stumpf 8f98ac92cd Kill lots of warnings in DtSvc. 2013-07-21 15:54:39 -06:00
Jon Trulson fbe451187f Merge branch 'master' into multi-monitor 2013-05-17 23:55:51 -06:00
Jon Trulson a198d898e8 TT RPC server: Don't search 538 million transients trying to allocate one.
Currently, mp_rpc_server.C tries 538 million ports to acquire an
available transient rpcbind port number.  This is bad when rpcbind is
running in secure mode (and you are not using tirpc) - Xsession will
'hang' at the dthello (blue) screen filling up your error logs with
RPC errors.

Now, just try +- 50 (for a total of 100 ports) before bailing.  The
dthello 'blue screen of death' is the most common problem in starting
CDE when rpcbind isn't set up properly.  This should at least not
cause the appearance of a 'hang'.
2013-05-17 16:16:17 -06:00
Jon Trulson af7ba55f78 Add basic Xinerama support via new lib/DtXinerama
This adds a basic library and support to dtsession and dtlogin to
support Xinerama/Twinview, where multimple monitors are used to make
up an X11 screen.

The main goal here is to draw dialogs and such centered on a monitor,
rather than spread out over multiple monitors.

Might need to add sorting - as on my test system, what I would
consider monitor 0, appears to actually be monitor 1.  So a sort might
need to be added to sort the screens according to increasing x and y
offsets so it make sense to a user.

Also, this library is built statically and not documented.  Maybe it
could be 'filled' out and refactored/redesigned in the futre if need
be and suppoerted.

It is enabled via a define, CDE_USEXINERAMA in site.def.  It's a very
simple lib, so I do not expect any issues with the BSD's - it should
build and work fine, assuming your X server has the XINERAMA
extension, which I think pretty much all of them do at this point.
2013-03-26 19:49:50 -06:00
Karsten Pedersen 69997241c5 Fixed building on FreeBSD 8.x 2013-02-26 17:28:17 -07:00
Pascal Stumpf 0ec1d6b692 Avoid negative array subscript; break out of the loop if that happens. 2012-11-27 23:46:12 -07:00
Jon Trulson f84950100f Revert "Older Linux installations do not have svcfd_create()."
This reverts commit 44e384aedb.

This code is actually needed.  If svcfd_create() is not available, it
should be fixed only for those systems that it affects.
2012-11-24 19:16:58 -07:00
Peter Howkins 43cfaeaa65 libDtSearch: Resolve 137 -Wunused-variable warnings. 2012-11-12 17:13:36 +00:00
Peter Howkins 9040256676 libDtSearch: Resolve 38 -Wformat warnings 2012-11-12 16:26:11 +00:00
Peter Howkins a10520c43c libDtPrint: Resolve 9 -Wunused-variable warnings. 2012-11-12 15:03:37 +00:00
Peter Howkins 21feacd159 libdthelp: Resolve 65 -Wunused-variable warnings 2012-11-09 17:20:46 +00:00
Peter Howkins 6f2a704bbd libcsa: Resolve 96 -Wunused-variable warnings.
This is not all of them, another ~90 exist in generated code.
2012-11-06 15:07:08 +00:00
Peter Howkins 37c30d32f7 lidtwidget: Resolve 74 -Wunused-variable warnings 2012-11-06 13:56:11 +00:00
Peter Howkins cd39eabb18 libdthelp: resolve 46 compiler warnings 2012-10-08 15:34:45 +01:00
Jelle Hermsen b8862cab32 Changed a couple of ifdefs for __FreeBSD__ to CSRG_BASED. These are all clearcut cases. I left the ones I had doubts about, or where I wasn't sure about the OpenBSD side of things to look at later. 2012-10-03 17:06:57 -06:00
Marcin Cieslak 775fb0f0f1 Don't break help with gcc -O2
libDtHelp is unable to read SDL help files
with -ftree-store-ccp optimization which
is enabled by -O2 on gcc 4.2.1.

GifUtils.c and decompress.c didn't work
properly with -ftree-store-ccp enabled.

GifUtils.c was repaired by fixing
those warnings:

GifUtils.c: In function 'create_pixmap':
GifUtils.c:1093: warning: return makes integer from pointer without a cast
GifUtils.c:1110: warning: return makes integer from pointer without a cast
GifUtils.c:1215: warning: return makes integer from pointer without a cast
GifUtils.c: In function 'gif_to_pixmap':
GifUtils.c:1242: warning: return makes integer from pointer without a cast

decompress.c didn't generate warnings, but the
only effect of the -ftree-store-cpp was to introduce
this change:

        addq    $1, %rax
        movq    %rax, (%rbx)
 .L90:
-       cmpl    $157, %edx
+       cmpl    $-99, %edx
        jne     .L86
        movl    8(%rbx), %eax
        subl    $1, %eax

Which corresponds to this source code:

bufioI.h

     57 #define BufFileGet(f)   ((f)->left-- ? *(f)->bufp++ : (*(f)->io) (f))

     42     int     (*io)(/* BufFilePtr f */);

decompress.c
     53 #ifdef NO_UCHAR
     54  typedef char   char_type;
     55 #else
     56  typedef        unsigned char   char_type;
     57 #endif /* UCHAR */
     58
     59 static  char_type magic_header[] = { "\037\235" };      /* 1F 9D */

    131     if ((BufFileGet(f) != (magic_header[0] & 0xFF)) ||
    132         (BufFileGet(f) != (magic_header[1] & 0xFF)))
    133     {
    134         return 0;
    135     }

BufFileGet() returns (int), so the (unsigned char) constants
got promoted to (int) with sign extension; therefore constant
157 decimal (0x9D) became -99 decimal, sign extended
(0xffffff9D), and the comparison was always false.

Tested using:
$ gcc -v
Using built-in specs.
Target: amd64-undermydesk-freebsd
Configured with: FreeBSD/amd64 system compiler
Thread model: posix
gcc version 4.2.1 20070831 patched [FreeBSD]

Running on:
FreeBSD 10.0-CURRENT (r240948M)
built Wed Sep 26 23:33:08 CEST 2012
2012-10-01 18:59:14 -06:00
Frederic Koehler 4773d68153 dthelp: Avoid undefined behaviour in strcpy
Technically strcpy's ranges cannot overlap at all,
although in practice this is usually not an issue.
Does quiet a valgrind warning, however.
2012-09-29 19:21:27 -06:00
Jelle Hermsen 399915f0ce Teach ToolTalk config about NetBSD and adds HAS_STATVFS identifier which is consequently used in tt_file_system.C, because NetBSD switched to the POSIX/XOpen statvfs() calls in 2004. 2012-09-28 19:11:09 -06:00
James Woodcock 44e384aedb Older Linux installations do not have svcfd_create().
svcfd_create() is only called if OPT_UNIX_SOCKET_RPC is defined, so a #ifdef
round that code should be OK.
2012-09-27 18:01:19 -06:00
James Woodcock 406fa95994 Use RPC_ANYSOCK instead of the magic number -1. 2012-09-27 18:01:14 -06:00
Marcin Cieslak ee82570104 Use typedef XDR from <rpc/xdr.h>
__rpc_xdr is no longer available on FreeBSD 10.
(XDR is typedef'd as "struct XDR" and not "struct __rpc_xdr").

By the way, why did we ever need this? Probably
it should be removed. Leaving for __OpenBSD__ for now.
2012-09-27 17:54:12 -06:00
Marcin Cieslak 77ec7b56b8 2 warnings fixed (64-bit)
Fix XtVaGetValues() output for 64-bit
Fix filename comparison in Dts.c
2012-09-24 18:35:24 -06:00
Marcin Cieslak 917f7da191 157 warnings: remove -DXK_MISCELLANY from Makefiles
Fixes the following warning:

In file included from ../../../imports/x11/include/X11/Xutil.h:54,
                 from ../../../imports/x11/include/X11/Intrinsic.h:54,
                 from Action.c:64:
../../../imports/x11/include/X11/keysym.h:49:1: warning: "XK_MISCELLANY" redefined
<command-line>: warning: this is the location of the previous definition

<keysym.h> which includes all key symbols and loads <keysymdef.h>
is automaticlly included by the X Toolkit.

This patch removes #include <keysymdef.h> whenever not needed,
and adds #define XK_MISCALLANY in the source code where required.
2012-09-24 18:30:21 -06:00
Marcin Cieslak 1079b56422 dtfile: Add missing prototypes
Add missing prototypes and header files to the dtfile
code in order to move closer towards 64-bit compatibility.

Extract the following functions from Motif internal headers:

_XmGetWidgetExtData
_XmRecordEvent
_XmStringUngenerate
_XmTextFieldSetDestination
_XmGetActiveTopLevelMenu

Extract manually prototypes of the obsolete Motif interface:
_XmHighlightBorder
_XmUnhighlightBorder

Remove XmPrivate.h if extractprototype.awk fails

Make the following header files available via -I:
	codelibs/boolean.h
	codelibs/pathutils.h
	codelibs/shellutils.h
and remove shellutils.h from dtwm directory.
2012-09-18 09:59:11 -06:00
Jon Trulson a29fc20957 message catalogs: fix comment lines, also remove linux hack in merge.c
According to the spec, blank lines in message catalogs or lines
beginning with '$ ' are valid comments.

However, there were many cases where lines in the message catalogs
contained just a single '$', without the required space after it.

Under linux, this caused 126766 error lines (in my builds) of the
form:

... unknown directive `': line ignored

This also causes gencat to exit with a non-0 exit code.  Even though
gencat says it ignores the line, it really doesn't.

An early porting change to programs/localized/util/merge.c was made to
ignore this return value on linux.  This hack has now been removed.

Build logs are a lot smaller and cleaner now.
2012-09-03 15:12:57 -06:00