This code always buffer overflowed, because exactly 2 bytes
less than were used were allocated. This led to dtcreate
crashing when hitting "Find Set..."
The following font families
(or their aliases) will be used:
-adobe-courier-bold-o-normal--*-
-adobe-courier-bold-r-normal--*-
-adobe-courier-medium-o-normal--*-
-adobe-courier-medium-r-normal--*-
-adobe-helvetica-bold-o-normal--*-
-adobe-helvetica-bold-r-normal--*-
-adobe-helvetica-medium-o-normal--*-
-adobe-helvetica-medium-r-normal--*-
-adobe-symbol-medium-r-normal--*-
-adobe-times-bold-i-normal--*-
-adobe-times-bold-r-normal--*-
-adobe-times-medium-i-normal--*-
-adobe-times-medium-r-normal--*-
-b&h-lucidasans-medium-r-normal-sans-*-
-b&h-lucidatypewriter-bold-r-normal-sans-*-
-b&h-lucidatypewriter-medium-r-normal-sans-*-
The files will be installed in
/usr/dt/config/xfonts/C
This directory should be added to the
X server font path:
xset fp+ /usr/dt/config/xfonts/C
and/or via
FontPath "/usr/dt/config/xfonts/C"
in the "Files" section of the xorg.conf file.
We have
pid_t
wait3(int *status, int options, struct rusage *rusage);
on FreeBSD and we don't need (union wait) handling.
Another good candidate for one #ifdef from imake templates.
We have already OPT_BSD_WAIT in ToolTalk's tt_options.h
Add preprocessor directives not to try
to redefine sys_errlist[] or sys_nerr
There are already definitions:
extern __const char *__const sys_errlist[];
extern __const int sys_nerr;
in <stdio.h>
Actually we should have something like
NeedSysErrlist in imake definitions
to get rid of those #ifdefs.
This code tried to automatically generate the X DISPLAY
from the combination of the hostname and display number;
however 127.0.0.1:0 is normally rejected by X11, so this
technique is no good. Fixes dticon hang on startup, caused by
XOpenDisplay failure leading to this message from tttrace:
tt_default_session_set(0x0x875190=="X 127.0.0.1 0") = 1032 (TT_ERR_ACCESS)
BSD make interrupts shell pipeline after
if it cannot run the command:
rm -f Mrm.msg
ln -s ../../../../imports/motif/localized/de_DE.ISO8859-1/msg/Mrm.msg Mrm.msg
Running mkcatdefs for Mrm.cat with LANG set to de_DE.ISO8859-1
( rm -f Mrm.cat Mrm.tmp.msg; LANG=de_DE.ISO8859-1; export LANG; ../../../../imports/motif/localized/util/mkcatdefs Mrm Mrm.msg -h > Mrm.tmp.msg; gencat Mrm.cat Mrm.tmp.msg; rm -f Mrm.tmp.msg )
../../../../imports/motif/localized/util/mkcatdefs: not found
*** Error code 127
After this, an empty Mrm.tmp.msg is left.
- Const strings referenced by non-const variables.
- Incorrect format specifers for printing addresses
- Unused variables
- Signed comparison to unsigned
Also fix an incorrect enumeration value in a switch statement.
Introduce KORNSHELL make variable to point
to the implementation of the Korn Shell.
Use $(SHELL) or $(KORNSHELL) explicitly for
make programs that do not automatically call
shell scripts from the current directory.
dtksh can be now compiled on FreeBSD. Work in progress.
Needs a real Korn shell to bootstrap as $(KSHELL).
KSHELL is set by default to /usr/local/bin/ksh93
(generic POSIX shell may not work)
Tested on:
FreeBSD 9.0-BETA1 #0 r224912M amd64
Known issues:
xvmstat:
* sleep does not work well (SIGSTOP is delivered)
xpong:
* xpong: line 220: ball1x = max_x * 2.2 / 3 : arithmetic syntax error
* dtksh is rebuilt uncondtionally every time make is invoked
Fixes many, though not all 64bit-warnings. In lots of places, pointers are
cast to ints to be then used as array subscripts. The only way to deal with
this is to change them to long. Additionally, use calloc() to allocate the
int_array in istr.c and drop the (wrong) macro patch to istr.h. Should make
dtbuilder work on 32bit again.
Fixes:
agent.c: In function '_DtCm_init_agent':
agent.c:160: warning: passing argument 5 of 'registerrpc' from incompatible pointer type
agent.c:160: warning: passing argument 6 of 'registerrpc' from incompatible pointer type
agent.c:167: warning: passing argument 5 of 'registerrpc' from incompatible pointer type
agent.c:167: warning: passing argument 6 of 'registerrpc' from incompatible pointer type
This reverts commit 0d2f7866ac.
This causes great mayhem in building/generating dtbuilder .msg files
(corrupting them, and inserting '(nil)' all over the place).
These would cause dtbuilder, and any other program built by dtcodegen
to have screwed up colors, missing callbacks and other mayhem.
This was confirmed by others on the list - reverting this made those
issues go away.
It may be that the int -> long is correct, but the NULL check
certainly does not seem to do what was intended. I'll leave it up to
Pascal to investigate :)
cpp was removed from /usr/libexec with FreeBSD 5.0-RELEASE.
Use __FreeBSD_version to tell imake if it's still there.
While here, X.Y.Z versioning ended with FreeBSD 3.0, so
we must be dealing with 2.Y.Z when checking for -lgnumalloc.
A patch from Pascal Stumpf using external jpeg broke linux builds,
since libjpeg needs to be linked in when using a remote jpeg lib.
So, in lnxLib.tmpl, define SharedDtHelpReqs so -ljpeg is used. Also,
in DtHelp/Imakefile, use proper Arch defines so external jpeg libs are
only used on linux, fbsd, and obsd systems.
This is a non-POSIX/ISO-C header. It is ok to include this on Linux, but it
is obsolete on BSD; FreeBSD even throws an error if you include it with
__STDC__ defined. Every system should nowadays have malloc() defined in
stdlib.h.
Diff is largely mechanical, replacing malloc.h with stdlib.h where it is not
yet included anyway.
Nowadays, OpenMotif is itself linked to libjpeg, so pulling in another
version of it causes symbol size mismatches, not to mention the maintenance
burden and security implications arising from keeping our own copy of libjpeg.
We still need some of the header files provided here because they are internal
to libjpeg and not installed on most distributions.
In part of the tooltalk rpc code (mp_message.c), it was assumed that on
the majority of platforms, sizeof(uid_t)=sizeof(gid_t)=sizeof(long). On
Linux-x64, uid_t is an unsigned int, which makes the code fail: all
tooltalk messages fail to send with an RPC_CANTENCODEARGS at the
rpc-level, and TT_INTERNAL_ERR for the actual program. We instead
change the code to explicitly examine sizeof(uid_t) to see whether it is
int or long sized. This allows tooltalk-dependent functinoality
like logout and multiple calls to dtfile to work.
Enums may be represented with a smaller type than int; however, they are
automatically promoted to int when passed in va_arg lists, just as
short, char, etc. are. GCC thus "knows" that you never want to call
va_arg with an enum type, and instead inserts an abort.