Merge branch 'master' of ssh://git.code.sf.net/p/cdesktopenv/code
[oweals/cde.git] / cde / programs / dtfile / Find.c
index 094d2854ce1f04a07972a1114402b4f20ca718f0..cfcc87446eb81b9237f705d6945a98d9bc61485f 100644 (file)
 #include <Dt/Connect.h>
 #include <Dt/DtNlUtils.h>
 #include <Dt/HourGlass.h>
+#include <Dt/Dts.h>
+#include <Dt/SharedProcs.h>
 
 #include <Tt/tttk.h>
 
+#include <Xm/XmPrivate.h> /* _XmStringUngenerate */
+
 #include "Encaps.h"
 #include "SharedProcs.h"
 #include "FileMgr.h"
@@ -236,7 +240,7 @@ static void InvalidFindMessage(
                         FindRec *find_rec,
                         int messageIndex,
                         String extra_string) ;
-static int FreeMatchInfo(
+static void FreeMatchInfo(
                         String *matches,
                         int numMatches) ;
 static void LeaveStopBttn(
@@ -951,7 +955,7 @@ GetDefaultValues( void )
    find_data->height = 0;
    find_data->width = 0;
 
-   (char *)getcwd((char *)dirbuf, (unsigned int)MAX_DIR_PATH_LEN);
+   (void)getcwd((char *)dirbuf, (unsigned int)MAX_DIR_PATH_LEN);
    if(restrictMode &&
            strncmp(users_home_dir, dirbuf, strlen(users_home_dir)) != 0)
    {
@@ -1391,7 +1395,7 @@ InvalidFindMessage(
  *
  ************************************************************************/
 
-static int
+static void
 FreeMatchInfo(
         String *matches,
         int numMatches )
@@ -2158,7 +2162,7 @@ AlternateInputHandler(
 
       if (offset > 0)
       {
-         buf[offset] = NULL;
+         buf[offset] = '\0';
          buf = (String) DtEliminateDots (buf);
 
          if ((stat (buf, &stat_data) == 0) ||
@@ -2310,7 +2314,7 @@ AlternateInputHandler2(
 
       if (offset > 0)
       {
-         buf[offset] = NULL;
+         buf[offset] = '\0';
          buf = (String) DtEliminateDots (buf);
 
          if ((stat (buf, &stat_data) == 0) ||
@@ -2429,7 +2433,7 @@ AlternateInputHandler3(
 
       if (offset > 0)
       {
-         buf[offset] = NULL;
+         buf[offset] = '\0';
          buf = (String) DtEliminateDots (buf);
 
          if ((stat (buf, &stat_data) == 0) ||
@@ -2887,7 +2891,7 @@ findpopen(cmd,mode,childpid)
          (void) fcntl(childside, F_DUPFD, read_or_write);
          (void) close(childside);        /* Save a file descriptor */
       }
-      (void) execl("/bin/ksh", "ksh", "-c", cmd, (char *)0);
+      (void) execl(KORNSHELL, "ksh", "-c", cmd, (char *)0);
      /* Need to process the error return */
 
       DBGFORK(("%s:  child exiting\n", pname));