X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=cde%2Fprograms%2Fdtsession%2FSmRestore.c;h=5b1dfd526da194d63455b800b37ad98627467c26;hb=751505e6ab7f594cb03fa378b7b8edbcb82e8cb0;hp=4aed55f3733a748fe31c61a108fbe87f90334c65;hpb=1fe5a550b25493541cf9dfb21bbf2f8eaf7ebcd4;p=oweals%2Fcde.git diff --git a/cde/programs/dtsession/SmRestore.c b/cde/programs/dtsession/SmRestore.c index 4aed55f3..5b1dfd52 100644 --- a/cde/programs/dtsession/SmRestore.c +++ b/cde/programs/dtsession/SmRestore.c @@ -64,9 +64,6 @@ #endif /* _SUN_OS */ #include #include -#ifdef __apollo -#include /* for pid_t struct in hp-ux sys/types.h */ -#endif #include #include #include @@ -114,9 +111,7 @@ #include "SmDB.h" #include "SmProp.h" -#ifndef __osf__ #include -#endif /* __osf__ */ /* * Local variables @@ -134,7 +129,7 @@ static char * savedDisplay = NULL; #define SM_MAX_ARGS MAXLINE -#if defined (SVR4) || defined (__osf__) +#if defined (SVR4) #define REMOTE_CMD_STRING "rsh %s -n %s &" #else #define REMOTE_CMD_STRING "remsh %s -n %s &" @@ -906,11 +901,11 @@ RestoreResources( Boolean errorHandlerInstalled, ... ) setegid(smGD.runningGID); #endif #endif -#if defined(__osf__) || defined(CSRG_BASED) +#if defined(CSRG_BASED) setsid(); #else (void) setpgrp(); -#endif /* __osf__ */ +#endif /* CSRG_BASED */ MarkFileDescriptors (3, F_SETFD, 1); @@ -1386,7 +1381,7 @@ RestoreSettings( void ) /* * This is only involked when there is auto repeats set for * specific keys only. It is VERY SLOW code so unless you - * have to save off auto repeats for single keys - DONT + * have to save off auto repeats for single keys - DON'T */ while(tmpKey != NULL) { @@ -1797,7 +1792,7 @@ RestoreIndependentResources( void ) * If this is the first DT 3.0 session for a DT 2.0 user then we will * also launch the helpviewer. If this is the first DT 3.0 session for a * DT 2.0 user then we will also run convertVS.sh to change all - * occurances of /usr/bin/X11/hpterm to .../dt/bin/hpterm, + * occurrences of /usr/bin/X11/hpterm to .../dt/bin/hpterm, * /usr/bin/X11/xterm to .../dt/bin/xterm and * /usr/bin/X11/xload to .../dt/bin/xload. * @@ -3512,7 +3507,7 @@ StartClient( { int slen = strlen(tstr) + 1; defaultCwd = XtCalloc(1, slen); - strncpy(defaultCwd, tstr, slen - 1); + snprintf(defaultCwd, slen, "%s", tstr); } else defaultCwd = getcwd (NULL, MAXPATHLEN + 1); @@ -3630,11 +3625,11 @@ StartLocalClient ( _DtEnvControl(DT_ENV_RESTORE_PRE_DT); -#if defined(__osf__) || defined(CSRG_BASED) +#if defined(CSRG_BASED) setsid(); #else (void)setpgrp(); -#endif /* __osf__ */ +#endif /* CSRG_BASED */ MarkFileDescriptors (3, F_SETFD, 1); @@ -3866,11 +3861,11 @@ ForkWM( void ) #endif _DtEnvControl(DT_ENV_RESTORE_PRE_DT); -#if defined(__osf__) || defined(CSRG_BASED) +#if defined(CSRG_BASED) setsid(); #else (void)setpgrp(); -#endif /* __osf__ */ +#endif /* CSRG_BASED */ MarkFileDescriptors (3, F_SETFD, 1); @@ -3951,11 +3946,11 @@ KillParent( void ) /* * Disassociate from parent */ -#if defined(__osf__) || defined(CSRG_BASED) +#if defined(CSRG_BASED) setsid(); #else setpgrp(); -#endif /* __osf__ */ +#endif /* CSRG_BASED */ } @@ -4063,7 +4058,7 @@ WaitWMTimeout( * * Description: * ----------- - * This is the event handler registered to recieve the client message + * This is the event handler registered to receive the client message * from dtwm when dtwm is ready for business * * @@ -4836,7 +4831,7 @@ MarkFileDescriptors ( #ifdef _SUN_OS open_max = NOFILE; #else -#if defined(USL) || defined(__uxp__) || defined(_AIX) +#if defined(_AIX) open_max = FOPEN_MAX; #else open_max = FD_SETSIZE;