The maintainer of ksh93 suggested that I use the Empty macro (" \t\n"+3) 
instead of an empty string, both function the exact same but apparently there 
is a chance "" could conflict with some ksh93 internals, so I am fixing it.

Thank you for your time,
-Chase
From c88ab45459ff555e780b586021650eb9c5245a0d Mon Sep 17 00:00:00 2001
From: Chase <nicetry...@protonmail.ch>
Date: Fri, 11 Dec 2020 14:09:56 -0600
Subject: [PATCH] dtkcmds.c: use Empty macro instead of empty string

---
 cde/programs/dtksh/dtkcmds.c | 45 ++++++++++++++++++------------------
 1 file changed, 23 insertions(+), 22 deletions(-)

diff --git a/cde/programs/dtksh/dtkcmds.c b/cde/programs/dtksh/dtkcmds.c
index 609aa1230..43c5b1baa 100644
--- a/cde/programs/dtksh/dtkcmds.c
+++ b/cde/programs/dtksh/dtkcmds.c
@@ -57,6 +57,7 @@
 #include <Tt/tt_c.h>
 #include "hash.h"
 #include "stdio.h"
+#include "defs.h"
 #define NO_AST
 #include "dtksh.h"
 #undef NO_AST
@@ -7897,7 +7898,7 @@ nopCreateDisc(
 
    np2 = CreateEmptyNameValuePair(np, token, fp);
    XtFree(dupName);
-   fp->last = "";
+   fp->last = Empty;
    return(np2);
 }
 
@@ -7940,7 +7941,7 @@ dftCreateDisc(
       np2 = CreateEmptyNameValuePair(np, token, fp);
 
    XtFree(dupName);
-   fp->last = "";
+   fp->last = Empty;
    return(np2);
 }
 
@@ -7971,7 +7972,7 @@ ehCreateDisc(
    token = strtok(tmpBuf, ".");
    np2 = ProcessCallbackEvent(event, np, token, fp);
    XtFree(tmpBuf);
-   fp->last = "";
+   fp->last = Empty;
    return(np2);
 }
 
@@ -8002,7 +8003,7 @@ transCreateDisc(
    token = strtok(tmpBuf, ".");
    np2 = ProcessCallbackEvent(event, np, token, fp);
    XtFree(tmpBuf);
-   fp->last = "";
+   fp->last = Empty;
    return(np2);
 }
 
@@ -8042,7 +8043,7 @@ scaleCreateDisc(
       np2 = CreateEmptyNameValuePair(np, token, fp);
 
    XtFree(dupName);
-   fp->last = "";
+   fp->last = Empty;
    return(np2);
 }
 
@@ -8090,7 +8091,7 @@ arrowCreateDisc(
       np2 = CreateEmptyNameValuePair(np, token, fp);
 
    XtFree(dupName);
-   fp->last = "";
+   fp->last = Empty;
    return(np2);
 }
 
@@ -8136,7 +8137,7 @@ comboCreateDisc(
       np2 = CreateEmptyNameValuePair(np, token, fp);
 
    XtFree(dupName);
-   fp->last = "";
+   fp->last = Empty;
    return(np2);
 }
 
@@ -8185,7 +8186,7 @@ cmdCreateDisc(
       np2 = CreateEmptyNameValuePair(np, token, fp);
 
    XtFree(dupName);
-   fp->last = "";
+   fp->last = Empty;
    return(np2);
 }
 
@@ -8225,7 +8226,7 @@ dAreaCreateDisc(
       np2 = CreateEmptyNameValuePair(np, token, fp);
 
    XtFree(dupName);
-   fp->last = "";
+   fp->last = Empty;
    return(np2);
 }
 
@@ -8275,7 +8276,7 @@ dbtnCreateDisc(
       np2 = CreateEmptyNameValuePair(np, token, fp);
 
    XtFree(dupName);
-   fp->last = "";
+   fp->last = Empty;
    return(np2);
 }
 
@@ -8354,7 +8355,7 @@ fselCreateDisc(
       np2 = CreateEmptyNameValuePair(np, token, fp);
 
    XtFree(dupName);
-   fp->last = "";
+   fp->last = Empty;
    return(np2);
 }
 
@@ -8453,7 +8454,7 @@ listCreateDisc(
       np2 =  CreateEmptyNameValuePair(np, token, fp);
 
    XtFree(dupName);
-   fp->last = "";
+   fp->last = Empty;
    return(np2);
 }
 
@@ -8501,7 +8502,7 @@ pbtnCreateDisc(
       np2 = CreateEmptyNameValuePair(np, token, fp);
 
    XtFree(dupName);
-   fp->last = "";
+   fp->last = Empty;
    return(np2);
 }
 
@@ -8555,7 +8556,7 @@ rcCreateDisc(
       np2 = CreateEmptyNameValuePair(np, token, fp);
 
    XtFree(dupName);
-   fp->last = "";
+   fp->last = Empty;
    return(np2);
 }
 
@@ -8602,7 +8603,7 @@ sbarCreateDisc(
       np2 = CreateEmptyNameValuePair(np, token, fp);
 
    XtFree(dupName);
-   fp->last = "";
+   fp->last = Empty;
    return(np2);
 }
 
@@ -8644,7 +8645,7 @@ swinCreateDisc(
       np2 = CreateEmptyNameValuePair(np, token, fp);
 
    XtFree(dupName);
-   fp->last = "";
+   fp->last = Empty;
    return(np2);
 }
 
@@ -8693,7 +8694,7 @@ sboxCreateDisc(
       np2 = CreateEmptyNameValuePair(np, token, fp);
 
    XtFree(dupName);
-   fp->last = "";
+   fp->last = Empty;
    return(np2);
 }
 
@@ -8733,7 +8734,7 @@ tbtnCreateDisc(
       np2 = CreateEmptyNameValuePair(np, token, fp);
 
    XtFree(dupName);
-   fp->last = "";
+   fp->last = Empty;
    return(np2);
 }
 
@@ -8894,7 +8895,7 @@ textCreateDisc(
       np2 = CreateEmptyNameValuePair(np, token, fp);
 
    XtFree(dupName);
-   fp->last = "";
+   fp->last = Empty;
    return(np2);
 }
 
@@ -9006,7 +9007,7 @@ textCreateDisc2(
 
    XtFree(nameCopy);
    XtFree(dupName);
-   fp->last = "";
+   fp->last = Empty;
    return(np2);
 }
 
@@ -9085,7 +9086,7 @@ helpCreateDisc(
       np2 = CreateEmptyNameValuePair(np, token, fp);
 
    XtFree(dupName);
-   fp->last = "";
+   fp->last = Empty;
    return(np2);
 }
 
@@ -9125,7 +9126,7 @@ dtPrintSetupProcDisc(
       np2 = CreateEmptyNameValuePair(np, token, fp);
 
    XtFree(dupName);
-   fp->last = "";
+   fp->last = Empty;
    return(np2);
 }
 
-- 
2.17.1

_______________________________________________
cdesktopenv-devel mailing list
cdesktopenv-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cdesktopenv-devel

Reply via email to