dtksh: remove needless OS defines
authorChase <nicetrynsa@protonmail.ch>
Sun, 15 Dec 2019 16:28:22 +0000 (10:28 -0600)
committerJon Trulson <jon@radscan.com>
Sun, 15 Dec 2019 21:07:52 +0000 (14:07 -0700)
cde/programs/dtksh/dtkcvt.c
cde/programs/dtksh/xmcmds.c

index a03ccf6f174c946e3849307202697ed4155dc8b4..04a695949c84d7855c632e69321e53b9f239440d 100644 (file)
 #include "xmwidgets.h"
 #include "msgs.h"
 
-#if defined(SYSV) || defined(SVR4_0) || defined(SVR4) || defined(CSRG_BASED) \
- || defined(__linux__) || defined(sun)
-#define lsprintf sprintf
-#endif
-
 extern Hashtab_t * Wclasses;
 
 
@@ -486,9 +481,9 @@ DtkshCvtCallbackToString(
             break;
          }
          if (count > 0)
-            p += lsprintf(p, "|%s", (String)cdata->ksh_cmd);
+            p += sprintf(p, "|%s", (String)cdata->ksh_cmd);
          else
-            p += lsprintf(p, "%s", (String)cdata->ksh_cmd);
+            p += sprintf(p, "%s", (String)cdata->ksh_cmd);
          count++;
       }
    }
index 0742989628d359571eb38239faab26802ce1291f..e3f1e8bd58c359432f26c6b5dbd444ef3a5f03fc 100644 (file)
@@ -3737,10 +3737,7 @@ do_catopen(
    char * ptr;
    nl_catd nlmsg_fd = (nl_catd)-1;
    char * errmsg;
-#if defined(SVR4) || defined (_AIX) || defined(CSRG_BASED) || \
-    defined(__linux__) || defined(sun)
    char * nextMatch;
-#endif
 
    if (argc != 3)
    {
@@ -3762,8 +3759,6 @@ do_catopen(
        */
 
       altCatName = XtMalloc(strlen(catName) + 10);
-#if defined(SVR4) || defined (_AIX) || defined(CSRG_BASED) || \
-    defined(__linux__) || defined(sun)
       /* These platforms don't have strrstr() */
       ptr = NULL;
       nextMatch = catName;
@@ -3772,9 +3767,6 @@ do_catopen(
          ptr = nextMatch;
          nextMatch++;
       }
-#else
-      ptr = (char *)strrstr(catName, ".cat");
-#endif
       if (ptr && (strlen(ptr) == 4))
       {
          /* Strip off the ".cat", and try again */