cdesktopenv/cde/programs/dtfile
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
..
dtcopy Fixes for dtfile on OpenBSD, plus missing prototypes. Use statfs() on BSD to find out if a file system is NFS. 2012-08-10 14:13:45 -06:00
ChangeDir.c Add GNU LGPL headers to all .c .C and .h files 2012-03-10 18:58:32 +00:00
ChangeDir.h Add GNU LGPL headers to all .c .C and .h files 2012-03-10 18:58:32 +00:00
ChangeDirP.c Add GNU LGPL headers to all .c .C and .h files 2012-03-10 18:58:32 +00:00
Command.c Add GNU LGPL headers to all .c .C and .h files 2012-03-10 18:58:32 +00:00
Common.c Add GNU LGPL headers to all .c .C and .h files 2012-03-10 18:58:32 +00:00
Common.h Add GNU LGPL headers to all .c .C and .h files 2012-03-10 18:58:32 +00:00
Desktop.c Fixes for dtfile on OpenBSD, plus missing prototypes. Use statfs() on BSD to find out if a file system is NFS. 2012-08-10 14:13:45 -06:00
Desktop.h Add GNU LGPL headers to all .c .C and .h files 2012-03-10 18:58:32 +00:00
Directory.c Add GNU LGPL headers to all .c .C and .h files 2012-03-10 18:58:32 +00:00
Dtfile Initial import of the CDE 2.1.30 sources from the Open Group. 2012-03-10 18:21:40 +00:00
Encaps.c Add GNU LGPL headers to all .c .C and .h files 2012-03-10 18:58:32 +00:00
Encaps.h Add GNU LGPL headers to all .c .C and .h files 2012-03-10 18:58:32 +00:00
File.c Add GNU LGPL headers to all .c .C and .h files 2012-03-10 18:58:32 +00:00
FileDialog.c Add GNU LGPL headers to all .c .C and .h files 2012-03-10 18:58:32 +00:00
FileManip.c Fixes for dtfile on OpenBSD, plus missing prototypes. Use statfs() on BSD to find out if a file system is NFS. 2012-08-10 14:13:45 -06:00
FileMgr.c Add GNU LGPL headers to all .c .C and .h files 2012-03-10 18:58:32 +00:00
FileMgr.h Add GNU LGPL headers to all .c .C and .h files 2012-03-10 18:58:32 +00:00
FileOp.c Add GNU LGPL headers to all .c .C and .h files 2012-03-10 18:58:32 +00:00
Filter.c Fixes for dtfile on OpenBSD, plus missing prototypes. Use statfs() on BSD to find out if a file system is NFS. 2012-08-10 14:13:45 -06:00
Filter.h Add GNU LGPL headers to all .c .C and .h files 2012-03-10 18:58:32 +00:00
FilterP.c Add GNU LGPL headers to all .c .C and .h files 2012-03-10 18:58:32 +00:00
Find.c Use KORNSHELL variable instead of /bin/ksh 2012-08-23 20:00:43 -06:00
Find.h Add GNU LGPL headers to all .c .C and .h files 2012-03-10 18:58:32 +00:00
FindP.c Add GNU LGPL headers to all .c .C and .h files 2012-03-10 18:58:32 +00:00
Help.c Add GNU LGPL headers to all .c .C and .h files 2012-03-10 18:58:32 +00:00
Help.h Add GNU LGPL headers to all .c .C and .h files 2012-03-10 18:58:32 +00:00
HelpCB.c Get rid of malloc.h. 2012-08-12 14:20:58 -06:00
HelpP.c Add GNU LGPL headers to all .c .C and .h files 2012-03-10 18:58:32 +00:00
IconWindow.c Add GNU LGPL headers to all .c .C and .h files 2012-03-10 18:58:32 +00:00
IconicPath.c Add GNU LGPL headers to all .c .C and .h files 2012-03-10 18:58:32 +00:00
IconicPath.h Add GNU LGPL headers to all .c .C and .h files 2012-03-10 18:58:32 +00:00
IconicPathP.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
Main.c Get rid of malloc.h. 2012-08-12 14:20:58 -06:00
Main.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
MkDir.c Fixes for dtfile on OpenBSD, plus missing prototypes. Use statfs() on BSD to find out if a file system is NFS. 2012-08-10 14:13:45 -06:00
ModAttr.c Add GNU LGPL headers to all .c .C and .h files 2012-03-10 18:58:32 +00:00
ModAttr.h Add GNU LGPL headers to all .c .C and .h files 2012-03-10 18:58:32 +00:00
ModAttrP.c Add GNU LGPL headers to all .c .C and .h files 2012-03-10 18:58:32 +00:00
MultiView.c Add GNU LGPL headers to all .c .C and .h files 2012-03-10 18:58:32 +00:00
MultiView.h Add GNU LGPL headers to all .c .C and .h files 2012-03-10 18:58:32 +00:00
OverWrite.c Add GNU LGPL headers to all .c .C and .h files 2012-03-10 18:58:32 +00:00
Prefs.c Add GNU LGPL headers to all .c .C and .h files 2012-03-10 18:58:32 +00:00
Prefs.h Add GNU LGPL headers to all .c .C and .h files 2012-03-10 18:58:32 +00:00
PrefsP.c Add GNU LGPL headers to all .c .C and .h files 2012-03-10 18:58:32 +00:00
SharedMsgs.c Get rid of malloc.h. 2012-08-12 14:20:58 -06:00
SharedMsgs.h Add GNU LGPL headers to all .c .C and .h files 2012-03-10 18:58:32 +00:00
SharedProcs.c Fixes for dtfile on OpenBSD, plus missing prototypes. Use statfs() on BSD to find out if a file system is NFS. 2012-08-10 14:13:45 -06:00
SharedProcs.h Fixes for dtfile on OpenBSD, plus missing prototypes. Use statfs() on BSD to find out if a file system is NFS. 2012-08-10 14:13:45 -06:00
ToolTalk.c Add GNU LGPL headers to all .c .C and .h files 2012-03-10 18:58:32 +00:00
Trash.c Fixes for dtfile on OpenBSD, plus missing prototypes. Use statfs() on BSD to find out if a file system is NFS. 2012-08-10 14:13:45 -06:00
Utils.c Add GNU LGPL headers to all .c .C and .h files 2012-03-10 18:58:32 +00:00
dterror.src Initial import of the CDE 2.1.30 sources from the Open Group. 2012-03-10 18:21:40 +00:00
dtfile.config.cpp Initial import of the CDE 2.1.30 sources from the Open Group. 2012-03-10 18:21:40 +00:00
dtfile.man Initial import of the CDE 2.1.30 sources from the Open Group. 2012-03-10 18:21:40 +00:00
dtfile.msg Initial import of the CDE 2.1.30 sources from the Open Group. 2012-03-10 18:21:40 +00:00
dtfile_error.cpp Initial import of the CDE 2.1.30 sources from the Open Group. 2012-03-10 18:21:40 +00:00
fsDialog.c Add GNU LGPL headers to all .c .C and .h files 2012-03-10 18:58:32 +00:00
mapfile.reorder Initial import of the CDE 2.1.30 sources from the Open Group. 2012-03-10 18:21:40 +00:00
nlsMsgChk.txt Initial import of the CDE 2.1.30 sources from the Open Group. 2012-03-10 18:21:40 +00:00
nlsREADME.txt Initial import of the CDE 2.1.30 sources from the Open Group. 2012-03-10 18:21:40 +00:00
version.c Add GNU LGPL headers to all .c .C and .h files 2012-03-10 18:58:32 +00:00