Kill lots of warnings in DtSvc.
authorPascal Stumpf <Pascal.Stumpf@cubes.de>
Sun, 21 Jul 2013 20:55:09 +0000 (22:55 +0200)
committerJon Trulson <jon@radscan.com>
Sun, 21 Jul 2013 21:54:39 +0000 (15:54 -0600)
42 files changed:
cde/lib/DtSvc/DtEncap/MemoryMgr.c
cde/lib/DtSvc/DtEncap/Symbolic.c
cde/lib/DtSvc/DtEncap/connect.c
cde/lib/DtSvc/DtEncap/local.c
cde/lib/DtSvc/DtEncap/nls.c
cde/lib/DtSvc/DtEncap/pty.c
cde/lib/DtSvc/DtEncap/remote.c
cde/lib/DtSvc/DtEncap/spc-env.c
cde/lib/DtSvc/DtEncap/spc-error.c
cde/lib/DtSvc/DtEncap/spc-exec.c
cde/lib/DtSvc/DtEncap/spc-net.c
cde/lib/DtSvc/DtEncap/spc-obj.c
cde/lib/DtSvc/DtEncap/spc-proto.c
cde/lib/DtSvc/DtEncap/spc-sm.c
cde/lib/DtSvc/DtEncap/spc-termio.c
cde/lib/DtSvc/DtEncap/spc-util.c
cde/lib/DtSvc/DtEncap/spc-xt.c
cde/lib/DtSvc/DtEncap/spc.c
cde/lib/DtSvc/DtEncap/stringbuf.c
cde/lib/DtSvc/DtUtil1/Action.c
cde/lib/DtSvc/DtUtil1/ActionDb.c
cde/lib/DtSvc/DtUtil1/ActionFind.c
cde/lib/DtSvc/DtUtil1/ActionTt.c
cde/lib/DtSvc/DtUtil1/ActionUtil.c
cde/lib/DtSvc/DtUtil1/CmdMain.c
cde/lib/DtSvc/DtUtil1/DbReader.c
cde/lib/DtSvc/DtUtil1/DbUtil.c
cde/lib/DtSvc/DtUtil2/ChkpntClient.c
cde/lib/DtSvc/DtUtil2/ChkpntListen.c
cde/lib/DtSvc/DtUtil2/ChkpntP.h
cde/lib/DtSvc/DtUtil2/CmdUtility.c
cde/lib/DtSvc/DtUtil2/DtEnvMap.c
cde/lib/DtSvc/DtUtil2/DtNlUtils.c
cde/lib/DtSvc/DtUtil2/EnvControl.c
cde/lib/DtSvc/DtUtil2/Hash.c
cde/lib/DtSvc/DtUtil2/MsgCat.c
cde/lib/DtSvc/DtUtil2/PrintXErr.c
cde/lib/DtSvc/DtUtil2/SharedProcs.c
cde/lib/DtSvc/DtUtil2/SmCreateDirs.c
cde/lib/DtSvc/DtUtil2/Utility.c
cde/lib/DtSvc/DtUtil2/XlationSvc.c
cde/lib/DtSvc/DtUtil2/XmWrap.c

index 668854d8f75dd28b06f6553ec47058903619b078..4644b8585433838023dd3bdb523b20df091e83cf 100644 (file)
@@ -36,6 +36,8 @@
 #include "/usr/include/apollo/shlib.h"
 #endif
 
+#include <Dt/UserMsg.h>
+
 #include <bms/sbport.h> /* NOTE: sbport.h must be the first include. */
 
 #include <bms/bms.h>
@@ -55,8 +57,8 @@ void * XeMalloc( size_t size )
     XeString  ptr;
     
     if (!size) return 0;
-    if (ptr = malloc(size)) {
-       *ptr = (XeChar)NULL;   /* Force first byte to NULL for bozos who */
+    if ((ptr = malloc(size))) {
+       *ptr = (XeChar)0;   /* Force first byte to NULL for bozos who */
                               /* think malloc zeros memory!             */
        return ptr;
     }
index 76d978fead8db904cc90e7b51ed6de4fdf93abc9..378ca892187971972727c1646989b0038d9d23a4 100644 (file)
@@ -36,6 +36,8 @@
 #define SBSTDINC_H_NO_REDEFINE
 #endif
 
+#include <Dt/UserMsg.h>
+
 #include <bms/sbport.h>                /* NOTE: sbport.h must be the first include. */
 
 #include <assert.h>
index b9f0f099d7ec96ff8c367b9280dd3726b0a4ed5c..2338f167974012685feac1c84a894e2b72168182 100644 (file)
@@ -32,6 +32,8 @@
  * (c) Copyright 1993, 1994 Novell, Inc.                               *
  */
 
+#include <Dt/UserMsg.h>
+
 #include <bms/sbport.h>                /* NOTE: sbport.h must be the first include. */
 
 #include <sys/socket.h>         /**** needed by gethostbyname et al *****/
@@ -208,6 +210,7 @@ UnParseFileString(XeString host, XeString path)
 
 
 /*------------------------------------------------------------------------+*/
+int
 XeParseFileString(XeString line,
                  XeString *host_addr,
                  XeString *path_addr)
@@ -261,7 +264,7 @@ GetDomainName(XeString buffer, unsigned int bufsize)
    int status;
    
    /* try to get domain name from hostname */
-   if (status = gethostname(tmpbuf, bufsize)) {
+   if ((status = gethostname(tmpbuf, bufsize))) {
       XeFree(tmpbuf);
       return status; /* failed gethostname */
    }
@@ -287,7 +290,7 @@ GetDomainName(XeString buffer, unsigned int bufsize)
         _DtSvcProcessUnlock();
         return -1;
       }
-      if (ptr = strstr(host_ret->h_name, (XeString)".")) /* if dot in canonical name */
+      if ((ptr = strstr(host_ret->h_name, (XeString)"."))) /* if dot in canonical name */
         domainname = strdup(ptr);
    }
 
@@ -308,9 +311,9 @@ Xegetshorthostname(XeString buffer, unsigned int bufsize)
    XeString ptr;
    int status;
    
-   if (status = gethostname(buffer, bufsize))
+   if ((status = gethostname(buffer, bufsize)))
       return status; /* failed gethostname */
-   if (ptr = strstr(buffer, (XeString)"."))
+   if ((ptr = strstr(buffer, (XeString)".")))
       *ptr = '\0';  /* delete domain name if there is one */
    return 0;
 }
@@ -385,7 +388,7 @@ Xegetcwd(char *buf, int size)
    Boolean pwd_ok = FALSE;
    char *env, *current_dir;
 
