X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=cde%2Fprograms%2Fdtfile%2FFind.c;h=cfcc87446eb81b9237f705d6945a98d9bc61485f;hb=3a9bac86e37e23abbf1d3dc30c4013c174159b90;hp=61a6b341c55c71ab5a0917b4aa0b62d931aa28e0;hpb=c884521619ded86baea5e0a74c8d0d2234c232fe;p=oweals%2Fcde.git diff --git a/cde/programs/dtfile/Find.c b/cde/programs/dtfile/Find.c index 61a6b341..cfcc8744 100644 --- a/cde/programs/dtfile/Find.c +++ b/cde/programs/dtfile/Find.c @@ -117,9 +117,13 @@ #include
#include
#include
+#include
+#include
#include +#include /* _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 ) @@ -1811,7 +1815,7 @@ ExecuteFind( if (access_priv == -1 && geteuid() != root_user) { #else -# if defined(__hp_osf) || defined(__ultrix) || defined(__osf__) || defined(linux) +# if defined(__hp_osf) || defined(__ultrix) || defined(__osf__) || defined(linux) || defined(CSRG_BASED) setreuid(geteuid(),-1); if (access ((char *) path, R_OK) == -1) { @@ -1908,10 +1912,10 @@ ExecuteFind( #ifdef __osf__ oldSig = signal(SIGCHLD, sigchld_handler); #else - oldSig = signal(SIGCLD, SIG_DFL); + oldSig = signal(SIGCHLD, SIG_DFL); #endif /* __osf__ */ find_rec->popenId = findpopen(command, "r",&(find_rec->childpid)); - signal (SIGCLD, oldSig); + signal (SIGCHLD, oldSig); if (find_rec->popenId == NULL) { @@ -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));