use a patchfile to augment init.c instead of copying it entirely
This commit is contained in:
57
cde/programs/dtksh/init.patch
Normal file
57
cde/programs/dtksh/init.patch
Normal file
@@ -0,0 +1,57 @@
|
||||
--- ./ksh93/src/cmd/ksh93/sh/init.c 2020-11-22 15:34:35.964537420 -0600
|
||||
+++ init.c 2020-12-31 19:31:00.091176802 -0600
|
||||
@@ -48,6 +48,38 @@
|
||||
#include "lexstates.h"
|
||||
#include "version.h"
|
||||
|
||||
+#ifdef BUILD_DTKSH
|
||||
+#include <Dt/DtNlUtils.h>
|
||||
+#include <Dt/EnvControlP.h>
|
||||
+#include <stdio.h>
|
||||
+#include <nl_types.h>
|
||||
+#include <X11/X.h>
|
||||
+#include <X11/Intrinsic.h>
|
||||
+#include <X11/IntrinsicP.h>
|
||||
+#include <X11/CoreP.h>
|
||||
+#include <X11/StringDefs.h>
|
||||
+#include <Xm/XmStrDefs.h>
|
||||
+#include <setjmp.h>
|
||||
+#include <string.h>
|
||||
+#include <ctype.h>
|
||||
+#include <Xm/Xm.h>
|
||||
+#include <Xm/Protocols.h>
|
||||
+#include "hash.h"
|
||||
+#include "stdio.h"
|
||||
+
|
||||
+#define NO_AST
|
||||
+#include "dtksh.h"
|
||||
+#undef NO_AST
|
||||
+#include "xmksh.h"
|
||||
+#include "dtkcmds.h"
|
||||
+#include "xmcvt.h"
|
||||
+#include "widget.h"
|
||||
+#include "extra.h"
|
||||
+#include "xmwidgets.h"
|
||||
+#include "msgs.h"
|
||||
+#include <locale.h>
|
||||
+#endif
|
||||
+
|
||||
#if _hdr_wctype
|
||||
#include <ast_wchar.h>
|
||||
#include <wctype.h>
|
||||
@@ -1469,6 +1501,16 @@
|
||||
#endif
|
||||
if(shp->userinit=userinit)
|
||||
(*userinit)(shp, 0);
|
||||
+#ifdef BUILD_DTKSH
|
||||
+ int * lockedFds = LockKshFileDescriptors();
|
||||
+ (void) XtSetLanguageProc((XtAppContext)NULL, (XtLanguageProc)NULL,
|
||||
+ (XtPointer)NULL);
|
||||
+ DtNlInitialize();
|
||||
+ _DtEnvControl(DT_ENV_SET);
|
||||
+ UnlockKshFileDescriptors(lockedFds);
|
||||
+
|
||||
+ dtksh_init();
|
||||
+#endif
|
||||
return(shp);
|
||||
}
|
||||
Reference in New Issue
Block a user