-   if (current_dir = getenv("PWD")) { /* use PWD instead of slow call */
+   if ((current_dir = getenv("PWD"))) { /* use PWD instead of slow call */
       int s1, s2;
       struct stat sb1, sb2;
 
index 6038571c6fbd93187fb94c0408569665344f52df..fcf1b066a2d4b45fb6ade2c165b16cea5fc8f720 100644 (file)
@@ -154,7 +154,7 @@ int local_channel_object_wait_for_termination(SPC_Channel_Ptr channel)
 }
 
 /*----------------------------------------------------------------------+*/
-remove_logfile_local_channel_object(SPC_Channel_Ptr channel)
+int remove_logfile_local_channel_object(SPC_Channel_Ptr channel)
 /*----------------------------------------------------------------------+*/
 {
   int result;
@@ -206,7 +206,7 @@ void local_channel_object_input_handler(void * client_data,
   timeout.tv_sec = 0;
   timeout.tv_usec = 0;
   
-#if defined(SVR4) || defined(__osf__) || defined(__hpux)
+#if defined(SVR4) || defined(__osf__) || defined(__hpux) || defined(__OpenBSD__)
   select(max_fds, (fd_set*)&read_fd_vect, NULL, (fd_set*)&except_fd_vect, &timeout);
 #else
   /* UX has select defined with int*, not fd_set* parms */
index 1da27af13038f782f5611ddf23f67c0909480a19..2501198b3da41e9e904715d62e4ce25af87a5e15 100644 (file)
@@ -35,6 +35,7 @@
 #include <bms/sbport.h> /* NOTE: sbport.h must be the first include. */
 
 #include <bms/bms.h>
+#include <bms/MemoryMgr.h>
 
 #ifndef CDE_LOGFILES_TOP
 #define CDE_LOGFILES_TOP "/var/dt/tmp"
index d8202147653e5ee4e632cfc8c3fb2e76f0639b67..d1ba8a27e24d50c3cbaa3fdeb9080f5a8168559a 100644 (file)
@@ -260,7 +260,7 @@ static int getspec1170ptypair(Wire *wire)
    
 
 /*----------------------------------------------------------------------+*/
-static getptypair(Wire *wire)
+static int getptypair(Wire *wire)
 /*----------------------------------------------------------------------+*/
 {
   /* Attempt to open the master/slave pair of preset pty */
@@ -639,7 +639,7 @@ int read_pty_channel_object(SPC_Channel_Ptr channel,
     result = read(fd, buffer, nbytes);
   } while (result<0 && errno == EINTR);
 
-  if(result == ERROR)
+  if(result == ERROR) {
     if(errno == EIO) {
       SPC_XtRemoveInput(&channel->wires[connector]->read_toolkit_id, SPC_Input);
       SPC_Change_State(channel, connector, 0, -1);
@@ -652,6 +652,7 @@ int read_pty_channel_object(SPC_Channel_Ptr channel,
       XeFree(connection_hostname);
       return(SPC_ERROR);
     }
+  }
 
   return(result);
 }
@@ -1031,7 +1032,7 @@ struct termios *SPC_Get_Current_Termio(void)
 }
 
 /*----------------------------------------------------------------------+*/
-SPC_Setpgrp(int read_current_termio)
+int SPC_Setpgrp(int read_current_termio)
 /*----------------------------------------------------------------------+*/
 {
   _DtSvcProcessLock();
index ed9131d2e5da8f7d0192a01fa131fd1742af6d86..d2d10d13132c76754dee328370051b51e3b6c44a 100644 (file)
@@ -221,7 +221,7 @@ int reset_remote_channel_object(SPC_Channel_Ptr channel)
      flush any queued data on this channel. */
 
   {
-    if (tmpqueue=channel->queued_remote_data)
+    if ((tmpqueue=channel->queued_remote_data))
     {
       Xe_for_queue(protocol_request_ptr, prot, tmpqueue) {
        Xe_delete_queue_element(channel->queued_remote_data, prot);
@@ -402,6 +402,7 @@ int attach_remote_channel_object(SPC_Channel_Ptr channel,
 }
 
 /*----------------------------------------------------------------------+*/
+int
 remove_logfile_remote_channel_object(SPC_Channel_Ptr channel)
 /*----------------------------------------------------------------------+*/
 {
@@ -448,6 +449,7 @@ int add_input_remote_channel_object(SPC_Channel_Ptr channel,
 }
 
 /*----------------------------------------------------------------------+*/
+int
 SPC_Debug_Mode(SPC_Channel_Ptr channel,
               XeString file)
 /*----------------------------------------------------------------------+*/
index b38a15b97bbe1a76c7634c185a5968a827bd4e2c..2205f526c6d066044ae5407c2205ff083806d88a 100644 (file)
@@ -32,6 +32,7 @@
  * (c) Copyright 1993, 1994 Novell, Inc.                               *
  */
 
+#include <ctype.h>
 #include <stdlib.h>
 #include <bms/sbport.h> /* NOTE: sbport.h must be the first include. */
 
index 67fe23525f462f04be6beb6f88d188a91577bc45..249c9f1c8a088490926314a0b4a3d93ca85eca66 100644 (file)
@@ -32,6 +32,8 @@
  * (c) Copyright 1993, 1994 Novell, Inc.                               *
  */
 
+#include <Dt/UserMsg.h>
+
 #include <bms/sbport.h> /* NOTE: sbport.h must be the first include. */
 #include <errno.h>
 #include <stdarg.h>
@@ -55,7 +57,7 @@ XeChar spc_logfile[MAXPATHLEN+1];
 XeChar spc_logging = FALSE;
 /* FILE *spc_logF = NULL; -- to bmsglob.c */
 
-int spc_logfd = NULL;
+int spc_logfd = 0;
 
 /* This is the SPC error number variable */
 /* ------------------------------------- */
@@ -243,6 +245,7 @@ void SPC_Error (int error, ...)
  */
 
 /*----------------------------------------------------------------------+*/
+int
 SPC_Make_Log_Filename(XeString name,
                      int unique)       /* When TRUE, make name unique */
 /*----------------------------------------------------------------------+*/
@@ -283,6 +286,7 @@ SPC_Make_Log_Filename(XeString name,
 }
 
 /*----------------------------------------------------------------------+*/
+int
 SPC_Open_Log(XeString filename,
             int unique)                /* When TRUE, make filename unique */
 /*----------------------------------------------------------------------+*/
@@ -308,6 +312,7 @@ SPC_Open_Log(XeString filename,
 }
 
 /*----------------------------------------------------------------------+*/
+int
 SPC_Close_Log(void)
 /*----------------------------------------------------------------------+*/
 {
@@ -319,7 +324,7 @@ SPC_Close_Log(void)
   if (spc_logF) {
     fclose(spc_logF);
   }
-  spc_logfd = NULL;
+  spc_logfd = 0;
   spc_logF = NULL;
   spc_logging = FALSE;
 
@@ -328,6 +333,7 @@ SPC_Close_Log(void)
 }
 
 /*----------------------------------------------------------------------+*/
+int
 SPC_Write_Log(XeString str)
 /*----------------------------------------------------------------------+*/
 {
index 3c2d23302055bf555ce23aeba219050ed9968366..38889d4cc464a0cbda6b2da6421e910769b1b809 100644 (file)
@@ -33,6 +33,7 @@
  */
 
 #include <bms/sbport.h> /* NOTE: sbport.h must be the first include. */
+#include <ctype.h>
 #include <errno.h>
 #include <signal.h>
 #include <sys/wait.h>
@@ -67,6 +68,9 @@ static int remove_variable(
 static void resolve_variable_reference(
        char            **string );
 
+Boolean _path_search (
+       XeString path, XeString filename, path_search_predicate p); /* XXX */
+
 /*
  * This array contains the process id's of the sub-processes
  * started by the daemon.  When a sub-process terminates, its
@@ -105,6 +109,7 @@ extern XeString *environ;
 */
 
 /*----------------------------------------------------------------------+*/
+int
 SPC_Setup_Synchronous_Terminator(void)
 /*----------------------------------------------------------------------+*/
 {
@@ -167,6 +172,7 @@ void SPC_Close_Unused(void)
 }
 
 /*----------------------------------------------------------------------+*/
+int
 SPC_MakeSystemCommand(SPC_Channel_Ptr channel)
 /*----------------------------------------------------------------------+*/
 {
@@ -262,7 +268,7 @@ void SPC_Child_Terminated(int i)
   prot->dataptr=pdata;
 
   wait_pid = -1;
-  while(pid = waitpid(wait_pid, &status, WNOHANG)) {
+  while((pid = waitpid(wait_pid, &status, WNOHANG))) {
     if((pid == -1 && errno == ECHILD) || pid == 0) {
       /* no more children.  Return */
       errno = saved_errno;
index dc9cc4071dd4c497ca0c092f6e2294bdf3736219..71a5d6da0e16203e4803dad337e777e82d2937cc 100644 (file)
@@ -172,6 +172,7 @@ Boolean SPC_Init_Local_Host_Info(void)
  */
 
 /*----------------------------------------------------------------------+*/
+int
 SPC_Local_Hostname(XeString hostname)
 /*----------------------------------------------------------------------+*/
 {
@@ -287,6 +288,7 @@ SPC_Connection_Ptr SPC_Open_Connection(XeString hostname)
 }
 
 /*----------------------------------------------------------------------+*/
+int
 SPC_Open_Socket(SPC_Connection_Ptr conn,
                int type)
 /*----------------------------------------------------------------------+*/
@@ -319,6 +321,7 @@ SPC_Open_Socket(SPC_Connection_Ptr conn,
 */
 
 /*----------------------------------------------------------------------+*/
+int
 SPC_Contact_Server(SPC_Connection_Ptr connection)
 /*----------------------------------------------------------------------+*/
 {
@@ -481,6 +484,7 @@ SPC_Connection_Ptr SPC_Standalone_Daemon(SPC_Connection_Ptr conn)
 }
 
 /*----------------------------------------------------------------------+*/
+int
 SPC_Inetd_Daemon(SPC_Connection_Ptr conn)
 /*----------------------------------------------------------------------+*/
 {
index 1adb475fe32c7729802964520ca45a3d65a7f6a9..f1980c247c741a12c2249e28fb23177cc183d547 100644 (file)
@@ -120,6 +120,7 @@ static Wire dummy_wire={
   };
 
 /*----------------------------------------------------------------------+*/
+int
 SPC_ResetTerminator(void)
 /*----------------------------------------------------------------------+*/
 {
@@ -142,6 +143,7 @@ SPC_ResetTerminator(void)
 }
 
 /*----------------------------------------------------------------------+*/
+int
 SPC_Initialize(void)
 /*----------------------------------------------------------------------+*/
 {
@@ -265,6 +267,7 @@ void SPC_Channel_Terminated(SPC_Channel_Ptr channel)
 */
 
 /*----------------------------------------------------------------------+*/
+int
 SPC_Check_Style(int iomode)
 /*----------------------------------------------------------------------+*/
 {
@@ -314,6 +317,7 @@ SPC_Check_Style(int iomode)
 */
 
 /*----------------------------------------------------------------------+*/
+int
 SPC_Transform_Iomode(int iomode)
 /*----------------------------------------------------------------------+*/
 {
@@ -342,6 +346,7 @@ SPC_Transform_Iomode(int iomode)
 */
 
 /*----------------------------------------------------------------------+*/
+int
 SPC_Newline_Filter(SPC_Channel_Ptr channel,
                   int connector, 
                   XeString buffer,
@@ -399,6 +404,7 @@ SPC_Newline_Filter(SPC_Channel_Ptr channel,
 }
 
 /*----------------------------------------------------------------------+*/
+int
 SPC_Input_Handler(SPC_Channel_Ptr channel,
                  int connector)
 /*----------------------------------------------------------------------+*/
@@ -642,6 +648,7 @@ int  exec_proc_channel_object (SPC_Channel_Ptr channel)
 
 
 /*----------------------------------------------------------------------+*/
+int
 signal_channel_object (SPC_Channel_Ptr UNUSED_PARM(channel),
                       int             UNUSED_PARM(sig))
 /*----------------------------------------------------------------------+*/
@@ -659,6 +666,7 @@ int channel_object_wait_for_termination(SPC_Channel_Ptr UNUSED_PARM(channel))
 
 
 /*----------------------------------------------------------------------+*/
+int
 attach_channel_object(SPC_Channel_Ptr UNUSED_PARM(channel),
                      int             UNUSED_PARM(pid))
 /*----------------------------------------------------------------------+*/
@@ -668,6 +676,7 @@ attach_channel_object(SPC_Channel_Ptr UNUSED_PARM(channel),
 
 
 /*----------------------------------------------------------------------+*/
+int
 add_input_channel_object(SPC_Channel_Ptr    UNUSED_PARM(channel), 
                         SbInputHandlerProc UNUSED_PARM(handler),
                         void              *UNUSED_PARM(data) )
@@ -678,6 +687,7 @@ add_input_channel_object(SPC_Channel_Ptr    UNUSED_PARM(channel),
 
 
 /*----------------------------------------------------------------------+*/
+int
 remove_logfile_channel_object(SPC_Channel_Ptr channel)
 /*----------------------------------------------------------------------+*/
 {
index a17818cd3f03ea3d040f58eee8b3eb7474a3e8a5..4b21203c5f84c3694105d566e961166fce123bab 100644 (file)
@@ -586,8 +586,8 @@ void SPC_Flush_Queued_Data(SPC_Channel_Ptr channel)
   XeQueue tmpqueue;
   protocol_request_ptr prot;
   
-  if(tmpqueue=channel->queued_remote_data) {
-    while(prot=(protocol_request_ptr)Xe_pop_queue(tmpqueue))
+  if((tmpqueue=channel->queued_remote_data)) {
+    while((prot=(protocol_request_ptr)Xe_pop_queue(tmpqueue)))
       SPC_Free_Protocol_Ptr(prot);
   }
 
index 02afa700e30f0c80047ebd8381885b34ed052315..9aa127c3f4d957d2330754eafe87ca3e1712a5cf 100644 (file)
@@ -66,6 +66,7 @@ static int (* spc_state_table[16]) (SPC_Channel_Ptr channel, int connector)= {
   };
 
 /*----------------------------------------------------------------------+*/
+int
 SPC_Change_State(SPC_Channel_Ptr channel,
                 int connector, 
                 int data_line, 
@@ -132,6 +133,7 @@ SPC_Change_State(SPC_Channel_Ptr channel,
    error condition in the state table */
 
 /*----------------------------------------------------------------------+*/
+int
 error_fun(SPC_Channel_Ptr UNUSED_PARM(channel),
          int             UNUSED_PARM(connector))
 /*----------------------------------------------------------------------+*/
@@ -152,6 +154,7 @@ error_fun(SPC_Channel_Ptr UNUSED_PARM(channel),
 */
 
 /*----------------------------------------------------------------------+*/
+int
 connector_eof(SPC_Channel_Ptr channel,
              int connector)
 /*----------------------------------------------------------------------+*/
@@ -196,6 +199,7 @@ connector_eof(SPC_Channel_Ptr channel,
 
   
 /*----------------------------------------------------------------------+*/
+int
 connector_eof_with_reset(SPC_Channel_Ptr channel,
                         int connector)
 /*----------------------------------------------------------------------+*/
@@ -216,6 +220,7 @@ connector_eof_with_reset(SPC_Channel_Ptr channel,
 */
 
 /*----------------------------------------------------------------------+*/
+int
 sigcld_with_reset(SPC_Channel_Ptr channel,
                  int             UNUSED_PARM(connector))
 /*----------------------------------------------------------------------+*/
index 89b7b4e5f2c1a9094977e17b6261fffd01f0f0e4..e9d488d859738cd31c8c1c17522458011e839eda 100644 (file)
@@ -125,120 +125,120 @@ struct cc_s
 #define END_OF_LIST "End_Of_List"
     
 static struct modes_s Input_modes[] = {
-    "BRKINT",  BRKINT,
-    "ICRNL",   ICRNL,
-    "IGNBRK",  IGNBRK,
-    "IGNCR",   IGNCR,
-    "IGNPAR",  IGNPAR,
-    "INLCR",   INLCR,
-    "INPCK",   INPCK,
-    "ISTRIP",  ISTRIP,
-    "IXOFF",   IXOFF,
-    "IXON",    IXON,
-    "PARMRK",  PARMRK,
-    END_OF_LIST, 0
+  { "BRKINT",  BRKINT, },
+  { "ICRNL",   ICRNL, },
+  { "IGNBRK",  IGNBRK, },
+  { "IGNCR",   IGNCR, },
+  { "IGNPAR",  IGNPAR, },
+  { "INLCR",   INLCR, },
+  { "INPCK",   INPCK, },
+  { "ISTRIP",  ISTRIP, },
+  { "IXOFF",   IXOFF, },
+  { "IXON",    IXON, },
+  { "PARMRK",  PARMRK, },
+  { END_OF_LIST, 0 },
 };
 
 static struct modes_s Output_modes[] = {    
-    "OPOST",   OPOST,
-    "ONLCR",   ONLCR,
-    "OCRNL",   OCRNL,
-    "ONOCR",   ONOCR,
-    "ONLRET",  ONLRET,
+  { "OPOST",   OPOST, },
+  { "ONLCR",   ONLCR, },
+  { "OCRNL",   OCRNL, },
+  { "ONOCR",   ONOCR, },
+  { "ONLRET",  ONLRET, },
 #if !defined(CSRG_BASED)
-    "OFILL",   OFILL,
-    "OFDEL",   OFDEL,
-    "NLDLY",   NLDLY,
-    "NL0",     NL0,
-    "NL1",     NL1,
-    "CRDLY",   CRDLY,
-    "CR0",     CR0,
-    "CR1",     CR1,
-    "CR2",     CR2,
-    "CR3",     CR3,
-    "TABDLY",  TABDLY,
-    "TAB0",    TAB0,
-    "TAB1",    TAB1,
-    "TAB2",    TAB2,
-    "TAB3",    TAB3,
-    "BSDLY",   BSDLY,
-    "BS0",     BS0,
-    "BS1",     BS1,
-    "VTDLY",   VTDLY,
-    "VT0",     VT0,
-    "VT1",     VT1,
-    "FFDLY",   FFDLY,
-    "FF0",     FF0,
-    "FF1",     FF1,
+  { "OFILL",   OFILL, },
+  { "OFDEL",   OFDEL, },
+  { "NLDLY",   NLDLY, },
+  { "NL0",     NL0, },
+  { "NL1",     NL1, },
+  { "CRDLY",   CRDLY, },
+  { "CR0",     CR0, },
+  { "CR1",     CR1, },
+  { "CR2",     CR2, },
+  { "CR3",     CR3, },
+  { "TABDLY",  TABDLY, },
+  { "TAB0",    TAB0, },
+  { "TAB1",    TAB1, },
+  { "TAB2",    TAB2, },
+  { "TAB3",    TAB3, },
+  { "BSDLY",   BSDLY, },
+  { "BS0",     BS0, },
+  { "BS1",     BS1, },
+  { "VTDLY",   VTDLY, },
+  { "VT0",     VT0, },
+  { "VT1",     VT1, },
+  { "FFDLY",   FFDLY, },
+  { "FF0",     FF0, },
+  { "FF1",     FF1, },
 #endif
-    END_OF_LIST, 0
+  { END_OF_LIST, 0 },
 };
 
 
 static struct baud_s Baud_rates[] = {    
-    "B0",      B0,
-    "B50",     B50,
-    "B75",     B75,
-    "B110",    B110,
-    "B134",    B134,
-    "B150",    B150,
-    "B200",    B200,
-    "B300",    B300,
-    "B600",    B600,
-    "B1200",   B1200,
-    "B1800",   B1800,
-    "B2400",   B2400,
-    "B4800",   B4800,
-    "B9600",   B9600,
-    "B19200",  B19200,
-    "B38400",  B38400,
-    END_OF_LIST, 0
+  { "B0",      B0, },
+  { "B50",     B50, },
+  { "B75",     B75, },
+  { "B110",    B110, },
+  { "B134",    B134, },
+  { "B150",    B150, },
+  { "B200",    B200, },
+  { "B300",    B300, },
+  { "B600",    B600, },
+  { "B1200",   B1200, },
+  { "B1800",   B1800, },
+  { "B2400",   B2400, },
+  { "B4800",   B4800, },
+  { "B9600",   B9600, },
+  { "B19200",  B19200, },
+  { "B38400",  B38400, },
+  { END_OF_LIST, 0 },
 };
 
 
 static struct modes_s Control_modes[] = {    
-    "CSIZE",   CSIZE,
-    "CS5",     CS5,
-    "CS6",     CS6,
-    "CS7",     CS7,
-    "CS8",     CS8,
-    "CSTOPB",  CSTOPB,
-    "CREAD",   CREAD,
-    "PARENB",  PARENB,
-    "PARODD",  PARODD,
-    "HUPCL",   HUPCL,
-    "CLOCAL",  CLOCAL,
-    END_OF_LIST, 0
+  { "CSIZE",   CSIZE, },
+  { "CS5",     CS5, },
+  { "CS6",     CS6, },
+  { "CS7",     CS7, },
+  { "CS8",     CS8, },
+  { "CSTOPB",  CSTOPB, },
+  { "CREAD",   CREAD, },
+  { "PARENB",  PARENB, },
+  { "PARODD",  PARODD, },
+  { "HUPCL",   HUPCL, },
+  { "CLOCAL",  CLOCAL, },
+  { END_OF_LIST, 0 },
 };
 
 
 static struct modes_s Local_modes[] = {    
-    "ECHO",    ECHO,
-    "ECHOE",   ECHOE,
-    "ECHOK",   ECHOK,
-    "ECHONL",  ECHONL,
-    "ICANON",  ICANON,
-    "IEXTEN",  IEXTEN,
-    "ISIG",    ISIG,
-    "NOFLSH",  NOFLSH,
-    "TOSTOP",  TOSTOP,
-    END_OF_LIST, 0
+  { "ECHO",    ECHO, },
+  { "ECHOE",   ECHOE, },
+  { "ECHOK",   ECHOK, },
+  { "ECHONL",  ECHONL, },
+  { "ICANON",  ICANON, },
+  { "IEXTEN",  IEXTEN, },
+  { "ISIG",    ISIG, },
+  { "NOFLSH",  NOFLSH, },
+  { "TOSTOP",  TOSTOP, },
+  { END_OF_LIST, 0 },
 };
 
 
 static struct cc_s CC_Array[] = {    
-    "VEOF",    VEOF,
-    "VEOL",    VEOL,
-    "VERASE",  VERASE,
-    "VINTR",   VINTR,
-    "VKILL",   VKILL,
-    "VMIN",    VMIN,
-    "VQUIT",   VQUIT,
-    "VSTART",  VSTART,
-    "VSTOP",   VSTOP,
-    "VSUSP",   VSUSP,
-    "VTIME",   VTIME,
-    END_OF_LIST, 0
+  { "VEOF",    VEOF, },
+  { "VEOL",    VEOL, },
+  { "VERASE",  VERASE, },
+  { "VINTR",   VINTR, },
+  { "VKILL",   VKILL, },
+  { "VMIN",    VMIN, },
+  { "VQUIT",   VQUIT, },
+  { "VSTART",  VSTART, },
+  { "VSTOP",   VSTOP, },
+  { "VSUSP",   VSUSP, },
+  { "VTIME",   VTIME, },
+  { END_OF_LIST, 0 },
 };
 
     
@@ -291,7 +291,7 @@ static tcflag_t
     if (!*buff) 
        return flag;
     
-    while (item = (XeString)STRTOKX(buff, SPC_TCFLAG_SEP))
+    while ((item = (XeString)STRTOKX(buff, SPC_TCFLAG_SEP)))
     {
        Boolean found = FALSE;
        
@@ -433,7 +433,7 @@ static void
     
     if (!*buff) return;
     
-    while (cc_name = (XeString)STRTOKX(buff, SPC_TCFLAG_SEP))
+    while ((cc_name = (XeString)STRTOKX(buff, SPC_TCFLAG_SEP)))
     {
        Boolean found = FALSE;
 
@@ -533,7 +533,7 @@ void SPC_Encode_Termios(XeString buff, struct termios *tio)
     int                item_cnt = 0;
     speed_t     speed;    
     
-    while (item = (XeString)STRTOKX(buff, SPC_TERMIO_SEP))
+    while ((item = (XeString)STRTOKX(buff, SPC_TERMIO_SEP)))
     {
        /* We can possibly have an all blank field.  Walk past them  */
        /* because the routines we will be calling don't expect any  */
index 0083eac5fcc62a328b20ed8a0f3bbc7f73391d61..52560f88e8541c120f0651934de0aff45988d71b 100644 (file)
@@ -96,6 +96,7 @@ SPC_Channel_Ptr SPC_Find_PID(int pid)
  */
 
 /*----------------------------------------------------------------------+*/
+int
 spc_close(int fd)
 /*----------------------------------------------------------------------+*/
 {
@@ -108,6 +109,7 @@ spc_close(int fd)
 }
 
 /*----------------------------------------------------------------------+*/
+int
 spc_dup2(int from, int to)
 /*----------------------------------------------------------------------+*/
 {
@@ -134,6 +136,7 @@ spc_dup2(int from, int to)
 }
 
 /*----------------------------------------------------------------------+*/
+int
 SPC_fd_to_connector(SPC_Channel_Ptr channel,
                    int fd)
 /*----------------------------------------------------------------------+*/
index 364916025599c387ea40653e737160d45d685cc6..31d016ecae4a2f1fe90df5a6d5ff97e5f4f9db4d 100644 (file)
@@ -133,7 +133,8 @@ static SbInputId SPC_RemoveInput(int                         source,
 }
   
 /*-----------------------------------------------------------------------+*/
-static SPC_Select(void )
+static int
+SPC_Select(void )
 /*-----------------------------------------------------------------------+*/
 {
     break_on_termination=TRUE;
index 1b0f9c37d3f1d36746b186bf750c7a6c8bd0f58a..faf9f8a6e98d93261a2154786fec7e97c317905f 100644 (file)
@@ -118,6 +118,7 @@ SPC_Channel_Ptr XeSPCOpen(XeString hostname,
 }
 
 /*----------------------------------------------------------------------+*/
+int
 XeSPCClose(SPC_Channel_Ptr channel)
 /*----------------------------------------------------------------------+*/
 {
@@ -141,6 +142,7 @@ XeSPCClose(SPC_Channel_Ptr channel)
 }
 
 /*----------------------------------------------------------------------+*/
+int
 XeSPCReset(SPC_Channel_Ptr channel)
 /*----------------------------------------------------------------------+*/
 {
@@ -163,6 +165,7 @@ XeSPCReset(SPC_Channel_Ptr channel)
 }
 
 /*----------------------------------------------------------------------+*/
+int
 XeSPCRead(SPC_Channel_Ptr channel,
          int connector,           /* STDOUT or STDERR */
          XeString buffer,
@@ -201,6 +204,7 @@ XeSPCRead(SPC_Channel_Ptr channel,
 
   
 /*----------------------------------------------------------------------+*/
+int
 XeSPCWrite(SPC_Channel_Ptr channel,
           XeString buffer,
           int length)
@@ -230,6 +234,7 @@ XeSPCWrite(SPC_Channel_Ptr channel,
 }
 
 /*----------------------------------------------------------------------+*/
+int
 XeSPCActive(SPC_Channel_Ptr channel)
 /*----------------------------------------------------------------------+*/
 {
@@ -244,6 +249,7 @@ XeSPCActive(SPC_Channel_Ptr channel)
 }
 
 /*----------------------------------------------------------------------+*/
+int
 XeSPCData(SPC_Channel_Ptr channel)
 /*----------------------------------------------------------------------+*/
 {
@@ -258,6 +264,7 @@ XeSPCData(SPC_Channel_Ptr channel)
 }
 
 /*----------------------------------------------------------------------+*/
+int
 XeSPCExecuteProcess(SPC_Channel_Ptr channel)
 /*----------------------------------------------------------------------+*/
 {
@@ -286,6 +293,7 @@ XeSPCExecuteProcess(SPC_Channel_Ptr channel)
 }
 
 /*----------------------------------------------------------------------+*/
+int
 XeSPCSignalProcess(SPC_Channel_Ptr channel,
                   int sig)
 /*----------------------------------------------------------------------+*/
@@ -308,6 +316,7 @@ XeSPCSignalProcess(SPC_Channel_Ptr channel,
 }
 
 /*----------------------------------------------------------------------+*/
+int
 XeSPCAddInput(SPC_Channel_Ptr  channel,
              SbInputHandlerProc handler,
 /*----------------------------------------------------------------------+*/
@@ -332,6 +341,7 @@ XeSPCAddInput(SPC_Channel_Ptr       channel,
 
 
 /*----------------------------------------------------------------------+*/
+int
 XeSPCRegisterTerminator(SPC_Channel_Ptr                        channel,
                        SPC_TerminateHandlerType        terminator,
                        void *                          client_data)
@@ -371,6 +381,7 @@ XeSPCRegisterTerminator(SPC_Channel_Ptr                     channel,
 
 
 /*----------------------------------------------------------------------+*/
+int
 XeSPCAttach(SPC_Channel_Ptr channel,
            int pid)
 /*----------------------------------------------------------------------+*/
@@ -385,6 +396,7 @@ XeSPCAttach(SPC_Channel_Ptr channel,
 }
 
 /*----------------------------------------------------------------------+*/
+int
 XeSPCDetach(SPC_Channel_Ptr channel)
 /*----------------------------------------------------------------------+*/
 {
@@ -417,6 +429,7 @@ XeSPCDetach(SPC_Channel_Ptr channel)
 */
 
 /*----------------------------------------------------------------------+*/
+int
 XeSPCSpawn(XeString pathname,
           XeString context_dir,
           XeString *argv,
@@ -505,6 +518,7 @@ XeSPCKillProcesses(int wait)
 }
 
 /*----------------------------------------------------------------------+*/
+int
 XeSPCKillProcess(SPC_Channel_Ptr channel,
                 int wait)
 /*----------------------------------------------------------------------+*/
@@ -527,6 +541,7 @@ XeSPCKillProcess(SPC_Channel_Ptr channel,
 }
 
 /*----------------------------------------------------------------------+*/
+int
 XeSPCInterruptProcess(SPC_Channel_Ptr channel)
 /*----------------------------------------------------------------------+*/
 {
@@ -567,6 +582,7 @@ XeString XeSPCGetDevice(SPC_Channel_Ptr channel,
 }
 
 /*----------------------------------------------------------------------+*/
+int
 XeSPCGetProcessStatus(SPC_Channel_Ptr channel,
                      int *type, 
                      int *cause)
@@ -609,6 +625,7 @@ XeSPCGetProcessStatus(SPC_Channel_Ptr channel,
 }
 
 /*----------------------------------------------------------------------+*/
+int
 XeSPCGetPID(SPC_Channel_Ptr channel)
 /*----------------------------------------------------------------------+*/
 {
@@ -677,6 +694,7 @@ int XeSPCRemoveLogfile(SPC_Channel_Ptr channel)
 */
 
 /*----------------------------------------------------------------------+*/
+int
 SPC_Process_Single_Prot_Request(protocol_request_ptr req, SPC_Channel_Ptr channel)
 /*----------------------------------------------------------------------+*/
 {
@@ -724,7 +742,7 @@ SPC_Channel_Ptr XeSPCHandleTerminator(int fd)
   connection_queue=connection->queued_remote_data;
   Xe_push_queue(connection_queue, prot);
 
-  while(prot=(protocol_request_ptr)Xe_pop_queue(connection_queue)) {
+  while((prot=(protocol_request_ptr)Xe_pop_queue(connection_queue))) {
     
     channel=prot->channel;
 
@@ -755,6 +773,7 @@ SPC_Channel_Ptr XeSPCHandleTerminator(int fd)
 */
 
 /*----------------------------------------------------------------------+*/
+int
 XeSPCGetChannelSyncFd(SPC_Channel_Ptr channel)
 /*----------------------------------------------------------------------+*/
 {
@@ -852,6 +871,7 @@ void XeSPCRestartCallbacks(void)
 */
 
 /*----------------------------------------------------------------------+*/
+int
 XeSetpgrp(int read_current_termio)
 /*----------------------------------------------------------------------+*/
 {
index f5a05389b0475d7379d0a7c0ff44cc935c3a6a3d..495d718d717359c19be99d19d3735ee3588f4d6f 100644 (file)
@@ -116,7 +116,7 @@ XeAppendToStringBuffer(XeStringBuffer buffer, XeString string)
        buffer->last_char = i - 1;
        if (-1 == ExpandStringBuffer(buffer)) return(-1);
    }
-   buffer->buffer[i] = (XeChar) NULL;
+   buffer->buffer[i] = (XeChar)'\0';
    buffer->last_char = i;
 #  if DEBUG >= 5
       sprintf(debug_string, "new string is: \"%s\"", buffer->buffer);
@@ -131,7 +131,7 @@ XeClearStringBuffer(XeStringBuffer buffer)
 /*------------------------------------------------------------------------+*/
 {
    XeString string = buffer->buffer;
-   string[0] = (XeChar) NULL;
+   string[0] = (XeChar)'\0';
    buffer->last_char = 0;
 }
 
index c14d98db9da1b84a58c48076961c19057fae9f2f..5e3e90f6abd0bd2c8861e733dd467ef4e4d707a1 100644 (file)
@@ -63,6 +63,7 @@
 
 #include <X11/Intrinsic.h>
 
+#include <Dt/CmdInv.h>
 #include <Dt/DtP.h>
 #include <Dt/Dts.h>
 #include <Dt/Help.h>
@@ -5138,7 +5139,7 @@ CmdInvSuccessfulRequest(
          * its status via TT messaging OR it may already have exited.
         * For now we set the state here -- till we find a better place.
         */
-       if (childrecp = _DtActFindChildRec(invp->id,data->requestPtr->childId))
+       if ((childrecp = _DtActFindChildRec(invp->id,data->requestPtr->childId)))
            childrecp->childState = _DtActCHILD_ALIVE_UNKNOWN;
        else
           myassert(0 /* could not find child record */ );
index d7dfb8ce2d13109e501a6b2a0dff2a8b0c073b78..ca7e6c6d11d2ca2ad3b7549f48b48c12d8ee8fff 100644 (file)
@@ -42,6 +42,7 @@
 /*LINTLIBRARY*/
 #include <sys/types.h>
 #include <sys/stat.h>
+#include <ctype.h>
 #include <string.h>
 #include <X11/Intrinsic.h>
 
@@ -176,41 +177,41 @@ typedef struct {
  * along with the bitmask that represents the field.
  */
 static _DtActNameAndBit _DtActNamesAndBits[] = {
-       _DtACTION_LABEL,                _ActDb_LABEL_SET,
-       _DtACTION_TYPE,                 _ActDb_TYPE_SET,
-       _DtACTION_ARG_CLASS,            _ActDb_ARG_CLASS_SET,
-        _DtACTION_ARG_MODE,            _ActDb_ARG_MODE_SET,
-       _DtACTION_ARG_TYPE,             _ActDb_ARG_TYPE_SET,
-       _DtACTION_ARG_COUNT,            _ActDb_ARG_COUNT_SET,
-       _DtACTION_DESCRIPTION,          _ActDb_DESCRIPTION_SET,
-       _DtACTION_ICON,                 _ActDb_ICON_SET,
+       { _DtACTION_LABEL,              _ActDb_LABEL_SET, },
+       { _DtACTION_TYPE,               _ActDb_TYPE_SET, },
+       { _DtACTION_ARG_CLASS,          _ActDb_ARG_CLASS_SET, },
+        { _DtACTION_ARG_MODE,          _ActDb_ARG_MODE_SET, },
+       { _DtACTION_ARG_TYPE,           _ActDb_ARG_TYPE_SET, },
+       { _DtACTION_ARG_COUNT,          _ActDb_ARG_COUNT_SET, },
+       { _DtACTION_DESCRIPTION,        _ActDb_DESCRIPTION_SET, },
+       { _DtACTION_ICON,               _ActDb_ICON_SET, },
 /*******************************************************************
 Meaningless for actions -- ignore these for now
-       _DtACTION_INSTANCE_ICON,        _ActDb_INSTANCE_ICON_SET,
+       { _DtACTION_INSTANCE_ICON,      _ActDb_INSTANCE_ICON_SET, },
 *******************************************************************/
-       _DtACTION_MAP_ACTION,           _ActDb_MAP_ACTION_SET,
-       _DtACTION_EXEC_STRING,          _ActDb_EXEC_STRING_SET,
-       _DtACTION_EXEC_HOST,            _ActDb_EXEC_HOST_SET,
-       _DtACTION_CWD,                  _ActDb_CWD_SET,
-       _DtACTION_WINDOW_TYPE,          _ActDb_WINDOW_TYPE_SET,
-       _DtACTION_TERM_OPTS,            _ActDb_TERM_OPTS_SET,
-       _DtACTION_TT_CLASS,             _ActDb_TT_CLASS_SET,
-       _DtACTION_TT_SCOPE,             _ActDb_TT_SCOPE_SET,
-       _DtACTION_TT_OPERATION,         _ActDb_TT_OPERATION_SET,
-       _DtACTION_TT_FILE,              _ActDb_TT_FILE_SET,
-       _DtACTION_TTN_MODE,             _ActDb_TT_ARGN_MODE_SET,
-       _DtACTION_TTN_VTYPE,            _ActDb_TT_ARGN_VTYP_SET,
-       _DtACTION_TTN_REP_TYPE,         _ActDb_TT_ARGN_RTYP_SET,
-       _DtACTION_TTN_VALUE,            _ActDb_TT_ARGN_VAL_SET,
+       { _DtACTION_MAP_ACTION,         _ActDb_MAP_ACTION_SET, },
+       { _DtACTION_EXEC_STRING,        _ActDb_EXEC_STRING_SET, },
+       { _DtACTION_EXEC_HOST,          _ActDb_EXEC_HOST_SET, },
+       { _DtACTION_CWD,                _ActDb_CWD_SET, },
+       { _DtACTION_WINDOW_TYPE,        _ActDb_WINDOW_TYPE_SET, },
+       { _DtACTION_TERM_OPTS,          _ActDb_TERM_OPTS_SET, },
+       { _DtACTION_TT_CLASS,           _ActDb_TT_CLASS_SET, },
+       { _DtACTION_TT_SCOPE,           _ActDb_TT_SCOPE_SET, },
+       { _DtACTION_TT_OPERATION,       _ActDb_TT_OPERATION_SET, },
+       { _DtACTION_TT_FILE,            _ActDb_TT_FILE_SET, },
+       { _DtACTION_TTN_MODE,           _ActDb_TT_ARGN_MODE_SET, },
+       { _DtACTION_TTN_VTYPE,          _ActDb_TT_ARGN_VTYP_SET, },
+       { _DtACTION_TTN_REP_TYPE,       _ActDb_TT_ARGN_RTYP_SET, },
+       { _DtACTION_TTN_VALUE,          _ActDb_TT_ARGN_VAL_SET, },
 
 #ifdef _DT_ALLOW_DT_MSGS
-       _DtACTION_DT_REQUEST_NAME,      _ActDb_DT_REQ_NAME_SET,
-       _DtACTION_DT_SVC,               _ActDb_DT_SVC_SET,
-       _DtACTION_DT_NOTIFY_NAME,       _ActDb_DT_NTFY_NAME_SET,
-       _DtACTION_DT_NGROUP,            _ActDb_DT_NGROUP_SET,
-       _DtPFX _DtACTION_DTN_VALUE,     _ActDb_DT_ARGN_VAL_SET,
+       { _DtACTION_DT_REQUEST_NAME,    _ActDb_DT_REQ_NAME_SET, },
+       { _DtACTION_DT_SVC,             _ActDb_DT_SVC_SET, },
+       { _DtACTION_DT_NOTIFY_NAME,     _ActDb_DT_NTFY_NAME_SET, },
+       { _DtACTION_DT_NGROUP,          _ActDb_DT_NGROUP_SET, },
+       { _DtPFX _DtACTION_DTN_VALUE,   _ActDb_DT_ARGN_VAL_SET, },
 #endif /* _DT_ALLOW_DT_MSGS */
-       NULL,                           0
+       { NULL,                         0 },
 };
 
 #define        NUM_FIELD_NAMES         sizeof(_DtActNamesAndBits)/sizeof(_DtActNameAndBit) - 1
index a3fa5ec9a3187901e041239e098ec3e39dfd29f4..743212253a9ab023775e85744e9a4e3d94965f7f 100644 (file)
@@ -1939,14 +1939,14 @@ ValidKeyword(
      * Fill in the length of the keywords at compile time by
      * using the "sizeof" operator (and subtracting one for the NULL).
      */
-   static  localHostLen = sizeof(_DtACT_LOCALHOST_STR) - 1;
-   static   databaseHostLen = sizeof(_DtACT_DATABASEHOST_STR) - 1;
-   static   displayHostLen = sizeof(_DtACT_DISPLAYHOST_STR) - 1;
-   static   sessionHostLen = sizeof(_DtACT_SESSIONHOST_STR) - 1;
-   static   argsLen = sizeof(_DtACT_ARGS_STR) - 1;
-   static   arg_Len = sizeof(_DtACT_ARG_UNDER_STR) - 1;
-   static   stringQualifierLen = sizeof(_DtACT_STRING_QUALIFIER) - 1;
-   static   fileQualifierLen = sizeof(_DtACT_FILE_QUALIFIER) - 1;
+   static  int localHostLen = sizeof(_DtACT_LOCALHOST_STR) - 1;
+   static  int databaseHostLen = sizeof(_DtACT_DATABASEHOST_STR) - 1;
+   static  int displayHostLen = sizeof(_DtACT_DISPLAYHOST_STR) - 1;
+   static  int sessionHostLen = sizeof(_DtACT_SESSIONHOST_STR) - 1;
+   static  int argsLen = sizeof(_DtACT_ARGS_STR) - 1;
+   static  int arg_Len = sizeof(_DtACT_ARG_UNDER_STR) - 1;
+   static  int stringQualifierLen = sizeof(_DtACT_STRING_QUALIFIER) - 1;
+   static  int fileQualifierLen = sizeof(_DtACT_FILE_QUALIFIER) - 1;
    int len = end - start + 1;
    char *stop;
    char *lastCh;
@@ -2303,7 +2303,7 @@ ParseMessage(
    while (1)
    {
       /* Look for the start and end of a keyword */
-      if (keywordStart = DtStrchr(start, '%'))
+      if ((keywordStart = DtStrchr(start, '%')))
          keywordEnd = DtStrchr(keywordStart+1, '%');
       else
          keywordEnd = NULL;
index 98681945a284df728004d426c96ca7e74f2eda13..200cb497965c9792c5f1235fe95276850237b804 100644 (file)
@@ -82,6 +82,7 @@
 #include <Dt/DtNlUtils.h>
 #include <Dt/CommandM.h>
 #include <Dt/Utility.h>
+#include <Dt/SvcTT.h>
 #include <Dt/Service.h>
 
 #include <Dt/ActionUtilP.h>
index 3d099e9c39020c8f9ae3a2c62c2401a683ad4aa6..992bf79d32f9cfc24946d95b481f510cc4ce3b57 100644 (file)
@@ -38,6 +38,7 @@
 ************************************<+>*************************************/
 
 /*LINTLIBRARY*/
+#include <ctype.h>
 #include <unistd.h>
 #include <stdio.h>
 #include <errno.h>
@@ -66,6 +67,7 @@
 #include <Dt/ActionUtilP.h>
 #include <Dt/CmdInvP.h>
 #include <Dt/DtNlUtils.h>
+#include <Dt/Indicator.h>
 
 #include "myassertP.h"
 #include "DtSvcLock.h"
@@ -354,7 +356,7 @@ _DtGetDisplayHostName( Display *dp)
                 */
                
                strcpy(tmpName,DisplayString(dp));
-               if ( tmp = DtStrrchr(tmpName,':') )
+               if (( tmp = DtStrrchr(tmpName,':') ))
                {
                        *tmp = '\0';
                        displayHostName = XtNewString(tmpName);
@@ -368,7 +370,7 @@ _DtGetDisplayHostName( Display *dp)
                 * DISPLAY environment variable.
                 */
                strcpy(tmpName,getenv("DISPLAY"));
-               if ( tmp = DtStrrchr(tmpName,':') )
+               if (( tmp = DtStrrchr(tmpName,':') ))
                {
                        *tmp = '\0';
                        displayHostName = XtNewString(tmpName);
@@ -423,7 +425,7 @@ _DtGetLocalHostName( void )
                _DtSvcProcessUnlock();
                return NULL; /* failed gethostname */
              }
-       if (ptr = DtStrchr(hostNameBuf, '.'))
+       if ((ptr = DtStrchr(hostNameBuf, '.')))
                *ptr = '\0';  /* delete domain name if there is one */
 
        localHostName = hostNameBuf;
@@ -1872,6 +1874,7 @@ _DtActReadTmpFileToBuffer( char *fname, int *sizep )
  *
  *****************************************************************************/
 
+int
 _DtActGetCmdReturnArgs( 
     DtActionInvocationID invId,
     _DtActChildRecT *childp,
index 08ff5c447fc7f47be938019b1e69de029bac35e9..5c6fdf6ff528232edc7db7210701d3f906b8cb9b 100644 (file)
@@ -58,6 +58,7 @@
 #include <Dt/CommandM.h>
 #include <Dt/EnvControlP.h>
 #include <Dt/DtNlUtils.h>
+#include <Dt/Utility.h>
 
 #include <Dt/ActionDb.h>
 #include <Dt/ActionUtilP.h>
index e59f48483aaa9bb7af2c28d38dbec8bde63b5e10..ea31e001e3001f047221258228ce64c2f728ab34 100644 (file)
@@ -189,7 +189,7 @@ _DtDbPathIdToString(
    char * path;
    char * newPath;
 
-   if (path = XrmQuarkToString((XrmQuark)pathId))
+   if ((path = XrmQuarkToString((XrmQuark)pathId)))
    {
       /* Allocate some storage for the string */
       newPath = (char *) XtNewString(path);
index 91032b9d5b961021f996df01518b5ef51d7fbfdd..f431230f9efba8d48d7e2d21f3317fc024eb6829 100644 (file)
@@ -742,7 +742,7 @@ _DtDbGetDataBaseEnv( void )
     * Get the DTDATABASESEARCHPATH environment variable.  If it is not set,
     * create the default value.
     */
-   if ( temp_s = getenv ("DTDATABASESEARCHPATH"))
+   if (( temp_s = getenv ("DTDATABASESEARCHPATH")))
       if ( *temp_s != 0 ) return XtNewString(temp_s);
 
    temp_buf =
index 9d45286c4cac52f80a9ea3162284bdc0e8fb7305..c0ea1d4f7185b07247d8a21e8dc96fdf5f85347e 100644 (file)
@@ -97,7 +97,8 @@ static Bool myCheckClientEvent(Display *display, XEvent *event, char *args)
 /*
  * myDtChkpntMsgSend --- Helper function: Send a checkpoint message to the listener
  */
-static myDtChkpntMsgSend(char *message, char *type) 
+static int
+myDtChkpntMsgSend(char *message, char *type)
 {
     static long     msgcount = 0;  /* Running count of messages */
     static int      propnum  = 0;  /* Which property are we using ? */
@@ -210,6 +211,7 @@ static myDtChkpntMsgSend(char *message, char *type)
 /*
  * _DtPerfChkpntInit --- Initialize the checkpointing mechanism
  */
+int
 _DtPerfChkpntInit(Display      *display,
             Window       parentwin,
             char         *prog_name,
@@ -300,6 +302,7 @@ _DtPerfChkpntInit(Display      *display,
 /*
  * _DtPerfChkpntMsgSend --- Send a checkpoint message to the listener
  */
+void
 _DtPerfChkpntMsgSend(char *message) 
 {
     myDtChkpntMsgSend(message, DT_PERF_CHKPNT_MSG_CHKPNT);
@@ -308,6 +311,7 @@ _DtPerfChkpntMsgSend(char *message)
 /*
  * myDtPerfChkpntEnd --- End the checkpointing message delivery
  */
+int
 _DtPerfChkpntEnd() 
 {
     myDtChkpntMsgSend("End checkpoint delivery", DT_PERF_CHKPNT_MSG_END);
index fd463c3f5b54414e769cf642bc1479dc253a680e..9f5bf8e3004544042bc353674147a40d7e05c570 100644 (file)
@@ -57,6 +57,7 @@ static struct {
 } dtsvc_info;
 
 /* _DtPerfChkpntListenInit(): Start the Checkpoint listener */
+int
 #ifdef _NOPROTO
 _DtPerfChkpntListenInit(display, parentwin)
 Display *display;      /* Current display */
index 3e3ffd2ca70031c3ce5212399cec5bfb57af53a1..3c93888a6758b0a9f112db975a60a96044bd127c 100644 (file)
@@ -97,7 +97,7 @@ typedef union {
 */
 
 /* Initialize the checkpointing mechanism */
-extern _DtPerfChkpntInit(
+extern int _DtPerfChkpntInit(
     Display       *display,       /* Display pointer                      */
     Window        parentwin,      /* Parent window id                     */
     char           *prog_name,    /* Name of the client program (argv[0]) */
@@ -105,12 +105,12 @@ extern _DtPerfChkpntInit(
 );
 
 /* Send a checkpoint message to the listener */
-extern _DtPerfChkpntMsgSend(
+extern void _DtPerfChkpntMsgSend(
     char           *message       /* Acual message for transmission     */
 );
 
 /* End the checkpointing message delivery */
-extern _DtPerfChkpntEnd(
+extern int _DtPerfChkpntEnd(
 );
 
 /*************************************************************************/
@@ -118,7 +118,7 @@ extern _DtPerfChkpntEnd(
 /*************************************************************************/
 
 /* Initialize the listener */
-extern _DtPerfChkpntListenInit(
+extern int _DtPerfChkpntListenInit(
     Display *display,  /* Current display */
     Window parentwin   /* Parent of window associated with listener */
 );
index 9e609b3ef5f3cda2fa16cb64e079c0466dcb327d..43dff9bc714fc29f3915854fc252b52c70824d5d 100644 (file)
@@ -32,6 +32,7 @@
  * (c) Copyright 1993, 1994 Novell, Inc.                               *
  */
 
+#include <ctype.h>
 #include <stdio.h>
 #include <string.h>
 #include <sys/param.h>
index 4d5947146fcc2b7953cd4178fa6157d0ff3f703a..f69b068821839154095aeec0ac79d2f4a1bc8ad7 100644 (file)
@@ -1001,7 +1001,7 @@ static void _DtEnvMapIt(
            /*
             * Tear apart and check for so called substitution characters.
             */
-           if ( tmpPtr = DtStrchr(prePend, '%') ) {
+           if (( tmpPtr = DtStrchr(prePend, '%') )) {
                /*
                 * Temporarly shorten path up to substitution character.
                 */
@@ -1341,7 +1341,7 @@ void _DtEnvMapForRemote (char *targetHost)
             */
            cacheRegen = 0;
            for ( i = 0; i < targetCache->mapListCnt; i++ ) {
-               if ( tmpPtr = getenv(targetCache->mapList[i]) ) {
+               if (( tmpPtr = getenv(targetCache->mapList[i]) )) {
                    if ( strcmp( tmpPtr,
                             targetCache->mapListDetails[i].localEnvVarCopy) ) {
                        cacheRegen = 1; /* one map entry is no longer valid */
@@ -1402,8 +1402,8 @@ void _DtEnvMapForRemote (char *targetHost)
         * the restoration pointers.
         */
        for ( i = 0; i < targetCache->mapListCnt; i++ ) {
-           if ( targetCache->mapListDetails[i].localEnvVarPtr =
-                                       getenv( targetCache->mapList[i] ) ) {
+           if (( targetCache->mapListDetails[i].localEnvVarPtr =
+                                       getenv( targetCache->mapList[i] ) )) {
                targetCache->mapListDetails[i].localEnvVarPtr -=
                                        strlen( targetCache->mapList[i] ) + 1;
            }
index f6a812254d236e0c07b1423442e26d1ff88cfc09..03e3f7e5e0c628c012415cef91f3e6053371ca92 100644 (file)
@@ -35,6 +35,7 @@
 /*                                                                           */
 /*****************************************************************************/
 
+#include <ctype.h>
 #include <string.h>
 #include <Dt/DtNlUtils.h>
 #include "DtSvcLock.h"
index 30ad91bf86fdba9ebc925b037c56e10123160eeb..e6508939933be70a3577b82d55781792dffd220f 100644 (file)
@@ -423,13 +423,13 @@ _DtEnvControl(
 
                        _postDtEnvironment.binPath = XtMalloc(bytes_needed);
 #ifdef sun
-                       if (ptr = strstr(tempString, "/usr/openwin/bin"))
+                       if ((ptr = strstr(tempString, "/usr/openwin/bin")))
 #elif defined(CSRG_BASED)
-                       if (ptr = strstr(tempString, "/usr/X11R6/bin"))
+                       if ((ptr = strstr(tempString, "/usr/X11R6/bin")))
 #elif defined(linux)
-                       if (ptr = strstr(tempString, "/usr/bin"))
+                       if ((ptr = strstr(tempString, "/usr/bin")))
 #else
-                       if (ptr = strstr(tempString, "/usr/bin/X11"))
+                       if ((ptr = strstr(tempString, "/usr/bin/X11")))
 #endif
                        {
                             /* 
index d302532043788128a26a86d04b85836e71387af4..6c0d7de8bf08d18ef8a2de0d038573f8b8b6611f 100644 (file)
@@ -119,7 +119,7 @@ GetTableIndex(
 
     if (tab->keyIsString) {
        s1 = (String)key;
-       for (s2 = (char *)s1; c = *s2++; )
+       for (s2 = (char *)s1; (c = *s2++); )
          sig = (sig << 1) + c;
        len = s2 - s1 - 1;
     }
@@ -127,7 +127,7 @@ GetTableIndex(
       sig = (Signature)key;
     
     idx = HASH(tab, sig);
-    while (entry = entries[idx]) {
+    while ((entry = entries[idx])) {
        if (entries[idx] == &DtHashfake) {
            if (new)
              return idx;
index 3422adc70c0e038959817dd1213780c3f562137d..1794db67475f278a4e593ffb711c1b41ee3f224c 100644 (file)
@@ -38,6 +38,7 @@
 #include <stdio.h>
 #include <string.h>
 #include <nl_types.h>
+#include <X11/Intrinsic.h>
 #include <Dt/MsgCatP.h>
 #include <DtSvcLock.h>
 
index 4cc0351d27ae6b4a6ea3d24db9e053c4c63d01db..51dd61eece572c715a18b1d61639e9631245e5ca 100644 (file)
@@ -45,6 +45,8 @@
 #include <X11/Xlib.h>
 #include <X11/Xlibint.h>
 
+#include <Dt/UserMsg.h>
+
 int 
 _DtPrintDefaultError(
         Display *dpy,
@@ -52,6 +54,7 @@ _DtPrintDefaultError(
         char *msg )
 {
     _DtPrintDefaultErrorSafe(dpy, event, msg, BUFSIZ);
+    /* XXX retval? */
 }
 
 #define _DTP_STRNCAT(s1, s2, nb, ec) \
index 3b10fe7e3636eafeeb189e999ed594b6dde65224..f6a3b371f4ec736ae574466f464591b6ae6b5b62 100644 (file)
@@ -43,6 +43,7 @@
 
 #include <sys/types.h>
 #include <sys/stat.h>
+#include <ctype.h>
 #include <errno.h>
 #include <fcntl.h>
 #include <limits.h>
index 6fcc7b8aa3c7b486d87cd0f85745d7faf6ce4320..d1d81f59a7ad7dda5d400ffef2aa3fca2ceb160b 100644 (file)
@@ -38,6 +38,7 @@
 #include <sys/stat.h>
 #include <sys/wait.h>
 #include <stdlib.h>
+#include <unistd.h>
 #include <X11/Xlib.h>
 #include <X11/Xlibint.h>
 #include <X11/Intrinsic.h>
@@ -262,9 +263,9 @@ GetShortHostname(
    char * ptr;
    int status;
 
-   if (status = gethostname(buffer, bufsize))
+   if ((status = gethostname(buffer, bufsize)))
       return status; /* failed gethostname */
-   if (ptr = strstr(buffer, (char *)"."))
+   if ((ptr = strstr(buffer, (char *)".")))
       *ptr = '\0';  /* delete domain name if there is one */
    return 0;
 }
@@ -332,10 +333,10 @@ GetDisplayName (
     /*
      * Strip host name to nothing but the unqualified (short) host name
      */
-    if (pch = DtStrchr(hostName, ':'))
+    if ((pch = DtStrchr(hostName, ':')))
        *pch = '\0';
 
-    if (pch = DtStrchr(hostName, '.'))
+    if ((pch = DtStrchr(hostName, '.')))
        *pch = '\0';
 
     if((!strcmp(hostName, "unix")) || (!strcmp(hostName, "local"))
@@ -350,8 +351,8 @@ GetDisplayName (
     /*
      * Strip screen off of display name
      */
-    if (tmpNumber = DtStrchr(displayName, ':'))
-       if (pch = DtStrchr(tmpNumber, '.'))
+    if ((tmpNumber = DtStrchr(displayName, ':')))
+       if ((pch = DtStrchr(tmpNumber, '.')))
            *pch = '\0';
 
     /*
index 05a3891be1716cf34439608569a8f923be0a5124..94a177f95f9cd88c10f6b343421cc152035d02eb 100644 (file)
@@ -125,7 +125,7 @@ _DtVectorizeInPlace(
       vector.  There is one more element than separator characters. */
    num_pieces = 1;
    nextc = string;
-   while (nextc = DtStrchr(nextc, separator))
+   while ((nextc = DtStrchr(nextc, separator)))
    {
       num_pieces++;
       nextc++;
@@ -140,7 +140,7 @@ _DtVectorizeInPlace(
    nextc = string;
 
    /* Parse out each component, terminating it with a NULL */
-   while (nextc = DtStrchr(nextc, separator))
+   while ((nextc = DtStrchr(nextc, separator)))
    {
       *nextc = '\0';
       nextc++;
index 60f9d6b5b399eadf07cf50ee6199146eef6c2804..a16a997df96663e1896c7a6e9ea30fc76c95d2e3 100644 (file)
@@ -35,9 +35,11 @@ $END$
  ****************************************************************************
  ************************************<+>*************************************/
 
+#include <ctype.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
+#include <unistd.h>
 #if defined(sun)
 #include <sys/utsname.h>
 #endif
index 12841e70f75207f793b9b382ae770d11dd6bde10..729b305b97392a3648f2275c7e99ff7a413c8562 100644 (file)
@@ -29,6 +29,7 @@
  */
 #include <Xm/XmP.h>
 #include <Xm/IconFile.h>
+#include <Xm/XmPrivate.h>
 
 #ifdef DtUse_XmFunctions