#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>
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;
}
#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>
* (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 *****/
/*------------------------------------------------------------------------+*/
+int
XeParseFileString(XeString line,
XeString *host_addr,
XeString *path_addr)
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 */
}
_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);
}
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;
}
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;
}
/*----------------------------------------------------------------------+*/
-remove_logfile_local_channel_object(SPC_Channel_Ptr channel)
+int remove_logfile_local_channel_object(SPC_Channel_Ptr channel)
/*----------------------------------------------------------------------+*/
{
int result;
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 */
#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"
/*----------------------------------------------------------------------+*/
-static getptypair(Wire *wire)
+static int getptypair(Wire *wire)
/*----------------------------------------------------------------------+*/
{
/* Attempt to open the master/slave pair of preset pty */
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);
XeFree(connection_hostname);
return(SPC_ERROR);
}
+ }
return(result);
}
}
/*----------------------------------------------------------------------+*/
-SPC_Setpgrp(int read_current_termio)
+int SPC_Setpgrp(int read_current_termio)
/*----------------------------------------------------------------------+*/
{
_DtSvcProcessLock();
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);
}
/*----------------------------------------------------------------------+*/
+int
remove_logfile_remote_channel_object(SPC_Channel_Ptr channel)
/*----------------------------------------------------------------------+*/
{
}
/*----------------------------------------------------------------------+*/
+int
SPC_Debug_Mode(SPC_Channel_Ptr channel,
XeString file)
/*----------------------------------------------------------------------+*/
* (c) Copyright 1993, 1994 Novell, Inc. *
*/
+#include <ctype.h>
#include <stdlib.h>
#include <bms/sbport.h> /* NOTE: sbport.h must be the first include. */
* (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>
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 */
/* ------------------------------------- */
*/
/*----------------------------------------------------------------------+*/
+int
SPC_Make_Log_Filename(XeString name,
int unique) /* When TRUE, make name unique */
/*----------------------------------------------------------------------+*/
}
/*----------------------------------------------------------------------+*/
+int
SPC_Open_Log(XeString filename,
int unique) /* When TRUE, make filename unique */
/*----------------------------------------------------------------------+*/
}
/*----------------------------------------------------------------------+*/
+int
SPC_Close_Log(void)
/*----------------------------------------------------------------------+*/
{
if (spc_logF) {
fclose(spc_logF);
}
- spc_logfd = NULL;
+ spc_logfd = 0;
spc_logF = NULL;
spc_logging = FALSE;
}
/*----------------------------------------------------------------------+*/
+int
SPC_Write_Log(XeString str)
/*----------------------------------------------------------------------+*/
{
*/
#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>
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
*/
/*----------------------------------------------------------------------+*/
+int
SPC_Setup_Synchronous_Terminator(void)
/*----------------------------------------------------------------------+*/
{
}
/*----------------------------------------------------------------------+*/
+int
SPC_MakeSystemCommand(SPC_Channel_Ptr channel)
/*----------------------------------------------------------------------+*/
{
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;
*/
/*----------------------------------------------------------------------+*/
+int
SPC_Local_Hostname(XeString hostname)
/*----------------------------------------------------------------------+*/
{
}
/*----------------------------------------------------------------------+*/
+int
SPC_Open_Socket(SPC_Connection_Ptr conn,
int type)
/*----------------------------------------------------------------------+*/
*/
/*----------------------------------------------------------------------+*/
+int
SPC_Contact_Server(SPC_Connection_Ptr connection)
/*----------------------------------------------------------------------+*/
{
}
/*----------------------------------------------------------------------+*/
+int
SPC_Inetd_Daemon(SPC_Connection_Ptr conn)
/*----------------------------------------------------------------------+*/
{
};
/*----------------------------------------------------------------------+*/
+int
SPC_ResetTerminator(void)
/*----------------------------------------------------------------------+*/
{
}
/*----------------------------------------------------------------------+*/
+int
SPC_Initialize(void)
/*----------------------------------------------------------------------+*/
{
*/
/*----------------------------------------------------------------------+*/
+int
SPC_Check_Style(int iomode)
/*----------------------------------------------------------------------+*/
{
*/
/*----------------------------------------------------------------------+*/
+int
SPC_Transform_Iomode(int iomode)
/*----------------------------------------------------------------------+*/
{
*/
/*----------------------------------------------------------------------+*/
+int
SPC_Newline_Filter(SPC_Channel_Ptr channel,
int connector,
XeString buffer,
}
/*----------------------------------------------------------------------+*/
+int
SPC_Input_Handler(SPC_Channel_Ptr channel,
int connector)
/*----------------------------------------------------------------------+*/
/*----------------------------------------------------------------------+*/
+int
signal_channel_object (SPC_Channel_Ptr UNUSED_PARM(channel),
int UNUSED_PARM(sig))
/*----------------------------------------------------------------------+*/
/*----------------------------------------------------------------------+*/
+int
attach_channel_object(SPC_Channel_Ptr UNUSED_PARM(channel),
int UNUSED_PARM(pid))
/*----------------------------------------------------------------------+*/
/*----------------------------------------------------------------------+*/
+int
add_input_channel_object(SPC_Channel_Ptr UNUSED_PARM(channel),
SbInputHandlerProc UNUSED_PARM(handler),
void *UNUSED_PARM(data) )
/*----------------------------------------------------------------------+*/
+int
remove_logfile_channel_object(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);
}
};
/*----------------------------------------------------------------------+*/
+int
SPC_Change_State(SPC_Channel_Ptr channel,
int connector,
int data_line,
error condition in the state table */
/*----------------------------------------------------------------------+*/
+int
error_fun(SPC_Channel_Ptr UNUSED_PARM(channel),
int UNUSED_PARM(connector))
/*----------------------------------------------------------------------+*/
*/
/*----------------------------------------------------------------------+*/
+int
connector_eof(SPC_Channel_Ptr channel,
int connector)
/*----------------------------------------------------------------------+*/
/*----------------------------------------------------------------------+*/
+int
connector_eof_with_reset(SPC_Channel_Ptr channel,
int connector)
/*----------------------------------------------------------------------+*/
*/
/*----------------------------------------------------------------------+*/
+int
sigcld_with_reset(SPC_Channel_Ptr channel,
int UNUSED_PARM(connector))
/*----------------------------------------------------------------------+*/
#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 },
};
if (!*buff)
return flag;
- while (item = (XeString)STRTOKX(buff, SPC_TCFLAG_SEP))
+ while ((item = (XeString)STRTOKX(buff, SPC_TCFLAG_SEP)))
{
Boolean found = FALSE;
if (!*buff) return;
- while (cc_name = (XeString)STRTOKX(buff, SPC_TCFLAG_SEP))
+ while ((cc_name = (XeString)STRTOKX(buff, SPC_TCFLAG_SEP)))
{
Boolean found = FALSE;
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 */
*/
/*----------------------------------------------------------------------+*/
+int
spc_close(int fd)
/*----------------------------------------------------------------------+*/
{
}
/*----------------------------------------------------------------------+*/
+int
spc_dup2(int from, int to)
/*----------------------------------------------------------------------+*/
{
}
/*----------------------------------------------------------------------+*/
+int
SPC_fd_to_connector(SPC_Channel_Ptr channel,
int fd)
/*----------------------------------------------------------------------+*/
}
/*-----------------------------------------------------------------------+*/
-static SPC_Select(void )
+static int
+SPC_Select(void )
/*-----------------------------------------------------------------------+*/
{
break_on_termination=TRUE;
}
/*----------------------------------------------------------------------+*/
+int
XeSPCClose(SPC_Channel_Ptr channel)
/*----------------------------------------------------------------------+*/
{
}
/*----------------------------------------------------------------------+*/
+int
XeSPCReset(SPC_Channel_Ptr channel)
/*----------------------------------------------------------------------+*/
{
}
/*----------------------------------------------------------------------+*/
+int
XeSPCRead(SPC_Channel_Ptr channel,
int connector, /* STDOUT or STDERR */
XeString buffer,
/*----------------------------------------------------------------------+*/
+int
XeSPCWrite(SPC_Channel_Ptr channel,
XeString buffer,
int length)
}
/*----------------------------------------------------------------------+*/
+int
XeSPCActive(SPC_Channel_Ptr channel)
/*----------------------------------------------------------------------+*/
{
}
/*----------------------------------------------------------------------+*/
+int
XeSPCData(SPC_Channel_Ptr channel)
/*----------------------------------------------------------------------+*/
{
}
/*----------------------------------------------------------------------+*/
+int
XeSPCExecuteProcess(SPC_Channel_Ptr channel)
/*----------------------------------------------------------------------+*/
{
}
/*----------------------------------------------------------------------+*/
+int
XeSPCSignalProcess(SPC_Channel_Ptr channel,
int sig)
/*----------------------------------------------------------------------+*/
}
/*----------------------------------------------------------------------+*/
+int
XeSPCAddInput(SPC_Channel_Ptr channel,
SbInputHandlerProc handler,
/*----------------------------------------------------------------------+*/
/*----------------------------------------------------------------------+*/
+int
XeSPCRegisterTerminator(SPC_Channel_Ptr channel,
SPC_TerminateHandlerType terminator,
void * client_data)
/*----------------------------------------------------------------------+*/
+int
XeSPCAttach(SPC_Channel_Ptr channel,
int pid)
/*----------------------------------------------------------------------+*/
}
/*----------------------------------------------------------------------+*/
+int
XeSPCDetach(SPC_Channel_Ptr channel)
/*----------------------------------------------------------------------+*/
{
*/
/*----------------------------------------------------------------------+*/
+int
XeSPCSpawn(XeString pathname,
XeString context_dir,
XeString *argv,
}
/*----------------------------------------------------------------------+*/
+int
XeSPCKillProcess(SPC_Channel_Ptr channel,
int wait)
/*----------------------------------------------------------------------+*/
}
/*----------------------------------------------------------------------+*/
+int
XeSPCInterruptProcess(SPC_Channel_Ptr channel)
/*----------------------------------------------------------------------+*/
{
}
/*----------------------------------------------------------------------+*/
+int
XeSPCGetProcessStatus(SPC_Channel_Ptr channel,
int *type,
int *cause)
}
/*----------------------------------------------------------------------+*/
+int
XeSPCGetPID(SPC_Channel_Ptr channel)
/*----------------------------------------------------------------------+*/
{
*/
/*----------------------------------------------------------------------+*/
+int
SPC_Process_Single_Prot_Request(protocol_request_ptr req, SPC_Channel_Ptr channel)
/*----------------------------------------------------------------------+*/
{
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;
*/
/*----------------------------------------------------------------------+*/
+int
XeSPCGetChannelSyncFd(SPC_Channel_Ptr channel)
/*----------------------------------------------------------------------+*/
{
*/
/*----------------------------------------------------------------------+*/
+int
XeSetpgrp(int read_current_termio)
/*----------------------------------------------------------------------+*/
{
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);
/*------------------------------------------------------------------------+*/
{
XeString string = buffer->buffer;
- string[0] = (XeChar) NULL;
+ string[0] = (XeChar)'\0';
buffer->last_char = 0;
}
#include <X11/Intrinsic.h>
+#include <Dt/CmdInv.h>
#include <Dt/DtP.h>
#include <Dt/Dts.h>
#include <Dt/Help.h>
* 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 */ );
/*LINTLIBRARY*/
#include <sys/types.h>
#include <sys/stat.h>
+#include <ctype.h>
#include <string.h>
#include <X11/Intrinsic.h>
* 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
* 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;
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;
#include <Dt/DtNlUtils.h>
#include <Dt/CommandM.h>
#include <Dt/Utility.h>
+#include <Dt/SvcTT.h>
#include <Dt/Service.h>
#include <Dt/ActionUtilP.h>
************************************<+>*************************************/
/*LINTLIBRARY*/
+#include <ctype.h>
#include <unistd.h>
#include <stdio.h>
#include <errno.h>
#include <Dt/ActionUtilP.h>
#include <Dt/CmdInvP.h>
#include <Dt/DtNlUtils.h>
+#include <Dt/Indicator.h>
#include "myassertP.h"
#include "DtSvcLock.h"
*/
strcpy(tmpName,DisplayString(dp));
- if ( tmp = DtStrrchr(tmpName,':') )
+ if (( tmp = DtStrrchr(tmpName,':') ))
{
*tmp = '\0';
displayHostName = XtNewString(tmpName);
* DISPLAY environment variable.
*/
strcpy(tmpName,getenv("DISPLAY"));
- if ( tmp = DtStrrchr(tmpName,':') )
+ if (( tmp = DtStrrchr(tmpName,':') ))
{
*tmp = '\0';
displayHostName = XtNewString(tmpName);
_DtSvcProcessUnlock();
return NULL; /* failed gethostname */
}
- if (ptr = DtStrchr(hostNameBuf, '.'))
+ if ((ptr = DtStrchr(hostNameBuf, '.')))
*ptr = '\0'; /* delete domain name if there is one */
localHostName = hostNameBuf;
*
*****************************************************************************/
+int
_DtActGetCmdReturnArgs(
DtActionInvocationID invId,
_DtActChildRecT *childp,
#include <Dt/CommandM.h>
#include <Dt/EnvControlP.h>
#include <Dt/DtNlUtils.h>
+#include <Dt/Utility.h>
#include <Dt/ActionDb.h>
#include <Dt/ActionUtilP.h>
char * path;
char * newPath;
- if (path = XrmQuarkToString((XrmQuark)pathId))
+ if ((path = XrmQuarkToString((XrmQuark)pathId)))
{
/* Allocate some storage for the string */
newPath = (char *) XtNewString(path);
* 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 =
/*
* 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 ? */
/*
* _DtPerfChkpntInit --- Initialize the checkpointing mechanism
*/
+int
_DtPerfChkpntInit(Display *display,
Window parentwin,
char *prog_name,
/*
* _DtPerfChkpntMsgSend --- Send a checkpoint message to the listener
*/
+void
_DtPerfChkpntMsgSend(char *message)
{
myDtChkpntMsgSend(message, DT_PERF_CHKPNT_MSG_CHKPNT);
/*
* myDtPerfChkpntEnd --- End the checkpointing message delivery
*/
+int
_DtPerfChkpntEnd()
{
myDtChkpntMsgSend("End checkpoint delivery", DT_PERF_CHKPNT_MSG_END);
} dtsvc_info;
/* _DtPerfChkpntListenInit(): Start the Checkpoint listener */
+int
#ifdef _NOPROTO
_DtPerfChkpntListenInit(display, parentwin)
Display *display; /* Current display */
*/
/* 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]) */
);
/* 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(
);
/*************************************************************************/
/*************************************************************************/
/* Initialize the listener */
-extern _DtPerfChkpntListenInit(
+extern int _DtPerfChkpntListenInit(
Display *display, /* Current display */
Window parentwin /* Parent of window associated with listener */
);
* (c) Copyright 1993, 1994 Novell, Inc. *
*/
+#include <ctype.h>
#include <stdio.h>
#include <string.h>
#include <sys/param.h>
/*
* Tear apart and check for so called substitution characters.
*/
- if ( tmpPtr = DtStrchr(prePend, '%') ) {
+ if (( tmpPtr = DtStrchr(prePend, '%') )) {
/*
* Temporarly shorten path up to substitution character.
*/
*/
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 */
* 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;
}
/* */
/*****************************************************************************/
+#include <ctype.h>
#include <string.h>
#include <Dt/DtNlUtils.h>
#include "DtSvcLock.h"
_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
{
/*
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;
}
sig = (Signature)key;
idx = HASH(tab, sig);
- while (entry = entries[idx]) {
+ while ((entry = entries[idx])) {
if (entries[idx] == &DtHashfake) {
if (new)
return idx;
#include <stdio.h>
#include <string.h>
#include <nl_types.h>
+#include <X11/Intrinsic.h>
#include <Dt/MsgCatP.h>
#include <DtSvcLock.h>
#include <X11/Xlib.h>
#include <X11/Xlibint.h>
+#include <Dt/UserMsg.h>
+
int
_DtPrintDefaultError(
Display *dpy,
char *msg )
{
_DtPrintDefaultErrorSafe(dpy, event, msg, BUFSIZ);
+ /* XXX retval? */
}
#define _DTP_STRNCAT(s1, s2, nb, ec) \
#include <sys/types.h>
#include <sys/stat.h>
+#include <ctype.h>
#include <errno.h>
#include <fcntl.h>
#include <limits.h>
#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>
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;
}
/*
* 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"))
/*
* Strip screen off of display name
*/
- if (tmpNumber = DtStrchr(displayName, ':'))
- if (pch = DtStrchr(tmpNumber, '.'))
+ if ((tmpNumber = DtStrchr(displayName, ':')))
+ if ((pch = DtStrchr(tmpNumber, '.')))
*pch = '\0';
/*
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++;
nextc = string;
/* Parse out each component, terminating it with a NULL */
- while (nextc = DtStrchr(nextc, separator))
+ while ((nextc = DtStrchr(nextc, separator)))
{
*nextc = '\0';
nextc++;
****************************************************************************
************************************<+>*************************************/
+#include <ctype.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include <unistd.h>
#if defined(sun)
#include <sys/utsname.h>
#endif
*/
#include <Xm/XmP.h>
#include <Xm/IconFile.h>
+#include <Xm/XmPrivate.h>
#ifdef DtUse_XmFunctions