cdesktopenv/cde/programs/dtprintinfo/libUI/MotifUI
Marcin Cieslak 17a33f0430 Use KORNSHELL variable instead of /bin/ksh
This patch removes instances of hardcoded
invocation of /bin/ksh and allows to
replace it with, for, example,
/usr/local/bin/ksh93

Also "ksh93" is accepted whenever "ksh" is.

Tested using the following /bin/ksh:

----8<----
WHAT=`ps -o command= -p $PPID`
msg="Something tried to call /bin/ksh: $PPID: $WHAT"
print -u2 "$msg"
logger user.warn "$msg"
exit 99
----8<----
(Warning: first two lines are FreeBSD specific)

Scripts from Makefiles should now be executed either
with

$(KORNSHELL) korn-shell-script

or

$(SHELL) bourne-shell-script

therefore #!/bin/ksh has not been changed everywhere.

/usr/dt/bin/ scripts have been converted (e.g. Xsession)

Whenever possible Imake and CPP facilities have been used.

For C and C++ programs KORNSHELL needs to be defined to
"/path/to/your/ksh" (with quotes) so that it can make
a valid C constant.

Therefore, when adding KORNSHELL to Imakefile for C files,
you have to add

CXXEXTRA_DEFINES = -DKORNSHELL=\"$(KORNSHELL)\"

or similar (for example, see programs/dtprintinfo)

But for simple shell script substitution we usually change

 LOCAL_CPP_DEFINES = -DCDE_CONFIGURATION_TOP=$(CDE_CONFIGURATION_TOP) \
                     -DCDE_INSTALLATION_TOP=$(CDE_INSTALLATION_TOP) \
                     -DCDE_LOGFILES_TOP=$(CDE_LOGFILES_TOP)

to:

 LOCAL_CPP_DEFINES = -DCDE_CONFIGURATION_TOP=$(CDE_CONFIGURATION_TOP) \
                     -DCDE_INSTALLATION_TOP=$(CDE_INSTALLATION_TOP) \
                     -DCDE_LOGFILES_TOP=$(CDE_LOGFILES_TOP) \
                     -DKORNSHELL=$(KORNSHELL) \
                     -DXPROJECTROOT=X11ProjectRoot

since we don't want quotes for shell scripts.
2012-08-23 20:00:43 -06:00
..
Application.C Add GNU LGPL headers to all .c .C and .h files 2012-03-10 18:58:32 +00:00
Application.h Add GNU LGPL headers to all .c .C and .h files 2012-03-10 18:58:32 +00:00
Button.C Add GNU LGPL headers to all .c .C and .h files 2012-03-10 18:58:32 +00:00
Button.h Add GNU LGPL headers to all .c .C and .h files 2012-03-10 18:58:32 +00:00
ComboBoxObj.C Add GNU LGPL headers to all .c .C and .h files 2012-03-10 18:58:32 +00:00
ComboBoxObj.h Add GNU LGPL headers to all .c .C and .h files 2012-03-10 18:58:32 +00:00
Container.C Add GNU LGPL headers to all .c .C and .h files 2012-03-10 18:58:32 +00:00
Container.h Add GNU LGPL headers to all .c .C and .h files 2012-03-10 18:58:32 +00:00
Debug.c FreeBSD does not need extern char *sys_errlist[] 2012-08-15 15:58:46 -06:00
Dialog.C Add GNU LGPL headers to all .c .C and .h files 2012-03-10 18:58:32 +00:00
Dialog.h Add GNU LGPL headers to all .c .C and .h files 2012-03-10 18:58:32 +00:00
DtDND.C Add GNU LGPL headers to all .c .C and .h files 2012-03-10 18:58:32 +00:00
DtDND.h Add GNU LGPL headers to all .c .C and .h files 2012-03-10 18:58:32 +00:00
Group.C Add GNU LGPL headers to all .c .C and .h files 2012-03-10 18:58:32 +00:00
Group.h Add GNU LGPL headers to all .c .C and .h files 2012-03-10 18:58:32 +00:00
HelpSystem.C Add GNU LGPL headers to all .c .C and .h files 2012-03-10 18:58:32 +00:00
HelpSystem.h Add GNU LGPL headers to all .c .C and .h files 2012-03-10 18:58:32 +00:00
Icon.c Add GNU LGPL headers to all .c .C and .h files 2012-03-10 18:58:32 +00:00
Icon.h Add GNU LGPL headers to all .c .C and .h files 2012-03-10 18:58:32 +00:00
IconObj.C Add GNU LGPL headers to all .c .C and .h files 2012-03-10 18:58:32 +00:00
IconObj.h Add GNU LGPL headers to all .c .C and .h files 2012-03-10 18:58:32 +00:00
IconP.h Add GNU LGPL headers to all .c .C and .h files 2012-03-10 18:58:32 +00:00
Imakefile Use KORNSHELL variable instead of /bin/ksh 2012-08-23 20:00:43 -06:00
LabelObj.C Add GNU LGPL headers to all .c .C and .h files 2012-03-10 18:58:32 +00:00
LabelObj.h Add GNU LGPL headers to all .c .C and .h files 2012-03-10 18:58:32 +00:00
MainWindow.C Add GNU LGPL headers to all .c .C and .h files 2012-03-10 18:58:32 +00:00
MainWindow.h Add GNU LGPL headers to all .c .C and .h files 2012-03-10 18:58:32 +00:00
Menu.C Add GNU LGPL headers to all .c .C and .h files 2012-03-10 18:58:32 +00:00
Menu.h Add GNU LGPL headers to all .c .C and .h files 2012-03-10 18:58:32 +00:00
MenuBar.C Add GNU LGPL headers to all .c .C and .h files 2012-03-10 18:58:32 +00:00
MenuBar.h Add GNU LGPL headers to all .c .C and .h files 2012-03-10 18:58:32 +00:00
MotifThread.C Use KORNSHELL variable instead of /bin/ksh 2012-08-23 20:00:43 -06:00
MotifThread.h Add GNU LGPL headers to all .c .C and .h files 2012-03-10 18:58:32 +00:00
MotifUI.C Add GNU LGPL headers to all .c .C and .h files 2012-03-10 18:58:32 +00:00
MotifUI.h Add GNU LGPL headers to all .c .C and .h files 2012-03-10 18:58:32 +00:00
Prompt.C Add GNU LGPL headers to all .c .C and .h files 2012-03-10 18:58:32 +00:00
Prompt.h Add GNU LGPL headers to all .c .C and .h files 2012-03-10 18:58:32 +00:00
ScaleObj.C Add GNU LGPL headers to all .c .C and .h files 2012-03-10 18:58:32 +00:00
ScaleObj.h Add GNU LGPL headers to all .c .C and .h files 2012-03-10 18:58:32 +00:00
Sep.C Add GNU LGPL headers to all .c .C and .h files 2012-03-10 18:58:32 +00:00
Sep.h Add GNU LGPL headers to all .c .C and .h files 2012-03-10 18:58:32 +00:00
WorkArea.c Add GNU LGPL headers to all .c .C and .h files 2012-03-10 18:58:32 +00:00
WorkArea.h Add GNU LGPL headers to all .c .C and .h files 2012-03-10 18:58:32 +00:00
WorkAreaP.h Add GNU LGPL headers to all .c .C and .h files 2012-03-10 18:58:32 +00:00