The osf/ stuff includes uil, wml, etc - we expect these to be provided
by Motif, and make no attempt to build them in CDE, so no need for
them.
The only program in utils/prog/ is an ancient verion of lndir that we
do not need for CDE. If you need lndir for some reason, use the
laters version from Xorg, usually installed via the xutils-dev
package.
dtmail: messages of the 'Mail Retrieval' menu of dtmail were left untranslated.
French, Italian, Spanish translations were added.
vcal2xapia.awk: capacity to handle UTC+n timezones and TODO items added.
* maximization (also partially fixes strange Firefox behaviour)
* sane initial window placement
Firefox is stranger than most; it appears to maximize to double
X Screen width even on single head displays. Fixed (on multihead).
The function print_progress uses the pointer infile.
If fclose is called before print_progress then the build process
can fail to build the files:
doc/C/cde.dti/CDEDOC/dtsearch/CDEDOC.d99
doc/C/cde.dti/CDEDOC/dtsearch/dtsearch.ocf
doc/C/cde.dti/cde.oli
To fix the issue move the call fclose(infile) after print_progress()
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.
When using a non C locale such as fr_FR.ISO8859-1, the CUPS messages
returned by lpq are translated. However, the parser in ParseJobs.C can only
handle messages in English. As a result, dtprintinfo exits immediately with
an error message. To fix that problem we force a LANG=C environment when calling
lpq so that messages will be in English and will be processed correctly by dtprintinfo
parser.
* insserv requires a shebang line
* the rc script can hang if a daemon is started in the foreground
* "pgrep dtlogin" apparently can match the init script, if it is started
with "service dtlogin start" or similar.
* reduce code duplication
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.
Removed all the cases of sys_errlist[], no one should be using that
today. Also, correct code generation so that declarations like
'Widget w = NULL; Pixmap p = NULL;' etc, aren't produced, which is
wrong. Use '0', not NULL for these.
This should also correct the 2 mis-definitions of Pixmap that commit
6a9327f2ab attempted to fix in ttsnoop.
dtappbuilder still needs a lot of work.
This fix is a bit of a hack, I just moved the declarations into the
'user code' portion of main().
dtcodegen needs to be fixed so as not to generate this type of code in
the first place.
The symbol hp-ux is used to tag files for installation on HP machines
in the UDB databases. To ensure the correct release streams are
defined, these symbols (hp-ux, linux, freebsd, etc) are undef'd so
that they are not evaluated in the context of db file generation by
the preprocessor.
A change in the FreeBSD 10 patch disabled this, possibly due to
'hp-ux' being an invalid cpp symbol on FreeBSD 10 machines, which now
use clang by default.
Undefining these cpp symbols is actually required, otherwise linux,
for example, is defined as a '1' in the generated databases, which
will not match the release stream name 'linux', therefore all of the
files tagged as 'linux' are never installed.
To fix this, revert the change made in the FreeBSD 10 patch, and
rename all occurances of 'hp-ux' to 'hpux' in the UDB files to avoid
the potential for cpp trouble when hp-ux is specified.
As a result of this change, 'hpux' is now the name of the release
stream for hp machines, not 'hp-ux'.
This would allow different locales to be specified for
programs/localization (DtLocalesToBuild) and doc/
(DtDocLocalesToBuild).
This would be useful for 'partial' translations like the Greek el_GR
locale, where message catalogs, actions, or other items are localized,
but documentation like the help system and dtinfo are not.
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.
The patch converts desktop_grid[] from Boolean array into array of
counters of objects, which are placed on cells. When object is
placed on /removed from the screen the counter gets incremented/decremented.
The panel registration code rather stupidly assumed that display
size is always 1280x1024 pixels. Because of this, depending on screen
size, the panel could be registered somewhere in the center of the screen
or completely or partially beyond of it.
The panels were registered only on startup, not those, which were added
from UI.
The fix moves panel registration into separate routine and removes assumption
about display size. The fix yet is not complete since it still makes assumption
about panel's geometry: from dtfile there is still no way to find out
dinamically the size of panel and it's location.
On small screens segfaults could be also triggered without any icons on dtfile
startup if dtwm panel (or part of it) was registered beyond the screen when
RegisterInGrid() was called by InitializeDesktopGrid().
The patch also makes grid registration work for large objects (larger than
2 cells in any direction, like dtwm panel or icon with long file name).
Previously only rectangle vertices were registered.
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.
On some systems with libtcl installed, it might be linked into instant
rather than the locally provided version. This can result in random
coredumps.
Seen on Ubuntu 12.04, x86_64.
Now, we force linking with ../tcl/libtcl.a.
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.
With this patch, it is no longer neccessary to create the
/imports/x11/include/X11 symlink...
Also, remove the include of xfree86.cf from linux.cf, and define our
own DefaultCCOptions. Setup to use only -ansi, not -pendantic.
gcc can generate dependencies, so use that instead of building and
depending on the rather delicate and archaic 'makedepend'.
This fix removes makedepend from being built or used on linux, and
instead uses gcc to generate dependency data in .depend files.
I think pretty much every platform that uses gcc should do this. I am
not sure if other compilers (intel, clang) can do this though.
libcompat and header files will be gone in the upcoming 5.5 release, so we
cannot use the ftime(3) interface there. Fall back to the SVR4 version of the
code, but use the tm_gmtoff field of struct tm to get the timezone.
Unfortunately, that is not portable (because I really really would like to
remove that old and crummy struct timeb from the public API).
In several places, variables were XFree()'d, but then used in system()
commands later. This would cause various issues - on my system, I'd
get:
sh: 1: Syntax error: EOF in backquote substitution
system for rm failed; exiting...
while building the guides.
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.
This reverts commit 8a8619bfa8.
More work will need to be done to use tirpc on 64bit systems. It
works 'accidentally' on 32b systems. The issue is that tirpc
includes *must* be used, and there is some work required to properly
support this (like proper include paths, proper definition of XDR,
etc).
So for now, we revert this until that work can be completed and tested,
otherwise 64b linux builds are likely to have problems.
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'.
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.
On OpenBSD, the 'S' option to malloc(3) enables guard pages (among other
things). This loop could have triggered this trap when reading beyond the
buffer. Also, the whole "while(*ip)" construct was based on the assumption that
the memory after the string is always zero-filled.
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.
This has the effect of not performing a tt call each time in
ResolveLocalPathName() if we're on the local host anyway. Drastically reduces
dtfile startup time.
Use Adobe Helvetica as the sans serif user
interface font (among others, dtlogin, front
panel buttons, menu titles) instead of Lucida.
While there, move X Consortium comment back
to the top.
This change applies only to FreeBSD.
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
dtcreate crashed on 64-bit system when clicking
"Find Set.." button.
Crash happens in libXm:
new_w=0x805db4300, args=0x7fffffffb430, num_args=0x7fffffffb3dc)
at Form.c:1955
$1 = {att = {{type = 4 '\004', w = 0x805db3700, percent = 0, offset = 0,
value = 0, tempValue = 0}, {type = 1 '\001', w = 0x0, percent = 0,
offset = 10, value = 0, tempValue = 0}, {type = 3 '\003',
w = 0x805db3700, percent = 0, offset = 0, value = 0, tempValue = 0}, {
type = 3 '\003', w = 0x800000000, percent = 0, offset = 10, value = 0,
tempValue = 0}}, next_sibling = 0x0, sorted = 0 '\0',
resizable = 1 '\001', preferred_width = 0, preferred_height = 0}
(...)
at icon_selection_dialog.c:1768
1767 /* Creation of icon_scrolled_win */
1768 icon_scrolled_win = XtVaCreateManagedWidget( "icon_scrolled_win",
1769 xmScrolledWindowWidgetClass,
1770 icon_selection_dialog,
1771 XmNscrollingPolicy, XmAUTOMATIC,
1772 /* XmNnavigationType, XmTAB_GROUP, */
1773 XmNx, 282,
1774 XmNy, 84,
1775 XmNscrollBarDisplayPolicy, XmAS_NEEDED,
1776 XmNrightOffset, 10,
1777 XmNrightAttachment, XmATTACH_FORM,
1778 XmNtopOffset, 0,
1779 XmNtopWidget, icon_container_label,
1780 XmNtopAttachment, XmATTACH_WIDGET,
1781 XmNleftOffset, 0,
1782 XmNleftWidget, icon_container_label,
1783 XmNleftAttachment, XmATTACH_OPPOSITE_WIDGET,
1784 XmNbottomOffset, 10,
1785 XmNbottomWidget, XmATTACH_NONE,
1786 XmNbottomAttachment, XmATTACH_WIDGET,
1787 NULL );
What happens here is that ConstraintInitialize receives
four constraints, the last one is this:
{ type = 3 '\003', /* XmATTACH_WIDGET */
w = 0x800000000, /* malformed XmATTACH_NONE ???
percent = 0,
offset = 10, /* specified as XmNbottomOffset */
value = 0,
tempValue = 0}
XmATTACH_* values are defined in <Xm/Xm.h> as follows:
505 enum{ XmATTACH_NONE, XmATTACH_FORM,
506 XmATTACH_OPPOSITE_FORM, XmATTACH_WIDGET,
507 XmATTACH_OPPOSITE_WIDGET, XmATTACH_POSITION,
508 XmATTACH_SELF
509 } ;
What is not clear to why XmATTACH_NONE - which should be (int)0 -
becomes 0x800000000 - looks like a 64 bit bug somewhere.
Providing a long value on None (0L) as in this change fixes the
problem.
I understand is that it possible to use such an "empty" widget
is to create additional space at the bottom of the newly created
"icon_scrolled_win".
What needs to be clarified - shouldn't be such an (int) value be
automatically promoted to (long) (or XtArgVal, XtPointer, ...)
and preserve the value 0? Lots of parameters seem to be
passed as ints (for example dimensions) and they do not
appear to cause any trouble.
XmPrivate must be generated manually. For this you work, you must
have a freshly compiled openmotif tree, and MLIBSRC must be pointing
to it.
Otherwise, it's possible during the includes phase for an attempt to
be made to regenerate this file, which will fail on the vast majority
of systems out there.
So, to regenerate,
cd include/Xm
rm XmPrivate.h
make XmPrivate.h
- Fix missing prototypes
- Fix some 64-bit related problems (XtVaGetValues)
- Fix crash on dtcreate startup in create_applicationShell1()
- Add XmeFlushIconFileCache() prototype from <Xm/IconFileP.h>
When applying a patch, "git am" strips
trailing whitespace, although they are
present in the git formatted-patch.
This way the committed file will be
slightly different than the file re-generated
by extractprototype.h
It shouldn't hurt, but next run of
extractprototype.h will add trailing spaces
again and the resulting diff on XmPrivate.h
will include more changes than actually
needed.
This may break some viscious circle after
applying the patch, so enabling regeneration
on LinuxArchitecture again.
This patch does not add XmeFlushIconFileCache()
needed by dtcreate.
__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.
This is required by recent changes to the stack protector code in gcc,
generating references to __guard_local instead of __guard, defined in
crtbeginS.o.
This is a temporary solution; strictly speaking, we shouldn't invoke ld
directly at all but use cc instead.
Install black and white and 128-color custom logos for FreeBSD.
The FreeBSD logo based on the artwork provided by The FreeBSD Foundation:
http://www.freebsd.org/logo/logo-basic.png
The mark FreeBSD is a registered trademark of The FreeBSD Foundation
is are used by Common Desktop Enviroment (CDE) with
the permission of The FreeBSD Foundation.
The FreeBSD Logo is a trademark of The FreeBSD Foundation and is used
by Common Desktop Environment (CDE) with the permission of
The FreeBSD Foundation.
Use of logo subject to Trademark Usage Terms and Conditions:
http://www.freebsdfoundation.org/documents/Guidelines.shtml
The following patch gets the Lucida Sans font working on my FreeBSD system. Before applying this, title bars and menu bars are displayed in the "-misc-fixed" font. This is on FreeBSD 9.0-RELEASE-p3.
On Mon, 24 Sep 2012, Jon Trulson wrote:
> On Tue, 25 Sep 2012, Marcin Cieslak wrote:
>
> Applied.
I'm sorry - it turns out this one does not fully
work as expected.
This one is better (it's relative to the old master)
- so it might cause a conflict:
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.
Fix this warning:
RFCTransport.C: In function 'long unsigned int writeToFileDesc(const char*, int,
__va_list_tag*)':
RFCTransport.C:91: warning: 'DtMailBoolean' is promoted to 'int' when passed thr
ough '...'
RFCTransport.C:91: warning: (so you should pass 'int' not 'DtMailBoolean' to 'va
_arg')
RFCTransport.C:91: note: if this code is reached, the program will abort
Having a difficult choice between unplasant
cast to get a void * into an enumeration type
and "Something's wrong here" double cast
I decided for the latter.
At least it does not crash when the legal
value of zero is passed as the argument.
Avoid overwrite of local variables when using
short (int, etc.) types with XtVaGetValues().
Cast XtPointer using (XtArgVal) without
the need to use C99 <stdint.h> and friends.
Fix SIGSEGV because of implicit declaration
of _XmStringUngenerate.
The error message reported to the user was:
TT_ERR_PROCID The process id passed is not valid.
XtArgVal should be a type that encompasses XtPointer
and long integer types. In the X.org implementation
it is currently defined as (long).
Don't use (unsigned int *) instead of (Window *).
Use /usr/local/bin/lpq from CUPS for FreeBSD
for now; this prevents immediate dtprintinfo
crash.
In the future we should handle both built-in
/usr/bin/lpq as well as CUPS /usr/local/bin/lpq
output in separate functions.
Code to support CUPS should probably shared between
other operating systems.
When asking for data using XtVaGetValue()
make sure that there is enough place for
the return value (which is sometimes XtPointer).
Providing pointer to (int) is not enough.
Cast XtPointer into requested int types
directly, which unfortunately introduces
compilation warning:
cast from pointer to integer of different size
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.
* Revert changes to programs/dtsearchpath/libCliSrv/UnixEnv.C
introduced by c3cb5b8aa6
that could have produced disappearing Application Manager
icons on FreeBSD
* Introduce SearchPath:useSystemPath() virtual method to tell
dtsearchpath to leave some environment variables alone.
It is currently overriden for FreeBSD only if the MANPATH
is empty (system default). Other operating systems
might want to override it if they prefer to have distribution
specific control of a search path in effect.
* Symlink /usr/dt/share/man to /usr/dt/man for FreeBSD
This allows dtsearchpath to actually include /usr/dt/man
in the MANPATH when MANPATH override is in effect.
The dtexec code assumes that fstat reports pipe's readable chars.
Linux always reports 0 for st_size of a pipe.
Instead read one character when select reports readable.
Note EOF when select says readable but read returns 0.