The great includes migration of 2019 (autotools)
Ok - so one of the steps in building CDE is an early phase called the includes phase (make includes). At this point, all of the public header files are exported to exports/include/Dt, DtI, ... Then, the software is built using that include dir. This of course does not work in autotools. Much of the software does things like #include <Dt/something.h>, so in order for the build to succeed, this behavior must be represented/replicated in some way. It seems the usual way of dealing with this is to place all public headers (and in some projects, ALL headers) into a toplevel include directory. We now do this for all public headers - they have been moved from wherever they were and placed in the appropriate spot in includes/ This will break the Imake 'make includes' phase unless the Imakefiles are fixed (remove the HEADERS = stuff, and the incdir defines). This has not been done at this point since in reality, once autotools works properly, there will be no need for the Imake stuff anymore, and I intend to get rid of it. This is just a warning for now - Imake builds in this tree will now fail at the 'includes' stage. This commit is only the migration. In upcoming commits, libtt will be fixed so that the hack being used before to get around this problem is removed as there will no longer be any need. And then the autotools work continues...
This commit is contained in:
@@ -1,139 +0,0 @@
|
||||
/*
|
||||
* CDE - Common Desktop Environment
|
||||
*
|
||||
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
|
||||
*
|
||||
* These libraries and programs are free software; you can
|
||||
* redistribute them and/or modify them under the terms of the GNU
|
||||
* Lesser General Public License as published by the Free Software
|
||||
* Foundation; either version 2 of the License, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* These libraries and programs are distributed in the hope that
|
||||
* they will be useful, but WITHOUT ANY WARRANTY; without even the
|
||||
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU Lesser General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with these libraries and programs; if not, write
|
||||
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
|
||||
* Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/* $TOG: Action.h /main/4 1998/05/06 15:55:18 rafi $ */
|
||||
/*
|
||||
* (c) Copyright 1993, 1994 Hewlett-Packard Company
|
||||
* (c) Copyright 1993, 1994 International Business Machines Corp.
|
||||
* (c) Copyright 1993, 1994 Sun Microsystems, Inc.
|
||||
* (c) Copyright 1993, 1994 Novell, Inc.
|
||||
*/
|
||||
|
||||
#ifndef _Dt_Action_h
|
||||
#define _Dt_Action_h
|
||||
|
||||
#include <X11/Intrinsic.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Argument types
|
||||
*/
|
||||
|
||||
#define DtACTION_FILE 1 /* file argument */
|
||||
#define DtACTION_BUFFER 2 /* buffer argument */
|
||||
#define DtACTION_STRING 3 /* string argument */
|
||||
#define DtACTION_NULLARG 4 /* untyped return-only argument */
|
||||
|
||||
typedef struct {
|
||||
void *bp; /* location of buffer */
|
||||
int size; /* size of buffer in bytes */
|
||||
char *type; /* (opt.) type of buffer */
|
||||
char *name; /* (opt.) name of buffer object */
|
||||
Boolean writable; /* allow changes to buffer object? */
|
||||
} DtActionBuffer;
|
||||
|
||||
typedef struct {
|
||||
char *name;
|
||||
} DtActionFile;
|
||||
|
||||
typedef struct {
|
||||
/*
|
||||
* Structure containing argument information
|
||||
*/
|
||||
int argClass; /* see argument types */
|
||||
union {
|
||||
DtActionFile file;
|
||||
DtActionBuffer buffer;
|
||||
} u;
|
||||
} DtActionArg;
|
||||
|
||||
/*
|
||||
* DtActionStatus codes
|
||||
*/
|
||||
typedef enum {
|
||||
DtACTION_OK, /* If not any of the below */
|
||||
DtACTION_INVALID_ID, /* ID is not valid */
|
||||
DtACTION_INVOKED, /* the action invocation step is done */
|
||||
DtACTION_STATUS_UPDATE, /* status update */
|
||||
DtACTION_DONE, /* normal action termination code */
|
||||
DtACTION_FAILED, /* error running action */
|
||||
DtACTION_CANCELED /* normal action termination by cancel*/
|
||||
} DtActionStatus;
|
||||
|
||||
typedef void (*DtDbReloadCallbackProc)(
|
||||
XtPointer clientData);
|
||||
|
||||
/*
|
||||
* DtActionInvocationID is the fundamental user-space handle to invoked
|
||||
* actions.
|
||||
*/
|
||||
typedef unsigned long DtActionInvocationID;
|
||||
|
||||
typedef void (*DtActionCallbackProc) (
|
||||
DtActionInvocationID id,
|
||||
XtPointer client_data,
|
||||
DtActionArg *actionArgPtr,
|
||||
int actionArgCount,
|
||||
DtActionStatus status);
|
||||
|
||||
/*
|
||||
* Functions
|
||||
*/
|
||||
|
||||
extern Boolean DtActionExists(
|
||||
char *actionName);
|
||||
|
||||
extern char * DtActionLabel(
|
||||
char *actionName);
|
||||
|
||||
extern char * DtActionDescription(
|
||||
char *actionName);
|
||||
|
||||
extern void DtDbReloadNotify (
|
||||
DtDbReloadCallbackProc proc,
|
||||
XtPointer clientData);
|
||||
|
||||
extern void DtDbLoad(void);
|
||||
|
||||
extern DtActionInvocationID DtActionInvoke (
|
||||
Widget w,
|
||||
char *action,
|
||||
DtActionArg *args,
|
||||
int argCount,
|
||||
char *termOpts,
|
||||
char *execHost,
|
||||
char *contextDir,
|
||||
int useIndicator,
|
||||
DtActionCallbackProc statusUpdateCb,
|
||||
XtPointer client_data);
|
||||
|
||||
extern char * DtActionIcon(
|
||||
char *actionName);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _Dt_Action_h */
|
||||
@@ -1,241 +0,0 @@
|
||||
/*
|
||||
* CDE - Common Desktop Environment
|
||||
*
|
||||
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
|
||||
*
|
||||
* These libraries and programs are free software; you can
|
||||
* redistribute them and/or modify them under the terms of the GNU
|
||||
* Lesser General Public License as published by the Free Software
|
||||
* Foundation; either version 2 of the License, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* These libraries and programs are distributed in the hope that
|
||||
* they will be useful, but WITHOUT ANY WARRANTY; without even the
|
||||
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU Lesser General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with these libraries and programs; if not, write
|
||||
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
|
||||
* Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/*****************************************************************************
|
||||
*
|
||||
* File: ActionDb.h
|
||||
* RCS: $XConsortium: ActionDb.h /main/3 1995/10/26 14:58:38 rswiston $
|
||||
* Description: Internal header file for the action database functions.
|
||||
* Language: C
|
||||
* Package: N/A
|
||||
* Status: Experimental (Do Not Distribute)
|
||||
*
|
||||
*
|
||||
** (c) Copyright 1993, 1994 Hewlett-Packard Company
|
||||
** (c) Copyright 1993, 1994 International Business Machines Corp.
|
||||
** (c) Copyright 1993, 1994 Sun Microsystems, Inc.
|
||||
** (c) Copyright 1993, 1994 Novell, Inc.
|
||||
*****************************************************************************/
|
||||
|
||||
#ifndef _Dt_ActionDb_h
|
||||
#define _Dt_ActionDb_h
|
||||
|
||||
|
||||
/*
|
||||
* The following constants are used by the database parsing code to
|
||||
* identify the field names for an action definition.
|
||||
*
|
||||
* Recognized Field names for any action definition.
|
||||
*/
|
||||
#define _DtACTION_NAME "ACTION"
|
||||
#define _DtACTION_TYPE "TYPE"
|
||||
#define _DtACTION_LABEL "LABEL"
|
||||
#define _DtACTION_ARG_CLASS "ARG_CLASS"
|
||||
#define _DtACTION_ARG_MODE "ARG_MODE"
|
||||
#define _DtACTION_ARG_TYPE "ARG_TYPE"
|
||||
#define _DtACTION_ARG_COUNT "ARG_COUNT"
|
||||
#define _DtACTION_DESCRIPTION "DESCRIPTION"
|
||||
#define _DtACTION_ICON "ICON"
|
||||
#define _DtACTION_INSTANCE_ICON "INSTANCE_ICON"
|
||||
|
||||
/*
|
||||
* Miscellaneous syntax strings
|
||||
*/
|
||||
#define _DtACT_ANY "*"
|
||||
#define _DtACT_LIST_SEPARATOR_CHAR ','
|
||||
#define _DtACT_GT_CHAR '>'
|
||||
#define _DtACT_LT_CHAR '<'
|
||||
|
||||
|
||||
/*
|
||||
* Valid values for ACTION_TYPE
|
||||
*/
|
||||
#define _DtACTION_MAP "MAP"
|
||||
#define _DtACTION_COMMAND "COMMAND"
|
||||
#define _DtACTION_TT_MSG "TT_MSG"
|
||||
|
||||
#ifdef _DT_ALLOW_DT_MSGS
|
||||
|
||||
#define _DtACTION_DT_REQUEST "DT_REQUEST"
|
||||
#define _DtACTION_DT_NOTIFY "DT_NOTIFY"
|
||||
#endif /* _DT_ALLOW_DT_MSGS */
|
||||
|
||||
/*
|
||||
* Field names for "MAP" type actions
|
||||
*/
|
||||
|
||||
#define _DtACTION_MAP_ACTION "MAP_ACTION"
|
||||
|
||||
/*
|
||||
* Field names for the "COMMAND" type actions.
|
||||
*/
|
||||
#define _DtACTION_EXEC_STRING "EXEC_STRING"
|
||||
#define _DtACTION_EXEC_HOST "EXEC_HOST"
|
||||
#define _DtACTION_CWD "CWD"
|
||||
#define _DtACTION_WINDOW_TYPE "WINDOW_TYPE"
|
||||
#define _DtACTION_TERM_OPTS "TERM_OPTS"
|
||||
|
||||
/*
|
||||
* Field names for "TT_MSG" type actions
|
||||
*/
|
||||
#define _DtACTION_TT_CLASS "TT_CLASS"
|
||||
#define _DtACTION_TT_SCOPE "TT_SCOPE"
|
||||
#define _DtACTION_TT_OPERATION "TT_OPERATION"
|
||||
#define _DtACTION_TT_FILE "TT_FILE"
|
||||
/* definitions to decifer TT_ARGn_* fields */
|
||||
#define _DtACTION_TTN_ARG "TT_ARG"
|
||||
#define _DtACTION_TTN_MODE "_MODE"
|
||||
#define _DtACTION_TTN_VTYPE "_VTYPE"
|
||||
#define _DtACTION_TTN_REP_TYPE "_REP_TYPE"
|
||||
#define _DtACTION_TTN_VALUE "_VALUE"
|
||||
|
||||
|
||||
#ifdef _DT_ALLOW_DT_MSGS
|
||||
/*
|
||||
* Field names for "DT_REQUEST" type actions
|
||||
*/
|
||||
#define _DtACTION_DT_REQUEST_NAME "DT_REQUEST_NAME"
|
||||
#define _DtACTION_DT_SVC "DT_SVC"
|
||||
|
||||
/*
|
||||
* Field names for "DT_NOTIFY" type actions
|
||||
*/
|
||||
#define _DtACTION_DT_NOTIFY_NAME "DT_NOTIFY_NAME"
|
||||
#define _DtACTION_DT_NGROUP "DT_NGROUP"
|
||||
|
||||
/*
|
||||
* Field names for DT ARGn (either request or notify)
|
||||
*/
|
||||
#define _DtACTION_DTN_ARG "DT_ARG"
|
||||
#define _DtACTION_DTN_VALUE "_VALUE"
|
||||
|
||||
#endif /* _DT_ALLOW_DT_MSGS */
|
||||
|
||||
/*
|
||||
* Valid Field value strings
|
||||
* for Command Actions Window Types
|
||||
*/
|
||||
#define _DtACTION_TERMINAL "TERMINAL"
|
||||
#define _DtACTION_PERM_TERMINAL "PERM_TERMINAL"
|
||||
#define _DtACTION_NO_STDIO "NO_STDIO"
|
||||
|
||||
/*
|
||||
* Valid Field values for ARG_CLASS records.
|
||||
*/
|
||||
#define _DtACTION_BUFFER "BUFFER"
|
||||
#define _DtACTION_FILE "FILE"
|
||||
#define _DtACTION_STRING "STRING"
|
||||
|
||||
/*
|
||||
* Valid Field values for ARG_MODE
|
||||
*/
|
||||
|
||||
#define _DtACT_ARG_MODE_WRITE "w"
|
||||
#define _DtACT_ARG_MODE_NOWRITE "!w"
|
||||
#define _DtACT_ARG_MODE_ANY _DtACT_ANY
|
||||
|
||||
|
||||
/*
|
||||
* Valid Field values for TT_CLASS records.
|
||||
*/
|
||||
#define _DtACTION_TT_NOTICE "TT_NOTICE"
|
||||
#define _DtACTION_TT_REQUEST "TT_REQUEST"
|
||||
|
||||
/*
|
||||
* Valid Field values for TT_SCOPE records.
|
||||
*/
|
||||
#define _DtACTION_TT_SESSION "TT_SESSION"
|
||||
#define _DtACTION_TT_BOTH "TT_BOTH"
|
||||
#define _DtACTION_TT_FILE_IN_SESSION "TT_FILE_IN_SESSION"
|
||||
/* --- same as TT_MSG's TT_FILE field name --------
|
||||
#define _DtACTION_TT_FILE "TT_FILE"
|
||||
*/
|
||||
|
||||
/*
|
||||
* Valid Field values for TT_ARGn_MODE
|
||||
*/
|
||||
#define _DtACTION_TT_MODE_IN "TT_IN"
|
||||
#define _DtACTION_TT_MODE_OUT "TT_OUT"
|
||||
#define _DtACTION_TT_MODE_INOUT "TT_INOUT"
|
||||
|
||||
/*
|
||||
* Valid Field values for TT_ARGn_REP_TYPE
|
||||
*/
|
||||
#define _DtACTION_TT_RTYP_UND "TT_REP_UNDEFINED"
|
||||
#define _DtACTION_TT_RTYP_INT "TT_REP_INTEGER"
|
||||
#define _DtACTION_TT_RTYP_BUF "TT_REP_BUFFER"
|
||||
#define _DtACTION_TT_RTYP_STR "TT_REP_STRING"
|
||||
|
||||
/*
|
||||
* Action Keywords --
|
||||
* these keywords appear in the action database files
|
||||
* in the form: %<qualifier><keyword><prompt string>%
|
||||
* where the optional qualifier in enclosed in: ()
|
||||
* and the optional prompt string is enclosed in: ""
|
||||
*/
|
||||
#define _DtACT_DATABASEHOST_STR "DatabaseHost"
|
||||
#define _DtACT_DISPLAYHOST_STR "DisplayHost"
|
||||
#define _DtACT_LOCALHOST_STR "LocalHost"
|
||||
#define _DtACT_SESSIONHOST_STR "SessionHost"
|
||||
#define _DtACT_ARGS_STR "Args"
|
||||
#define _DtACT_ARG_UNDER_STR "Arg_"
|
||||
|
||||
#define _DtACT_STRING_QUALIFIER "(String)"
|
||||
#define _DtACT_FILE_QUALIFIER "(File)"
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* Default action field value definitions (these should be strings)
|
||||
* for recognized fields.
|
||||
*/
|
||||
#define _DtACT_LBL_DFLT NULL
|
||||
#define _DtACT_TYPE_DFLT _DtACTION_COMMAND
|
||||
#define _DtACT_ARG_CLASS_DFLT _DtACT_ANY
|
||||
#define _DtACT_ARG_MODE_DFLT _DtACT_ANY
|
||||
#define _DtACT_ARG_TYPE_DFLT _DtACT_ANY
|
||||
#define _DtACT_ARG_CNT_DFLT _DtACT_ANY
|
||||
#define _DtACT_DESC_DFLT NULL
|
||||
#define _DtACT_ICON_DFLT NULL
|
||||
#define _DtACT_MAP_ACT_DFLT NULL
|
||||
#define _DtACT_EXEC_STRG_DFLT NULL
|
||||
#define _DtACT_EXEC_HOST_DFLT \
|
||||
"%" _DtACT_DATABASEHOST_STR "%,%" _DtACT_LOCALHOST_STR "%"
|
||||
#define _DtACT_CWD_DFLT NULL
|
||||
#define _DtACT_WIN_TYPE_DFLT _DtACTION_PERM_TERMINAL
|
||||
#define _DtACT_TERM_OPTS_DFLT NULL
|
||||
#define _DtACT_TT_CLASS_DFLT NULL
|
||||
#define _DtACT_TT_SCOPE_DFLT NULL
|
||||
#define _DtACT_TT_OP_DFLT NULL
|
||||
#define _DtACT_TT_FILE_DFLT NULL
|
||||
|
||||
#ifdef _DT_ALLOW_DT_MSGS
|
||||
#define _DtACT_DT_REQ_DFLT NULL
|
||||
#define _DtACT_DT_SVC_DFLT NULL
|
||||
#define _DtACT_DT_NTFY_DFLT NULL
|
||||
#define _DtACT_DT_NGRP_DFLT NULL
|
||||
#endif /* _DT_ALLOW_DT_MSGS */
|
||||
|
||||
|
||||
|
||||
#endif /* _Dt_ActionDb_h */
|
||||
/* DON'T ADD ANYTHING AFTER THIS #endif */
|
||||
@@ -1,143 +0,0 @@
|
||||
/*
|
||||
* CDE - Common Desktop Environment
|
||||
*
|
||||
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
|
||||
*
|
||||
* These libraries and programs are free software; you can
|
||||
* redistribute them and/or modify them under the terms of the GNU
|
||||
* Lesser General Public License as published by the Free Software
|
||||
* Foundation; either version 2 of the License, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* These libraries and programs are distributed in the hope that
|
||||
* they will be useful, but WITHOUT ANY WARRANTY; without even the
|
||||
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU Lesser General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with these libraries and programs; if not, write
|
||||
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
|
||||
* Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/*****************************************************************************
|
||||
*
|
||||
* File: ActionDbP.h
|
||||
* RCS: $XConsortium: ActionDbP.h /main/3 1995/10/26 14:58:53 rswiston $
|
||||
* Description: Private header file for the action database functions.
|
||||
* Language: C
|
||||
* Package: N/A
|
||||
*
|
||||
*
|
||||
** (c) Copyright 1993, 1994 Hewlett-Packard Company
|
||||
** (c) Copyright 1993, 1994 International Business Machines Corp.
|
||||
** (c) Copyright 1993, 1994 Sun Microsystems, Inc.
|
||||
** (c) Copyright 1993, 1994 Novell, Inc.
|
||||
*****************************************************************************/
|
||||
|
||||
#ifndef _Dt_ActionDbP_h
|
||||
#define _Dt_ActionDbP_h
|
||||
|
||||
#include <Dt/DbReader.h>
|
||||
#include <Dt/ActionDb.h>
|
||||
|
||||
#define _DtMAX_NUM_FIELDS 30
|
||||
#define _ActDb_MAX_NUM_FIELDS _DtMAX_NUM_FIELDS
|
||||
|
||||
|
||||
/*
|
||||
* Bitmask field definitions for the action converter bit mask.
|
||||
* These are NOT the bits for the mask in struct ACTION.
|
||||
*/
|
||||
|
||||
#define _ActDb_LABEL_SET (1<<0)
|
||||
#define _ActDb_TYPE_SET (1<<1)
|
||||
#define _ActDb_ARG_CLASS_SET (1<<2)
|
||||
#define _ActDb_ARG_TYPE_SET (1<<3)
|
||||
#define _ActDb_ARG_COUNT_SET (1<<4)
|
||||
#define _ActDb_ARG_MODE_SET (1<<5)
|
||||
#define _ActDb_DESCRIPTION_SET (1<<6)
|
||||
#define _ActDb_ICON_SET (1<<7)
|
||||
|
||||
#define _ActDb_MAP_ACTION_SET (1<<10)
|
||||
|
||||
#define _ActDb_EXEC_STRING_SET (1<<12)
|
||||
#define _ActDb_EXEC_HOST_SET (1<<13)
|
||||
#define _ActDb_CWD_SET (1<<14)
|
||||
#define _ActDb_WINDOW_TYPE_SET (1<<15)
|
||||
#define _ActDb_TERM_OPTS_SET (1<<16)
|
||||
|
||||
#define _ActDb_TT_CLASS_SET (1<<18)
|
||||
#define _ActDb_TT_SCOPE_SET (1<<19)
|
||||
#define _ActDb_TT_OPERATION_SET (1<<20)
|
||||
#define _ActDb_TT_FILE_SET (1<<21)
|
||||
#define _ActDb_TT_ARGN_MODE_SET (1<<22)
|
||||
#define _ActDb_TT_ARGN_VTYP_SET (1<<23)
|
||||
#define _ActDb_TT_ARGN_RTYP_SET (1<<24)
|
||||
#define _ActDb_TT_ARGN_VAL_SET (1<<25)
|
||||
|
||||
#ifdef _DT_ALLOW_DT_MSGS
|
||||
#define _ActDb_DT_REQ_NAME_SET (1<<26)
|
||||
#define _ActDb_DT_SVC_SET (1<<27)
|
||||
|
||||
#define _ActDb_DT_NTFY_NAME_SET (1<<28)
|
||||
#define _ActDb_DT_NGROUP_SET (1<<29)
|
||||
#define _ActDb_DT_ARGN_VAL_SET (1<<30)
|
||||
/* no mask for ARGn strings */
|
||||
|
||||
|
||||
#define _ActDb_DT_REQUEST_BITS ( _ActDb_DT_REQ_NAME_SET \
|
||||
| _ActDb_DT_SVC_SET )
|
||||
#define _ActDb_DT_NOTIFY_BITS ( _ActDb_DT_NTFY_NAME_SET \
|
||||
| _ActDb_DT_NGROUP_SET )
|
||||
#endif /* _DT_ALLOW_DT_MSGS */
|
||||
#define _ActDb_TT_BITS ( _ActDb_TT_CLASS_SET \
|
||||
| _ActDb_TT_SCOPE_SET \
|
||||
| _ActDb_TT_OPERATION_SET \
|
||||
| _ActDb_TT_ARGN_MODE_SET \
|
||||
| _ActDb_TT_ARGN_VTYP_SET \
|
||||
| _ActDb_TT_ARGN_RTYP_SET \
|
||||
| _ActDb_TT_ARGN_VAL_SET \
|
||||
| _ActDb_TT_FILE_SET )
|
||||
#define _ActDb_CMD_BITS ( _ActDb_EXEC_STRING_SET \
|
||||
| _ActDb_CWD_SET \
|
||||
| _ActDb_WINDOW_TYPE_SET \
|
||||
| _ActDb_TERM_OPTS_SET )
|
||||
#define _ActDb_MAP_BITS ( _ActDb_MAP_ACTION_SET )
|
||||
|
||||
#define _ActDb_TT_ARGN_BITS ( _ActDb_TT_ARGN_MODE_SET \
|
||||
| _ActDb_TT_ARGN_VTYP_SET \
|
||||
| _ActDb_TT_ARGN_RTYP_SET \
|
||||
| _ActDb_TT_ARGN_VAL_SET )
|
||||
|
||||
#ifdef _DT_ALLOW_DT_MSGS
|
||||
#define _ActDb_ARGN_BITS ( _ActDb_TT_ARGN_BITS \
|
||||
| _ActDb_DT_ARGN_VAL_SET )
|
||||
#else
|
||||
#define _ActDb_ARGN_BITS ( _ActDb_TT_ARGN_BITS )
|
||||
#endif /* _DT_ALLOW_DT_MSGS */
|
||||
|
||||
|
||||
/******************************************************************************
|
||||
*
|
||||
* Private (but external) entry points for internal use by Action Database
|
||||
* Library code only.
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
# ifdef __cplusplus
|
||||
extern "C" {
|
||||
# endif
|
||||
|
||||
|
||||
extern Boolean _DtActionConverter( DtDtsDbField *fields,
|
||||
DtDbPathId pathId,
|
||||
char *hostPrefix,
|
||||
Boolean rejectionStatus);
|
||||
|
||||
|
||||
# ifdef __cplusplus
|
||||
}
|
||||
# endif
|
||||
#endif /* _Dt_ActionDbP_h */
|
||||
/* DON'T ADD ANYTHING AFTER THIS #endif */
|
||||
@@ -1,67 +0,0 @@
|
||||
/*
|
||||
* CDE - Common Desktop Environment
|
||||
*
|
||||
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
|
||||
*
|
||||
* These libraries and programs are free software; you can
|
||||
* redistribute them and/or modify them under the terms of the GNU
|
||||
* Lesser General Public License as published by the Free Software
|
||||
* Foundation; either version 2 of the License, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* These libraries and programs are distributed in the hope that
|
||||
* they will be useful, but WITHOUT ANY WARRANTY; without even the
|
||||
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU Lesser General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with these libraries and programs; if not, write
|
||||
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
|
||||
* Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/* $XConsortium: ActionFind.h /main/4 1995/10/26 14:59:41 rswiston $ */
|
||||
/************************************<+>*************************************
|
||||
****************************************************************************
|
||||
**
|
||||
** File: ActionFind.h
|
||||
**
|
||||
** Project: DT
|
||||
**
|
||||
** Description: Public include file for the ActionFind functions.
|
||||
**
|
||||
** (c) Copyright 1993, 1994 Hewlett-Packard Company
|
||||
** (c) Copyright 1993, 1994 International Business Machines Corp.
|
||||
** (c) Copyright 1993, 1994 Sun Microsystems, Inc.
|
||||
** (c) Copyright 1993, 1994 Novell, Inc.
|
||||
****************************************************************************
|
||||
************************************<+>*************************************/
|
||||
|
||||
#ifndef _Dt_ActionFind_h
|
||||
#define _Dt_ActionFind_h
|
||||
|
||||
#include <X11/Xlib.h>
|
||||
#include <X11/Xresource.h>
|
||||
|
||||
#include <Dt/ActionP.h>
|
||||
#include <Dt/DtsDb.h>
|
||||
#include <Dt/DtsMM.h>
|
||||
|
||||
|
||||
# ifdef __cplusplus
|
||||
extern "C" {
|
||||
# endif
|
||||
|
||||
extern void _DtSortActionDb(void);
|
||||
extern ActionPtr
|
||||
_DtActionFindDBEntry( ActionRequest *reqp,
|
||||
DtShmBoson actQuark );
|
||||
|
||||
# ifdef __cplusplus
|
||||
}
|
||||
# endif
|
||||
|
||||
|
||||
#endif /* _Dt_ActionFind_h */
|
||||
/* DON'T ADD ANYTHING AFTER THIS #endif */
|
||||
|
||||
@@ -1,849 +0,0 @@
|
||||
/*
|
||||
* CDE - Common Desktop Environment
|
||||
*
|
||||
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
|
||||
*
|
||||
* These libraries and programs are free software; you can
|
||||
* redistribute them and/or modify them under the terms of the GNU
|
||||
* Lesser General Public License as published by the Free Software
|
||||
* Foundation; either version 2 of the License, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* These libraries and programs are distributed in the hope that
|
||||
* they will be useful, but WITHOUT ANY WARRANTY; without even the
|
||||
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU Lesser General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with these libraries and programs; if not, write
|
||||
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
|
||||
* Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/* $XConsortium: ActionP.h /main/3 1995/10/26 14:59:56 rswiston $ */
|
||||
/************************************<+>*************************************
|
||||
****************************************************************************
|
||||
**
|
||||
** File: ActionP.h
|
||||
**
|
||||
** Project: DT
|
||||
**
|
||||
** Description: Private include file for the Action Library.
|
||||
**
|
||||
**
|
||||
** (c) Copyright 1993, 1994 Hewlett-Packard Company
|
||||
** (c) Copyright 1993, 1994 International Business Machines Corp.
|
||||
** (c) Copyright 1993, 1994 Sun Microsystems, Inc.
|
||||
** (c) Copyright 1993, 1994 Novell, Inc.
|
||||
****************************************************************************
|
||||
************************************<+>*************************************/
|
||||
|
||||
#ifndef _ActionP_h
|
||||
#define _ActionP_h
|
||||
|
||||
#include <Dt/DtP.h>
|
||||
#include <Dt/DbReader.h>
|
||||
#include <Dt/ActionDb.h>
|
||||
#include <Dt/Action.h>
|
||||
#include <Tt/tttk.h>
|
||||
#include <Dt/DtShmDb.h>
|
||||
/*
|
||||
* Environment Variable Names
|
||||
*/
|
||||
#define ENV_SESSION_SVR "SESSION_SVR"
|
||||
/*
|
||||
* Define maximum static buffer size for action code.
|
||||
*/
|
||||
#define _DtAct_MAX_BUF_SIZE 1024
|
||||
|
||||
/*
|
||||
* Data-type field which contains the template for producing filenames
|
||||
* of a given type.
|
||||
*/
|
||||
#define _DtActNAME_TEMPLATE "NAME_TEMPLATE"
|
||||
#define _DtActIS_EXECUTABLE "IS_EXECUTABLE"
|
||||
|
||||
/******************************************************************************
|
||||
*
|
||||
* MASK LAYOUT:
|
||||
*
|
||||
* The same layout is used for all the masks (defined herein);, independent of
|
||||
* the data structure in which they are defined. That is, all bit fields for
|
||||
* all masks are non-overlapping. In general, the mask in any given structure
|
||||
* should ONLY contain information in the field appropriate for that structure.
|
||||
*
|
||||
* The action bit mask is broken into the following fields
|
||||
*
|
||||
* --------------------------------------------------------------------------
|
||||
* |act'n |arg |arg |arg | win |args| request | object |treat| not |
|
||||
* |type |class|count|typ | type | | status | status | as | |
|
||||
* |bits |bits |bits |bit | bits |used| bits | bits |file |used |
|
||||
* --------------------------------------------------------------------------
|
||||
* 0 - 4,5 - 8,9 - 12, 13 ,14 - 17,18-19,20 ------- 22,23 ---- 28, 29 ,30-31
|
||||
* | | | | | |
|
||||
* |<-- action mask -->| |<- request->|<- obj. ->|< - >|
|
||||
* mask data |
|
||||
* mask msgCcomp.
|
||||
* mask
|
||||
******************************************************************************/
|
||||
|
||||
/*
|
||||
* generic bit manipulation macros
|
||||
*/
|
||||
#define SET_ANY_BITS(mask,bits) ( mask |= (bits) )
|
||||
#define RESET_ANY_BITS(mask,bits) ( mask &= ~(bits) )
|
||||
#define TST_ANY_BITS(mask,bits) ( mask & (bits) )
|
||||
|
||||
/*
|
||||
* Action type bits
|
||||
*/
|
||||
#define _DtAct_CMD_BIT (1<<0)
|
||||
#define _DtAct_MAP_BIT (1<<1)
|
||||
#define _DtAct_TT_MSG_BIT (1<<2)
|
||||
|
||||
#ifdef _DT_ALLOW_DT_MSGS
|
||||
#define _DtAct_DT_REQ_MSG_BIT (1<<3)
|
||||
#define _DtAct_DT_NTFY_MSG_BIT (1<<4)
|
||||
#endif /* _DT_ALLOW_DT_MSGS */
|
||||
|
||||
/*
|
||||
* Action structure mask bits
|
||||
*/
|
||||
#define _DtAct_ARG_CLASS_FILE_BIT (1<<5)
|
||||
#define _DtAct_ARG_CLASS_STRING_BIT (1<<6)
|
||||
#define _DtAct_ARG_CLASS_BUFFER_BIT (1<<7)
|
||||
#define _DtAct_ARG_CLASS_WILD_BIT (1<<8)
|
||||
|
||||
#define _DtAct_ARG_COUNT_LT_BIT (1<<9)
|
||||
#define _DtAct_ARG_COUNT_GT_BIT (1<<10)
|
||||
#define _DtAct_ARG_COUNT_EQ_BIT (1<<11)
|
||||
#define _DtAct_ARG_COUNT_WILD_BIT (1<<12)
|
||||
|
||||
#define _DtAct_ARG_TYPE_WILD_BIT (1<<13)
|
||||
|
||||
#define _DtAct_NO_STDIO_BIT (1<<14)
|
||||
#define _DtAct_TERMINAL_BIT (1<<15)
|
||||
#define _DtAct_PERM_TERM_BIT (1<<16)
|
||||
|
||||
/*
|
||||
* Defines which reflect the actual number
|
||||
* of %ARGn% instances found in the action definition
|
||||
* NOTE: Is this JUST in the EXEC_STRING? or the total number of %ARGn%'s
|
||||
* referenced in all parssed definitions?
|
||||
*
|
||||
*/
|
||||
#define _DtAct_SINGLE_ARG_BIT (1<<18)
|
||||
#define _DtAct_MULTI_ARG_BIT (1<<19)
|
||||
|
||||
|
||||
#ifdef _DT_ALLOW_DT_MSGS
|
||||
#define _DtAct_ACTION_TYPE_BITS ( _DtAct_CMD_BIT \
|
||||
| _DtAct_MAP_BIT \
|
||||
| _DtAct_DT_NTFY_MSG_BIT \
|
||||
| _DtAct_DT_REQ_MSG_BIT \
|
||||
| _DtAct_TT_MSG_BIT )
|
||||
#else
|
||||
#define _DtAct_ACTION_TYPE_BITS ( _DtAct_CMD_BIT \
|
||||
| _DtAct_MAP_BIT \
|
||||
| _DtAct_TT_MSG_BIT )
|
||||
#endif /* _DT_ALLOW_DT_MSGS */
|
||||
#define _DtAct_ARG_CLASS_BITS ( _DtAct_ARG_CLASS_FILE_BIT \
|
||||
| _DtAct_ARG_CLASS_STRING_BIT\
|
||||
| _DtAct_ARG_CLASS_BUFFER_BIT \
|
||||
| _DtAct_ARG_CLASS_WILD_BIT )
|
||||
#define _DtAct_ARG_TYPE_BITS ( _DtAct_ARG_TYPE_WILD_BIT )
|
||||
#define _DtAct_ARG_COUNT_BITS ( _DtAct_ARG_COUNT_LT_BIT \
|
||||
| _DtAct_ARG_COUNT_GT_BIT \
|
||||
| _DtAct_ARG_COUNT_EQ_BIT \
|
||||
| _DtAct_ARG_COUNT_WILD_BIT )
|
||||
#define _DtAct_WINTYPE_BITS ( _DtAct_NO_STDIO_BIT \
|
||||
| _DtAct_TERMINAL_BIT \
|
||||
| _DtAct_PERM_TERM_BIT )
|
||||
#define _DtAct_ARGS_USED_BITS ( _DtAct_SINGLE_ARG \
|
||||
| _DtAct_MULTI_ARG )
|
||||
|
||||
#define _DtAct_ACTION_BITS ( _DtAct_ACTION_TYPE_BITS \
|
||||
| _DtAct_ARG_CLASS_BITS \
|
||||
| _DtAct_ARG_TYPE_BITS \
|
||||
| _DtAct_ARG_COUNT_BITS \
|
||||
| _DtAct_WINTYPE_BITS \
|
||||
| _DtAct_ARGS_USED_BITS )
|
||||
|
||||
#define IS_CMD(mask) ( mask & _DtAct_CMD_BIT )
|
||||
#define IS_MAP(mask) ( mask & _DtAct_MAP_BIT )
|
||||
#define IS_TT_MSG(mask) ( mask & _DtAct_TT_MSG_BIT )
|
||||
|
||||
#ifdef _DT_ALLOW_DT_MSGS
|
||||
#define IS_DT_REQ_MSG(mask) ( mask & _DtAct_DT_REQ_MSG_BIT )
|
||||
#define IS_DT_NOTIFY_MSG(mask) ( mask & _DtAct_DT_NTFY_MSG_BIT )
|
||||
#endif /* _DT_ALLOW_DT_MSGS */
|
||||
|
||||
#define SET_CMD_ACTION(mask) ( mask |= _DtAct_CMD_BIT )
|
||||
#define SET_MAP_ACTION(mask) ( mask |= _DtAct_MAP_BIT )
|
||||
#define SET_TT_MSG(mask) ( mask |= _DtAct_TT_MSG_BIT )
|
||||
#ifdef _DT_ALLOW_DT_MSGS
|
||||
#define SET_DT_REQUEST_MSG(mask) ( mask |= _DtAct_DT_REQ_MSG_BIT)
|
||||
#define SET_DT_NOTIFY_MSG(mask) ( mask |= _DtAct_DT_NTFY_MSG_BIT)
|
||||
#endif /* _DT_ALLOW_DT_MSGS */
|
||||
|
||||
#define RESET_CMD_ACTION(mask) ( mask &= ~(_DtAct_CMD_BIT))
|
||||
#define RESET_MAP_ACTION(mask) ( mask &= ~(_DtAct_MAP_BIT))
|
||||
#define RESET_TT_MSG(mask) ( mask &= ~(_DtAct_TT_MSG_BIT))
|
||||
#ifdef _DT_ALLOW_DT_MSGS
|
||||
#define RESET_DT_REQ_MSG(mask) ( mask &= ~(_DtAct_DT_REQ_MSG_BIT))
|
||||
#define RESET_DT_NOTIFY_MSG(mask) ( mask &= ~(_DtAct_DT_NTFY_MSG_BIT))
|
||||
#endif /* _DT_ALLOW_DT_MSGS */
|
||||
|
||||
#define IS_NO_STDIO(mask) ( mask & _DtAct_NO_STDIO_BIT )
|
||||
#define IS_TERMINAL(mask) ( mask & _DtAct_TERMINAL_BIT )
|
||||
#define IS_PERM_TERM(mask) ( mask & _DtAct_PERM_TERM_BIT)
|
||||
|
||||
#define SET_NO_STDIO(mask) ( mask |= _DtAct_NO_STDIO_BIT )
|
||||
#define SET_TERMINAL(mask) ( mask |= _DtAct_TERMINAL_BIT )
|
||||
#define SET_PERM_TERM(mask) ( mask |= _DtAct_PERM_TERM_BIT )
|
||||
|
||||
#define RESET_NO_STDIO(mask) ( mask &= ~(_DtAct_NO_STDIO_BIT ))
|
||||
#define RESET_TERMINAL(mask) ( mask &= ~(_DtAct_TERMINAL_BIT ))
|
||||
#define RESET_PERM_TERM(mask) ( mask &= ~(_DtAct_PERM_TERM_BIT ))
|
||||
|
||||
#define IS_ARG_CLASS_FILE(mask) ( mask & _DtAct_ARG_CLASS_FILE_BIT )
|
||||
#define IS_ARG_CLASS_STRING(mask) ( mask & _DtAct_ARG_CLASS_STRING_BIT )
|
||||
#define IS_ARG_CLASS_BUFFER(mask) ( mask & _DtAct_ARG_CLASS_BUFFER_BIT )
|
||||
#define IS_ARG_CLASS_WILD(mask) ( mask & _DtAct_ARG_CLASS_WILD_BIT )
|
||||
|
||||
#define SET_ARG_CLASS_FILE(mask) ( mask |= _DtAct_ARG_CLASS_FILE_BIT )
|
||||
#define SET_ARG_CLASS_STRING(mask) ( mask |= _DtAct_ARG_CLASS_STRING_BIT)
|
||||
#define SET_ARG_CLASS_BUFFER(mask) ( mask |= _DtAct_ARG_CLASS_BUFFER_BIT)
|
||||
#define SET_ARG_CLASS_WILD(mask) ( mask |= _DtAct_ARG_CLASS_WILD_BIT )
|
||||
|
||||
#define RESET_ARG_CLASS_FILE(mask) (mask &= ~(_DtAct_ARG_CLASS_FILE_BIT))
|
||||
#define RESET_ARG_CLASS_STRING(mask) (mask &= ~(_DtAct_ARG_CLASS_STRING_BIT))
|
||||
#define RESET_ARG_CLASS_BUFFER(mask) (mask &= ~(_DtAct_ARG_CLASS_BUFFER_BIT))
|
||||
#define RESET_ARG_CLASS_WILD(mask) (mask &= ~(_DtAct_ARG_CLASS_WILD_BIT))
|
||||
|
||||
|
||||
#define IS_ARG_TYPE_WILD(mask) ( mask & _DtAct_ARG_TYPE_WILD_BIT )
|
||||
|
||||
#define SET_ARG_TYPE_WILD(mask) ( mask |= _DtAct_ARG_TYPE_WILD_BIT )
|
||||
|
||||
#define RESET_ARG_TYPE_WILD(mask) ( mask &= ~(_DtAct_ARG_TYPE_WILD_BIT))
|
||||
|
||||
#define IS_ARG_COUNT_GT(mask) ( mask & _DtAct_ARG_COUNT_GT_BIT )
|
||||
#define IS_ARG_COUNT_LT(mask) ( mask & _DtAct_ARG_COUNT_LT_BIT )
|
||||
#define IS_ARG_COUNT_EQ(mask) ( mask & _DtAct_ARG_COUNT_EQ_BIT )
|
||||
#define IS_ARG_COUNT_WILD(mask) ( mask & _DtAct_ARG_COUNT_WILD_BIT )
|
||||
|
||||
#define SET_ARG_COUNT_GT(mask) ( mask |= _DtAct_ARG_COUNT_GT_BIT )
|
||||
#define SET_ARG_COUNT_LT(mask) ( mask |= _DtAct_ARG_COUNT_LT_BIT )
|
||||
#define SET_ARG_COUNT_EQ(mask) ( mask |= _DtAct_ARG_COUNT_EQ_BIT )
|
||||
#define SET_ARG_COUNT_WILD(mask) ( mask |= _DtAct_ARG_COUNT_WILD_BIT )
|
||||
|
||||
#define RESET_ARG_COUNT_GT(mask) ( mask &= ~(_DtAct_ARG_COUNT_GT_BIT ))
|
||||
#define RESET_ARG_COUNT_LT(mask) ( mask &= ~(_DtAct_ARG_COUNT_LT_BIT ))
|
||||
#define RESET_ARG_COUNT_EQ(mask) ( mask &= ~(_DtAct_ARG_COUNT_EQ_BIT ))
|
||||
#define RESET_ARG_COUNT_WILD(mask) ( mask &= ~(_DtAct_ARG_COUNT_WILD_BIT ))
|
||||
|
||||
/*
|
||||
* Use of the logical "NOT" operator(!) instead of the bitwise negation
|
||||
* operator(~) is intentional in IS_ARG_NONE_FOUND.
|
||||
*/
|
||||
#define IS_ARG_NONE_FOUND(mask) !( mask & ( _DtAct_SINGLE_ARG_BIT \
|
||||
| _DtAct_MULTI_ARG_BIT ))
|
||||
#define IS_ARG_SINGLE_ARG(mask) ( mask & _DtAct_SINGLE_ARG_BIT )
|
||||
#define IS_ARG_MULTI_ARG(mask) ( mask & _DtAct_MULTI_ARG_BIT )
|
||||
|
||||
#define SET_ARG_NONE_FOUND(mask) ( mask &= ~( _DtAct_SINGLE_ARG_BIT \
|
||||
| _DtAct_MULTI_ARG_BIT ))
|
||||
#define SET_ARG_SINGLE_ARG(mask) ((mask |= _DtAct_SINGLE_ARG_BIT), \
|
||||
( mask &= ~(_DtAct_MULTI_ARG_BIT)))
|
||||
#define SET_ARG_MULTI_ARG(mask) ((mask |= _DtAct_MULTI_ARG_BIT), \
|
||||
( mask &= ~(_DtAct_SINGLE_ARG_BIT)))
|
||||
|
||||
#define RESET_ARG_SINGLE_ARG(mask) ( mask &= ~(_DtAct_SINGLE_ARG_BIT))
|
||||
#define RESET_ARG_MULTI_ARG(mask) ( mask &= ~(_DtAct_MULTI_ARG_BIT))
|
||||
|
||||
/*
|
||||
* ActionRequest structure mask bits
|
||||
*/
|
||||
|
||||
#define _DtAct_REPROCESSING_BIT (1<<20)
|
||||
#define _DtAct_TOO_MANY_MAPS_BIT (1<<21)
|
||||
#define _DtAct_CLONED_REQUEST_BIT (1<<22)
|
||||
|
||||
#define _DtAct_ACTION_REQUEST_BITS ( _DtAct_REPROCESSING_BIT \
|
||||
| _DtAct_TOO_MANY_MAPS_BIT \
|
||||
| _DtAct_CLONED_REQUEST_BIT )
|
||||
|
||||
#define IS_REPROCESSING(mask) ( mask & _DtAct_REPROCESSING_BIT )
|
||||
#define IS_TOO_MANY_MAPS(mask) ( mask & _DtAct_TOO_MANY_MAPS_BIT )
|
||||
#define IS_CLONED_REQUEST(mask) ( mask & _DtAct_CLONED_REQUEST_BIT )
|
||||
|
||||
#define SET_REPROCESSING(mask) ( mask |= _DtAct_REPROCESSING_BIT )
|
||||
#define SET_TOO_MANY_MAPS(mask) ( mask |= _DtAct_TOO_MANY_MAPS_BIT )
|
||||
#define SET_CLONED_REQUEST(mask) ( mask |= _DtAct_CLONED_REQUEST_BIT )
|
||||
|
||||
#define RESET_REPROCESSING(mask) ( mask &= ~(_DtAct_REPROCESSING_BIT))
|
||||
#define RESET_TOO_MANY_MAPS(mask) ( mask &= ~(_DtAct_TOO_MANY_MAPS_BIT))
|
||||
#define RESET_CLONED_REQUEST(mask) ( mask &= ~(_DtAct_CLONED_REQUEST_BIT))
|
||||
|
||||
|
||||
/*
|
||||
* ObjectData structure mask bits
|
||||
*
|
||||
*/
|
||||
|
||||
#define _DtAct_WRITE_OBJ_BIT (1<<23)
|
||||
#define _DtAct_FILE_OBJ_BIT (1<<24)
|
||||
#define _DtAct_BUFFER_OBJ_BIT (1<<25)
|
||||
#define _DtAct_STRING_OBJ_BIT (1<<26)
|
||||
#define _DtAct_DIR_OBJ_BIT (1<<27)
|
||||
#define _DtAct_UNKNOWN_IF_DIR_BIT (1<<28)
|
||||
|
||||
#define _DtAct_OBJ_DATA_BITS ( _DtAct_WRITE_OBJ_BIT \
|
||||
| _DtAct_FILE_OBJ_BIT \
|
||||
| _DtAct_DIR_OBJ_BIT \
|
||||
| _DtAct_BUFFER_OBJ_BIT \
|
||||
| _DtAct_STRING_OBJ_BIT \
|
||||
| _DtAct_UNKNOWN_IF_DIR_BIT )
|
||||
|
||||
#define IS_WRITE_OBJ(mask) ( mask & _DtAct_WRITE_OBJ_BIT )
|
||||
#define IS_FILE_OBJ(mask) ( mask & _DtAct_FILE_OBJ_BIT )
|
||||
#define IS_BUFFER_OBJ(mask) ( mask & _DtAct_BUFFER_OBJ_BIT )
|
||||
#define IS_STRING_OBJ(mask) ( mask & _DtAct_STRING_OBJ_BIT )
|
||||
#define IS_UNKNOWN_IF_DIR(mask) ( mask & _DtAct_UNKNOWN_IF_DIR_BIT )
|
||||
#define IS_DIR_OBJ(mask) ( mask & \
|
||||
( _DtAct_UNKNOWN_IF_DIR_BIT \
|
||||
| _DtAct_DIR_OBJ_BIT ) \
|
||||
== _DtAct_DIR_OBJ_BIT)
|
||||
|
||||
#define SET_WRITE_OBJ(mask) ( mask |= _DtAct_WRITE_OBJ_BIT )
|
||||
#define SET_FILE_OBJ(mask) ( mask |= _DtAct_FILE_OBJ_BIT )
|
||||
#define SET_BUFFER_OBJ(mask) ( mask |= _DtAct_BUFFER_OBJ_BIT )
|
||||
#define SET_STRING_OBJ(mask) ( mask |= _DtAct_STRING_OBJ_BIT )
|
||||
#define SET_DIR_OBJ(mask) ( mask |= _DtAct_DIR_OBJ_BIT )
|
||||
#define SET_UNKNOWN_IF_DIR(mask) ( mask |= _DtAct_UNKNOWN_IF_DIR_BIT)
|
||||
|
||||
#define RESET_WRITE_OBJ(mask) ( mask &= ~(_DtAct_WRITE_OBJ_BIT))
|
||||
#define RESET_FILE_OBJ(mask) ( mask &= ~(_DtAct_FILE_OBJ_BIT))
|
||||
#define RESET_BUFFER_OBJ(mask) ( mask &= ~(_DtAct_BUFFER_OBJ_BIT))
|
||||
#define RESET_STRING_OBJ(mask) ( mask &= ~(_DtAct_STRING_OBJ_BIT))
|
||||
#define RESET_DIR_OBJ(mask) ( mask &= ~(_DtAct_DIR_OBJ_BIT))
|
||||
#define RESET_UNKNOWN_IF_DIR(mask) ( mask &= ~(_DtAct_UNKNOWN_IF_DIR_BIT))
|
||||
|
||||
|
||||
/*
|
||||
* MsgComponent structure mask bits (shared with Object Data?)
|
||||
*/
|
||||
|
||||
#define _DtAct_TREAT_AS_FILE_BIT (1<<29)
|
||||
|
||||
#define _DtAct_MSG_COMP_BITS ( _DtAct_TREAT_AS_FILE_BIT )
|
||||
|
||||
#define IS_TREAT_AS_FILE(mask) ( mask & _DtAct_TREAT_AS_FILE_BIT )
|
||||
#define SET_TREAT_AS_FILE(mask) ( mask |= _DtAct_TREAT_AS_FILE_BIT)
|
||||
#define RESET_TREAT_AS_FILE(mask) ( mask &= ~(_DtAct_TREAT_AS_FILE_BIT))
|
||||
|
||||
|
||||
/* Keyword defines */
|
||||
|
||||
#define NO_KEYWORD -1
|
||||
#define LOCAL_HOST 0
|
||||
#define DATA_HOST 1
|
||||
#define DATABASE_HOST 2
|
||||
#define ARG 3
|
||||
#define DISPLAY_HOST 4
|
||||
#define LABEL 5
|
||||
#define SESSION_HOST 6
|
||||
|
||||
/* Special argNum values */
|
||||
|
||||
#define NO_ARG -1
|
||||
#define ALL_ARGS 0
|
||||
|
||||
/*
|
||||
* ToolTalk base representation type ( tt_argn_rep_type ) values
|
||||
*/
|
||||
#define DtACT_TT_REP_UNDEFINED 0
|
||||
#define DtACT_TT_REP_INT 1
|
||||
#define DtACT_TT_REP_BUFFER 2
|
||||
#define DtACT_TT_REP_STRING 3
|
||||
|
||||
/*
|
||||
* Resource name and class for the EXEC-HOST resource.
|
||||
*/
|
||||
#define DtEXEC_HOSTS_NAME "executionHosts"
|
||||
#define DtEXEC_HOSTS_CLASS "ExecutionHosts"
|
||||
#define DtEXEC_HOSTS_DEFAULT _DtACT_EXEC_HOST_DFLT
|
||||
|
||||
/* Flags to force special processing of filenames */
|
||||
#define _DTAct_TT_VTYPE 1 << 0
|
||||
#define _DTAct_TT_ARG 1 << 1
|
||||
|
||||
/* Structure used to hold the components of a message */
|
||||
|
||||
typedef struct {
|
||||
char *precedingText;
|
||||
char *prompt;
|
||||
int keyword;
|
||||
int argNum;
|
||||
unsigned long mask; /* replaces isFile, isBuffer, isString boolean */
|
||||
} MsgComponent;
|
||||
|
||||
|
||||
typedef struct {
|
||||
MsgComponent *parsedMessage;
|
||||
int numMsgParts;
|
||||
char *compiledMessage;
|
||||
int msgLen;
|
||||
} parsedMsg;
|
||||
|
||||
/******************************************************************************
|
||||
*
|
||||
* Structs used during the invocation of an action. Once DtActionInvoke()
|
||||
* exits, these structs are generally freed.
|
||||
*
|
||||
*****************************************************************************/
|
||||
typedef struct {
|
||||
/*int winMask; ---> moved into the action mask*/
|
||||
parsedMsg execString;
|
||||
parsedMsg termOpts;
|
||||
char *contextDir;
|
||||
char *contextHost;
|
||||
parsedMsg execHosts;
|
||||
char **execHostArray;
|
||||
int execHostCount;
|
||||
} cmdAttr;
|
||||
|
||||
typedef struct {
|
||||
DtShmBoson map_action;
|
||||
} mapAttr;
|
||||
|
||||
typedef struct {
|
||||
int tt_class;
|
||||
int tt_scope;
|
||||
parsedMsg tt_op;
|
||||
parsedMsg tt_file; /* must be a single file name */
|
||||
int *tt_argn_mode;
|
||||
int mode_count;
|
||||
parsedMsg *tt_argn_vtype;
|
||||
int vtype_count;
|
||||
parsedMsg *tt_argn_value;
|
||||
int value_count;
|
||||
int *tt_argn_rep_type; /* INT, STRING, BUFFER or UNDEFINED */
|
||||
int rep_type_count;
|
||||
} tt_msgAttr;
|
||||
|
||||
#ifdef _DT_ALLOW_DT_MSGS
|
||||
typedef struct {
|
||||
parsedMsg service; /* ICCCM service name */
|
||||
parsedMsg request; /* request name string */
|
||||
parsedMsg *argn_value;
|
||||
int value_count;
|
||||
|
||||
} dt_reqAttr;
|
||||
|
||||
typedef struct {
|
||||
parsedMsg ngroup; /* ICCCM notification group */
|
||||
parsedMsg notify; /* notification to be sent */
|
||||
parsedMsg *argn_value;
|
||||
int value_count;
|
||||
} dt_notifyAttr;
|
||||
#endif /* _DT_ALLOW_DT_MSGS */
|
||||
|
||||
|
||||
typedef struct {
|
||||
DtShmBoson action; /* Might just use a char * here? */
|
||||
DtDbPathId file_name_id; /* id of file wherein the action is defined */
|
||||
char *label; /* localizable action label string */
|
||||
char *description;
|
||||
DtShmBoson *arg_types;
|
||||
int type_count;
|
||||
int arg_count; /* Number of arguments accepted by the action */
|
||||
unsigned long mask; /* action mask -- class/type/arg info */
|
||||
union { /* attributes for the different action kinds */
|
||||
cmdAttr cmd;
|
||||
mapAttr map;
|
||||
tt_msgAttr tt_msg;
|
||||
#ifdef _DT_ALLOW_DT_MSGS
|
||||
dt_reqAttr dt_req;
|
||||
dt_notifyAttr dt_notify;
|
||||
#endif /* _DT_ALLOW_DT_MSGS */
|
||||
} u;
|
||||
} Action, *ActionPtr; /* new action structure and pointer */
|
||||
|
||||
|
||||
/* Structure used to hold each of the object components */
|
||||
|
||||
typedef struct {
|
||||
char * origFilename;
|
||||
char * baseFilename;
|
||||
char * origHostname;
|
||||
int hostIndex;
|
||||
int dirIndex;
|
||||
void * bp; /* pointer to original buffer -- tmp files only */
|
||||
int sizebp; /* size of original buf -- for tmp files only */
|
||||
} fileAttr;
|
||||
|
||||
typedef struct {
|
||||
char * string;
|
||||
} stringAttr;
|
||||
|
||||
typedef struct {
|
||||
int size;
|
||||
void *bp;
|
||||
} bufferAttr;
|
||||
|
||||
|
||||
typedef struct {
|
||||
DtShmBoson type;
|
||||
unsigned long mask;
|
||||
union {
|
||||
fileAttr file;
|
||||
stringAttr string;
|
||||
bufferAttr buffer;
|
||||
} u;
|
||||
} ObjectData;
|
||||
|
||||
|
||||
/*
|
||||
* Structure attached to the button callbacks in the
|
||||
* dialog used to collect missing parameters.
|
||||
*
|
||||
*/
|
||||
|
||||
typedef struct {
|
||||
char *actionName;
|
||||
int objOffset;
|
||||
int objsUsed;
|
||||
int numObjects;
|
||||
ObjectData *objects;
|
||||
int numPromptInputs;
|
||||
char **promptInputs;
|
||||
int numHostNames;
|
||||
char **hostNames;
|
||||
int numDirNames;
|
||||
char **dirNames;
|
||||
char *termOpts;
|
||||
char *cwdHost;
|
||||
char *cwdDir;
|
||||
ActionPtr clonedAction;
|
||||
unsigned long mask;
|
||||
char *badHostList;
|
||||
char *currentHost;
|
||||
int hostIndex;
|
||||
char *execHost;
|
||||
DtActionInvocationID invocId;
|
||||
unsigned long childId;
|
||||
} ActionRequest;
|
||||
|
||||
/******************************************************************************
|
||||
*
|
||||
* Structs used to maintain information on invoked actions until they
|
||||
* exit. A few select elements of the ActionRequest and Action structs
|
||||
* will be copied into these strcuts.
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
/******************************************************************************
|
||||
******************************************************************************
|
||||
**
|
||||
** Major data-structure diagram for the DtAction invocation layer:
|
||||
**
|
||||
** _DtActInvRec <=== _DtActInvRecArray[ actInvRecArraySize ]
|
||||
** ------------------
|
||||
** | info per |
|
||||
** | DtActionInvoke |
|
||||
** |----------------|
|
||||
** | numChildren |
|
||||
** |----------------|
|
||||
** | childRecs[] | ===> _DtActChildRec
|
||||
** ------------------ ------------------
|
||||
** | info per |
|
||||
** | child request |
|
||||
** |----------------|
|
||||
** | *request | ===> ActionRequest
|
||||
** ------------------ ------------------
|
||||
** | info on users |
|
||||
** | action request |
|
||||
** |----------------|
|
||||
** Action <=== | *clonedAction |
|
||||
** ------------------ ------------------
|
||||
** |info on matching|
|
||||
** | actionDB entry |
|
||||
** |----------------|
|
||||
** | cmd/map/tt/dt |
|
||||
** | attributes of |
|
||||
** | resulting msg |
|
||||
** ------------------
|
||||
**
|
||||
** "ActionRequest" and "Action" were present in VUE 3.0, and have a
|
||||
** scratch-pad like function within DtActionInvoke() to get actions
|
||||
** started. They are not good long-term retainers of information.
|
||||
** Action and ActionRequest are in fact freed when DtActionInvoke()
|
||||
** exits.
|
||||
**
|
||||
** "_DtActInvRec" and "_DtActChildRec" have been introduced to retain
|
||||
** information for the entire life of the actions. Some of the
|
||||
** information from ActionRequest and Action will be copied (mirrored)
|
||||
** up to these structures.
|
||||
**
|
||||
******************************************************************************
|
||||
*****************************************************************************/
|
||||
|
||||
/******************************************************************************
|
||||
*
|
||||
* Child Status Macro Definitions -- These values are used in
|
||||
* the status word of the _DtActChildRec child record.
|
||||
*
|
||||
* ****** IMPORTANT NOTE *** IMPORTANT NOTE *** IMPORTANT NOTE ******
|
||||
*
|
||||
* The _DtActCHILD_ macros are also used in cde1/dtexec/Main.c
|
||||
* in the _DtActDtexecDone(Request) message, so in effect they
|
||||
* are also protocol constants that should *never* be changed.
|
||||
* If changed, libDtSvc and dtexec may mis-communicate status.
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
#define _DtActCHILD_UNKNOWN (1<<0) /* 1 - child status unknown */
|
||||
#define _DtActCHILD_PENDING_START (1<<1) /* 2 - child start pending */
|
||||
#define _DtActCHILD_ALIVE_UNKNOWN (1<<2) /* 4 - child alive but unknown*/
|
||||
#define _DtActCHILD_ALIVE (1<<3) /* 8 - child alive and well */
|
||||
#define _DtActCHILD_DONE (1<<4) /* 16 - child done */
|
||||
#define _DtActCHILD_FAILED (1<<5) /* 32 - child failed */
|
||||
#define _DtActCHILD_CANCELED (1<<6) /* 64 - child canceled */
|
||||
|
||||
#define _DtActCHILD_DONE_BITS ( (_DtActCHILD_DONE) | \
|
||||
(_DtActCHILD_FAILED) | \
|
||||
(_DtActCHILD_CANCELED) )
|
||||
|
||||
/*** IMPORTANT NOTE ABOVE *** IMPORTANT NOTE ABOVE *** IMPORTANT NOTE ABOVE ***/
|
||||
|
||||
|
||||
#define ARE_CHILDREN_DONE(mask) ( (mask) & _DtActCHILD_DONE_BITS )
|
||||
|
||||
#define IS_CHILD_UNKNOWN(mask) ( (mask) == _DtActCHILD_UNKNOWN )
|
||||
#define IS_CHILD_PENDING_START(mask) ( (mask) & _DtActCHILD_PENDING_START )
|
||||
#define IS_CHILD_DONE(mask) ( (mask) & _DtActCHILD_DONE)
|
||||
#define IS_CHILD_FAILED(mask) ( (mask) & _DtActCHILD_FAILED)
|
||||
#define IS_CHILD_CANCELED(mask) ( (mask) & _DtActCHILD_CANCELED)
|
||||
#define IS_CHILD_ALIVE(mask) ( (mask) & _DtActCHILD_ALIVE)
|
||||
#define IS_CHILD_ALIVE_UNKOWN(mask) ( (mask) & _DtActCHILD_ALIVE_UNKNOWN)
|
||||
|
||||
|
||||
/******************************************************************************
|
||||
*
|
||||
* Information per child of DtActionInvoke()
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
/*
|
||||
* Structure useed to map returnable arguments to the child argument list.
|
||||
*/
|
||||
|
||||
typedef struct {
|
||||
int argN; /* Nth returned value (0 based for tooltalk) */
|
||||
int argIdx; /* Nth child argument */
|
||||
} _DtActArgMap;
|
||||
|
||||
typedef struct {
|
||||
unsigned long childId; /* serial # with DtActInvId */
|
||||
unsigned long childState; /* child state */
|
||||
|
||||
/*
|
||||
* Information cloned from "ActionRequest *req"
|
||||
*/
|
||||
int numObjects; /* number of child args */
|
||||
_DtActArgMap *argMap; /* map of returnable args to chd args */
|
||||
|
||||
/*
|
||||
* Information cloned from "ActionPtr clonedAction"
|
||||
*/
|
||||
unsigned long mask; /* action type - IS_xxx() */
|
||||
|
||||
/* a list of tmp file names 5/11/94 --tomg */
|
||||
|
||||
union {
|
||||
struct { /* COMMAND elements */
|
||||
char *TTProcId; /* TT procID handle to child */
|
||||
Tt_message reqMessage; /* Initiator TT Request */
|
||||
Tt_pattern magic_cookie; /* dtexec to libDtSvc cookie */
|
||||
} cmd;
|
||||
struct { /* TT_MSG elements */
|
||||
char *TTProcId; /* TT procID handle to child */
|
||||
Tt_message reqMessage; /* Initiator TT Request */
|
||||
int isTtMedia; /* handled by ttmedia_load ? */
|
||||
Tttk_op TtMediaOp; /* if ttmedia_load, the op */
|
||||
Tt_pattern *subConPats; /* for subcontract_manage */
|
||||
} tt;
|
||||
} u;
|
||||
|
||||
} _DtActChildRecT;
|
||||
|
||||
|
||||
/******************************************************************************
|
||||
*
|
||||
* Invocation Status Macro Definitions -- These values are used in
|
||||
* the state word of the _DtActInvRec invocation record.
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
#define _DtActINV_UNKNOWN 0 /* unknown invocation status */
|
||||
#define _DtActINV_ERROR (1<<0) /* invocation error detected */
|
||||
#define _DtActINV_CANCEL (1<<1) /* trying to cancel invocation*/
|
||||
#define _DtActINV_PENDING (1<<2) /* invocation pending */
|
||||
#define _DtActINV_WORKING (1<<3) /* invocation in process */
|
||||
#define _DtActINV_DONE (1<<4) /* invocation step done */
|
||||
#define _DtActINV_COMPLETE (1<<5) /* invocation steps all done */
|
||||
#define _DtActINV_CB_CALLED (1<<6) /* invocation callback called */
|
||||
#define _DtActINV_ID_RETURNED (1<<7) /* invocation id has returned */
|
||||
#define _DtActINV_CMD_QUEUED (1<<8) /* command has been queued */
|
||||
#define _DtActINV_INDICATOR_ON (1<<9) /* busy indicator active bit */
|
||||
|
||||
#define SET_INV_UNKNOWN(mask) (mask = 0)
|
||||
|
||||
#define SET_INV_ERROR(mask) (mask |= _DtActINV_ERROR)
|
||||
#define SET_INV_CANCEL(mask) (mask |= _DtActINV_CANCEL)
|
||||
#define SET_INV_PENDING(mask) (mask |= _DtActINV_PENDING)
|
||||
#define SET_INV_WORKING(mask) (mask |= _DtActINV_WORKING)
|
||||
#define SET_INV_DONE(mask) (mask |= _DtActINV_DONE)
|
||||
#define SET_INV_COMPLETE(mask) (mask |= _DtActINV_COMPLETE)
|
||||
#define SET_INV_CB_CALLED(mask) (mask |= _DtActINV_CB_CALLED)
|
||||
#define SET_INV_ID_RETURNED(mask) (mask |= _DtActINV_ID_RETURNED)
|
||||
#define SET_INV_CMD_QUEUED(mask) (mask |= _DtActINV_CMD_QUEUED)
|
||||
#define SET_INV_INDICATOR_ON(mask) (mask |= _DtActINV_INDICATOR_ON)
|
||||
|
||||
#define RESET_INV_ERROR(mask) (mask &= ~(_DtActINV_ERROR))
|
||||
#define RESET_INV_CANCEL(mask) (mask &= ~(_DtActINV_CANCEL))
|
||||
#define RESET_INV_PENDING(mask) (mask &= ~(_DtActINV_PENDING))
|
||||
#define RESET_INV_WORKING(mask) (mask &= ~(_DtActINV_WORKING))
|
||||
#define RESET_INV_COMPLETE(mask) (mask &= ~(_DtActINV_COMPLETE))
|
||||
#define RESET_INV_DONE(mask) (mask &= ~(_DtActINV_DONE))
|
||||
#define RESET_INV_CB_CALLED(mask) (mask &= ~(_DtActINV_CB_CALLED))
|
||||
#define RESET_INV_ID_RETURNED(mask) (mask &= ~(_DtActINV_ID_RETURNED))
|
||||
#define RESET_INV_CMD_QUEUED(mask) (mask &= ~(_DtActINV_CMD_QUEUED))
|
||||
#define RESET_INV_INDICATOR_ON(mask) (mask &= ~(_DtActINV_INDICATOR_ON))
|
||||
|
||||
#define IS_INV_FINISHED(mask) ( !((mask) & _DtActINV_CMD_QUEUED) \
|
||||
&& ((mask) & (_DtActINV_COMPLETE \
|
||||
| _DtActINV_CANCEL)) )
|
||||
#define IS_INV_UNKNOWN(mask) ( (mask) == _DtActINV_UNKNOWN )
|
||||
|
||||
#define IS_INV_ERROR(mask) ((mask) & _DtActINV_ERROR )
|
||||
#define IS_INV_CANCEL(mask) ((mask) & _DtActINV_CANCEL )
|
||||
#define IS_INV_PENDING(mask) ((mask) & _DtActINV_PENDING )
|
||||
#define IS_INV_WORKING(mask) ((mask) & _DtActINV_WORKING )
|
||||
#define IS_INV_DONE(mask) ((mask) & _DtActINV_DONE )
|
||||
#define IS_INV_COMPLETE(mask) ((mask) & _DtActINV_COMPLETE )
|
||||
#define IS_INV_CB_CALLED(mask) ((mask) & _DtActINV_CB_CALLED )
|
||||
#define IS_INV_ID_RETURNED(mask) ((mask) & _DtActINV_ID_RETURNED )
|
||||
#define IS_INV_CMD_QUEUED(mask) ((mask) & _DtActINV_CMD_QUEUED )
|
||||
#define IS_INV_INDICATOR_ON(mask) ((mask) & _DtActINV_INDICATOR_ON )
|
||||
|
||||
#define CALL_INV_CB(mask) ((IS_INV_FINISHED(mask)) && \
|
||||
(IS_INV_ID_RETURNED(mask)) && \
|
||||
!(IS_INV_CB_CALLED(mask)))
|
||||
|
||||
/******************************************************************************
|
||||
*
|
||||
* Information per DtActionInvoke()
|
||||
*
|
||||
* Note: For TT_MSG(NOTICE)'s during CDE 1.0, this struct will disappear
|
||||
* immediately after the NOTICEs are sent.
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
|
||||
typedef struct {
|
||||
unsigned long mask; /* encodes object class and writable flag */
|
||||
int size; /* original size (buffers only) */
|
||||
char *type; /* original type (buffers only) */
|
||||
char *name; /* encodes (tmp) file name associated with the
|
||||
object (if any) */
|
||||
} _DtActArgInfo;
|
||||
|
||||
typedef struct {
|
||||
DtActionStatus userStatus;
|
||||
DtActionArg *newArgp;
|
||||
int newArgc;
|
||||
} _DtActUpdateCache;
|
||||
|
||||
typedef struct _DtActInvRec {
|
||||
unsigned long state; /* invocation state */
|
||||
DtActionInvocationID id; /* identifying invocation ID */
|
||||
Widget w; /* users widget id */
|
||||
DtActionCallbackProc cb; /* users callback */
|
||||
XtPointer client_data; /* users client data for cb */
|
||||
_DtActArgInfo *info; /* template w/ .argClass info */
|
||||
int ac; /* original # of arguments */
|
||||
int numChildren; /* number of childRec's. */
|
||||
_DtActChildRecT **childRec; /* array of child Rec's */
|
||||
int cachedUploadCnt;/* cached callback updates */
|
||||
_DtActUpdateCache *cachedUploads; /* data for */
|
||||
} _DtActInvRecT;
|
||||
|
||||
|
||||
/******************************************************************************
|
||||
*
|
||||
* Structs for dialogs/prompts
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
/* Structure used to hold a prompt string destined for a dialog */
|
||||
|
||||
typedef struct {
|
||||
int argIndex;
|
||||
char *prompt;
|
||||
} PromptEntry;
|
||||
|
||||
|
||||
/* Structure used to contain prompt dialog information */
|
||||
|
||||
typedef struct {
|
||||
int argIndex;
|
||||
Widget promptWidget;
|
||||
} DialogPromptEntry;
|
||||
|
||||
typedef struct {
|
||||
ActionRequest * request;
|
||||
Widget topLevel;
|
||||
Widget associatedWidget;
|
||||
int numPrompts;
|
||||
DialogPromptEntry * prompts;
|
||||
} PromptDialog;
|
||||
|
||||
|
||||
/* Structure used to contain abort/continue dialog information */
|
||||
|
||||
typedef struct {
|
||||
ActionRequest * request;
|
||||
Widget topLevel;
|
||||
Widget associatedWidget;
|
||||
int numPrompts;
|
||||
PromptEntry * prompts;
|
||||
} ContinueDialog;
|
||||
|
||||
|
||||
/* Structure passed to request passed/failed callbacks */
|
||||
|
||||
typedef struct {
|
||||
Widget associatedWidget;
|
||||
char *actionLabel;
|
||||
int offset;
|
||||
ActionPtr actionPtr; /* Ptr to the action that
|
||||
was invoked. */
|
||||
ActionRequest *requestPtr;
|
||||
DtActionInvocationID actInvId; /* A standard invocation id */
|
||||
unsigned long childId; /* An id to further identify
|
||||
children of actInvId */
|
||||
} CallbackData;
|
||||
|
||||
/******************************************************************************
|
||||
*
|
||||
* Private External Function Declarations -- not for public consumption
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
extern void _DtFreeActionStruct( ActionPtr action) ;
|
||||
|
||||
#endif /* _ActionP_h */
|
||||
/* DON'T ADD ANYTHING AFTER THIS #endif */
|
||||
@@ -1,114 +0,0 @@
|
||||
/*
|
||||
* CDE - Common Desktop Environment
|
||||
*
|
||||
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
|
||||
*
|
||||
* These libraries and programs are free software; you can
|
||||
* redistribute them and/or modify them under the terms of the GNU
|
||||
* Lesser General Public License as published by the Free Software
|
||||
* Foundation; either version 2 of the License, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* These libraries and programs are distributed in the hope that
|
||||
* they will be useful, but WITHOUT ANY WARRANTY; without even the
|
||||
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU Lesser General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with these libraries and programs; if not, write
|
||||
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
|
||||
* Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/* $XConsortium: ActionUtilP.h /main/3 1995/10/26 15:01:19 rswiston $ */
|
||||
/************************************<+>*************************************
|
||||
****************************************************************************
|
||||
**
|
||||
** File: ActionUtilP.h
|
||||
**
|
||||
** Project: DT
|
||||
**
|
||||
** Description: Private include file for the Action Library Utilities.
|
||||
**
|
||||
**
|
||||
** (c) Copyright 1993, 1994 Hewlett-Packard Company
|
||||
** (c) Copyright 1993, 1994 International Business Machines Corp.
|
||||
** (c) Copyright 1993, 1994 Sun Microsystems, Inc.
|
||||
** (c) Copyright 1993, 1994 Novell, Inc.
|
||||
****************************************************************************
|
||||
************************************<+>*************************************/
|
||||
|
||||
#ifndef _ActionUtilP_h
|
||||
#define _ActionUtilP_h
|
||||
|
||||
#include <X11/Intrinsic.h> /* for Display struct definition */
|
||||
#include "ActionP.h"
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
*
|
||||
* Macro to protect against sending a NULL pointer to certain
|
||||
* library functions (i.e. sprintf, strlen, ...) with on some
|
||||
* systems choke on a NULL pointer.
|
||||
*
|
||||
****************************************************************************/
|
||||
#define _DtActNULL_GUARD(s) ((s) ? (s) : "")
|
||||
|
||||
/******************************************************************************
|
||||
External Utility Function Declarations
|
||||
|
||||
These functions are for internal use and are not part of the
|
||||
public Action API. Each of the following functions returns a
|
||||
newly allocated version of the desired string. It is up to the
|
||||
caller to free the strings obtained.
|
||||
******************************************************************************/
|
||||
|
||||
extern char *_DtBasename(const char *s);
|
||||
extern char *_DtDirname(const char *s);
|
||||
extern char *_DtPathname(const char *s);
|
||||
extern char *_DtHostString(const char *s);
|
||||
extern char *_DtGetSessionHostName( void );
|
||||
extern char *_DtGetDisplayHostName( Display *d);
|
||||
extern char *_DtGetLocalHostName( void );
|
||||
extern char *_DtGetExecHostsDefault (void);
|
||||
extern char *_DtGetActionIconDefault (void);
|
||||
extern char *_DtGetDtTmpDir(void);
|
||||
extern char *_DtActGenerateTmpFile(char *dir,
|
||||
char *format,
|
||||
mode_t mode,
|
||||
int *fd );
|
||||
extern int _DtIsSameHost( const char *host1, const char *host2 );
|
||||
extern void _DtRemoveTrailingBlanksInPlace(char **s);
|
||||
extern int _DtExecuteAccess(const char *path);
|
||||
|
||||
extern DtActionInvocationID _DtActAllocID();
|
||||
extern _DtActInvRecT *_DtActAllocInvRec();
|
||||
extern _DtActChildRecT *_DtActAllocChildRec( _DtActInvRecT *recp );
|
||||
extern int _DtActDeleteInvRec( DtActionInvocationID id);
|
||||
extern _DtActInvRecT *_DtActFindInvRec( DtActionInvocationID id);
|
||||
extern _DtActChildRecT *_DtActFindChildRec(
|
||||
DtActionInvocationID id,
|
||||
unsigned long childId);
|
||||
extern unsigned long _DtActEvalChildren(DtActionInvocationID id);
|
||||
extern void _DtActExecutionLeafNodeCleanup(
|
||||
DtActionInvocationID id,
|
||||
DtActionArg *newArgp,
|
||||
int newArgc,
|
||||
int respectQuitBlock);
|
||||
extern DtActionArg *_DtActMallocEmptyArgArray(int ac);
|
||||
extern void _DtActFreeArgArray( DtActionArg *argp, int ac );
|
||||
extern void *_DtActReadTmpFileToBuffer (
|
||||
char *fname,
|
||||
int *sizep);
|
||||
extern int _DtActGetCmdReturnArgs (
|
||||
DtActionInvocationID invId,
|
||||
_DtActChildRecT *childp,
|
||||
DtActionArg **aargv );
|
||||
|
||||
/******************************************************************************/
|
||||
|
||||
|
||||
#endif /* _ActionUtilP_h */
|
||||
/* DON'T ADD ANYTHING AFTER THIS #endif */
|
||||
|
||||
|
||||
@@ -1,199 +0,0 @@
|
||||
/*
|
||||
* CDE - Common Desktop Environment
|
||||
*
|
||||
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
|
||||
*
|
||||
* These libraries and programs are free software; you can
|
||||
* redistribute them and/or modify them under the terms of the GNU
|
||||
* Lesser General Public License as published by the Free Software
|
||||
* Foundation; either version 2 of the License, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* These libraries and programs are distributed in the hope that
|
||||
* they will be useful, but WITHOUT ANY WARRANTY; without even the
|
||||
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU Lesser General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with these libraries and programs; if not, write
|
||||
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
|
||||
* Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/* $XConsortium: CmdInv.h /main/6 1996/01/23 10:41:03 barstow $ */
|
||||
/***************************************************************************
|
||||
*
|
||||
* File: CmdInv.h
|
||||
* Description: Public header for the command invocation system.
|
||||
* Language: C
|
||||
*
|
||||
** (c) Copyright 1993, 1994 Hewlett-Packard Company
|
||||
** (c) Copyright 1993, 1994 International Business Machines Corp.
|
||||
** (c) Copyright 1993, 1994 Sun Microsystems, Inc.
|
||||
** (c) Copyright 1993, 1994 Novell, Inc.
|
||||
***************************************************************************/
|
||||
|
||||
#ifndef _CmdInv_h
|
||||
#define _CmdInv_h
|
||||
|
||||
#include <X11/Xlib.h>
|
||||
#include <Dt/Message.h>
|
||||
#include <Dt/Spc.h>
|
||||
|
||||
/******************************************************************************
|
||||
*
|
||||
* DtCmdInvExecuteProc - This type is is used to define the parameters
|
||||
* needed in the callback functions for success and failure notification
|
||||
* of a Command Invoker execution call.
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
typedef void (*DtCmdInvExecuteProc) (
|
||||
char *message, /* NULL if the request is successful.
|
||||
* Otherwise an error message. */
|
||||
void *client_data
|
||||
);
|
||||
|
||||
/******************************************************************************
|
||||
*
|
||||
* Function: void _DtInitializeCommandInvoker (
|
||||
* Display *display,
|
||||
* char *toolClass,
|
||||
* char *applicationClass,
|
||||
* DtSvcReceiveProc reloadDBHandler,
|
||||
* XtAppContext appContext)
|
||||
*
|
||||
* Parameters:
|
||||
*
|
||||
* display - The X server display connection.
|
||||
*
|
||||
* toolClass - The BMS tool class of the client.
|
||||
*
|
||||
* applicationClass - The application class of the client (see
|
||||
* XtInitialize). This is needed to add the
|
||||
* Command Invoker's resources to the client's
|
||||
* resources.
|
||||
*
|
||||
* reloadDBHandler - Function to be called if a RELOAD-TYPES-DB
|
||||
* request is made. If the client does not read
|
||||
* DT action and/or filetype databases, NULL must
|
||||
* be used.
|
||||
*
|
||||
* appContext - The client's application context. Must be NULL
|
||||
* if the client does not use an application
|
||||
* context.
|
||||
*
|
||||
* Purpose:
|
||||
*
|
||||
* This function allows a client to internalize the functionality
|
||||
* of the DT "Command Invoker". By using this library and the
|
||||
* Action Library, requests for the Command Invoker will be done
|
||||
* internally instead of sending a request to a separate Command
|
||||
* Invoker process.
|
||||
*
|
||||
* For local execution, the "fork" and "execvp" system calls are
|
||||
* used. For remote execution, the "SPCD" is used.
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
extern void
|
||||
_DtInitializeCommandInvoker(
|
||||
Display *display,
|
||||
char *toolClass,
|
||||
char *applicationClass,
|
||||
DtSvcReceiveProc reloadDBHandler,
|
||||
XtAppContext appContext);
|
||||
|
||||
/******************************************************************************
|
||||
*
|
||||
* Function: void _DtCommandInvokerExecute (
|
||||
* char *request_name,
|
||||
* char *context_host,
|
||||
* char *context_dir,
|
||||
* char *context_file,
|
||||
* char *exec_parameters,
|
||||
* char *exec_host,
|
||||
* char *exec_string,
|
||||
* DtCmdInvExecProc success_proc,
|
||||
* void *success_data,
|
||||
* DtCmdInvExecProc failure_proc,
|
||||
* void *failure_data)
|
||||
*
|
||||
* Parameters:
|
||||
*
|
||||
* request_name - The request name (defined in "CommandM.h").
|
||||
*
|
||||
* context_host - Name of the host where request is executed from. If
|
||||
* NULL, the "exec_host" parameter is used. Note: this
|
||||
* should not be confused with execution host, described
|
||||
* below.
|
||||
*
|
||||
* context_dir - Directory where the request should be executed. If
|
||||
* NULL, the HOME directory is used.
|
||||
*
|
||||
* context_file - Not currently used by the Command Invoker.
|
||||
*
|
||||
* exec_parameters - Command Invoker execution parameters. See External
|
||||
* Specification for more information.
|
||||
* If set to NULL, "-" is used.
|
||||
*
|
||||
* exec_host - Name of the host where the request is executed.
|
||||
*
|
||||
* exec_string - The command line to execute.
|
||||
*
|
||||
* success_proc - The function to be invoked if the request is
|
||||
* successfully executed.
|
||||
*
|
||||
* success_data - Client data for successful execution.
|
||||
*
|
||||
* failure_proc - The function to be invoked if an attempt to exeucte
|
||||
* the request fails.
|
||||
*
|
||||
* failure_data - Client data for unsuccessful execution.
|
||||
*
|
||||
* Purpose:
|
||||
*
|
||||
* This function allows a client to use the DT "Command Invoker"
|
||||
* Library for its' process execution. This function is intended
|
||||
* for processes which do not use the Action Library.
|
||||
*
|
||||
* For local execution, the "fork" and "execvp" system calls are
|
||||
* used. For remote execution, the "SPCD" is used.
|
||||
*
|
||||
* Notes:
|
||||
*
|
||||
* This function must be preceded by a call to
|
||||
* "_DtInitializeCommandInvoker".
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
extern void
|
||||
_DtCommandInvokerExecute(
|
||||
char *request_name,
|
||||
char *context_host,
|
||||
char *context_dir,
|
||||
char *context_file,
|
||||
char *exec_parameters,
|
||||
char *exec_host,
|
||||
char *exec_string,
|
||||
DtCmdInvExecuteProc success_proc,
|
||||
void *success_data,
|
||||
DtCmdInvExecuteProc failure_proc,
|
||||
void *failure_data);
|
||||
|
||||
extern SPC_Channel_Ptr _DtSPCOpen( char *hostname,
|
||||
int iomode,
|
||||
char *errorMessage); /* MODIFIED */
|
||||
|
||||
extern int _DtSPCSpawn(
|
||||
char *path,
|
||||
char *context,
|
||||
char **args,
|
||||
char **env,
|
||||
SPC_Channel_Ptr chan,
|
||||
char *execHost,
|
||||
char *contextHost,
|
||||
char *contextDir,
|
||||
char *errorMessage); /* MODIFIED */
|
||||
|
||||
#endif /* _CmdInv_h */
|
||||
@@ -1,206 +0,0 @@
|
||||
/*
|
||||
* CDE - Common Desktop Environment
|
||||
*
|
||||
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
|
||||
*
|
||||
* These libraries and programs are free software; you can
|
||||
* redistribute them and/or modify them under the terms of the GNU
|
||||
* Lesser General Public License as published by the Free Software
|
||||
* Foundation; either version 2 of the License, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* These libraries and programs are distributed in the hope that
|
||||
* they will be useful, but WITHOUT ANY WARRANTY; without even the
|
||||
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU Lesser General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with these libraries and programs; if not, write
|
||||
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
|
||||
* Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/* $TOG: CmdInvP.h /main/5 1998/07/30 12:10:30 mgreess $ */
|
||||
/***************************************************************************
|
||||
*
|
||||
* File: CmdInvP.h
|
||||
* Description: Command execution system private externs and includes
|
||||
* Language: C
|
||||
*
|
||||
** (c) Copyright 1993, 1994 Hewlett-Packard Company
|
||||
** (c) Copyright 1993, 1994 International Business Machines Corp.
|
||||
** (c) Copyright 1993, 1994 Sun Microsystems, Inc.
|
||||
** (c) Copyright 1993, 1994 Novell, Inc.
|
||||
***************************************************************************/
|
||||
|
||||
#ifndef _CmdInvP_h
|
||||
#define _CmdInvP_h
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
#include <sys/param.h> /* MAXPATHNAMELEN */
|
||||
|
||||
#include <X11/Intrinsic.h>
|
||||
|
||||
#include <Dt/DtP.h>
|
||||
#include <Dt/DtNlUtils.h>
|
||||
#include <Dt/Message.h>
|
||||
#include <bms/SbEvent.h>
|
||||
#include <bms/XeUserMsg.h>
|
||||
#include <Dt/Spc.h>
|
||||
#include <Dt/CmdInv.h>
|
||||
#include <Dt/ActionP.h>
|
||||
#include <Dt/Connect.h>
|
||||
|
||||
#ifndef CDE_INSTALLATION_TOP
|
||||
#define CDE_INSTALLATION_TOP "/opt/dt"
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Resource names and classes for the Command Invoker.
|
||||
*/
|
||||
#define DtLOCAL_TERMINAL_NAME "localTerminal"
|
||||
#define DtLOCAL_TERMINAL_CLASS "LocalTerminal"
|
||||
|
||||
#define DtREMOTE_TERMINALS_NAME "remoteTerminals"
|
||||
#define DtREMOTE_TERMINALS_CLASS "RemoteTerminals"
|
||||
|
||||
#define DtWAIT_TIME_NAME "waitTime"
|
||||
#define DtWAIT_TIME_CLASS "WaitTime"
|
||||
|
||||
#define DtDTEXEC_PATH_NAME "dtexecPath"
|
||||
#define DtDTEXEC_PATH_CLASS "DtexecPath"
|
||||
|
||||
#define DtEXECUTION_HOST_LOGGING_NAME "executionHostLogging"
|
||||
#define DtEXECUTION_HOST_LOGGING_CLASS "ExecutionHostLogging"
|
||||
|
||||
|
||||
/*
|
||||
* Structure for saving the "state" of a remote request that is
|
||||
* queued while waiting for a remote subprocess to terminate.
|
||||
*/
|
||||
typedef struct _Cmd_RequestQueue {
|
||||
SPC_Channel_Ptr channel;
|
||||
char *context;
|
||||
char *exec_host;
|
||||
char *exec_string;
|
||||
char **argv;
|
||||
int winType;
|
||||
unsigned long request_num;
|
||||
DtSvcMsgContext replyContext;
|
||||
DtCmdInvExecuteProc success_proc;
|
||||
void *success_data;
|
||||
DtCmdInvExecuteProc failure_proc;
|
||||
void *failure_data;
|
||||
struct _Cmd_RequestQueue *next;
|
||||
} Cmd_RequestQueue;
|
||||
|
||||
/*
|
||||
* Command invocation resources.
|
||||
*/
|
||||
typedef struct {
|
||||
char *localTerminal;
|
||||
char **remoteHosts;
|
||||
char **remoteTerminals;
|
||||
int waitTime;
|
||||
char *dtexecPath;
|
||||
Boolean executionHostLogging;
|
||||
} Cmd_Resources;
|
||||
|
||||
/*
|
||||
* Command invocation global variables.
|
||||
*/
|
||||
typedef struct {
|
||||
Boolean terminal_ok;
|
||||
Boolean subprocess_ok;
|
||||
XtAppContext app_context;
|
||||
char **path_list;
|
||||
char *error_directory_name_map;
|
||||
char *error_subprocess;
|
||||
char *error_terminal;
|
||||
} Cmd_Globals;
|
||||
|
||||
/*
|
||||
* Defaults for the Resources.
|
||||
*/
|
||||
#define DtWAIT_TIME_DEFAULT 3 /* In seconds. */
|
||||
#define DtTERMINAL_DEFAULT "dtterm"
|
||||
|
||||
#define DtCMD_INV_SUB_PROCESS CDE_INSTALLATION_TOP "/bin/dtexec"
|
||||
|
||||
/*
|
||||
* Temporary buffer size.
|
||||
*/
|
||||
#define MAX_BUF_SIZE 1024
|
||||
|
||||
/*
|
||||
* Window types:
|
||||
*/
|
||||
#define NO_STDIO 0
|
||||
#define TERMINAL 1
|
||||
#define PERM_TERMINAL 2
|
||||
|
||||
/*
|
||||
* Command execution return status:
|
||||
*/
|
||||
#define _CMD_EXECUTE_SUCCESS 1
|
||||
#define _CMD_EXECUTE_FAILURE 2
|
||||
#define _CMD_EXECUTE_QUEUED 3
|
||||
#define _CMD_EXECUTE_FATAL 4
|
||||
|
||||
/*
|
||||
* External declarations for the global Command Invoker variables.
|
||||
*/
|
||||
extern Cmd_Resources cmd_Resources;
|
||||
extern Cmd_Globals cmd_Globals;
|
||||
|
||||
/*
|
||||
******* Public Function Declarations for CmdSpc.c *******
|
||||
*/
|
||||
|
||||
extern SbInputId _DtCmdSPCAddInputHandler (
|
||||
int fd,
|
||||
SbInputCallbackProc proc,
|
||||
void *data);
|
||||
extern SbInputId _DtCmdSPCAddExceptionHandler (
|
||||
int fd,
|
||||
SbInputCallbackProc proc,
|
||||
void *data);
|
||||
extern void _DtCmdLogErrorMessage(
|
||||
char *message) ;
|
||||
|
||||
|
||||
/*
|
||||
******* Public Function Declarations for CmdProcess.c *******
|
||||
*/
|
||||
|
||||
extern void _DtCmdCreateTerminalCommand(
|
||||
char **theCommand,
|
||||
int windowType,
|
||||
char *execString,
|
||||
char *execParms,
|
||||
char *execHost,
|
||||
char *procId,
|
||||
char *tmpFiles) ;
|
||||
extern Boolean _DtCmdCheckForExecutable(
|
||||
char *fileName) ;
|
||||
extern Boolean _DtCmdValidDir(
|
||||
char *clientHost,
|
||||
char *contextDir,
|
||||
char *contextHost) ;
|
||||
extern void _DtCmdGetResources(
|
||||
Display *display);
|
||||
|
||||
|
||||
|
||||
/*
|
||||
******* Public Function Declarations for CmdUtilityP.c *******
|
||||
*/
|
||||
|
||||
extern void _DtCmdBuildPathList( void ) ;
|
||||
|
||||
/******** End Public Function Declarations ********/
|
||||
|
||||
#endif /* _CmdInvP_h */
|
||||
@@ -1,188 +0,0 @@
|
||||
/*
|
||||
* CDE - Common Desktop Environment
|
||||
*
|
||||
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
|
||||
*
|
||||
* These libraries and programs are free software; you can
|
||||
* redistribute them and/or modify them under the terms of the GNU
|
||||
* Lesser General Public License as published by the Free Software
|
||||
* Foundation; either version 2 of the License, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* These libraries and programs are distributed in the hope that
|
||||
* they will be useful, but WITHOUT ANY WARRANTY; without even the
|
||||
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU Lesser General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with these libraries and programs; if not, write
|
||||
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
|
||||
* Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/*
|
||||
* File: DbReader.h $XConsortium: DbReader.h /main/4 1995/10/26 15:03:35 rswiston $
|
||||
*
|
||||
* Description: Public include file for the database reader.
|
||||
*
|
||||
* (c) Copyright 1987, 1988, 1989 by Hewlett-Packard Company
|
||||
*
|
||||
* (c) Copyright 1993, 1994 Hewlett-Packard Company *
|
||||
* (c) Copyright 1993, 1994 International Business Machines Corp. *
|
||||
* (c) Copyright 1993, 1994 Sun Microsystems, Inc. *
|
||||
* (c) Copyright 1993, 1994 Novell, Inc. *
|
||||
*/
|
||||
|
||||
|
||||
#ifndef _Dt_DbReader_h
|
||||
#define _Dt_DbReader_h
|
||||
|
||||
#include <X11/Xlib.h>
|
||||
#include <X11/Xresource.h>
|
||||
#include <Dt/DbUtil.h>
|
||||
|
||||
#define DTRECORDIDENTIFIER NULL
|
||||
#define DTUNLIMITEDFIELDS 0
|
||||
|
||||
/* one set of attribute/pair */
|
||||
typedef struct
|
||||
{
|
||||
XrmQuark fieldName;
|
||||
char *fieldValue;
|
||||
} DtDtsDbField;
|
||||
|
||||
/*
|
||||
* Opaque identifier used for identifying a database file name. The opaque
|
||||
* identifier can be converted to an ascii string, using the function
|
||||
* _DtDbPathIdToString().
|
||||
*/
|
||||
#define DtDbPathId long
|
||||
|
||||
/*
|
||||
* All record converters should expect to be called with the parameters
|
||||
* indicated below:
|
||||
*
|
||||
* fields: This is an array of keyword/value pair strings, each
|
||||
* representing one field value for this database record. NOTE:
|
||||
* the keywords have not been validated; this is the
|
||||
* responsibility of the converter, and is usually accomplished
|
||||
* by calling _DtValidateFieldNames(). The array is NULL
|
||||
* terminated, with the last entry having both the 'fieldName'
|
||||
* and 'fieldValue' pointers set to NULL. The first entry always
|
||||
* represents the record identifier, with the 'fieldName' set
|
||||
* to the record type string, and the 'fieldValue' set to any
|
||||
* remaining data specified on the record identifier line.
|
||||
*
|
||||
* pathId: Is an opaque identifier, which can be used to retrieve the name
|
||||
* of the database file from which this record was obtained. By
|
||||
* calling _DtDbPathIdToString(), the database file, in
|
||||
* "host:/path" format, can be obtained.
|
||||
*
|
||||
* hostPrefix: If the database file was loaded from a machine other than the
|
||||
* local machine, then this string indicates the host prefix, in
|
||||
* "/nfs/<host>" format. If the host was the local host, then
|
||||
* this value is set to NULL.
|
||||
*
|
||||
* rejectionStatus: This flag indicates whether any of the earlier record
|
||||
* converters had rejected this entry. Certain classes
|
||||
* of converters may choose to ignore entries if they
|
||||
* had already been rejected.
|
||||
*
|
||||
* It is the responsibility of the converter to perform any necessary
|
||||
* verification of the passed in set of keywords; the function
|
||||
* _DtValidateFieldNames() is provided as a convenience function for performing
|
||||
* this type of validation. Typically, the converter will write an error to
|
||||
* the user's errorlog file, if an invalid record is encountered.
|
||||
*
|
||||
* It is also the responsibility of the converter to allocate any memory needed
|
||||
* to store the new record. The strings contained within the 'fields' array
|
||||
* will all be freed when the converter returns to _DtDbRead(), so the
|
||||
* converter should make copies of any information it wishes to use in the
|
||||
* future. The converter is also responsible for adding the new record to
|
||||
* whatever storage array it is using to save record information.
|
||||
*
|
||||
* If the converter decides to reject the record, then it should return a
|
||||
* 'True' value. If the record was acceptable, then 'False' should be
|
||||
* returned.
|
||||
*/
|
||||
typedef Boolean (*DtDbConverter) (DtDtsDbField * fields,
|
||||
DtDbPathId pathId,
|
||||
char * hostPrefix,
|
||||
Boolean rejectionStatus);
|
||||
|
||||
/*
|
||||
* This structure defines each record type which should be loaded by
|
||||
* _DtDbRead(). Since _DtDbRead() is capable of loading multiple record types
|
||||
* (i.e ACTION, DATA_CRITERIA, etc) in a single pass, the invoking function will
|
||||
* pass in an array of these structures, for which each element will define a
|
||||
* record type which should be loaded. Each record definition requires the
|
||||
* following information:
|
||||
*
|
||||
* recordKeyword: This is the keyword which uniquely identifies the record
|
||||
* which matches this definition. Examples are "ACTION" and
|
||||
* "DATA_CRITERIA".
|
||||
*
|
||||
* maxFields: Indicates the maximum number of fields which is expected
|
||||
* by this record type; typically, this corresponds to the
|
||||
* number of distinct field keywords supported by this type
|
||||
* of record. This feature is used to prevent runaway database
|
||||
* records from getting out of hand; a runaway database record
|
||||
* typically occurs when the user forgets to include line
|
||||
* continuation characters, and a long 'description' field
|
||||
* is entered. If this parameter is set to
|
||||
* DTUNLIMITEDFIELDS, then the check for runaway records
|
||||
* will be disabled for records of this type.
|
||||
*
|
||||
* converters: This is a NULL-terminated array of function pointers,
|
||||
* corresponding to the set of record converters which will
|
||||
* be called, whenever a record of this type is encountered.
|
||||
* The converters are called in order, and all converters will
|
||||
* be called, even if an earlier one rejects the record. The
|
||||
* last entry in the array must be set to NULL.
|
||||
*/
|
||||
typedef struct {
|
||||
char * recordKeyword;
|
||||
int maxFields;
|
||||
DtDbConverter * converters;
|
||||
} DtDbRecordDesc;
|
||||
|
||||
|
||||
/*
|
||||
* _DtDbRead() is the function which causes the specified set of directories to
|
||||
* be searched for files ending with the specified suffix. Although not
|
||||
* required, the set of directories to search is typically obtained by calling
|
||||
* _DtGetDatabaseDirPaths(). This function supports the loading of multiple
|
||||
* field types, all in a single pass of the database files. This function does
|
||||
* not attempt to manage the memory used to store the information extracted from
|
||||
* the database files; it is the responsibility of the function calling this
|
||||
* procedure to initialize any storage, and it is the responsibility of the
|
||||
* record converters to allocate any memory needed to store and record, along
|
||||
* with adding the record to the appropriate storage array.
|
||||
*
|
||||
* dirs: The set of directories to be searched for database files.
|
||||
*
|
||||
* suffix: The file suffix (i.e. ".vf") used to qualify which files within
|
||||
* the database directories should be loaded.
|
||||
*
|
||||
* recordDescriptions: An array, where each entry describes a database record
|
||||
* which should be loaded during this pass of _DtDbRead().
|
||||
* See the definition for this structure, for more details.
|
||||
*
|
||||
* int numRecordDescriptions: The number of entries in the above array.
|
||||
*/
|
||||
extern void _DtDbRead (DtDirPaths * dirs,
|
||||
char * suffix,
|
||||
DtDbRecordDesc * recordDescriptions,
|
||||
int numRecordDescriptions);
|
||||
|
||||
|
||||
/*
|
||||
* _DtDbPathIdToString() is used to map a filename identifier, represented
|
||||
* by an opaque DtDbPathId value, into its corresponding ascii string
|
||||
* representation. The returned string is owned by the calling application,
|
||||
* which should free it up when no longer needed.
|
||||
*/
|
||||
extern char * _DtDbPathIdToString ( DtDbPathId pathId );
|
||||
|
||||
#endif /* _Dt_DbReader_h */
|
||||
/* DON'T ADD ANYTHING AFTER THIS #endif */
|
||||
@@ -1,103 +0,0 @@
|
||||
/*
|
||||
* CDE - Common Desktop Environment
|
||||
*
|
||||
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
|
||||
*
|
||||
* These libraries and programs are free software; you can
|
||||
* redistribute them and/or modify them under the terms of the GNU
|
||||
* Lesser General Public License as published by the Free Software
|
||||
* Foundation; either version 2 of the License, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* These libraries and programs are distributed in the hope that
|
||||
* they will be useful, but WITHOUT ANY WARRANTY; without even the
|
||||
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU Lesser General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with these libraries and programs; if not, write
|
||||
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
|
||||
* Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/*
|
||||
* File: DbUtil.h $XConsortium: DbUtil.h /main/4 1995/10/26 15:04:04 rswiston $
|
||||
* Language: C
|
||||
*
|
||||
* (c) Copyright 1988, Hewlett-Packard Company, all rights reserved.
|
||||
*
|
||||
* (c) Copyright 1993, 1994 Hewlett-Packard Company *
|
||||
* (c) Copyright 1993, 1994 International Business Machines Corp. *
|
||||
* (c) Copyright 1993, 1994 Sun Microsystems, Inc. *
|
||||
* (c) Copyright 1993, 1994 Novell, Inc. *
|
||||
*/
|
||||
|
||||
#ifndef _Dt_DbUtil_h
|
||||
#define _Dt_DbUtil_h
|
||||
|
||||
#include <X11/Intrinsic.h> /* Boolean */
|
||||
|
||||
/*
|
||||
* This structure is used by many of the database functions. It is used to
|
||||
* specify a collection of filenames or directory names. Each file/directory
|
||||
* name is returned in two forms:
|
||||
*
|
||||
* dirs[n] The fully host-qualified pathname for the file or directory,
|
||||
* in "host:/path" format.
|
||||
*
|
||||
* paths[n] The internal format of the file or directory anme, which
|
||||
* can be passed to any of the standard tools which expect a
|
||||
* valid filename; i.e. /nfs/host/path.
|
||||
*
|
||||
* Both of the arrays are NULL-terminated.
|
||||
*/
|
||||
typedef struct {
|
||||
char ** dirs;
|
||||
char ** paths;
|
||||
} DtDirPaths;
|
||||
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
*
|
||||
*
|
||||
*
|
||||
****************************************************************************/
|
||||
extern DtDirPaths * _DtFindMatchingFiles( DtDirPaths * dirs,
|
||||
char * suffix,
|
||||
Boolean sortFiles );
|
||||
|
||||
/*****************************************************************************
|
||||
*
|
||||
* _DtGetDatabaseDirPaths() returns a NULL-terminated array of directories,
|
||||
* which are to be searched for database files. The paths are obtained by
|
||||
* querying the DTDATABASESEARCHPATH environment variable, which specifies
|
||||
* a set of comma separated pathnames, int "host:/path" format. The
|
||||
* return structure should be freed up, when no longer needed, by invoking
|
||||
* _DtFreeDatabaseDirPaths().
|
||||
*
|
||||
* The returned directory names are represented in two formats:
|
||||
*
|
||||
* 1) Fully host qualified; i.e. "host:/path"
|
||||
* 2) Internal format; i.e. "/nfs/host/path"
|
||||
*
|
||||
****************************************************************************/
|
||||
extern DtDirPaths * _DtGetDatabaseDirPaths( void );
|
||||
|
||||
/*****************************************************************************
|
||||
*
|
||||
* _DtFreeDatabaseDirPaths() is used to free the memory occupied by the
|
||||
* passed-in instance of the DtDirPaths structure. Typically, this
|
||||
* information was originally obtained by a call to DtGetDatabasePaths()
|
||||
* or _DtFindMatchingFiles().
|
||||
*
|
||||
* Parameters:
|
||||
*
|
||||
* dirs The structure which is to be freed up.
|
||||
*
|
||||
****************************************************************************/
|
||||
extern void _DtFreeDatabaseDirPaths( DtDirPaths * dirs );
|
||||
|
||||
#endif /* _Dt_DbUtil_h */
|
||||
|
||||
/* DON'T ADD ANYTHING AFTER THIS #endif */
|
||||
@@ -1,210 +0,0 @@
|
||||
/*
|
||||
* CDE - Common Desktop Environment
|
||||
*
|
||||
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
|
||||
*
|
||||
* These libraries and programs are free software; you can
|
||||
* redistribute them and/or modify them under the terms of the GNU
|
||||
* Lesser General Public License as published by the Free Software
|
||||
* Foundation; either version 2 of the License, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* These libraries and programs are distributed in the hope that
|
||||
* they will be useful, but WITHOUT ANY WARRANTY; without even the
|
||||
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU Lesser General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with these libraries and programs; if not, write
|
||||
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
|
||||
* Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/* $XConsortium: Dnd.h /main/3 1995/10/26 15:04:35 rswiston $ */
|
||||
/*
|
||||
* (c) Copyright 1993, 1994 Hewlett-Packard Company
|
||||
* (c) Copyright 1993, 1994 International Business Machines Corp.
|
||||
* (c) Copyright 1993, 1994 Sun Microsystems, Inc.
|
||||
* (c) Copyright 1993, 1994 Novell, Inc.
|
||||
*/
|
||||
|
||||
#ifndef _Dt_Dnd_h
|
||||
#define _Dt_Dnd_h
|
||||
|
||||
#include <Xm/DragIcon.h>
|
||||
#include <Xm/DragC.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
* Constants
|
||||
*/
|
||||
|
||||
/* Dnd Callback Reasons */
|
||||
|
||||
enum {
|
||||
DtCR_DND_CONVERT_DATA,
|
||||
DtCR_DND_CONVERT_DELETE,
|
||||
DtCR_DND_DRAG_FINISH,
|
||||
DtCR_DND_TRANSFER_DATA,
|
||||
DtCR_DND_DROP_ANIMATE,
|
||||
DtCR_DND_ROOT_TRANSFER
|
||||
};
|
||||
#define DtCR_DND_TRANSFER DtCR_DND_TRANSFER_DATA
|
||||
|
||||
/*
|
||||
* Dnd Drag Start Resources
|
||||
* dropOnRootCallback is private and should not be used
|
||||
*/
|
||||
|
||||
#define DtNdropOnRootCallback "dropOnRootCallback"
|
||||
#define DtCDropOnRootCallback "DropOnRootCallback"
|
||||
#define DtNsourceIcon "sourceIcon"
|
||||
#define DtCSourceIcon "SourceIcon"
|
||||
#define DtNbufferIsText "bufferIsText"
|
||||
#define DtCBufferIsText "BufferIsText"
|
||||
|
||||
/*
|
||||
*Dnd Drop Register Resources
|
||||
*/
|
||||
|
||||
#define DtNdropAnimateCallback "dropAnimateCallback"
|
||||
#define DtCDropAnimateCallback "DropAnimateCallback"
|
||||
#define DtNpreserveRegistration "preserveRegistration"
|
||||
#define DtCPreserveRegistration "PreserveRegistration"
|
||||
#define DtNregisterChildren "registerChildren"
|
||||
#define DtCRegisterChildren "RegisterChildren"
|
||||
#define DtNtextIsBuffer "textIsBuffer"
|
||||
#define DtCTextIsBuffer "TextIsBuffer"
|
||||
|
||||
/*
|
||||
* Types
|
||||
*/
|
||||
|
||||
typedef enum {
|
||||
DtDND_SUCCESS,
|
||||
DtDND_FAILURE
|
||||
} DtDndStatus;
|
||||
|
||||
typedef unsigned long DtDndProtocol;
|
||||
|
||||
enum {
|
||||
DtDND_NOOP_TRANSFER = 0L,
|
||||
DtDND_TEXT_TRANSFER = (1L << 0),
|
||||
DtDND_FILENAME_TRANSFER = (1L << 1),
|
||||
DtDND_BUFFER_TRANSFER = (1L << 2)
|
||||
};
|
||||
|
||||
typedef struct _DtDndBuffer {
|
||||
void * bp;
|
||||
int size;
|
||||
String name;
|
||||
} DtDndBuffer;
|
||||
|
||||
typedef struct _DtDndContext {
|
||||
DtDndProtocol protocol;
|
||||
Cardinal numItems;
|
||||
union {
|
||||
XmString * strings;
|
||||
String * files;
|
||||
DtDndBuffer * buffers;
|
||||
} data;
|
||||
} DtDndContext;
|
||||
|
||||
|
||||
/*
|
||||
* Dnd Callback Structures
|
||||
*/
|
||||
|
||||
typedef struct _DtDndConvertCallbackStruct {
|
||||
int reason;
|
||||
XEvent * event;
|
||||
DtDndContext * dragData;
|
||||
DtDndStatus status;
|
||||
} DtDndConvertCallbackStruct, *DtDndConvertCallback;
|
||||
|
||||
typedef struct _DtDndDragFinishCallbackStruct {
|
||||
int reason;
|
||||
XEvent * event;
|
||||
DtDndContext * dragData;
|
||||
Widget sourceIcon;
|
||||
} DtDndDragFinishCallbackStruct, *DtDndDragFinishCallback;
|
||||
|
||||
typedef struct _DtDndTransferCallbackStruct {
|
||||
int reason;
|
||||
XEvent * event;
|
||||
Position x, y;
|
||||
unsigned char operation;
|
||||
DtDndContext * dropData;
|
||||
Widget dragContext;
|
||||
Boolean completeMove;
|
||||
DtDndStatus status;
|
||||
} DtDndTransferCallbackStruct, *DtDndTransferCallback;
|
||||
|
||||
typedef DtDndTransferCallbackStruct DtDndDropCallbackStruct, *DtDndDropCallback;
|
||||
|
||||
typedef struct _DtDndDropAnimateCallbackStruct {
|
||||
int reason;
|
||||
XEvent * event;
|
||||
Position x, y;
|
||||
unsigned char operation;
|
||||
DtDndContext * dropData;
|
||||
} DtDndDropAnimateCallbackStruct, *DtDndDropAnimateCallback;
|
||||
|
||||
|
||||
/*
|
||||
* Functions
|
||||
*/
|
||||
|
||||
extern Widget DtDndCreateSourceIcon(
|
||||
Widget widget,
|
||||
Pixmap source,
|
||||
Pixmap mask);
|
||||
|
||||
extern Widget DtDndDragStart(
|
||||
Widget dragInitiator,
|
||||
XEvent* event,
|
||||
DtDndProtocol protocol,
|
||||
Cardinal numItems,
|
||||
unsigned char operations,
|
||||
XtCallbackList convertCallback,
|
||||
XtCallbackList dragFinishCallback,
|
||||
ArgList argList,
|
||||
Cardinal argCount);
|
||||
|
||||
extern Widget DtDndVaDragStart(
|
||||
Widget dragInitiator,
|
||||
XEvent* event,
|
||||
DtDndProtocol protocol,
|
||||
Cardinal numItems,
|
||||
unsigned char operations,
|
||||
XtCallbackList convertCallback,
|
||||
XtCallbackList dragFinishCallback,
|
||||
...);
|
||||
|
||||
extern void DtDndDropRegister(
|
||||
Widget dropSite,
|
||||
DtDndProtocol protocols,
|
||||
unsigned char operations,
|
||||
XtCallbackList transferCallback,
|
||||
ArgList argList,
|
||||
Cardinal argCount);
|
||||
|
||||
extern void DtDndVaDropRegister(
|
||||
Widget dropSite,
|
||||
DtDndProtocol protocols,
|
||||
unsigned char operations,
|
||||
XtCallbackList transferCallback,
|
||||
...);
|
||||
|
||||
extern void DtDndDropUnregister(
|
||||
Widget widget);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _Dt_Dnd_h */
|
||||
@@ -1,423 +0,0 @@
|
||||
/*
|
||||
* CDE - Common Desktop Environment
|
||||
*
|
||||
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
|
||||
*
|
||||
* These libraries and programs are free software; you can
|
||||
* redistribute them and/or modify them under the terms of the GNU
|
||||
* Lesser General Public License as published by the Free Software
|
||||
* Foundation; either version 2 of the License, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* These libraries and programs are distributed in the hope that
|
||||
* they will be useful, but WITHOUT ANY WARRANTY; without even the
|
||||
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU Lesser General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with these libraries and programs; if not, write
|
||||
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
|
||||
* Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/* $XConsortium: DndIconI.h /main/3 1995/10/26 15:05:58 rswiston $ */
|
||||
/*********************************************************************
|
||||
*
|
||||
* File: DndIconI.h
|
||||
*
|
||||
* Description: Private include file containing DND drag icons bitmaps
|
||||
*
|
||||
*********************************************************************
|
||||
*
|
||||
*+SNOTICE
|
||||
*
|
||||
* RESTRICTED CONFIDENTIAL INFORMATION:
|
||||
*
|
||||
* The information in this document is subject to special
|
||||
* restrictions in a confidential disclosure agreement between
|
||||
* HP, IBM, Sun, USL, SCO and Univel. Do not distribute this
|
||||
* document outside HP, IBM, Sun, USL, SCO, or Univel without
|
||||
* Sun's specific written approval. This documment and all copies
|
||||
* and derivative works thereof must be returned or destroyed at
|
||||
* Sun's request.
|
||||
*
|
||||
* Copyright 1993 Sun Microsystems, Inc. All rights reserved.
|
||||
*
|
||||
* (c) Copyright 1993, 1994 Hewlett-Packard Company
|
||||
* (c) Copyright 1993, 1994 International Business Machines Corp.
|
||||
* (c) Copyright 1993, 1994 Sun Microsystems, Inc.
|
||||
* (c) Copyright 1993, 1994 Novell, Inc.
|
||||
*
|
||||
*+ENOTICE
|
||||
*/
|
||||
|
||||
#ifndef _Dt_DndIconI_h
|
||||
#define _Dt_DndIconI_h
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------
|
||||
* Motif Defaults
|
||||
*-------------------------------------------------------------------*/
|
||||
|
||||
#define motif_x_hot 1
|
||||
#define motif_y_hot 1
|
||||
|
||||
#define motif_x_offset_state -8
|
||||
#define motif_y_offset_state -2
|
||||
|
||||
#define motif_x_offset_delta 0
|
||||
#define motif_y_offset_delta 0
|
||||
|
||||
/*-------------------------------------------------------------------
|
||||
* Text Drags: Cursors
|
||||
*-------------------------------------------------------------------*/
|
||||
|
||||
#define text_x_hot 1
|
||||
#define text_y_hot 1
|
||||
|
||||
#define text_x_offset_state 1
|
||||
#define text_y_offset_state 1
|
||||
|
||||
#define text_x_offset_delta 7
|
||||
#define text_y_offset_delta 3
|
||||
|
||||
/*
|
||||
* Text: State Valid
|
||||
*/
|
||||
|
||||
#define text_valid_width 16
|
||||
#define text_valid_height 16
|
||||
|
||||
static unsigned char text_valid_bits[] = {
|
||||
#ifdef OLDTEXTVALID
|
||||
0x00, 0x00, 0x02, 0x00, 0x06, 0x00, 0x0e, 0x00, 0x1e, 0x00, 0x3e, 0x00,
|
||||
0x7e, 0x00, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
|
||||
#else
|
||||
0x00, 0x00, 0xfe, 0x01, 0xfe, 0x00, 0x7e, 0x00, 0x3e, 0x00, 0x1e, 0x00,
|
||||
0x0e, 0x00, 0x06, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
|
||||
#endif
|
||||
|
||||
static unsigned char text_valid_m_bits[] = {
|
||||
#ifdef OLDTEXTVALID
|
||||
0x03, 0x00, 0x07, 0x00, 0x0f, 0x00, 0x1f, 0x00, 0x3f, 0x00, 0x7f, 0x00,
|
||||
0xff, 0x00, 0xff, 0x01, 0xff, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
|
||||
#else
|
||||
0xff, 0x07, 0xff, 0x03, 0xff, 0x01, 0xff, 0x00, 0x7f, 0x00, 0x3f, 0x00,
|
||||
0x1f, 0x00, 0x0f, 0x00, 0x07, 0x00, 0x03, 0x00, 0x01, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Text: State Invalid
|
||||
*/
|
||||
|
||||
#define text_invalid_width 16
|
||||
#define text_invalid_height 16
|
||||
|
||||
static unsigned char text_invalid_bits[] = {
|
||||
0x00, 0x00, 0xe0, 0x03, 0xf8, 0x0f, 0x1c, 0x1c, 0x0c, 0x1e, 0x06, 0x37,
|
||||
0x86, 0x33, 0xc6, 0x31, 0xe6, 0x30, 0x76, 0x30, 0x3c, 0x18, 0x1c, 0x1c,
|
||||
0xf8, 0x0f, 0xe0, 0x03, 0x00, 0x00, 0x00, 0x00};
|
||||
|
||||
static unsigned char text_invalid_m_bits[] = {
|
||||
0xe0, 0x03, 0xf8, 0x0f, 0xfc, 0x1f, 0xfe, 0x3f, 0x1e, 0x3f, 0x8f, 0x7f,
|
||||
0xcf, 0x7f, 0xef, 0x7b, 0xff, 0x79, 0xff, 0x78, 0x7e, 0x3c, 0xfe, 0x3f,
|
||||
0xfc, 0x1f, 0xf8, 0x0f, 0xe0, 0x03, 0x00, 0x00};
|
||||
|
||||
/*
|
||||
* Text: None
|
||||
*/
|
||||
|
||||
#define text_none_width 16
|
||||
#define text_none_height 16
|
||||
|
||||
static unsigned char text_none_bits[] = {
|
||||
0x00, 0x00, 0xe0, 0x03, 0xf8, 0x0f, 0x1c, 0x1c, 0x0c, 0x1e, 0x06, 0x37,
|
||||
0x86, 0x33, 0xc6, 0x31, 0xe6, 0x30, 0x76, 0x30, 0x3c, 0x18, 0x1c, 0x1c,
|
||||
0xf8, 0x0f, 0xe0, 0x03, 0x00, 0x00, 0x00, 0x00};
|
||||
|
||||
static unsigned char text_none_m_bits[] = {
|
||||
0xe0, 0x03, 0xf8, 0x0f, 0xfc, 0x1f, 0xfe, 0x3f, 0x1e, 0x3f, 0x8f, 0x7f,
|
||||
0xcf, 0x7f, 0xef, 0x7b, 0xff, 0x79, 0xff, 0x78, 0x7e, 0x3c, 0xfe, 0x3f,
|
||||
0xfc, 0x1f, 0xf8, 0x0f, 0xe0, 0x03, 0x00, 0x00};
|
||||
|
||||
/*-------------------------------------------------------------------
|
||||
* Text Drags: Operation Cursors
|
||||
*-------------------------------------------------------------------*/
|
||||
|
||||
/* Use Data Operation Cursors */
|
||||
|
||||
/*
|
||||
* Text: Operation Move
|
||||
*/
|
||||
|
||||
/*
|
||||
* Text: Operation Copy
|
||||
*/
|
||||
|
||||
/*
|
||||
* Text: Operation Link
|
||||
*/
|
||||
|
||||
/*-------------------------------------------------------------------
|
||||
* Text Drags: Source Cursor
|
||||
*-------------------------------------------------------------------*/
|
||||
|
||||
#define text_source_width 32
|
||||
#define text_source_height 32
|
||||
|
||||
static unsigned char text_source_bits[] = {
|
||||
#ifdef OLDTEXTSOURCE
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0xd8, 0xdb, 0xcd, 0x0d, 0x00, 0x00, 0x00, 0x00, 0xf8, 0xbe, 0x7f, 0x1f,
|
||||
0x00, 0x00, 0x00, 0x00, 0xb8, 0xf6, 0xfd, 0x16, 0x00, 0x00, 0x00, 0x00,
|
||||
0xe8, 0x7b, 0x76, 0x0f, 0x00, 0x00, 0x00, 0x00, 0xb8, 0xbb, 0xff, 0x06,
|
||||
0x00, 0x00, 0x00, 0x00, 0xd8, 0xde, 0x7b, 0x1d, 0x00, 0x00, 0x00, 0x00,
|
||||
0x78, 0xd7, 0xb4, 0x0b, 0x00, 0x00, 0x00, 0x00, 0xf8, 0xad, 0xd5, 0x0f,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
|
||||
#else
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0xc0, 0xcd, 0x0d, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb0, 0x7f, 0x1f,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xfd, 0x16, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x7b, 0x76, 0x0f, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xbb, 0xff, 0x06,
|
||||
0x00, 0x00, 0x00, 0x00, 0xf0, 0xde, 0x7b, 0x1d, 0x00, 0x00, 0x00, 0x00,
|
||||
0x78, 0x77, 0xb7, 0x0b, 0x00, 0x00, 0x00, 0x00, 0xf8, 0xbd, 0xdd, 0x0f,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
|
||||
#endif
|
||||
|
||||
static unsigned char text_source_m_bits[] = {
|
||||
#ifdef OLDTEXTSOURCE
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xff, 0xff, 0x3f,
|
||||
0xfc, 0xff, 0xff, 0x3f, 0xfc, 0xff, 0xff, 0x3f, 0xfc, 0xff, 0xff, 0x3f,
|
||||
0xfc, 0xff, 0xff, 0x3f, 0xfc, 0xff, 0xff, 0x3f, 0xfc, 0xff, 0xff, 0x3f,
|
||||
0xfc, 0xff, 0xff, 0x3f, 0xfc, 0xff, 0xff, 0x3f, 0xfc, 0xff, 0xff, 0x3f,
|
||||
0xfc, 0xff, 0xff, 0x3f, 0xfc, 0xff, 0xff, 0x3f, 0xfc, 0xff, 0xff, 0x3f,
|
||||
0xfc, 0xff, 0xff, 0x3f, 0xfc, 0xff, 0xff, 0x3f, 0xfc, 0xff, 0xff, 0x3f,
|
||||
0xfc, 0xff, 0xff, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
|
||||
#else
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xff, 0x3f,
|
||||
0x00, 0xf0, 0xff, 0x3f, 0x00, 0xf8, 0xff, 0x3f, 0x00, 0xfc, 0xff, 0x3f,
|
||||
0x00, 0xfe, 0xff, 0x3f, 0x00, 0xff, 0xff, 0x3f, 0x80, 0xff, 0xff, 0x3f,
|
||||
0xc0, 0xff, 0xff, 0x3f, 0xe0, 0xff, 0xff, 0x3f, 0xf0, 0xff, 0xff, 0x3f,
|
||||
0xf8, 0xff, 0xff, 0x3f, 0xfc, 0xff, 0xff, 0x3f, 0xfc, 0xff, 0xff, 0x3f,
|
||||
0xfc, 0xff, 0xff, 0x3f, 0xfc, 0xff, 0xff, 0x3f, 0xfc, 0xff, 0xff, 0x3f,
|
||||
0xfc, 0xff, 0xff, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
|
||||
#endif
|
||||
|
||||
/*-------------------------------------------------------------------
|
||||
* Data Drags: Cursors
|
||||
*------------------------------------------------------------------*/
|
||||
|
||||
#define data_x_hot 3
|
||||
#define data_y_hot 3
|
||||
|
||||
#define data_x_offset_state 11
|
||||
#define data_y_offset_state 11
|
||||
|
||||
#define data_x_offset_delta 7
|
||||
#define data_y_offset_delta 7
|
||||
|
||||
/*
|
||||
* Data: State Valid
|
||||
*/
|
||||
|
||||
#define data_valid_width 16
|
||||
#define data_valid_height 16
|
||||
|
||||
static unsigned char data_valid_bits[] = {
|
||||
0x00, 0x00, 0x06, 0x00, 0x1e, 0x00, 0x7c, 0x00, 0xfc, 0x01, 0xf8, 0x07,
|
||||
0xf8, 0x07, 0xf0, 0x01, 0xf0, 0x03, 0x60, 0x07, 0x60, 0x0e, 0x00, 0x1c,
|
||||
0x00, 0x38, 0x00, 0x70, 0x00, 0x60, 0x00, 0x00};
|
||||
|
||||
static unsigned char data_valid_m_bits[] = {
|
||||
0x07, 0x00, 0x1f, 0x00, 0x7f, 0x00, 0xfe, 0x01, 0xfe, 0x07, 0xfc, 0x0f,
|
||||
0xfc, 0x0f, 0xf8, 0x07, 0xf8, 0x07, 0xf0, 0x0f, 0xf0, 0x1f, 0x60, 0x3e,
|
||||
0x00, 0x7c, 0x00, 0xf8, 0x00, 0xf0, 0x00, 0x60};
|
||||
|
||||
/*
|
||||
* Data: State Invalid
|
||||
*/
|
||||
|
||||
#define data_invalid_width 16
|
||||
#define data_invalid_height 16
|
||||
|
||||
static unsigned char data_invalid_bits[] = {
|
||||
0x00, 0x00, 0xe0, 0x03, 0xf8, 0x0f, 0x1c, 0x1c, 0x0c, 0x1e, 0x06, 0x37,
|
||||
0x86, 0x33, 0xc6, 0x31, 0xe6, 0x30, 0x76, 0x30, 0x3c, 0x18, 0x1c, 0x1c,
|
||||
0xf8, 0x0f, 0xe0, 0x03, 0x00, 0x00, 0x00, 0x00};
|
||||
|
||||
static unsigned char data_invalid_m_bits[] = {
|
||||
0xe0, 0x03, 0xf8, 0x0f, 0xfc, 0x1f, 0xfe, 0x3f, 0x1e, 0x3f, 0x8f, 0x7f,
|
||||
0xcf, 0x7f, 0xef, 0x7b, 0xff, 0x79, 0xff, 0x78, 0x7e, 0x3c, 0xfe, 0x3f,
|
||||
0xfc, 0x1f, 0xf8, 0x0f, 0xe0, 0x03, 0x00, 0x00};
|
||||
|
||||
/*
|
||||
* Data: State None
|
||||
*/
|
||||
|
||||
#define data_none_width 16
|
||||
#define data_none_height 16
|
||||
|
||||
static unsigned char data_none_bits[] = {
|
||||
0x00, 0x00, 0xe0, 0x03, 0xf8, 0x0f, 0x1c, 0x1c, 0x0c, 0x1e, 0x06, 0x37,
|
||||
0x86, 0x33, 0xc6, 0x31, 0xe6, 0x30, 0x76, 0x30, 0x3c, 0x18, 0x1c, 0x1c,
|
||||
0xf8, 0x0f, 0xe0, 0x03, 0x00, 0x00, 0x00, 0x00};
|
||||
|
||||
static unsigned char data_none_m_bits[] = {
|
||||
0xe0, 0x03, 0xf8, 0x0f, 0xfc, 0x1f, 0xfe, 0x3f, 0x1e, 0x3f, 0x8f, 0x7f,
|
||||
0xcf, 0x7f, 0xef, 0x7b, 0xff, 0x79, 0xff, 0x78, 0x7e, 0x3c, 0xfe, 0x3f,
|
||||
0xfc, 0x1f, 0xf8, 0x0f, 0xe0, 0x03, 0x00, 0x00};
|
||||
|
||||
/*-------------------------------------------------------------------
|
||||
* Data Drags: Operation Cursors
|
||||
*-------------------------------------------------------------------*/
|
||||
|
||||
/*
|
||||
* Data: Operation Move
|
||||
*/
|
||||
|
||||
#define data_move_width 16
|
||||
#define data_move_height 16
|
||||
|
||||
static unsigned char data_move_bits[] = {
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
|
||||
|
||||
static unsigned char data_move_m_bits[] = {
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
|
||||
|
||||
/*
|
||||
* Data: Operation Copy
|
||||
*/
|
||||
|
||||
#define data_copy_width 16
|
||||
#define data_copy_height 16
|
||||
|
||||
static unsigned char data_copy_bits[] = {
|
||||
0x00, 0x00, 0xfe, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x1f, 0x02, 0x11,
|
||||
0x02, 0x11, 0x02, 0x11, 0x02, 0x11, 0x02, 0x11, 0xfe, 0x11, 0x20, 0x10,
|
||||
0x20, 0x10, 0xe0, 0x1f, 0x00, 0x00, 0x00, 0x00};
|
||||
|
||||
static unsigned char data_copy_m_bits[] = {
|
||||
0xff, 0x03, 0xff, 0x03, 0xff, 0x03, 0xff, 0x3f, 0xff, 0x3f, 0xff, 0x3f,
|
||||
0xff, 0x3f, 0xff, 0x3f, 0xff, 0x3f, 0xff, 0x3f, 0xff, 0x3f, 0xff, 0x3f,
|
||||
0xf0, 0x3f, 0xf0, 0x3f, 0xf0, 0x3f, 0x00, 0x00};
|
||||
|
||||
/*
|
||||
* Data: Operation Link
|
||||
*/
|
||||
|
||||
#define data_link_width 16
|
||||
#define data_link_height 16
|
||||
|
||||
static unsigned char data_link_bits[] = {
|
||||
0x00, 0x00, 0xfe, 0x03, 0x02, 0x02, 0x02, 0x02, 0x32, 0x02, 0x32, 0x3e,
|
||||
0x42, 0x20, 0x82, 0x20, 0x02, 0x21, 0x3e, 0x26, 0x20, 0x26, 0x20, 0x20,
|
||||
0x20, 0x20, 0xe0, 0x3f, 0x00, 0x00, 0x00, 0x00};
|
||||
|
||||
static unsigned char data_link_m_bits[] = {
|
||||
0xff, 0x07, 0xff, 0x07, 0xff, 0x07, 0xff, 0x07, 0xff, 0x7f, 0xff, 0x7f,
|
||||
0xff, 0x7f, 0xff, 0x7f, 0xff, 0x7f, 0xff, 0x7f, 0xff, 0x7f, 0xf0, 0x7f,
|
||||
0xf0, 0x7f, 0xf0, 0x7f, 0xf0, 0x7f, 0x00, 0x00};
|
||||
|
||||
/*-------------------------------------------------------------------
|
||||
* Data Drags: Source Icons
|
||||
*-------------------------------------------------------------------*/
|
||||
|
||||
/*
|
||||
* Data Source: Single
|
||||
*/
|
||||
|
||||
#define data_single_width 32
|
||||
#define data_single_height 32
|
||||
|
||||
static unsigned char data_single_bits[] = {
|
||||
0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0x7f, 0x00, 0x10, 0x00, 0xc0, 0x00,
|
||||
0x10, 0x00, 0x40, 0x01, 0x10, 0x00, 0x40, 0x02, 0x10, 0x00, 0x40, 0x04,
|
||||
0x10, 0x00, 0xc0, 0x0f, 0x10, 0x00, 0x00, 0x08, 0x10, 0x00, 0x00, 0x08,
|
||||
0x10, 0x00, 0x00, 0x08, 0x10, 0x00, 0x00, 0x08, 0x10, 0x00, 0x00, 0x08,
|
||||
0x10, 0x00, 0x00, 0x08, 0x10, 0x00, 0x00, 0x08, 0x10, 0x00, 0x00, 0x08,
|
||||
0x10, 0x00, 0x00, 0x08, 0x10, 0x00, 0x00, 0x08, 0x10, 0x00, 0x00, 0x08,
|
||||
0x10, 0x00, 0x00, 0x08, 0x10, 0x00, 0x00, 0x08, 0x10, 0x00, 0x00, 0x08,
|
||||
0x10, 0x00, 0x00, 0x08, 0x10, 0x00, 0x00, 0x08, 0x10, 0x00, 0x00, 0x08,
|
||||
0x10, 0x00, 0x00, 0x08, 0x10, 0x00, 0x00, 0x08, 0x10, 0x00, 0x00, 0x08,
|
||||
0x10, 0x00, 0x00, 0x08, 0x10, 0x00, 0x00, 0x08, 0x10, 0x00, 0x00, 0x08,
|
||||
0x10, 0x00, 0x00, 0x08, 0xf0, 0xff, 0xff, 0x0f};
|
||||
|
||||
static unsigned char data_single_m_bits[] = {
|
||||
0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0x7f, 0x00, 0xf0, 0xff, 0xff, 0x00,
|
||||
0xf0, 0xff, 0xff, 0x01, 0xf0, 0xff, 0xff, 0x03, 0xf0, 0xff, 0xff, 0x07,
|
||||
0xf0, 0xff, 0xff, 0x0f, 0xf0, 0xff, 0xff, 0x0f, 0xf0, 0xff, 0xff, 0x0f,
|
||||
0xf0, 0xff, 0xff, 0x0f, 0xf0, 0xff, 0xff, 0x0f, 0xf0, 0xff, 0xff, 0x0f,
|
||||
0xf0, 0xff, 0xff, 0x0f, 0xf0, 0xff, 0xff, 0x0f, 0xf0, 0xff, 0xff, 0x0f,
|
||||
0xf0, 0xff, 0xff, 0x0f, 0xf0, 0xff, 0xff, 0x0f, 0xf0, 0xff, 0xff, 0x0f,
|
||||
0xf0, 0xff, 0xff, 0x0f, 0xf0, 0xff, 0xff, 0x0f, 0xf0, 0xff, 0xff, 0x0f,
|
||||
0xf0, 0xff, 0xff, 0x0f, 0xf0, 0xff, 0xff, 0x0f, 0xf0, 0xff, 0xff, 0x0f,
|
||||
0xf0, 0xff, 0xff, 0x0f, 0xf0, 0xff, 0xff, 0x0f, 0xf0, 0xff, 0xff, 0x0f,
|
||||
0xf0, 0xff, 0xff, 0x0f, 0xf0, 0xff, 0xff, 0x0f, 0xf0, 0xff, 0xff, 0x0f,
|
||||
0xf0, 0xff, 0xff, 0x0f, 0xf0, 0xff, 0xff, 0x0f};
|
||||
|
||||
/*
|
||||
* Data Source: Multiple
|
||||
*/
|
||||
|
||||
#define data_multiple_width 32
|
||||
#define data_multiple_height 32
|
||||
|
||||
static unsigned char data_multiple_bits[] = {
|
||||
0xfc, 0xff, 0x0f, 0x00, 0x04, 0x00, 0x30, 0x00, 0x04, 0x00, 0xd0, 0x1f,
|
||||
0x04, 0x00, 0x90, 0x10, 0x04, 0x00, 0x10, 0xf1, 0x04, 0x00, 0xf0, 0x93,
|
||||
0x04, 0x00, 0x00, 0x92, 0x04, 0x00, 0x00, 0x92, 0x04, 0x00, 0x00, 0x92,
|
||||
0x04, 0x00, 0x00, 0x92, 0x04, 0x00, 0x00, 0x92, 0x04, 0x00, 0x00, 0x92,
|
||||
0x04, 0x00, 0x00, 0x92, 0x04, 0x00, 0x00, 0x92, 0x04, 0x00, 0x00, 0x92,
|
||||
0x04, 0x00, 0x00, 0x92, 0x04, 0x00, 0x00, 0x92, 0x04, 0x00, 0x00, 0x92,
|
||||
0x04, 0x00, 0x00, 0x92, 0x04, 0x00, 0x00, 0x92, 0x04, 0x00, 0x00, 0x92,
|
||||
0x04, 0x00, 0x00, 0x92, 0x04, 0x00, 0x00, 0x92, 0x04, 0x00, 0x00, 0x92,
|
||||
0x04, 0x00, 0x00, 0x92, 0x04, 0x00, 0x00, 0x92, 0x04, 0x00, 0x00, 0x92,
|
||||
0xfc, 0xff, 0xff, 0x93, 0x20, 0x00, 0x00, 0x90, 0xe0, 0xff, 0xff, 0x9f,
|
||||
0x00, 0x01, 0x00, 0x80, 0x00, 0xff, 0xff, 0xff};
|
||||
|
||||
static unsigned char data_multiple_m_bits[] = {
|
||||
0xfc, 0xff, 0x0f, 0x00, 0xfc, 0xff, 0x3f, 0x00, 0xfc, 0xff, 0xff, 0x1f,
|
||||
0xfc, 0xff, 0xff, 0x1f, 0xfc, 0xff, 0xff, 0xff, 0xfc, 0xff, 0xff, 0xff,
|
||||
0xfc, 0xff, 0xff, 0xff, 0xfc, 0xff, 0xff, 0xff, 0xfc, 0xff, 0xff, 0xff,
|
||||
0xfc, 0xff, 0xff, 0xff, 0xfc, 0xff, 0xff, 0xff, 0xfc, 0xff, 0xff, 0xff,
|
||||
0xfc, 0xff, 0xff, 0xff, 0xfc, 0xff, 0xff, 0xff, 0xfc, 0xff, 0xff, 0xff,
|
||||
0xfc, 0xff, 0xff, 0xff, 0xfc, 0xff, 0xff, 0xff, 0xfc, 0xff, 0xff, 0xff,
|
||||
0xfc, 0xff, 0xff, 0xff, 0xfc, 0xff, 0xff, 0xff, 0xfc, 0xff, 0xff, 0xff,
|
||||
0xfc, 0xff, 0xff, 0xff, 0xfc, 0xff, 0xff, 0xff, 0xfc, 0xff, 0xff, 0xff,
|
||||
0xfc, 0xff, 0xff, 0xff, 0xfc, 0xff, 0xff, 0xff, 0xfc, 0xff, 0xff, 0xff,
|
||||
0xfc, 0xff, 0xff, 0xff, 0xe0, 0xff, 0xff, 0xff, 0xe0, 0xff, 0xff, 0xff,
|
||||
0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff};
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _Dt_DndIconI_h */
|
||||
@@ -1,332 +0,0 @@
|
||||
/*
|
||||
* CDE - Common Desktop Environment
|
||||
*
|
||||
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
|
||||
*
|
||||
* These libraries and programs are free software; you can
|
||||
* redistribute them and/or modify them under the terms of the GNU
|
||||
* Lesser General Public License as published by the Free Software
|
||||
* Foundation; either version 2 of the License, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* These libraries and programs are distributed in the hope that
|
||||
* they will be useful, but WITHOUT ANY WARRANTY; without even the
|
||||
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU Lesser General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with these libraries and programs; if not, write
|
||||
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
|
||||
* Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/* $XConsortium: DndP.h /main/4 1996/06/21 17:28:31 ageorge $ */
|
||||
/*********************************************************************
|
||||
*
|
||||
* File: DndP.h
|
||||
*
|
||||
* Description: Private include file for DND Convenience API.
|
||||
*
|
||||
*********************************************************************
|
||||
*
|
||||
*+SNOTICE
|
||||
*
|
||||
* RESTRICTED CONFIDENTIAL INFORMATION:
|
||||
*
|
||||
* The information in this document is subject to special
|
||||
* restrictions in a confidential disclosure agreement bertween
|
||||
* HP, IBM, Sun, USL, SCO and Univel. Do not distribute this
|
||||
* document outside HP, IBM, Sun, USL, SCO, or Univel wihtout
|
||||
* Sun's specific written approval. This documment and all copies
|
||||
* and derivative works thereof must be returned or destroyed at
|
||||
* Sun's request.
|
||||
*
|
||||
* Copyright 1993 Sun Microsystems, Inc. All rights reserved.
|
||||
*
|
||||
* (c) Copyright 1993, 1994 Hewlett-Packard Company
|
||||
* (c) Copyright 1993, 1994 International Business Machines Corp.
|
||||
* (c) Copyright 1993, 1994 Sun Microsystems, Inc.
|
||||
* (c) Copyright 1993, 1994 Novell, Inc.
|
||||
*
|
||||
*+ENOTICE
|
||||
*/
|
||||
|
||||
#ifndef _Dt_DndP_h
|
||||
#define _Dt_DndP_h
|
||||
|
||||
#include <stdarg.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Drag and Drop selection targets
|
||||
*/
|
||||
|
||||
extern Atom XA_TARGETS;
|
||||
extern Atom XA_TIMESTAMP;
|
||||
extern Atom XA_MULTIPLE;
|
||||
extern Atom XA_DELETE;
|
||||
extern Atom XA_NULL;
|
||||
extern Atom XA_TEXT;
|
||||
extern Atom XA_HOST_NAME;
|
||||
extern Atom XA_SUN_FILE_HOST_NAME;
|
||||
extern Atom XA_SUN_ENUM_COUNT;
|
||||
extern Atom XA_SUN_DATA_LABEL;
|
||||
extern Atom XA_SUN_SELN_READONLY;
|
||||
extern Atom XA_SUN_ATM_FILE_NAME;
|
||||
extern Atom XA_SUN_ATM_METHODS;
|
||||
|
||||
#define DtGetAtom(display, atomname) \
|
||||
XmInternAtom((display),(atomname),False)
|
||||
|
||||
|
||||
/*
|
||||
* Drag Icon Styles
|
||||
*/
|
||||
typedef enum {
|
||||
DtDND_DRAG_SOURCE_DEFAULT,
|
||||
DtDND_DRAG_SOURCE_TEXT,
|
||||
DtDND_DRAG_SOURCE_DATA,
|
||||
DtDND_DRAG_SOURCE_MULTIPLE
|
||||
} DtDndDragSource;
|
||||
|
||||
/*
|
||||
* Drag-n-Drop Data Transfer Protocol
|
||||
*/
|
||||
typedef struct _DtDndTransfer {
|
||||
Atom * targets;
|
||||
Cardinal numTargets;
|
||||
struct _DtDndMethods * methods;
|
||||
} DtDndTransfer;
|
||||
|
||||
/*
|
||||
* Drag Initiator Structure
|
||||
*/
|
||||
|
||||
typedef struct _DtDragInfo {
|
||||
Widget dragInitiator;
|
||||
Widget dragContext;
|
||||
DtDndProtocol protocol;
|
||||
Cardinal numItems;
|
||||
unsigned char operations;
|
||||
XtCallbackList dragConvertCallback;
|
||||
XtCallbackList dragFinishCallback;
|
||||
XtCallbackList dropOnRootCallback;
|
||||
XtCallbackList dragDropFinishCallback;
|
||||
XtCallbackList dropFinishCallback;
|
||||
XtCallbackList topLevelEnterCallback;
|
||||
XtCallbackList topLevelLeaveCallback;
|
||||
XtCallbackList dropStartCallback;
|
||||
Widget sourceIcon;
|
||||
Boolean bufferIsText;
|
||||
DtDndTransfer * transfer;
|
||||
DtDndContext * dragData;
|
||||
Boolean inRoot;
|
||||
Window backdropWindow;
|
||||
DtDndStatus status;
|
||||
XtPointer clientData;
|
||||
} DtDragInfo;
|
||||
|
||||
/*
|
||||
* Drop Receiver Existing Registration Structure
|
||||
*/
|
||||
|
||||
typedef struct _DtDropSiteInfo {
|
||||
XtCallbackProc dropProc;
|
||||
unsigned char operations;
|
||||
Atom * importTargets;
|
||||
int numImportTargets;
|
||||
} DtDropSiteInfo;
|
||||
|
||||
/*
|
||||
* Drop Receiver Data Transfer Structure
|
||||
*/
|
||||
|
||||
typedef struct _DtTransferInfo {
|
||||
Widget dragContext;
|
||||
DtDndProtocol protocol;
|
||||
unsigned char operation;
|
||||
struct _DtDndMethods * methods;
|
||||
Atom * transferTargets;
|
||||
Cardinal numTransferTargets;
|
||||
Cardinal currentTransfer;
|
||||
Boolean appTransferCalled;
|
||||
XEvent * event;
|
||||
Position x, y;
|
||||
XtPointer clientData;
|
||||
XtCallbackList dropAnimateCallback;
|
||||
} DtTransferInfo;
|
||||
|
||||
/*
|
||||
* Drop Receiver Registration Structure
|
||||
*/
|
||||
|
||||
typedef struct _DtDropInfo {
|
||||
Widget dropReceiver;
|
||||
DtDndProtocol protocols;
|
||||
unsigned char operations;
|
||||
XtCallbackList dropTransferCallback;
|
||||
XtCallbackList dropAnimateCallback;
|
||||
Boolean textIsBuffer;
|
||||
DtDropSiteInfo * dropSiteInfo;
|
||||
DtDndTransfer * transfers;
|
||||
Cardinal numTransfers;
|
||||
DtTransferInfo * transferInfo;
|
||||
DtDndContext * dropData;
|
||||
DtDndStatus status;
|
||||
} DtDropInfo;
|
||||
|
||||
/*
|
||||
* Drag-n-Drop Data Transfer Protocol Function Prototypes
|
||||
*/
|
||||
|
||||
typedef void
|
||||
(*DtDndGetAvailTargetsProc)(
|
||||
DtDragInfo * dtDragInfo,
|
||||
Atom ** returnAvailTargetsList,
|
||||
Cardinal * returnNumAvailTargets);
|
||||
|
||||
typedef void
|
||||
(*DtDndGetExportTargetsProc)(
|
||||
DtDragInfo * dtDragInfo,
|
||||
Atom ** returnExportTargetsList,
|
||||
Cardinal * returnNumExportTargets);
|
||||
|
||||
typedef void
|
||||
(*DtDndGetImportTargetsProc)(
|
||||
DtDropInfo * dtDropInfo,
|
||||
Atom ** returnImportTargetsList,
|
||||
Cardinal * returnNumImportTargets);
|
||||
|
||||
typedef void
|
||||
(*DtDndConvertInitProc)(
|
||||
DtDragInfo * dtDragInfo);
|
||||
|
||||
typedef Boolean
|
||||
(*DtDndConvertProc)(
|
||||
Widget dragContext,
|
||||
DtDragInfo * dtDragInfo,
|
||||
Atom * selection,
|
||||
Atom * target,
|
||||
Atom * returnType,
|
||||
XtPointer * returnValue,
|
||||
unsigned long * returnLength,
|
||||
int * returnFormat,
|
||||
XSelectionRequestEvent *selectionRequestEvent);
|
||||
|
||||
typedef void
|
||||
(*DtDndConvertFinishProc)(
|
||||
DtDragInfo * dtDragInfo);
|
||||
|
||||
typedef void
|
||||
(*DtDndTransferTargetsProc)(
|
||||
DtDropInfo * dtDropInfo,
|
||||
Atom * exportTargets,
|
||||
Cardinal numExportTargets,
|
||||
Atom ** returnTransferTargetsList,
|
||||
Cardinal * returnNumTransferTargets);
|
||||
|
||||
typedef void
|
||||
(*DtDndTransferProc)(
|
||||
Widget dropTransfer,
|
||||
DtDropInfo * dtDropInfo,
|
||||
Atom * selection,
|
||||
Atom * target,
|
||||
Atom * type,
|
||||
XtPointer value,
|
||||
unsigned long * length,
|
||||
int * format);
|
||||
|
||||
typedef void
|
||||
(*DtDndTransferFinishProc)(
|
||||
DtDropInfo * dtDropInfo);
|
||||
|
||||
/*
|
||||
* Drag-n-Drop Data Transfer Methods
|
||||
*/
|
||||
|
||||
typedef struct _DtDndMethods {
|
||||
String name;
|
||||
DtDndProtocol protocol;
|
||||
DtDndDragSource sourceType;
|
||||
DtDndGetAvailTargetsProc getAvailTargets;
|
||||
DtDndGetExportTargetsProc getExportTargets;
|
||||
DtDndGetImportTargetsProc getImportTargets;
|
||||
DtDndConvertInitProc convertInit;
|
||||
DtDndConvertProc convert;
|
||||
DtDndConvertFinishProc convertFinish;
|
||||
DtDndTransferTargetsProc transferTargets;
|
||||
DtDndTransferProc transfer;
|
||||
DtDndTransferFinishProc transferFinish;
|
||||
} DtDndMethods;
|
||||
|
||||
/*
|
||||
* Drag-n-Drop Private Utility Functions
|
||||
*/
|
||||
|
||||
extern DtDndTransfer *
|
||||
_DtDndCreateExportTransfer(
|
||||
DtDragInfo * dtDragInfo);
|
||||
|
||||
extern DtDndTransfer *
|
||||
_DtDndCreateImportTransfers(
|
||||
DtDropInfo * dtDropInfo,
|
||||
Cardinal * numTransfers);
|
||||
|
||||
extern void
|
||||
_DtDndDestroyTransfers(
|
||||
DtDndTransfer * transfers,
|
||||
Cardinal numTransfers);
|
||||
|
||||
extern DtDndTransfer *
|
||||
_DtDndTransferFromTargets(
|
||||
DtDndTransfer * transfers,
|
||||
Cardinal numTransfers,
|
||||
Atom * targets,
|
||||
Cardinal numTargets);
|
||||
|
||||
extern void
|
||||
_DtDndTransferAdd(
|
||||
Widget dropTransfer,
|
||||
DtDropInfo * dtDropInfo,
|
||||
Atom * transferTargets,
|
||||
Cardinal numTransferTargets);
|
||||
|
||||
extern XtCallbackList
|
||||
_DtDndCopyCallbackList(
|
||||
XtCallbackList callbacks);
|
||||
|
||||
extern void
|
||||
_DtDndCallCallbackList(
|
||||
Widget widget,
|
||||
XtCallbackList callbacks,
|
||||
XtPointer calldata);
|
||||
|
||||
extern void
|
||||
_DtDndSelectDragSource(
|
||||
Widget anyWidget,
|
||||
DtDndDragSource sourceType,
|
||||
Widget sourceIcon);
|
||||
|
||||
extern void
|
||||
_DtDndGetIconOffset(
|
||||
Widget dragContext,
|
||||
DtDndDragSource sourceType,
|
||||
int * offsetXReturn,
|
||||
int * offsetYReturn);
|
||||
|
||||
extern String
|
||||
_DtDndGetHostName(void);
|
||||
|
||||
#ifdef DEBUG
|
||||
extern void _DtDndPrintTargets(Display*,Atom*,Cardinal);
|
||||
extern void _DtDndPrintTransfers(Display*,DtDndTransfer*,Cardinal);
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _Dt_DndP_h */
|
||||
@@ -1,93 +0,0 @@
|
||||
/*
|
||||
* CDE - Common Desktop Environment
|
||||
*
|
||||
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
|
||||
*
|
||||
* These libraries and programs are free software; you can
|
||||
* redistribute them and/or modify them under the terms of the GNU
|
||||
* Lesser General Public License as published by the Free Software
|
||||
* Foundation; either version 2 of the License, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* These libraries and programs are distributed in the hope that
|
||||
* they will be useful, but WITHOUT ANY WARRANTY; without even the
|
||||
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU Lesser General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with these libraries and programs; if not, write
|
||||
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
|
||||
* Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/* $TOG: Dt.h /main/12 1999/10/18 14:49:57 samborn $ */
|
||||
/*
|
||||
* (c) Copyright 1997, The Open Group
|
||||
*/
|
||||
/*
|
||||
* (c) Copyright 1996 Digital Equipment Corporation.
|
||||
* (c) Copyright 1993,1994,1996 Hewlett-Packard Company.
|
||||
* (c) Copyright 1993,1994,1996 International Business Machines Corp.
|
||||
* (c) Copyright 1993-1996 Sun Microsystems, Inc.
|
||||
* (c) Copyright 1993,1994,1996 Novell, Inc.
|
||||
* (c) Copyright 1996 FUJITSU LIMITED.
|
||||
* (c) Copyright 1996 Hitachi.
|
||||
*/
|
||||
|
||||
#ifndef _Dt_Dt_h
|
||||
#define _Dt_Dt_h
|
||||
|
||||
#include <X11/Intrinsic.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
* Constants
|
||||
*/
|
||||
|
||||
/* CDE Version information */
|
||||
|
||||
#define DtVERSION 2
|
||||
#define DtREVISION 3
|
||||
#define DtUPDATE_LEVEL 0
|
||||
|
||||
#define DtVERSION_NUMBER (DtVERSION * 10000 + \
|
||||
DtREVISION * 100 + \
|
||||
DtUPDATE_LEVEL)
|
||||
|
||||
#define DtVERSION_STRING "CDE Version 2.3.0a"
|
||||
|
||||
|
||||
/*
|
||||
* CDE Version information
|
||||
*/
|
||||
|
||||
externalref const int DtVersion;
|
||||
externalref const char *DtVersionString;
|
||||
|
||||
|
||||
/*
|
||||
* Functions
|
||||
*/
|
||||
|
||||
extern Boolean DtInitialize(
|
||||
Display *display,
|
||||
Widget widget,
|
||||
char *name,
|
||||
char *tool_class);
|
||||
|
||||
extern Boolean DtAppInitialize(
|
||||
XtAppContext app_context,
|
||||
Display *display,
|
||||
Widget widget,
|
||||
char *name,
|
||||
char *tool_class);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _Dt_Dt_h */
|
||||
@@ -1,49 +0,0 @@
|
||||
/*
|
||||
* CDE - Common Desktop Environment
|
||||
*
|
||||
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
|
||||
*
|
||||
* These libraries and programs are free software; you can
|
||||
* redistribute them and/or modify them under the terms of the GNU
|
||||
* Lesser General Public License as published by the Free Software
|
||||
* Foundation; either version 2 of the License, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* These libraries and programs are distributed in the hope that
|
||||
* they will be useful, but WITHOUT ANY WARRANTY; without even the
|
||||
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU Lesser General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with these libraries and programs; if not, write
|
||||
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
|
||||
* Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/* $XConsortium: DtHash.h /main/5 1996/08/29 15:42:13 cde-dec $ */
|
||||
#ifndef _DtHash_h
|
||||
#define _DtHash_h
|
||||
|
||||
typedef void * DtHashTbl;
|
||||
|
||||
DtHashTbl _DtUtilMakeHash(int size);
|
||||
DtHashTbl _DtUtilMakeIHash(int size);
|
||||
void ** _DtUtilGetHash(DtHashTbl tbl, const unsigned char * key);
|
||||
void ** _DtUtilFindHash(DtHashTbl tbl,const unsigned char * key);
|
||||
void * _DtUtilDelHash(DtHashTbl tbl, const unsigned char * key);
|
||||
int _DtUtilOperateHash(DtHashTbl tbl, void (*op_func)(), void * usr_arg);
|
||||
void _DtUtilDestroyHash(DtHashTbl tbl, int (*des_func)(), void * usr_arg);
|
||||
|
||||
typedef void (*DtHashOperateFunc)();
|
||||
typedef int (*DtHashDestroyFunc)();
|
||||
|
||||
#endif /* _DtHash_h */
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,76 +0,0 @@
|
||||
/*
|
||||
* CDE - Common Desktop Environment
|
||||
*
|
||||
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
|
||||
*
|
||||
* These libraries and programs are free software; you can
|
||||
* redistribute them and/or modify them under the terms of the GNU
|
||||
* Lesser General Public License as published by the Free Software
|
||||
* Foundation; either version 2 of the License, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* These libraries and programs are distributed in the hope that
|
||||
* they will be useful, but WITHOUT ANY WARRANTY; without even the
|
||||
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU Lesser General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with these libraries and programs; if not, write
|
||||
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
|
||||
* Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/* $XConsortium: DtShmDb.h /main/4 1996/05/09 04:22:30 drk $ */
|
||||
#ifndef DtShmDb_h
|
||||
#define DtShmDb_h
|
||||
|
||||
/*
|
||||
this include file provides prototypes for the various
|
||||
shared memory database routines
|
||||
*/
|
||||
|
||||
typedef void * DtShmProtoStrtab;
|
||||
typedef void * DtShmProtoInttab;
|
||||
typedef void * DtShmProtoIntList;
|
||||
|
||||
typedef const void * DtShmStrtab;
|
||||
typedef const void * DtShmInttab;
|
||||
typedef const int * DtShmIntList;
|
||||
typedef int DtShmBoson;
|
||||
|
||||
/*
|
||||
routines used while building shared memory databases
|
||||
*/
|
||||
|
||||
DtShmProtoStrtab _DtShmProtoInitStrtab (int estimated_entries);
|
||||
DtShmBoson _DtShmProtoAddStrtab (DtShmProtoStrtab prototab, const char * string, int * isnew);
|
||||
const char * _DtShmProtoLookUpStrtab (DtShmProtoStrtab prototab, DtShmBoson boson);
|
||||
int _DtShmProtoSizeStrtab (DtShmProtoStrtab prototab);
|
||||
DtShmStrtab _DtShmProtoCopyStrtab (DtShmProtoStrtab prototab, void * dataspace);
|
||||
int _DtShmProtoDestroyStrtab (DtShmProtoStrtab prototab);
|
||||
|
||||
DtShmProtoInttab _DtShmProtoInitInttab (int estimated_entries);
|
||||
int _DtShmProtoAddInttab (DtShmProtoInttab prototab, unsigned int keyin, int datain);
|
||||
int * _DtShmProtoLookUpInttab (DtShmProtoInttab prototab, unsigned int keyin);
|
||||
int _DtShmProtoSizeInttab (DtShmProtoInttab prototab);
|
||||
DtShmInttab _DtShmProtoCopyInttab (DtShmProtoInttab prototab, void * dataspace);
|
||||
int _DtShmProtoDestroyInttab (DtShmProtoInttab prototab);
|
||||
|
||||
|
||||
DtShmProtoIntList _DtShmProtoInitIntLst (int estimated_entries);
|
||||
int * _DtShmProtoAddIntLst (DtShmProtoIntList protolist, int size, int * index_value);
|
||||
int _DtShmProtoSizeIntLst (DtShmProtoIntList protolist);
|
||||
DtShmIntList _DtShmProtoCopyIntLst (DtShmProtoIntList protolist, void * dataspace);
|
||||
int _DtShmProtoDestroyIntLst (DtShmProtoIntList protolist);
|
||||
|
||||
|
||||
/*
|
||||
run-time routines once shared memory area is built
|
||||
*/
|
||||
|
||||
DtShmBoson _DtShmStringToBoson (DtShmStrtab tab, const char * string);
|
||||
const char * _DtShmBosonToString (DtShmStrtab tab, DtShmBoson boson);
|
||||
const int * _DtShmFindIntTabEntry (DtShmInttab tab, unsigned int key);
|
||||
|
||||
#endif /* DtShmDb_h */
|
||||
|
||||
@@ -1,181 +0,0 @@
|
||||
/*
|
||||
* CDE - Common Desktop Environment
|
||||
*
|
||||
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
|
||||
*
|
||||
* These libraries and programs are free software; you can
|
||||
* redistribute them and/or modify them under the terms of the GNU
|
||||
* Lesser General Public License as published by the Free Software
|
||||
* Foundation; either version 2 of the License, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* These libraries and programs are distributed in the hope that
|
||||
* they will be useful, but WITHOUT ANY WARRANTY; without even the
|
||||
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU Lesser General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with these libraries and programs; if not, write
|
||||
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
|
||||
* Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/* $XConsortium: Dts.h /main/5 1996/03/05 13:30:59 drk $ */
|
||||
/*
|
||||
* (c) Copyright 1993, 1994 Hewlett-Packard Company
|
||||
* (c) Copyright 1993, 1994 International Business Machines Corp.
|
||||
* (c) Copyright 1993, 1994 Sun Microsystems, Inc.
|
||||
* (c) Copyright 1993, 1994 Novell, Inc.
|
||||
*/
|
||||
|
||||
#ifndef _Dt_Dts_h
|
||||
#define _Dt_Dts_h
|
||||
|
||||
#include <sys/stat.h>
|
||||
#include <X11/Intrinsic.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Constants
|
||||
*/
|
||||
|
||||
#define DtDTS_DC_NAME "DATA_CRITERIA"
|
||||
#define DtDTS_NAME_PATTERN "NAME_PATTERN"
|
||||
#define DtDTS_PATH_PATTERN "PATH_PATTERN"
|
||||
#define DtDTS_CONTENT "CONTENT"
|
||||
#define DtDTS_MODE "MODE"
|
||||
#define DtDTS_LINK_PATH "LINK_PATH"
|
||||
#define DtDTS_LINK_NAME "LINK_NAME"
|
||||
#define DtDTS_DATA_ATTRIBUTES_NAME "DATA_ATTRIBUTES_NAME"
|
||||
|
||||
#define DtDTS_DT_RECURSIVE_LINK "RECURSIVE_LINK"
|
||||
#define DtDTS_DT_BROKEN_LINK "BROKEN_LINK"
|
||||
#define DtDTS_DT_UNKNOWN "UNKNOWN"
|
||||
|
||||
#define DtDTS_DA_IS_SYNTHETIC "IS_SYNTHETIC"
|
||||
#define DtDTS_DA_LABEL "LABEL"
|
||||
#define DtDTS_DA_NAME "DATA_ATTRIBUTES"
|
||||
#define DtDTS_DA_DESCRIPTION "DESCRIPTION"
|
||||
#define DtDTS_DA_DATA_HOST "DATA_HOST"
|
||||
#define DtDTS_DA_ICON "ICON"
|
||||
#define DtDTS_DA_INSTANCE_ICON "INSTANCE_ICON"
|
||||
#define DtDTS_DA_PROPERTIES "PROPERTIES"
|
||||
#define DtDTS_DA_ACTION_LIST "ACTIONS"
|
||||
#define DtDTS_DA_NAME_TEMPLATE "NAME_TEMPLATE"
|
||||
#define DtDTS_DA_MODE_TEMPLATE "MODE_TEMPLATE"
|
||||
#define DtDTS_DA_MOVE_TO_ACTION "MOVE_TO_ACTION"
|
||||
#define DtDTS_DA_COPY_TO_ACTION "COPY_TO_ACTION"
|
||||
#define DtDTS_DA_LINK_TO_ACTION "LINK_TO_ACTION"
|
||||
#define DtDTS_DA_IS_TEXT "IS_TEXT"
|
||||
#define DtDTS_DA_MEDIA "MEDIA"
|
||||
#define DtDTS_DA_MIME_TYPE "MIME_TYPE"
|
||||
#define DtDTS_DA_MIME_TO_MEDIA_FILTER "MIME_TO_MEDIA_FILTER"
|
||||
#define DtDTS_DA_MEDIA_TO_MIME_FILTER "MEDIA_TO_MIME_FILTER"
|
||||
#define DtDTS_DA_X400_TYPE "X400_TYPE"
|
||||
#define DtDTS_DA_X400_TO_MEDIA_FILTER "X400_TO_MEDIA_FILTER"
|
||||
#define DtDTS_DA_MEDIA_TO_X400_FILTER "MEDIA_TO_X400_FILTER"
|
||||
#define DtDTS_DA_IS_ACTION "IS_ACTION"
|
||||
#define DtDTS_DA_IS_EXECUTABLE "IS_EXECUTABLE"
|
||||
|
||||
#define DtDTS_DT_DIR ".DtDirDataType"
|
||||
|
||||
|
||||
/*
|
||||
* Types
|
||||
*/
|
||||
|
||||
typedef struct _DtDtsAttribute
|
||||
{
|
||||
char *name;
|
||||
char *value;
|
||||
} DtDtsAttribute;
|
||||
|
||||
|
||||
/*
|
||||
* Functions
|
||||
*/
|
||||
|
||||
extern void DtDtsLoadDataTypes(void);
|
||||
extern void DtDtsRelease(void);
|
||||
|
||||
extern char *DtDtsDataToDataType(
|
||||
const char *filepath,
|
||||
const void *buffer,
|
||||
const int size,
|
||||
const struct stat *stat_buff,
|
||||
const char *link_name,
|
||||
const struct stat *link_stat_buff,
|
||||
const char *opt_name);
|
||||
|
||||
extern char *DtDtsFileToDataType(
|
||||
const char *filepath);
|
||||
|
||||
extern char *DtDtsFileToAttributeValue(
|
||||
const char *filepath,
|
||||
const char *attr);
|
||||
|
||||
extern DtDtsAttribute **DtDtsFileToAttributeList(
|
||||
const char *filepath);
|
||||
|
||||
extern char *DtDtsBufferToDataType(
|
||||
const void *buffer,
|
||||
const int size,
|
||||
const char *opt_name);
|
||||
|
||||
extern char *DtDtsBufferToAttributeValue(
|
||||
const void *buffer,
|
||||
const int size,
|
||||
const char *attr,
|
||||
const char *opt_name);
|
||||
|
||||
extern DtDtsAttribute **DtDtsBufferToAttributeList(
|
||||
const void *buffer,
|
||||
const int size,
|
||||
const char *opt_name);
|
||||
|
||||
extern char *DtDtsDataTypeToAttributeValue(
|
||||
const char *datatype,
|
||||
const char *attr,
|
||||
const char *opt_name);
|
||||
|
||||
extern DtDtsAttribute **DtDtsDataTypeToAttributeList(
|
||||
const char *datatype,
|
||||
const char *opt_name);
|
||||
|
||||
extern void DtDtsFreeDataTypeNames(
|
||||
char **namelist);
|
||||
|
||||
extern void DtDtsFreeAttributeList(
|
||||
DtDtsAttribute **attr_list);
|
||||
|
||||
extern void DtDtsFreeAttributeValue(
|
||||
char *attr_value);
|
||||
|
||||
extern void DtDtsFreeDataType(
|
||||
char *datatype);
|
||||
|
||||
extern char **DtDtsDataTypeNames(void);
|
||||
|
||||
extern char **DtDtsFindAttribute(
|
||||
const char *name,
|
||||
const char *value);
|
||||
|
||||
extern char *DtDtsSetDataType(
|
||||
const char *filepath,
|
||||
const char *datatype,
|
||||
const int override);
|
||||
|
||||
extern int DtDtsDataTypeIsAction(
|
||||
const char *datatype);
|
||||
|
||||
extern Boolean DtDtsIsTrue(
|
||||
const char *str);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _Dt_Dts_h */
|
||||
@@ -1,154 +0,0 @@
|
||||
/*
|
||||
* CDE - Common Desktop Environment
|
||||
*
|
||||
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
|
||||
*
|
||||
* These libraries and programs are free software; you can
|
||||
* redistribute them and/or modify them under the terms of the GNU
|
||||
* Lesser General Public License as published by the Free Software
|
||||
* Foundation; either version 2 of the License, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* These libraries and programs are distributed in the hope that
|
||||
* they will be useful, but WITHOUT ANY WARRANTY; without even the
|
||||
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU Lesser General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with these libraries and programs; if not, write
|
||||
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
|
||||
* Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/*
|
||||
* (c) Copyright 1993, 1994 Hewlett-Packard Company *
|
||||
* (c) Copyright 1993, 1994 International Business Machines Corp. *
|
||||
* (c) Copyright 1993, 1994 Sun Microsystems, Inc. *
|
||||
* (c) Copyright 1993, 1994 Novell, Inc. *
|
||||
*/
|
||||
/*
|
||||
*+SNOTICE
|
||||
*
|
||||
* $XConsortium: DtsDb.h /main/5 1996/08/28 14:32:17 rswiston $
|
||||
*
|
||||
* RESTRICTED CONFIDENTIAL INFORMATION:
|
||||
*
|
||||
* The information in this document is subject to special
|
||||
* restrictions in a confidential disclosure agreement bertween
|
||||
* HP, IBM, Sun, USL, SCO and Univel. Do not distribute this
|
||||
* document outside HP, IBM, Sun, USL, SCO, or Univel wihtout
|
||||
* Sun's specific written approval. This documment and all copies
|
||||
* and derivative works thereof must be returned or destroyed at
|
||||
* Sun's request.
|
||||
*
|
||||
* Copyright 1993 Sun Microsystems, Inc. All rights reserved.
|
||||
*
|
||||
*+ENOTICE
|
||||
*/
|
||||
#ifndef DT_DTS_DB_H
|
||||
#define DT_DTS_DB_H
|
||||
|
||||
#include <X11/Xresource.h>
|
||||
#include <Dt/DbReader.h>
|
||||
|
||||
typedef int OtBoolean;
|
||||
|
||||
/* typedefs for casting comparison functions if needed */
|
||||
typedef int (*_DtDtsDbFieldCompare)(DtDtsDbField **fld1, DtDtsDbField **fld2);
|
||||
|
||||
/* entry of a list of attribute/pairs */
|
||||
typedef struct
|
||||
{
|
||||
XrmQuark recordName;
|
||||
_DtDtsDbFieldCompare compare;
|
||||
long pathId;
|
||||
int seq;
|
||||
int fieldCount;
|
||||
DtDtsDbField **fieldList;
|
||||
} DtDtsDbRecord;
|
||||
|
||||
/* typedefs for casting record comparison functions if needed */
|
||||
typedef int (*_DtDtsDbRecordCompare)(DtDtsDbRecord **rec1, DtDtsDbRecord **rec2);
|
||||
|
||||
/* a "database" of a collection of entrys (i.e. OBJECT-TYPE, ACTION, FILE-TYPE
|
||||
This is a private Structure to the DtDtsDb component.
|
||||
*/
|
||||
typedef struct
|
||||
{
|
||||
char *databaseName;
|
||||
_DtDtsDbRecordCompare compare;
|
||||
int recordCount;
|
||||
DtDtsDbRecord **recordList;
|
||||
unsigned long ActionSequenceNumber;
|
||||
} DtDtsDbDatabase;
|
||||
|
||||
/* for the mmaped database this the use_in_memory_db variable is used
|
||||
to call the old API while the database is being built and is set to
|
||||
false when the mmaped versions are being accessed.
|
||||
*/
|
||||
|
||||
extern int use_in_memory_db;
|
||||
|
||||
/*
|
||||
* adds a new database to the list of databases -- returns a pointer to the
|
||||
* new database. If a database of the given name already exists it returns
|
||||
* a pointer to that database.
|
||||
*/
|
||||
extern DtDtsDbDatabase *_DtDtsDbAddDatabase( char *dbname );
|
||||
|
||||
/* returns the handle for the database where name is the Database name */
|
||||
extern DtDtsDbDatabase *_DtDtsDbGet(char *name);
|
||||
extern char **_DtDtsDbListDb(void);
|
||||
|
||||
/* Record Sort function:
|
||||
* sorts the specified database, usually obtained from _DtDtsDbGet(), in the
|
||||
* order specified by the comparison function. If (*compare) == 0 then
|
||||
* _DtDtsDbCompareRecordNames() is used as the (*compare) function.
|
||||
*/
|
||||
extern void _DtDtsDbRecordSort(DtDtsDbDatabase *database,
|
||||
_DtDtsDbRecordCompare compare);
|
||||
/* Field Sort function:
|
||||
* sorts the specified Record in the order specified by the comparison function
|
||||
* If (*compare) == 0 then _DtDtsDbCompareFieldNames() is used as the
|
||||
* (*compare) function.
|
||||
*/
|
||||
extern void _DtDtsDbFieldSort(DtDtsDbRecord *record,
|
||||
_DtDtsDbFieldCompare compare);
|
||||
|
||||
/* Name Comparison functions:
|
||||
* These routines can be passed in to the corresponding sort function to
|
||||
* sort by name.
|
||||
*
|
||||
*/
|
||||
extern int _DtDtsDbCompareRecordNames(DtDtsDbRecord **entry1, DtDtsDbRecord **entry2);
|
||||
extern int _DtDtsDbCompareFieldNames(DtDtsDbField **entry1, DtDtsDbField **entry2);
|
||||
|
||||
/* retrieves the Record that matches the specified entry from the record */
|
||||
extern DtDtsDbField *_DtDtsDbGetField(DtDtsDbRecord *record,
|
||||
char *value);
|
||||
|
||||
/* retrieves the entry of the specified entry from the specified database */
|
||||
extern DtDtsDbRecord *_DtDtsDbGetRecord(DtDtsDbDatabase *database,
|
||||
DtDtsDbRecord *value);
|
||||
|
||||
/* Get By Name functions:
|
||||
* retrieves the entry of the specified name from the specified database
|
||||
* ** IF ** the _DtDtsDb*Sort routine has been called with the corresponding
|
||||
* _DtDtsDbCompare*Name comparison function. Otherwise use the standard
|
||||
* _DtDtsDbGet* functions.
|
||||
*/
|
||||
extern char *_DtDtsDbGetFieldByName(DtDtsDbRecord *record, char *name);
|
||||
extern DtDtsDbRecord *_DtDtsDbGetRecordByName(DtDtsDbDatabase *database, char *name);
|
||||
|
||||
extern DtDtsDbRecord *_DtDtsDbAddRecord(DtDtsDbDatabase *db);
|
||||
|
||||
extern DtDtsDbField *_DtDtsDbAddField(DtDtsDbRecord *rec);
|
||||
|
||||
extern int _DtDtsDbDeleteDb(DtDtsDbDatabase *db);
|
||||
extern int _DtDtsDbDeleteRecord(DtDtsDbRecord *rec, DtDtsDbDatabase *db);
|
||||
extern int _DtDtsDbDeleteRecords(DtDtsDbDatabase *db);
|
||||
extern int _DtDtsDbDeleteField(DtDtsDbField *fld, DtDtsDbRecord *rec);
|
||||
extern int _DtDtsDbDeleteFields(DtDtsDbRecord *rec);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,174 +0,0 @@
|
||||
/*
|
||||
* CDE - Common Desktop Environment
|
||||
*
|
||||
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
|
||||
*
|
||||
* These libraries and programs are free software; you can
|
||||
* redistribute them and/or modify them under the terms of the GNU
|
||||
* Lesser General Public License as published by the Free Software
|
||||
* Foundation; either version 2 of the License, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* These libraries and programs are distributed in the hope that
|
||||
* they will be useful, but WITHOUT ANY WARRANTY; without even the
|
||||
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU Lesser General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with these libraries and programs; if not, write
|
||||
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
|
||||
* Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/* $XConsortium: DtsMM.h /main/8 1996/08/28 14:27:26 rswiston $ */
|
||||
/*
|
||||
*
|
||||
* RESTRICTED CONFIDENTIAL INFORMATION:
|
||||
*
|
||||
*
|
||||
* Copyright 1993 Sun Microsystems, Inc. All rights reserved.
|
||||
*
|
||||
*+ENOTICE
|
||||
*/
|
||||
#ifndef DT_DTS_MM_H
|
||||
#define DT_DTS_MM_H
|
||||
|
||||
#include <stdio.h>
|
||||
#include <Dt/DtShmDb.h>
|
||||
#include <X11/Intrinsic.h>
|
||||
#include "Dt/DbReader.h"
|
||||
|
||||
#define DTDTSDB_TMPDATABASENAME "%s/.dt/.tmp_dt_db_cache.%s\0"
|
||||
#define DTDTSDB_DATABASENAME "%s/.dt/.dt_db_cache.%s\0"
|
||||
#define _DTDTSMMTEMPFILE "dtdbcache_"
|
||||
|
||||
/*
|
||||
* NOTE: _DTDTSMMTEMPDIR affects the location of the dtdbcache
|
||||
* file, and therefore affects the Xsession.src, Xreset.src, and
|
||||
* Xstartup.src scripts in dtlogin/config.
|
||||
*/
|
||||
#define _DTDTSMMTEMPDIR "/tmp"
|
||||
|
||||
typedef int DtDtsMMSeqNo; /* the order it occures in db */
|
||||
typedef int DtDtsMMFieldCount; /* number of fields in record */
|
||||
typedef int DtDtsMMRecordCount; /* number of records in field */
|
||||
typedef int DtDtsMMDataBaseCount; /* how many databases */
|
||||
typedef int DtDtsMMFieldStart; /* index in table where field list starts */
|
||||
typedef int DtDtsMMRecordStart; /* index in table where record list starts */
|
||||
typedef int DtDtsMMDataBaseStart; /* index in table where database list starts */
|
||||
typedef int DtDtsMMIndexOffset;
|
||||
typedef int DtDtsMMNameIndex;
|
||||
typedef int DtDtsMMPathHash;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
DtDtsMMPathHash pathhash; /* hash of dir. we visit */
|
||||
DtDtsMMDataBaseCount num_db; /* number of databases */
|
||||
DtDtsMMDataBaseStart db_offset; /* index to databases */
|
||||
DtDtsMMNameIndex name_list_offset; /* index to name list */
|
||||
DtDtsMMNameIndex no_name_offset; /* index to nonunique names */
|
||||
DtDtsMMNameIndex buffer_start_index; /* index to list of buffers */
|
||||
DtDtsMMIndexOffset str_tbl_offset; /* index to table of strings */
|
||||
DtDtsMMIndexOffset files_count; /* number of loaded files */
|
||||
DtDtsMMIndexOffset files_offset; /* index to list of loaded files */
|
||||
DtDtsMMIndexOffset mtimes_offset; /* index to modified times of files */
|
||||
} DtDtsMMHeader;
|
||||
|
||||
/* one set of attribute/pair */
|
||||
typedef struct
|
||||
{
|
||||
DtShmBoson fieldName; /* name of attribute */
|
||||
DtShmBoson fieldValue; /* value of attribute */
|
||||
} DtDtsMMField;
|
||||
|
||||
/* typedefs for casting comparison functions if needed */
|
||||
typedef int (*_DtDtsMMFieldCompare)(DtDtsMMField *fld1, DtDtsMMField *fld2);
|
||||
|
||||
/* entry of a list of attribute/pairs */
|
||||
typedef struct
|
||||
{
|
||||
DtShmBoson recordName; /* name of this entry */
|
||||
DtShmBoson pathId; /* file entry is located in */
|
||||
DtDtsMMSeqNo seq; /* sequence this got loaded */
|
||||
DtDtsMMFieldCount fieldCount; /* number of fields in record */
|
||||
DtDtsMMFieldStart fieldList; /* index to field table */
|
||||
} DtDtsMMRecord;
|
||||
|
||||
/* typedefs for casting record comparison functions if needed */
|
||||
typedef int (*_DtDtsMMRecordCompare)(DtDtsMMRecord *rec1, DtDtsMMRecord *rec2);
|
||||
|
||||
/* a "database" of a collection of entrys (i.e. OBJECT-TYPE, ACTION, FILE-TYPE
|
||||
This is a private Structure to the DtDtsMM component.
|
||||
*/
|
||||
typedef struct
|
||||
{
|
||||
DtShmBoson databaseName; /* name of database */
|
||||
DtDtsMMIndexOffset nameIndex; /* index for DataCriteria quick find */
|
||||
DtDtsMMRecordCount recordCount; /* number of records */
|
||||
DtDtsMMRecordStart recordList; /* index to records table */
|
||||
} DtDtsMMDatabase;
|
||||
|
||||
|
||||
/* Db Internal pointers */
|
||||
int * _DtDtsMMGetDCNameIndex(int *size);
|
||||
int * _DtDtsMMGetBufferIndex(int *size);
|
||||
int * _DtDtsMMGetNoNameIndex(int *size);
|
||||
void * _DtDtsMMGetPtr(int index);
|
||||
DtShmInttab _DtDtsMMGetFileList(void);
|
||||
int _DtDtsMMGetPtrSize(int index);
|
||||
int _DtDtsMMInit(int);
|
||||
void _DtDtsMMPrint(FILE *org_fd);
|
||||
int _DtDtsMMCreateDb(DtDirPaths *dirs, const char *CacheFile, int override);
|
||||
int _DtDtsMMCreateFile(DtDirPaths *dirs, const char *CacheFile);
|
||||
char * _DtDtsMMCacheName(int);
|
||||
int _DtDtsMMapDB(const char *CacheFile);
|
||||
|
||||
const char * _DtDtsMMBosonToString(DtShmBoson boson);
|
||||
DtShmBoson _DtDtsMMStringToBoson(const char *string);
|
||||
|
||||
extern int use_in_memory_db;
|
||||
|
||||
|
||||
/* returns the handle for the database where name is the Database name */
|
||||
extern DtDtsMMDatabase *_DtDtsMMGet(const char *name);
|
||||
extern char **_DtDtsMMListDb(void);
|
||||
|
||||
/* FIXME: document */
|
||||
extern int *_DtDtsMMGetDbName(DtDtsMMDatabase *db, DtShmBoson boson);
|
||||
|
||||
|
||||
/* Name Comparison functions:
|
||||
* These routines can be passed in to the corresponding sort function to
|
||||
* sort by name.
|
||||
*
|
||||
*/
|
||||
extern int _DtDtsMMCompareRecordNames(DtDtsMMRecord *entry1, DtDtsMMRecord *entry2);
|
||||
extern int _DtDtsMMCompareFieldNames(DtDtsMMField *entry1, DtDtsMMField *entry2);
|
||||
|
||||
/* retrieves the Record that matches the specified entry from the record */
|
||||
extern DtDtsMMField *_DtDtsMMGetField(DtDtsMMRecord *record,
|
||||
const char *value);
|
||||
extern const char *_DtDtsMMGetFieldByName(DtDtsMMRecord *rec, const char *name);
|
||||
|
||||
/* retrieves the entry of the specified entry from the specified database */
|
||||
extern DtDtsMMRecord *_DtDtsMMGetRecord(DtDtsMMDatabase *database,
|
||||
DtDtsMMRecord *value);
|
||||
extern DtDtsMMRecord *_DtDtsMMGetRecordByName(DtDtsMMDatabase *database,
|
||||
const char *value);
|
||||
|
||||
/* Get By Name functions:
|
||||
* retrieves the entry of the specified name from the specified database
|
||||
* ** IF ** the _DtDtsMM*Sort routine has been called with the corresponding
|
||||
* _DtDtsMMCompare*Name comparison function. Otherwise use the standard
|
||||
* _DtDtsMMGet* functions.
|
||||
*/
|
||||
|
||||
|
||||
char * _DtDtsMMExpandValue(const char *value);
|
||||
void _DtDtsMMSafeFree(char *value);
|
||||
int _DtDtsMMIsMemory(const char *value);
|
||||
|
||||
extern DtShmBoson _DtDtsMMNameStringToBoson(const char *string);
|
||||
|
||||
|
||||
#endif /* DT_DTS_MM_H */
|
||||
@@ -1,78 +0,0 @@
|
||||
/*
|
||||
* CDE - Common Desktop Environment
|
||||
*
|
||||
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
|
||||
*
|
||||
* These libraries and programs are free software; you can
|
||||
* redistribute them and/or modify them under the terms of the GNU
|
||||
* Lesser General Public License as published by the Free Software
|
||||
* Foundation; either version 2 of the License, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* These libraries and programs are distributed in the hope that
|
||||
* they will be useful, but WITHOUT ANY WARRANTY; without even the
|
||||
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU Lesser General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with these libraries and programs; if not, write
|
||||
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
|
||||
* Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/*****************************************************************************
|
||||
*
|
||||
* File: Qualify.h
|
||||
* RCS: $XConsortium: Qualify.h /main/3 1995/10/26 15:10:03 rswiston $
|
||||
* Description: Public header file for the Qualify routine
|
||||
* Project: DT Runtime Library
|
||||
* Language: C
|
||||
* Package: N/A
|
||||
*
|
||||
* (c) Copyright 1993 by Hewlett-Packard Company
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
/*********************************************************************
|
||||
* _DtQualifyWithFirst
|
||||
*
|
||||
* takes: an unqualified filename like foo.txt, and
|
||||
* a colon-separated list of pathnames, such as
|
||||
* /etc/dt:/usr/dt/config
|
||||
*
|
||||
* returns: a fully qualified filename. Space for the filename
|
||||
* has been allocated off the heap using malloc. It is
|
||||
* the responsibility of the calling function to dispose
|
||||
* of the space using free.
|
||||
*
|
||||
* example: ...
|
||||
* char * filename;
|
||||
* ...
|
||||
* filename = _DtQualifyWithFirst("configFile",
|
||||
* "/foo/first/location:/foo/second/choice");
|
||||
* < use filename >
|
||||
* free(filename);
|
||||
*
|
||||
**********************************************************************/
|
||||
|
||||
#ifndef _Dt_Qualify_h
|
||||
#define _Dt_Qualify_h
|
||||
|
||||
|
||||
# ifdef __cplusplus
|
||||
extern "C" {
|
||||
# endif
|
||||
|
||||
extern char * _DtQualifyWithFirst
|
||||
(
|
||||
char *, /* file to locate */
|
||||
char * /* list of colon-separated paths in which to look */
|
||||
);
|
||||
|
||||
# ifdef __cplusplus
|
||||
}
|
||||
# endif
|
||||
|
||||
#endif /* _Dt_Qualify_h */
|
||||
|
||||
/* DON'T ADD ANYTHING AFTER THIS #endif */
|
||||
@@ -1,52 +0,0 @@
|
||||
/*
|
||||
* CDE - Common Desktop Environment
|
||||
*
|
||||
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
|
||||
*
|
||||
* These libraries and programs are free software; you can
|
||||
* redistribute them and/or modify them under the terms of the GNU
|
||||
* Lesser General Public License as published by the Free Software
|
||||
* Foundation; either version 2 of the License, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* These libraries and programs are distributed in the hope that
|
||||
* they will be useful, but WITHOUT ANY WARRANTY; without even the
|
||||
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU Lesser General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with these libraries and programs; if not, write
|
||||
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
|
||||
* Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/* $XConsortium: Saver.h /main/3 1995/10/26 15:10:29 rswiston $ */
|
||||
/*
|
||||
* (c) Copyright 1993, 1994 Hewlett-Packard Company
|
||||
* (c) Copyright 1993, 1994 International Business Machines Corp.
|
||||
* (c) Copyright 1993, 1994 Sun Microsystems, Inc.
|
||||
* (c) Copyright 1993, 1994 Novell, Inc.
|
||||
*/
|
||||
|
||||
#ifndef _dtsaver_h
|
||||
#define _dtsaver_h
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Functions
|
||||
*/
|
||||
|
||||
extern Boolean DtSaverGetWindows(
|
||||
Display *display,
|
||||
Window **window,
|
||||
int *count);
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* Close scope of 'extern "C"' declaration which encloses file. */
|
||||
#endif
|
||||
|
||||
#endif /*_dtsaver_h*/
|
||||
/* DON'T ADD ANYTHING AFTER THIS #endif */
|
||||
@@ -1,112 +0,0 @@
|
||||
/*
|
||||
* CDE - Common Desktop Environment
|
||||
*
|
||||
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
|
||||
*
|
||||
* These libraries and programs are free software; you can
|
||||
* redistribute them and/or modify them under the terms of the GNU
|
||||
* Lesser General Public License as published by the Free Software
|
||||
* Foundation; either version 2 of the License, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* These libraries and programs are distributed in the hope that
|
||||
* they will be useful, but WITHOUT ANY WARRANTY; without even the
|
||||
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU Lesser General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with these libraries and programs; if not, write
|
||||
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
|
||||
* Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/* $XConsortium: SaverP.h /main/4 1995/10/26 15:10:42 rswiston $ */
|
||||
/* *
|
||||
* (c) Copyright 1993, 1994 Hewlett-Packard Company *
|
||||
* (c) Copyright 1993, 1994 International Business Machines Corp. *
|
||||
* (c) Copyright 1993, 1994 Sun Microsystems, Inc. *
|
||||
* (c) Copyright 1993, 1994 Novell, Inc. *
|
||||
*/
|
||||
/************************************<+>*************************************
|
||||
****************************************************************************
|
||||
**
|
||||
** File: Saver.h
|
||||
**
|
||||
** Description
|
||||
** -----------
|
||||
** Variables and declarations needed for
|
||||
** managing external screen savers
|
||||
**
|
||||
****************************************************************************
|
||||
************************************<+>*************************************/
|
||||
#ifndef _dtsaverp_h
|
||||
#define _dtsaverp_h
|
||||
|
||||
/*************************************<->*************************************
|
||||
*
|
||||
* _DtSaverStart()
|
||||
*
|
||||
*
|
||||
* Description:
|
||||
* -----------
|
||||
* Store provided array of windows on root window property
|
||||
* _DT_SAVER_WINDOWS and launch specified screen saver. Screen savers
|
||||
* will attempt to use these windows as drawables.
|
||||
*
|
||||
* Inputs:
|
||||
* ------
|
||||
* display - display structure
|
||||
* drawArea - array of widgets to be drawn upon by screen saver
|
||||
* count - number of elements in drawArea array
|
||||
* saverAction - screen saver action to invoke
|
||||
* wAction - action UI widget
|
||||
*
|
||||
* Outputs:
|
||||
* -------
|
||||
*
|
||||
* Return:
|
||||
* -------
|
||||
* state - pointer to opaque state structure
|
||||
*
|
||||
* Comments:
|
||||
* --------
|
||||
* This function uses _DtActionInvoke() to launch an action. As a result,
|
||||
* the caller is responsible for loading and maintaining the action database
|
||||
* using the DtDbLoad() function and procedures. The caller
|
||||
* must call _DtSaverStop() to terminate screen saver
|
||||
*
|
||||
*************************************<->***********************************/
|
||||
|
||||
extern void * _DtSaverStart(Display *, Widget *, int, char *, Widget);
|
||||
|
||||
/*************************************<->*************************************
|
||||
*
|
||||
* _DtSaverStop()
|
||||
*
|
||||
*
|
||||
* Description:
|
||||
* -----------
|
||||
* Stop an external screen saver started with DtStartSaver(). Deletes
|
||||
* _DT_SAVER_WINDOWS property from root window.
|
||||
*
|
||||
* Inputs:
|
||||
* ------
|
||||
* display - display structure
|
||||
* state - state returned from _DtSaverStart()
|
||||
*
|
||||
* Outputs:
|
||||
* -------
|
||||
*
|
||||
* Return:
|
||||
* -------
|
||||
*
|
||||
* Comments:
|
||||
* --------
|
||||
*
|
||||
*************************************<->***********************************/
|
||||
|
||||
extern void _DtSaverStop(Display *, void *);
|
||||
|
||||
|
||||
#endif /*_dtsaverp_h*/
|
||||
/* DON'T ADD ANYTHING AFTER THIS #endif */
|
||||
@@ -1,59 +0,0 @@
|
||||
/*
|
||||
* CDE - Common Desktop Environment
|
||||
*
|
||||
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
|
||||
*
|
||||
* These libraries and programs are free software; you can
|
||||
* redistribute them and/or modify them under the terms of the GNU
|
||||
* Lesser General Public License as published by the Free Software
|
||||
* Foundation; either version 2 of the License, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* These libraries and programs are distributed in the hope that
|
||||
* they will be useful, but WITHOUT ANY WARRANTY; without even the
|
||||
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU Lesser General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with these libraries and programs; if not, write
|
||||
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
|
||||
* Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/* $XConsortium: Session.h /main/3 1995/10/26 15:10:56 rswiston $ */
|
||||
/*
|
||||
* (c) Copyright 1993, 1994 Hewlett-Packard Company
|
||||
* (c) Copyright 1993, 1994 International Business Machines Corp.
|
||||
* (c) Copyright 1993, 1994 Sun Microsystems, Inc.
|
||||
* (c) Copyright 1993, 1994 Novell, Inc.
|
||||
*/
|
||||
|
||||
#ifndef _Dt_Session_h
|
||||
#define _Dt_Session_h
|
||||
|
||||
#include <X11/Intrinsic.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
* Functions
|
||||
*/
|
||||
|
||||
extern Boolean DtSessionSavePath(
|
||||
Widget widget,
|
||||
char **save_path,
|
||||
char **save_file);
|
||||
|
||||
extern Boolean DtSessionRestorePath(
|
||||
Widget widget,
|
||||
char **restore_path,
|
||||
char *restore_file);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _Dt_Session_h */
|
||||
@@ -1,250 +0,0 @@
|
||||
/*
|
||||
* CDE - Common Desktop Environment
|
||||
*
|
||||
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
|
||||
*
|
||||
* These libraries and programs are free software; you can
|
||||
* redistribute them and/or modify them under the terms of the GNU
|
||||
* Lesser General Public License as published by the Free Software
|
||||
* Foundation; either version 2 of the License, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* These libraries and programs are distributed in the hope that
|
||||
* they will be useful, but WITHOUT ANY WARRANTY; without even the
|
||||
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU Lesser General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with these libraries and programs; if not, write
|
||||
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
|
||||
* Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/* $TOG: SessionM.h /main/8 1998/07/30 12:10:49 mgreess $ */
|
||||
/*
|
||||
* (c) Copyright 1996 Digital Equipment Corporation.
|
||||
* (c) Copyright 1993, 1994, 1996 Hewlett-Packard Company
|
||||
* (c) Copyright 1993, 1994, 1996 International Business Machines Corp.
|
||||
* (c) Copyright 1993, 1994, 1996 Sun Microsystems, Inc.
|
||||
* (c) Copyright 1993, 1994, 1996 Novell, Inc.
|
||||
* (c) Copyright 1996 FUJITSU LIMITED.
|
||||
* (c) Copyright 1996 Hitachi.
|
||||
*/
|
||||
/*************************************<+>*************************************
|
||||
*****************************************************************************
|
||||
**
|
||||
** File: SessionM.h
|
||||
**
|
||||
** Description:
|
||||
** -----------
|
||||
** Contains all variables needed for SM messaging. All messages serviced,
|
||||
** and the tool class name for the session manager
|
||||
**
|
||||
**
|
||||
**
|
||||
*******************************************************************
|
||||
** (c) Copyright Hewlett-Packard Company, 1990. All rights are
|
||||
** reserved. Copying or other reproduction of this program
|
||||
** except for archival purposes is prohibited without prior
|
||||
** written consent of Hewlett-Packard Company.
|
||||
********************************************************************
|
||||
**
|
||||
**
|
||||
*****************************************************************************
|
||||
*************************************<+>*************************************/
|
||||
#ifndef _SessionM_h
|
||||
#define _SessionM_h
|
||||
|
||||
/*
|
||||
* Include files
|
||||
*/
|
||||
/* If <X11/Intrinsic.h> is included along with this file, <X11/Intrinsic.h>
|
||||
MUST be included first due to "typedef Boolean ..." problems. The following
|
||||
conditional #define is also part of the solution to this problem. */
|
||||
#include <X11/X.h>
|
||||
#include <X11/Intrinsic.h>
|
||||
|
||||
/*
|
||||
* Tool class for the session manager
|
||||
*/
|
||||
#define DtSM_TOOL_CLASS "SESSIONMGR"
|
||||
|
||||
/*
|
||||
* SM_STARTUP_CHANGE an SM_STATE parameters
|
||||
*/
|
||||
#define DtSM_VERBOSE_MODE 1
|
||||
#define DtSM_QUIET_MODE 2
|
||||
#define DtSM_ASK_STATE 0
|
||||
#define DtSM_HOME_STATE 3
|
||||
#define DtSM_CURRENT_STATE 4
|
||||
|
||||
|
||||
/*
|
||||
* Atoms for session manager/style manager communication
|
||||
*/
|
||||
#define _XA_DT_SM_STM_PROTOCOL "_DT_SM_STM_PROTOCOL"
|
||||
#define _XA_DT_SM_SAVE_TO_HOME "_DT_SM_SAVE_TO_HOME"
|
||||
#define _XA_DT_SM_STATE_CHANGE "_DT_SM_STATE_CHANGE"
|
||||
#define _XA_DT_SM_RESTORE_DEFAULT "_DT_SM_RESTORE_DEFAULT"
|
||||
#define _XA_DT_SM_PREFERENCES "_DT_SM_PREFERENCES"
|
||||
|
||||
/*
|
||||
* Atoms for lock changes
|
||||
*/
|
||||
#define _XA_DT_SM_LOCK_CHANGE "_DT_SM_LOCK_CHANGE"
|
||||
#define CoverScreenMask (1L<<0)
|
||||
#define LockOnTimeoutMask (1L<<1)
|
||||
|
||||
/*
|
||||
* Parameters to be sent into session manager
|
||||
*/
|
||||
|
||||
/*
|
||||
* Atoms for communicating configuration changes and state
|
||||
*/
|
||||
/*
|
||||
* Defines needed for getting/setting the sm window property on the root
|
||||
*/
|
||||
#define PROP_DT_SM_WINDOW_INFO_ELEMENTS 2
|
||||
#define _XA_DT_SM_WINDOW_INFO "_DT_SM_WINDOW_INFO"
|
||||
|
||||
/*
|
||||
* Defines needed for getting the session manager state off it's window
|
||||
*/
|
||||
#define PROP_DT_SM_STATE_INFO_ELEMENTS 13
|
||||
#define _XA_DT_SM_STATE_INFO "_DT_SM_STATE_INFO"
|
||||
|
||||
/*
|
||||
* Defines needed for the screen saver list property.
|
||||
*/
|
||||
#define _XA_DT_SM_SAVER_INFO "_DT_SM_SAVER_INFO"
|
||||
|
||||
/*
|
||||
* Defines needed for the screen saver property
|
||||
*/
|
||||
#define PROP_DT_SM_SCREEN_INFO_ELEMENTS 5
|
||||
#define _XA_DT_SM_SCREEN_INFO "_DT_SM_SCREEN_INFO"
|
||||
|
||||
/*
|
||||
* Defines needed for the audio property
|
||||
*/
|
||||
#define PROP_DT_SM_AUDIO_INFO_ELEMENTS 4
|
||||
#define _XA_DT_SM_AUDIO_INFO "_DT_SM_AUDIO_INFO"
|
||||
|
||||
/*
|
||||
* Defines needed for the keyboard property
|
||||
*/
|
||||
#define PROP_DT_SM_KEYBOARD_INFO_ELEMENTS 3
|
||||
#define _XA_DT_SM_KEYBOARD_INFO "_DT_SM_KEYBOARD_INFO"
|
||||
|
||||
/*
|
||||
* Define needed for the font info property
|
||||
*/
|
||||
#define _XA_DT_SM_FONT_INFO "_DT_SM_FONT_INFO"
|
||||
|
||||
/*
|
||||
* Define needed for the font info property
|
||||
*/
|
||||
#define _XA_DT_SM_POINTER_INFO "_DT_SM_POINTER_INFO"
|
||||
|
||||
/*
|
||||
* Define needed for the preeditType info property
|
||||
*/
|
||||
#define _XA_DT_SM_PREEDIT_INFO "_DT_SM_PREEDIT_INFO"
|
||||
|
||||
/* bit definitions for SmStateInfo.flags */
|
||||
#define SM_STATE_NONE 0
|
||||
#define SM_STATE_START (1L << 0)
|
||||
#define SM_STATE_CONFIRM (1L << 1)
|
||||
#define SM_STATE_COMPAT (1L << 2)
|
||||
#define SM_STATE_SEND (1L << 3)
|
||||
#define SM_STATE_COVER (1L << 4) /* Obsolete */
|
||||
#define SM_STATE_LOTOUT (1L << 5) /* Obsolete */
|
||||
#define SM_STATE_LOTOUTSTAT (1L << 6)
|
||||
|
||||
#define SM_STATE_CYCLETIMEOUT (1L << 7)
|
||||
#define SM_STATE_LOCKTIMEOUT (1L << 8)
|
||||
#define SM_STATE_SAVERTIMEOUT (1L << 9)
|
||||
#define SM_STATE_RANDOM (1L << 10)
|
||||
#define SM_STATE_DISP_SESSION (1L << 11)
|
||||
|
||||
|
||||
#define SM_STATE_ALL (SM_STATE_START | SM_STATE_CONFIRM |\
|
||||
SM_STATE_COMPAT | SM_STATE_SEND |\
|
||||
SM_STATE_COVER | SM_STATE_LOTOUT |\
|
||||
SM_STATE_LOTOUTSTAT | SM_STATE_CYCLETIMEOUT |\
|
||||
SM_STATE_LOCKTIMEOUT | SM_STATE_SAVERTIMEOUT |\
|
||||
SM_STATE_RANDOM | SM_STATE_DISP_SESSION)
|
||||
|
||||
|
||||
/*
|
||||
* typedef statements for structures to be returned
|
||||
*/
|
||||
typedef struct
|
||||
{
|
||||
int flags;
|
||||
int smStartState;
|
||||
int smConfirmMode;
|
||||
Boolean smCompatMode;
|
||||
Boolean smSendSettings;
|
||||
Boolean smCoverScreen; /* Obsolete */
|
||||
Boolean smLockOnTimeout; /* Obsolete */
|
||||
Boolean smLockOnTimeoutStatus;
|
||||
int smCycleTimeout;
|
||||
int smLockTimeout;
|
||||
int smSaverTimeout;
|
||||
Boolean smRandom;
|
||||
Boolean smDisplaySpecific; /* If True, the currently running
|
||||
session is for a specific display */
|
||||
|
||||
} SmStateInfo;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
char *saverList;
|
||||
} SmSaverInfo;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
int flags;
|
||||
int smTimeout;
|
||||
int smInterval;
|
||||
int smPreferBlank;
|
||||
int smAllowExp;
|
||||
} SmScreenInfo;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
int flags;
|
||||
int smBellPercent;
|
||||
unsigned int smBellPitch;
|
||||
unsigned int smBellDuration;
|
||||
} SmAudioInfo;
|
||||
|
||||
|
||||
typedef struct
|
||||
{
|
||||
int flags;
|
||||
int smKeyClickPercent;
|
||||
int smGlobalAutoRepeat;
|
||||
} SmKeyboardInfo;
|
||||
|
||||
/*
|
||||
* Function definitions
|
||||
*/
|
||||
extern Status _DtGetSmWindow(Display *, Window, Window *) ;
|
||||
extern Status _DtGetSmState(Display *, Window, SmStateInfo *);
|
||||
extern Status _DtSetSmState(Display *, Window, SmStateInfo *);
|
||||
extern Status _DtGetSmSaver(Display *, Window, SmSaverInfo *);
|
||||
extern void _DtSetSmSaver(Display *, Window, SmSaverInfo *);
|
||||
extern Status _DtGetSmScreen(Display *, Window, Atom, SmScreenInfo *);
|
||||
extern Status _DtGetSmAudio(Display *, Window, Atom, SmAudioInfo *);
|
||||
extern Status _DtGetSmKeyboard(Display *, Window, Atom, SmKeyboardInfo *);
|
||||
extern Status _DtGetSmFont(Display *, Window, Atom, char **);
|
||||
extern Status _DtGetSmPointer(Display *, Window, Atom, char **);
|
||||
extern Status _DtGetSmPreedit(Display *, Window, Atom, char **);
|
||||
|
||||
#endif /* _SessionM_h */
|
||||
|
||||
|
||||
|
||||
@@ -1,130 +0,0 @@
|
||||
/*
|
||||
* CDE - Common Desktop Environment
|
||||
*
|
||||
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
|
||||
*
|
||||
* These libraries and programs are free software; you can
|
||||
* redistribute them and/or modify them under the terms of the GNU
|
||||
* Lesser General Public License as published by the Free Software
|
||||
* Foundation; either version 2 of the License, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* These libraries and programs are distributed in the hope that
|
||||
* they will be useful, but WITHOUT ANY WARRANTY; without even the
|
||||
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU Lesser General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with these libraries and programs; if not, write
|
||||
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
|
||||
* Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/* $TOG: SessionP.h /main/5 1998/07/30 12:11:06 mgreess $ */
|
||||
/* *
|
||||
* (c) Copyright 1993, 1994 Hewlett-Packard Company *
|
||||
* (c) Copyright 1993, 1994 International Business Machines Corp. *
|
||||
* (c) Copyright 1993, 1994 Sun Microsystems, Inc. *
|
||||
* (c) Copyright 1993, 1994 Novell, Inc. *
|
||||
*/
|
||||
/*************************************<+>*************************************
|
||||
*****************************************************************************
|
||||
**
|
||||
** File: SessionP.h
|
||||
**
|
||||
** Description: Private header for Session Management routines
|
||||
** -----------
|
||||
**
|
||||
*******************************************************************
|
||||
** (c) Copyright Hewlett-Packard Company, 1990. All rights are
|
||||
** reserved. Copying or other reproduction of this program
|
||||
** except for archival purposes is prohibited without prior
|
||||
** written consent of Hewlett-Packard Company.
|
||||
********************************************************************
|
||||
**
|
||||
**
|
||||
**
|
||||
*****************************************************************************
|
||||
*************************************<+>*************************************/
|
||||
|
||||
#ifndef _SessionP_h
|
||||
#define _SessionP_h
|
||||
|
||||
/*
|
||||
* include statements
|
||||
*/
|
||||
|
||||
/*
|
||||
* define statements
|
||||
*/
|
||||
|
||||
/*
|
||||
* typedef statements
|
||||
*/
|
||||
|
||||
/*
|
||||
* Definition for the _DT_SM_WINDOW_INFO property.
|
||||
*/
|
||||
typedef struct
|
||||
{
|
||||
unsigned long flags;
|
||||
unsigned long smWindow;
|
||||
} PropDtSmWindowInfo;
|
||||
|
||||
/*
|
||||
* Definition for the _DT_SM_STATE_INFO property
|
||||
*/
|
||||
typedef struct
|
||||
{
|
||||
unsigned long flags;
|
||||
unsigned long smStartState;
|
||||
unsigned long smConfirmMode;
|
||||
unsigned long smCompatMode;
|
||||
unsigned long smSendSettings;
|
||||
unsigned long smCoverScreen;
|
||||
unsigned long smLockOnTimeout;
|
||||
unsigned long smLockOnTimeoutStatus;
|
||||
unsigned long smCycleTimeout;
|
||||
unsigned long smLockTimeout;
|
||||
unsigned long smSaverTimeout;
|
||||
unsigned long smRandom;
|
||||
unsigned long smDisplaySpecific;
|
||||
} PropDtSmStateInfo;
|
||||
|
||||
/*
|
||||
* Definition for the _DT_SM_SCREEN_INFO property
|
||||
*/
|
||||
typedef struct
|
||||
{
|
||||
unsigned long flags;
|
||||
unsigned long smTimeout;
|
||||
unsigned long smInterval;
|
||||
unsigned long smPreferBlank;
|
||||
unsigned long smAllowExp;
|
||||
} PropDtSmScreenInfo;
|
||||
|
||||
/*
|
||||
* Definition for the _DT_SM_AUDIO_INFO property
|
||||
*/
|
||||
typedef struct
|
||||
{
|
||||
unsigned long flags;
|
||||
unsigned long smBellPercent;
|
||||
unsigned long smBellPitch;
|
||||
unsigned long smBellDuration;
|
||||
} PropDtSmAudioInfo;
|
||||
|
||||
|
||||
/*
|
||||
* Definition for the _DT_SM_KEYBOARD_INFO property
|
||||
*/
|
||||
typedef struct
|
||||
{
|
||||
unsigned long flags;
|
||||
unsigned long smKeyClickPercent;
|
||||
unsigned long smGlobalAutoRepeat;
|
||||
} PropDtSmKeyboardInfo;
|
||||
|
||||
|
||||
#endif /* _SessionP_h */
|
||||
/* Do not add anything after this endif. */
|
||||
@@ -1,189 +0,0 @@
|
||||
/*
|
||||
* CDE - Common Desktop Environment
|
||||
*
|
||||
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
|
||||
*
|
||||
* These libraries and programs are free software; you can
|
||||
* redistribute them and/or modify them under the terms of the GNU
|
||||
* Lesser General Public License as published by the Free Software
|
||||
* Foundation; either version 2 of the License, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* These libraries and programs are distributed in the hope that
|
||||
* they will be useful, but WITHOUT ANY WARRANTY; without even the
|
||||
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU Lesser General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with these libraries and programs; if not, write
|
||||
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
|
||||
* Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/* $XConsortium: Wsm.h /main/5 1996/05/20 16:08:50 drk $
|
||||
*
|
||||
* (c) Copyright 1996 Digital Equipment Corporation.
|
||||
* (c) Copyright 1993,1994,1996 Hewlett-Packard Company.
|
||||
* (c) Copyright 1993,1994,1996 International Business Machines Corp.
|
||||
* (c) Copyright 1993,1994,1996 Sun Microsystems, Inc.
|
||||
* (c) Copyright 1993,1994,1996 Novell, Inc.
|
||||
* (c) Copyright 1996 FUJITSU LIMITED.
|
||||
* (c) Copyright 1996 Hitachi.
|
||||
*/
|
||||
|
||||
#ifndef _Dt_Wsm_h
|
||||
#define _Dt_Wsm_h
|
||||
|
||||
#include <X11/Intrinsic.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
* Constants
|
||||
*/
|
||||
|
||||
#define DtWSM_REASON_ADD 0
|
||||
#define DtWSM_REASON_DELETE 1
|
||||
#define DtWSM_REASON_BACKDROP 2
|
||||
#define DtWSM_REASON_TITLE 3
|
||||
#define DtWSM_REASON_CURRENT 4
|
||||
|
||||
|
||||
/*
|
||||
* Types
|
||||
*/
|
||||
|
||||
/* Workspace property information */
|
||||
|
||||
typedef struct _DtWsmWorkspaceInfo {
|
||||
Atom workspace;
|
||||
unsigned long bg;
|
||||
unsigned long fg;
|
||||
Atom backdropName;
|
||||
int colorSetId;
|
||||
char *pchTitle;
|
||||
Window *backdropWindows;
|
||||
int numBackdropWindows;
|
||||
} DtWsmWorkspaceInfo;
|
||||
|
||||
|
||||
/* Workspace modified callback reasons */
|
||||
|
||||
typedef int DtWsmWsReason;
|
||||
|
||||
/* Workspace callback context (opaque) */
|
||||
|
||||
typedef struct _DtWsmCBContext * DtWsmCBContext;
|
||||
|
||||
/* Workspace callback prototype */
|
||||
|
||||
typedef void (*DtWsmWsChangeProc)(
|
||||
Widget widget,
|
||||
Atom aWs,
|
||||
XtPointer client_data);
|
||||
|
||||
/* Workspace modified callback prototype */
|
||||
|
||||
typedef void (*DtWsmWsModifiedProc)(
|
||||
Widget widget,
|
||||
Atom aWs,
|
||||
DtWsmWsReason reason,
|
||||
XtPointer client_data);
|
||||
|
||||
|
||||
/*
|
||||
* Functions
|
||||
*/
|
||||
|
||||
extern void DtWsmAddWorkspaceFunctions(
|
||||
Display *display,
|
||||
Window client);
|
||||
|
||||
extern void DtWsmRemoveWorkspaceFunctions(
|
||||
Display *display,
|
||||
Window client);
|
||||
|
||||
extern int DtWsmGetWorkspaceInfo(
|
||||
Display *display,
|
||||
Window root,
|
||||
Atom aWS,
|
||||
DtWsmWorkspaceInfo **ppWsInfo);
|
||||
|
||||
extern void DtWsmFreeWorkspaceInfo(
|
||||
DtWsmWorkspaceInfo *pWsInfo);
|
||||
|
||||
extern int DtWsmGetWorkspaceList(
|
||||
Display *display,
|
||||
Window root,
|
||||
Atom **ppWorkspaceList,
|
||||
int *pNumWorkspaces);
|
||||
|
||||
extern int DtWsmGetCurrentWorkspace(
|
||||
Display *display,
|
||||
Window root,
|
||||
Atom *paWorkspace);
|
||||
|
||||
extern DtWsmCBContext DtWsmAddCurrentWorkspaceCallback(
|
||||
Widget widget,
|
||||
DtWsmWsChangeProc ws_change,
|
||||
XtPointer client_data);
|
||||
|
||||
extern void DtWsmRemoveWorkspaceCallback(
|
||||
DtWsmCBContext pCbCtx);
|
||||
|
||||
extern int DtWsmSetCurrentWorkspace(
|
||||
Widget widget,
|
||||
Atom aWs);
|
||||
|
||||
extern int DtWsmGetWorkspacesOccupied(
|
||||
Display *display,
|
||||
Window window,
|
||||
Atom **ppaWs,
|
||||
unsigned long *pNumWs);
|
||||
|
||||
extern void DtWsmSetWorkspacesOccupied(
|
||||
Display *display,
|
||||
Window window,
|
||||
Atom *pWsHints,
|
||||
unsigned long numHints);
|
||||
|
||||
extern void DtWsmOccupyAllWorkspaces(
|
||||
Display *display,
|
||||
Window window);
|
||||
|
||||
extern DtWsmCBContext DtWsmAddWorkspaceModifiedCallback(
|
||||
Widget widget,
|
||||
DtWsmWsModifiedProc ws_modified,
|
||||
XtPointer client_data);
|
||||
|
||||
extern Window DtWsmGetCurrentBackdropWindow(
|
||||
Display *display,
|
||||
Window root);
|
||||
|
||||
extern int DtWsmSetWorkspaceTitle(
|
||||
Widget widget,
|
||||
Atom aWs,
|
||||
char *title);
|
||||
|
||||
extern int DtWsmChangeBackdrop(
|
||||
Display *display,
|
||||
Window root,
|
||||
char *path,
|
||||
Pixmap pixmap);
|
||||
|
||||
extern int DtWsmAddWorkspace(
|
||||
Widget widget,
|
||||
char *title);
|
||||
|
||||
extern int DtWsmDeleteWorkspace(
|
||||
Widget widget,
|
||||
Atom aWs);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _Dt_Wsm_h */
|
||||
@@ -1,133 +0,0 @@
|
||||
/*
|
||||
* CDE - Common Desktop Environment
|
||||
*
|
||||
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
|
||||
*
|
||||
* These libraries and programs are free software; you can
|
||||
* redistribute them and/or modify them under the terms of the GNU
|
||||
* Lesser General Public License as published by the Free Software
|
||||
* Foundation; either version 2 of the License, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* These libraries and programs are distributed in the hope that
|
||||
* they will be useful, but WITHOUT ANY WARRANTY; without even the
|
||||
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU Lesser General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with these libraries and programs; if not, write
|
||||
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
|
||||
* Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/*****************************<+>*************************************
|
||||
*********************************************************************
|
||||
**
|
||||
** File: WsmM.h
|
||||
**
|
||||
** RCS: $XConsortium: WsmM.h /main/3 1995/10/26 15:14:36 rswiston $
|
||||
** Project: DT Workspace Manager
|
||||
**
|
||||
** Description: Defines parameters necessary for messaging with
|
||||
** the workspace manager.
|
||||
**
|
||||
** (c) Copyright 1993, 1994 Hewlett-Packard Company
|
||||
** (c) Copyright 1993, 1994 International Business Machines Corp.
|
||||
** (c) Copyright 1993, 1994 Sun Microsystems, Inc.
|
||||
** (c) Copyright 1993, 1994 Novell, Inc.
|
||||
**
|
||||
*********************************************************************
|
||||
*****************************<+>*************************************/
|
||||
#ifndef _Dt_WsmM_h
|
||||
#define _Dt_WsmM_h
|
||||
|
||||
/*
|
||||
* Messaging definitions
|
||||
*/
|
||||
|
||||
/* Workspace manager tool class (for old messages) */
|
||||
#define DtWM_TOOL_CLASS "WORKSPACEMGR"
|
||||
|
||||
/* Workspace manager tool class (for new messages) */
|
||||
#define DtWSM_TOOL_CLASS "WORKSPACE_MANAGER"
|
||||
|
||||
/* Workspace manager tool class (for front panel messages) */
|
||||
#define DtFP_TOOL_CLASS "FRONTPANEL"
|
||||
|
||||
/* Request from dtstyle to change backdrop */
|
||||
#define DtWM_BACKDROP_CHANGE "BACKDROP_CHANGE"
|
||||
|
||||
/* Request from session manager to unlock the display (depress button) */
|
||||
#define DtWM_UNLOCK_DISPLAY "UNLOCK_DISPLAY"
|
||||
|
||||
/* Request from session manager to cancel an exit (depress button) */
|
||||
#define DtWM_CANCEL_EXIT "CANCEL_EXIT"
|
||||
|
||||
/* Request from session manager to retore the front panel to default state */
|
||||
#define DtWM_RESTORE_PANEL "RESTORE_PANEL"
|
||||
|
||||
/* Notification from Workspace manager of a new workspace */
|
||||
#define DtWSM_NEW_WORKSPACE "ACTIVE_WORKSPACE"
|
||||
|
||||
#define DtWSM_NEW_WORKSPACE_ARG_NAME 0
|
||||
#define DtWSM_NEW_WORKSPACE_ARG_ATOM 1
|
||||
|
||||
/* Request to set the current workspace */
|
||||
#define DtWSM_SET_WORKSPACE "SET_WORKSPACE"
|
||||
|
||||
#define DtWSM_SET_WORKSPACE_ARG_ATOM 0
|
||||
|
||||
/* Request to change the title of a workspace */
|
||||
#define DtWSM_SET_WORKSPACE_TITLE "SET_WORKSPACE_TITLE"
|
||||
|
||||
#define DtWSM_SET_WORKSPACE_TITLE_ARG_ATOM 0
|
||||
#define DtWSM_SET_WORKSPACE_TITLE_ARG_TITLE 1
|
||||
|
||||
/* Request to add a workspace */
|
||||
#define DtWSM_ADD_WORKSPACE "ADD_WORKSPACE"
|
||||
|
||||
#define DtWSM_ADD_WORKSPACE_ARG_TITLE 0
|
||||
|
||||
/* Request to delete a workspace */
|
||||
#define DtWSM_DELETE_WORKSPACE "DELETE_WORKSPACE"
|
||||
|
||||
#define DtWSM_DELETE_WORKSPACE_ARG_ATOM 0
|
||||
|
||||
/* Notification from Workspace manager of a modified workspace */
|
||||
#define DtWSM_MODIFY_WORKSPACE "MODIFY_WORKSPACE"
|
||||
|
||||
#define DtWSM_MODIFY_WORKSPACE_ARG_ATOM 0
|
||||
#define DtWSM_MODIFY_WORKSPACE_ARG_TYPE 1
|
||||
|
||||
#define DtWSM_MODIFY_WORKSPACE_TYPE_ADD 0
|
||||
#define DtWSM_MODIFY_WORKSPACE_TYPE_DELETE 1
|
||||
#define DtWSM_MODIFY_WORKSPACE_TYPE_BACKDROP 2
|
||||
#define DtWSM_MODIFY_WORKSPACE_TYPE_TITLE 3
|
||||
#define DtWSM_MODIFY_WORKSPACE_TYPE_ACTIVE 4
|
||||
|
||||
/* Notification from Workspace manager of a modified workspace */
|
||||
#define DtWSM_MARQUEE_SELECTION "MARQUEE_SELECTION"
|
||||
|
||||
#define DtWSM_MARQUEE_SELECTION_ARG_TYPE 0
|
||||
#define DtWSM_MARQUEE_SELECTION_ARG_X 1
|
||||
#define DtWSM_MARQUEE_SELECTION_ARG_Y 2
|
||||
#define DtWSM_MARQUEE_SELECTION_ARG_WIDTH 3
|
||||
#define DtWSM_MARQUEE_SELECTION_ARG_HEIGHT 4
|
||||
|
||||
#define DtWSM_MARQUEE_SELECTION_TYPE_BEGIN 1
|
||||
#define DtWSM_MARQUEE_SELECTION_TYPE_CONTINUE 2
|
||||
#define DtWSM_MARQUEE_SELECTION_TYPE_END 3
|
||||
#define DtWSM_MARQUEE_SELECTION_TYPE_CANCEL 4
|
||||
|
||||
/*
|
||||
* Macros to set and fetch argument fields into a message
|
||||
*
|
||||
* (NOTE: Since sending the request breaks out the zero'th
|
||||
* field, there is a difference of one in these two macros.)
|
||||
*/
|
||||
#define DtWSM_SET_FIELD(fields,ix,value) ((fields)[(ix)]=(value))
|
||||
#define DtWSM_GET_FIELD(fields,ix) ((fields)[((ix)+1)])
|
||||
|
||||
|
||||
#endif /* _Dt_WsmM_h */
|
||||
/* Do not add anything after this endif. */
|
||||
@@ -1,848 +0,0 @@
|
||||
/*
|
||||
* CDE - Common Desktop Environment
|
||||
*
|
||||
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
|
||||
*
|
||||
* These libraries and programs are free software; you can
|
||||
* redistribute them and/or modify them under the terms of the GNU
|
||||
* Lesser General Public License as published by the Free Software
|
||||
* Foundation; either version 2 of the License, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* These libraries and programs are distributed in the hope that
|
||||
* they will be useful, but WITHOUT ANY WARRANTY; without even the
|
||||
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU Lesser General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with these libraries and programs; if not, write
|
||||
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
|
||||
* Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/* $XConsortium: WsmP.h /main/8 1996/05/20 16:08:59 drk $ */
|
||||
|
||||
/************************************<+>*************************************
|
||||
****************************************************************************
|
||||
**
|
||||
** File: WsmP.h
|
||||
**
|
||||
** Project: DT Workspace Manager
|
||||
**
|
||||
** Description: Defines PRIVATE properties, structures, and
|
||||
** parameters used for communication with the
|
||||
** workspace manager.
|
||||
**
|
||||
** (c) Copyright 1996 Digital Equipment Corporation.
|
||||
** (c) Copyright 1993,1994,1996 Hewlett-Packard Company.
|
||||
** (c) Copyright 1993,1994,1996 International Business Machines Corp.
|
||||
** (c) Copyright 1993,1994,1996 Sun Microsystems, Inc.
|
||||
** (c) Copyright 1993,1994,1996 Novell, Inc.
|
||||
** (c) Copyright 1996 FUJITSU LIMITED.
|
||||
** (c) Copyright 1996 Hitachi.
|
||||
**
|
||||
****************************************************************************
|
||||
************************************<+>*************************************/
|
||||
#ifndef _Dt_WsmP_h
|
||||
#define _Dt_WsmP_h
|
||||
#include <Dt/Wsm.h>
|
||||
#include <X11/Intrinsic.h>
|
||||
#include <Dt/Service.h>
|
||||
#include <Tt/tt_c.h>
|
||||
|
||||
/**********************************************************************
|
||||
* Workspace atom names
|
||||
**********************************************************************/
|
||||
#define _XA_DT_MARQUEE_SELECTION "_DT_MARQUEE_SELECTION"
|
||||
#define _XA_DT_WORKSPACE_EMBEDDED_CLIENTS \
|
||||
"_DT_WORKSPACE_EMBEDDED_CLIENTS"
|
||||
#define _XA_DT_WM_REQUEST "_DT_WM_REQUEST"
|
||||
#define _XA_DT_WORKSPACE_HINTS "_DT_WORKSPACE_HINTS"
|
||||
#define _XA_DT_WORKSPACE_PRESENCE "_DT_WORKSPACE_PRESENCE"
|
||||
#define _XA_DT_WORKSPACE_INFO "_DT_WORKSPACE_INFO"
|
||||
#define _XA_DT_WM_HINTS "_DT_WM_HINTS"
|
||||
#define _XA_DT_WORKSPACE_LIST "_DT_WORKSPACE_LIST"
|
||||
#define _XA_DT_WORKSPACE_CURRENT "_DT_WORKSPACE_CURRENT"
|
||||
|
||||
|
||||
/**********************************************************************
|
||||
* Name to request ``all'' workspaces (for a persistent window)
|
||||
**********************************************************************/
|
||||
|
||||
#define _XA_DT_WORKSPACE_ALL "all"
|
||||
|
||||
|
||||
/**********************************************************************
|
||||
* Workspace function definitions
|
||||
**********************************************************************/
|
||||
#define DtWM_FUNC_OCCUPY_WS DtWM_FUNCTION_OCCUPY_WS
|
||||
#define DtWM_FUNC_ALL DtWM_FUNC_OCCUPY_WS
|
||||
|
||||
/**********************************************************************
|
||||
* Workspace property information
|
||||
**********************************************************************/
|
||||
|
||||
/*
|
||||
*
|
||||
* NOTE: The "(client -> dtwm)" indication calls out the direction
|
||||
* of information flow. In this case, the client writes the
|
||||
* property and dtwm reads the property.
|
||||
*
|
||||
*
|
||||
* _DT_WORKSPACE_HINTS (client -> dtwm)
|
||||
*
|
||||
* This property is a list of atoms placed by a client on its
|
||||
* top level window(s). Each atom is an "interned" string name
|
||||
* for a workspace. The workspace manager looks at this property
|
||||
* when it manages the window (e.g. when the window is mapped)
|
||||
* and will place the window in the workspaces listed.
|
||||
*
|
||||
* _DT_WORKSPACE_PRESENCE (dtwm -> client)
|
||||
*
|
||||
* This property is a list of atoms placed on a client by dtwm.
|
||||
* Each atom is an "interned" string name for a workspace. This
|
||||
* property lists the workspaces that this client lives in.
|
||||
*
|
||||
* _DT_WORKSPACE_LIST (dtwm -> clients)
|
||||
*
|
||||
* This property is a list of atoms. Each atom represents a
|
||||
* name of a workspace. The list is in "order" such that
|
||||
* the first element is for the first workspace and so on.
|
||||
* This proeprty is placed on the mwm ("wmWindow") window.
|
||||
*
|
||||
* _DT_WORKSPACE_CURRENT (dtwm -> clients)
|
||||
*
|
||||
* This property is a single atom, representing the current
|
||||
* workspace. It is updated each time the workspace changes.
|
||||
* This proeprty is placed on the mwm window.
|
||||
*
|
||||
* _DT_WORKSPACE_INFO_<name> (dtwm -> clients)
|
||||
*
|
||||
* There is one property of this form for each workspace in
|
||||
* _DT_WORKSPACE_LIST. This property is a sequence of ISO-LATIN1
|
||||
* NULL-terminated strings representing the elements in a
|
||||
* structure. This information was formerly in _DT_WORKSPACE_INFO
|
||||
* but was broken out to allow for extensibility.
|
||||
* This proeprty is placed on the mwm window.
|
||||
*
|
||||
* _DT_WM_HINTS (client -> dtwm)
|
||||
*
|
||||
* This property requests specific window/workspace management behavior.
|
||||
* The functions member of the property allows a client to enable or
|
||||
* disable workspace management functions. The behavior member is
|
||||
* used to indicate front panels and slide-ups.
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
/**********************************************************************
|
||||
* Property structures
|
||||
**********************************************************************/
|
||||
|
||||
typedef struct _DtWmHints
|
||||
{
|
||||
long flags; /* marks valid fields */
|
||||
long functions; /* special dtwm functions */
|
||||
long behaviors; /* special dtwm behaviors */
|
||||
Window attachWindow; /* (reserved) */
|
||||
} DtWmHints;
|
||||
|
||||
/* DtWmHints "flags" definitions */
|
||||
#define DtWM_HINTS_FUNCTIONS (1L << 0)
|
||||
#define DtWM_HINTS_BEHAVIORS (1L << 1)
|
||||
#define DtWM_HINTS_ATTACH_WINDOW (1L << 2) /* (reserved) */
|
||||
|
||||
/* DtWmHints "functions" definitions */
|
||||
#define DtWM_FUNCTION_ALL (1L << 0)
|
||||
#define DtWM_FUNCTION_OCCUPY_WS (1L << 16)
|
||||
|
||||
/* DtWmHints "behaviors" definitions */
|
||||
#define DtWM_BEHAVIOR_PANEL (1L << 1)
|
||||
#define DtWM_BEHAVIOR_SUBPANEL (1L << 2)
|
||||
#define DtWM_BEHAVIOR_SUB_RESTORED (1L << 3)
|
||||
|
||||
/**********************************************************************
|
||||
* Session atom names
|
||||
**********************************************************************/
|
||||
#define _XA_DT_SESSION_HINTS "_DT_SESSION_HINTS"
|
||||
#define _XA_DT_SAVE_MODE "_DT_SAVE_MODE"
|
||||
#define _XA_DT_RESTORE_MODE "_DT_RESTORE_MODE"
|
||||
#define _XA_DT_RESTORE_DIR "_DT_RESTORE_DIR"
|
||||
#define _XA_DT_SM_WM_PROTOCOL "_DT_SM_WM_PROTOCOL"
|
||||
#define _XA_DT_SM_START_ACK_WINDOWS "_DT_SM_START_ACK_WINDOWS"
|
||||
#define _XA_DT_SM_STOP_ACK_WINDOWS "_DT_SM_STOP_ACK_WINDOWS"
|
||||
#define _XA_DT_WM_WINDOW_ACK "_DT_WM_WINDOW_ACK"
|
||||
#define _XA_DT_WM_EXIT_SESSION "_DT_WM_EXIT_SESSION"
|
||||
#define _XA_DT_WM_LOCK_DISPLAY "_DT_WM_LOCK_DISPLAY"
|
||||
#define _XA_DT_WM_READY "_DT_WM_READY"
|
||||
|
||||
/**********************************************************************
|
||||
* Workspace special character definitions
|
||||
**********************************************************************/
|
||||
#define DTWM_CH_ESC_NEXT "\\"
|
||||
|
||||
/**********************************************************************
|
||||
* Marquee selection callback prototype
|
||||
**********************************************************************/
|
||||
typedef void (*DtWsmMarqueeSelectionProc) ();
|
||||
/*
|
||||
Widget widget;
|
||||
int type;
|
||||
Position x, y;
|
||||
Dimension width, height;
|
||||
XtPointer client_data;
|
||||
*/
|
||||
|
||||
/**********************************************************************
|
||||
* Marquee Select
|
||||
**********************************************************************/
|
||||
|
||||
#define DT_WSM_MARQUEE_SELECTION_TYPE_BEGIN 1
|
||||
#define DT_WSM_MARQUEE_SELECTION_TYPE_CONTINUE 2
|
||||
#define DT_WSM_MARQUEE_SELECTION_TYPE_END 3
|
||||
#define DT_WSM_MARQUEE_SELECTION_TYPE_CANCEL 4
|
||||
|
||||
/**********************************************************************
|
||||
* Workspace request definitions
|
||||
*
|
||||
* NOTE: These functions do not necessarily match the other
|
||||
* window manager f.* functions!
|
||||
**********************************************************************/
|
||||
#define DTWM_REQ_CHANGE_BACKDROP "f.change_backdrop"
|
||||
#define DTWM_REQ_RESTART "f.restart"
|
||||
|
||||
/**********************************************************************
|
||||
* Workspace request parameter definitions
|
||||
**********************************************************************/
|
||||
#define DTWM_REQP_BACKDROP_NONE "NoBackdrop"
|
||||
#define DTWM_REQP_NO_CONFIRM "-noconfirm"
|
||||
|
||||
/**********************************************************************
|
||||
* Resource converter definitions
|
||||
*
|
||||
* NOTE: This has been lifted from mwm.
|
||||
* Please keep syncronized with the current version of mwm/dtwm.
|
||||
* (See WmGlobal.h)
|
||||
**********************************************************************/
|
||||
|
||||
/* icon placement values (iconPlacement, ...): */
|
||||
#define ICON_PLACE_LEFT_PRIMARY (1L << 0)
|
||||
#define ICON_PLACE_RIGHT_PRIMARY (1L << 1)
|
||||
#define ICON_PLACE_TOP_PRIMARY (1L << 2)
|
||||
#define ICON_PLACE_BOTTOM_PRIMARY (1L << 3)
|
||||
#define ICON_PLACE_LEFT_SECONDARY (1L << 4)
|
||||
#define ICON_PLACE_RIGHT_SECONDARY (1L << 5)
|
||||
#define ICON_PLACE_TOP_SECONDARY (1L << 6)
|
||||
#define ICON_PLACE_BOTTOM_SECONDARY (1L << 7)
|
||||
#define ICON_PLACE_EDGE (1L << 8)
|
||||
#define ICON_PLACE_TIGHT (1L << 9)
|
||||
#define ICON_PLACE_RESERVE (1L << 10)
|
||||
|
||||
/**********************************************************************
|
||||
* Workspace property information
|
||||
**********************************************************************/
|
||||
|
||||
/*
|
||||
*
|
||||
* NOTE: The "(client -> dtwm)" indication calls out the direction
|
||||
* of information flow. In this case, the client writes the
|
||||
* property and dtwm reads the property.
|
||||
*
|
||||
* _DT_WM_REQUEST (client -> dtwm)
|
||||
*
|
||||
* This property of type string that is used to communication
|
||||
* function requests to dtwm. This property is placed on the mwm
|
||||
* window. Dtwm listens for changes to this property and dequeues
|
||||
* requests off the top of the list. Requests are NULL-terminated
|
||||
* strings in the format:
|
||||
*
|
||||
* <req_type> <req_parms>
|
||||
*
|
||||
* Each request ends with a literal '\0' character to insure
|
||||
* separation from the next request.
|
||||
*
|
||||
* Clients must always add requests to the end of the property
|
||||
* (mode=PropModeAppend). Use of convenience routines is
|
||||
* recommended since they take care of proper formatting of the
|
||||
* requests.
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
/**********************************************************************
|
||||
* Property structures
|
||||
**********************************************************************/
|
||||
|
||||
/* Internal form of this property */
|
||||
typedef struct _DtWorkspaceHints
|
||||
{
|
||||
long version; /* indicates structure changes */
|
||||
long flags; /* marks valid fields */
|
||||
long wsflags; /* special workspace information */
|
||||
long numWorkspaces; /* number of workspaces */
|
||||
Atom * pWorkspaces; /* list of atoms for workspaces */
|
||||
} DtWorkspaceHints;
|
||||
|
||||
/* DtWorkspaceHints "flags" definitions */
|
||||
#define DT_WORKSPACE_HINTS_WSFLAGS (1L << 0)
|
||||
/* The following definitions enables both the numWorkspaces
|
||||
and pWorkspaces fields */
|
||||
#define DT_WORKSPACE_HINTS_WORKSPACES (1L << 1)
|
||||
|
||||
/* DtWorkspaceHints "wsflags" definitions */
|
||||
#define DT_WORKSPACE_FLAGS_OCCUPY_ALL (1L << 0)
|
||||
|
||||
/**********************************************************************
|
||||
* Marquee Selection Structures
|
||||
**********************************************************************/
|
||||
typedef struct _DtMarqueeSelectData
|
||||
{
|
||||
long state; /* current property state */
|
||||
Position x; /* NW corner of select area */
|
||||
Position y; /* NW corner of select area */
|
||||
Dimension width; /* size of select area */
|
||||
Dimension height; /* size of select area */
|
||||
} DtMarqueeSelectData;
|
||||
|
||||
typedef struct _DtMarqueeSelectProp
|
||||
{
|
||||
long state; /* current property state */
|
||||
long x; /* NW corner of select area */
|
||||
long y; /* NW corner of select area */
|
||||
long width; /* size of select area */
|
||||
long height; /* size of select area */
|
||||
} DtMarqueeSelectProperty;
|
||||
|
||||
/**********************************************************************
|
||||
* Marquee Selection Definitions
|
||||
**********************************************************************/
|
||||
#define DT_MARQUEE_SELECT_BEGIN 1
|
||||
#define DT_MARQUEE_SELECT_CONTINUE 2
|
||||
#define DT_MARQUEE_SELECT_END 3
|
||||
#define DT_MARQUEE_SELECT_CANCEL 4
|
||||
|
||||
/**********************************************************************
|
||||
* Workspace change callback context (opaque)
|
||||
**********************************************************************/
|
||||
typedef void (*DtWsmCBProc) ();
|
||||
struct _DtWsmCBContext
|
||||
{
|
||||
Tt_pattern pattern;
|
||||
Widget widget;
|
||||
DtWsmCBProc ws_cb;
|
||||
XtPointer client_data;
|
||||
XtPointer nested_context;
|
||||
};
|
||||
|
||||
/**********************************************************************
|
||||
* Convenience Routines
|
||||
**********************************************************************/
|
||||
|
||||
/*************************************<->*************************************
|
||||
*
|
||||
* int _DtGetMwmWindow (display, root, pMwmWindow)
|
||||
*
|
||||
*
|
||||
* Description:
|
||||
* -----------
|
||||
* Get the Motif Window manager window
|
||||
*
|
||||
*
|
||||
* Inputs:
|
||||
* ------
|
||||
* display - display
|
||||
* root - root window of screen
|
||||
* pMwmWindow - pointer to a window (to be returned)
|
||||
*
|
||||
* Outputs:
|
||||
* --------
|
||||
* *pMwmWindow - mwm window id, if successful
|
||||
* Return - status from XGetWindowProperty
|
||||
*
|
||||
* Comments:
|
||||
* --------
|
||||
* This can fail if mwm is not managing the screen for the root window
|
||||
* passed in.
|
||||
*
|
||||
*************************************<->***********************************/
|
||||
extern int
|
||||
_DtGetMwmWindow(
|
||||
Display *display,
|
||||
Window root,
|
||||
Window *pMwmWindow) ;
|
||||
|
||||
|
||||
/*************************************<->*************************************
|
||||
*
|
||||
* int _DtGetEmbeddedClients (display, root, ppEmbeddedClients,
|
||||
* pNumEmbeddedClients)
|
||||
*
|
||||
*
|
||||
* Description:
|
||||
* -----------
|
||||
* Get the contents of the _DT_WORKSPACE_EMBEDDED_CLIENTS property
|
||||
* from a root window. This is a list (array) of top-level windows that
|
||||
* are embedded in the front panel of the window manager. They would
|
||||
* not be picked up ordinarily by a session manager in a normal
|
||||
* search for top-level windows because they are reparented to
|
||||
* the front panel which itself is a top-level window.
|
||||
*
|
||||
*
|
||||
* Inputs:
|
||||
* ------
|
||||
* display - display
|
||||
* root - root window to get info from
|
||||
* ppEmbeddedClients - pointer to a pointer (to be returned)
|
||||
* pNumEmbeddedClients - pointer to a number (to be returned)
|
||||
*
|
||||
* Outputs:
|
||||
* -------
|
||||
* *ppEmbeddedClients - pointer to a array of window IDs (top-level
|
||||
* windows for embedded clients)
|
||||
* (NOTE: This should be freed using XFree)
|
||||
* *pNumEmbeddedClients- number of window IDs in array
|
||||
* Return - Success if property fetched ok.
|
||||
* Failure returns are from XGetWindowProperty
|
||||
*
|
||||
* Comments:
|
||||
* --------
|
||||
* Use XFree to free the returned data.
|
||||
*
|
||||
*************************************<->***********************************/
|
||||
extern int
|
||||
_DtGetEmbeddedClients(
|
||||
Display *display,
|
||||
Window root,
|
||||
Atom **ppEmbeddedClients,
|
||||
unsigned long *pNumEmbeddedClients );
|
||||
|
||||
|
||||
/*************************************<->*************************************
|
||||
*
|
||||
* int _DtWmRestart (display, root)
|
||||
*
|
||||
*
|
||||
* Description:
|
||||
* -----------
|
||||
* Requests the window manager to restart itself
|
||||
*
|
||||
*
|
||||
* Inputs:
|
||||
* ------
|
||||
* display - display
|
||||
* root - root window for screen
|
||||
*
|
||||
* Returns:
|
||||
* --------
|
||||
* Success if request was sent
|
||||
*
|
||||
* Comments:
|
||||
* ---------
|
||||
*
|
||||
*************************************<->***********************************/
|
||||
extern int
|
||||
_DtWmRestart(
|
||||
Display *display,
|
||||
Window root) ;
|
||||
|
||||
/*************************************<->*************************************
|
||||
*
|
||||
* int _DtWsmChangeBackdrop (display, root, path, pixmap)
|
||||
*
|
||||
*
|
||||
* Description:
|
||||
* -----------
|
||||
* Request the HP DT workspace manager to change the backdrop
|
||||
*
|
||||
*
|
||||
* Inputs:
|
||||
* ------
|
||||
* display - display
|
||||
* root - root window of screen
|
||||
* path - file path to bitmap file
|
||||
* pixmap - pixmap id of backdrop pixmap
|
||||
*
|
||||
* Returns:
|
||||
* --------
|
||||
* Success if request sent
|
||||
*
|
||||
*************************************<->***********************************/
|
||||
extern int
|
||||
_DtWsmChangeBackdrop (
|
||||
Display *display,
|
||||
Window root,
|
||||
char *path,
|
||||
Pixmap pixmap);
|
||||
|
||||
/*************************************<->*************************************
|
||||
*
|
||||
* _DtWmCvtStringToIPlace (args, numArgs, fromVal, toVal)
|
||||
*
|
||||
*
|
||||
* Description:
|
||||
* -----------
|
||||
* This function converts a string to an icon placement scheme description.
|
||||
*
|
||||
*
|
||||
* Inputs:
|
||||
* ------
|
||||
* args = NULL (don't care)
|
||||
*
|
||||
* numArgs = 0 (don't care)
|
||||
*
|
||||
* fromVal = resource value to convert
|
||||
*
|
||||
*
|
||||
* Outputs:
|
||||
* -------
|
||||
* toVal = descriptor to use to return converted value
|
||||
*
|
||||
*************************************<->***********************************/
|
||||
|
||||
extern void
|
||||
_DtWmCvtStringToIPlace (
|
||||
XrmValue *args,
|
||||
Cardinal numArgs,
|
||||
XrmValue *fromVal,
|
||||
XrmValue *toVal);
|
||||
|
||||
|
||||
/*************************************<->*************************************
|
||||
*
|
||||
* Boolean _DtWsmIsBackdropWindow (display, screen_num, window)
|
||||
*
|
||||
*
|
||||
* Description:
|
||||
* -----------
|
||||
* Returns true if the window passed in is a backdrop window.
|
||||
*
|
||||
*
|
||||
* Inputs:
|
||||
* ------
|
||||
* display - display
|
||||
* screen_num - number of screen we're interested in
|
||||
* window - window we want to test
|
||||
*
|
||||
* Outputs:
|
||||
* -------
|
||||
* Return - True if window is a backdrop window
|
||||
* False otherwise.
|
||||
*
|
||||
* Comments:
|
||||
* --------
|
||||
*
|
||||
*************************************<->***********************************/
|
||||
Boolean
|
||||
_DtWsmIsBackdropWindow(
|
||||
Display *display,
|
||||
int screen_num,
|
||||
Window window );
|
||||
|
||||
/*************************************<->*************************************
|
||||
*
|
||||
* int DtWsmSetWorkspaceTitle (widget, aWs, pchNewName)
|
||||
*
|
||||
*
|
||||
* Description:
|
||||
* -----------
|
||||
* Rename a workspace
|
||||
*
|
||||
*
|
||||
* Inputs:
|
||||
* ------
|
||||
* widget - a widget
|
||||
* aWs - atom of workspace
|
||||
* pchNewName - new name for the workspace
|
||||
*
|
||||
* Outputs:
|
||||
* --------
|
||||
* Return - 1 (*not* Success) if communication to workspace manager
|
||||
* was successful.
|
||||
*
|
||||
* Comments:
|
||||
* ---------
|
||||
* The odd-ball successful return value is a CDE 1.0 bug being
|
||||
* preserved for backward compatibility.
|
||||
*
|
||||
*************************************<->***********************************/
|
||||
int
|
||||
_DtWsmSetWorkspaceTitle (
|
||||
Widget widget,
|
||||
Atom aWs,
|
||||
char * pchNewName);
|
||||
|
||||
/*************************************<->*************************************
|
||||
*
|
||||
* int _DtWsmDeleteWorkspace (widget, aWs)
|
||||
*
|
||||
*
|
||||
* Description:
|
||||
* -----------
|
||||
* Delete a workspace
|
||||
*
|
||||
*
|
||||
* Inputs:
|
||||
* ------
|
||||
* widget - a widget (with a window!)
|
||||
* aWs - atom of workspace to delete
|
||||
*
|
||||
* Outputs:
|
||||
* --------
|
||||
* Return - 1 (*not* Success) if communication to workspace manager
|
||||
* was successful.
|
||||
*
|
||||
* Comments:
|
||||
* ---------
|
||||
* The odd-ball successful return value is a CDE 1.0 bug being
|
||||
* preserved for backward compatibility.
|
||||
*
|
||||
*************************************<->***********************************/
|
||||
int
|
||||
_DtWsmDeleteWorkspace (
|
||||
Widget widget,
|
||||
Atom aWs);
|
||||
|
||||
|
||||
/*************************************<->*************************************
|
||||
*
|
||||
* int _DtWsmCreateWorkspace (widget, pchTitle)
|
||||
*
|
||||
*
|
||||
* Description:
|
||||
* -----------
|
||||
* Add a workspace
|
||||
*
|
||||
*
|
||||
* Inputs:
|
||||
* ------
|
||||
* widget - a widget (with a window!)
|
||||
* pchTitle - user-visible title of the workspace
|
||||
*
|
||||
* Outputs:
|
||||
* --------
|
||||
* Return - 1 (*not* Success) if communication to workspace manager
|
||||
* was successful.
|
||||
*
|
||||
* Comments:
|
||||
* ---------
|
||||
* The odd-ball successful return value is a CDE 1.0 bug being
|
||||
* preserved for backward compatibility.
|
||||
*
|
||||
*************************************<->***********************************/
|
||||
int
|
||||
_DtWsmCreateWorkspace (Widget widget, char * pchTitle);
|
||||
|
||||
/*************************************<->*************************************
|
||||
*
|
||||
* _DtWsmSetWorkspaceHints (display, window, pWsHints)
|
||||
*
|
||||
*
|
||||
* Description:
|
||||
* -----------
|
||||
* Set the contents of the _DT_WORKSPACE_HINTS property on a window
|
||||
*
|
||||
*
|
||||
* Inputs:
|
||||
* ------
|
||||
* display - display
|
||||
* window - window to get hints from
|
||||
* pWsHints - pointer to workspace hints
|
||||
*
|
||||
* Comments:
|
||||
* ---------
|
||||
* The internal form of the property is a structure. The structure
|
||||
* must be unwound and turned into a simple array of "long"s before
|
||||
* being written out.
|
||||
*
|
||||
* This function currently only deals with version 1 of the property
|
||||
* structure. The passed in pWsHints->version is ignored.
|
||||
*
|
||||
*************************************<->***********************************/
|
||||
extern void
|
||||
_DtWsmSetWorkspaceHints(
|
||||
Display *display,
|
||||
Window window,
|
||||
DtWorkspaceHints *pWsHints);
|
||||
|
||||
|
||||
/*************************************<->*************************************
|
||||
*
|
||||
* int _DtWsmGetWorkspaceHints (display, window, ppWsHints)
|
||||
*
|
||||
*
|
||||
* Description:
|
||||
* -----------
|
||||
* Get the contents of the _DT_WORKSPACE_HINTS property from a window
|
||||
*
|
||||
*
|
||||
* Inputs:
|
||||
* ------
|
||||
* display - display
|
||||
* window - window to get hints from
|
||||
* ppWsHints - pointer to pointer to workspace hints
|
||||
*
|
||||
* Outputs:
|
||||
* *ppWsHints - allocated workspace hints data.
|
||||
*
|
||||
* Comments:
|
||||
* ---------
|
||||
* The internal form of the property is a structure. The property
|
||||
* is read in and packed into data allocated for the structure.
|
||||
* Free the workspace hints by calling _DtWsmFreeWorkspaceHints.
|
||||
*
|
||||
* This function currently only deals with version 1 of the property
|
||||
* structure.
|
||||
*
|
||||
*************************************<->***********************************/
|
||||
extern int
|
||||
_DtWsmGetWorkspaceHints(
|
||||
Display *display,
|
||||
Window window,
|
||||
DtWorkspaceHints **ppWsHints);
|
||||
|
||||
/*************************************<->*************************************
|
||||
*
|
||||
* _DtWsmFreeWorkspaceHints (pWsHints)
|
||||
*
|
||||
*
|
||||
* Description:
|
||||
* -----------
|
||||
* Free a workspace hints structure returned from _DtWsmGetWorkspaceHints
|
||||
*
|
||||
* Inputs:
|
||||
* ------
|
||||
* pWsHints - pointer to workspace hints
|
||||
*
|
||||
* Outputs:
|
||||
*
|
||||
* Comments:
|
||||
* ---------
|
||||
*************************************<->***********************************/
|
||||
extern void
|
||||
_DtWsmFreeWorkspaceHints(
|
||||
DtWorkspaceHints *pWsHints);
|
||||
|
||||
/*************************************<->*************************************
|
||||
*
|
||||
* DtWsmCBContext * _DtWsmAddMarqueeSelectionCallback (widget,
|
||||
* marquee_select,
|
||||
* client_data)
|
||||
*
|
||||
*
|
||||
* Description:
|
||||
* -----------
|
||||
* Register a function to be called when a marquee selection is made
|
||||
*
|
||||
*
|
||||
* Inputs:
|
||||
* ------
|
||||
* widget - widget for this client
|
||||
* marquee_select - function to call for marquee select
|
||||
* client_data - additional data to pass back to client when called.
|
||||
*
|
||||
* Outputs:
|
||||
* --------
|
||||
* Return - ptr to callback context data (opaque)
|
||||
*
|
||||
* Comments:
|
||||
* ---------
|
||||
* The callback context data ptr should be saved if you intend to
|
||||
* removed this callback at some point in the future.
|
||||
*
|
||||
*************************************<->***********************************/
|
||||
DtWsmCBContext
|
||||
_DtWsmAddMarqueeSelectionCallback (
|
||||
Widget widget,
|
||||
DtWsmMarqueeSelectionProc marquee_select,
|
||||
XtPointer client_data);
|
||||
|
||||
/*************************************<->*************************************
|
||||
*
|
||||
* _DtWsmSetDtWmHints (display, window, pHints)
|
||||
*
|
||||
*
|
||||
* Description:
|
||||
* -----------
|
||||
* Set the contents of the _DT_WM_HINTS property on a window
|
||||
*
|
||||
*
|
||||
* Inputs:
|
||||
* ------
|
||||
* display - display
|
||||
* window - window to set hints on
|
||||
* pHints - pointer the hints to set
|
||||
*
|
||||
* Comments:
|
||||
* ---------
|
||||
* No error checking
|
||||
*
|
||||
*************************************<->***********************************/
|
||||
extern void
|
||||
_DtWsmSetDtWmHints( Display *display,
|
||||
Window window,
|
||||
DtWmHints *pHints);
|
||||
|
||||
/*************************************<->*************************************
|
||||
*
|
||||
* int _DtWsmGetDtWmHints (display, window, ppDtWmHints)
|
||||
*
|
||||
*
|
||||
* Description:
|
||||
* -----------
|
||||
* Get the contents of the _DT_WM_HINTS property on a window
|
||||
*
|
||||
*
|
||||
* Inputs:
|
||||
* ------
|
||||
* display - display
|
||||
* window - window to get hints from
|
||||
* ppDtWmHints - pointer to a pointer to return
|
||||
*
|
||||
* Outputs:
|
||||
* --------
|
||||
* *ppDtWmHints-points to the DtWmHints structure retrieved from
|
||||
* the window (NOTE: This should be freed using XFree)
|
||||
*
|
||||
* Comments:
|
||||
* ---------
|
||||
*
|
||||
*************************************<->***********************************/
|
||||
extern int
|
||||
_DtWsmGetDtWmHints(
|
||||
Display *display,
|
||||
Window window,
|
||||
DtWmHints **ppDtWmHints);
|
||||
|
||||
/*************************************<->*************************************
|
||||
*
|
||||
* _DtWsmSelectionNameForScreen (scr)
|
||||
*
|
||||
* Description:
|
||||
* -----------
|
||||
* Returns a string containing the selection name used for
|
||||
* communication with the workspace manager on this screen
|
||||
*
|
||||
*
|
||||
* Inputs:
|
||||
* ------
|
||||
* scr - number of screen
|
||||
*
|
||||
* Outputs:
|
||||
* --------
|
||||
* Return - ptr to string with selection name (free with XtFree)
|
||||
*
|
||||
* Comments:
|
||||
* ---------
|
||||
* Assumes the screen number is < 1000.
|
||||
*
|
||||
*************************************<->***********************************/
|
||||
extern String
|
||||
_DtWsmSelectionNameForScreen (int scr);
|
||||
|
||||
extern Tt_callback_action
|
||||
_DtWsmConsumeReply (
|
||||
Tt_message msg,
|
||||
Tt_pattern pat );
|
||||
|
||||
#endif /* _Dt_WsmP_h */
|
||||
/* Do not add anything after this endif. */
|
||||
@@ -1,133 +0,0 @@
|
||||
/*
|
||||
* CDE - Common Desktop Environment
|
||||
*
|
||||
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
|
||||
*
|
||||
* These libraries and programs are free software; you can
|
||||
* redistribute them and/or modify them under the terms of the GNU
|
||||
* Lesser General Public License as published by the Free Software
|
||||
* Foundation; either version 2 of the License, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* These libraries and programs are distributed in the hope that
|
||||
* they will be useful, but WITHOUT ANY WARRANTY; without even the
|
||||
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU Lesser General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with these libraries and programs; if not, write
|
||||
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
|
||||
* Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/*
|
||||
* (c) Copyright 1993, 1994 Hewlett-Packard Company *
|
||||
* (c) Copyright 1993, 1994 International Business Machines Corp. *
|
||||
* (c) Copyright 1993, 1994 Sun Microsystems, Inc. *
|
||||
* (c) Copyright 1993, 1994 Novell, Inc. *
|
||||
*/
|
||||
/* -*-C-*-
|
||||
**************************************************************************
|
||||
*
|
||||
* File: Chkpnt.h
|
||||
* Description: CDE Private header file. Private API for sending checkpoint
|
||||
* messages between compliant clients and the checkpoint service
|
||||
* provider. This API is designed for use by performance
|
||||
* measurement programs.
|
||||
*
|
||||
* Created: Mon Sep 6 09:00 1993
|
||||
* Language: C
|
||||
*
|
||||
* $XConsortium: ChkpntP.h /main/4 1995/10/26 15:18:33 rswiston $
|
||||
*
|
||||
* (C) Copyright 1993, Hewlett-Packard, all rights reserved.
|
||||
*
|
||||
**************************************************************************
|
||||
*/
|
||||
|
||||
#ifndef _Dt_Perf_Checkpoint_P_h
|
||||
#define _Dt_Perf_Checkpoint_P_h
|
||||
|
||||
#include <X11/Xlib.h>
|
||||
#include <X11/Xatom.h>
|
||||
#include <X11/Intrinsic.h>
|
||||
|
||||
/*************************************************************************/
|
||||
/************* Data types ************************************************/
|
||||
/*************************************************************************/
|
||||
|
||||
/* The following definition is ONLY meant for union that follows */
|
||||
typedef struct {
|
||||
char *pname; /* Client program name */
|
||||
char *window; /* Window Id for client */
|
||||
char *type; /* Type of message */
|
||||
char *count; /* Running count of messages */
|
||||
char *seconds; /* Time in seconds from gettimeofday() */
|
||||
char *message; /* Actual message */
|
||||
} _DtChkpntMsgFormat;
|
||||
|
||||
#define DT_PERF_CHKPNT_MSG_SIZE (sizeof(_DtChkpntMsgFormat) / sizeof(char *))
|
||||
/* Use the following union for actual message declaration */
|
||||
typedef union {
|
||||
_DtChkpntMsgFormat record;
|
||||
char *array[DT_PERF_CHKPNT_MSG_SIZE];
|
||||
} DtChkpntMsg;
|
||||
|
||||
#define DT_PERF_CHKPNT_MSG_INIT "Init"
|
||||
#define DT_PERF_CHKPNT_MSG_CHKPNT "Chkpnt"
|
||||
#define DT_PERF_CHKPNT_MSG_END "End"
|
||||
|
||||
/*************************************************************************/
|
||||
/************* Atom Names ************************************************/
|
||||
/*************************************************************************/
|
||||
/* Selection for ICCCM style interaction of client and listener*/
|
||||
/* This selection is owned by the listener */
|
||||
#define DT_PERF_CHKPNT_SEL "_DT_PERF_CHKPNT_SEL"
|
||||
|
||||
/* Properties attached to the client: Used for message transmission */
|
||||
#define DT_PERF_CLIENT_CHKPNT_PROP "_DT_PERF_CHKPNT_PROP"
|
||||
|
||||
/*************************************************************************/
|
||||
/************* Client Functions ******************************************/
|
||||
/*************************************************************************/
|
||||
|
||||
/* Note: It is expected that users will invoke the following functions within
|
||||
#ifdef DT_PERFORMANCE directives. The DT_PERFORMANCE flag should be set,
|
||||
in the build environment, for the performance-test-enabled builds.
|
||||
*/
|
||||
|
||||
/* Initialize the checkpointing mechanism */
|
||||
extern int _DtPerfChkpntInit(
|
||||
Display *display, /* Display pointer */
|
||||
Window parentwin, /* Parent window id */
|
||||
char *prog_name, /* Name of the client program (argv[0]) */
|
||||
Boolean bChkpnt /* Boolean: True or False */
|
||||
);
|
||||
|
||||
/* Send a checkpoint message to the listener */
|
||||
extern void _DtPerfChkpntMsgSend(
|
||||
char *message /* Acual message for transmission */
|
||||
);
|
||||
|
||||
/* End the checkpointing message delivery */
|
||||
extern int _DtPerfChkpntEnd(
|
||||
);
|
||||
|
||||
/*************************************************************************/
|
||||
/************* Listener Service Functions ********************************/
|
||||
/*************************************************************************/
|
||||
|
||||
/* Initialize the listener */
|
||||
extern int _DtPerfChkpntListenInit(
|
||||
Display *display, /* Current display */
|
||||
Window parentwin /* Parent of window associated with listener */
|
||||
);
|
||||
|
||||
/* Fetch a message from message queue */
|
||||
extern Bool _DtPerfChkpntMsgReceive(
|
||||
DtChkpntMsg *dtcp_msg, /* Above message available as a structure */
|
||||
Bool bBlock /* Block until a message is received ? */
|
||||
);
|
||||
|
||||
#endif /*_Dt_Perf_Checkpoint_h*/
|
||||
/* Do not add anything after this endif. */
|
||||
@@ -1,51 +0,0 @@
|
||||
/*
|
||||
* CDE - Common Desktop Environment
|
||||
*
|
||||
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
|
||||
*
|
||||
* These libraries and programs are free software; you can
|
||||
* redistribute them and/or modify them under the terms of the GNU
|
||||
* Lesser General Public License as published by the Free Software
|
||||
* Foundation; either version 2 of the License, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* These libraries and programs are distributed in the hope that
|
||||
* they will be useful, but WITHOUT ANY WARRANTY; without even the
|
||||
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU Lesser General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with these libraries and programs; if not, write
|
||||
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
|
||||
* Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/* $XConsortium: Collate.h /main/3 1995/10/26 15:18:49 rswiston $ */
|
||||
/*
|
||||
* (c) Copyright 1993, 1994 Hewlett-Packard Company *
|
||||
* (c) Copyright 1993, 1994 International Business Machines Corp. *
|
||||
* (c) Copyright 1993, 1994 Sun Microsystems, Inc. *
|
||||
* (c) Copyright 1993, 1994 Novell, Inc. *
|
||||
*/
|
||||
/* Hp DT's version of an 8.0 include file; needed for Fnmatch */
|
||||
|
||||
#ifndef DtCOLLATE_INCLUDED
|
||||
#define DtCOLLATE_INCLUDED
|
||||
|
||||
|
||||
#define MASK077 077
|
||||
#define ENDTABLE 0377 /* end mark of 2 to 1 character */
|
||||
|
||||
struct col_21tab {
|
||||
unsigned char ch1; /* first char of 2 to 1 */
|
||||
unsigned char ch2; /* second char of 2 to 1 */
|
||||
unsigned char seqnum; /* sequence number */
|
||||
unsigned char priority; /* priority */
|
||||
};
|
||||
|
||||
struct col_12tab {
|
||||
unsigned char seqnum; /* seqnum of second char of 1 to 2 */
|
||||
unsigned char priority; /* priority of 1 to 2 char */
|
||||
};
|
||||
|
||||
#endif /* DtCOLLATE_INCLUDED */
|
||||
@@ -1,58 +0,0 @@
|
||||
/*
|
||||
* CDE - Common Desktop Environment
|
||||
*
|
||||
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
|
||||
*
|
||||
* These libraries and programs are free software; you can
|
||||
* redistribute them and/or modify them under the terms of the GNU
|
||||
* Lesser General Public License as published by the Free Software
|
||||
* Foundation; either version 2 of the License, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* These libraries and programs are distributed in the hope that
|
||||
* they will be useful, but WITHOUT ANY WARRANTY; without even the
|
||||
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU Lesser General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with these libraries and programs; if not, write
|
||||
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
|
||||
* Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/*
|
||||
* File: CommandM.h $XConsortium: CommandM.h /main/3 1995/10/26 15:18:58 rswiston $
|
||||
* Language: C
|
||||
*
|
||||
* (c) Copyright 1988, Hewlett-Packard Company, all rights reserved.
|
||||
*
|
||||
* (c) Copyright 1993, 1994 Hewlett-Packard Company *
|
||||
* (c) Copyright 1993, 1994 International Business Machines Corp. *
|
||||
* (c) Copyright 1993, 1994 Sun Microsystems, Inc. *
|
||||
* (c) Copyright 1993, 1994 Novell, Inc. *
|
||||
*/
|
||||
|
||||
#ifndef _Dt_CommandM_h
|
||||
#define _Dt_CommandM_h
|
||||
|
||||
/*
|
||||
* Command Invoker execution window types. Note that a success or
|
||||
* failure notification will be sent for each request. For
|
||||
* failures, the only data returned is an error message.
|
||||
*/
|
||||
#define DtNO_STDIO "NO_STDIO"
|
||||
#define DtTERMINAL "TERMINAL"
|
||||
#define DtPERM_TERMINAL "PERM_TERMINAL"
|
||||
#define DtOUTPUT_ONLY "OUTPUT_ONLY"
|
||||
#define DtSHARED_OUTPUT "SHARED_OUTPUT"
|
||||
|
||||
/*
|
||||
* When the session manager starts, it needs a window type (NO-STDIO),
|
||||
* but if a failure occurs, it does NOT want an error message, but
|
||||
* instead wants to receive the execution host and the execution
|
||||
* string. The following define is for this type of request.
|
||||
*/
|
||||
#define DtSTART_SESSION "START-SESSION"
|
||||
|
||||
#endif /* _Dt_CommandM_h */
|
||||
/* Do not add anything after this endif. */
|
||||
@@ -1,179 +0,0 @@
|
||||
/*
|
||||
* CDE - Common Desktop Environment
|
||||
*
|
||||
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
|
||||
*
|
||||
* These libraries and programs are free software; you can
|
||||
* redistribute them and/or modify them under the terms of the GNU
|
||||
* Lesser General Public License as published by the Free Software
|
||||
* Foundation; either version 2 of the License, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* These libraries and programs are distributed in the hope that
|
||||
* they will be useful, but WITHOUT ANY WARRANTY; without even the
|
||||
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU Lesser General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with these libraries and programs; if not, write
|
||||
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
|
||||
* Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/*
|
||||
* File: Connect.h $XConsortium: Connect.h /main/3 1995/10/26 15:19:09 rswiston $
|
||||
* Language: C
|
||||
*
|
||||
* (c) Copyright 1990, Hewlett-Packard Company, all rights reserved.
|
||||
*
|
||||
* (c) Copyright 1993, 1994 Hewlett-Packard Company *
|
||||
* (c) Copyright 1993, 1994 International Business Machines Corp. *
|
||||
* (c) Copyright 1993, 1994 Sun Microsystems, Inc. *
|
||||
* (c) Copyright 1993, 1994 Novell, Inc. *
|
||||
*/
|
||||
|
||||
#ifndef _Dt_connect_h
|
||||
#define _Dt_connect_h
|
||||
|
||||
#include <Dt/DtP.h>
|
||||
#include <bms/connect.h>
|
||||
#include <codelibs/pathutils.h>
|
||||
|
||||
#define DtGetShortHostname Xegetshorthostname
|
||||
#define DtGetHostname Xegethostname
|
||||
/*
|
||||
DESCRIPTION:
|
||||
|
||||
These functions are similiar to gethostname(2), however
|
||||
DtGetHostname always returns a full domain-qualified name
|
||||
and DtGetShortHostname returns a simple name.
|
||||
|
||||
SYNOPSIS:
|
||||
|
||||
status = DtGet[Short]Hostname (hostname, size)
|
||||
|
||||
int status; Returns 0 on success, -1 on failure.
|
||||
[Actually it returns what gethostname(2)
|
||||
returns, which is ambiguous in the
|
||||
HP-UX manual.]
|
||||
|
||||
char *hostname; The hostname is returned here.
|
||||
|
||||
int size; The name is truncated to "size - 1" and
|
||||
is null-terminated.
|
||||
*/
|
||||
|
||||
#define DtGetcwd Xegetcwd
|
||||
/*
|
||||
DESCRIPTION:
|
||||
|
||||
This function is similar to getcwd except it first checks $PWD.
|
||||
It only calls getcwd if $PWD is not set.
|
||||
|
||||
SYNOPSIS:
|
||||
|
||||
cwd = DtGetcwd (buf, size)
|
||||
|
||||
char *cwd; Pointer to the returned value. (Typically
|
||||
the same value as 'buf' that is passed in.)
|
||||
|
||||
char *buf; Pointer to memory allocated by the caller.
|
||||
Buf must be large enough to hold the string.
|
||||
|
||||
int size; Size of buf in bytes.
|
||||
*/
|
||||
|
||||
#define DtIsLocalHostP XeIsLocalHostP
|
||||
/*
|
||||
DESCRIPTION:
|
||||
|
||||
Tests whether a passed-in hostname identifies the host on which
|
||||
the function is being executed. This handles all combinations of
|
||||
simple and domain-qualified names for either the hostname passed
|
||||
in or the one defined on the local host.
|
||||
|
||||
WARNING: Returns BOOLEAN, not INT. DONT TREAT IT AS AN INT!
|
||||
|
||||
SYNOPSIS:
|
||||
|
||||
status = XeIsLocalHostP (hostname);
|
||||
|
||||
Boolean status; Returns TRUE if "hostname" identifies the
|
||||
local host, FALSE otherwise.
|
||||
|
||||
char *hostname; The hostname (either simple or domain-
|
||||
qualified) to test.
|
||||
*/
|
||||
|
||||
#define DtIsSameHostP XeIsSameHostP
|
||||
/*
|
||||
DESCRIPTION:
|
||||
|
||||
Compares two hostnames to see if they specify the same host.
|
||||
This handles combinations of simple and domain-qualified names.
|
||||
This function canonicalizes both names and then compares them.
|
||||
|
||||
WARNING: Returns BOOLEAN, not INT. DONT TREAT IT AS AN INT!
|
||||
|
||||
SYNOPSIS:
|
||||
|
||||
status = DtIsSameHostP (host1, host2);
|
||||
|
||||
Boolean status; Returns TRUE if host1 and host2 identify
|
||||
the same host, FALSE otherwise.
|
||||
|
||||
char *host1, *host2; The two hostnames (either simple or
|
||||
domain-qualified) to compare.
|
||||
*/
|
||||
|
||||
#define DtCreateContextString XeCreateContextString
|
||||
/*
|
||||
DESCRIPTION:
|
||||
|
||||
DtCreateContextString takes the three parts of a context and
|
||||
puts them into a single string, in the form "host:/dir/file".
|
||||
|
||||
A NEW STRING, OWNED BY THE CALLER, is returned.
|
||||
|
||||
SYNOPSIS:
|
||||
|
||||
context_string = DtCreateContextString (host, dir, file);
|
||||
|
||||
DtString context_string; The returned context. The memory is owned
|
||||
by the caller. "NULL" is returned if the
|
||||
context cannot be created.
|
||||
|
||||
DtString host; The name of the host.
|
||||
|
||||
DtString dir; The directory.
|
||||
|
||||
DtString file; The name of the file.
|
||||
*/
|
||||
|
||||
#define DtEliminateDots XeEliminateDots
|
||||
/*
|
||||
DESCRIPTION:
|
||||
|
||||
This routine removes /./'s and /../'s from a path. It will
|
||||
OVERWRITE the path IT WAS PASSED. If there are too many /../'s
|
||||
in the path this function will return NULL, so you better keep
|
||||
a pointer to the path if you hope to reclaim it.
|
||||
|
||||
This function does not handle "host:/directory/file", shell
|
||||
variables, or other exotic animals.
|
||||
|
||||
SYNOPSIS:
|
||||
|
||||
fixed_path = DtEliminateDots (path);
|
||||
|
||||
DtString fixed_path; A pointer to the same path that was passed in
|
||||
(though now it is fixed up) or NULL if problems
|
||||
were encountered.
|
||||
|
||||
DtString path; The path that needs fixing up.
|
||||
*/
|
||||
|
||||
#define DtParseFileString XeParseFileString
|
||||
|
||||
#endif /* _Dt_connect_h */
|
||||
/* Do not add anything after this endif. */
|
||||
@@ -1,58 +0,0 @@
|
||||
/*
|
||||
* CDE - Common Desktop Environment
|
||||
*
|
||||
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
|
||||
*
|
||||
* These libraries and programs are free software; you can
|
||||
* redistribute them and/or modify them under the terms of the GNU
|
||||
* Lesser General Public License as published by the Free Software
|
||||
* Foundation; either version 2 of the License, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* These libraries and programs are distributed in the hope that
|
||||
* they will be useful, but WITHOUT ANY WARRANTY; without even the
|
||||
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU Lesser General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with these libraries and programs; if not, write
|
||||
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
|
||||
* Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/* $XConsortium: DataTypes.h /main/3 1995/10/26 15:19:20 rswiston $ */
|
||||
/*
|
||||
* (c) Copyright 1993, 1994 Hewlett-Packard Company *
|
||||
* (c) Copyright 1993, 1994 International Business Machines Corp. *
|
||||
* (c) Copyright 1993, 1994 Sun Microsystems, Inc. *
|
||||
* (c) Copyright 1993, 1994 Novell, Inc. *
|
||||
*/
|
||||
/* -*-C-*-
|
||||
*******************************************************************************
|
||||
*
|
||||
* File: DataTypes.h
|
||||
* Description: This file defines data types that are used throughout the
|
||||
* DT code.
|
||||
*
|
||||
* Common Desktop Environment (CDE)
|
||||
*
|
||||
* (c) Copyright 1993 Hewlett-Packard Company
|
||||
* (c) Copyright 1993 International Business Machines Corp.
|
||||
* (c) Copyright 1993 Sun Microsystems, Inc.
|
||||
*
|
||||
*
|
||||
* Disclaimer: This file could change between the 10/93 snapshot and the
|
||||
* final release of CDE 1.0
|
||||
*
|
||||
*******************************************************************************
|
||||
*/
|
||||
|
||||
#ifndef _Dt_DataTypes_h
|
||||
#define _Dt_DataTypes_h
|
||||
|
||||
#include <X11/Intrinsic.h>
|
||||
|
||||
typedef XtPointer Pointer;
|
||||
|
||||
#endif /* _Dt_DataTypes_h */
|
||||
/* Do not add anything after this endif. */
|
||||
@@ -1,69 +0,0 @@
|
||||
/*
|
||||
* CDE - Common Desktop Environment
|
||||
*
|
||||
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
|
||||
*
|
||||
* These libraries and programs are free software; you can
|
||||
* redistribute them and/or modify them under the terms of the GNU
|
||||
* Lesser General Public License as published by the Free Software
|
||||
* Foundation; either version 2 of the License, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* These libraries and programs are distributed in the hope that
|
||||
* they will be useful, but WITHOUT ANY WARRANTY; without even the
|
||||
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU Lesser General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with these libraries and programs; if not, write
|
||||
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
|
||||
* Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/* $TOG: DtGetMessageP.h /main/5 1998/07/30 12:14:37 mgreess $
|
||||
*
|
||||
* (c) Copyright 1995 Digital Equipment Corporation.
|
||||
* (c) Copyright 1995 Hewlett-Packard Company.
|
||||
* (c) Copyright 1995 International Business Machines Corp.
|
||||
* (c) Copyright 1995 Sun Microsystems, Inc.
|
||||
* (c) Copyright 1995 Novell, Inc.
|
||||
* (c) Copyright 1995 FUJITSU LIMITED.
|
||||
* (c) Copyright 1995 Hitachi.
|
||||
*
|
||||
* DtGetMessage.h - Interfaces for the DtSvc library's private message
|
||||
* catalog APIs
|
||||
*/
|
||||
|
||||
#ifndef _DtGetMessage_h
|
||||
#define _DtGetMessage_h
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
* External declarations
|
||||
*/
|
||||
extern char *Dt11GetMessage (
|
||||
char *filename,
|
||||
int set,
|
||||
int number,
|
||||
char *string);
|
||||
|
||||
/*
|
||||
* Dt11GETMESSAGE macro
|
||||
*/
|
||||
#ifndef NO_MESSAGE_CATALOG
|
||||
# define _MESSAGE_CAT_NAME "dt"
|
||||
# define Dt11GETMESSAGE(set, number, string)\
|
||||
Dt11GetMessage(_MESSAGE_CAT_NAME, set, number, string)
|
||||
#else
|
||||
# define Dt11GETMESSAGE(set, number, string)\
|
||||
string
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _DtGetMessage_h */
|
||||
@@ -1,127 +0,0 @@
|
||||
/*
|
||||
* CDE - Common Desktop Environment
|
||||
*
|
||||
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
|
||||
*
|
||||
* These libraries and programs are free software; you can
|
||||
* redistribute them and/or modify them under the terms of the GNU
|
||||
* Lesser General Public License as published by the Free Software
|
||||
* Foundation; either version 2 of the License, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* These libraries and programs are distributed in the hope that
|
||||
* they will be useful, but WITHOUT ANY WARRANTY; without even the
|
||||
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU Lesser General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with these libraries and programs; if not, write
|
||||
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
|
||||
* Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/* $XConsortium: DtNlUtils.h /main/4 1996/06/21 17:22:30 ageorge $ */
|
||||
/*
|
||||
* (c) Copyright 1993, 1994 Hewlett-Packard Company *
|
||||
* (c) Copyright 1993, 1994 International Business Machines Corp. *
|
||||
* (c) Copyright 1993, 1994 Sun Microsystems, Inc. *
|
||||
* (c) Copyright 1993, 1994 Novell, Inc. *
|
||||
*/
|
||||
/**************************************************************************/
|
||||
/* */
|
||||
/* Public include file for Dt localization functions. */
|
||||
/* */
|
||||
/**************************************************************************/
|
||||
|
||||
#ifdef NLS16
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <locale.h>
|
||||
#include <string.h>
|
||||
#include <limits.h>
|
||||
#include <nl_types.h>
|
||||
#include <langinfo.h>
|
||||
#endif
|
||||
|
||||
#include <X11/Intrinsic.h>
|
||||
|
||||
|
||||
#ifdef NLS16
|
||||
|
||||
#define is_multibyte _DtNl_is_multibyte
|
||||
extern Boolean _DtNl_is_multibyte;
|
||||
|
||||
|
||||
extern void Dt_nlInit( void ) ;
|
||||
extern char * Dt_strtok(
|
||||
char *s1,
|
||||
char *s2) ;
|
||||
extern char * Dt_strtok_r(
|
||||
char *s1,
|
||||
char *s2,
|
||||
char **ptr) ;
|
||||
extern int Dt_strspn(
|
||||
char *s1,
|
||||
char *s2) ;
|
||||
extern int Dt_strcspn(
|
||||
char *s1,
|
||||
char *s2) ;
|
||||
extern char * Dt_strchr(
|
||||
char *s,
|
||||
char c) ;
|
||||
extern char * Dt_strrchr(
|
||||
char *s,
|
||||
char c) ;
|
||||
extern void Dt_lastChar(
|
||||
char *s,
|
||||
char **cptr,
|
||||
int *lenptr) ;
|
||||
extern int Dt_charCount(
|
||||
char *s) ;
|
||||
|
||||
extern char * _Dt_NextChar(char *s);
|
||||
extern char * _Dt_PrevChar(const char *start,char *s);
|
||||
extern int _Dt_isspace(char *s);
|
||||
extern int _Dt_isdigit(char *s);
|
||||
|
||||
#define DtNlInitialize() (Dt_nlInit())
|
||||
#define DtStrtok(s1, s2) (Dt_strtok(s1, s2))
|
||||
#define DtStrtok_r(s1, s2, ptr) (Dt_strtok_r(s1, s2, ptr))
|
||||
#define DtStrspn(s1, s2) (Dt_strspn(s1, s2))
|
||||
#define DtStrcspn(s1, s2) (Dt_strcspn(s1, s2))
|
||||
#define DtStrchr(s1, c) (Dt_strchr(s1, c))
|
||||
#define DtStrrchr(s1, c) (Dt_strrchr(s1, c))
|
||||
#define DtLastChar(s1, cp, lp) (Dt_lastChar(s1, cp, lp))
|
||||
#define DtCharCount(s1) (Dt_charCount(s1))
|
||||
#define DtNextChar(s) (is_multibyte?_Dt_NextChar(s):((s)+1))
|
||||
#define DtPrevChar(st,s) (is_multibyte?_Dt_PrevChar(st,s):((s)-1))
|
||||
#define DtIsspace(s) (is_multibyte?_Dt_isspace(s):isspace(*(s)))
|
||||
#define DtIsdigit(s) (is_multibyte?_Dt_isdigit(s):isdigit(*(s)))
|
||||
|
||||
#else /* NLS16 */
|
||||
|
||||
#define DtNlInitialize()
|
||||
#define DtStrtok(s1, s2) (strtok(s1, s2))
|
||||
#define DtStrtok_r(s1, s2, ptr) (strtok_r(s1, s2, ptr))
|
||||
#define DtStrspn(s1, s2) (strspn(s1, s2))
|
||||
#define DtStrcspn(s1, s2) (strcspn(s1, s2))
|
||||
#define DtStrchr(s1, c) (strchr(s1, c))
|
||||
#define DtStrrchr(s1, c) (strrchr(s1, c))
|
||||
#define DtLastChar(s1, cp, lp) {(*cp = s1 + strlen(s1) - 1); *lp = 1;}
|
||||
#define DtCharCount(s1) (strlen(s1))
|
||||
#define DtNextChar(s) ((s)+1)
|
||||
#define DtPrevChar(st,s) ((s)-1)
|
||||
#define DtIsspace(s) (isspace(*s))
|
||||
#define DtIsdigit(s) (isdigit(*s))
|
||||
#endif /* NLS16 */
|
||||
|
||||
extern char * _DtGetNthChar(
|
||||
char *s,
|
||||
int n) ;
|
||||
extern char * _dt_strpbrk(
|
||||
char *cs,
|
||||
char *ct);
|
||||
extern int _is_previous_single(
|
||||
char *s1,
|
||||
char *s2);
|
||||
|
||||
@@ -1,145 +0,0 @@
|
||||
/*
|
||||
* CDE - Common Desktop Environment
|
||||
*
|
||||
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
|
||||
*
|
||||
* These libraries and programs are free software; you can
|
||||
* redistribute them and/or modify them under the terms of the GNU
|
||||
* Lesser General Public License as published by the Free Software
|
||||
* Foundation; either version 2 of the License, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* These libraries and programs are distributed in the hope that
|
||||
* they will be useful, but WITHOUT ANY WARRANTY; without even the
|
||||
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU Lesser General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with these libraries and programs; if not, write
|
||||
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
|
||||
* Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/*
|
||||
* File: DtP.h $TOG: DtP.h /main/7 1998/07/30 12:12:49 mgreess $
|
||||
* Language: C
|
||||
*/
|
||||
|
||||
#ifndef _DtP_h
|
||||
#define _DtP_h
|
||||
|
||||
#include <X11/Xmd.h> /* for protocol typedefs */
|
||||
#include <X11/Intrinsic.h>
|
||||
|
||||
#include <Dt/DtPStrings.h>
|
||||
#include <Dt/DtGetMessageP.h>
|
||||
|
||||
#include <bms/sbport.h>
|
||||
#include <bms/bms.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*********************************
|
||||
*
|
||||
* Miscellaneous Data Types
|
||||
*
|
||||
*********************************/
|
||||
|
||||
#define DtChar XeChar
|
||||
#define DtString XeString
|
||||
|
||||
/*********************************
|
||||
*
|
||||
* Initalization
|
||||
*
|
||||
*********************************/
|
||||
|
||||
#define DtToolClass XeToolClass
|
||||
|
||||
/*********************************
|
||||
*
|
||||
* Global variables (defined in DtUtil.c)
|
||||
*
|
||||
*********************************/
|
||||
extern Display * _DtDisplay;
|
||||
extern char * _DtApplicationName;
|
||||
extern char * _DtApplicationClass;
|
||||
extern char * _DtToolClass;
|
||||
|
||||
extern XtAppContext _DtAppContext;
|
||||
extern XrmDatabase _DtResourceDatabase;
|
||||
extern Widget _DtInitTtContextWidget;
|
||||
extern XtAppContext * _DtInitAppContextp;
|
||||
|
||||
extern void _DtAddToResource( Display *, const char * );
|
||||
extern void _DtAddResString( Display *, const char *, unsigned int);
|
||||
extern char * _DtGetResString( Display *dpy, unsigned int);
|
||||
|
||||
|
||||
#define _DT_ATR_RESMGR (1 << 0)
|
||||
#define _DT_ATR_PREFS (1 << 1)
|
||||
|
||||
/*
|
||||
DESCRIPTION:
|
||||
|
||||
Add strings to XA_RESOURCE_MANAGER property on the default root
|
||||
window. Correctly merges resource specifications with the same
|
||||
name and different values. The new value overwrites the old.
|
||||
|
||||
_DtAddToResource() may be used where you would have used xrdb to
|
||||
add a resource.
|
||||
|
||||
SYNOPSIS:
|
||||
|
||||
void _DtAddToResource(dpy,data)
|
||||
|
||||
Display *dpy; The application's display structure.
|
||||
|
||||
char *data; The string to be added to the
|
||||
XA_RESOURCE_MANAGER property.
|
||||
|
||||
*/
|
||||
|
||||
extern char *_DtCreateDtDirs( Display * );
|
||||
/*
|
||||
DESCRIPTION:
|
||||
|
||||
Creates the directories needed for dt to operate in. When an
|
||||
application saves its state inside a file, it should call this
|
||||
routine to set up the directories before saving any files. The
|
||||
routine constructs the path to which all save files should be saved
|
||||
to when responding the the WM_SAVE_YOURSELF message issued by the
|
||||
session manager. The routine returns the path to save to. It also
|
||||
allocates the memory for the path so when you are done with it you
|
||||
should free() it.
|
||||
|
||||
WARNING: If it can't create the directory it returns NULL
|
||||
|
||||
SYNOPSIS:
|
||||
|
||||
dirName = _DtCreateDtDirs (display);
|
||||
|
||||
char *dirName; The path to save to.
|
||||
|
||||
Display *display; The application's display structure.
|
||||
*/
|
||||
|
||||
/*
|
||||
* The following string globals are available for use by any DT
|
||||
* component. They represent the button labels in most dialogs,
|
||||
* and will be automatically localized by DtInitialize().
|
||||
*/
|
||||
extern const char * _DtOkString;
|
||||
extern const char * _DtCancelString;
|
||||
extern const char * _DtHelpString;
|
||||
extern const char * _DtApplyString;
|
||||
extern const char * _DtCloseString;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Do not add anything after this endif. */
|
||||
#endif /* _DtP_h */
|
||||
@@ -1,87 +0,0 @@
|
||||
/*
|
||||
* CDE - Common Desktop Environment
|
||||
*
|
||||
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
|
||||
*
|
||||
* These libraries and programs are free software; you can
|
||||
* redistribute them and/or modify them under the terms of the GNU
|
||||
* Lesser General Public License as published by the Free Software
|
||||
* Foundation; either version 2 of the License, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* These libraries and programs are distributed in the hope that
|
||||
* they will be useful, but WITHOUT ANY WARRANTY; without even the
|
||||
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU Lesser General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with these libraries and programs; if not, write
|
||||
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
|
||||
* Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/*
|
||||
* File: DtPStrings.h $XConsortium: DtPStrings.h /main/5 1995/12/14 11:02:36 barstow $
|
||||
* Language: C
|
||||
*/
|
||||
#ifndef _DtPStrings_h
|
||||
#define _DtPStrings_h
|
||||
|
||||
/*
|
||||
* DT applications should use this name to look up DT-global
|
||||
* resources instead of argv[0].
|
||||
*/
|
||||
#define DtDT_PROG_NAME "dt"
|
||||
|
||||
/*
|
||||
* DT applications should use this class name to look up DT-global
|
||||
* resources.
|
||||
*/
|
||||
#define DtDT_PROG_CLASS "Dt"
|
||||
|
||||
/*
|
||||
* The following string constants define the standard DT configuration
|
||||
* directories.
|
||||
*/
|
||||
#define DtPERSONAL_CONFIG_DIRECTORY ".dt"
|
||||
#define DtSM_SESSION_DIRECTORY "sessions"
|
||||
#define DtSM_SESSION_DISPLAY_DIRECTORY "display"
|
||||
#define DtCURRENT_DT_VERSION "3.0"
|
||||
|
||||
/*
|
||||
* If you change the following two #defines, you must also change the
|
||||
* related one below (DtDB_DIRS_DEFAULT).
|
||||
*/
|
||||
#define DtPERSONAL_DB_DIRECTORY ".dt/types"
|
||||
#define DtPERSONAL_TMP_DIRECTORY ".dt/tmp"
|
||||
|
||||
/*
|
||||
* Names for the message log files
|
||||
*/
|
||||
#define DtERRORLOG_FILE "errorlog"
|
||||
#define DtOLD_ERRORLOG_FILE "errorlog.old"
|
||||
#define DtOLDER_ERRORLOG_FILE "errorlog.older"
|
||||
|
||||
/*
|
||||
* Strings for default types and icons
|
||||
*/
|
||||
#define DtDEFAULT_DATA_FT_NAME "DATA"
|
||||
|
||||
/*
|
||||
* The following string constants define the resource name,
|
||||
* resource class and default values for the action bitmaps.
|
||||
*/
|
||||
#define DtACTION_ICON_RESOURCE_NAME "actionIcon"
|
||||
#define DtACTION_ICON_RESOURCE_CLASS "ActionIcon"
|
||||
#define DtACTION_ICON_DEFAULT "Dtactn"
|
||||
|
||||
/*
|
||||
* The following string constants define the resource name,
|
||||
* resource class and default values for the Dt tmp directory path.
|
||||
*/
|
||||
#define DtACTION_DTTMPDIR_RESOURCE_NAME "dtTmpDir"
|
||||
#define DtACTION_DTTMPDIR_RESOURCE_CLASS "DtTmpDir"
|
||||
#define DtACTION_DTTMPDIR_DEFAULT ".dt/tmp"
|
||||
|
||||
/* Do not add anything after this endif. */
|
||||
#endif /* _DtPStrings_h */
|
||||
@@ -1,248 +0,0 @@
|
||||
/*
|
||||
* CDE - Common Desktop Environment
|
||||
*
|
||||
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
|
||||
*
|
||||
* These libraries and programs are free software; you can
|
||||
* redistribute them and/or modify them under the terms of the GNU
|
||||
* Lesser General Public License as published by the Free Software
|
||||
* Foundation; either version 2 of the License, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* These libraries and programs are distributed in the hope that
|
||||
* they will be useful, but WITHOUT ANY WARRANTY; without even the
|
||||
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU Lesser General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with these libraries and programs; if not, write
|
||||
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
|
||||
* Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/* $TOG: DtosP.h /main/4 1998/01/21 16:37:29 mgreess $ */
|
||||
/*
|
||||
* (c) Copyright 1993, 1994 Hewlett-Packard Company *
|
||||
* (c) Copyright 1993, 1994 International Business Machines Corp. *
|
||||
* (c) Copyright 1993, 1994 Sun Microsystems, Inc. *
|
||||
* (c) Copyright 1993, 1994 Novell, Inc. *
|
||||
*/
|
||||
#ifdef REV_INFO
|
||||
#ifndef lint
|
||||
static char SCCSID[] = "OSF/Motif: @(#)_DtosP.h 4.16 91/09/12";
|
||||
#endif /* lint */
|
||||
#endif /* REV_INFO */
|
||||
/******************************************************************************
|
||||
*******************************************************************************
|
||||
*
|
||||
* (c) Copyright 1989, 1990, 1991 OPEN SOFTWARE FOUNDATION, INC.
|
||||
* (c) Copyright 1989, DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASS.
|
||||
* (c) Copyright 1987, 1988, 1989, 1990, 1991 HEWLETT-PACKARD COMPANY
|
||||
* ALL RIGHTS RESERVED
|
||||
*
|
||||
* THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE USED
|
||||
* AND COPIED ONLY IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE AND
|
||||
* WITH THE INCLUSION OF THE ABOVE COPYRIGHT NOTICE. THIS SOFTWARE OR
|
||||
* ANY OTHER COPIES THEREOF MAY NOT BE PROVIDED OR OTHERWISE MADE
|
||||
* AVAILABLE TO ANY OTHER PERSON. NO TITLE TO AND OWNERSHIP OF THE
|
||||
* SOFTWARE IS HEREBY TRANSFERRED.
|
||||
*
|
||||
* THE INFORMATION IN THIS SOFTWARE IS SUBJECT TO CHANGE WITHOUT
|
||||
* NOTICE AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY OPEN SOFTWARE
|
||||
* FOUNDATION, INC. OR ITS THIRD PARTY SUPPLIERS
|
||||
*
|
||||
* OPEN SOFTWARE FOUNDATION, INC. AND ITS THIRD PARTY SUPPLIERS,
|
||||
* ASSUME NO RESPONSIBILITY FOR THE USE OR INABILITY TO USE ANY OF ITS
|
||||
* SOFTWARE . OSF SOFTWARE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY
|
||||
* KIND, AND OSF EXPRESSLY DISCLAIMS ALL IMPLIED WARRANTIES, INCLUDING
|
||||
* BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
* FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* Notice: Notwithstanding any other lease or license that may pertain to,
|
||||
* or accompany the delivery of, this computer software, the rights of the
|
||||
* Government regarding its use, reproduction and disclosure are as set
|
||||
* forth in Section 52.227-19 of the FARS Computer Software-Restricted
|
||||
* Rights clause.
|
||||
*
|
||||
* (c) Copyright 1989, 1990, 1991 Open Software Foundation, Inc. Unpublished - all
|
||||
* rights reserved under the Copyright laws of the United States.
|
||||
*
|
||||
* RESTRICTED RIGHTS NOTICE: Use, duplication, or disclosure by the
|
||||
* Government is subject to the restrictions as set forth in subparagraph
|
||||
* (c)(1)(ii) of the Rights in Technical Data and Computer Software clause
|
||||
* at DFARS 52.227-7013.
|
||||
*
|
||||
* Open Software Foundation, Inc.
|
||||
* 11 Cambridge Center
|
||||
* Cambridge, MA 02142
|
||||
* (617)621-8700
|
||||
*
|
||||
* RESTRICTED RIGHTS LEGEND: This computer software is submitted with
|
||||
* "restricted rights." Use, duplication or disclosure is subject to the
|
||||
* restrictions as set forth in NASA FAR SUP 18-52.227-79 (April 1985)
|
||||
* "Commercial Computer Software- Restricted Rights (April 1985)." Open
|
||||
* Software Foundation, Inc., 11 Cambridge Center, Cambridge, MA 02142. If
|
||||
* the contract contains the Clause at 18-52.227-74 "Rights in Data General"
|
||||
* then the "Alternate III" clause applies.
|
||||
*
|
||||
* (c) Copyright 1989, 1990, 1991 Open Software Foundation, Inc.
|
||||
* ALL RIGHTS RESERVED
|
||||
*
|
||||
*
|
||||
* Open Software Foundation is a trademark of The Open Software Foundation, Inc.
|
||||
* OSF is a trademark of Open Software Foundation, Inc.
|
||||
* OSF/Motif is a trademark of Open Software Foundation, Inc.
|
||||
* Motif is a trademark of Open Software Foundation, Inc.
|
||||
* DEC is a registered trademark of Digital Equipment Corporation
|
||||
* DIGITAL is a registered trademark of Digital Equipment Corporation
|
||||
* X Window System is a trademark of the Massachusetts Institute of Technology
|
||||
*
|
||||
*******************************************************************************
|
||||
******************************************************************************/
|
||||
#ifndef __DtosP_h
|
||||
#define __DtosP_h
|
||||
|
||||
#ifndef NO_MEMMOVE
|
||||
# ifndef X_NOT_STDC_ENV
|
||||
# include <stdlib.h> /* Needed for MB_CUR_MAX, mbtowc, mbstowcs and mblen */
|
||||
# endif
|
||||
#else
|
||||
# define memmove( p1, p2, p3 ) bcopy( p2, p1, p3 )
|
||||
#endif
|
||||
|
||||
#ifdef BOGUS_MB_MAX /* some systems don't properly set MB_[CUR|LEN]_MAX */
|
||||
# undef MB_LEN_MAX
|
||||
# define MB_LEN_MAX 1 /* temp fix */
|
||||
# undef MB_CUR_MAX
|
||||
# define MB_CUR_MAX 1 /* temp fix */
|
||||
#endif /* BOGUS_MB_MAX */
|
||||
|
||||
/**********************************************************************/
|
||||
/* here we duplicate Xtos.h, since we can't include this private file */
|
||||
|
||||
#ifdef INCLUDE_ALLOCA_H
|
||||
# include <alloca.h>
|
||||
#endif
|
||||
|
||||
#ifdef CRAY
|
||||
# define WORD64
|
||||
#endif
|
||||
|
||||
/* stolen from server/include/os.h */
|
||||
#ifndef NO_ALLOCA
|
||||
/*
|
||||
* os-dependent definition of local allocation and deallocation
|
||||
* If you want something other than XtMalloc/XtFree for ALLOCATE/DEALLOCATE
|
||||
* LOCAL then you add that in here.
|
||||
*/
|
||||
# if defined(__HIGHC__)
|
||||
|
||||
# if HCVERSION < 21003
|
||||
# define ALLOCATE_LOCAL(size) alloca((int)(size))
|
||||
#pragma on(alloca);
|
||||
# else /* HCVERSION >= 21003 */
|
||||
# define ALLOCATE_LOCAL(size) _Alloca((int)(size))
|
||||
# endif /* HCVERSION < 21003 */
|
||||
|
||||
# define DEALLOCATE_LOCAL(ptr) /* as nothing */
|
||||
|
||||
# endif /* defined(__HIGHC__) */
|
||||
|
||||
|
||||
# ifdef __GNUC__
|
||||
# ifdef alloca
|
||||
# undef alloca
|
||||
# endif
|
||||
# define alloca __builtin_alloca
|
||||
# define ALLOCATE_LOCAL(size) alloca((int)(size))
|
||||
# define DEALLOCATE_LOCAL(ptr) /* as nothing */
|
||||
# else /* ! __GNUC__ */
|
||||
/*
|
||||
* warning: mips alloca is unsuitable, do not use.
|
||||
*/
|
||||
# if defined(vax) || defined(sun) || defined(stellar)
|
||||
/*
|
||||
* Some System V boxes extract alloca.o from /lib/libPW.a; if you
|
||||
* decide that you don't want to use alloca, you might want to fix it here.
|
||||
*/
|
||||
char *alloca();
|
||||
# define ALLOCATE_LOCAL(size) alloca((int)(size))
|
||||
# define DEALLOCATE_LOCAL(ptr) /* as nothing */
|
||||
# endif /* who does alloca */
|
||||
# endif /* __GNUC__ */
|
||||
|
||||
#endif /* NO_ALLOCA */
|
||||
|
||||
#ifndef ALLOCATE_LOCAL
|
||||
# define ALLOCATE_LOCAL(size) XtMalloc((unsigned long)(size))
|
||||
# define DEALLOCATE_LOCAL(ptr) XtFree((XtPointer)(ptr))
|
||||
#endif /* ALLOCATE_LOCAL */
|
||||
|
||||
/* End of Xtos.h */
|
||||
/*****************/
|
||||
|
||||
|
||||
/*
|
||||
* Default Icon Search Paths
|
||||
*
|
||||
* The following are default starter values for XMICONSEARCHPATH and
|
||||
* XMICONBMSEARCHPATH, respectively. Code elsewhere must ensure that paths
|
||||
* into the user's home directory occur in front of these paths in the
|
||||
* environment variables. Note the apparently redundant use of ANSI C string
|
||||
* constant concatenation; this is necessary in order to avoid the sequence of
|
||||
* characters % B %, which form an SCCS id keyword.
|
||||
*/
|
||||
|
||||
#define DTPMSYSDEFAULT \
|
||||
CDE_CONFIGURATION_TOP "/appconfig/icons/%L/%B" "%M.pm:" \
|
||||
CDE_CONFIGURATION_TOP "/appconfig/icons/%L/%B" "%M.bm:" \
|
||||
CDE_CONFIGURATION_TOP "/appconfig/icons/%L/%B:" \
|
||||
\
|
||||
CDE_CONFIGURATION_TOP "/appconfig/icons/C/%B" "%M.pm:" \
|
||||
CDE_CONFIGURATION_TOP "/appconfig/icons/C/%B" "%M.bm:" \
|
||||
CDE_CONFIGURATION_TOP "/appconfig/icons/C/%B:" \
|
||||
\
|
||||
CDE_INSTALLATION_TOP "/appconfig/icons/%L/%B" "%M.pm:" \
|
||||
CDE_INSTALLATION_TOP "/appconfig/icons/%L/%B" "%M.bm:" \
|
||||
CDE_INSTALLATION_TOP "/appconfig/icons/%L/%B:" \
|
||||
\
|
||||
CDE_INSTALLATION_TOP "/appconfig/icons/C/%B" "%M.pm:" \
|
||||
CDE_INSTALLATION_TOP "/appconfig/icons/C/%B" "%M.bm:" \
|
||||
CDE_INSTALLATION_TOP "/appconfig/icons/C/%B"
|
||||
|
||||
#define DTBMSYSDEFAULT \
|
||||
CDE_CONFIGURATION_TOP "/appconfig/icons/%L/%B" "%M.bm:" \
|
||||
CDE_CONFIGURATION_TOP "/appconfig/icons/%L/%B" "%M.pm:" \
|
||||
CDE_CONFIGURATION_TOP "/appconfig/icons/%L/%B:" \
|
||||
\
|
||||
CDE_CONFIGURATION_TOP "/appconfig/icons/C/%B" "%M.bm:" \
|
||||
CDE_CONFIGURATION_TOP "/appconfig/icons/C/%B" "%M.pm:" \
|
||||
CDE_CONFIGURATION_TOP "/appconfig/icons/C/%B:" \
|
||||
\
|
||||
CDE_INSTALLATION_TOP "/appconfig/icons/%L/%B" "%M.bm:" \
|
||||
CDE_INSTALLATION_TOP "/appconfig/icons/%L/%B" "%M.pm:" \
|
||||
CDE_INSTALLATION_TOP "/appconfig/icons/%L/%B:" \
|
||||
\
|
||||
CDE_INSTALLATION_TOP "/appconfig/icons/C/%B" "%M.bm:" \
|
||||
CDE_INSTALLATION_TOP "/appconfig/icons/C/%B" "%M.pm:" \
|
||||
CDE_INSTALLATION_TOP "/appconfig/icons/C/%B"
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/******** Private Function Declarations ********/
|
||||
|
||||
/******** End Private Function Declarations ********/
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* Close scope of 'extern "C"' declaration which encloses file. */
|
||||
#endif
|
||||
|
||||
#endif /* __DtosP_h */
|
||||
/* DON'T ADD ANYTHING AFTER THIS #endif */
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,61 +0,0 @@
|
||||
/*
|
||||
* CDE - Common Desktop Environment
|
||||
*
|
||||
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
|
||||
*
|
||||
* These libraries and programs are free software; you can
|
||||
* redistribute them and/or modify them under the terms of the GNU
|
||||
* Lesser General Public License as published by the Free Software
|
||||
* Foundation; either version 2 of the License, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* These libraries and programs are distributed in the hope that
|
||||
* they will be useful, but WITHOUT ANY WARRANTY; without even the
|
||||
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU Lesser General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with these libraries and programs; if not, write
|
||||
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
|
||||
* Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/* $XConsortium: DtpadM.h /main/3 1995/10/26 15:20:56 rswiston $ */
|
||||
/************************************<+>*************************************
|
||||
****************************************************************************
|
||||
**
|
||||
** File: DtpadM.h
|
||||
**
|
||||
** Project: HP-DT "dtpad" text editor
|
||||
**
|
||||
** Description: Defines for the tool class and messages for the
|
||||
** dtpad text editor
|
||||
**
|
||||
**
|
||||
** (c) Copyright 1993, 1994 Hewlett-Packard Company
|
||||
** (c) Copyright 1993, 1994 International Business Machines Corp.
|
||||
** (c) Copyright 1993, 1994 Sun Microsystems, Inc.
|
||||
** (c) Copyright 1993, 1994 Novell, Inc.
|
||||
**
|
||||
**
|
||||
**
|
||||
****************************************************************************
|
||||
************************************<+>*************************************/
|
||||
|
||||
#ifndef _DtpadM_h
|
||||
#define _DtpadM_h
|
||||
|
||||
#define DTPAD_TOOL_CLASS "DTPAD"
|
||||
|
||||
/*
|
||||
* Request Messages which the editor understands
|
||||
*/
|
||||
#define DTPAD_RUN_SESSION_MSG "RUN_SESSION"
|
||||
#define DTPAD_OPEN_FILE_MSG "OPEN_FILE"
|
||||
|
||||
/*
|
||||
* Notification Messages which the Editor sends
|
||||
*/
|
||||
#define DTPAD_DONE "DONE"
|
||||
|
||||
#endif /*_DtpadM_h*/
|
||||
@@ -1,124 +0,0 @@
|
||||
/*
|
||||
* CDE - Common Desktop Environment
|
||||
*
|
||||
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
|
||||
*
|
||||
* These libraries and programs are free software; you can
|
||||
* redistribute them and/or modify them under the terms of the GNU
|
||||
* Lesser General Public License as published by the Free Software
|
||||
* Foundation; either version 2 of the License, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* These libraries and programs are distributed in the hope that
|
||||
* they will be useful, but WITHOUT ANY WARRANTY; without even the
|
||||
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU Lesser General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with these libraries and programs; if not, write
|
||||
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
|
||||
* Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/*
|
||||
* (c) Copyright 1993, 1994 Hewlett-Packard Company *
|
||||
* (c) Copyright 1993, 1994 International Business Machines Corp. *
|
||||
* (c) Copyright 1993, 1994 Sun Microsystems, Inc. *
|
||||
* (c) Copyright 1993, 1994 Novell, Inc. *
|
||||
*/
|
||||
/****************************<+>*************************************
|
||||
**
|
||||
** File: EnvControlI.h
|
||||
**
|
||||
** RCS: $TOG: EnvControlI.h /main/6 1998/07/30 12:14:02 mgreess $
|
||||
**
|
||||
** Project: DT Runtime Library -- Private header
|
||||
**
|
||||
** Description: Defines structures, and parameters used
|
||||
** for communication with the environment
|
||||
**
|
||||
** (c) Copyright 1992-94 by Hewlett-Packard Company
|
||||
**
|
||||
****************************<+>*************************************/
|
||||
/*******************************************************************
|
||||
The environment variables
|
||||
*******************************************************************/
|
||||
#define BIN_PATH_ENVIRON "PATH"
|
||||
#define NLS_PATH_ENVIRON "NLSPATH"
|
||||
#define SYSTEM_APPL_PATH_ENVIRON "XFILESEARCHPATH"
|
||||
#define PM_PATH_ENVIRON "XMICONSEARCHPATH"
|
||||
#define BM_PATH_ENVIRON "XMICONBMSEARCHPATH"
|
||||
|
||||
/*******************************************************************
|
||||
The default DT path strings, architecture-dependent
|
||||
*******************************************************************/
|
||||
#define BIN_PATH_STRING CDE_INSTALLATION_TOP "/bin"
|
||||
|
||||
#define NLS_PATH_STRING CDE_INSTALLATION_TOP "/lib/nls/msg/%L/%N.cat:" \
|
||||
CDE_INSTALLATION_TOP "/lib/nls/msg/C/%N.cat"
|
||||
|
||||
#if defined(sun)
|
||||
#define X_BIN_PATH_STRING "/usr/openwin/bin"
|
||||
#else
|
||||
#define X_BIN_PATH_STRING "/usr/bin/X11"
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Some notes on the behavior and use of the XFILESEARCHPATH component, as
|
||||
* defined through the SYSTEM_APPL_PATH_STRING definition below:
|
||||
*
|
||||
* Its precedence in the lookup of X resources is fairly low--it can
|
||||
* be overridden by XRM resources, by resources specified in
|
||||
* the user's $HOME/.Xdefaults-<hostname> file, and by resources
|
||||
* found using the $XUSERFILESEARCHPATH setting.
|
||||
*
|
||||
* The order of pathnames in the XFILESEARCHPATH is such that the first
|
||||
* match satisfies the lookup, and the lookup stops there.
|
||||
*
|
||||
* We place the pathname components in our XFILESEARCHPATH such that
|
||||
* the lookup goes, from first match attempt to last match attempt, as
|
||||
* follows:
|
||||
*
|
||||
* - Custom resources: /etc/../$LANG
|
||||
* - Custom resources: /etc/../C
|
||||
* - Factory defaults: /opt/../$LANG --shipped with every localized system
|
||||
* - Factory defaults: /opt/../C --shipped with every system
|
||||
*
|
||||
* These resources are used ONLY for the DT components themselves
|
||||
* (not, for example, for MIT client resources).
|
||||
*
|
||||
* The CDE vendors retain the right to alter, remove, append to, and
|
||||
* ignore any settings in the factory defaults locations. The vendors
|
||||
* will not modify the settings in the "custom resources" locations.
|
||||
*
|
||||
*/
|
||||
#define SYSTEM_APPL_PATH_STRING CDE_CONFIGURATION_TOP "/app-defaults/%L/%N:" \
|
||||
CDE_CONFIGURATION_TOP "/app-defaults/C/%N:" \
|
||||
CDE_INSTALLATION_TOP "/app-defaults/%L/%N:" \
|
||||
CDE_INSTALLATION_TOP "/app-defaults/C/%N"
|
||||
|
||||
|
||||
/**********************************************************************
|
||||
* Data representation of the user's DT environment
|
||||
**********************************************************************/
|
||||
|
||||
typedef struct environStruct {
|
||||
char * pmPath;
|
||||
char * binPath;
|
||||
char * nlsPath;
|
||||
char * sysApplPath;
|
||||
char * bmPath;
|
||||
} _environStruct;
|
||||
|
||||
/**********************************************************************
|
||||
* Miscellaneous
|
||||
**********************************************************************/
|
||||
#define BV_BINPATH (1<<0)
|
||||
#define BV_SYSAPPLPATH (1<<1)
|
||||
#define BV_NLSPATH (1<<2)
|
||||
#define BV_PMPATH (1<<3)
|
||||
#define BV_BMPATH (1<<4)
|
||||
|
||||
#define MAX_ENV_STRING (2*BUFSIZ)
|
||||
|
||||
/**************************** eof **********************/
|
||||
@@ -1,87 +0,0 @@
|
||||
/*
|
||||
* CDE - Common Desktop Environment
|
||||
*
|
||||
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
|
||||
*
|
||||
* These libraries and programs are free software; you can
|
||||
* redistribute them and/or modify them under the terms of the GNU
|
||||
* Lesser General Public License as published by the Free Software
|
||||
* Foundation; either version 2 of the License, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* These libraries and programs are distributed in the hope that
|
||||
* they will be useful, but WITHOUT ANY WARRANTY; without even the
|
||||
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU Lesser General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with these libraries and programs; if not, write
|
||||
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
|
||||
* Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/*
|
||||
* (c) Copyright 1993, 1994 Hewlett-Packard Company *
|
||||
* (c) Copyright 1993, 1994 International Business Machines Corp. *
|
||||
* (c) Copyright 1993, 1994 Sun Microsystems, Inc. *
|
||||
* (c) Copyright 1993, 1994 Novell, Inc. *
|
||||
*/
|
||||
/****************************<+>*************************************
|
||||
**
|
||||
** File: EnvControlP.h
|
||||
**
|
||||
** RCS: $TOG: EnvControlP.h /main/6 1998/07/30 12:13:45 mgreess $
|
||||
** Project: DT Runtime Library
|
||||
**
|
||||
** Description: Defines structures, and parameters used
|
||||
** for communication with the environment
|
||||
**
|
||||
** (c) Copyright 1990 by Hewlett-Packard Company
|
||||
**
|
||||
****************************<+>*************************************/
|
||||
|
||||
/******** Public Function Declarations ********/
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
extern int _DtEnvControl(
|
||||
int mode) ;
|
||||
extern int _DtWsmSetBackdropSearchPath(
|
||||
Screen *screen,
|
||||
char *backdropDir,
|
||||
Boolean useMultiColorIcons) ;
|
||||
/******** End Public Function Declarations ********/
|
||||
|
||||
/**********************************************************************
|
||||
* Command parameters to the function, which double as result codes.
|
||||
* If the invocation is successful, the same is returned;
|
||||
* else DT_ENV_NO_OP is returned.
|
||||
|
||||
DT_ENV_SET
|
||||
Sets the DT environment.
|
||||
|
||||
DT_ENV_RESTORE_PRE_DT
|
||||
Restores the pre-DT application environment
|
||||
|
||||
DT_ENV_RESTORE_POST_DT
|
||||
Reinstalls the DT environment after a restoring pre-DT
|
||||
environment
|
||||
|
||||
DT_ENV_NO_OP
|
||||
Does nothing
|
||||
|
||||
DT_ENV_SET_BIN
|
||||
Sets the DT environment PLUS sets the PATH= variable to
|
||||
where the DT files live.
|
||||
|
||||
**********************************************************************/
|
||||
#define DT_ENV_SET 0
|
||||
#define DT_ENV_RESTORE_PRE_DT 1
|
||||
#define DT_ENV_RESTORE_POST_DT 2
|
||||
#define DT_ENV_NO_OP 3
|
||||
#define DT_ENV_SET_BIN 4
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
/**************************** eof **********************/
|
||||
@@ -1,63 +0,0 @@
|
||||
/*
|
||||
* CDE - Common Desktop Environment
|
||||
*
|
||||
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
|
||||
*
|
||||
* These libraries and programs are free software; you can
|
||||
* redistribute them and/or modify them under the terms of the GNU
|
||||
* Lesser General Public License as published by the Free Software
|
||||
* Foundation; either version 2 of the License, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* These libraries and programs are distributed in the hope that
|
||||
* they will be useful, but WITHOUT ANY WARRANTY; without even the
|
||||
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU Lesser General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with these libraries and programs; if not, write
|
||||
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
|
||||
* Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/* $XConsortium: FileM.h /main/3 1995/10/26 15:21:35 rswiston $ */
|
||||
/************************************<+>*************************************
|
||||
****************************************************************************
|
||||
**
|
||||
** File: FileM.h
|
||||
**
|
||||
** Project: DT
|
||||
**
|
||||
** Description: Defines for the tool class and messages for the
|
||||
** File Manager.
|
||||
**
|
||||
**
|
||||
** (c) Copyright 1993, 1994 Hewlett-Packard Company
|
||||
** (c) Copyright 1993, 1994 International Business Machines Corp.
|
||||
** (c) Copyright 1993, 1994 Sun Microsystems, Inc.
|
||||
** (c) Copyright 1993, 1994 Novell, Inc.
|
||||
**
|
||||
**
|
||||
**
|
||||
****************************************************************************
|
||||
************************************<+>*************************************/
|
||||
|
||||
#ifndef _FileM_h
|
||||
#define _FileM_h
|
||||
|
||||
#define FILE_MANAGER_TOOL_CLASS "FILEMGR"
|
||||
|
||||
#define FILE_MANAGER_CLASS_NAME "Dtfile"
|
||||
|
||||
|
||||
#define FILE_MANAGER_RUN_SESSION_MSG "RUN_SESSION"
|
||||
#define FILE_MANAGER_SHOW_HOME_MSG "SHOW_HOME_FOLDER"
|
||||
#define FILE_MANAGER_SHOW_DIRECTORY_MSG "SHOW_FOLDER"
|
||||
#define FILE_MANAGER_SHOW_TOOLS_MSG "SHOW_TOOLS"
|
||||
|
||||
#define SHOW_TRASH_MSG "SHOW_TRASH"
|
||||
#define REMOVE_TRASH_MSG "REMOVE_TRASH"
|
||||
#define EMPTY_TRASH_MSG "EMPTY_TRASH"
|
||||
|
||||
#endif /*_FileM_h*/
|
||||
/* DON'T ADD ANYTHING AFTER THIS #endif */
|
||||
@@ -1,169 +0,0 @@
|
||||
/*
|
||||
* CDE - Common Desktop Environment
|
||||
*
|
||||
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
|
||||
*
|
||||
* These libraries and programs are free software; you can
|
||||
* redistribute them and/or modify them under the terms of the GNU
|
||||
* Lesser General Public License as published by the Free Software
|
||||
* Foundation; either version 2 of the License, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* These libraries and programs are distributed in the hope that
|
||||
* they will be useful, but WITHOUT ANY WARRANTY; without even the
|
||||
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU Lesser General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with these libraries and programs; if not, write
|
||||
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
|
||||
* Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/*
|
||||
* File: FileUtil.h $XConsortium: FileUtil.h /main/4 1995/10/26 15:21:50 rswiston $
|
||||
* Language: C
|
||||
*
|
||||
* (c) Copyright 1988, Hewlett-Packard Company, all rights reserved.
|
||||
*
|
||||
* (c) Copyright 1993, 1994 Hewlett-Packard Company *
|
||||
* (c) Copyright 1993, 1994 International Business Machines Corp. *
|
||||
* (c) Copyright 1993, 1994 Sun Microsystems, Inc. *
|
||||
* (c) Copyright 1993, 1994 Novell, Inc. *
|
||||
*/
|
||||
|
||||
#ifndef _FileUtil_h
|
||||
#define _FileUtil_h
|
||||
|
||||
extern int _DtCreateDirs( char *path,
|
||||
int mode) ;
|
||||
|
||||
/******************
|
||||
*
|
||||
* Function Name: _DtCreateDirs
|
||||
*
|
||||
* Description:
|
||||
*
|
||||
* This function is passed a directory path to create and the mode
|
||||
* for the directory. It will create any of the parent directories
|
||||
* on the path that do not already exist.
|
||||
*
|
||||
* This function may fail if any of the directories on the path already
|
||||
* exist and are not writable. If some component of the path already
|
||||
* exists and is not a directory, a failure will be returned.
|
||||
*
|
||||
* If some component of the path exists as a directory but does not have
|
||||
* the specified mode, this will NOT cause a failure to be returned.
|
||||
* This implies that if this function is called to create a writeable
|
||||
* directory, it is possible for the function to return successfully
|
||||
* but the directory may not actually be writable.
|
||||
*
|
||||
* Synopsis:
|
||||
*
|
||||
* status = _DtCreateDirs (path, mode);
|
||||
*
|
||||
* int status; Returns 0 on success and -1 on failure.
|
||||
* char *path; The directory path to create.
|
||||
* int mode; The file mode for setting any directories
|
||||
* that are created.
|
||||
*
|
||||
******************/
|
||||
|
||||
|
||||
extern int _DtIsOpenableDir( char *path) ;
|
||||
|
||||
/******************
|
||||
*
|
||||
* Function Name: _DtIsOpenableDir
|
||||
*
|
||||
* Description:
|
||||
*
|
||||
* This function takes a path as an argument and determines whether
|
||||
* the path is a directory that can be opened. This function returns
|
||||
* "1" if the path is an openable directory and "0" if it is not.
|
||||
*
|
||||
* The path can be in the Softbench "context" form of "host:/path/dir".
|
||||
*
|
||||
* Synopsis:
|
||||
*
|
||||
* status = _DtIsOpenableDir (cpath)
|
||||
*
|
||||
* int status; Returns 1 for openable directories,
|
||||
* 0 otherwise.
|
||||
* char *cpath; The directory name to test.
|
||||
*
|
||||
******************/
|
||||
|
||||
|
||||
extern int
|
||||
_DtIsOpenableDirContext(
|
||||
char *path,
|
||||
char **ret_path ) ;
|
||||
|
||||
/******************
|
||||
*
|
||||
* Function Name: _DtIsOpenableDirContext
|
||||
*
|
||||
* Description:
|
||||
*
|
||||
* This function takes a path as an argument and determines whether
|
||||
* the path is a directory that can be opened. This function returns
|
||||
* "1" if the path is an openable directory and "0" if it is not.
|
||||
* In addition, if the calling function passes in another pointer,
|
||||
* we will return the internal representation for the path.
|
||||
*
|
||||
* The path can be in the Softbench "context" form of "host:/path/dir".
|
||||
*
|
||||
* Synopsis:
|
||||
*
|
||||
* status = _DtIsOpenableDirContext (cpath, ret_ptr)
|
||||
*
|
||||
* int status; Returns 1 for openable directories,
|
||||
* 0 otherwise.
|
||||
* char *cpath; The directory name to test.
|
||||
* char ** ret_ptr; Where to place internal format.
|
||||
*
|
||||
******************/
|
||||
|
||||
|
||||
extern char * _DtReaddirLstat(
|
||||
char *dir_name,
|
||||
DIR *dirp,
|
||||
struct stat *st_buf) ;
|
||||
|
||||
/******************
|
||||
*
|
||||
* Function Name: _DtReaddirLstat
|
||||
*
|
||||
* Description:
|
||||
*
|
||||
* This function reads the next entry out of a directory that has
|
||||
* been opened with opendir and returns lstat information on it.
|
||||
* For more information on reading a directory, see directory(3C).
|
||||
* For more information on lstat information, see stat(2).
|
||||
*
|
||||
* This function returns a pointer to the full pathname of the directory
|
||||
* entry. This memory is owned by this function and must not be
|
||||
* freed. If the caller wants to keep the filename, it must make its
|
||||
* own copy. When the end of the directory is encountered, NULL is
|
||||
* returned.
|
||||
*
|
||||
* Synopsis:
|
||||
*
|
||||
* dir_entry = _DtReaddirLstat (dir_name, dirp, st_buf);
|
||||
*
|
||||
* char *dir_entry; The name of the current entry within the
|
||||
* directory.
|
||||
*
|
||||
* char *dir_name; The full path name of the directory.
|
||||
*
|
||||
* DIR *dirp; A pointer to the directory [obtained from
|
||||
* opendir(3C)].
|
||||
*
|
||||
* struct stat *st_buf; The lstat(2) information.
|
||||
*
|
||||
******************/
|
||||
|
||||
#endif /* _FileUtil_h */
|
||||
|
||||
/* DON'T ADD ANYTHING AFTER THIS #endif */
|
||||
@@ -1,69 +0,0 @@
|
||||
/*
|
||||
* CDE - Common Desktop Environment
|
||||
*
|
||||
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
|
||||
*
|
||||
* These libraries and programs are free software; you can
|
||||
* redistribute them and/or modify them under the terms of the GNU
|
||||
* Lesser General Public License as published by the Free Software
|
||||
* Foundation; either version 2 of the License, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* These libraries and programs are distributed in the hope that
|
||||
* they will be useful, but WITHOUT ANY WARRANTY; without even the
|
||||
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU Lesser General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with these libraries and programs; if not, write
|
||||
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
|
||||
* Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/*
|
||||
* (c) Copyright 1993, 1994 Hewlett-Packard Company *
|
||||
* (c) Copyright 1993, 1994 International Business Machines Corp. *
|
||||
* (c) Copyright 1993, 1994 Sun Microsystems, Inc. *
|
||||
* (c) Copyright 1993, 1994 Novell, Inc. *
|
||||
*/
|
||||
/****************************<+>*************************************
|
||||
**
|
||||
** File: EnvControl.h
|
||||
**
|
||||
** RCS: $XConsortium: GetDispRes.h /main/4 1995/10/26 15:22:11 rswiston $
|
||||
** Project: HP DT Runtime Library
|
||||
**
|
||||
** Description: Defines structures, and parameters used
|
||||
** for communication with the environment
|
||||
**
|
||||
** (c) Copyright 1992 by Hewlett-Packard Company
|
||||
**
|
||||
****************************<+>*************************************/
|
||||
|
||||
/******** Function Declarations ********/
|
||||
|
||||
int _DtGetDisplayResolution(
|
||||
Display *disp,
|
||||
int screen) ;
|
||||
|
||||
/******** End Function Declarations ********/
|
||||
|
||||
/**********************************************************************
|
||||
* Resolution threshold values (width of screen in pixels)
|
||||
**********************************************************************/
|
||||
|
||||
#define _DT_HIGH_RES_MIN 1176
|
||||
#define _DT_MED_RES_MIN 851
|
||||
#define _DT_LOW_RES_MIN 512
|
||||
|
||||
/**********************************************************************
|
||||
* Resolution types of a given screen
|
||||
**********************************************************************/
|
||||
#define NO_RES_DISPLAY 0
|
||||
#define LOW_RES_DISPLAY 1
|
||||
#define VGA_RES_DISPLAY 2
|
||||
#define MED_RES_DISPLAY 3
|
||||
#define HIGH_RES_DISPLAY 4
|
||||
#define ALL_RES_DISPLAY 5
|
||||
|
||||
/**************************** eof **********************/
|
||||
@@ -1,181 +0,0 @@
|
||||
/*
|
||||
* CDE - Common Desktop Environment
|
||||
*
|
||||
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
|
||||
*
|
||||
* These libraries and programs are free software; you can
|
||||
* redistribute them and/or modify them under the terms of the GNU
|
||||
* Lesser General Public License as published by the Free Software
|
||||
* Foundation; either version 2 of the License, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* These libraries and programs are distributed in the hope that
|
||||
* they will be useful, but WITHOUT ANY WARRANTY; without even the
|
||||
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU Lesser General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with these libraries and programs; if not, write
|
||||
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
|
||||
* Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/* $XConsortium: HashP.h /main/4 1995/10/26 15:22:50 rswiston $ */
|
||||
/*
|
||||
* (c) Copyright 1993, 1994 Hewlett-Packard Company *
|
||||
* (c) Copyright 1993, 1994 International Business Machines Corp. *
|
||||
* (c) Copyright 1993, 1994 Sun Microsystems, Inc. *
|
||||
* (c) Copyright 1993, 1994 Novell, Inc. *
|
||||
*/
|
||||
#ifdef REV_INFO
|
||||
#ifndef lint
|
||||
static char SCCSID[] = "OSF/Motif: @(#)_HashP.h 4.16 91/09/12";
|
||||
#endif /* lint */
|
||||
#endif /* REV_INFO */
|
||||
/******************************************************************************
|
||||
*******************************************************************************
|
||||
*
|
||||
* (c) Copyright 1989, 1990, 1991 OPEN SOFTWARE FOUNDATION, INC.
|
||||
* (c) Copyright 1989, DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASS.
|
||||
* (c) Copyright 1987, 1988, 1989, 1990, 1991 HEWLETT-PACKARD COMPANY
|
||||
* ALL RIGHTS RESERVED
|
||||
*
|
||||
* THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE USED
|
||||
* AND COPIED ONLY IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE AND
|
||||
* WITH THE INCLUSION OF THE ABOVE COPYRIGHT NOTICE. THIS SOFTWARE OR
|
||||
* ANY OTHER COPIES THEREOF MAY NOT BE PROVIDED OR OTHERWISE MADE
|
||||
* AVAILABLE TO ANY OTHER PERSON. NO TITLE TO AND OWNERSHIP OF THE
|
||||
* SOFTWARE IS HEREBY TRANSFERRED.
|
||||
*
|
||||
* THE INFORMATION IN THIS SOFTWARE IS SUBJECT TO CHANGE WITHOUT
|
||||
* NOTICE AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY OPEN SOFTWARE
|
||||
* FOUNDATION, INC. OR ITS THIRD PARTY SUPPLIERS
|
||||
*
|
||||
* OPEN SOFTWARE FOUNDATION, INC. AND ITS THIRD PARTY SUPPLIERS,
|
||||
* ASSUME NO RESPONSIBILITY FOR THE USE OR INABILITY TO USE ANY OF ITS
|
||||
* SOFTWARE . OSF SOFTWARE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY
|
||||
* KIND, AND OSF EXPRESSLY DISCLAIMS ALL IMPLIED WARRANTIES, INCLUDING
|
||||
* BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
* FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* Notice: Notwithstanding any other lease or license that may pertain to,
|
||||
* or accompany the delivery of, this computer software, the rights of the
|
||||
* Government regarding its use, reproduction and disclosure are as set
|
||||
* forth in Section 52.227-19 of the FARS Computer Software-Restricted
|
||||
* Rights clause.
|
||||
*
|
||||
* (c) Copyright 1989, 1990, 1991 Open Software Foundation, Inc. Unpublished - all
|
||||
* rights reserved under the Copyright laws of the United States.
|
||||
*
|
||||
* RESTRICTED RIGHTS NOTICE: Use, duplication, or disclosure by the
|
||||
* Government is subject to the restrictions as set forth in subparagraph
|
||||
* (c)(1)(ii) of the Rights in Technical Data and Computer Software clause
|
||||
* at DFARS 52.227-7013.
|
||||
*
|
||||
* Open Software Foundation, Inc.
|
||||
* 11 Cambridge Center
|
||||
* Cambridge, MA 02142
|
||||
* (617)621-8700
|
||||
*
|
||||
* RESTRICTED RIGHTS LEGEND: This computer software is submitted with
|
||||
* "restricted rights." Use, duplication or disclosure is subject to the
|
||||
* restrictions as set forth in NASA FAR SUP 18-52.227-79 (April 1985)
|
||||
* "Commercial Computer Software- Restricted Rights (April 1985)." Open
|
||||
* Software Foundation, Inc., 11 Cambridge Center, Cambridge, MA 02142. If
|
||||
* the contract contains the Clause at 18-52.227-74 "Rights in Data General"
|
||||
* then the "Alternate III" clause applies.
|
||||
*
|
||||
* (c) Copyright 1989, 1990, 1991 Open Software Foundation, Inc.
|
||||
* ALL RIGHTS RESERVED
|
||||
*
|
||||
*
|
||||
* Open Software Foundation is a trademark of The Open Software Foundation, Inc.
|
||||
* OSF is a trademark of Open Software Foundation, Inc.
|
||||
* OSF/Motif is a trademark of Open Software Foundation, Inc.
|
||||
* Motif is a trademark of Open Software Foundation, Inc.
|
||||
* DEC is a registered trademark of Digital Equipment Corporation
|
||||
* DIGITAL is a registered trademark of Digital Equipment Corporation
|
||||
* X Window System is a trademark of the Massachusetts Institute of Technology
|
||||
*
|
||||
*******************************************************************************
|
||||
******************************************************************************/
|
||||
#ifndef __HashP_h
|
||||
#define __HashP_h
|
||||
|
||||
#include <X11/Intrinsic.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
/*
|
||||
* the structure is used as a common header part for different
|
||||
* users of the hash functions in order to locate the key
|
||||
*/
|
||||
typedef XtPointer DtHashKey;
|
||||
|
||||
typedef DtHashKey (*DtGetHashKeyFunc)();
|
||||
typedef Boolean (*DtHashEnumerateFunc)();
|
||||
typedef void (*DtReleaseKeyProc)();
|
||||
|
||||
typedef struct _DtHashEntryPartRec {
|
||||
unsigned int type:16;
|
||||
unsigned int flags:16;
|
||||
}DtHashEntryPartRec, *DtHashEntryPart;
|
||||
|
||||
typedef struct _DtHashEntryRec {
|
||||
DtHashEntryPartRec hash;
|
||||
}DtHashEntryRec, *DtHashEntry;
|
||||
|
||||
typedef struct _DtHashEntryTypePartRec {
|
||||
unsigned int entrySize;
|
||||
DtGetHashKeyFunc getKeyFunc;
|
||||
XtPointer getKeyClientData;
|
||||
DtReleaseKeyProc releaseKeyProc;
|
||||
}DtHashEntryTypePartRec, *DtHashEntryTypePart;
|
||||
|
||||
typedef struct _DtHashEntryTypeRec {
|
||||
DtHashEntryTypePartRec hash;
|
||||
}DtHashEntryTypeRec, *DtHashEntryType;
|
||||
|
||||
typedef struct _DtHashTableRec *DtHashTable;
|
||||
|
||||
/******** Private Function Declarations for Hash.c ********/
|
||||
|
||||
extern void _DtRegisterHashEntry(
|
||||
DtHashTable tab,
|
||||
DtHashKey key,
|
||||
DtHashEntry entry) ;
|
||||
extern void _DtUnregisterHashEntry(
|
||||
DtHashTable tab,
|
||||
DtHashEntry entry) ;
|
||||
extern DtHashEntry _DtEnumerateHashTable(
|
||||
DtHashTable tab,
|
||||
DtHashEnumerateFunc enumFunc,
|
||||
XtPointer clientData) ;
|
||||
extern DtHashEntry _DtKeyToHashEntry(
|
||||
DtHashTable tab,
|
||||
DtHashKey key) ;
|
||||
extern DtHashTable _DtAllocHashTable(
|
||||
DtHashEntryType *hashEntryTypes,
|
||||
Cardinal numHashEntryTypes,
|
||||
#if NeedWidePrototypes
|
||||
int keyIsString) ;
|
||||
#else
|
||||
Boolean keyIsString) ;
|
||||
#endif /* NeedWidePrototypes */
|
||||
extern void _DtFreeHashTable(
|
||||
DtHashTable hashTable) ;
|
||||
|
||||
/******** End Private Function Declarations ********/
|
||||
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* Close scope of 'extern "C"' declaration which encloses file. */
|
||||
#endif
|
||||
|
||||
#endif /* HashP_h */
|
||||
/* DON'T ADD ANYTHING AFTER THIS #endif */
|
||||
|
||||
|
||||
|
||||
@@ -1,94 +0,0 @@
|
||||
/*
|
||||
* CDE - Common Desktop Environment
|
||||
*
|
||||
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
|
||||
*
|
||||
* These libraries and programs are free software; you can
|
||||
* redistribute them and/or modify them under the terms of the GNU
|
||||
* Lesser General Public License as published by the Free Software
|
||||
* Foundation; either version 2 of the License, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* These libraries and programs are distributed in the hope that
|
||||
* they will be useful, but WITHOUT ANY WARRANTY; without even the
|
||||
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU Lesser General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with these libraries and programs; if not, write
|
||||
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
|
||||
* Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/* $XConsortium: HourGlass.h /main/4 1995/10/26 15:23:08 rswiston $ */
|
||||
/*
|
||||
* (c) Copyright 1993, 1994 Hewlett-Packard Company *
|
||||
* (c) Copyright 1993, 1994 International Business Machines Corp. *
|
||||
* (c) Copyright 1993, 1994 Sun Microsystems, Inc. *
|
||||
* (c) Copyright 1993, 1994 Novell, Inc. *
|
||||
*/
|
||||
/************************************<+>*************************************
|
||||
****************************************************************************
|
||||
**
|
||||
** File: HourGlass.h
|
||||
**
|
||||
** Project: DT
|
||||
**
|
||||
** Description: Public include file for HourGlass Library.
|
||||
**
|
||||
**
|
||||
** (c) Copyright 1987, 1988, 1989 by Hewlett-Packard Company
|
||||
**
|
||||
**
|
||||
**
|
||||
****************************************************************************
|
||||
************************************<+>*************************************/
|
||||
|
||||
#ifndef _hourglass_h
|
||||
#define _hourglass_h
|
||||
|
||||
/* _DtGetHourGlassCursor -
|
||||
*
|
||||
* Builds and returns the appropriate HourGlass cursor.
|
||||
*/
|
||||
|
||||
extern Cursor _DtGetHourGlassCursor(
|
||||
Display *dpy) ;
|
||||
|
||||
/* _DtTurnOnHourGlass -
|
||||
*
|
||||
* Gets and displays an hourglass cursor in the window of the widget
|
||||
* which is passed in to the funciton.
|
||||
*/
|
||||
|
||||
extern void _DtTurnOnHourGlass(
|
||||
Widget w) ;
|
||||
|
||||
/* Widget widget;
|
||||
*
|
||||
* widget is the toplevel shell of the window you want
|
||||
* the hourglass cursor to appear in.
|
||||
*/
|
||||
|
||||
|
||||
/* _DtTurnOffHourGlass -
|
||||
*
|
||||
* Removes the hourglass cursor from the window of the widget
|
||||
* which is passed in to the funciton.
|
||||
*/
|
||||
|
||||
extern void _DtTurnOffHourGlass(
|
||||
Widget w) ;
|
||||
|
||||
/* Widget widget;
|
||||
*
|
||||
* widget is the toplevel shell of the window you want
|
||||
* to remove hourglass cursor from.
|
||||
*/
|
||||
|
||||
|
||||
#endif /* _hourglass_h */
|
||||
/* DON'T ADD ANYTHING AFTER THIS #endif */
|
||||
|
||||
|
||||
|
||||
@@ -1,140 +0,0 @@
|
||||
/*
|
||||
* CDE - Common Desktop Environment
|
||||
*
|
||||
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
|
||||
*
|
||||
* These libraries and programs are free software; you can
|
||||
* redistribute them and/or modify them under the terms of the GNU
|
||||
* Lesser General Public License as published by the Free Software
|
||||
* Foundation; either version 2 of the License, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* These libraries and programs are distributed in the hope that
|
||||
* they will be useful, but WITHOUT ANY WARRANTY; without even the
|
||||
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU Lesser General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with these libraries and programs; if not, write
|
||||
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
|
||||
* Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/* $XConsortium: IconFile.h /main/4 1995/10/26 15:23:17 rswiston $ */
|
||||
/*
|
||||
* (c) Copyright 1993, 1994 Hewlett-Packard Company *
|
||||
* (c) Copyright 1993, 1994 International Business Machines Corp. *
|
||||
* (c) Copyright 1993, 1994 Sun Microsystems, Inc. *
|
||||
* (c) Copyright 1993, 1994 Novell, Inc. *
|
||||
*/
|
||||
#ifdef REV_INFO
|
||||
#ifndef lint
|
||||
static char SCCSID[] = "OSF/Motif: @(#)_IconFile.h 4.16 91/09/12";
|
||||
#endif /* lint */
|
||||
#endif /* REV_INFO */
|
||||
/******************************************************************************
|
||||
*******************************************************************************
|
||||
*
|
||||
* (c) Copyright 1989, 1990, 1991 OPEN SOFTWARE FOUNDATION, INC.
|
||||
* (c) Copyright 1989, DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASS.
|
||||
* (c) Copyright 1987, 1988, 1989, 1990, 1991 HEWLETT-PACKARD COMPANY
|
||||
* ALL RIGHTS RESERVED
|
||||
*
|
||||
* THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE USED
|
||||
* AND COPIED ONLY IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE AND
|
||||
* WITH THE INCLUSION OF THE ABOVE COPYRIGHT NOTICE. THIS SOFTWARE OR
|
||||
* ANY OTHER COPIES THEREOF MAY NOT BE PROVIDED OR OTHERWISE MADE
|
||||
* AVAILABLE TO ANY OTHER PERSON. NO TITLE TO AND OWNERSHIP OF THE
|
||||
* SOFTWARE IS HEREBY TRANSFERRED.
|
||||
*
|
||||
* THE INFORMATION IN THIS SOFTWARE IS SUBJECT TO CHANGE WITHOUT
|
||||
* NOTICE AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY OPEN SOFTWARE
|
||||
* FOUNDATION, INC. OR ITS THIRD PARTY SUPPLIERS
|
||||
*
|
||||
* OPEN SOFTWARE FOUNDATION, INC. AND ITS THIRD PARTY SUPPLIERS,
|
||||
* ASSUME NO RESPONSIBILITY FOR THE USE OR INABILITY TO USE ANY OF ITS
|
||||
* SOFTWARE . OSF SOFTWARE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY
|
||||
* KIND, AND OSF EXPRESSLY DISCLAIMS ALL IMPLIED WARRANTIES, INCLUDING
|
||||
* BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
* FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* Notice: Notwithstanding any other lease or license that may pertain to,
|
||||
* or accompany the delivery of, this computer software, the rights of the
|
||||
* Government regarding its use, reproduction and disclosure are as set
|
||||
* forth in Section 52.227-19 of the FARS Computer Software-Restricted
|
||||
* Rights clause.
|
||||
*
|
||||
* (c) Copyright 1989, 1990, 1991 Open Software Foundation, Inc. Unpublished - all
|
||||
* rights reserved under the Copyright laws of the United States.
|
||||
*
|
||||
* RESTRICTED RIGHTS NOTICE: Use, duplication, or disclosure by the
|
||||
* Government is subject to the restrictions as set forth in subparagraph
|
||||
* (c)(1)(ii) of the Rights in Technical Data and Computer Software clause
|
||||
* at DFARS 52.227-7013.
|
||||
*
|
||||
* Open Software Foundation, Inc.
|
||||
* 11 Cambridge Center
|
||||
* Cambridge, MA 02142
|
||||
* (617)621-8700
|
||||
*
|
||||
* RESTRICTED RIGHTS LEGEND: This computer software is submitted with
|
||||
* "restricted rights." Use, duplication or disclosure is subject to the
|
||||
* restrictions as set forth in NASA FAR SUP 18-52.227-79 (April 1985)
|
||||
* "Commercial Computer Software- Restricted Rights (April 1985)." Open
|
||||
* Software Foundation, Inc., 11 Cambridge Center, Cambridge, MA 02142. If
|
||||
* the contract contains the Clause at 18-52.227-74 "Rights in Data General"
|
||||
* then the "Alternate III" clause applies.
|
||||
*
|
||||
* (c) Copyright 1989, 1990, 1991 Open Software Foundation, Inc.
|
||||
* ALL RIGHTS RESERVED
|
||||
*
|
||||
*
|
||||
* Open Software Foundation is a trademark of The Open Software Foundation, Inc.
|
||||
* OSF is a trademark of Open Software Foundation, Inc.
|
||||
* OSF/Motif is a trademark of Open Software Foundation, Inc.
|
||||
* Motif is a trademark of Open Software Foundation, Inc.
|
||||
* DEC is a registered trademark of Digital Equipment Corporation
|
||||
* DIGITAL is a registered trademark of Digital Equipment Corporation
|
||||
* X Window System is a trademark of the Massachusetts Institute of Technology
|
||||
*
|
||||
*******************************************************************************
|
||||
******************************************************************************/
|
||||
#ifndef __DtIconFile_h
|
||||
#define __DtIconFile_h
|
||||
|
||||
#include <Xm/Xm.h>
|
||||
#include <Xm/IconFile.h>
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
* values for icon magnitude
|
||||
*/
|
||||
#define DtUNSPECIFIED 0
|
||||
#define DtLARGE 1
|
||||
#define DtMEDIUM 2
|
||||
#define DtSMALL 3
|
||||
#define DtTINY 4
|
||||
|
||||
|
||||
/******** Public Function Declarations for XmWrap.c ********/
|
||||
|
||||
extern String _DtGetIconFileName(
|
||||
Screen *screen,
|
||||
String imageInstanceName,
|
||||
String imageClassName,
|
||||
String hostPrefix,
|
||||
unsigned int size) ;
|
||||
|
||||
/******** End Public Function Declarations ********/
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* Close scope of 'extern "C"' declaration which encloses file. */
|
||||
#endif
|
||||
|
||||
#endif /* __DtIconFile_h */
|
||||
/* DON'T ADD ANYTHING AFTER THIS #endif */
|
||||
|
||||
|
||||
|
||||
@@ -1,64 +0,0 @@
|
||||
/*
|
||||
* CDE - Common Desktop Environment
|
||||
*
|
||||
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
|
||||
*
|
||||
* These libraries and programs are free software; you can
|
||||
* redistribute them and/or modify them under the terms of the GNU
|
||||
* Lesser General Public License as published by the Free Software
|
||||
* Foundation; either version 2 of the License, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* These libraries and programs are distributed in the hope that
|
||||
* they will be useful, but WITHOUT ANY WARRANTY; without even the
|
||||
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU Lesser General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with these libraries and programs; if not, write
|
||||
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
|
||||
* Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/* $XConsortium: Indicator.h /main/4 1995/10/26 15:23:41 rswiston $ */
|
||||
/*
|
||||
* (c) Copyright 1993, 1994 Hewlett-Packard Company *
|
||||
* (c) Copyright 1993, 1994 International Business Machines Corp. *
|
||||
* (c) Copyright 1993, 1994 Sun Microsystems, Inc. *
|
||||
* (c) Copyright 1993, 1994 Novell, Inc. *
|
||||
*/
|
||||
/*
|
||||
********************************************************************************
|
||||
*
|
||||
* File: Indicator.h
|
||||
* Description: Public header for Activity Indicator
|
||||
*
|
||||
* (c) Copyright 1988, Hewlett-Packard Company, all rights reserved.
|
||||
*
|
||||
********************************************************************************
|
||||
*/
|
||||
|
||||
#ifndef _Indicator_h
|
||||
#define _Indicator_h
|
||||
|
||||
extern void _DtSendActivityNotification( int ) ;
|
||||
/* int duration; Maximum activation time for the indicator */
|
||||
|
||||
/*
|
||||
* _DtSendActivityNotification() provides the application with the means for
|
||||
* notifying the world that an activity has been started, and may take upto
|
||||
* 'duration' seconds. For now, the workspace manager will enable the
|
||||
* activity indicator for upto the indicated duration of time; the time is
|
||||
* in units of seconds.
|
||||
*/
|
||||
|
||||
extern void _DtSendActivityDoneNotification( void ) ;
|
||||
|
||||
/*
|
||||
* _DtSendActivityDoneNotification() provides the application with the means for
|
||||
* notifying the world that an activity which had earlier been started, is
|
||||
* now complete.
|
||||
*/
|
||||
|
||||
#endif /* _Indicator_h */
|
||||
/* DON'T ADD STUFF AFTER THIS #endif */
|
||||
@@ -1,59 +0,0 @@
|
||||
/*
|
||||
* CDE - Common Desktop Environment
|
||||
*
|
||||
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
|
||||
*
|
||||
* These libraries and programs are free software; you can
|
||||
* redistribute them and/or modify them under the terms of the GNU
|
||||
* Lesser General Public License as published by the Free Software
|
||||
* Foundation; either version 2 of the License, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* These libraries and programs are distributed in the hope that
|
||||
* they will be useful, but WITHOUT ANY WARRANTY; without even the
|
||||
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU Lesser General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with these libraries and programs; if not, write
|
||||
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
|
||||
* Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/*
|
||||
* (c) Copyright 1993, 1994 Hewlett-Packard Company *
|
||||
* (c) Copyright 1993, 1994 International Business Machines Corp. *
|
||||
* (c) Copyright 1993, 1994 Sun Microsystems, Inc. *
|
||||
* (c) Copyright 1993, 1994 Novell, Inc. *
|
||||
*/
|
||||
/*****************************<+>*************************************
|
||||
*********************************************************************
|
||||
**
|
||||
** File: IndicatorM.h
|
||||
**
|
||||
** RCS: $XConsortium: IndicatorM.h /main/3 1995/10/26 15:23:53 rswiston $
|
||||
** Project: DT
|
||||
**
|
||||
** Description: Defines indicator messages
|
||||
**
|
||||
** (c) Copyright 1990 by Hewlett-Packard Company
|
||||
**
|
||||
*********************************************************************
|
||||
*****************************<+>*************************************/
|
||||
#ifndef _IndicatorM_h
|
||||
#define _IndicatorM_h
|
||||
|
||||
/*
|
||||
* BMS Messaging definitions
|
||||
*/
|
||||
|
||||
/* _DtMessage for turning on the activity indicator */
|
||||
|
||||
#define DtACTIVITY_NOTIFICATION "ACTIVITY_NOTIFICATION"
|
||||
|
||||
/* _DtMessage for turning off the activity indicator */
|
||||
|
||||
#define DtACTIVITY_DONE_NOTIFICATION "ACTIVITY_DONE_NOTIFICATION"
|
||||
|
||||
#endif /* _IndicatorM_h */
|
||||
/* Do not add anything after this endif. */
|
||||
@@ -1,59 +0,0 @@
|
||||
/*
|
||||
* CDE - Common Desktop Environment
|
||||
*
|
||||
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
|
||||
*
|
||||
* These libraries and programs are free software; you can
|
||||
* redistribute them and/or modify them under the terms of the GNU
|
||||
* Lesser General Public License as published by the Free Software
|
||||
* Foundation; either version 2 of the License, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* These libraries and programs are distributed in the hope that
|
||||
* they will be useful, but WITHOUT ANY WARRANTY; without even the
|
||||
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU Lesser General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with these libraries and programs; if not, write
|
||||
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
|
||||
* Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/* $XConsortium: Info.h /main/2 1996/03/26 15:05:44 barstow $
|
||||
*
|
||||
* (c) Copyright 1996 Digital Equipment Corporation.
|
||||
* (c) Copyright 1996 Hewlett-Packard Company.
|
||||
* (c) Copyright 1996 International Business Machines Corp.
|
||||
* (c) Copyright 1996 Sun Microsystems, Inc.
|
||||
* (c) Copyright 1996 Novell, Inc.
|
||||
* (c) Copyright 1996 FUJITSU LIMITED.
|
||||
* (c) Copyright 1996 Hitachi.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _dt_info_h_
|
||||
#define _dt_info_h_
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef enum {
|
||||
DtINFO_SHOW_OK,
|
||||
DtINFO_SHOW_BAD_LOCATOR, /* the locator argument is NULL */
|
||||
DtINFO_SHOW_TT_OPEN_FAIL, /* tt_open() failed */
|
||||
DtINFO_SHOW_MSG_CREATE_FAIL, /* tt_message_create() failed */
|
||||
DtINFO_SHOW_MSG_SEND_FAIL /* tt_message_send() failed */
|
||||
} DtInfoShowStatus;
|
||||
|
||||
extern DtInfoShowStatus DtInfoShowTopic (
|
||||
const char * info_lib, /* The InfoLib to browse */
|
||||
const char * locator); /* The locator in Generalized Locator
|
||||
Format */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _dt_info_h_ */
|
||||
@@ -1,112 +0,0 @@
|
||||
/*
|
||||
* CDE - Common Desktop Environment
|
||||
*
|
||||
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
|
||||
*
|
||||
* These libraries and programs are free software; you can
|
||||
* redistribute them and/or modify them under the terms of the GNU
|
||||
* Lesser General Public License as published by the Free Software
|
||||
* Foundation; either version 2 of the License, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* These libraries and programs are distributed in the hope that
|
||||
* they will be useful, but WITHOUT ANY WARRANTY; without even the
|
||||
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU Lesser General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with these libraries and programs; if not, write
|
||||
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
|
||||
* Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/* $XConsortium: LocaleXlate.h /main/4 1995/10/26 12:29:54 rswiston $ */
|
||||
/************************************<+>*************************************
|
||||
****************************************************************************
|
||||
**
|
||||
** File: LocaleXlate.h
|
||||
**
|
||||
** Project: DtLcx
|
||||
**
|
||||
** Description: locale translation services
|
||||
**
|
||||
** (c) Copyright 1993, 1994 Hewlett-Packard Company
|
||||
** (c) Copyright 1993, 1994 International Business Machines Corp.
|
||||
** (c) Copyright 1993, 1994 Sun Microsystems, Inc.
|
||||
** (c) Copyright 1993, 1994 Unix System Labs, Inc., a subsidiary of Novell, Inc.
|
||||
**
|
||||
**
|
||||
****************************************************************************
|
||||
************************************<+>*************************************/
|
||||
|
||||
|
||||
#ifndef _DtLCX_XLATE_LOCALE_I
|
||||
#define _DtLCX_XLATE_LOCALE_I
|
||||
|
||||
#include "XlationSvc.h" /* FIX: move to <> */
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#if DOC
|
||||
/*========================================================*/
|
||||
$CONSTBEG$: _DtLCX_OPER_xxx
|
||||
$1LINER$: Constants for specifying operations
|
||||
$SUMMARY$:
|
||||
The _DtLCX_OPER_xxx are constants that produce strings
|
||||
used in the translation specifications when specifying
|
||||
the operation of a translation.
|
||||
|
||||
The operation string name must be identical both in the
|
||||
source code and in the translation table.
|
||||
These constants should be used whenever referencing
|
||||
operations as part of a translation.
|
||||
/*================================================$SKIP$==*/
|
||||
#endif
|
||||
/* $DEF$, Operation constants */
|
||||
#define DtLCX_OPER_STD "standard"
|
||||
#define DtLCX_OPER_ICONV1 "iconv1"
|
||||
#define DtLCX_OPER_ICONV3 "iconv3"
|
||||
#define DtLCX_OPER_NLLANGINFO_CODESET "nl_langinfo(CODESET)"
|
||||
#define DtLCX_OPER_SETLOCALE "setlocale"
|
||||
#define DtLCX_OPER_MULTIBYTE "multibyte"
|
||||
#define DtLCX_OPER_CCDF "ccdf"
|
||||
#define DtLCX_OPER_XLFD "xlfd"
|
||||
#define DtLCX_OPER_MIME "mime"
|
||||
#define DtLCX_OPER_INTERCHANGE_CODESET "interchangeCodeset"
|
||||
/*$END$*/
|
||||
|
||||
/* Functions */
|
||||
#define _DtLcxCloseDb(io_db) _DtXlateCloseDb(io_db)
|
||||
int _DtLcxOpenAllDbs(
|
||||
_DtXlateDb * ret_db);
|
||||
|
||||
int _DtLcxXlateOpToStd(
|
||||
const _DtXlateDb xlationDb,
|
||||
const char * platform,
|
||||
const int version,
|
||||
const char * operation,
|
||||
const char * opValue,
|
||||
char * * ret_stdLocale,
|
||||
char * * ret_stdLangTerr,
|
||||
char * * ret_stdCodeset,
|
||||
char * * ret_stdModifier);
|
||||
|
||||
int _DtLcxXlateStdToOp(
|
||||
const _DtXlateDb xlationDb,
|
||||
const char * platform,
|
||||
const int version,
|
||||
const char * operation,
|
||||
const char * stdLocale,
|
||||
const char * stdLangTerr,
|
||||
const char * stdCodeset,
|
||||
const char * stdModifier,
|
||||
char * * ret_opValue);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /*_DtLCX_XLATE_LOCALE_I*/
|
||||
/********* do not put anything below this line ********/
|
||||
@@ -1,145 +0,0 @@
|
||||
/*
|
||||
* CDE - Common Desktop Environment
|
||||
*
|
||||
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
|
||||
*
|
||||
* These libraries and programs are free software; you can
|
||||
* redistribute them and/or modify them under the terms of the GNU
|
||||
* Lesser General Public License as published by the Free Software
|
||||
* Foundation; either version 2 of the License, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* These libraries and programs are distributed in the hope that
|
||||
* they will be useful, but WITHOUT ANY WARRANTY; without even the
|
||||
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU Lesser General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with these libraries and programs; if not, write
|
||||
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
|
||||
* Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/*
|
||||
* File: Lock.h $XConsortium: Lock.h /main/4 1995/10/26 15:24:02 rswiston $
|
||||
* Language: C
|
||||
*
|
||||
* (c) Copyright 1990, Hewlett-Packard Company, all rights reserved.
|
||||
*
|
||||
* (c) Copyright 1993, 1994 Hewlett-Packard Company *
|
||||
* (c) Copyright 1993, 1994 International Business Machines Corp. *
|
||||
* (c) Copyright 1993, 1994 Sun Microsystems, Inc. *
|
||||
* (c) Copyright 1993, 1994 Novell, Inc. *
|
||||
*/
|
||||
|
||||
#ifndef _Dt_lock_h
|
||||
#define _Dt_lock_h
|
||||
|
||||
/*
|
||||
GENERAL DESCRIPTION:
|
||||
|
||||
The DT lock facility provides simple exclusive locking. It
|
||||
(as of 6/19/90) is based on the X11 selection-ownership
|
||||
mechanism, though users of Dt locking do not need to be aware of
|
||||
this.
|
||||
|
||||
X11 server grabs are judiciously used to guarantee atomicity of
|
||||
operations. If a process which holds a lock dies (or closes its
|
||||
X11 server connection for some other reason), the lock will be
|
||||
automatically released.
|
||||
|
||||
Locks are identified by a string. There is no mechanism to
|
||||
allocate unique lock strings to clients; users must take care to
|
||||
choose a string that will not be easily duplicated by some other
|
||||
client.
|
||||
|
||||
SAMPLE CODE:
|
||||
|
||||
#define MY_LOCK "MYAPP_MY_LOCK"
|
||||
|
||||
...
|
||||
|
||||
if (_DtGetLock (display, MY_LOCK)) {
|
||||
<do whatever it is I want to do>
|
||||
_DtReleaseLock (display, MY_LOCK);
|
||||
}
|
||||
else {
|
||||
<do the alternative>
|
||||
}
|
||||
*/
|
||||
|
||||
extern int _DtGetLock (
|
||||
Display *display,
|
||||
char *lock_name);
|
||||
/*
|
||||
DESCRIPTION:
|
||||
|
||||
_DtGetLock attempts to get the specified lock. If nobody holds
|
||||
the lock, _DtGetLock will obtain the lock and return 1. If
|
||||
somebody else already holds the lock, the lock will not be
|
||||
disturbed and _DtGetLock will return 0.
|
||||
|
||||
If the process which owns a lock dies (or closes its X11 server
|
||||
connection), the lock will be automatically released. To
|
||||
explicitly release a lock, use _DtReleaseLock.
|
||||
|
||||
|
||||
SYNOPSIS:
|
||||
|
||||
success = _DtGetLock (display, lock);
|
||||
|
||||
int success; Returns 1 if the lock is obtained,
|
||||
0 if not.
|
||||
|
||||
Display *display; The X11 server connection which will
|
||||
hold the lock.
|
||||
|
||||
char *lock; The string which names the lock.
|
||||
*/
|
||||
|
||||
extern void _DtReleaseLock (
|
||||
Display *display,
|
||||
char *lock_name);
|
||||
/*
|
||||
DESCRIPTION:
|
||||
|
||||
_DtReleaseLock releases a lock obtained by _DtGetLock.
|
||||
|
||||
WARNING!! It is perfectly legal for one process to release
|
||||
a lock held by another process. By convention you should only
|
||||
release locks previously obtained by your process from _DtGetLock
|
||||
unless you are playing God and know what you are doing.
|
||||
|
||||
SYNOPSIS:
|
||||
|
||||
(void) _DtReleaseLock (display, lock);
|
||||
|
||||
Display *display; The X11 server connection which holds
|
||||
the lock.
|
||||
|
||||
char *lock; The string which names the lock.
|
||||
*/
|
||||
|
||||
extern int _DtTestLock (
|
||||
Display *display,
|
||||
char *lock_name);
|
||||
/*
|
||||
DESCRIPTION:
|
||||
|
||||
_DtTestLock returns a status indicating whether anybody holds the
|
||||
specified lock.
|
||||
|
||||
SYNOPSIS:
|
||||
|
||||
status = _DtTestLock (display, lock);
|
||||
|
||||
int success; Returns 1 if anybody holds the lock,
|
||||
0 otherwise.
|
||||
|
||||
Display *display; The X11 server connection.
|
||||
|
||||
char *lock; The string which names the lock.
|
||||
*/
|
||||
|
||||
#endif /* _Dt_lock_h */
|
||||
/* Do not add anything after this endif. */
|
||||
@@ -1,114 +0,0 @@
|
||||
/*
|
||||
* CDE - Common Desktop Environment
|
||||
*
|
||||
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
|
||||
*
|
||||
* These libraries and programs are free software; you can
|
||||
* redistribute them and/or modify them under the terms of the GNU
|
||||
* Lesser General Public License as published by the Free Software
|
||||
* Foundation; either version 2 of the License, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* These libraries and programs are distributed in the hope that
|
||||
* they will be useful, but WITHOUT ANY WARRANTY; without even the
|
||||
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU Lesser General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with these libraries and programs; if not, write
|
||||
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
|
||||
* Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/*
|
||||
* File: Message.h $XConsortium: Message.h /main/5 1996/03/01 16:36:42 drk $
|
||||
* Language: C
|
||||
*
|
||||
* (c) Copyright 1990, Hewlett-Packard Company, all rights reserved.
|
||||
*
|
||||
* (c) Copyright 1993, 1994 Hewlett-Packard Company *
|
||||
* (c) Copyright 1993, 1994 International Business Machines Corp. *
|
||||
* (c) Copyright 1993, 1994 Sun Microsystems, Inc. *
|
||||
* (c) Copyright 1993, 1994 Novell, Inc. *
|
||||
*/
|
||||
|
||||
#ifndef _Dt_message_h
|
||||
#define _Dt_message_h
|
||||
|
||||
#include <Dt/DataTypes.h>
|
||||
#include <Dt/DtP.h>
|
||||
|
||||
#include <Dt/Service.h>
|
||||
|
||||
/* This header file is a modifed version of <Xv/Message.h> that
|
||||
* provides compatibility between the BMS messaging and the new
|
||||
* ICCCM messaging used in DT.
|
||||
*
|
||||
* The following symbols that were defined in <Xv/Message.h> are
|
||||
* no longer available. Any code that depended on them will have
|
||||
* to be rewritten:
|
||||
*
|
||||
* DtServerDeathFn
|
||||
* DtCloseMsgServerConnect
|
||||
* DtAddFailNotificationCallback
|
||||
* DtStatusResponse
|
||||
* DtUniqueRequestId
|
||||
* DtSendFailNotification
|
||||
* DtSendMsg
|
||||
*/
|
||||
|
||||
|
||||
/**********************************
|
||||
*
|
||||
* Message Format
|
||||
*
|
||||
**********************************/
|
||||
|
||||
/*
|
||||
* DT messages have the following format:
|
||||
*
|
||||
* Request message: <request> [args ...]
|
||||
* Reply message: <SUCCESS | FAILURE> [args ...]
|
||||
* Notify message: <notification> [args ...]
|
||||
*
|
||||
* The following fields in BMS messages are no longer supported:
|
||||
*
|
||||
* DT_MSG_SENDER
|
||||
* DT_MSG_REQUEST_ID
|
||||
* DT_MSG_TOOL
|
||||
* DT_MSG_HOST
|
||||
* DT_MSG_DIR
|
||||
* DT_MSG_FILE
|
||||
*/
|
||||
|
||||
#define DT_MSG_TYPE 0
|
||||
#define DT_MSG_COMMAND 0
|
||||
#define DT_MSG_DATA_1 1
|
||||
#define DT_MSG_DATA_2 2
|
||||
#define DT_MSG_DATA_3 3
|
||||
#define DT_MSG_DATA_4 4
|
||||
#define DT_MSG_DATA_5 5
|
||||
#define DT_MSG_DATA_6 6
|
||||
#define DT_MSG_DATA_7 7
|
||||
#define DT_MSG_DATA_8 8
|
||||
#define DT_MSG_DATA_9 9
|
||||
#define DT_MSG_DATA_10 10
|
||||
#define DT_MSG_DATA_11 11
|
||||
#define DT_MSG_DATA_12 12
|
||||
#define DT_MSG_DATA_13 13
|
||||
#define DT_MSG_DATA_14 14
|
||||
#define DT_MSG_DATA_15 15
|
||||
#define DT_MSG_DATA_16 16
|
||||
#define DT_MSG_DATA_17 17
|
||||
#define DT_MSG_DATA_18 18
|
||||
#define DT_MSG_DATA_19 19
|
||||
#define DT_MSG_DATA_20 20
|
||||
|
||||
#define DtDONT_CARE_FIELD "*"
|
||||
/*
|
||||
If a particular message does not require a value in one of the
|
||||
fields, use DtDONT_CARE_FIELD for the value of the field.
|
||||
*/
|
||||
|
||||
#endif /*_Dt_message_h*/
|
||||
/* Do not add anything after this endif. */
|
||||
@@ -1,55 +0,0 @@
|
||||
/*
|
||||
* CDE - Common Desktop Environment
|
||||
*
|
||||
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
|
||||
*
|
||||
* These libraries and programs are free software; you can
|
||||
* redistribute them and/or modify them under the terms of the GNU
|
||||
* Lesser General Public License as published by the Free Software
|
||||
* Foundation; either version 2 of the License, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* These libraries and programs are distributed in the hope that
|
||||
* they will be useful, but WITHOUT ANY WARRANTY; without even the
|
||||
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU Lesser General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with these libraries and programs; if not, write
|
||||
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
|
||||
* Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/*
|
||||
* Msg.h -- Header file for DT messaging library
|
||||
*
|
||||
* $XConsortium: Msg.h /main/5 1996/03/01 16:36:15 drk $
|
||||
*
|
||||
* (C) Copyright 1993, Hewlett-Packard, all rights reserved.
|
||||
*/
|
||||
#ifndef _DT_MSG_H
|
||||
#define _DT_MSG_H
|
||||
|
||||
#include <X11/Intrinsic.h>
|
||||
#include <Dt/DataTypes.h>
|
||||
|
||||
/*
|
||||
* _DtMessage handle definitions
|
||||
*/
|
||||
typedef struct _DtMsgHandle *DtMsgHandle;
|
||||
|
||||
/*
|
||||
* Return values
|
||||
*/
|
||||
#define dtmsg_NO_LISTENERS (102)
|
||||
#define dtmsg_SUCCESS (1)
|
||||
#define dtmsg_FAIL (-1)
|
||||
#define dtmsg_NO_SERVICE (-102)
|
||||
#define dtmsg_WRONG_FORMAT (-103)
|
||||
#define dtmsg_ANOTHER_PROVIDER (-104)
|
||||
#define dtmsg_LOST_SERVICE (-105)
|
||||
|
||||
#define DtMsgContext Pointer
|
||||
|
||||
#endif /* not defined _DT_MSG_H */
|
||||
/***** END OF FILE ****/
|
||||
@@ -1,53 +0,0 @@
|
||||
/*
|
||||
* CDE - Common Desktop Environment
|
||||
*
|
||||
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
|
||||
*
|
||||
* These libraries and programs are free software; you can
|
||||
* redistribute them and/or modify them under the terms of the GNU
|
||||
* Lesser General Public License as published by the Free Software
|
||||
* Foundation; either version 2 of the License, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* These libraries and programs are distributed in the hope that
|
||||
* they will be useful, but WITHOUT ANY WARRANTY; without even the
|
||||
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU Lesser General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with these libraries and programs; if not, write
|
||||
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
|
||||
* Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/*
|
||||
* (c) Copyright 1995 Digital Equipment Corporation.
|
||||
* (c) Copyright 1995 Hewlett-Packard Company.
|
||||
* (c) Copyright 1995 International Business Machines Corp.
|
||||
* (c) Copyright 1995 Sun Microsystems, Inc.
|
||||
* (c) Copyright 1995 Novell, Inc.
|
||||
* (c) Copyright 1995 FUJITSU LIMITED.
|
||||
* (c) Copyright 1995 Hitachi.
|
||||
*
|
||||
* MsgCat.h - Public interfaces for the Cached Message Catalog Service
|
||||
*
|
||||
* $TOG: MsgCatP.h /main/1 1998/04/22 14:19:24 mgreess $
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _Dt_MsgCat_h
|
||||
#define _Dt_MsgCat_h
|
||||
|
||||
#include <nl_types.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
extern char *_DtCatgetsCached(nl_catd catd, int set, int num, char *dflt);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _Dt_MsgCat_h */
|
||||
@@ -1,86 +0,0 @@
|
||||
/*
|
||||
* CDE - Common Desktop Environment
|
||||
*
|
||||
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
|
||||
*
|
||||
* These libraries and programs are free software; you can
|
||||
* redistribute them and/or modify them under the terms of the GNU
|
||||
* Lesser General Public License as published by the Free Software
|
||||
* Foundation; either version 2 of the License, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* These libraries and programs are distributed in the hope that
|
||||
* they will be useful, but WITHOUT ANY WARRANTY; without even the
|
||||
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU Lesser General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with these libraries and programs; if not, write
|
||||
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
|
||||
* Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/*
|
||||
* (c) Copyright 1995 Digital Equipment Corporation.
|
||||
* (c) Copyright 1995 Hewlett-Packard Company.
|
||||
* (c) Copyright 1995 International Business Machines Corp.
|
||||
* (c) Copyright 1995 Sun Microsystems, Inc.
|
||||
* (c) Copyright 1995 Novell, Inc.
|
||||
* (c) Copyright 1995 FUJITSU LIMITED.
|
||||
* (c) Copyright 1995 Hitachi.
|
||||
*
|
||||
* MsgLog.h - Public header file for the Message Logging Service
|
||||
*
|
||||
* $XConsortium: MsgLog.h /main/5 1995/07/14 13:22:57 drk $
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _Dt_MsgLog_h
|
||||
#define _Dt_MsgLog_h
|
||||
|
||||
#include <stdio.h> /* needed for FILE */
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
# include <stdarg.h>
|
||||
|
||||
/*
|
||||
* Type declarations
|
||||
*/
|
||||
typedef enum {
|
||||
DtMsgLogInformation,
|
||||
DtMsgLogStderr,
|
||||
DtMsgLogDebug,
|
||||
DtMsgLogWarning,
|
||||
DtMsgLogError
|
||||
} DtMsgLogType;
|
||||
|
||||
typedef void (*DtMsgLogHandler) (
|
||||
const char * program_name,
|
||||
DtMsgLogType msg_type,
|
||||
const char * format,
|
||||
va_list args );
|
||||
|
||||
/*
|
||||
* Function declarations
|
||||
*/
|
||||
extern void DtMsgLogMessage (
|
||||
const char * program_name,
|
||||
DtMsgLogType msg_type,
|
||||
const char * format,
|
||||
... );
|
||||
|
||||
extern DtMsgLogHandler DtMsgLogSetHandler (
|
||||
DtMsgLogHandler handler );
|
||||
|
||||
extern FILE * DtMsgLogOpenFile (
|
||||
const char * type,
|
||||
char ** filename_return); /* MODIFIED */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _Dt_MsgLog_h */
|
||||
@@ -1,65 +0,0 @@
|
||||
/*
|
||||
* CDE - Common Desktop Environment
|
||||
*
|
||||
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
|
||||
*
|
||||
* These libraries and programs are free software; you can
|
||||
* redistribute them and/or modify them under the terms of the GNU
|
||||
* Lesser General Public License as published by the Free Software
|
||||
* Foundation; either version 2 of the License, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* These libraries and programs are distributed in the hope that
|
||||
* they will be useful, but WITHOUT ANY WARRANTY; without even the
|
||||
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU Lesser General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with these libraries and programs; if not, write
|
||||
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
|
||||
* Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/*
|
||||
* (c) Copyright 1995 Digital Equipment Corporation.
|
||||
* (c) Copyright 1995 Hewlett-Packard Company.
|
||||
* (c) Copyright 1995 International Business Machines Corp.
|
||||
* (c) Copyright 1995 Sun Microsystems, Inc.
|
||||
* (c) Copyright 1995 Novell, Inc.
|
||||
* (c) Copyright 1995 FUJITSU LIMITED.
|
||||
* (c) Copyright 1995 Hitachi.
|
||||
*
|
||||
* MsgLogI.h - Private header file for the Message Logging Service
|
||||
*
|
||||
* $XConsortium: MsgLogI.h /main/4 1995/07/14 13:23:02 drk $
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _Dt_MsgLogI_h
|
||||
#define _Dt_MsgLogI_h
|
||||
|
||||
# include <stdarg.h>
|
||||
# define Va_start(a,b) va_start(a,b)
|
||||
|
||||
/*
|
||||
* Account for the various macros on different systems which indicate that
|
||||
* stdarg.h has been included. Code in this file only checks for
|
||||
* _STDARG_INCLUDED. If a given system defines another macro that means the
|
||||
* same thing -- then define _STDARG_INCLUDED here.
|
||||
*
|
||||
* System Macro Indicating stdarg.h has been included
|
||||
* -------- ---------------------------------------------
|
||||
* HPUX _STDARG_INCLUDED
|
||||
* AIX _H_STDARG
|
||||
* SOLARIS _STDARG_H
|
||||
*/
|
||||
|
||||
#ifdef _H_STDARG
|
||||
#define _STDARG_INCLUDED
|
||||
#endif
|
||||
|
||||
#ifdef _STDARG_H
|
||||
#define _STDARG_INCLUDED
|
||||
#endif
|
||||
|
||||
#endif /* _Dt_MsgLogI_h */
|
||||
@@ -1,182 +0,0 @@
|
||||
/*
|
||||
* CDE - Common Desktop Environment
|
||||
*
|
||||
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
|
||||
*
|
||||
* These libraries and programs are free software; you can
|
||||
* redistribute them and/or modify them under the terms of the GNU
|
||||
* Lesser General Public License as published by the Free Software
|
||||
* Foundation; either version 2 of the License, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* These libraries and programs are distributed in the hope that
|
||||
* they will be useful, but WITHOUT ANY WARRANTY; without even the
|
||||
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU Lesser General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with these libraries and programs; if not, write
|
||||
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
|
||||
* Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
#ifndef _DT_MSG_P_H
|
||||
#define _DT_MSG_P_H
|
||||
/*
|
||||
* MsgP.h -- Private header file for DT messaging library
|
||||
*
|
||||
* $XConsortium: MsgP.h /main/3 1995/10/26 15:24:51 rswiston $
|
||||
* $XConsortium: MsgP.h /main/3 1995/10/26 15:24:51 rswiston $
|
||||
*
|
||||
* (C) Copyright 1993, Hewlett-Packard, all rights reserved.
|
||||
*/
|
||||
#include <Dt/Msg.h>
|
||||
|
||||
|
||||
/*
|
||||
* Definitions
|
||||
*/
|
||||
|
||||
/* max property size (bytes) */
|
||||
#define DT_MSG_MAX_PROP_SIZE (32768)
|
||||
|
||||
/* atom names */
|
||||
#define DT_MSG_XA_REQUEST "_DT_REQUEST"
|
||||
#define DT_MSG_XA_NOTIFY "_DT_NOTIFY"
|
||||
#define DT_MSG_XA_BROADCAST_REGISTRY "_DT_BROADCAST_REGISTRY"
|
||||
|
||||
/*
|
||||
* _DtMessage handle
|
||||
*/
|
||||
typedef struct _DtMsgHandle {
|
||||
char * pchName; /* handle "name" */
|
||||
Atom atom; /* Selection/Broadcast atom */
|
||||
Widget widget; /* Widget registering this handle */
|
||||
char * pchPropName; /* property name */
|
||||
Atom property; /* atomized property name */
|
||||
|
||||
/* other data */
|
||||
struct _DtMsgServiceContext *
|
||||
service_data; /* service data assoc w/ handle */
|
||||
struct _DtMsgBroadcastData *
|
||||
broadcast_data; /* broadcast data assoc w/ handle */
|
||||
} DtMsgHandle;
|
||||
|
||||
/*
|
||||
* _DtMessage handle accessor "functions"
|
||||
*/
|
||||
#define DtMsgH_Name(h) ((h)->pchName)
|
||||
#define DtMsgH_Widget(h) ((h)->widget)
|
||||
#define DtMsgH_Atom(h) ((h)->atom)
|
||||
#define DtMsgH_SvcData(h) ((h)->service_data)
|
||||
#define DtMsgH_BcData(h) ((h)->broadcast_data)
|
||||
#define DtMsgH_PropertyName(h) ((h)->pchPropName)
|
||||
#define DtMsgH_PropertyAtom(h) ((h)->property)
|
||||
#define DtMsgH_Shandle(h) ((h)->service_data->handle)
|
||||
#define DtMsgH_RequestProc(h) ((h)->service_data->request_proc)
|
||||
#define DtMsgH_ReceiveCD(h) ((h)->service_data->receive_client_data)
|
||||
#define DtMsgH_LoseProc(h) ((h)->service_data->lose_proc)
|
||||
#define DtMsgH_LoseCD(h) ((h)->service_data->lose_client_data)
|
||||
#define DtMsgH_RegistryAtom(h) ((h)->broadcast_data->aRegistry)
|
||||
#define DtMsgH_SharedWindow(h) ((h)->broadcast_data->winShared)
|
||||
#define DtMsgH_SharedWidget(h) ((h)->broadcast_data->wShared)
|
||||
#define DtMsgH_Listener(h) ((h)->broadcast_data->wListener)
|
||||
#define DtMsgH_BreceiveProc(h) ((h)->broadcast_data->Breceive_proc)
|
||||
#define DtMsgH_BclientData(h) ((h)->broadcast_data->Bclient_data)
|
||||
#define DtMsgH_Bprops(h) ((h)->broadcast_data->props)
|
||||
#define DtMsgH_BnumProps(h) ((h)->broadcast_data->numProps)
|
||||
#define DtMsgH_BsizeProps(h) ((h)->broadcast_data->sizeProps)
|
||||
#define DtMsgH_Breceivers(h) ((h)->broadcast_data->pReceivers)
|
||||
#define DtMsgH_BnumReceivers(h) ((h)->broadcast_data->numReceivers)
|
||||
#define DtMsgH_BsizeReceivers(h) ((h)->broadcast_data->sizeReceivers)
|
||||
#define DtMsgH_BSenderInit(h) ((h)->broadcast_data->bSenderInitialized)
|
||||
|
||||
/*
|
||||
* Service context data
|
||||
* (for client that offers a service)
|
||||
*/
|
||||
typedef struct _DtMsgServiceContext {
|
||||
DtMsgHandle handle;
|
||||
DtMsgReceiveProc request_proc;
|
||||
DtMsgStatusProc lose_proc;
|
||||
Pointer receive_client_data;
|
||||
Pointer lose_client_data;
|
||||
} DtMsgServiceContext;
|
||||
|
||||
/*
|
||||
* Request context data
|
||||
* (for client that makes a service request)
|
||||
*/
|
||||
typedef struct _DtMsgRequestContext {
|
||||
DtMsgHandle handle;
|
||||
DtMsgReceiveProc reply_proc;
|
||||
Pointer client_data;
|
||||
} DtMsgRequestContext;
|
||||
|
||||
|
||||
/*
|
||||
* Reply message context data
|
||||
* (for client replying to a request)
|
||||
*/
|
||||
typedef struct _DtMsgReplyMessageContext {
|
||||
DtMsgHandle handle;
|
||||
Window window;
|
||||
Atom target;
|
||||
Atom property;
|
||||
} DtMsgReplyMessageContext;
|
||||
|
||||
|
||||
/*
|
||||
* Broadcast sender data
|
||||
*/
|
||||
|
||||
/* number of props to allocate per memory request */
|
||||
#define DT_MSG_PROP_INC_AMT 10
|
||||
|
||||
typedef struct _DtMsgBroadcastPerReceiverData {
|
||||
Widget widget; /* widget of receiver */
|
||||
Atom * propsUnread; /* list of props */
|
||||
int numPropsUnread; /* number of props */
|
||||
int sizePropsUnread; /* amt of space allocated */
|
||||
} DtMsgBroadcastPerReceiverData;
|
||||
|
||||
typedef struct _DtMsgBroadcastData {
|
||||
Atom aRegistry; /* registry atom name */
|
||||
Window winShared; /* shared window */
|
||||
Widget wShared; /* shared widget */
|
||||
Widget wListener; /* child of shared window */
|
||||
DtMsgReceiveProc Breceive_proc; /* broadcast receive proc */
|
||||
Pointer Bclient_data; /* broadcast client data */
|
||||
|
||||
Boolean bSenderInitialized; /* true if ready for send */
|
||||
Atom * props; /* props to use for messages */
|
||||
int numProps; /* number of message props */
|
||||
int sizeProps; /* number of props allocated */
|
||||
DtMsgBroadcastPerReceiverData * pReceivers; /* rcvr data */
|
||||
int numReceivers; /* number of receivers */
|
||||
int sizeReceivers; /* amt of rcvr space allocated */
|
||||
|
||||
} DtMsgBroadcastData;
|
||||
|
||||
|
||||
/*
|
||||
* Broadcast _DtMessage Registry definitions
|
||||
*/
|
||||
|
||||
/* registry entry size, in words */
|
||||
#define DT_MSG_REGISTRY_ENTRY_SIZE 2
|
||||
|
||||
/* offsets within each registry entry */
|
||||
#define DT_MSG_REGISTRY_NAME_OFFSET 0
|
||||
#define DT_MSG_REGISTRY_WINDOW_OFFSET 1
|
||||
|
||||
/* Macros to compute offset */
|
||||
#define MSG_GROUP_NAME(R, i) \
|
||||
(R[((i)*DT_MSG_REGISTRY_ENTRY_SIZE)+DT_MSG_REGISTRY_NAME_OFFSET])
|
||||
|
||||
#define MSG_GROUP_WINDOW(R, i) \
|
||||
(R[((i)*DT_MSG_REGISTRY_ENTRY_SIZE)+DT_MSG_REGISTRY_WINDOW_OFFSET])
|
||||
|
||||
|
||||
#endif /* not defined _DT_MSG_P_H */
|
||||
/***** END OF FILE ****/
|
||||
@@ -1,152 +0,0 @@
|
||||
/*
|
||||
* CDE - Common Desktop Environment
|
||||
*
|
||||
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
|
||||
*
|
||||
* These libraries and programs are free software; you can
|
||||
* redistribute them and/or modify them under the terms of the GNU
|
||||
* Lesser General Public License as published by the Free Software
|
||||
* Foundation; either version 2 of the License, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* These libraries and programs are distributed in the hope that
|
||||
* they will be useful, but WITHOUT ANY WARRANTY; without even the
|
||||
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU Lesser General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with these libraries and programs; if not, write
|
||||
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
|
||||
* Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/*
|
||||
* File: Service.h $XConsortium: Service.h /main/3 1995/10/26 15:27:03 rswiston $
|
||||
* Language: C
|
||||
*
|
||||
* (C) Copyright 1993, Hewlett-Packard, all rights reserved.
|
||||
*
|
||||
* (c) Copyright 1993, 1994 Hewlett-Packard Company *
|
||||
* (c) Copyright 1993, 1994 International Business Machines Corp. *
|
||||
* (c) Copyright 1993, 1994 Sun Microsystems, Inc. *
|
||||
* (c) Copyright 1993, 1994 Novell, Inc. *
|
||||
*/
|
||||
|
||||
#ifndef _Dt_Service_h
|
||||
#define _Dt_Service_h
|
||||
|
||||
/************* DATA TYPES *****************************************/
|
||||
|
||||
/* Many of the data types are standard DT types. */
|
||||
#include <Dt/DataTypes.h>
|
||||
|
||||
/* Built on ICCC-based messaging library */
|
||||
#include <Dt/Msg.h>
|
||||
|
||||
/* Specific messaging data types */
|
||||
typedef struct _DtSvcHandle * DtSvcHandle;
|
||||
typedef DtMsgContext DtSvcMsgContext;
|
||||
|
||||
/************* MESSAGE DEFINITIONS *********************************/
|
||||
#define DT_SVC_MSG_SUCCESS "SUCCESS"
|
||||
#define DT_SVC_MSG_FAIL "FAIL"
|
||||
#define DT_SVC_MSG_REQUEST "REQUEST"
|
||||
#define DT_SVC_MSG_NOTIFY "NOTIFY"
|
||||
|
||||
/************* CALLBACK PROTOTYPES ******************************
|
||||
*/
|
||||
|
||||
typedef void (*DtSvcReceiveProc) ();
|
||||
/*
|
||||
DtSvcHandle service,
|
||||
DtSvcMsgContext reply_context,
|
||||
Pointer client_data,
|
||||
String * message_fields,
|
||||
int num_fields);
|
||||
*/
|
||||
/*
|
||||
* service A handle for the service.
|
||||
*
|
||||
* reply_context Opaque context information for the request that
|
||||
* was received. This data is needed when
|
||||
* generating a reply to a request.
|
||||
*
|
||||
* client_data A pointer to the data that was specified when
|
||||
* the callback was registered.
|
||||
*
|
||||
* message_fields A pointer to an array of strings that is the
|
||||
* contents of the request. (See note 2.)
|
||||
*
|
||||
* num_fields The number of fields in the message_fields
|
||||
* array.
|
||||
*/
|
||||
|
||||
typedef void (*DtSvcMessageProc) ();
|
||||
/*
|
||||
DtSvcHandle service,
|
||||
Pointer client_data,
|
||||
String * message_fields,
|
||||
int num_fields);
|
||||
*/
|
||||
/*
|
||||
* service A handle for the service.
|
||||
*
|
||||
* client_data A pointer to the data that was specified when
|
||||
* the callback was registered.
|
||||
*
|
||||
* message_fields A pointer to an array of strings that is the
|
||||
* contents of the message. (See note 2.)
|
||||
*
|
||||
* num_fields The number of fields in the message_fields
|
||||
* array.
|
||||
*/
|
||||
|
||||
typedef void (*DtSvcStatusProc) ();
|
||||
/*
|
||||
DtSvcHandle service,
|
||||
int status,
|
||||
Pointer client_data);
|
||||
*/
|
||||
/*
|
||||
* service Handle to the service whose status is being
|
||||
* reported.
|
||||
*
|
||||
* status The status of the service being started.
|
||||
*
|
||||
* client_data Pointer to the data that was registered when
|
||||
* the callback was registered.
|
||||
*/
|
||||
|
||||
/************* CONSTANTS ******************************************
|
||||
*/
|
||||
|
||||
/* The following are types of reply messages.
|
||||
*/
|
||||
|
||||
#define DT_SVC_SUCCESS 1 /* The request succeeded. */
|
||||
|
||||
#define DT_SVC_FAIL -1 /* The service failed to carry
|
||||
* out the request.
|
||||
*/
|
||||
|
||||
#define DT_SVC_DELIVERY_FAIL -2 /* The request could not be
|
||||
* delivered to the service for
|
||||
* some reason. For example,
|
||||
* the service may not be running
|
||||
* and cannot be invoked.
|
||||
*/
|
||||
|
||||
/* The following are types of status.
|
||||
*/
|
||||
|
||||
#define DT_SVC_START 1 /* The service was started. */
|
||||
|
||||
#define DT_SVC_NO_START -1 /* The service failed to start.
|
||||
*/
|
||||
|
||||
#define DT_SVC_LOST -2 /* The service was lost. Another
|
||||
provider took over ownership
|
||||
for this service. */
|
||||
|
||||
#endif /*_Dt_Service_h*/
|
||||
/* Do not add anything after this endif. */
|
||||
@@ -1,363 +0,0 @@
|
||||
/*
|
||||
* CDE - Common Desktop Environment
|
||||
*
|
||||
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
|
||||
*
|
||||
* These libraries and programs are free software; you can
|
||||
* redistribute them and/or modify them under the terms of the GNU
|
||||
* Lesser General Public License as published by the Free Software
|
||||
* Foundation; either version 2 of the License, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* These libraries and programs are distributed in the hope that
|
||||
* they will be useful, but WITHOUT ANY WARRANTY; without even the
|
||||
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU Lesser General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with these libraries and programs; if not, write
|
||||
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
|
||||
* Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/* $XConsortium: Setlocale.h /main/3 1995/10/26 15:27:34 rswiston $ */
|
||||
/*
|
||||
* (c) Copyright 1993, 1994 Hewlett-Packard Company *
|
||||
* (c) Copyright 1993, 1994 International Business Machines Corp. *
|
||||
* (c) Copyright 1993, 1994 Sun Microsystems, Inc. *
|
||||
* (c) Copyright 1993, 1994 Novell, Inc. *
|
||||
*/
|
||||
/* Hp DT's version of an 8.0 include file; needed for Fnmatch */
|
||||
|
||||
#ifndef DtSETLOCALE_INCLUDED /* allow multiple inclusions */
|
||||
#define DtSETLOCALE_INCLUDED
|
||||
|
||||
#ifdef _NAMESPACE_CLEAN
|
||||
#define _1kanji __1kanji
|
||||
#define _2kanji __2kanji
|
||||
#define _downshift __downshift
|
||||
#define _upshift __upshift
|
||||
#endif /* _NAMESPACE_CLEAN */
|
||||
|
||||
#include <locale.h>
|
||||
#include <limits.h>
|
||||
#include <nl_types.h>
|
||||
#include <langinfo.h>
|
||||
#include <Dt/Collate.h>
|
||||
|
||||
#ifndef _NL_ORDER
|
||||
#define _NL_ORDER
|
||||
typedef int nl_order;
|
||||
#endif
|
||||
#ifndef _NL_MODE
|
||||
#define _NL_MODE
|
||||
typedef int nl_mode;
|
||||
#endif
|
||||
#ifndef _NL_OUTDGT
|
||||
#define _NL_OUTDGT
|
||||
typedef int nl_outdgt;
|
||||
#endif
|
||||
#ifndef MAXLNAMELEN
|
||||
#define MAXLNAMELEN 14
|
||||
#endif
|
||||
#endif
|
||||
|
||||
struct _era_data { /* defines an Emperor/Era time period */
|
||||
short start_year; /* starting date of era */
|
||||
unsigned short start_month;
|
||||
unsigned short start_day;
|
||||
short end_year; /* ending date of era */
|
||||
unsigned short end_month;
|
||||
unsigned short end_day;
|
||||
short origin_year; /* time axis origin for era (one of start_year or end_year) */
|
||||
short offset; /* offset from 0 for 1st year of era */
|
||||
short signflag; /* adjusts sign of (year - origin_year) value */
|
||||
unsigned short reserved;
|
||||
unsigned char *name; /* name of era */
|
||||
unsigned char *format; /* instead of nl_langinfo(ERA_FMT) */
|
||||
};
|
||||
|
||||
extern int __nl_langid[]; /* langid of currently loaded language */
|
||||
extern unsigned char *__ctype; /* pointer to ctype table */
|
||||
extern unsigned char *_1kanji; /* pointer to 1st of 2 kanji table */
|
||||
extern unsigned char *_2kanji; /* pointer to 2nd of 2 kanji table */
|
||||
extern unsigned char *_upshift; /* pointer to up shift table */
|
||||
extern unsigned char *_downshift; /* pointer to down shift table */
|
||||
#ifdef EUC
|
||||
extern unsigned char *__e_cset; /* pointer to expanded char set table */
|
||||
extern unsigned char *__ein_csize; /* pointer to expanded in_csize table */
|
||||
extern unsigned char *__eout_csize; /* pointer to expanded out_csize table*/
|
||||
#endif /* EUC */
|
||||
extern struct _era_data *_nl_era[]; /* array of era info str pointer */
|
||||
extern int _nl_radix; /* radix character */
|
||||
extern int _sh_low; /* lowest char in shift table domain */
|
||||
extern int _sh_high; /* highest char in shift table domain */
|
||||
extern int __nl_char_size; /* size of characters */
|
||||
#ifdef EUC
|
||||
extern int __nl_code_scheme;/* flag for char code scheme */
|
||||
extern int __cs_SBYTE; /* flag for 1 byte char code scheme */
|
||||
extern int __cs_HP15; /* flag for HP15 char code scheme */
|
||||
extern int __cs_EUC; /* flag for EUC char code scheme */
|
||||
extern unsigned char __in_csize[]; /* input char size */
|
||||
extern unsigned char __out_csize[]; /* output char size */
|
||||
extern unsigned int __euc_template[]; /* euc process code template */
|
||||
#endif /* EUC */
|
||||
extern nl_direct _nl_direct; /* direction flag */
|
||||
extern int _nl_context; /* directionality context flag */
|
||||
extern nl_order _nl_order; /* order flag */
|
||||
extern nl_mode _nl_mode; /* mode flag; Latin or non-Latin */
|
||||
extern nl_outdgt _nl_outdigit; /* digit output : ascii or alt digit */
|
||||
|
||||
extern int _nl_space_alt; /* value of alternative space */
|
||||
extern unsigned char *_nl_dgt_alt; /* buffer for alt digit string */
|
||||
extern unsigned char *_nl_punct_alt; /* buffer for alt punctuation string */
|
||||
extern unsigned char *_nl_pascii; /* buffer for ascii punctuation string */
|
||||
extern unsigned char *_nl_dascii; /* buffer for ascii digits string */
|
||||
extern int _nl_map21; /* non-zero if 2-to-1 mappings */
|
||||
extern int _nl_onlyseq; /* true if only 1-to-1 char w no pri */
|
||||
extern int _nl_collate_on; /* true if collation table loaded */
|
||||
extern int _nl_mb_collate; /* true if collation is multibyte */
|
||||
|
||||
extern unsigned char *_seqtab; /* dictionary sequence number table */
|
||||
extern unsigned char *_pritab; /* 1to2/2to1 flag + priority table */
|
||||
extern struct col_21tab *_tab21; /* 2-to-1 mapping table */
|
||||
extern struct col_12tab *_tab12; /* 1-to-2 mapping table */
|
||||
|
||||
extern unsigned char *__errptr; /* pointer to an area _errlocale() can use as a buffer */
|
||||
|
||||
extern struct lconv *_lconv;
|
||||
extern unsigned char *__category_name[];
|
||||
|
||||
extern unsigned char **__nl_info; /* pointers to locale langinfo strings */
|
||||
extern unsigned char *__C_langinfo[];/* default langinfo strings for the C locale */
|
||||
#define _NL_MAX_MSG ERA_FMT /* last nl_langinfo item */
|
||||
|
||||
/***************************************************************************
|
||||
|
||||
The remainder of this file includes structures for the language files.
|
||||
The files are built by buildlang(1M).
|
||||
|
||||
The structure of the files is as follows :
|
||||
|
||||
----------------------------------
|
||||
| Table Header (A) |
|
||||
----------------------------------
|
||||
| Category/Modifier Structures(B)|
|
||||
==================================
|
||||
| LC_ALL Table Header (C) |
|
||||
- - - - - - - - -
|
||||
| LC_ALL Data |
|
||||
----------------------------------
|
||||
| LC_COLLATE Table Header (D) |
|
||||
- - - - - - - - -
|
||||
| LC_COLLATE Data |
|
||||
----------------------------------
|
||||
| LC_CTYPE Table Header (E) |
|
||||
- - - - - - - - -
|
||||
| LC_CTYPE Data |
|
||||
----------------------------------
|
||||
| LC_MONETARY Table Header (F)
|
||||
- - - - - - - - -
|
||||
| LC_MONETARY Data |
|
||||
----------------------------------
|
||||
| LC_NUMERIC Table Header (G) |
|
||||
- - - - - - - - -
|
||||
| LC_NUMERIC Data |
|
||||
----------------------------------
|
||||
| LC_TIME Table Header (H) |
|
||||
- - - - - - - - -
|
||||
| LC_TIME Data |
|
||||
----------------------------------
|
||||
|
||||
*****************************************************************************/
|
||||
|
||||
|
||||
/* Category Id's */
|
||||
|
||||
|
||||
/* Table Header (A) */
|
||||
|
||||
struct table_header {
|
||||
unsigned int size; /* size of table header and category
|
||||
structure. (A) + (B) */
|
||||
unsigned short nl_langid; /* _nl_langid */
|
||||
unsigned char lang[3*MAXLNAMELEN+2+1]; /* language name */
|
||||
unsigned short cat_no; /* number of categories defined */
|
||||
unsigned short mod_no; /* number of modifiers defined */
|
||||
unsigned short rev_flag; /* true if HP defined */
|
||||
unsigned char rev_str[36]; /* Revision String */
|
||||
unsigned short codeset; /* 0 if 1 byte, 1 if 2 byte */
|
||||
unsigned int reserved1;
|
||||
unsigned int reserved2;
|
||||
unsigned int reserved3;
|
||||
};
|
||||
|
||||
/* Category/Modifier Structure (B)
|
||||
|
||||
Catinfotype structure describes a category/modifier table
|
||||
There is one structure for each category and modifier defined.
|
||||
These entries follow the table header */
|
||||
|
||||
|
||||
struct catinfotype
|
||||
{
|
||||
int size; /* size of category table */
|
||||
int address; /* address of category table -
|
||||
offset from the beginning of
|
||||
the category tables () */
|
||||
short catid; /* category id */
|
||||
unsigned char mod_name[MAXLNAMELEN+1]; /* name of modifier */
|
||||
short mod_addr; /* address of category table
|
||||
for modifier - offset from
|
||||
beginning of file */
|
||||
};
|
||||
|
||||
|
||||
/* Below are the category headers for each of the defined categories
|
||||
All addresses are offset from the beginning of the category information */
|
||||
|
||||
/* LC_ALL Table (C) */
|
||||
|
||||
struct all_header {
|
||||
unsigned short yes_addr; /* msg_index[YESSTR] */
|
||||
unsigned short no_addr; /* msg_index[NOSTR] */
|
||||
unsigned short direct_addr; /* msg_index[DIRECTION] */
|
||||
/* _nl_direct */
|
||||
unsigned short context_addr; /* _nl_context */
|
||||
};
|
||||
|
||||
/* LC_COLLATE Tables (D) */
|
||||
|
||||
struct col_header {
|
||||
unsigned int seqtab_addr; /* _seqtab */
|
||||
unsigned int pritab_addr; /* _pritab */
|
||||
unsigned short nl_map21; /* not an address */
|
||||
unsigned short nl_onlyseq; /* not an address */
|
||||
unsigned int tab21_addr;
|
||||
unsigned int tab12_addr;
|
||||
};
|
||||
|
||||
|
||||
/* LC_CTYPE Tables (E) */
|
||||
|
||||
struct ctype_header {
|
||||
unsigned int _sh_high; /* _sh_high */
|
||||
int _sh_low; /* _sh_low */
|
||||
unsigned int _ctype_addr; /* __ctype */
|
||||
unsigned int kanji1_addr; /* _1kanji */
|
||||
unsigned int kanji2_addr; /* _2kanji */
|
||||
unsigned int upshift_addr; /* _upshift */
|
||||
unsigned int downshift_addr; /* _downshift */
|
||||
unsigned short byte_char_addr; /* msg_index[BYTES_CHAR] */
|
||||
unsigned short alt_punct_addr; /* msg_index[ALT_PUNCT] */
|
||||
/* _nl_punct_alt[] */
|
||||
/* _nl_space_alt */
|
||||
#ifdef EUC
|
||||
unsigned int io_csize_addr; /* __io_csize[] */
|
||||
unsigned int e_cset_addr; /* __e_cset */
|
||||
unsigned int ein_csize_addr; /* __ein_csize */
|
||||
unsigned int eout_csize_addr; /* __eout_csize */
|
||||
#endif /* EUC */
|
||||
};
|
||||
|
||||
|
||||
|
||||
/* LC_MONETARY Tables (F) */
|
||||
|
||||
|
||||
struct monetary_header {
|
||||
unsigned short int_frac_digits; /* _lconv->short_frac_digits */
|
||||
unsigned short frac_digits; /* _lconv->frac_digits */
|
||||
unsigned short p_cs_precedes; /* _lconv->p_cs_precedes */
|
||||
unsigned short p_sep_by_space; /* _lconv->p_sep_by_space */
|
||||
unsigned short n_cs_precedes; /* _lconv->n_cs_precedes */
|
||||
unsigned short n_sep_by_space; /* _lconv->n_sep_by_space */
|
||||
unsigned short p_sign_posn; /* _lconv->p_sign_posn */
|
||||
unsigned short n_sign_posn; /* _lconv->n_sign_posn */
|
||||
unsigned short curr_symbol_lconv; /* _lconv->currency_symbol */
|
||||
unsigned short curr_symbol_li; /* msg_index[CRNCYSTR] */
|
||||
unsigned short mon_decimal_point; /* _lconv->mon_decimal_point */
|
||||
unsigned short int_curr_symbol; /* _lconv->short_curr_symbol */
|
||||
unsigned short mon_thousands_sep; /* _lconv->mon_thousands_sep */
|
||||
unsigned short mon_grouping; /* _lconv->mon_grouping */
|
||||
unsigned short positive_sign; /* _lconv->positive_sign */
|
||||
unsigned short negative_sign; /* _lconv->negative_sign */
|
||||
};
|
||||
|
||||
|
||||
|
||||
/* LC_NUMERIC Tables (G) */
|
||||
|
||||
|
||||
struct numeric_header {
|
||||
unsigned short grouping; /* _lconv->grouping */
|
||||
unsigned short decimal_point; /* _lconv->decimal_point */
|
||||
/* msg_index[RADIXCHAR] */
|
||||
/* _nl_radix */
|
||||
unsigned short thousands_sep; /* _lconv->thousands_sep */
|
||||
/* msg_index[THOUSEP] */
|
||||
unsigned short alt_digit_addr; /* msg_index[ALT_DIGIT] */
|
||||
};
|
||||
|
||||
|
||||
|
||||
/* LC_TIME Tables (H) */
|
||||
|
||||
struct time_header {
|
||||
unsigned short d_t_fmt; /* msg_index[D_T_FMT] */
|
||||
unsigned short d_fmt; /* msg_index[D_FMT] */
|
||||
unsigned short t_fmt; /* msg_index[T_FMT] */
|
||||
unsigned short day_1; /* msg_index[DAY_1] */
|
||||
unsigned short day_2; /* msg_index[DAY_2] */
|
||||
unsigned short day_3; /* msg_index[DAY_3] */
|
||||
unsigned short day_4; /* msg_index[DAY_4] */
|
||||
unsigned short day_5; /* msg_index[DAY_5] */
|
||||
unsigned short day_6; /* msg_index[DAY_6] */
|
||||
unsigned short day_7; /* msg_index[DAY_7] */
|
||||
unsigned short abday_1; /* msg_index[ABDAY_1] */
|
||||
unsigned short abday_2; /* msg_index[ABDAY_2] */
|
||||
unsigned short abday_3; /* msg_index[ABDAY_3] */
|
||||
unsigned short abday_4; /* msg_index[ABDAY_4] */
|
||||
unsigned short abday_5; /* msg_index[ABDAY_5] */
|
||||
unsigned short abday_6; /* msg_index[ABDAY_6] */
|
||||
unsigned short abday_7; /* msg_index[ABDAY_7] */
|
||||
unsigned short mon_1; /* msg_index[MON_1] */
|
||||
unsigned short mon_2; /* msg_index[MON_2] */
|
||||
unsigned short mon_3; /* msg_index[MON_3] */
|
||||
unsigned short mon_4; /* msg_index[MON_4] */
|
||||
unsigned short mon_5; /* msg_index[MON_5] */
|
||||
unsigned short mon_6; /* msg_index[MON_6] */
|
||||
unsigned short mon_7; /* msg_index[MON_7] */
|
||||
unsigned short mon_8; /* msg_index[MON_8] */
|
||||
unsigned short mon_9; /* msg_index[MON_9] */
|
||||
unsigned short mon_10; /* msg_index[MON_10] */
|
||||
unsigned short mon_11; /* msg_index[MON_11] */
|
||||
unsigned short mon_12; /* msg_index[MON_12] */
|
||||
unsigned short abmon_1; /* msg_index[ABMON_1] */
|
||||
unsigned short abmon_2; /* msg_index[ABMON_2] */
|
||||
unsigned short abmon_3; /* msg_index[ABMON_3] */
|
||||
unsigned short abmon_4; /* msg_index[ABMON_4] */
|
||||
unsigned short abmon_5; /* msg_index[ABMON_5] */
|
||||
unsigned short abmon_6; /* msg_index[ABMON_6] */
|
||||
unsigned short abmon_7; /* msg_index[ABMON_7] */
|
||||
unsigned short abmon_8; /* msg_index[ABMON_8] */
|
||||
unsigned short abmon_9; /* msg_index[ABMON_9] */
|
||||
unsigned short abmon_10; /* msg_index[ABMON_10] */
|
||||
unsigned short abmon_11; /* msg_index[ABMON_11] */
|
||||
unsigned short abmon_12; /* msg_index[ABMON_12] */
|
||||
unsigned short am_str; /* msg_index[AM_STR] */
|
||||
unsigned short pm_str; /* msg_index[PM_STR] */
|
||||
unsigned short year_unit; /* msg_index[YEAR_UNIT] */
|
||||
unsigned short mon_unit; /* msg_index[MON_UNIT] */
|
||||
unsigned short day_unit; /* msg_index[DAY_UNIT] */
|
||||
unsigned short hour_unit; /* msg_index[HOUR_UNIT] */
|
||||
unsigned short min_unit; /* msg_index[MIN_UNIT] */
|
||||
unsigned short sec_unit; /* msg_index[SEC_UNIT] */
|
||||
unsigned short era_fmt; /* msg_index[ERA_FMT] */
|
||||
unsigned short era_count; /* number of era entries */
|
||||
unsigned short era_names; /* address of era name and format strings */
|
||||
unsigned short era_addr; /* address of era data structure entries */
|
||||
unsigned short reserved; /* address of era data structure entries */
|
||||
};
|
||||
|
||||
#endif /* DtSETLOCALE_INCLUDED */
|
||||
@@ -1,102 +0,0 @@
|
||||
/*
|
||||
* CDE - Common Desktop Environment
|
||||
*
|
||||
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
|
||||
*
|
||||
* These libraries and programs are free software; you can
|
||||
* redistribute them and/or modify them under the terms of the GNU
|
||||
* Lesser General Public License as published by the Free Software
|
||||
* Foundation; either version 2 of the License, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* These libraries and programs are distributed in the hope that
|
||||
* they will be useful, but WITHOUT ANY WARRANTY; without even the
|
||||
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU Lesser General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with these libraries and programs; if not, write
|
||||
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
|
||||
* Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/* $XConsortium: SharedProcs.h /main/4 1995/10/26 15:28:07 rswiston $ */
|
||||
/*
|
||||
* (c) Copyright 1993, 1994 Hewlett-Packard Company *
|
||||
* (c) Copyright 1993, 1994 International Business Machines Corp. *
|
||||
* (c) Copyright 1993, 1994 Sun Microsystems, Inc. *
|
||||
* (c) Copyright 1993, 1994 Novell, Inc. *
|
||||
*/
|
||||
/************************************<+>*************************************
|
||||
****************************************************************************
|
||||
**
|
||||
** File: SharedProcs.h
|
||||
**
|
||||
** Project: SUI
|
||||
**
|
||||
** Description: Public include file for some shared functions.
|
||||
**
|
||||
**
|
||||
** (c) Copyright 1987, 1988, 1989 by Hewlett-Packard Company
|
||||
**
|
||||
**
|
||||
**
|
||||
****************************************************************************
|
||||
************************************<+>*************************************/
|
||||
|
||||
#ifndef _SharedProcs_h
|
||||
#define _SharedProcs_h
|
||||
|
||||
|
||||
/******** Public Function Declarations ********/
|
||||
|
||||
extern String _DtStripSpaces(
|
||||
String string) ;
|
||||
extern void _DtMessage(
|
||||
Widget w,
|
||||
char *title,
|
||||
char *message_text,
|
||||
XtPointer helpIdStr,
|
||||
void (*helpCallback)()) ;
|
||||
extern Widget _DtMessageDialog(
|
||||
Widget w,
|
||||
char *title,
|
||||
char *message_text,
|
||||
XtPointer helpIdStr,
|
||||
Boolean cancel_btn,
|
||||
void (*cancel_callback)(),
|
||||
void (*ok_callback)(),
|
||||
void (*close_callback)(),
|
||||
void (*help_callback)(),
|
||||
Boolean deleteOnClose,
|
||||
int dialogType) ;
|
||||
extern void _DtMessageOK(
|
||||
Widget w,
|
||||
XtPointer client_data,
|
||||
XtPointer call_data) ;
|
||||
extern void _DtMessageClose(
|
||||
Widget w,
|
||||
XtPointer client_data,
|
||||
XEvent *event) ;
|
||||
|
||||
/******** End Public Function Declarations ********/
|
||||
|
||||
/* _DtMessage Dialog build defines */
|
||||
#define ERROR_DIALOG 1
|
||||
#define WARNING_DIALOG 2
|
||||
#define QUESTION_DIALOG 3
|
||||
|
||||
/* Flag which can be used to prevent error dialogs from being posted */
|
||||
extern Boolean messageDisplayEnabled;
|
||||
|
||||
/* Flag controlling whether dialogs are auto-positioned */
|
||||
extern Boolean disableDialogAutoPlacement;
|
||||
|
||||
/* Generic overlay for all dialog 'Rec' structures */
|
||||
typedef struct
|
||||
{
|
||||
Widget shell;
|
||||
} GenericRecord;
|
||||
|
||||
#endif /* _SharedProcs_h */
|
||||
/* DON'T ADD ANYTHING AFTER THIS #endif */
|
||||
@@ -1,73 +0,0 @@
|
||||
/*
|
||||
* CDE - Common Desktop Environment
|
||||
*
|
||||
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
|
||||
*
|
||||
* These libraries and programs are free software; you can
|
||||
* redistribute them and/or modify them under the terms of the GNU
|
||||
* Lesser General Public License as published by the Free Software
|
||||
* Foundation; either version 2 of the License, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* These libraries and programs are distributed in the hope that
|
||||
* they will be useful, but WITHOUT ANY WARRANTY; without even the
|
||||
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU Lesser General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with these libraries and programs; if not, write
|
||||
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
|
||||
* Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/* $XConsortium: SmCreateDirs.h /main/4 1995/10/26 15:28:38 rswiston $ */
|
||||
/* *
|
||||
* (c) Copyright 1993, 1994 Hewlett-Packard Company *
|
||||
* (c) Copyright 1993, 1994 International Business Machines Corp. *
|
||||
* (c) Copyright 1993, 1994 Sun Microsystems, Inc. *
|
||||
* (c) Copyright 1993, 1994 Novell, Inc. *
|
||||
*/
|
||||
/*************************************<+>*************************************
|
||||
*****************************************************************************
|
||||
**
|
||||
** File: SmCreateDirs.h
|
||||
**
|
||||
** Description: Header file for SmCreateDirs.c
|
||||
** -----------
|
||||
**
|
||||
*******************************************************************
|
||||
** (c) Copyright Hewlett-Packard Company, 1990. All rights are
|
||||
** reserved. Copying or other reproduction of this program
|
||||
** except for archival purposes is prohibited without prior
|
||||
** written consent of Hewlett-Packard Company.
|
||||
********************************************************************
|
||||
**
|
||||
**
|
||||
**
|
||||
*****************************************************************************
|
||||
*************************************<+>*************************************/
|
||||
|
||||
#ifndef _SmCreateDirs_h
|
||||
#define _SmCreateDirs_h
|
||||
|
||||
/*
|
||||
* include statements
|
||||
*/
|
||||
|
||||
/*
|
||||
* define statements
|
||||
*/
|
||||
|
||||
/*
|
||||
* typedef statements
|
||||
*/
|
||||
|
||||
/*
|
||||
* Function definitions
|
||||
*/
|
||||
|
||||
extern char * _DtCreateDtDirs(Display *display) ;
|
||||
|
||||
|
||||
#endif /* _SmCreateDirs_h */
|
||||
/* Do not add anything after this endif. */
|
||||
@@ -1,51 +0,0 @@
|
||||
/*
|
||||
* CDE - Common Desktop Environment
|
||||
*
|
||||
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
|
||||
*
|
||||
* These libraries and programs are free software; you can
|
||||
* redistribute them and/or modify them under the terms of the GNU
|
||||
* Lesser General Public License as published by the Free Software
|
||||
* Foundation; either version 2 of the License, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* These libraries and programs are distributed in the hope that
|
||||
* they will be useful, but WITHOUT ANY WARRANTY; without even the
|
||||
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU Lesser General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with these libraries and programs; if not, write
|
||||
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
|
||||
* Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/*
|
||||
* File: Spc.h $XConsortium: Spc.h /main/3 1995/10/26 15:28:51 rswiston $
|
||||
* Language: C
|
||||
*
|
||||
* (c) Copyright 1988, Hewlett-Packard Company, all rights reserved.
|
||||
*
|
||||
* (c) Copyright 1993, 1994 Hewlett-Packard Company *
|
||||
* (c) Copyright 1993, 1994 International Business Machines Corp. *
|
||||
* (c) Copyright 1993, 1994 Sun Microsystems, Inc. *
|
||||
* (c) Copyright 1993, 1994 Novell, Inc. *
|
||||
*/
|
||||
|
||||
#ifndef _Dt_SPC_h
|
||||
#define _Dt_SPC_h
|
||||
|
||||
#include <bms/spc.h>
|
||||
|
||||
/*
|
||||
* For definitions of any of the following, look in <bms/spc.h>.
|
||||
*/
|
||||
|
||||
#define DtSPCOpen XeSPCOpen
|
||||
#define DtSPCClose XeSPCClose
|
||||
#define DtSPCSpawn XeSPCSpawn
|
||||
#define DtSPCAddInput XeSPCAddInput
|
||||
#define DtSPCRegisterTerminator XeSPCRegisterTerminator
|
||||
#define DtSPCErrorNumber XeSPCErrorNumber
|
||||
|
||||
#endif /* #ifdef _Dt_SPC_h */
|
||||
@@ -1,46 +0,0 @@
|
||||
/*
|
||||
* CDE - Common Desktop Environment
|
||||
*
|
||||
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
|
||||
*
|
||||
* These libraries and programs are free software; you can
|
||||
* redistribute them and/or modify them under the terms of the GNU
|
||||
* Lesser General Public License as published by the Free Software
|
||||
* Foundation; either version 2 of the License, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* These libraries and programs are distributed in the hope that
|
||||
* they will be useful, but WITHOUT ANY WARRANTY; without even the
|
||||
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU Lesser General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with these libraries and programs; if not, write
|
||||
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
|
||||
* Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/* $XConsortium: SvcTT.h /main/3 1995/10/26 15:30:33 rswiston $ */
|
||||
/*%% */
|
||||
/*%% RESTRICTED CONFIDENTIAL INFORMATION: */
|
||||
/*%% */
|
||||
/*%% The information in this document is subject to special */
|
||||
/*%% restrictions in a confidential disclosure agreement between */
|
||||
/*%% HP, IBM, Sun, USL, SCO and Univel. Do not distribute this */
|
||||
/*%% document outside HP, IBM, Sun, USL, SCO, or Univel without */
|
||||
/*%% Sun's specific written approval. This document and all copies */
|
||||
/*%% and derivative works thereof must be returned or destroyed at */
|
||||
/*%% Sun's request. */
|
||||
/*%% */
|
||||
/*%% Copyright 1994 Sun Microsystems, Inc. All rights reserved. */
|
||||
/*%% */
|
||||
#ifndef _DT_SVCTT_H
|
||||
#define _DT_SVCTT_H
|
||||
|
||||
#include <Tt/tttk.h>
|
||||
|
||||
extern Tt_status _DtSvcInitToolTalk(
|
||||
Widget widget
|
||||
);
|
||||
|
||||
#endif
|
||||
@@ -1,39 +0,0 @@
|
||||
/*
|
||||
* CDE - Common Desktop Environment
|
||||
*
|
||||
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
|
||||
*
|
||||
* These libraries and programs are free software; you can
|
||||
* redistribute them and/or modify them under the terms of the GNU
|
||||
* Lesser General Public License as published by the Free Software
|
||||
* Foundation; either version 2 of the License, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* These libraries and programs are distributed in the hope that
|
||||
* they will be useful, but WITHOUT ANY WARRANTY; without even the
|
||||
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU Lesser General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with these libraries and programs; if not, write
|
||||
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
|
||||
* Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/* $XConsortium: Unistd.h /main/3 1995/10/26 15:31:10 rswiston $ */
|
||||
/*
|
||||
* (c) Copyright 1993, 1994 Hewlett-Packard Company *
|
||||
* (c) Copyright 1993, 1994 International Business Machines Corp. *
|
||||
* (c) Copyright 1993, 1994 Sun Microsystems, Inc. *
|
||||
* (c) Copyright 1993, 1994 Novell, Inc. *
|
||||
*/
|
||||
/* Hp DT's version of an 8.0 include file; needed for Fnmatch */
|
||||
|
||||
#ifndef DtUNISTD_INCLUDED
|
||||
#define DtUNISTD_INCLUDED
|
||||
|
||||
# define FNM_PATHNAME 01 /* flag for pathname matching */
|
||||
# define _FNM_PERIOD 02 /* flag for explicitly matching leading '.'s */
|
||||
# define _FNM_UAE 04 /* flag for csh pattern matching */
|
||||
|
||||
#endif /* DtUNISTD_INCLUDED */
|
||||
@@ -1,129 +0,0 @@
|
||||
/*
|
||||
* CDE - Common Desktop Environment
|
||||
*
|
||||
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
|
||||
*
|
||||
* These libraries and programs are free software; you can
|
||||
* redistribute them and/or modify them under the terms of the GNU
|
||||
* Lesser General Public License as published by the Free Software
|
||||
* Foundation; either version 2 of the License, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* These libraries and programs are distributed in the hope that
|
||||
* they will be useful, but WITHOUT ANY WARRANTY; without even the
|
||||
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU Lesser General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with these libraries and programs; if not, write
|
||||
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
|
||||
* Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/* $TOG: UserMsg.h /main/6 1998/04/09 17:50:49 mgreess $ */
|
||||
/*
|
||||
* (c) Copyright 1995 Digital Equipment Corporation.
|
||||
* (c) Copyright 1988, 1993, 1994, 1995 Hewlett-Packard Company
|
||||
* (c) Copyright 1993, 1994, 1995 International Business Machines Corp.
|
||||
* (c) Copyright 1993, 1994, 1995 Sun Microsystems, Inc.
|
||||
* (c) Copyright 1993, 1994, 1995 Novell, Inc.
|
||||
* (c) Copyright 1995 FUJITSU LIMITED.
|
||||
* (c) Copyright 1995 Hitachi.
|
||||
*/
|
||||
|
||||
/* -*-C-*-
|
||||
********************************************************************************
|
||||
*
|
||||
* File: usermsg.h
|
||||
* Description: Header for error logging routines
|
||||
* Status: Experimental (Do Not Distribute)
|
||||
*
|
||||
********************************************************************************
|
||||
*/
|
||||
|
||||
#ifndef _usermsg_h
|
||||
#define _usermsg_h
|
||||
|
||||
#include <X11/Intrinsic.h>
|
||||
|
||||
#ifndef __STDC__
|
||||
# ifndef const
|
||||
# define const
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#include <bms/XeUserMsg.h>
|
||||
|
||||
typedef enum {
|
||||
DtIgnore,
|
||||
DtInformation,
|
||||
DtWarning,
|
||||
DtError,
|
||||
DtFatalError,
|
||||
DtInternalError
|
||||
} DtSeverity;
|
||||
|
||||
|
||||
extern void _DtSimpleError(
|
||||
char *progName,
|
||||
DtSeverity severity,
|
||||
char *help,
|
||||
char *format,
|
||||
...) ;
|
||||
extern void _DtSimpleErrnoError(
|
||||
char *progName,
|
||||
DtSeverity severity,
|
||||
char *help,
|
||||
char *format,
|
||||
...) ;
|
||||
|
||||
#define DtProgName XeProgName
|
||||
|
||||
extern int _DtPrintDefaultError(
|
||||
Display *dpy,
|
||||
XErrorEvent *event,
|
||||
char *msg );
|
||||
|
||||
#define _DTPRINTDEFAULTERROR_BUFSIZE 1024
|
||||
|
||||
extern int _DtPrintDefaultErrorSafe(
|
||||
Display *dpy,
|
||||
XErrorEvent *event,
|
||||
char *msg,
|
||||
int bytes);
|
||||
|
||||
/*
|
||||
DESCRIPTION:
|
||||
|
||||
Supply the standard Xerror output to a buffer (instead of stederr)
|
||||
so client can do what it wants with it. Also don't exit. Allow
|
||||
client to decide what to do.
|
||||
|
||||
An appropriate thing to do would be to pass the buffer to
|
||||
DtSimpleError() and return. ie. In your error callback:
|
||||
|
||||
{
|
||||
char errmsg[1024];
|
||||
int ret ;
|
||||
ret = _DtPrintDefaultError (style.display, rep, errmsg);
|
||||
DtSimpleError(DtWarning, "><An X Error has occurred...continuing" ,
|
||||
errmsg, NULL);
|
||||
return ret;
|
||||
}
|
||||
|
||||
SYNOPSIS:
|
||||
|
||||
int _DtPrintDefaultError (dpy, event, msg)
|
||||
|
||||
Display *dpy; The application's display structure.
|
||||
|
||||
XErrorEvent *event; Error event returned to error callback.
|
||||
|
||||
char *msg; Buffer returning the formatted text of
|
||||
the error message. It won't be more than
|
||||
1024 bytes.
|
||||
|
||||
*/
|
||||
|
||||
#endif /* _usermsg_h */
|
||||
/* DON'T ADD STUFF AFTER THIS #endif */
|
||||
@@ -1,140 +0,0 @@
|
||||
/*
|
||||
* CDE - Common Desktop Environment
|
||||
*
|
||||
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
|
||||
*
|
||||
* These libraries and programs are free software; you can
|
||||
* redistribute them and/or modify them under the terms of the GNU
|
||||
* Lesser General Public License as published by the Free Software
|
||||
* Foundation; either version 2 of the License, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* These libraries and programs are distributed in the hope that
|
||||
* they will be useful, but WITHOUT ANY WARRANTY; without even the
|
||||
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU Lesser General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with these libraries and programs; if not, write
|
||||
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
|
||||
* Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/*
|
||||
* File: Utility.h $XConsortium: Utility.h /main/4 1995/10/26 15:31:55 rswiston $
|
||||
* Language: C
|
||||
*
|
||||
* (c) Copyright 1988, Hewlett-Packard Company, all rights reserved.
|
||||
*
|
||||
* (c) Copyright 1993, 1994 Hewlett-Packard Company *
|
||||
* (c) Copyright 1993, 1994 International Business Machines Corp. *
|
||||
* (c) Copyright 1993, 1994 Sun Microsystems, Inc. *
|
||||
* (c) Copyright 1993, 1994 Novell, Inc. *
|
||||
*/
|
||||
|
||||
#ifndef _Dt_Utility_h
|
||||
#define _Dt_Utility_h
|
||||
|
||||
/******************************************************************************
|
||||
*
|
||||
* _DtVectorizeInPlace() takes a string which is made up a group of
|
||||
* components, separated by a common separator character, and breaks
|
||||
* the string up into the separate components. To reduce the amount of
|
||||
* memory used (and to reduce memory fragmentation), the string is simply
|
||||
* searched for each occurrence of the separator, and the separator is then
|
||||
* replaced by a NULL character. Pointers to the individual components are
|
||||
* returned as a NULL-terminated array of pointers.
|
||||
*
|
||||
* The passed-in string should be malloc'ed space, since the string will
|
||||
* eventually be freed when the application frees the returned array. If
|
||||
* you don't want the original string modified, then a copy should be made,
|
||||
* before calling this function.
|
||||
*
|
||||
* The application is responsible for freeing up this memory, and should do
|
||||
* so by calling _DtFreeStringVector().
|
||||
*
|
||||
* Parameters:
|
||||
*
|
||||
* string A NULL-terminated string, which is to be vectorized.
|
||||
*
|
||||
* separator The character which separates the components within
|
||||
* the string.
|
||||
*
|
||||
*****************************************************************************/
|
||||
extern char ** _DtVectorizeInPlace( char * string,
|
||||
char separator );
|
||||
|
||||
/******************************************************************************
|
||||
*
|
||||
* _DtFreeStringVector will free up the vectorized string array returned by
|
||||
* a call to _DtVectorizeInPlace(). Both the array used to return the
|
||||
* vectorized strings, and the original string itself will be freed up.
|
||||
*
|
||||
* Parameters:
|
||||
*
|
||||
* stringVector The array to be freed; originally obtained by a call
|
||||
* to _DtVectorizeInPlace().
|
||||
*
|
||||
*****************************************************************************/
|
||||
extern void _DtFreeStringVector( char ** stringVector );
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
* DtCmd String Utility routines.
|
||||
*
|
||||
*****************************************************************************
|
||||
*
|
||||
* _DtCmdStringToArrayOfStrings - takes a string and an array of pointers
|
||||
* to strings and breaks the string into whitespace separated words.
|
||||
*
|
||||
* A "word" is a sequence of characters that has no whitespace with
|
||||
* the following exception:
|
||||
*
|
||||
* - A word may contain contain whitespace if it is delimited
|
||||
* by a pair of matching single or double qotes.
|
||||
*
|
||||
* "Whitespace" is a tab or blank character.
|
||||
*
|
||||
*
|
||||
* NOTES:
|
||||
*
|
||||
* - The space for the "words" is malloc'd and must be free'd by
|
||||
* the caller.
|
||||
* - _DtCmdFreeStringVector() should be used to free up string vectors
|
||||
* created by _DtCmdStringToArrayOfStrings().
|
||||
*
|
||||
* - "theArray" is NULL terminated.
|
||||
*
|
||||
* PARAMETERS:
|
||||
*
|
||||
* char theString[]; - The string to parse.
|
||||
*
|
||||
* char *theArray[]; - MODIFIED: gets filled with pointers to
|
||||
* the words that are parsed.
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
|
||||
/******************************************************************************
|
||||
*
|
||||
* _DtCmdFreeStringVector - takes an array of pointers to strings and
|
||||
* frees the malloc'd space for the strings.
|
||||
*
|
||||
* This does NOT free the string vector itself; It assumes that
|
||||
* stringv is a static i.e. char *stringv[N].
|
||||
*
|
||||
* PARAMETERS:
|
||||
*
|
||||
* char **stringv; - MODIFIED: Each string in the array is freed.
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
extern void _DtCmdStringToArrayOfStrings(
|
||||
char theString[],
|
||||
char *theArray[]) ;
|
||||
extern void _DtCmdFreeStringVector(
|
||||
char **stringv) ;
|
||||
|
||||
#endif /* _Dt_Utility_h */
|
||||
|
||||
/* DON'T ADD ANYTHING AFTER THIS #endif */
|
||||
@@ -1,42 +0,0 @@
|
||||
/*
|
||||
* CDE - Common Desktop Environment
|
||||
*
|
||||
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
|
||||
*
|
||||
* These libraries and programs are free software; you can
|
||||
* redistribute them and/or modify them under the terms of the GNU
|
||||
* Lesser General Public License as published by the Free Software
|
||||
* Foundation; either version 2 of the License, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* These libraries and programs are distributed in the hope that
|
||||
* they will be useful, but WITHOUT ANY WARRANTY; without even the
|
||||
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU Lesser General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with these libraries and programs; if not, write
|
||||
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
|
||||
* Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/*
|
||||
* File: UtilityP.h $XConsortium: UtilityP.h /main/4 1995/10/26 15:32:08 rswiston $
|
||||
* Language: C
|
||||
*
|
||||
* (c) Copyright 1988, Hewlett-Packard Company, all rights reserved.
|
||||
*
|
||||
* (c) Copyright 1993, 1994 Hewlett-Packard Company *
|
||||
* (c) Copyright 1993, 1994 International Business Machines Corp. *
|
||||
* (c) Copyright 1993, 1994 Sun Microsystems, Inc. *
|
||||
* (c) Copyright 1993, 1994 Novell, Inc. *
|
||||
*/
|
||||
|
||||
#ifndef _Dt_UtilityP_h
|
||||
#define _Dt_UtilityP_h
|
||||
|
||||
extern char * _DtGetDisplayName( Display * display );
|
||||
|
||||
#endif /* _Dt_UtilityP_h */
|
||||
|
||||
/* DON'T ADD ANYTHING AFTER THIS #endif */
|
||||
@@ -1,196 +0,0 @@
|
||||
/*
|
||||
* CDE - Common Desktop Environment
|
||||
*
|
||||
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
|
||||
*
|
||||
* These libraries and programs are free software; you can
|
||||
* redistribute them and/or modify them under the terms of the GNU
|
||||
* Lesser General Public License as published by the Free Software
|
||||
* Foundation; either version 2 of the License, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* These libraries and programs are distributed in the hope that
|
||||
* they will be useful, but WITHOUT ANY WARRANTY; without even the
|
||||
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU Lesser General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with these libraries and programs; if not, write
|
||||
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
|
||||
* Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/* $XConsortium: XlationSvc.h /main/6 1996/08/22 09:07:18 rswiston $ */
|
||||
/************************************<+>*************************************
|
||||
****************************************************************************
|
||||
**
|
||||
** File: XlationSvc.h
|
||||
**
|
||||
** Project: DtXlate
|
||||
**
|
||||
** Description: table-based translation services
|
||||
**
|
||||
** (c) Copyright 1993, 1994 Hewlett-Packard Company
|
||||
** (c) Copyright 1993, 1994 International Business Machines Corp.
|
||||
** (c) Copyright 1993, 1994 Sun Microsystems, Inc.
|
||||
** (c) Copyright 1993, 1994 Unix System Labs, Inc., a subsidiary of Novell, Inc.
|
||||
**
|
||||
****************************************************************************
|
||||
************************************<+>*************************************/
|
||||
|
||||
|
||||
#ifndef _DtXLATE_XLATION_SVC_I
|
||||
#define _DtXLATE_XLATION_SVC_I
|
||||
|
||||
#include <sys/utsname.h> /* for UTSLEN, SYS_NMLN */
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*=================================================================
|
||||
$SHAREDBEG$: This header appears in all appropriate DtXlate topics
|
||||
$INCLUDE$
|
||||
#include <XlationSvc.h>
|
||||
=$END$==========================================================*/
|
||||
|
||||
|
||||
#if DOC
|
||||
/*========================================================*/
|
||||
$TYPEBEG$: _DtXlateDb
|
||||
$1LINER$: An opaque object used to represent translation dbs
|
||||
$SUMMARY$:
|
||||
_DtXlateDb is the type of a translation database object.
|
||||
The database object must be opened before use and closed
|
||||
after use. The definition of the object is opaque to users.
|
||||
$ARGS$:
|
||||
/*================================================$SKIP$==*/
|
||||
#endif
|
||||
/*$DEF$*/
|
||||
typedef struct __DtXlateDbRec * _DtXlateDb;
|
||||
/*$END$*/
|
||||
|
||||
|
||||
#if DOC
|
||||
/*========================================================*/
|
||||
$CONSTBEG$: _DtXLATE_OPER_xxx
|
||||
$1LINER$: Constants for specifying operations
|
||||
$SUMMARY$:
|
||||
The _DtXLATE_OPER_xxx are constants that produce strings
|
||||
used in the translation specifications when specifying
|
||||
the operation of a translation.
|
||||
|
||||
The operation string name must be identical both in the
|
||||
source code and in the translation table.
|
||||
These constants should be used whenever referencing
|
||||
operations as part of a translation.
|
||||
/*================================================$SKIP$==*/
|
||||
#endif
|
||||
/* $DEF$, Operation constants */
|
||||
#define _DtXLATE_OPER_VERSION "version"
|
||||
/*$END$*/
|
||||
|
||||
#if DOC
|
||||
/*========================================================*/
|
||||
$CONSTBEG$: _DtPLATFORM_xxx
|
||||
$1LINER$: Constants for specifying platforms strings
|
||||
$SUMMARY$:
|
||||
The _DtPLATFORM_xxx are constants that produce strings
|
||||
used in the translation specifications and when performing
|
||||
a translation using the API. Recall that the platform name must
|
||||
be an exact match if specified as translation criteria.
|
||||
These names are the same strings returned by 'uname(1) -s'
|
||||
and uname(2):utsname.sysname.
|
||||
|
||||
The operation string name must be identical both in the
|
||||
source code and in the translation table.
|
||||
These constants should be used whenever referencing
|
||||
platforms as part of a translation.
|
||||
/*================================================$SKIP$==*/
|
||||
#endif
|
||||
/* $DEF$, Platform constants */
|
||||
#if defined(SVR4) || defined(_AIX)
|
||||
#define _DtPLATFORM_MAX_LEN SYS_NMLN
|
||||
#else
|
||||
#if defined(SYS_NMLN)
|
||||
#define _DtPLATFORM_MAX_LEN SYS_NMLN
|
||||
#else
|
||||
#define _DtPLATFORM_MAX_LEN UTSLEN
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#define _DtPLATFORM_UNKNOWN ((const char *)0)
|
||||
#define _DtPLATFORM_CURRENT ((const char *)0)
|
||||
#define _DtPLATFORM_CDE "CDE"
|
||||
#define _DtPLATFORM_HPUX "HP-UX"
|
||||
#define _DtPLATFORM_AIX "AIX"
|
||||
#define _DtPLATFORM_SUNOS "SunOS"
|
||||
#define _DtPLATFORM_SOLARIS "Solaris" /* verify */
|
||||
#define _DtPLATFORM_XENIX "Xenix" /* verify */
|
||||
/*$END$*/
|
||||
|
||||
|
||||
/* Functions */
|
||||
int _DtXlateOpenDb(
|
||||
const char * databaseName,
|
||||
_DtXlateDb * ret_db);
|
||||
|
||||
int _DtXlateOpenAndMergeDbs(
|
||||
const char * databaseName,
|
||||
_DtXlateDb * io_db);
|
||||
|
||||
int _DtXlateMergeDbs(
|
||||
_DtXlateDb * io_dbToMerge,
|
||||
_DtXlateDb * io_mergeIntoDb);
|
||||
|
||||
int _DtXlateOpenAllDbs(
|
||||
const char * searchPaths,
|
||||
const char * databaseName,
|
||||
_DtXlateDb * ret_db);
|
||||
|
||||
int _DtXlateCloseDb(
|
||||
_DtXlateDb * io_db);
|
||||
|
||||
int _DtXlateStdToOpValue(
|
||||
_DtXlateDb db,
|
||||
const char * platform,
|
||||
const int version,
|
||||
const char * operation,
|
||||
const char * stdValue,
|
||||
char * * ret_opValue,
|
||||
void * ret_reserved);
|
||||
|
||||
int _DtXlateOpToStdValue(
|
||||
_DtXlateDb db,
|
||||
const char * platform,
|
||||
const int version,
|
||||
const char * operation,
|
||||
const char * opValue,
|
||||
char * * ret_stdValue,
|
||||
void * ret_reserved);
|
||||
|
||||
int _DtXlateGetXlateEnv(
|
||||
_DtXlateDb db,
|
||||
char * ret_AppExecEnvPlatform,
|
||||
int * ret_AppExecEnvVersion,
|
||||
int * ret_XlateCompiledForOSVersion);
|
||||
|
||||
/* Non DtXlate functions currently in XlationSvc.c */
|
||||
int _DtMBStrrchr (
|
||||
const char * s1,
|
||||
int value,
|
||||
int max_len,
|
||||
const char * * ret_ptr );
|
||||
|
||||
int _DtMBStrchr (
|
||||
const char * s1,
|
||||
int value,
|
||||
int max_len,
|
||||
const char * * ret_ptr );
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /*_DtXLATE_XLATION_SVC_I*/
|
||||
/********* do not put anything below this line ********/
|
||||
@@ -1,90 +0,0 @@
|
||||
/*
|
||||
* CDE - Common Desktop Environment
|
||||
*
|
||||
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
|
||||
*
|
||||
* These libraries and programs are free software; you can
|
||||
* redistribute them and/or modify them under the terms of the GNU
|
||||
* Lesser General Public License as published by the Free Software
|
||||
* Foundation; either version 2 of the License, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* These libraries and programs are distributed in the hope that
|
||||
* they will be useful, but WITHOUT ANY WARRANTY; without even the
|
||||
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU Lesser General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with these libraries and programs; if not, write
|
||||
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
|
||||
* Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/* $XConsortium: xpm.h /main/4 1996/02/19 16:42:00 lehors $ */
|
||||
/*
|
||||
* (c) Copyright 1996 Digital Equipment Corporation.
|
||||
* (c) Copyright 1996 Hewlett-Packard Company.
|
||||
* (c) Copyright 1996 International Business Machines Corp.
|
||||
* (c) Copyright 1996 Sun Microsystems, Inc.
|
||||
* (c) Copyright 1996 Novell, Inc.
|
||||
* (c) Copyright 1996 FUJITSU LIMITED.
|
||||
* (c) Copyright 1996 Hitachi.
|
||||
*/
|
||||
|
||||
/*****************************************************************************\
|
||||
* *
|
||||
* This is only a wrapper around the Xpm functions which now come as part of *
|
||||
* Motif. This is provided for backward compatibility only and therefore only *
|
||||
* supports symbols declared as private in the elist and none of the internal *
|
||||
* ones. *
|
||||
* *
|
||||
\*****************************************************************************/
|
||||
|
||||
#ifndef xpm_h
|
||||
#define xpm_h
|
||||
|
||||
#include <Xm/XpmP.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
extern int _DtXpmCreatePixmapFromData(Display *display,
|
||||
Drawable d,
|
||||
char **data,
|
||||
Pixmap *pixmap_return,
|
||||
Pixmap *shapemask_return,
|
||||
XpmAttributes *attributes);
|
||||
|
||||
extern int _DtXpmReadFileToPixmap(Display *display,
|
||||
Drawable d,
|
||||
char *filename,
|
||||
Pixmap *pixmap_return,
|
||||
Pixmap *shapemask_return,
|
||||
XpmAttributes *attributes);
|
||||
|
||||
extern int _DtXpmWriteFileFromPixmap(Display *display,
|
||||
char *filename,
|
||||
Pixmap pixmap,
|
||||
Pixmap shapemask,
|
||||
XpmAttributes *attributes);
|
||||
|
||||
extern int _DtXpmReadFileToImage(Display *display,
|
||||
char *filename,
|
||||
XImage **image_return,
|
||||
XImage **shapeimage_return,
|
||||
XpmAttributes *attributes);
|
||||
|
||||
extern int _DtXpmWriteFileFromImage(Display *display,
|
||||
char *filename,
|
||||
XImage *image,
|
||||
XImage *shapeimage,
|
||||
XpmAttributes *attributes);
|
||||
|
||||
extern void _DtXpmFreeAttributes(XpmAttributes *attributes);
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* for C++ V2.0 */
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -2,7 +2,7 @@ XCOMM $TOG: Imakefile /main/3 1998/08/10 18:02:40 mgreess $
|
||||
#define IHaveSubdirs
|
||||
#define PassCDebugFlags 'CDEBUGFLAGS=$(CDEBUGFLAGS)' 'CXXDEBUGFLAGS=$(CXXDEBUGFLAGS)'
|
||||
|
||||
SUBDIRS = bms codelibs SPC
|
||||
SUBDIRS = codelibs
|
||||
|
||||
MakeSubdirs($(SUBDIRS))
|
||||
DependSubdirs($(SUBDIRS))
|
||||
|
||||
@@ -1,12 +0,0 @@
|
||||
XCOMM $XConsortium: Imakefile /main/4 1996/04/21 19:09:55 drk $
|
||||
|
||||
HEADERS = chars.h spc-obj.h spc-proto.h spcE.h spcP.h
|
||||
|
||||
all::
|
||||
|
||||
BuildIncludes($(HEADERS),SPC,..)
|
||||
InstallMultipleFlags($(HEADERS),$(INCDIR)/SPC,$(INSTINCFLAGS))
|
||||
|
||||
depend::
|
||||
|
||||
clean::
|
||||
@@ -1,48 +0,0 @@
|
||||
/*
|
||||
* CDE - Common Desktop Environment
|
||||
*
|
||||
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
|
||||
*
|
||||
* These libraries and programs are free software; you can
|
||||
* redistribute them and/or modify them under the terms of the GNU
|
||||
* Lesser General Public License as published by the Free Software
|
||||
* Foundation; either version 2 of the License, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* These libraries and programs are distributed in the hope that
|
||||
* they will be useful, but WITHOUT ANY WARRANTY; without even the
|
||||
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU Lesser General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with these libraries and programs; if not, write
|
||||
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
|
||||
* Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/*
|
||||
* File: char.h $XConsortium: chars.h /main/3 1995/10/26 15:43:03 rswiston $
|
||||
* Language: C
|
||||
*
|
||||
* (c) Copyright 1988, Hewlett-Packard Company, all rights reserved.
|
||||
*
|
||||
* (c) Copyright 1993, 1994 Hewlett-Packard Company *
|
||||
* (c) Copyright 1993, 1994 International Business Machines Corp. *
|
||||
* (c) Copyright 1993, 1994 Sun Microsystems, Inc. *
|
||||
* (c) Copyright 1993, 1994 Novell, Inc. *
|
||||
*/
|
||||
|
||||
#ifndef _chars_h
|
||||
#define _chars_h
|
||||
|
||||
#define Space (XeChar) ' '
|
||||
#define Newline (XeChar) '\n'
|
||||
#define Tab (XeChar) '\t'
|
||||
#define Pound (XeChar) '#'
|
||||
#define Pad (XeChar) '\0'
|
||||
#define Colon (XeChar) ':'
|
||||
#define Equal (XeChar) '='
|
||||
|
||||
#define Nil_String (XeString) ""
|
||||
|
||||
#endif /* _chars_h */
|
||||
@@ -1,118 +0,0 @@
|
||||
/*
|
||||
* CDE - Common Desktop Environment
|
||||
*
|
||||
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
|
||||
*
|
||||
* These libraries and programs are free software; you can
|
||||
* redistribute them and/or modify them under the terms of the GNU
|
||||
* Lesser General Public License as published by the Free Software
|
||||
* Foundation; either version 2 of the License, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* These libraries and programs are distributed in the hope that
|
||||
* they will be useful, but WITHOUT ANY WARRANTY; without even the
|
||||
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU Lesser General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with these libraries and programs; if not, write
|
||||
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
|
||||
* Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/*
|
||||
* File: spc-obj.h $XConsortium: spc-obj.h /main/3 1995/10/26 15:43:20 rswiston $
|
||||
* Language: C
|
||||
*
|
||||
* (c) Copyright 1989, Hewlett-Packard Company, all rights reserved.
|
||||
*
|
||||
* (c) Copyright 1993, 1994 Hewlett-Packard Company *
|
||||
* (c) Copyright 1993, 1994 International Business Machines Corp. *
|
||||
* (c) Copyright 1993, 1994 Sun Microsystems, Inc. *
|
||||
* (c) Copyright 1993, 1994 Novell, Inc. *
|
||||
*/
|
||||
|
||||
#ifndef _spc_obj_h
|
||||
#define _spc_obj_h
|
||||
|
||||
typedef SPC_Channel_Ptr (*SPC_F_open)(SPC_Channel_Ptr, int, XeString);
|
||||
typedef int (*SPC_F_close)(SPC_Channel_Ptr);
|
||||
typedef int (*SPC_F_read)(SPC_Channel_Ptr, int, XeString, int);
|
||||
typedef int (*SPC_F_write)(SPC_Channel_Ptr, XeString, int);
|
||||
typedef int (*SPC_F_reset)(SPC_Channel_Ptr);
|
||||
typedef int (*SPC_F_exec_proc)(SPC_Channel_Ptr);
|
||||
typedef int (*SPC_F_signal)(SPC_Channel_Ptr, int);
|
||||
typedef int (*SPC_F_attach)(SPC_Channel_Ptr, int);
|
||||
typedef int (*SPC_F_add_input)(SPC_Channel_Ptr, SbInputHandlerProc, void *);
|
||||
typedef int (*SPC_F_wait_for_termination)(SPC_Channel_Ptr);
|
||||
typedef int (*SPC_F_pre_fork)(SPC_Channel_Ptr);
|
||||
typedef int (*SPC_F_post_fork)(SPC_Channel_Ptr, int);
|
||||
typedef int (*SPC_F_remove_logfile)(SPC_Channel_Ptr);
|
||||
|
||||
/*
|
||||
**
|
||||
** New methods for B.00
|
||||
**
|
||||
*/
|
||||
|
||||
typedef int (*SPC_F_send_eof)(SPC_Channel_Ptr);
|
||||
typedef int (*SPC_F_set_termio)(SPC_Channel_Ptr, int, int, struct termios *);
|
||||
|
||||
#define channel_class_part \
|
||||
root_class_part \
|
||||
SPC_F_open open; /* opening a channel */ \
|
||||
SPC_F_close close; /* close a channel */ \
|
||||
SPC_F_read read; /* read from a channel */ \
|
||||
SPC_F_write write; /* write to a channel */ \
|
||||
SPC_F_reset reset; /* reset io to channel */ \
|
||||
SPC_F_exec_proc exec_proc; /* execute a subprocess over a channel */ \
|
||||
SPC_F_signal signal; /* signal a subprocess over a channel */ \
|
||||
SPC_F_attach attach; /* attach a subprocess to this channel */ \
|
||||
SPC_F_add_input add_input; /* how to add input callbacks to channel */ \
|
||||
SbInputCallbackProc input; \
|
||||
SPC_F_wait_for_termination wait_for_termination; /* wait for subprocess to exit */ \
|
||||
SPC_F_pre_fork pre_fork; /* setup before a fork */ \
|
||||
SPC_F_post_fork post_fork; /* setup after a fork */ \
|
||||
SPC_F_remove_logfile remove_logfile; /* remove log file associated with channel */ \
|
||||
SPC_F_send_eof send_eof; /* close stdin of subprocess */ \
|
||||
SPC_F_set_termio set_termio; /* set termio struct for PTY channels */
|
||||
|
||||
typedef struct channel_class {
|
||||
root_clasp base;
|
||||
channel_class_part
|
||||
} *channel_clasp;
|
||||
|
||||
typedef struct pty_channel_class {
|
||||
channel_clasp base;
|
||||
channel_class_part
|
||||
} *pty_channel_clasp;
|
||||
|
||||
typedef struct pipe_channel_class {
|
||||
channel_clasp base;
|
||||
channel_class_part
|
||||
} *pipe_channel_clasp;
|
||||
|
||||
typedef struct noio_channel_class {
|
||||
channel_clasp base;
|
||||
channel_class_part
|
||||
} *noio_channel_clasp;
|
||||
|
||||
typedef struct remote_channel_class {
|
||||
channel_clasp base;
|
||||
channel_class_part
|
||||
} *remote_channel_clasp;
|
||||
|
||||
#define call_parent_method(channel, func, args, result) { \
|
||||
pipe_channel_clasp parent_class=(pipe_channel_clasp) (channel)->class_ptr; \
|
||||
result=base_memf(parent_class, func, args); }
|
||||
|
||||
/* class definitions */
|
||||
|
||||
extern channel_clasp channel_class;
|
||||
extern pty_channel_clasp pty_channel_class;
|
||||
extern pipe_channel_clasp pipe_channel_class;
|
||||
extern noio_channel_clasp noio_channel_class;
|
||||
extern remote_channel_clasp remote_channel_class;
|
||||
|
||||
#endif /* _spc_obj_h */
|
||||
|
||||
@@ -1,297 +0,0 @@
|
||||
/*
|
||||
* CDE - Common Desktop Environment
|
||||
*
|
||||
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
|
||||
*
|
||||
* These libraries and programs are free software; you can
|
||||
* redistribute them and/or modify them under the terms of the GNU
|
||||
* Lesser General Public License as published by the Free Software
|
||||
* Foundation; either version 2 of the License, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* These libraries and programs are distributed in the hope that
|
||||
* they will be useful, but WITHOUT ANY WARRANTY; without even the
|
||||
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU Lesser General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with these libraries and programs; if not, write
|
||||
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
|
||||
* Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/*
|
||||
* File: spc-proto.h $XConsortium: spc-proto.h /main/3 1995/10/26 15:43:39 rswiston $
|
||||
* Language: C
|
||||
*
|
||||
* (c) Copyright 1988, Hewlett-Packard Company, all rights reserved.
|
||||
*
|
||||
* (c) Copyright 1993, 1994 Hewlett-Packard Company *
|
||||
* (c) Copyright 1993, 1994 International Business Machines Corp. *
|
||||
* (c) Copyright 1993, 1994 Sun Microsystems, Inc. *
|
||||
* (c) Copyright 1993, 1994 Novell, Inc. *
|
||||
*/
|
||||
|
||||
#ifndef _spc_proto_h
|
||||
#define _spc_proto_h
|
||||
|
||||
/*
|
||||
* Commands which are known to spcd and clients
|
||||
*/
|
||||
|
||||
/* The internet service */
|
||||
|
||||
#define SPC_SERVICE (XeString)"dtspc" /* The name of the registered service */
|
||||
#define SPC_PROTOCOL (XeString)"tcp" /* The name of the registered protocol */
|
||||
|
||||
/* MUST be a DECIMAL number as "%d" */
|
||||
#define SPC_PROTOCOL_VERSION_CDE_BASE 1000
|
||||
#define SPC_PROTOCOL_VERSION SPC_PROTOCOL_VERSION_CDE_BASE
|
||||
/* is used to read the string version */
|
||||
#define SPC_PROTOCOL_VERSION_CDE_BASE_STR "1000"
|
||||
#define SPC_PROTOCOL_VERSION_STR SPC_PROTOCOL_VERSION_CDE_BASE_STR
|
||||
|
||||
/* We could make this user config for old domain systems? */
|
||||
#define SPC_UNKNOWN_HOSTINFO_STR "HP-UX:7.0:*"
|
||||
/*
|
||||
**
|
||||
** Pseudo-filenames used for validating user
|
||||
**
|
||||
*/
|
||||
|
||||
#define PASSED_FILE_NAME (XeString)"<!passed>!"
|
||||
#define FAILED_FILE_NAME (XeString)"<!failed>!"
|
||||
|
||||
/*
|
||||
*** Protocol command numbers. These MUST remain in the same order
|
||||
*** to work with previous version of the spcd
|
||||
*/
|
||||
|
||||
/* Connections to the server */
|
||||
|
||||
#define APPLICATION_DATA 0 /* send data to subprocess */
|
||||
#define APPLICATION_STDOUT 1 /* data from subprocess */
|
||||
#define APPLICATION_STDERR 2 /* error messages from subprocess */
|
||||
|
||||
#define ABORT 3 /* Client aborted */
|
||||
#define REGISTER 4 /* Register client */
|
||||
#define UNREGISTER 5 /* Unregister client */
|
||||
|
||||
/* Channel requests */
|
||||
|
||||
#define CHANNEL_OPEN 6 /* enable this channel for read/write */
|
||||
#define CHANNEL_CLOSE 7 /* no more i/o to this channel (send EOF) */
|
||||
#define CHANNEL_RESET 8 /* reset this channel */
|
||||
#define CHANNEL_ATTACH 9 /* attach PTY device to this channel */
|
||||
|
||||
/* Application messages, client -> server */
|
||||
|
||||
#define APPLICATION_SPAWN 10 /* start up subprocess */
|
||||
#define APPLICATION_SIGNAL 11 /* send signal to subprocess */
|
||||
|
||||
/* application messages, server -> client */
|
||||
|
||||
#define APPLICATION_DIED 12 /* sent when subprocess dies */
|
||||
|
||||
#define SERVER_ERROR 13 /* server has detected an error */
|
||||
#define REPLY 14
|
||||
#define SERVER_DEBUG 15
|
||||
#define ENVIRON_RESET 16
|
||||
|
||||
/* Query / reply protocols, client -> server -> client */
|
||||
|
||||
#define QUERY_DEVICES 17
|
||||
#define DEVICE_REPLY 18
|
||||
|
||||
#define QUERY_LOGFILE 19
|
||||
#define LOGFILE_REPLY 20
|
||||
|
||||
/* Application messages, client -> server */
|
||||
|
||||
#define DELETE_LOGFILE 21
|
||||
|
||||
#define RESET_TERMIO 22 /* This is obsolete, (hpux binary version) */
|
||||
#define RESET_TERMIOS 23
|
||||
|
||||
/* New B.00 protocol requests */
|
||||
|
||||
#define CHANNEL_SEND_EOF 24 /* Send EOF to standard input of sub process */
|
||||
#define CHANNEL_TERMIOS 25 /* Send termios info for a particular pty */
|
||||
#define APP_B00_SPAWN 26 /* Enhanced spawn */
|
||||
|
||||
#define NREQS 27 /* total number of requests. If
|
||||
any are added, this should constant
|
||||
should reflect the new total */
|
||||
|
||||
#define PROT_TO_CONNECTOR(a) a
|
||||
#define CONNECTOR_TO_PROT(a) a
|
||||
|
||||
#define PDRP(_pdata) _pdata->data+REQUEST_HEADER_LENGTH
|
||||
|
||||
#define WRITE_INT(pdata, val)\
|
||||
sprintf_len(PDRP(pdata), (XeString)"%x", val)
|
||||
#define READ_INT(pdata, val) sscanf(PDRP(pdata), (XeString)"%x", &val)
|
||||
|
||||
#define WRITE_STRING(pdata, name)\
|
||||
sprintf_len(PDRP(pdata), (XeString)"%s", name)
|
||||
#define READ_STRING(pdata, name) sscanf(PDRP(pdata), (XeString)"%s", name)
|
||||
#define READ_STRING_NO_COPY(pdata, name) (name = PDRP(pdata))
|
||||
|
||||
#define WRITE_ABORT WRITE_INT
|
||||
#define READ_ABORT READ_INT
|
||||
|
||||
#define WRITE_OPEN WRITE_INT
|
||||
#define READ_OPEN READ_INT
|
||||
|
||||
#define WRITE_ATTACH WRITE_INT
|
||||
#define READ_ATTACH READ_INT
|
||||
|
||||
#define WRITE_APPLICATION_DIED WRITE_INT
|
||||
#define READ_APPLICATION_DIED READ_INT
|
||||
|
||||
#define WRITE_DEBUG WRITE_STRING
|
||||
#define READ_DEBUG READ_STRING
|
||||
|
||||
#define WRITE_ERROR WRITE_INT
|
||||
#define READ_ERROR READ_INT
|
||||
|
||||
#define WRITE_REGISTER(pdata, name, passwd, proto_ver, hostinfo)\
|
||||
sprint_register_data(PDRP(pdata), name, passwd, proto_ver, hostinfo)
|
||||
|
||||
#define READ_REGISTER(pdata, name, passwd, proto_rev, hostinfo)\
|
||||
sscan_register_data(PDRP(pdata), &name, &passwd, &proto_rev, &hostinfo)
|
||||
|
||||
#define WRITE_REPLY(pdata, val, err)\
|
||||
sprintf_len(PDRP(pdata), (XeString)"%x %x", val, err)
|
||||
#define READ_REPLY(pdata, val, err)\
|
||||
sscanf(PDRP(pdata), (XeString)"%x %x", &val, &err)
|
||||
|
||||
#define WRITE_DEVICE_REPLY(pdata, m0, s0, m1, s1, m2, s2) \
|
||||
sprint_device_data(PDRP(pdata), m0, s0, m1, s1, m2, s2)
|
||||
#define READ_DEVICE_REPLY(pdata, m0, s0, m1, s1, m2, s2) \
|
||||
sscan_device_data(PDRP(pdata), m0, s0, m1, s1, m2, s2)
|
||||
|
||||
#define WRITE_LOGFILE_REPLY(pdata, logfile, proto_ver, hostinfo) \
|
||||
sprint_logfile_data(PDRP(pdata), logfile, proto_ver, hostinfo)
|
||||
#define READ_LOGFILE_REPLY(pdata, logfile, proto_ver, hostinfo) \
|
||||
sscan_logfile_data(PDRP(pdata), logfile, proto_ver, hostinfo)
|
||||
|
||||
#define WRITE_APPLICATION_SPAWN(pdata, path, dir, argv, envp) \
|
||||
sprint_application_data(PDRP(pdata), (XeString)"%s %d %d ", \
|
||||
path, dir, argv, envp, REQUEST_HEADER_LENGTH)
|
||||
#define READ_APPLICATION_SPAWN(pdata, path, dir, argv, envp) \
|
||||
sscan_application_data(PDRP(pdata), (XeString)"%s %d %d ", \
|
||||
&path, &dir, &argv, &envp, REQUEST_HEADER_LENGTH)
|
||||
|
||||
#define WRITE_ENVIRON_RESET(pdata, numenv) \
|
||||
sprintf_len(PDRP(pdata), (XeString)"%d ", numenv)
|
||||
#define READ_ENVIRON_RESET(pdata, numenv) \
|
||||
sscanf(PDRP(pdata), (XeString)"%d ", &numenv)
|
||||
|
||||
#define WRITE_APP_DATA(pdata, buffer, len) \
|
||||
(memcpy(PDRP(pdata), buffer, len), len)
|
||||
|
||||
/* New B.00 protocol requests */
|
||||
#define WRITE_TERMIOS(pdata, connector, side, buffer) \
|
||||
sprintf_len(PDRP(pdata), (XeString)"%d %d %s", connector, side, buffer)
|
||||
#define READ_TERMIOS(pdata, connector, side, buffer) \
|
||||
sscanf(PDRP(pdata), (XeString)"%d %d %s", &connector, &side, buffer)
|
||||
|
||||
/* Writing a header is special, as we don't want to be offset by
|
||||
REQUEST_HEADER_LENGTH */
|
||||
|
||||
#define WRITE_HEADER(pdata, cid, type, len, seq) \
|
||||
sprintf_len(pdata->data, (XeString)"%08x%02x%04x%04x", cid, type, len, seq)
|
||||
#define READ_HEADER(pdata, cid, type, len, seq) \
|
||||
sscanf(pdata->data, (XeString)"%8x%2x%4x%4x", cid, type, len, seq)
|
||||
|
||||
#define min(a, b) (((a) < (b)) ? (a) : (b))
|
||||
|
||||
/*
|
||||
**
|
||||
** The test here is reversed, that is, we check only for those
|
||||
** requests where there is no reply expected, and assume the other
|
||||
** ones do expect replies.
|
||||
**
|
||||
*/
|
||||
|
||||
#define NO_REPLY_VAL (-1)
|
||||
|
||||
#define REPLY_EXPECTED(a, retval) \
|
||||
(((a==REPLY) || \
|
||||
(a==APPLICATION_DATA) || \
|
||||
(a==APPLICATION_STDOUT) || \
|
||||
(a==APPLICATION_STDERR) || \
|
||||
(a==REGISTER) || \
|
||||
(a==QUERY_LOGFILE) || \
|
||||
(a==QUERY_DEVICES) || \
|
||||
(a==ABORT) || \
|
||||
(a==SERVER_ERROR) \
|
||||
) ? NO_REPLY_VAL : retval)
|
||||
|
||||
typedef struct _prot_request {
|
||||
buffered_data_ptr dataptr;
|
||||
int seqno;
|
||||
int request_type;
|
||||
SPC_Channel_Ptr channel;
|
||||
struct _prot_request *next;
|
||||
} protocol_request, *protocol_request_ptr;
|
||||
|
||||
typedef int (*protocol_request_handler)(protocol_request_ptr);
|
||||
|
||||
/* spc-proto.c */
|
||||
buffered_data_ptr SPC_New_Buffered_Data_Ptr (void);
|
||||
void SPC_Reset_Protocol_Ptr (protocol_request_ptr prot, SPC_Channel_Ptr channel, XeChar req, int len);
|
||||
protocol_request_ptr SPC_New_Protocol_Ptr (SPC_Channel_Ptr channel, XeChar req, int len);
|
||||
void SPC_Free_Protocol_Ptr (protocol_request_ptr prot);
|
||||
SPC_Channel_Ptr SPC_Lookup_Channel (int cid, SPC_Connection_Ptr connection);
|
||||
SPC_Connection_Ptr SPC_Alloc_Connection (void);
|
||||
SPC_Connection_Ptr SPC_Lookup_Connection (XeString hostname);
|
||||
SPC_Connection_Ptr SPC_Lookup_Connection_Fd (int fd);
|
||||
SPC_Connection_Ptr SPC_Make_Connection (XeString hostname);
|
||||
void SPC_Add_Connection (SPC_Connection_Ptr connection);
|
||||
void SPC_Close_Connection (SPC_Connection_Ptr connection);
|
||||
int SPC_Read_Chars (SPC_Connection_Ptr connection, int request_len, XeString charptr);
|
||||
int SPC_Write_Chars (int fd, XeString charptr, int request_len);
|
||||
protocol_request_ptr SPC_Read_Protocol (SPC_Connection_Ptr connection);
|
||||
protocol_request_ptr SPC_Filter_Connection (SPC_Connection_Ptr connection, SPC_Channel_Ptr channel, int reqtype, int deletep);
|
||||
void SPC_Flush_Queued_Data (SPC_Channel_Ptr channel);
|
||||
int SPC_Read_Remote_Data (SPC_Channel_Ptr channel, int connector, XeString client_buffer, int nbytes);
|
||||
int print_protocol_request (XeString name, protocol_request_ptr proto);
|
||||
int SPC_Write_Protocol_Request (SPC_Connection_Ptr connection, SPC_Channel_Ptr channel, int request, ...);
|
||||
int SPC_Write_Single_Prot_Request (SPC_Connection_Ptr connection, XeString name, protocol_request_ptr prot);
|
||||
int SPC_Waitfor_Reply (SPC_Connection_Ptr connection, SPC_Channel_Ptr channel, int seqno);
|
||||
int SPC_Dispatch_Protocol (protocol_request_ptr proto, protocol_request_handler *);
|
||||
int SPC_Write_Reply (SPC_Connection_Ptr conn, protocol_request_ptr proto, int retval, int errval);
|
||||
int SPC_Send_Environ (SPC_Connection_Ptr connection, protocol_request_ptr prot);
|
||||
int sprint_counted_string (XeString buf, int count, XeString *vect, int limit);
|
||||
XeString *sscan_counted_string (XeString buf, XeString *newbuf);
|
||||
int sprint_application_data (XeString buf, XeString fmt, XeString path, XeString dir, XeString *argv, XeString *envp, int chars_used);
|
||||
int sscan_application_data (XeString buf, XeString fmt, XeString *path, XeString *dir, XeString **argv, XeString **envp, int offset);
|
||||
int sprint_device_data (XeString buf, XeString m0, XeString s0, XeString m1, XeString s1, XeString m2, XeString s2);
|
||||
int sscan_device_data (XeString buf, XeString *m0, XeString *s0, XeString *m1, XeString *s1, XeString *m2, XeString *s2);
|
||||
int sprint_logfile_data (XeString buf, XeString logfile, XeString proto_ver, XeString hostinfo);
|
||||
int sscan_logfile_data (XeString buf, XeString *logfile, XeString *proto_ver, XeString *hostinfo);
|
||||
int sprint_register_data (XeString buf, XeString username, XeString passwd, XeString proto_ver, XeString hostinfo);
|
||||
int sscan_register_data (XeString buf, XeString *username, XeString *passwd, XeString *proto_ver, XeString *hostinfo);
|
||||
int SPC_Query_Devices (SPC_Channel_Ptr channel);
|
||||
int SPC_Query_Logfile (SPC_Channel_Ptr channel);
|
||||
int SPC_Validate_User (XeString hostname, SPC_Connection_Ptr connection);
|
||||
int SPC_Get_Termio (protocol_request_ptr prot_request);
|
||||
int SPC_Get_Termios (protocol_request_ptr prot_request);
|
||||
XeString SPC_LocalHostinfo(void);
|
||||
int SPC_Send_Multi_Packet(SPC_Connection_Ptr connection,
|
||||
protocol_request_ptr prot,
|
||||
char **str_vect,
|
||||
int num_str,
|
||||
int req,
|
||||
XeString name,
|
||||
int errid);
|
||||
char **SPC_Get_Multi_Packet(SPC_Connection_Ptr connection,
|
||||
protocol_request_ptr prot,
|
||||
char **out,
|
||||
int *outlen,
|
||||
int request,
|
||||
XeString name);
|
||||
|
||||
#endif /* _spc_proto_h */
|
||||
@@ -1,126 +0,0 @@
|
||||
/*
|
||||
* CDE - Common Desktop Environment
|
||||
*
|
||||
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
|
||||
*
|
||||
* These libraries and programs are free software; you can
|
||||
* redistribute them and/or modify them under the terms of the GNU
|
||||
* Lesser General Public License as published by the Free Software
|
||||
* Foundation; either version 2 of the License, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* These libraries and programs are distributed in the hope that
|
||||
* they will be useful, but WITHOUT ANY WARRANTY; without even the
|
||||
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU Lesser General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with these libraries and programs; if not, write
|
||||
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
|
||||
* Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/*
|
||||
* File: spcE.h $XConsortium: spcE.h /main/3 1995/10/26 15:43:58 rswiston $
|
||||
* Language: C
|
||||
*
|
||||
* (c) Copyright 1988, Hewlett-Packard Company, all rights reserved.
|
||||
*
|
||||
* (c) Copyright 1993, 1994 Hewlett-Packard Company *
|
||||
* (c) Copyright 1993, 1994 International Business Machines Corp. *
|
||||
* (c) Copyright 1993, 1994 Sun Microsystems, Inc. *
|
||||
* (c) Copyright 1993, 1994 Novell, Inc. *
|
||||
*/
|
||||
|
||||
#ifndef _spcE_h
|
||||
#define _spcE_h
|
||||
|
||||
/* Keep this up to date with the first error number declared below */
|
||||
#define SPC_First_Error_Number 100
|
||||
#define SPC_Min_Error SPC_First_Error_Number
|
||||
|
||||
#define SPC_Out_Of_Memory 100
|
||||
#define SPC_Bad_Argument 101
|
||||
#define SPC_Active_Channel 102
|
||||
#define SPC_Inactive_Channel 103
|
||||
#define SPC_Internal_Error 104
|
||||
#define SPC_Cannot_Fork 105
|
||||
#define SPC_Cannot_Exec 106
|
||||
#define SPC_Cannot_Execute 107
|
||||
#define SPC_No_Pipe 108
|
||||
#define SPC_No_Pty 109
|
||||
#define SPC_Bad_Connector 110
|
||||
#define SPC_Reading 111
|
||||
#define SPC_Writing 112
|
||||
#define SPC_Bad_Service 113
|
||||
#define SPC_Bad_Port 114
|
||||
#define SPC_Unknown_Host 115
|
||||
#define SPC_Bad_Socket 116
|
||||
#define SPC_Bad_Connect 117
|
||||
#define SPC_Bad_Bind 118
|
||||
#define SPC_Bad_Listen 119
|
||||
#define SPC_Bad_Accept 120
|
||||
#define SPC_Bad_Linger 121
|
||||
#define SPC_Bad_Reuse 122
|
||||
#define SPC_Bad_Sockname 123
|
||||
#define SPC_Bad_Open 124
|
||||
#define SPC_Connection_EOF 125
|
||||
#define SPC_Timeout 126
|
||||
#define SPC_Protocol 127
|
||||
#define SPC_Unexpected_Reply 128
|
||||
#define SPC_No_Channel 129
|
||||
#define SPC_Illegal_Iomode 130
|
||||
#define SPC_No_Signal_Handler 131
|
||||
#define SPC_Bad_Operation 132
|
||||
#define SPC_Bad_Fd 133
|
||||
#define SPC_Bad_Ioctl 134
|
||||
#define SPC_Bad_Select 135
|
||||
#define SPC_Bind_Timeout 136
|
||||
#define SPC_Arg_Too_Long 137
|
||||
#define SPC_Write_Prot 138
|
||||
#define SPC_Bad_Username 139
|
||||
#define SPC_Bad_Password 140
|
||||
#define SPC_Client_Not_Valid 141
|
||||
#define SPC_Cannot_Open_Slave 142
|
||||
/* #define SPC_Register_Error 143 */ /* This has been obsoleted by the
|
||||
expanded register errors below */
|
||||
#define SPC_Protocol_Abort 144
|
||||
#define SPC_Env_Too_Big 145
|
||||
#define SPC_Unlink_Logfile 146
|
||||
#define SPC_Closed_Channel 147
|
||||
#define SPC_Bad_Authentication 148
|
||||
#define SPC_Cannot_Open_Log 149
|
||||
#define SPC_Connection_Reset 150
|
||||
#define SPC_Register_Username 151
|
||||
#define SPC_Register_Netrc 152
|
||||
#define SPC_Register_Open 153
|
||||
#define SPC_Register_Handshake 154
|
||||
|
||||
#define SPC_Bad_Termios_Mode 155
|
||||
#define SPC_Bad_Termios_Speed 156
|
||||
#define SPC_Bad_Termios_CC 157
|
||||
#define SPC_Bad_Termios_Proto 158
|
||||
|
||||
#define SPC_Bad_Signal_Name 159
|
||||
#define SPC_Bad_Signal_Value 160
|
||||
#define SPC_Bad_Signal_Format 161
|
||||
|
||||
#define SPC_Bad_tc_Call 162
|
||||
|
||||
#define SPC_cannot_Chdir 163
|
||||
|
||||
#define SPC_Bad_Permission 164
|
||||
#define SPC_Cannot_Create_Netfilename 165
|
||||
#define SPC_Protocol_Version_Error 166
|
||||
|
||||
/* JET - a special error code for goobers trying to overflow our buffers. */
|
||||
/* VU#172583 */
|
||||
#define SPC_Buffer_Overflow 167
|
||||
|
||||
/* Keep this up to date with the last error number declared above */
|
||||
#define SPC_Max_Error 168
|
||||
|
||||
/* The definition of the SPC Error structure has been moved to spc.h
|
||||
(to make it public) */
|
||||
|
||||
#endif /* _spcE_h */
|
||||
@@ -1,564 +0,0 @@
|
||||
/*
|
||||
* CDE - Common Desktop Environment
|
||||
*
|
||||
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
|
||||
*
|
||||
* These libraries and programs are free software; you can
|
||||
* redistribute them and/or modify them under the terms of the GNU
|
||||
* Lesser General Public License as published by the Free Software
|
||||
* Foundation; either version 2 of the License, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* These libraries and programs are distributed in the hope that
|
||||
* they will be useful, but WITHOUT ANY WARRANTY; without even the
|
||||
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU Lesser General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with these libraries and programs; if not, write
|
||||
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
|
||||
* Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/*
|
||||
* $XConsortium: spcP.h /main/4 1996/05/15 12:01:55 drk $
|
||||
* Language: C
|
||||
*
|
||||
* (c) Copyright 1996 Digital Equipment Corporation.
|
||||
* (c) Copyright 1988,1993,1994,1996 Hewlett-Packard Company.
|
||||
* (c) Copyright 1993,1994,1996 International Business Machines Corp.
|
||||
* (c) Copyright 1993,1994,1996 Sun Microsystems, Inc.
|
||||
* (c) Copyright 1993,1994,1996 Novell, Inc.
|
||||
* (c) Copyright 1996 FUJITSU LIMITED.
|
||||
* (c) Copyright 1996 Hitachi.
|
||||
*/
|
||||
|
||||
#ifndef _spcP_h
|
||||
#define _spcP_h
|
||||
|
||||
#include <netdb.h> /* hostent */
|
||||
#include <termios.h>
|
||||
|
||||
#include <bms/bms.h>
|
||||
#include <bms/Symbolic.h>
|
||||
#include <bms/XeUserMsg.h>
|
||||
#include <bms/SbEvent.h>
|
||||
#include <bms/spc.h>
|
||||
#include <bms/scoop.h>
|
||||
#include <bms/connect.h>
|
||||
#include <bms/MemoryMgr.h>
|
||||
|
||||
#include "chars.h"
|
||||
#include "spcE.h"
|
||||
#include "spc-obj.h"
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
#ifndef CDE_CONFIGURATION_TOP
|
||||
#define CDE_CONFIGURATION_TOP "/etc/opt/dt"
|
||||
#endif
|
||||
#ifndef CDE_INSTALLATION_TOP
|
||||
#define CDE_INSTALLATION_TOP "/usr/dt"
|
||||
#endif
|
||||
|
||||
#define Stdin(chn) chn->file_descs[STDIN]
|
||||
#define Stdout(chn) chn->file_descs[STDOUT]
|
||||
#define Stderr(chn) chn->file_descs[STDERR]
|
||||
|
||||
/* Some necessary identifiers */
|
||||
#define OK 0
|
||||
#define ERROR -1
|
||||
#define Undefined -1
|
||||
|
||||
/* Some character constants */
|
||||
|
||||
#define Channel_ByteID (XeChar)'\077'
|
||||
|
||||
/* And finally, the common channel identifier */
|
||||
#ifndef BITSPERBYTE
|
||||
#define BITSPERBYTE 8
|
||||
#endif
|
||||
#define CID_High_Bits (Channel_ByteID << (BITSPERBYTE * (sizeof(int) - 1)))
|
||||
#define CID_Middle_Bits (0x1010 << BITSPERBYTE)
|
||||
#define CID_Low_Bits (Channel_ByteID & 0xff)
|
||||
|
||||
#define Channel_Identifier (CID_High_Bits | CID_Middle_Bits | CID_Low_Bits)
|
||||
|
||||
/*** Note: If device names ever increase from: /dev/ptym/ptyp0, look here ***/
|
||||
#define PTY_NAMLEN 20
|
||||
#define EXCEPT_FLAG -1 /* Used for TIOC handling in PTY's */
|
||||
|
||||
/* Define lengths of buffers for protocol requests and other sizes of things */
|
||||
|
||||
#define REQUEST_HEADER_LENGTH 20
|
||||
#define MAXREQLEN (SPC_BUFSIZ+REQUEST_HEADER_LENGTH)
|
||||
#define DEFAULT_ENVP_SIZE 50
|
||||
|
||||
/*
|
||||
**
|
||||
** Definitions for select.
|
||||
**
|
||||
*/
|
||||
|
||||
extern int max_fds;
|
||||
|
||||
/*
|
||||
* Macros to access SPC_IOMode bit fields
|
||||
*/
|
||||
|
||||
/* These are derived from above spc bit specifications */
|
||||
#define IS_SPCIO_STDIN(a) (a & SPCIO_WRITEONLY)
|
||||
#define IS_SPCIO_STDOUT(a) (a & SPCIO_READONLY)
|
||||
#define IS_SPCIO_STDERR(a) (a & SPCIO_ERRORONLY)
|
||||
#define IS_SPCIO_SEPARATE(a) (a & SPCIO_SEPARATEREADERROR)
|
||||
|
||||
#define IS_SPCIO_NOIO(a) ((a & SPCIO_SOURCE_MASK) == SPCIO_NOIO)
|
||||
#define IS_SPCIO_WRITEONLY(a) ((a & SPCIO_SOURCE_MASK) == SPCIO_WRITEONLY)
|
||||
#define IS_SPCIO_READONLY(a) ((a & SPCIO_SOURCE_MASK) == SPCIO_READONLY)
|
||||
#define IS_SPCIO_READWRITE(a) ((a & SPCIO_SOURCE_MASK) == SPCIO_READWRITE)
|
||||
#define IS_SPCIO_ERRORONLY(a) ((a & SPCIO_SOURCE_MASK) == SPCIO_ERRORONLY)
|
||||
#define IS_SPCIO_WRITEERROR(a) ((a & SPCIO_SOURCE_MASK) == SPCIO_WRITEERROR)
|
||||
#define IS_SPCIO_READERROR(a) ((a & SPCIO_SOURCE_MASK) == SPCIO_READERROR)
|
||||
#define IS_SPCIO_READWRITEERROR(a)((a&SPCIO_SOURCE_MASK) == SPCIO_READWRITEERROR)
|
||||
|
||||
/* Style flags (mutually exclusive) */
|
||||
#define IS_SPCIO_PIPE(a) ((a & SPCIO_STYLE_MASK) == SPCIO_PIPE)
|
||||
#define IS_SPCIO_PTY(a) ((a & SPCIO_STYLE_MASK) == SPCIO_PTY)
|
||||
#define IS_SPCIO_NOIOMODE(a) ((a & SPCIO_STYLE_MASK) == SPCIO_NOIOMODE)
|
||||
|
||||
#define IS_SPCIO_LINEEDIT(a) (a & SPCIO_LINEEDIT)
|
||||
|
||||
/* Other non-mutually exclusive flags */
|
||||
#define IS_SPCIO_SYSTEM(a) (a & SPCIO_SYSTEM)
|
||||
#define IS_SPCIO_LINEORIENTED(a)(a & SPCIO_LINEORIENTED)
|
||||
#define IS_SPCIO_WAIT(a) (a & SPCIO_WAIT)
|
||||
#define IS_SPCIO_TOOLKIT(a) (a & SPCIO_USE_XTOOLKIT)
|
||||
#define IS_SPCIO_SYNC_TERM(a) (a & SPCIO_SYNC_TERMINATOR)
|
||||
#define IS_SPCIO_USE_LOGFILE(a) (a & SPCIO_USE_LOGFILE)
|
||||
|
||||
#define IS_SPCIO_SIGNAL_PGRP(a) (a & SPCIO_SIGNAL_PGRP)
|
||||
#define IS_SPCIO_FORCE_CONTEXT(a) (a & SPCIO_FORCE_CONTEXT)
|
||||
|
||||
#define SPCIO_HAS_DATA 0x2000 /* Used for line-oriented IO */
|
||||
#define HAS_DATA(chn) (((chn->IOMode) & SPCIO_HAS_DATA) == SPCIO_HAS_DATA)
|
||||
|
||||
#define SPCIO_UNUSED3 0x80000
|
||||
|
||||
/* Flags for internal use only */
|
||||
|
||||
#define SPCIO_DEALLOC_ARGV 0x4000
|
||||
#define IS_SPCIO_DEALLOC_ARGV(a) (a & SPCIO_DEALLOC_ARGV)
|
||||
|
||||
#define SPCIO_DELAY_CLOSE 0x8000
|
||||
#define IS_SPCIO_DELAY_CLOSE(a) (a & SPCIO_DELAY_CLOSE)
|
||||
|
||||
#define SPCIO_DO_CLOSE 0x10000
|
||||
#define IS_SPCIO_DO_CLOSE(a) (a & SPCIO_DO_CLOSE)
|
||||
|
||||
/* Make sure that STATE_OFFSET is always such that you will clear the
|
||||
IOMode flags */
|
||||
|
||||
#define STATE_OFFSET 24
|
||||
#define SPCIO_ACTIVE (1<<STATE_OFFSET) /* channel has subprocess */
|
||||
#define SPCIO_DATA (2<<STATE_OFFSET) /* channel has data */
|
||||
|
||||
#define IS_SPCIO_ACTIVE(a) (a & SPCIO_ACTIVE)
|
||||
#define IS_SPCIO_DATA(a) (a & SPCIO_DATA)
|
||||
|
||||
#define IS_ACTIVE(chn) (IS_SPCIO_ACTIVE(chn->IOMode))
|
||||
#define IS_DATA(chn) (IS_SPCIO_DATA(chn->IOMode))
|
||||
|
||||
#define IS_REMOTE(chn) (chn->connection)
|
||||
|
||||
/* SPC state machine */
|
||||
|
||||
#define CHANNEL_STATE(io_mode) ((io_mode)>>STATE_OFFSET & 0x3)
|
||||
#define MAKE_CHANNEL_STATE(io_mode, _state) \
|
||||
(((_state)<<STATE_OFFSET) | (io_mode & ~(0x3<<STATE_OFFSET)))
|
||||
#define MAKE_STATE(_data,_proc) ((_data)<<1 | (_proc))
|
||||
#define MAKE_STATE_INDEX(_old,_new) ((_old)<<2 | (_new))
|
||||
#define DATA_LINE(_state) ((_state) >> 1)
|
||||
#define PROC_LINE(_state) ((_state) & 1)
|
||||
|
||||
/* Defaults */
|
||||
|
||||
#define DEFAULT_CHANNEL_CLASS pty_channel_class
|
||||
#define IS_SPCIO_DEFAULT(a) !((a) & SPCIO_STYLE_MASK)
|
||||
#define SPCIO_DEFAULT SPCIO_PTY
|
||||
|
||||
/*
|
||||
* Type definitions for SPC file descriptors
|
||||
*/
|
||||
|
||||
/* Definitions for wires */
|
||||
|
||||
#define READ_SIDE 0
|
||||
#define WRITE_SIDE 1
|
||||
|
||||
/*
|
||||
* Constants and external declarations for managing the SPC daemon's
|
||||
* logfile list, exit timer and process id list.
|
||||
*/
|
||||
#define SPCD_DEFAULT_TIMEOUT 10
|
||||
#define SPCD_DEAD_PROCESS -1
|
||||
#define SPCD_NO_TIMER -1
|
||||
#define SPCD_REQUEST_PENDING 1
|
||||
#define SPCD_NO_REQUEST_PENDING 0
|
||||
|
||||
/*
|
||||
* Constants for the 'SPC_who_am_i' variable.
|
||||
*/
|
||||
#define SPC_I_AM_A_CLIENT 1
|
||||
#define SPC_I_AM_A_DAEMON 2
|
||||
|
||||
/*
|
||||
* External variables defined in noio.c
|
||||
*/
|
||||
extern char **SPC_logfile_list;
|
||||
|
||||
/*
|
||||
* External variables defined in spc-exec.c
|
||||
*/
|
||||
extern pid_t *SPC_pid_list;
|
||||
extern char *SPC_mount_point_env_var;
|
||||
|
||||
/*
|
||||
* External variables defined in spc-obj.c
|
||||
*/
|
||||
extern int SPC_who_am_i;
|
||||
|
||||
/*
|
||||
* The client version number.
|
||||
*/
|
||||
extern int SPC_client_version_number;
|
||||
|
||||
/*
|
||||
* The name of the directory used for authentication and
|
||||
* for temporary logfiles.
|
||||
*/
|
||||
extern XeString SPCD_Authentication_Dir;
|
||||
|
||||
/*
|
||||
* Definitions for file locations
|
||||
*/
|
||||
#define SPCD_ENV_INSTALL_DIRECTORY CDE_INSTALLATION_TOP "/config"
|
||||
#define SPCD_ENV_CONFIG_DIRECTORY CDE_CONFIGURATION_TOP "/config"
|
||||
#define SPCD_ENV_HOME_DIRECTORY ".dt"
|
||||
#define SPCD_ENV_FILE "dtspcdenv"
|
||||
#define SPCD_PROG_NAME "dtspcd"
|
||||
|
||||
/*
|
||||
* The name of the remove environment 'keyword'.
|
||||
*/
|
||||
#define SPC_REMOVE_VAR "unset"
|
||||
|
||||
/*
|
||||
***
|
||||
*** Start typedefs
|
||||
***
|
||||
*/
|
||||
|
||||
typedef int Files[3]; /* Standard set of file descriptors */
|
||||
typedef int SPC_IOMode; /* Sub-Process Control IO Mode Bits */
|
||||
|
||||
/* This is a "wire", a data structure used in creating communication paths
|
||||
to / from a subprocess. It encapsulates all the information needed by
|
||||
all types of paths */
|
||||
|
||||
typedef struct _wire {
|
||||
SPC_IOMode flags; /* Basically, acts like an IOMode, but
|
||||
we are only interested in its data bits */
|
||||
int fd[2];
|
||||
XeString master_name, slave_name;
|
||||
int read_toolkit_id, except_toolkit_id;
|
||||
struct termios master_termio, slave_termio;
|
||||
struct _wire *next;
|
||||
} Wire;
|
||||
|
||||
typedef struct _buffered_data {
|
||||
XeChar data[MAXREQLEN];
|
||||
int len, offset;
|
||||
} buffered_data, *buffered_data_ptr;
|
||||
|
||||
typedef enum {
|
||||
SPC_Input,
|
||||
SPC_Exception,
|
||||
SPC_Terminator,
|
||||
SPC_Client
|
||||
} SPC_Callback_Condition;
|
||||
|
||||
/*
|
||||
* Type definition for an SPC Connection (a socket to SPCD server)
|
||||
*/
|
||||
|
||||
typedef struct _SPC_Connection {
|
||||
/* The host on which other end resides */
|
||||
XeChar hostname[MAXHOSTNAMELEN];
|
||||
int sid; /* The Socket ID */
|
||||
XeChar connected; /* Whether server connection is made */
|
||||
struct hostent *local; /* socket address information for */
|
||||
struct hostent *remote; /* ... local, remote machine */
|
||||
int termination_id;
|
||||
struct _SPC_Connection
|
||||
*next; /* The next server in the list */
|
||||
XeQueue queued_remote_data; /* queue for remote data */
|
||||
int protocol_version; /* Version of protocol of remote */
|
||||
XeString hostinfo; /* Info about remote, (type, os, etc) */
|
||||
|
||||
} SPC_Connection, *SPC_Connection_Ptr;
|
||||
|
||||
/*
|
||||
* This next macro returns a newly allocated string.
|
||||
* The caller should free it.
|
||||
*/
|
||||
|
||||
#define CONNECTION_HOSTNAME(conn) \
|
||||
((conn->remote) ? XeFindShortHost((conn)->remote->h_name) : \
|
||||
Xestrdup(XeString_Empty))
|
||||
|
||||
/*
|
||||
* Type definition for an SPC Channel
|
||||
*/
|
||||
|
||||
typedef int (*SPC_F_read_filter)(SPC_Channel_Ptr, int, XeString, int);
|
||||
|
||||
typedef struct _SPC_Channel { /* Sub-Process Control Channel */
|
||||
|
||||
/* stuff for SCOOP */
|
||||
channel_clasp class_ptr;
|
||||
root_object_part
|
||||
|
||||
/* First, we place a channel identifier, so we can check cid (see below) */
|
||||
int identifier; /* The common identifier for every channel */
|
||||
|
||||
/* The setup request information */
|
||||
SPC_Connection *connection; /* The connection structure (Local = NULL) */
|
||||
|
||||
XeString context_dir; /* Directory to "cd" to during spawn */
|
||||
XeString path; /* The command path pointer */
|
||||
XeString *argv; /* The command argument list pointers */
|
||||
XeString *envp; /* The command environment list pointers */
|
||||
|
||||
SPC_IOMode IOMode; /* The IO Control Mode settings */
|
||||
|
||||
/* User defined data handling procedures */
|
||||
SbInputHandlerProc Input_Handler;
|
||||
/* The user input handler routine */
|
||||
void * client_data; /* The user associated input handler data */
|
||||
/* Useful (ie.) as input Widget */
|
||||
SPC_TerminateHandlerType Terminate_Handler; /* The SIGCLD user handler routine */
|
||||
void * Terminate_Data; /* The client_data for user handler routine */
|
||||
|
||||
/* Now the recorded information */
|
||||
|
||||
int pid; /* The child Process IDentification number */
|
||||
/* Also the RPID for a Remote channel */
|
||||
int cid; /* The remote Channel IDentification number */
|
||||
int status; /* The Process status */
|
||||
Wire *wires[3]; /* The read side/write side file descriptors */
|
||||
Files file_descs; /* Which file descriptors to use */
|
||||
Wire *wire_list; /* Pointer to list of wires we have
|
||||
(used for reset & pre_fork processing) */
|
||||
buffered_data_ptr linebufs[3]; /* Buffers for lined oriented IO */
|
||||
SPC_F_read_filter read_filter;
|
||||
/* Function to use to read. It may
|
||||
be the actual read method, or it
|
||||
may be a filter for newlines
|
||||
(which would eventually call the read
|
||||
method) */
|
||||
XeQueue queued_remote_data; /* queue for remote data */
|
||||
XeString logfile; /* logfile name for SPCIO_USE_LOGFILE */
|
||||
int close_timeout; /* Amount of time to wait for a pty close */
|
||||
struct _SPC_Channel *next; /* The next active channel */
|
||||
|
||||
int sync_pipe[2]; /* Only used in pty.c for __hpux_pty */
|
||||
|
||||
} SPC_Channel;
|
||||
|
||||
/* The default shell when none can be derived */
|
||||
#ifdef hpV4
|
||||
#define DEFAULT_SHELL (XeString ) "/usr/bin/sh"
|
||||
#else
|
||||
#define DEFAULT_SHELL (XeString ) "/bin/sh"
|
||||
#endif /* hpV4 */
|
||||
|
||||
/* Some macros which define the bit field portions of a wait() status */
|
||||
/* NOTE: These should be independent of integer word size */
|
||||
#define WAIT_STATUS_MASK 0xff
|
||||
#define IS_WAIT_STATUS_STOPPED 0177
|
||||
#define IS_WAIT_STATUS_EXITED 0000
|
||||
#define IS_WAIT_STATUS_DUMPED 0200
|
||||
|
||||
typedef unsigned long SPCInputId;
|
||||
|
||||
/* SPC/local.c */
|
||||
int close_local_channel_object (SPC_Channel_Ptr channel);
|
||||
int write_local_channel_object (SPC_Channel_Ptr channel, XeString buffer, int nbytes);
|
||||
int signal_local_channel_object (SPC_Channel_Ptr channel, int sig);
|
||||
int local_channel_object_wait_for_termination (SPC_Channel_Ptr channel);
|
||||
int remove_logfile_local_channel_object (SPC_Channel_Ptr channel);
|
||||
void local_channel_object_input_handler (void * client_data, int *source, SPCInputId *id);
|
||||
int local_channel_object_send_eof(SPC_Channel_Ptr channel);
|
||||
|
||||
/* noio.c */
|
||||
void noio_channel_class_init (object_clasp c);
|
||||
SPC_Channel_Ptr open_noio_channel_object (SPC_Channel_Ptr channel, int iomode, XeString hostname);
|
||||
int read_noio_channel_object (SPC_Channel_Ptr channel, int connector, XeString buffer, int nbytes);
|
||||
int write_noio_channel_object (SPC_Channel_Ptr channel, XeString buffer, int nbytes);
|
||||
int pre_fork_noio_channel_object (SPC_Channel_Ptr channel);
|
||||
int post_fork_noio_channel_object (SPC_Channel_Ptr channel, int parentp);
|
||||
int reset_noio_channel_object (SPC_Channel_Ptr channel);
|
||||
int attach_noio_channel_object (SPC_Channel_Ptr channel, int);
|
||||
void noio_channel_object_input_handler (void * client_data, int *source, SPCInputId *id);
|
||||
int send_eof_noio_channel_object(SPC_Channel_Ptr channel);
|
||||
int set_termio_noio_channel_object(SPC_Channel_Ptr, int, int, struct termios *);
|
||||
|
||||
/* pipe.c */
|
||||
void pipe_channel_class_init (object_clasp c);
|
||||
Wire *getpipe (Wire *prevwire);
|
||||
SPC_Channel_Ptr open_pipe_channel_object (SPC_Channel_Ptr channel, int iomode, XeString hostname);
|
||||
int read_pipe_channel_object (SPC_Channel_Ptr channel, int connector, XeString buffer, int nbytes);
|
||||
int pre_fork_pipe_channel_object (SPC_Channel_Ptr channel);
|
||||
int post_fork_pipe_channel_object (SPC_Channel_Ptr channel, int parentp);
|
||||
int reset_pipe_channel_object (SPC_Channel_Ptr channel);
|
||||
int attach_pipe_channel_object (SPC_Channel_Ptr channel, int);
|
||||
int add_input_pipe_channel_object (SPC_Channel_Ptr channel, SbInputHandlerProc handler, void *data);
|
||||
|
||||
|
||||
/* pty.c */
|
||||
void pty_channel_class_init (object_clasp c);
|
||||
SPC_Channel_Ptr open_pty_channel_object (SPC_Channel_Ptr channel, int iomode, XeString hostname);
|
||||
int read_pty_channel_object (SPC_Channel_Ptr channel, int connector, XeString buffer, int nbytes);
|
||||
int pre_fork_pty_channel_object (SPC_Channel_Ptr channel);
|
||||
int post_fork_pty_channel_object (SPC_Channel_Ptr channel, int parentp);
|
||||
int reset_pty_channel_object (SPC_Channel_Ptr channel);
|
||||
int attach_pty_channel_object (SPC_Channel_Ptr channel, int pid);
|
||||
int add_input_pty_channel_object (SPC_Channel_Ptr channel, SbInputHandlerProc handler, void *data);
|
||||
int set_termio_pty_channel_object(SPC_Channel_Ptr channel, int, int,
|
||||
struct termios *);
|
||||
struct termios *SPC_Get_Current_Termio(void);
|
||||
int SPC_Setpgrp(int);
|
||||
|
||||
/* remote.c */
|
||||
void remote_channel_class_init (object_clasp c);
|
||||
Wire *get_new_remote_wire (Wire *prevwire);
|
||||
SPC_Channel_Ptr open_remote_channel_object (SPC_Channel_Ptr channel, int iomode, XeString hostname);
|
||||
int close_remote_channel_object (SPC_Channel_Ptr channel);
|
||||
int reset_remote_channel_object (SPC_Channel_Ptr channel);
|
||||
int exec_proc_remote_channel_object (SPC_Channel_Ptr channel);
|
||||
int write_remote_channel_object (SPC_Channel_Ptr channel, XeString buffer, int len);
|
||||
int read_remote_channel_object (SPC_Channel_Ptr channel, int connection, XeString buffer, int len);
|
||||
int signal_remote_channel_object (SPC_Channel_Ptr channel, int sig);
|
||||
int attach_remote_channel_object (SPC_Channel_Ptr channel, int pid);
|
||||
int remove_logfile_remote_channel_object (SPC_Channel_Ptr channel);
|
||||
int add_input_remote_channel_object (SPC_Channel_Ptr channel, SbInputHandlerProc handler, void *data);
|
||||
int SPC_Debug_Mode (SPC_Channel_Ptr channel, XeString file);
|
||||
int send_eof_remote_channel_object(SPC_Channel_Ptr channel);
|
||||
int set_termio_remote_channel_object(SPC_Channel_Ptr channel,
|
||||
int, int, struct termios *);
|
||||
|
||||
|
||||
/* spc-env.c */
|
||||
XeString SPC_Getenv (XeString var, XeString *envp);
|
||||
XeString *SPC_Putenv (XeString val, XeString *envp);
|
||||
XeString *SPC_Add_Env_File (XeString filename, XeString *envp);
|
||||
XeString *SPC_Create_Default_Envp (XeString *old_envp);
|
||||
XeString *SPC_Fixup_Environment (XeString *envp, SPC_Channel_Ptr channel);
|
||||
XeString *SPC_Merge_Envp (XeString *dest_envp, XeString *source_envp);
|
||||
void SPC_Free_Envp (XeString *envp);
|
||||
|
||||
|
||||
/* spc-exec.c */
|
||||
int SPC_Setup_Synchronous_Terminator (void);
|
||||
SPC_Connection_Ptr SPC_Channel_Terminator_Connection (SPC_Channel_Ptr channel);
|
||||
void SPC_Close_Unused (void);
|
||||
int SPC_MakeSystemCommand (SPC_Channel_Ptr channel);
|
||||
void SPC_Child_Terminated(int);
|
||||
int exec_proc_local_channel_object (SPC_Channel_Ptr channel);
|
||||
|
||||
|
||||
/* spc-net.c */
|
||||
Boolean SPC_Init_Local_Host_Info (void);
|
||||
int SPC_Local_Hostname (XeString hostname);
|
||||
SPC_Connection_Ptr SPC_Open_Connection (XeString hostname);
|
||||
int SPC_Open_Socket (SPC_Connection_Ptr conn, int type);
|
||||
int SPC_Contact_Server (SPC_Connection_Ptr connection);
|
||||
SPC_Connection_Ptr SPC_Init_Child (SPC_Connection_Ptr conn, int from);
|
||||
SPC_Connection_Ptr SPC_Standalone_Daemon (SPC_Connection_Ptr conn);
|
||||
int SPC_Inetd_Daemon (SPC_Connection_Ptr conn);
|
||||
SPC_Connection_Ptr SPC_Start_Daemon (int standalone);
|
||||
|
||||
|
||||
/* spc-obj.c */
|
||||
void spc_init_fds(void);
|
||||
object *alloc_channel_object (object_clasp c);
|
||||
void channel_class_init (object_clasp c);
|
||||
int SPC_ResetTerminator(void);
|
||||
int SPC_Initialize (void);
|
||||
SPC_Channel_Ptr SPC_Initialize_Channel (XeString hostname, int iomode);
|
||||
void SPC_Channel_Terminated (SPC_Channel_Ptr channel);
|
||||
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 ntoread);
|
||||
int SPC_Input_Handler (SPC_Channel_Ptr channel, int connector);
|
||||
SPC_Channel_Ptr open_channel_object (SPC_Channel_Ptr channel, int iomode, XeString hostname);
|
||||
int close_channel_object (SPC_Channel_Ptr channel);
|
||||
int read_channel_object (SPC_Channel_Ptr channel, int connector, XeString buffer, int nbytes);
|
||||
int write_channel_object (SPC_Channel_Ptr channel, XeString buffer, int nbytes);
|
||||
int reset_channel_object (SPC_Channel_Ptr channel);
|
||||
int pre_fork_channel_object (SPC_Channel_Ptr channel);
|
||||
int post_fork_channel_object (SPC_Channel_Ptr channel, int parentp);
|
||||
int exec_proc_channel_object (SPC_Channel_Ptr channel);
|
||||
int signal_channel_object (SPC_Channel_Ptr channel, int sig);
|
||||
int channel_object_wait_for_termination (SPC_Channel_Ptr channel);
|
||||
int attach_channel_object (SPC_Channel_Ptr channel, int pid);
|
||||
int add_input_channel_object (SPC_Channel_Ptr channel, SbInputHandlerProc handler, void *data);
|
||||
int remove_logfile_channel_object (SPC_Channel_Ptr channel);
|
||||
|
||||
/* spc-sm.c */
|
||||
int SPC_Change_State (SPC_Channel_Ptr channel, int connector, int data_line, int process_line);
|
||||
int error_fun (SPC_Channel_Ptr channel, int 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 connector);
|
||||
|
||||
/* spc-xt.c */
|
||||
|
||||
typedef void (*spc_handler_func_type) (void *, int *, SPCInputId *);
|
||||
int SPC_Wait_For_Termination (SPC_Channel_Ptr channel);
|
||||
void SPC_XtBreak (void);
|
||||
void SPC_XtAddInput (SPC_Channel_Ptr channel, int *id_addr, int fd, spc_handler_func_type handler, SPC_Callback_Condition condition);
|
||||
void SPC_XtRemoveInput (int *id_addr, SPC_Callback_Condition condition);
|
||||
|
||||
|
||||
/* spc-util.c */
|
||||
Wire *get_new_wire (void);
|
||||
void free_wire (Wire *wire);
|
||||
SPC_Channel_Ptr SPC_Find_PID (int pid);
|
||||
int spc_close (int fd);
|
||||
int spc_dup2 (int from, int to);
|
||||
int SPC_fd_to_connector (SPC_Channel_Ptr channel, int fd);
|
||||
XeString *Alloc_Argv (int n);
|
||||
void SPC_Conditional_Packet_Handler (void * client_data, int *source, SPCInputId *id);
|
||||
int sprintf_len (XeString s, XeString format, ...);
|
||||
typedef Boolean (path_search_predicate)(XeString, XeString, XeString);
|
||||
Boolean path_search (XeString path, XeString filename, path_search_predicate p);
|
||||
|
||||
|
||||
/* spc-error.c */
|
||||
XeString SPC_copy_string (XeString str);
|
||||
void SPC_Error (int error, ...);
|
||||
int SPC_Make_Log_Filename (XeString name, int unique);
|
||||
int SPC_Open_Log (XeString filename, int unique);
|
||||
int SPC_Close_Log (void);
|
||||
int SPC_Write_Log (XeString str);
|
||||
int SPC_Format_Log (XeString format, ...);
|
||||
SPCError *SPC_Lookup_Error (int errornum);
|
||||
SPCError *SPC_Lookup_Error (int errornum);
|
||||
|
||||
|
||||
/* spc-termio.c */
|
||||
XeString SPC_Decode_Termios( struct termios * );
|
||||
void SPC_Encode_Termios(XeString buff, struct termios *tio);
|
||||
|
||||
#endif /* _spcP_h */
|
||||
@@ -1,17 +0,0 @@
|
||||
XCOMM $XConsortium: Imakefile /main/4 1996/04/21 19:09:58 drk $
|
||||
|
||||
HEADERS = \
|
||||
MemoryMgr.h SbEvent.h Symbolic.h \
|
||||
XeUserMsg.h bms.h connect.h \
|
||||
pathwexp.h sbport.h sbstdinc.h \
|
||||
scoop.h spc.h stringbuf.h \
|
||||
usersig.h
|
||||
|
||||
all::
|
||||
|
||||
BuildIncludes($(HEADERS),bms,..)
|
||||
InstallMultipleFlags($(HEADERS),$(INCDIR)/bms,$(INSTINCFLAGS))
|
||||
|
||||
depend::
|
||||
|
||||
clean::
|
||||
@@ -1,71 +0,0 @@
|
||||
/*
|
||||
* CDE - Common Desktop Environment
|
||||
*
|
||||
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
|
||||
*
|
||||
* These libraries and programs are free software; you can
|
||||
* redistribute them and/or modify them under the terms of the GNU
|
||||
* Lesser General Public License as published by the Free Software
|
||||
* Foundation; either version 2 of the License, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* These libraries and programs are distributed in the hope that
|
||||
* they will be useful, but WITHOUT ANY WARRANTY; without even the
|
||||
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU Lesser General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with these libraries and programs; if not, write
|
||||
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
|
||||
* Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/*
|
||||
* File: MemoryMgr.h $XConsortium: MemoryMgr.h /main/3 1995/10/26 15:45:08 rswiston $
|
||||
* Language: C
|
||||
*
|
||||
* (c) Copyright 1988, Hewlett-Packard Company, all rights reserved.
|
||||
*
|
||||
* (c) Copyright 1993, 1994 Hewlett-Packard Company *
|
||||
* (c) Copyright 1993, 1994 International Business Machines Corp. *
|
||||
* (c) Copyright 1993, 1994 Sun Microsystems, Inc. *
|
||||
* (c) Copyright 1993, 1994 Novell, Inc. *
|
||||
*/
|
||||
|
||||
/* Allocation routines */
|
||||
|
||||
#ifndef _MemoryMgr_h
|
||||
#define _MemoryMgr_h
|
||||
|
||||
void *XeMalloc
|
||||
#if defined(__STDC__) || defined(__cplusplus) || defined(c_plusplus)
|
||||
(size_t size);
|
||||
#else
|
||||
();
|
||||
#endif
|
||||
|
||||
void XeFree
|
||||
#if defined(__STDC__) || defined(__cplusplus) || defined(c_plusplus)
|
||||
(void * ptr);
|
||||
#else
|
||||
();
|
||||
#endif
|
||||
|
||||
#define Xe_make_struct(type) ((struct type *)XeMalloc(sizeof(struct type)))
|
||||
#define Xe_make_ntype(n, type) ((type *) XeMalloc((n)*sizeof(type)))
|
||||
#define Xe_make_buffer(size) ((XeString) XeMalloc(size))
|
||||
#define Xe_make_str(size) ((XeString) XeMalloc((size)+1))
|
||||
|
||||
#define XeCopyStringM(string_xxx) (string_xxx \
|
||||
? (XeString) strcpy(Xe_make_str(strlen(string_xxx)), string_xxx) \
|
||||
: (XeString) NULL)
|
||||
|
||||
|
||||
/* Dellocation */
|
||||
|
||||
#define Xe_release_ntype(ptr, n, type) XeFree(ptr)
|
||||
#define Xe_release_str(ptr) XeFree(ptr)
|
||||
|
||||
#endif /* _MemoryMgr_h */
|
||||
/* PLACE NOTHING AFTER THIS endif */
|
||||
|
||||
@@ -1,97 +0,0 @@
|
||||
/*
|
||||
* CDE - Common Desktop Environment
|
||||
*
|
||||
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
|
||||
*
|
||||
* These libraries and programs are free software; you can
|
||||
* redistribute them and/or modify them under the terms of the GNU
|
||||
* Lesser General Public License as published by the Free Software
|
||||
* Foundation; either version 2 of the License, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* These libraries and programs are distributed in the hope that
|
||||
* they will be useful, but WITHOUT ANY WARRANTY; without even the
|
||||
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU Lesser General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with these libraries and programs; if not, write
|
||||
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
|
||||
* Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/*
|
||||
* File: SbEvent.h $XConsortium: SbEvent.h /main/3 1995/10/26 15:45:29 rswiston $
|
||||
* Language: C
|
||||
*
|
||||
* (c) Copyright 1990, Hewlett-Packard Company, all rights reserved.
|
||||
*
|
||||
* (c) Copyright 1993, 1994 Hewlett-Packard Company *
|
||||
* (c) Copyright 1993, 1994 International Business Machines Corp. *
|
||||
* (c) Copyright 1993, 1994 Sun Microsystems, Inc. *
|
||||
* (c) Copyright 1993, 1994 Novell, Inc. *
|
||||
*/
|
||||
|
||||
#ifndef _SbEvent_h
|
||||
#define _SbEvent_h
|
||||
|
||||
typedef unsigned long SbInputId;
|
||||
|
||||
typedef void (*SbInputCallbackProc)
|
||||
#if defined(__STDC__) || defined(__cplusplus) || defined(c_plusplus)
|
||||
(void* data, int *fd, SbInputId *id);
|
||||
#else
|
||||
();
|
||||
#endif
|
||||
|
||||
extern SbInputId (*SbAddInput_hookfn)
|
||||
#if defined(__STDC__) || defined(__cplusplus) || defined(c_plusplus)
|
||||
(int fd, SbInputCallbackProc proc, void* data);
|
||||
#else
|
||||
();
|
||||
#endif
|
||||
|
||||
extern SbInputId (*SbAddException_hookfn)
|
||||
#if defined(__STDC__) || defined(__cplusplus) || defined(c_plusplus)
|
||||
(int fd, SbInputCallbackProc proc, void* data);
|
||||
#else
|
||||
();
|
||||
#endif
|
||||
|
||||
extern void (*SbRemoveInput_hookfn)
|
||||
#if defined(__STDC__) || defined(__cplusplus) || defined(c_plusplus)
|
||||
(SbInputId id);
|
||||
#else
|
||||
();
|
||||
#endif
|
||||
|
||||
extern void (*SbRemoveException_hookfn)
|
||||
#if defined(__STDC__) || defined(__cplusplus) || defined(c_plusplus)
|
||||
(SbInputId id);
|
||||
#else
|
||||
();
|
||||
#endif
|
||||
|
||||
extern void (*SbMainLoopUntil_hookfn)
|
||||
#if defined(__STDC__) || defined(__cplusplus) || defined(c_plusplus)
|
||||
(Boolean *flag);
|
||||
#else
|
||||
();
|
||||
#endif
|
||||
|
||||
extern void XeCall_SbMainLoopUntil
|
||||
#if defined(__STDC__) || defined(__cplusplus) || defined(c_plusplus)
|
||||
(Boolean *flag);
|
||||
#else
|
||||
();
|
||||
#endif
|
||||
|
||||
extern void (*SbBreakMainLoop_hookfn)
|
||||
#if defined(__STDC__) || defined(__cplusplus) || defined(c_plusplus)
|
||||
(void);
|
||||
#else
|
||||
();
|
||||
#endif
|
||||
|
||||
|
||||
#endif /* _SbEvent_h */
|
||||
@@ -1,372 +0,0 @@
|
||||
/*
|
||||
* CDE - Common Desktop Environment
|
||||
*
|
||||
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
|
||||
*
|
||||
* These libraries and programs are free software; you can
|
||||
* redistribute them and/or modify them under the terms of the GNU
|
||||
* Lesser General Public License as published by the Free Software
|
||||
* Foundation; either version 2 of the License, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* These libraries and programs are distributed in the hope that
|
||||
* they will be useful, but WITHOUT ANY WARRANTY; without even the
|
||||
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU Lesser General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with these libraries and programs; if not, write
|
||||
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
|
||||
* Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/*
|
||||
* File: Symbolic.h $XConsortium: Symbolic.h /main/3 1995/10/26 15:45:51 rswiston $
|
||||
* Language: C
|
||||
*
|
||||
* (c) Copyright 1988, Hewlett-Packard Company, all rights reserved.
|
||||
*
|
||||
* (c) Copyright 1993, 1994 Hewlett-Packard Company *
|
||||
* (c) Copyright 1993, 1994 International Business Machines Corp. *
|
||||
* (c) Copyright 1993, 1994 Sun Microsystems, Inc. *
|
||||
* (c) Copyright 1993, 1994 Novell, Inc. *
|
||||
*/
|
||||
|
||||
/* SYMBOLS */
|
||||
|
||||
#ifndef _Symbolic_h_
|
||||
#define _Symbolic_h_
|
||||
|
||||
/* -------------------------------------------- */
|
||||
/* Requires: */
|
||||
#ifdef __recursive_includes
|
||||
#include <bms/bms.h>
|
||||
#endif
|
||||
/* -------------------------------------------- */
|
||||
|
||||
/****************************************************************************/
|
||||
/* Symbol (hash) Tables */
|
||||
|
||||
/*
|
||||
|
||||
There are two types of symbol (hash) tables. The common case is where the
|
||||
key (index) is ascii string. The Xe_intern() and XeRegisterSymbol()
|
||||
routines assume this type of table. In these cases an "XeSymbol" entry is
|
||||
created in the symbol table (see type below). After it is created a COPY of
|
||||
the string is made and stored in the "name" field. The "value" field is
|
||||
free for the user to fill in on his own.
|
||||
|
||||
*/
|
||||
|
||||
typedef struct _XeSymbol {
|
||||
XeString name;
|
||||
void *value;
|
||||
} *XeSymbol;
|
||||
|
||||
/*
|
||||
This type is used for the XeRegisterFunction() routine.
|
||||
*/
|
||||
|
||||
typedef void (*XeAnyFunction) ();
|
||||
|
||||
|
||||
/*
|
||||
The second type of table is where the user defines his own type of
|
||||
data, hash functions, compare functions, etc.
|
||||
*/
|
||||
|
||||
/* The following types for the the user configurable functions that */
|
||||
/* are set with the Xe_set_syms_fns() routine. */
|
||||
/* ---------------------------------------------------------------- */
|
||||
|
||||
|
||||
/* CMP_FN: */
|
||||
/* */
|
||||
/* Any user defined function should return "0" for a "match" */
|
||||
/* */
|
||||
/* Used for Xe_intern() and XeRegisterSymbol() */
|
||||
/* */
|
||||
/* If NO "cmp_fn", strcmp("next_table_entry"->name, "name") */
|
||||
/* If "cmp_fn", cmp_fn("next_table_entry"->name, "name") */
|
||||
/* */
|
||||
/* Used for Xe_intern_anysym() */
|
||||
/* */
|
||||
/* If NO "cmp_fn", strcmp("next_table_entry"->name, "data"->name) */
|
||||
/* If "cmp_fn", cmp_fn("next_table_entry", "data") */
|
||||
/* -------------------------------------------------------------------- */
|
||||
|
||||
#if defined(__STDC__) || defined(__cplusplus) || defined(c_plusplus)
|
||||
typedef int (*XeSymFn_cmp) (void *, void *); /* 0 mean match */
|
||||
#else
|
||||
typedef int (*XeSymFn_cmp) ();
|
||||
#endif
|
||||
|
||||
|
||||
/* HASH_FN: */
|
||||
/* */
|
||||
/* Note, the internal hash function in not user accesable. */
|
||||
/* */
|
||||
/* Used for Xe_intern() and XeRegisterSymbol() */
|
||||
/* */
|
||||
/* If NO "hash_fn", internal_hash("next_table_entry"->name, "name") */
|
||||
/* If "hash_fn", hash_fn("next_table_entry"->name, "name") */
|
||||
/* */
|
||||
/* Used for Xe_intern_anysym() */
|
||||
/* */
|
||||
/* If NO "hash_fn", internal_hash("next_table_entry"->name, "data"->name)*/
|
||||
/* If "hash_fn", hash_fn("next_table_entry" , "data") */
|
||||
/* ----------------------------------------------------------------------- */
|
||||
|
||||
#if defined(__STDC__) || defined(__cplusplus) || defined(c_plusplus)
|
||||
typedef unsigned int (*XeSymFn_hash) (void *, unsigned int);
|
||||
#else
|
||||
typedef unsigned int (*XeSymFn_hash) ();
|
||||
#endif
|
||||
|
||||
/* INIT_FN: */
|
||||
/* */
|
||||
/* Used for Xe_intern() and XeRegisterSymbol() */
|
||||
/* */
|
||||
/* 1) A XeSymbol entry is created, */
|
||||
/* - XeSymbol->name = strdup("name"), */
|
||||
/* - XeSymbol->value = NULL */
|
||||
/* 2) If a "init_fn" is configured, */
|
||||
/* - XeSymbol->value = init_fn( XeSymbol, 0 ) */
|
||||
/* */
|
||||
/* Used for Xe_intern_anysym() */
|
||||
/* */
|
||||
/* 1) If "size" != 0, */
|
||||
/* - malloc "size" bytes, */
|
||||
/* - copy "size" bytes from "data" into malloced space, */
|
||||
/* - Save pointer to malloc space as user's data pointer */
|
||||
/* Else */
|
||||
/* - Save "data" as pointer to user's data */
|
||||
/* 3) If a "init_fn" is configured, */
|
||||
/* - call init_fn( user's data pointer, "size" ) */
|
||||
/* - set user's data pointer to return value of init_fn */
|
||||
/* ONLY if "size" was zero. */
|
||||
/* */
|
||||
/* If size is non zero AND there is a user's malloc function, */
|
||||
/* beware that the return value from the malloc function is not */
|
||||
/* save anywhere by these routines. If size was zero, the */
|
||||
/* return value of the user's function is kept. */
|
||||
/* */
|
||||
/* -------------------------------------------------------------------- */
|
||||
|
||||
#if defined(__STDC__) || defined(__cplusplus) || defined(c_plusplus)
|
||||
typedef void * (*XeSymFn_init)(void *, unsigned int);
|
||||
#else
|
||||
typedef void * (*XeSymFn_init)();
|
||||
#endif
|
||||
|
||||
/* CLEAN_FN: */
|
||||
/* */
|
||||
/* If created by Xe_intern() or XeRegisterSymbol() */
|
||||
/* */
|
||||
/* 1) free(XeSymbol->name) */
|
||||
/* 2) If a "clean_fn" is configured, */
|
||||
/* - clean_fn(XeSymbol->value), */
|
||||
/* - the XeSymbol entry is deleted. */
|
||||
/* */
|
||||
/* If created by Xe_intern_anysym() */
|
||||
/* */
|
||||
/* 1) If a "clean_fn" is configured, */
|
||||
/* - init_fn( user's data pointer, "size" ) */
|
||||
/* 2) If "size" != 0 during at creation time, */
|
||||
/* - free( user's data pointer ) */
|
||||
/* */
|
||||
/* Take note of the what happens during creation with "size" is */
|
||||
/* non-zero and there is a user's malloc function. The result of */
|
||||
/* the user's malloc function will be passed to this clean function */
|
||||
/* only if "size" was zero at creation time. Otherwise, the memory */
|
||||
/* malloc'ed by this routine due to the non-zero size parameter is */
|
||||
/* what is passed to the user's clean function. */
|
||||
/* -------------------------------------------------------------------- */
|
||||
|
||||
#if defined(__STDC__) || defined(__cplusplus) || defined(c_plusplus)
|
||||
typedef void (*XeSymFn_clean) (void *);
|
||||
#else
|
||||
typedef void (*XeSymFn_clean) ();
|
||||
#endif
|
||||
|
||||
/* This is what an internal symbol table entry looks like: */
|
||||
/* ------------------------------------------------------- */
|
||||
typedef struct _XeSymtabList {
|
||||
struct _XeSymtabList *rest;
|
||||
void *data;
|
||||
Boolean data_is_XeSymbol;
|
||||
Boolean data_is_malloc_mem;
|
||||
} *XeSymtabList;
|
||||
|
||||
|
||||
/* This is the master record for a symbol table */
|
||||
/* -------------------------------------------- */
|
||||
|
||||
typedef struct _XeSymTable
|
||||
{
|
||||
unsigned int hashsize; /* # of hash buckets. */
|
||||
XeSymtabList *list; /* Hash buckets. */
|
||||
|
||||
XeSymtabList curr_list; /* Used to dump/traver the table. */
|
||||
unsigned int curr_hash;
|
||||
|
||||
XeSymFn_cmp cmp_fn; /* Read above description with each */
|
||||
XeSymFn_hash hash_fn; /* function typedef for more info. */
|
||||
XeSymFn_init init_fn;
|
||||
XeSymFn_clean clean_fn;
|
||||
} *XeSymTable;
|
||||
|
||||
|
||||
/* Create a new hashtable. "hashsize must be power of 2 if using default */
|
||||
/* hash function (no checking is done to ensure this). */
|
||||
/* --------------------------------------------------------------------- */
|
||||
XeSymTable Xe_new_symtab
|
||||
#if defined(__STDC__) || defined(__cplusplus) || defined(c_plusplus)
|
||||
(unsigned int hashsize);
|
||||
#else
|
||||
();
|
||||
#endif
|
||||
|
||||
|
||||
/* Create the default symbol table. If already created, just */
|
||||
/* return the symtable pointer. */
|
||||
/* ---------------------------------------------------------- */
|
||||
XeSymTable Xe_default_symtab
|
||||
#if defined(__STDC__) || defined(__cplusplus) || defined(c_plusplus)
|
||||
(void);
|
||||
#else
|
||||
();
|
||||
#endif
|
||||
|
||||
|
||||
/* Configure user defined function for use with symtab routines. */
|
||||
/* NOTE: Be sure you understand the interaction of these functions */
|
||||
/* Read the decriptions with each of the typdef's above. A */
|
||||
/* null function pointer will overwrite any previously */
|
||||
/* installed value. */
|
||||
/* --------------------------------------------------------------- */
|
||||
XeSymTable Xe_set_sym_fns
|
||||
#if defined(__STDC__) || defined(__cplusplus) || defined(c_plusplus)
|
||||
(XeSymTable t,
|
||||
XeSymFn_cmp cmp_fn,
|
||||
XeSymFn_init init_fn,
|
||||
XeSymFn_clean clean_fn,
|
||||
XeSymFn_hash hash_fn);
|
||||
#else
|
||||
();
|
||||
#endif
|
||||
|
||||
|
||||
/* Find or create a symbol for "name". Its "value" is set to NULL. */
|
||||
/* None of the user defined init/cmp, etc functions are honored by */
|
||||
/* this routine */
|
||||
/* WARNING: Read the notes for the function typedef's above. */
|
||||
/* ----------------------------------------------------------------- */
|
||||
XeSymbol Xe_intern
|
||||
#if defined(__STDC__) || defined(__cplusplus) || defined(c_plusplus)
|
||||
(XeSymTable t, ConstXeString const name);
|
||||
#else
|
||||
();
|
||||
#endif
|
||||
|
||||
|
||||
/* Find the symbol for "name". NULL is returned if not found. */
|
||||
/* None of the user defined init/cmp, etc functions are honored by */
|
||||
/* this routine */
|
||||
/* WARNING: Read the notes for the function typedef's above. */
|
||||
/* ----------------------------------------------------------------- */
|
||||
XeSymbol Xe_lookup
|
||||
#if defined(__STDC__) || defined(__cplusplus) || defined(c_plusplus)
|
||||
(XeSymTable t, ConstXeString const name);
|
||||
#else
|
||||
();
|
||||
#endif
|
||||
|
||||
|
||||
/****************************************************************************/
|
||||
/* LISTS */
|
||||
|
||||
typedef struct _XeList {
|
||||
struct _XeList *rest;
|
||||
void *data;
|
||||
} *XeList;
|
||||
|
||||
/* make a list from data and rest */
|
||||
/* ------------------------------ */
|
||||
XeList Xe_make_list
|
||||
#if defined(__STDC__) || defined(__cplusplus) || defined(c_plusplus)
|
||||
(void *data, XeList rest);
|
||||
#else
|
||||
();
|
||||
#endif
|
||||
|
||||
|
||||
/****************************************************************************/
|
||||
/* QUEUES */
|
||||
|
||||
typedef struct _XeQueue {
|
||||
XeList head;
|
||||
XeList tail;
|
||||
void * null;
|
||||
} *XeQueue;
|
||||
|
||||
/* for static or auto struct queues */
|
||||
/* -------------------------------- */
|
||||
XeQueue Xe_init_queue
|
||||
#if defined(__STDC__) || defined(__cplusplus) || defined(c_plusplus)
|
||||
(XeQueue q, void * nullval);
|
||||
#else
|
||||
();
|
||||
#endif
|
||||
|
||||
XeQueue Xe_make_queue
|
||||
#if defined(__STDC__) || defined(__cplusplus) || defined(c_plusplus)
|
||||
(void * nullval);
|
||||
#else
|
||||
();
|
||||
#endif
|
||||
|
||||
void Xe_release_queue
|
||||
#if defined(__STDC__) || defined(__cplusplus) || defined(c_plusplus)
|
||||
(XeQueue q);
|
||||
#else
|
||||
();
|
||||
#endif
|
||||
|
||||
/* nullval returned if queue empty */
|
||||
/* ------------------------------- */
|
||||
void * Xe_pop_queue
|
||||
#if defined(__STDC__) || defined(__cplusplus) || defined(c_plusplus)
|
||||
(XeQueue q);
|
||||
#else
|
||||
();
|
||||
#endif
|
||||
|
||||
/* nullval returned if not found */
|
||||
/* ------------------------------- */
|
||||
void * Xe_delete_queue_element
|
||||
#if defined(__STDC__) || defined(__cplusplus) || defined(c_plusplus)
|
||||
(XeQueue q, void * val);
|
||||
#else
|
||||
();
|
||||
#endif
|
||||
|
||||
void Xe_push_queue
|
||||
#if defined(__STDC__) || defined(__cplusplus) || defined(c_plusplus)
|
||||
(XeQueue q, void * val);
|
||||
#else
|
||||
();
|
||||
#endif
|
||||
|
||||
/* user declares his own "type var" */
|
||||
/* -------------------------------- */
|
||||
#define Xe_for_queue(type,var,q) \
|
||||
XeList q_next, q_list; \
|
||||
for(q_list = q->head; \
|
||||
q_list && (var = (type) q_list->data, q_next = q_list->rest , 1);\
|
||||
q_list = q_next)
|
||||
|
||||
|
||||
/* PUT NOTHING AFTER THIS endif */
|
||||
#endif /* _Symbolic_h_ */
|
||||
|
||||
@@ -1,67 +0,0 @@
|
||||
/*
|
||||
* CDE - Common Desktop Environment
|
||||
*
|
||||
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
|
||||
*
|
||||
* These libraries and programs are free software; you can
|
||||
* redistribute them and/or modify them under the terms of the GNU
|
||||
* Lesser General Public License as published by the Free Software
|
||||
* Foundation; either version 2 of the License, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* These libraries and programs are distributed in the hope that
|
||||
* they will be useful, but WITHOUT ANY WARRANTY; without even the
|
||||
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU Lesser General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with these libraries and programs; if not, write
|
||||
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
|
||||
* Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/*
|
||||
* File: XeUserMsg.h $XConsortium: XeUserMsg.h /main/3 1995/10/26 15:46:16 rswiston $
|
||||
* Language: C
|
||||
*
|
||||
* (c) Copyright 1988, Hewlett-Packard Company, all rights reserved.
|
||||
*
|
||||
* (c) Copyright 1993, 1994 Hewlett-Packard Company *
|
||||
* (c) Copyright 1993, 1994 International Business Machines Corp. *
|
||||
* (c) Copyright 1993, 1994 Sun Microsystems, Inc. *
|
||||
* (c) Copyright 1993, 1994 Novell, Inc. *
|
||||
*/
|
||||
|
||||
#ifndef _XeUserMsg_h
|
||||
#define _XeUserMsg_h
|
||||
|
||||
#include <bms/sbport.h>
|
||||
|
||||
/* Global Variables */
|
||||
/* ---------------- */
|
||||
|
||||
extern XeString XeProgName; /* saves value of arg[0] */
|
||||
|
||||
#if defined(__STDC__) || defined(__cplusplus) || defined(c_plusplus)
|
||||
typedef enum {
|
||||
XeIgnore,
|
||||
XeInformation,
|
||||
XeWarning,
|
||||
XeError,
|
||||
XeFatalError,
|
||||
XeInternalError
|
||||
} XeSeverity;
|
||||
#else
|
||||
# define XeIgnore 0
|
||||
# define XeInformation 1
|
||||
# define XeWarning 2
|
||||
# define XeError 3
|
||||
# define XeFatalError 4
|
||||
# define XeInternalError 5
|
||||
typedef int XeSeverity;
|
||||
#endif
|
||||
|
||||
#define export /* Use this noop to mark non-static procedures. */
|
||||
|
||||
#endif /* _XeUserMsg_h */
|
||||
/* DON'T ADD STUFF AFTER THIS #endif */
|
||||
@@ -1,76 +0,0 @@
|
||||
/*
|
||||
* CDE - Common Desktop Environment
|
||||
*
|
||||
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
|
||||
*
|
||||
* These libraries and programs are free software; you can
|
||||
* redistribute them and/or modify them under the terms of the GNU
|
||||
* Lesser General Public License as published by the Free Software
|
||||
* Foundation; either version 2 of the License, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* These libraries and programs are distributed in the hope that
|
||||
* they will be useful, but WITHOUT ANY WARRANTY; without even the
|
||||
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU Lesser General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with these libraries and programs; if not, write
|
||||
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
|
||||
* Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/*
|
||||
* File: bms.h $XConsortium: bms.h /main/4 1996/06/21 17:20:07 ageorge $
|
||||
* Language: C
|
||||
*
|
||||
* (c) Copyright 1988, Hewlett-Packard Company, all rights reserved.
|
||||
*
|
||||
* (c) Copyright 1993, 1994 Hewlett-Packard Company *
|
||||
* (c) Copyright 1993, 1994 International Business Machines Corp. *
|
||||
* (c) Copyright 1993, 1994 Sun Microsystems, Inc. *
|
||||
* (c) Copyright 1993, 1994 Novell, Inc. *
|
||||
*/
|
||||
|
||||
#ifndef _bms_h
|
||||
#define _bms_h
|
||||
|
||||
#ifdef SVR4
|
||||
#include <netdb.h> /* MAXHOSTNAMELEN */
|
||||
#else
|
||||
#include <sys/param.h> /* MAXHOSTNAMELEN */
|
||||
#endif
|
||||
|
||||
/* WARNINGS: */
|
||||
/* */
|
||||
/* 1) <bms/sbport.h> MUST included before this file. */
|
||||
/* 2) Any <X11/...> includes MUST come before this file. */
|
||||
/* ---------------------------------------------------------- */
|
||||
|
||||
#ifndef _XtIntrinsic_h /* Define "Boolean" if not already */
|
||||
typedef char Boolean; /* defined from <X11/Intrinsic.h> */
|
||||
#endif
|
||||
|
||||
#ifndef TRUE
|
||||
#define TRUE 1
|
||||
#endif
|
||||
|
||||
#ifndef FALSE
|
||||
#define FALSE 0
|
||||
#endif
|
||||
|
||||
extern char *XeToolClass;
|
||||
|
||||
extern XeString XeProgName; /* From noXinit.c */
|
||||
|
||||
extern XeString /* Returns Malloc'ed memory */
|
||||
XeSBTempPath
|
||||
#if defined(__STDC__) || defined(__cplusplus) || defined(c_plusplus)
|
||||
(XeString);
|
||||
#else
|
||||
();
|
||||
#endif
|
||||
|
||||
/* DON'T ADD STUFF AFTER THIS #endif */
|
||||
#endif /* _bms_h */
|
||||
|
||||
@@ -1,223 +0,0 @@
|
||||
/*
|
||||
* CDE - Common Desktop Environment
|
||||
*
|
||||
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
|
||||
*
|
||||
* These libraries and programs are free software; you can
|
||||
* redistribute them and/or modify them under the terms of the GNU
|
||||
* Lesser General Public License as published by the Free Software
|
||||
* Foundation; either version 2 of the License, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* These libraries and programs are distributed in the hope that
|
||||
* they will be useful, but WITHOUT ANY WARRANTY; without even the
|
||||
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU Lesser General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with these libraries and programs; if not, write
|
||||
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
|
||||
* Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/*
|
||||
* File: connect.h $XConsortium: connect.h /main/3 1995/10/26 15:47:00 rswiston $
|
||||
* Language: C
|
||||
*
|
||||
* (c) Copyright 1988, Hewlett-Packard Company, all rights reserved.
|
||||
*
|
||||
* (c) Copyright 1993, 1994 Hewlett-Packard Company *
|
||||
* (c) Copyright 1993, 1994 International Business Machines Corp. *
|
||||
* (c) Copyright 1993, 1994 Sun Microsystems, Inc. *
|
||||
* (c) Copyright 1993, 1994 Novell, Inc. *
|
||||
*/
|
||||
|
||||
#ifndef _connect_h
|
||||
#define _connect_h
|
||||
|
||||
#if defined(__cplusplus) && defined(__c_callable)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
int XeParseFileString
|
||||
#if defined(__STDC__) || defined(__cplusplus) || defined(c_plusplus)
|
||||
(XeString line, XeString *host_addr, XeString *path_addr);
|
||||
#else
|
||||
();
|
||||
#endif
|
||||
#if defined(__cplusplus) && defined(__c_callable)
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
Take the filespec as a line and return a path the host and path
|
||||
components as separate fields (finds the ':' and replaces it with
|
||||
NULL). THIS FUNCTION MUNGES THE ORIGINAL LINE.
|
||||
*/
|
||||
|
||||
extern XeString XeFindHost
|
||||
#if defined(__STDC__) || defined(__cplusplus) || defined(c_plusplus)
|
||||
(XeString host_spec);
|
||||
#else
|
||||
();
|
||||
#endif
|
||||
|
||||
extern XeString XeFindShortHost
|
||||
#if defined(__STDC__) || defined(__cplusplus) || defined(c_plusplus)
|
||||
(XeString host_spec);
|
||||
#else
|
||||
();
|
||||
#endif
|
||||
/*
|
||||
Returns a host name corresponding to host_spec.
|
||||
|
||||
In all cases a NEW STRING, OWNED BY THE
|
||||
CALLER, is returned. XeFindHost returns the full host specification
|
||||
including domain if there is one. XeFindShortHost does not
|
||||
include the domain. These functions can be used to convert between
|
||||
domain and simple names when needed. The domain names should be
|
||||
used always internally and the simple names only used for display.
|
||||
*/
|
||||
|
||||
extern int Xegethostname
|
||||
#if defined(__STDC__) || defined(__cplusplus) || defined(c_plusplus)
|
||||
(XeString hostname, unsigned int size);
|
||||
#else
|
||||
();
|
||||
#endif
|
||||
|
||||
#if defined(__cplusplus) && defined(__c_callable)
|
||||
extern "C" {
|
||||
#else
|
||||
extern
|
||||
#endif
|
||||
int Xegetshorthostname
|
||||
#if defined(__STDC__) || defined(__cplusplus) || defined(c_plusplus)
|
||||
(XeString hostname, unsigned int size);
|
||||
#else
|
||||
();
|
||||
#endif
|
||||
#if defined(__cplusplus) && defined(__c_callable)
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
Identical to the libc function gethostname, except that Xegethostname
|
||||
returns a full domain qualified name and Xegetshorthostname returns
|
||||
a simple name. These functions are necessary because the system
|
||||
hostname may or may not contain a domain name and the internal
|
||||
representation should always be canonical form (domain qualified).
|
||||
Use Xegethostname except when the name is being used for display
|
||||
purposes only. Storage allocation is identical to gethostname
|
||||
(it copies into the caller's buffer).
|
||||
*/
|
||||
|
||||
#if defined(__cplusplus) && defined(__c_callable)
|
||||
extern "C" {
|
||||
#else
|
||||
extern
|
||||
#endif
|
||||
Boolean XeIsLocalHostP
|
||||
#if defined(__STDC__) || defined(__cplusplus) || defined(c_plusplus)
|
||||
(XeString hostname);
|
||||
#else
|
||||
();
|
||||
#endif
|
||||
#if defined(__cplusplus) && defined(__c_callable)
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
Returns true if the hostname passed in identifies the host on which
|
||||
this function is executed. This is needed in order to handle all
|
||||
combinations of simple and domain-qualified names for either the
|
||||
hostname passed in or the one defined on the local host. Be sure
|
||||
to include Xe.h or provide a local declaration for this function
|
||||
as Boolean is not the same length as int and it won't function
|
||||
correctly without the declaration.
|
||||
*/
|
||||
#if defined(__cplusplus) && defined(__c_callable)
|
||||
extern "C" {
|
||||
#else
|
||||
extern
|
||||
#endif
|
||||
Boolean XeIsSameHostP
|
||||
#if defined(__STDC__) || defined(__cplusplus) || defined(c_plusplus)
|
||||
(XeString host1, XeString host2);
|
||||
#else
|
||||
();
|
||||
#endif
|
||||
#if defined(__cplusplus) && defined(__c_callable)
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
Returns true if host1 and host2 specify the same host. This is
|
||||
needed, because either or both hosts may be specified with or
|
||||
without domain qualifiers, and the correct result must be
|
||||
obtained. This function canonicalizes both and compares them
|
||||
only in canonical form.
|
||||
*/
|
||||
|
||||
extern Boolean XeIsSameHostP
|
||||
#if defined(__STDC__) || defined(__cplusplus) || defined(c_plusplus)
|
||||
(XeString host1, XeString host2);
|
||||
#else
|
||||
();
|
||||
#endif
|
||||
/*
|
||||
Returns true if host1 and host2 specify the same host. This is
|
||||
needed, because either or both hosts may be specified with or
|
||||
without domain qualifiers, and the correct result must be
|
||||
obtained. This function canonicalizes both and compares them
|
||||
only in canonical form.
|
||||
*/
|
||||
|
||||
XeString XeCreateContextString
|
||||
#if defined(__STDC__) || defined(__cplusplus) || defined(c_plusplus)
|
||||
(XeString host, XeString directory, XeString file);
|
||||
#else
|
||||
();
|
||||
#endif
|
||||
/*
|
||||
XeCreateContextString changes the given context into a
|
||||
label which is exactly the same as the one shown in a
|
||||
fileview modeline. A NEW STRING, OWNED BY THE CALLER,
|
||||
is returned.
|
||||
*/
|
||||
|
||||
#define XeEliminateDots(path) (XeString)pathcollapse(path, path, FALSE)
|
||||
/*
|
||||
Removes /./'s and /../ 's from path. THIS ROUTINE OVERWRITES
|
||||
THE path IT WAS PASSED. If there are too many ..'s in path,
|
||||
NULL is returned, so you better keep a pointer to path if you hope
|
||||
to reclaim it. Does not handle host:/path, shell variables or other
|
||||
exotic animals.
|
||||
*/
|
||||
|
||||
int Xechdir
|
||||
#if defined(__STDC__) || defined(__cplusplus) || defined(c_plusplus)
|
||||
(const char *path);
|
||||
#else
|
||||
();
|
||||
#endif
|
||||
/*
|
||||
performs a chdir and caches the new directory in $PWD so that
|
||||
Xegetcwd() can get the current directory without slow stat calls
|
||||
*/
|
||||
|
||||
char *Xegetcwd
|
||||
#if defined(__STDC__) || defined(__cplusplus) || defined(c_plusplus)
|
||||
(char *buf,
|
||||
int size);
|
||||
#else
|
||||
();
|
||||
#endif
|
||||
/*
|
||||
version of getcwd() which uses cached $PWD (or $PWD from shell)
|
||||
if available and calls getcwd only when PWD not set
|
||||
*/
|
||||
|
||||
/* DON'T ADD STUFF AFTER THIS #endif */
|
||||
#endif /* _connect_h */
|
||||
|
||||
@@ -1,45 +0,0 @@
|
||||
/*
|
||||
* CDE - Common Desktop Environment
|
||||
*
|
||||
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
|
||||
*
|
||||
* These libraries and programs are free software; you can
|
||||
* redistribute them and/or modify them under the terms of the GNU
|
||||
* Lesser General Public License as published by the Free Software
|
||||
* Foundation; either version 2 of the License, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* These libraries and programs are distributed in the hope that
|
||||
* they will be useful, but WITHOUT ANY WARRANTY; without even the
|
||||
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU Lesser General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with these libraries and programs; if not, write
|
||||
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
|
||||
* Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/*
|
||||
* File: pathwexp.h $XConsortium: pathwexp.h /main/3 1995/10/26 15:47:18 rswiston $
|
||||
* Language: C
|
||||
*
|
||||
* (c) Copyright 1988, Hewlett-Packard Company, all rights reserved.
|
||||
*
|
||||
* (c) Copyright 1993, 1994 Hewlett-Packard Company *
|
||||
* (c) Copyright 1993, 1994 International Business Machines Corp. *
|
||||
* (c) Copyright 1993, 1994 Sun Microsystems, Inc. *
|
||||
* (c) Copyright 1993, 1994 Novell, Inc. *
|
||||
*/
|
||||
|
||||
#ifndef _pathwexp_h
|
||||
#define _pathwexp_h
|
||||
|
||||
extern XeString Xe_shellexp
|
||||
#if defined(__STDC__) || defined(__cplusplus) || defined(c_plusplus)
|
||||
(XeString path);
|
||||
#else
|
||||
();
|
||||
#endif
|
||||
|
||||
#endif /* _pathwexp_h */
|
||||
@@ -1,294 +0,0 @@
|
||||
/*
|
||||
* CDE - Common Desktop Environment
|
||||
*
|
||||
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
|
||||
*
|
||||
* These libraries and programs are free software; you can
|
||||
* redistribute them and/or modify them under the terms of the GNU
|
||||
* Lesser General Public License as published by the Free Software
|
||||
* Foundation; either version 2 of the License, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* These libraries and programs are distributed in the hope that
|
||||
* they will be useful, but WITHOUT ANY WARRANTY; without even the
|
||||
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU Lesser General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with these libraries and programs; if not, write
|
||||
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
|
||||
* Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/*
|
||||
* File: sbport.h $TOG: sbport.h /main/4 1998/03/16 14:40:52 mgreess $
|
||||
* Language: C
|
||||
*
|
||||
* (c) Copyright 1988, Hewlett-Packard Company, all rights reserved.
|
||||
*
|
||||
* (c) Copyright 1993, 1994 Hewlett-Packard Company *
|
||||
* (c) Copyright 1993, 1994 International Business Machines Corp. *
|
||||
* (c) Copyright 1993, 1994 Sun Microsystems, Inc. *
|
||||
* (c) Copyright 1993, 1994 Novell, Inc. *
|
||||
*/
|
||||
|
||||
#ifndef PORT_H_INCLUDED
|
||||
#define PORT_H_INCLUDED
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
|
||||
The following is a list of #defines that may be tested for in the code:
|
||||
=======================================================================
|
||||
|
||||
__STDC__ - Will be set for ANSI C compilers
|
||||
__cplusplus - Will be set for C++ compilers
|
||||
__STDCPP__ - Will be set for ANSI and C++ compilers
|
||||
|
||||
__hpux - Will be set for HP-UX systems
|
||||
__sun - Will be set for SUN systems
|
||||
__aix - Will be set for IBM (AIX) systems
|
||||
|
||||
__sysv - Set when using SYSV semantics (e.g. HP, SUN)
|
||||
SYSV - Set when __sysv is set (needed for some X11 includes)
|
||||
__bsd - Set when using BSD semantics
|
||||
|
||||
__hp_7_0 - For running on HP-UX 7.0
|
||||
__hp_nls_16 - Set if HP's 16 bit support is to be compiled in
|
||||
__hp_color_object - Set if HP's ColorObject extension is available in the Motif library
|
||||
__hp9000s300 - Set for S300 (and S400?) HP-UX machines
|
||||
__hp9000s800 - Set for S800 (PA-RISC) machines
|
||||
|
||||
__sparc - Set for SUN sparc machines
|
||||
__sun68k - Set for SUN m68k machines
|
||||
|
||||
__identification_strings - Set when RCS header strings are to be in code
|
||||
__recursive_includes - Set to have .h files #includes prerequisite files
|
||||
__char_ptr_yytext - Set if the lex/yacc variable yytext is defined
|
||||
to be of type char[].
|
||||
__unsigned_char_ptr_yytext - Set if the lex/yacc variable yytext is defined
|
||||
to be of type unsigned char[].
|
||||
|
||||
KEEP_DEADWOOD - Currently set to "FALSE". If set to "TRUE",
|
||||
lots of old code and semantics will be enabled.
|
||||
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
|
||||
|
||||
/* First task is to make sure all of the defines that we use in the */
|
||||
/* code are properly set up. */
|
||||
/* ---------------------------------------------------------------- */
|
||||
#if !defined(sun)
|
||||
#if !defined(__STDCPP__) && (defined(__STDC__) || defined(__cplusplus))
|
||||
# define __STDCPP__
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(sun) && !defined(__sun)
|
||||
# define __sun
|
||||
#endif
|
||||
|
||||
#if defined(hpux) && !defined(__hpux)
|
||||
# define __hpux
|
||||
#endif
|
||||
|
||||
#if defined(_AIX) && !defined(__aix)
|
||||
# define __aix
|
||||
# define OSF_MOTIF_1_1_1
|
||||
# define OSF_BUG
|
||||
#endif
|
||||
|
||||
#ifdef __hpux
|
||||
# define __sysv
|
||||
/* __hp9000s300 or __hp9000s800 is defined by HP-UX cpp */
|
||||
# if !defined (__hpux_8_0)
|
||||
# define __hp_7_0
|
||||
# endif
|
||||
# define __hp_nls_16
|
||||
# define __hp_color_object
|
||||
# define __unsigned_char_ptr_yytext
|
||||
#endif /* __hpux */
|
||||
|
||||
#ifdef __sun
|
||||
# if defined(sparc) && !defined(__sparc)
|
||||
# define __sparc
|
||||
# else
|
||||
# if defined(mc68000) || defined(__mc68000)
|
||||
# define __sun68k
|
||||
# endif
|
||||
# endif
|
||||
# define __hp_color_object /* Should only be set if linking with */
|
||||
/* HP's version of Motif (1.1 or later). */
|
||||
# define __char_ptr_yytext
|
||||
# define __c_callable /* Set so VUE can link with libbms. */
|
||||
#endif
|
||||
|
||||
#ifdef __aix
|
||||
# define __sysv
|
||||
#endif
|
||||
|
||||
#if defined(__sysv) && !defined(SYSV)
|
||||
# define SYSV /* Needed for X11 include files */
|
||||
#endif
|
||||
|
||||
#ifndef KEEP_DEADWOOD /* Setting this to "TRUE" will cause */
|
||||
# define KEEP_DEADWOOD FALSE /* all sorts of unknown problems. */
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
#define UNUSED_PARM(_parm)
|
||||
|
||||
#else
|
||||
|
||||
#define UNUSED_PARM(_parm) _parm
|
||||
|
||||
#endif /* __cplusplus */
|
||||
|
||||
/* There are a few things that are not part of XPG3 that we need. */
|
||||
/* sockets are one of them. To use this stuff, we just include the */
|
||||
/* non XOPEN include files and things work. However, there are a */
|
||||
/* few XOPEN include files that have stuff to support this extra */
|
||||
/* functionality (e.g. sockets) that are #ifdef'ed for conditional */
|
||||
/* inclusion with the _XOPEN_SOURCE define. In order to pull those */
|
||||
/* extra types in, we relas the XPG3 compliance for that file. The */
|
||||
/* following are the three areas where we must do this: */
|
||||
/* */
|
||||
/* __need_timeval gets "struct timeval" */
|
||||
/* __need_fd_set gets "typedef struct fd_set {..." */
|
||||
/* __need_S_IF gets "S_IFNWK, S_IFLNK" */
|
||||
/* __need_all_signals gets all SIGxxx values */
|
||||
/* __need_all_errors gets all errno values */
|
||||
/* */
|
||||
/* We get at these declarations differently on each platform... */
|
||||
/* ----------------------------------------------------------------- */
|
||||
|
||||
#if defined(__need_timeval) /* Get "struct timeval" */
|
||||
# if defined(__sun) || defined(__aix)
|
||||
# include <sys/time.h>
|
||||
# endif
|
||||
#endif /* __need_timeval */
|
||||
|
||||
|
||||
#if defined(__need_fd_set) /* Get "typedef struct fd_set" */
|
||||
# ifdef _AIX
|
||||
# include <sys/select.h>
|
||||
# endif
|
||||
#endif /* __need_fd_st */
|
||||
|
||||
/* We also use the following non XPG3 types. However, they may be */
|
||||
/* defined when we relax the XPG3 compliance to get the stuff talked */
|
||||
/* about above. So, declare them only if we don't already have them */
|
||||
/* ----------------------------------------------------------------- */
|
||||
|
||||
#if defined(_HPUX_SOURCE) || defined(__sun) || defined(_INCLUDE_BSD_SOURCE) || defined(__aix) || defined(__linux__)
|
||||
/* the "u_types" are defined in standard files */
|
||||
# undef _INCLUDE_BSD_SOURCE
|
||||
#else
|
||||
typedef unsigned int u_int;
|
||||
typedef unsigned char u_char;
|
||||
typedef unsigned short u_short;
|
||||
typedef unsigned long u_long;
|
||||
#endif
|
||||
|
||||
/* Use these if you must ensure that you get a specific number of bits */
|
||||
/* -------------------------------------------------------------------- */
|
||||
typedef char int8;
|
||||
typedef short int16;
|
||||
typedef long int32;
|
||||
typedef unsigned char u_int8;
|
||||
typedef unsigned short u_int16;
|
||||
typedef unsigned long u_int32;
|
||||
|
||||
#define __xechar_is_signed
|
||||
#undef __xechar_is_unsigned
|
||||
|
||||
#ifdef __xechar_is_signed
|
||||
typedef char XeChar;
|
||||
#else
|
||||
typedef unsigned char XeChar;
|
||||
#endif
|
||||
|
||||
|
||||
/* The following type is a VARIABLE pointer to a VARIABLE XeChar. */
|
||||
|
||||
typedef XeChar *XeString;
|
||||
|
||||
/***********************************************************************
|
||||
* The following type is a VARIABLE pointer to a CONST XeChar.
|
||||
* Thus, ConstXeString p;
|
||||
* p = "abcd"; #Legal
|
||||
* *p = "\0'; #Illegal
|
||||
*
|
||||
* This is NOT the same as (const XeString)
|
||||
* which is equivilent to (XeChar * const)
|
||||
*
|
||||
* Thus, const XeString p;
|
||||
* p = "abcd"; #Illegal
|
||||
* *p = "\0'; #Legal
|
||||
*
|
||||
************************************************************************/
|
||||
|
||||
typedef const XeChar *ConstXeString;
|
||||
|
||||
typedef unsigned short XeChar16;
|
||||
typedef XeChar16 *XeString16;
|
||||
|
||||
#define XeString_NULL (XeString) 0
|
||||
#define XeString_Empty (XeString) ""
|
||||
#define XeChar_NULL (XeChar) 0
|
||||
|
||||
/* XtPointer was added in R4, so define it ourselves in R3 */
|
||||
#ifdef __motif10
|
||||
typedef void * XtPointer;
|
||||
#endif
|
||||
|
||||
|
||||
/* The X11 R4 header file "Intrinsic.h" is internally inconsistent */
|
||||
/* with respect to XtAppAddInput. The third parameter ("condition") */
|
||||
/* is defined to be of type XtPointer (void *), but the input masks */
|
||||
/* commonly used with it are scalar values. Until the problem is */
|
||||
/* corrected by M.I.T, use the following type as a cast in calls */
|
||||
/* to XtAppAddInput. When it is corrected, change this typedef */
|
||||
/* accordingly. */
|
||||
/* ---------------------------------------------------------------- */
|
||||
typedef void * XeInputMask;
|
||||
|
||||
#ifdef __cplusplus
|
||||
/* Define several macros to handle the C++ vs XtOffset problem. */
|
||||
/* The problem is that C++ cannot at compile time evaluate the */
|
||||
/* XtOffset macro within an initializer. XtOffset is most often */
|
||||
/* used within an XtResource array initialization list. */
|
||||
/* class_names must be a typedef, non pointer type. */
|
||||
/* ---------------------------------------------------------------- */
|
||||
|
||||
#define XtOffsetSimpleField(class_name,field) \
|
||||
((Cardinal) &class_name::field - 1)
|
||||
|
||||
#define XtOffsetCompoundField(class_name1,field1,class_name2,field2) \
|
||||
(((Cardinal) &class_name1::field1 - 1) + ((Cardinal) &class_name2::field2 - 1))
|
||||
|
||||
#else
|
||||
#define XtOffsetSimpleField(class_name,field) \
|
||||
((Cardinal) (((char *) (&(((class_name *)NULL)->field))) - ((char *) NULL)))
|
||||
|
||||
#define XtOffsetCompoundField(class_name1,field1,class_name2,field2) \
|
||||
((Cardinal) (((char *) (&(((class_name1 *)NULL)->field1))) - ((char *) NULL))) + \
|
||||
((Cardinal) (((char *) (&(((class_name2 *)NULL)->field2))) - ((char *) NULL)))
|
||||
#endif
|
||||
|
||||
#ifndef __identification_strings
|
||||
#define SUPPRESS_RCS_ID /*forces equivalent action for VED/EDIT shared files*/
|
||||
#endif
|
||||
|
||||
#ifndef SBSTDINC_H_NO_INCLUDE
|
||||
#include <bms/sbstdinc.h>
|
||||
#endif
|
||||
|
||||
#ifdef __aix
|
||||
# undef NULL
|
||||
# define NULL 0 /* AIX uses NULL=(void *)0 */
|
||||
#endif
|
||||
|
||||
#endif /* PORT_H_INCLUDED */
|
||||
|
||||
@@ -1,244 +0,0 @@
|
||||
/*
|
||||
* CDE - Common Desktop Environment
|
||||
*
|
||||
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
|
||||
*
|
||||
* These libraries and programs are free software; you can
|
||||
* redistribute them and/or modify them under the terms of the GNU
|
||||
* Lesser General Public License as published by the Free Software
|
||||
* Foundation; either version 2 of the License, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* These libraries and programs are distributed in the hope that
|
||||
* they will be useful, but WITHOUT ANY WARRANTY; without even the
|
||||
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU Lesser General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with these libraries and programs; if not, write
|
||||
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
|
||||
* Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/*
|
||||
* File: sbstdinc.h $TOG: sbstdinc.h /main/7 1998/07/31 17:50:45 mgreess $
|
||||
* Language: C
|
||||
*
|
||||
* (c) Copyright 1988, Hewlett-Packard Company, all rights reserved.
|
||||
*
|
||||
* (c) Copyright 1993, 1994 Hewlett-Packard Company *
|
||||
* (c) Copyright 1993, 1994 International Business Machines Corp. *
|
||||
* (c) Copyright 1993, 1994 Sun Microsystems, Inc. *
|
||||
* (c) Copyright 1993, 1994 Novell, Inc. *
|
||||
*/
|
||||
|
||||
#ifndef _sbstdinc_h
|
||||
#define _sbstdinc_h
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/param.h>
|
||||
|
||||
#ifdef SVR4
|
||||
#include <netdb.h> /* MAXHOSTNAMELEN */
|
||||
#endif /* SVR4 */
|
||||
|
||||
#ifndef howmany
|
||||
#define howmany(x, y) (((x)+((y)-1))/(y)) /* From <sys/param.h>, but not an XPG3 file */
|
||||
#endif
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
#include <string.h>
|
||||
#include <sys/stat.h>
|
||||
#include <stdio.h>
|
||||
#include <fcntl.h>
|
||||
#include <nl_types.h>
|
||||
|
||||
/************************************************************************/
|
||||
/* Routines not defined in include files (yet). */
|
||||
/************************************************************************/
|
||||
|
||||
/* BSD has bzero(), bcmp(), and bcopy() defined. */
|
||||
#if !defined(__bsd) && !defined(CSRG_BASED)
|
||||
|
||||
#if defined(__STDC__)
|
||||
#if !defined(__linux__) && !defined(_XFUNCS_H_) && !defined(sun)
|
||||
extern void bcopy(char *b1, char *b2, int length);
|
||||
extern int bcmp(char *b1, char *b2, int length);
|
||||
extern void bzero(char *b, int length);
|
||||
#endif
|
||||
|
||||
extern char *mktemp(char *tmplate);
|
||||
#elif ! defined(__cplusplus)
|
||||
#if !defined(__linux__) && !defined(_XFUNCS_H_)
|
||||
extern void bcopy();
|
||||
extern int bcmp();
|
||||
extern void bzero();
|
||||
#endif
|
||||
|
||||
extern char *mktemp();
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#ifndef SBSTDINC_H_NO_REDEFINE /* sbstdinc.c turns this on */
|
||||
|
||||
/************************************************************************/
|
||||
/* Routines from <string.h> */
|
||||
/* --- These always get redefined so we can catch null ptr deref's */
|
||||
/************************************************************************/
|
||||
|
||||
#if defined(__STDC__) || defined(__cplusplus)
|
||||
extern XeString Xestrcat(XeString s1, ConstXeString s2);
|
||||
#else
|
||||
extern XeString Xestrcat();
|
||||
#endif
|
||||
#ifdef strcat
|
||||
# undef strcat
|
||||
#endif
|
||||
#define strcat Xestrcat
|
||||
|
||||
#if defined(__STDC__) || defined(__cplusplus)
|
||||
extern XeString Xestrncat(XeString s1, ConstXeString s2, size_t n);
|
||||
#else
|
||||
extern XeString Xestrncat();
|
||||
#endif
|
||||
#ifdef strncat
|
||||
# undef strncat
|
||||
#endif
|
||||
#define strncat Xestrncat
|
||||
|
||||
#if defined(__STDC__) || defined(__cplusplus)
|
||||
extern int Xestrcmp(ConstXeString s1, ConstXeString s2);
|
||||
#else
|
||||
extern int Xestrcmp();
|
||||
#endif
|
||||
#ifdef strcmp
|
||||
# undef strcmp
|
||||
#endif
|
||||
#define strcmp Xestrcmp
|
||||
|
||||
#if defined(__STDC__) || defined(__cplusplus)
|
||||
extern int Xestrncmp(ConstXeString s1, ConstXeString s2, size_t n);
|
||||
#else
|
||||
extern int Xestrncmp();
|
||||
#endif
|
||||
#ifdef strncmp
|
||||
# undef strncmp
|
||||
#endif
|
||||
#define strncmp Xestrncmp
|
||||
|
||||
#if defined(__STDC__) || defined(__cplusplus)
|
||||
extern XeString Xestrcpy(XeString s1, ConstXeString s2);
|
||||
#else
|
||||
extern XeString Xestrcpy();
|
||||
#endif
|
||||
#ifdef strcpy
|
||||
# undef strcpy
|
||||
#endif
|
||||
#define strcpy Xestrcpy
|
||||
|
||||
#if defined(__STDC__) || defined(__cplusplus)
|
||||
extern XeString Xestrncpy(XeString s1, ConstXeString s2, size_t n);
|
||||
#else
|
||||
extern XeString Xestrncpy();
|
||||
#endif
|
||||
#ifdef strncpy
|
||||
# undef strncpy
|
||||
#endif
|
||||
#define strncpy Xestrncpy
|
||||
|
||||
#if defined(__STDC__) || defined(__cplusplus)
|
||||
extern int Xestrcoll(ConstXeString s1, ConstXeString s2);
|
||||
#else
|
||||
extern int Xestrcoll();
|
||||
#endif
|
||||
#ifdef strcoll
|
||||
# undef strcoll
|
||||
#endif
|
||||
#define strcoll Xestrcoll
|
||||
|
||||
#if defined(__STDC__) || defined(__cplusplus)
|
||||
extern size_t Xestrxfrm(XeString s1, ConstXeString s2, size_t n);
|
||||
#else
|
||||
extern size_t Xestrxfrm();
|
||||
#endif
|
||||
#ifdef strxfrm
|
||||
# undef strxfrm
|
||||
#endif
|
||||
#define strxfrm Xestrxfrm
|
||||
|
||||
#if defined(__STDC__) || defined(__cplusplus)
|
||||
extern XeString Xestrchr(ConstXeString s, int c);
|
||||
#else
|
||||
extern XeString Xestrchr();
|
||||
#endif
|
||||
#ifdef strchr
|
||||
# undef strchr
|
||||
#endif
|
||||
#define strchr Xestrchr
|
||||
|
||||
#if defined(__STDC__) || defined(__cplusplus)
|
||||
extern XeString Xestrpbrk(ConstXeString s1, ConstXeString s2);
|
||||
#else
|
||||
extern XeString Xestrpbrk();
|
||||
#endif
|
||||
#ifdef strpbrk
|
||||
# undef strpbrk
|
||||
#endif
|
||||
#define strpbrk Xestrpbrk
|
||||
|
||||
#if defined(__STDC__) || defined(__cplusplus)
|
||||
extern XeString Xestrrchr(ConstXeString s, int c);
|
||||
#else
|
||||
extern XeString Xestrrchr();
|
||||
#endif
|
||||
#ifdef strrchr
|
||||
# undef strrchr
|
||||
#endif
|
||||
#define strrchr Xestrrchr
|
||||
|
||||
#if defined(__STDC__) || defined(__cplusplus)
|
||||
extern XeString Xestrstr(ConstXeString s1, ConstXeString s2);
|
||||
#else
|
||||
extern XeString Xestrstr();
|
||||
#endif
|
||||
#ifdef strstr
|
||||
# undef strstr
|
||||
#endif
|
||||
#define strstr Xestrstr
|
||||
|
||||
#if defined(__STDC__) || defined(__cplusplus)
|
||||
extern XeString Xestrtok(XeString s1, ConstXeString s2);
|
||||
#else
|
||||
extern XeString Xestrtok();
|
||||
#endif
|
||||
#ifdef strtok
|
||||
# undef strtok
|
||||
#endif
|
||||
#define strtok Xestrtok
|
||||
|
||||
#if defined(__STDC__) || defined(__cplusplus)
|
||||
extern size_t Xestrlen(ConstXeString s);
|
||||
#else
|
||||
extern size_t Xestrlen();
|
||||
#endif
|
||||
#ifdef strlen
|
||||
# undef strlen
|
||||
#endif
|
||||
#define strlen Xestrlen
|
||||
|
||||
#if defined(__STDC__) || defined(__cplusplus)
|
||||
extern XeString Xestrdup(ConstXeString s);
|
||||
#else
|
||||
extern XeString Xestrdup();
|
||||
#endif
|
||||
#ifdef strdup
|
||||
# undef strdup
|
||||
#endif
|
||||
#define strdup Xestrdup
|
||||
|
||||
#endif /* ifndef SBSTDINC_H_NO_REDEFINE */
|
||||
|
||||
#endif /* _sbstdinc_h */
|
||||
@@ -1,162 +0,0 @@
|
||||
/*
|
||||
* CDE - Common Desktop Environment
|
||||
*
|
||||
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
|
||||
*
|
||||
* These libraries and programs are free software; you can
|
||||
* redistribute them and/or modify them under the terms of the GNU
|
||||
* Lesser General Public License as published by the Free Software
|
||||
* Foundation; either version 2 of the License, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* These libraries and programs are distributed in the hope that
|
||||
* they will be useful, but WITHOUT ANY WARRANTY; without even the
|
||||
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU Lesser General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with these libraries and programs; if not, write
|
||||
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
|
||||
* Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/*
|
||||
* File: scoop.h $XConsortium: scoop.h /main/3 1995/10/26 15:48:17 rswiston $
|
||||
* Language: C
|
||||
*
|
||||
* (c) Copyright 1988, Hewlett-Packard Company, all rights reserved.
|
||||
*
|
||||
* (c) Copyright 1993, 1994 Hewlett-Packard Company *
|
||||
* (c) Copyright 1993, 1994 International Business Machines Corp. *
|
||||
* (c) Copyright 1993, 1994 Sun Microsystems, Inc. *
|
||||
* (c) Copyright 1993, 1994 Novell, Inc. *
|
||||
*/
|
||||
|
||||
#ifndef _scoop_h
|
||||
#define _scoop_h
|
||||
|
||||
#ifndef NULL
|
||||
#define NULL 0L
|
||||
#endif
|
||||
|
||||
#ifndef TRUE
|
||||
#define FALSE 0
|
||||
#define TRUE 1
|
||||
#endif /* TRUE */
|
||||
|
||||
#if !defined(__sun)
|
||||
# if (defined(__STDC__) || defined(__STDCPP__) || defined(__cplusplus) || defined(c_plusplus))
|
||||
# define CAT(a,b) a##b
|
||||
# else
|
||||
# define CAT(a,b) a/**/b
|
||||
# endif
|
||||
#else
|
||||
/* Sun C++ compiler uses the non-ansi cpp. */
|
||||
# if defined(__cplusplus)
|
||||
# define CAT(a,b) a/**/b
|
||||
# else
|
||||
# define CAT(a,b) a##b
|
||||
# endif
|
||||
#endif
|
||||
|
||||
|
||||
typedef long OSizeType ;
|
||||
|
||||
typedef struct root_class *root_clasp, *object_clasp ;
|
||||
|
||||
typedef struct object_struct object;
|
||||
|
||||
typedef void (*SC_class_init)(object_clasp);
|
||||
typedef void (*SC_object_init)(object *);
|
||||
typedef object * (*SC_new_obj)(object_clasp);
|
||||
typedef void (*SC_free_obj)(object *);
|
||||
typedef object * (*SC_clone)(object *, object *);
|
||||
|
||||
#define root_class_part \
|
||||
XeString name ; /* class name */ \
|
||||
SC_class_init class_init; /* fn to init my class struct */ \
|
||||
OSizeType object_size ; /* size of object of this class */ \
|
||||
short init ; /* boolean--class initialized state */ \
|
||||
SC_object_init object_init; /* fn to init my object struct */ \
|
||||
SC_new_obj new_obj; /* fn to allocate class objects */ \
|
||||
SC_free_obj free_obj; /* fn to free class objects */ \
|
||||
SC_clone clone; /* `method' to clone an object */ \
|
||||
/* no root private parts */
|
||||
|
||||
#define root_object_part
|
||||
|
||||
struct object_struct
|
||||
{ root_clasp class_ptr;
|
||||
root_object_part
|
||||
};
|
||||
|
||||
struct root_class
|
||||
{ object_clasp base ; /* pointer to base class */
|
||||
root_class_part } ;
|
||||
|
||||
#define memf(vref, fn, arglist) ( (vref class_ptr)->fn arglist)
|
||||
#define memvf0(v,fn) memf(v., fn, (&(v)))
|
||||
#define memvf1(v,fn,a1) memf(v., fn, (&(v),a1))
|
||||
#define memvf2(v,fn,a1,a2) memf(v., fn, (&(v),a1,a2))
|
||||
#define memvf3(v,fn,a1,a2,a3) memf(v., fn, (&(v),a1,a2,a3))
|
||||
#define memvf4(v,fn,a1,a2,a3,a4) memf(v., fn, (&(v),a1,a2,a3,a4))
|
||||
#define memvf5(v,fn,a1,a2,a3,a4,a5) memf(v., fn, (&(v),a1,a2,a3,a4,a5))
|
||||
#define memvf6(v,fn,a1,a2,a3,a4,a5,a6) memf(v., fn, (&(v),a1,a2,a3,a4,a5,a6))
|
||||
#define memvf7(v,fn,a1,a2,a3,a4,a5,a6,a7) \
|
||||
memf(v., fn, (&(v),a1,a2,a3,a4,a5,a6,a7))
|
||||
#define memvf8(v,fn,a1,a2,a3,a4,a5,a6,a7,a8) \
|
||||
memf(v., fn, (&(v),a1,a2,a3,a4,a5,a6,a7,a8))
|
||||
#define memvf9(v,fn,a1,a2,a3,a4,a5,a6,a7,a8,a9) \
|
||||
memf(v., fn, (&(v),a1,a2,a3,a4,a5,a6,a7,a8,a9))
|
||||
#define mempf0(p,fn) memf(p->, fn, (p))
|
||||
#define mempf1(p,fn,a1) memf(p->, fn, (p,a1))
|
||||
#define mempf2(p,fn,a1,a2) memf(p->, fn, (p,a1,a2))
|
||||
#define mempf3(p,fn,a1,a2,a3) memf(p->, fn, (p,a1,a2,a3))
|
||||
#define mempf4(p,fn,a1,a2,a3,a4) memf(p->, fn, (p,a1,a2,a3,a4))
|
||||
#define mempf5(p,fn,a1,a2,a3,a4,a5) memf(p->, fn, (p,a1,a2,a3,a4,a5))
|
||||
#define mempf6(p,fn,a1,a2,a3,a4,a5,a6) memf(p->, fn, (p,a1,a2,a3,a4,a5,a6))
|
||||
#define mempf7(p,fn,a1,a2,a3,a4,a5,a6,a7) \
|
||||
memf(p->, fn, (p,a1,a2,a3,a4,a5,a6,a7))
|
||||
#define mempf8(p,fn,a1,a2,a3,a4,a5,a6,a7,a8) \
|
||||
memf(p->, fn, (p,a1,a2,a3,a4,a5,a6,a7,a8))
|
||||
#define mempf9(p,fn,a1,a2,a3,a4,a5,a6,a7,a8,a9) \
|
||||
memf(p->, fn, (p,a1,a2,a3,a4,a5,a6,a7,a8,a9))
|
||||
|
||||
#define memd(vref, dm) (vref dm)
|
||||
#define base_memf(my_class, fn, arglist) \
|
||||
((*(my_class->base->fn)) arglist)
|
||||
|
||||
#define memfp(vref, fn, arglist) memf (vref, CLASS.fn, arglist)
|
||||
#define memdp(vref, dm) memd (vref, CLASS.dm)
|
||||
|
||||
#define memvs(v, sdm) (*((v.class_ptr)->sdm))
|
||||
#define memps(p, sdm) (*((p->class_ptr)->sdm))
|
||||
#define stat_def(name, type) type *name; type CAT(name,_static) ;
|
||||
#define stat_init(def_class, class_ptr, name) \
|
||||
(class_ptr->name) = &(def_class->CAT(name,_static))
|
||||
|
||||
extern object_clasp root_class ;
|
||||
|
||||
extern void object_destroy
|
||||
#if defined(__STDC__) || defined(__cplusplus) || defined(c_plusplus)
|
||||
(object *p);
|
||||
#else
|
||||
();
|
||||
#endif
|
||||
|
||||
extern object *object_create
|
||||
#if defined(__STDC__) || defined(__cplusplus) || defined(c_plusplus)
|
||||
(object_clasp c);
|
||||
#else
|
||||
();
|
||||
#endif
|
||||
|
||||
extern void object_init
|
||||
#if defined(__STDC__) || defined(__cplusplus) || defined(c_plusplus)
|
||||
(object_clasp c, object *p);
|
||||
#else
|
||||
();
|
||||
#endif
|
||||
|
||||
#endif /* _scoop_h */
|
||||
/* PLACE NOTHING AFTER THIS endif */
|
||||
@@ -1,489 +0,0 @@
|
||||
/*
|
||||
* CDE - Common Desktop Environment
|
||||
*
|
||||
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
|
||||
*
|
||||
* These libraries and programs are free software; you can
|
||||
* redistribute them and/or modify them under the terms of the GNU
|
||||
* Lesser General Public License as published by the Free Software
|
||||
* Foundation; either version 2 of the License, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* These libraries and programs are distributed in the hope that
|
||||
* they will be useful, but WITHOUT ANY WARRANTY; without even the
|
||||
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU Lesser General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with these libraries and programs; if not, write
|
||||
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
|
||||
* Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/*
|
||||
* File: spc.h $XConsortium: spc.h /main/3 1995/10/26 15:48:38 rswiston $
|
||||
* Language: C
|
||||
*
|
||||
* (c) Copyright 1988, Hewlett-Packard Company, all rights reserved.
|
||||
*
|
||||
* (c) Copyright 1993, 1994 Hewlett-Packard Company *
|
||||
* (c) Copyright 1993, 1994 International Business Machines Corp. *
|
||||
* (c) Copyright 1993, 1994 Sun Microsystems, Inc. *
|
||||
* (c) Copyright 1993, 1994 Novell, Inc. *
|
||||
*/
|
||||
|
||||
#ifndef _spc_h
|
||||
#define _spc_h
|
||||
|
||||
/* -------------------------------------------- */
|
||||
/* Requires: */
|
||||
#include <stdio.h>
|
||||
#include <bms/XeUserMsg.h>
|
||||
|
||||
#include <termios.h>
|
||||
|
||||
/* -------------------------------------------- */
|
||||
|
||||
typedef struct _SPC_Channel *SPC_Channel_Ptr;
|
||||
|
||||
typedef struct _XeHostInfo {
|
||||
XeString os;
|
||||
XeString os_ver;
|
||||
XeString hw_arch;
|
||||
} *XeHostInfo;
|
||||
|
||||
extern FILE *SPC_Print_Protocol;
|
||||
extern FILE *spc_logF;
|
||||
extern XeString spc_user_environment_file;
|
||||
|
||||
/* Error returns for SPC routines */
|
||||
|
||||
#define SPC_ERROR FALSE /* Use this value for error checking */
|
||||
|
||||
/*
|
||||
* These are the channel connector definitions
|
||||
*/
|
||||
|
||||
#define STDIN 0
|
||||
#define STDOUT 1
|
||||
#define STDERR 2
|
||||
|
||||
#define MASTER_SIDE 0
|
||||
#define SLAVE_SIDE 1
|
||||
|
||||
/* These are the sub-process notification identifiers */
|
||||
|
||||
#define SPC_PROCESS_STOPPED 1 /* Child process is in background */
|
||||
#define SPC_PROCESS_EXITED 2 /* Child process called exit(cause); */
|
||||
#define SPC_PROCESS_SIGNALLED 3 /* Child process received signal: cause */
|
||||
#define SPC_PROCESS_INTERRUPT 4 /* Child process WAIT was interrupted */
|
||||
#define SPC_PROCESS_DUMPED(a) ((a) & 0200) /* True when core dumped */
|
||||
|
||||
/* This is the maximum size of an SPC I/O Buffer */
|
||||
#define SPC_BUFSIZ 4096
|
||||
|
||||
/*
|
||||
* These macros define the bit field portion of an SPC_IOMode
|
||||
*/
|
||||
|
||||
#define SPCIO_ALL_MASK 0xffffffff
|
||||
|
||||
/* The IO Modes that define the input and output sources */
|
||||
|
||||
#define SPCIO_SOURCE_MASK 0xf
|
||||
#define SPCIO_NOIO 0x0 /* The default - no input/output */
|
||||
#define SPCIO_WRITEONLY 0x1 /* Only write app stdin */
|
||||
#define SPCIO_READONLY 0x2 /* Only read app stdout */
|
||||
#define SPCIO_READWRITE 0x3 /* Read stdout, write stdin */
|
||||
#define SPCIO_ERRORONLY 0x4 /* Only read stderr */
|
||||
#define SPCIO_WRITEERROR 0x5 /* Write stdin, read stderr */
|
||||
#define SPCIO_READERROR 0x6 /* Only read stdout/stderr */
|
||||
#define SPCIO_READWRITEERROR 0x7 /* Full std (in, out, err) */
|
||||
|
||||
/* Use this bit with above IO Mode for splitting stdout and stderr data */
|
||||
|
||||
#define SPCIO_SEPARATEREADERROR 0x8 /* Separate stdout & stderr */
|
||||
|
||||
/* The IO Modes that deal with communication styles (features) */
|
||||
#define SPCIO_STYLE_MASK 0x70
|
||||
#define SPCIO_PTY 0x10 /* Use a PTY */
|
||||
#define SPCIO_PIPE 0x20 /* Use pipe() - no line editing */
|
||||
#define SPCIO_NOIOMODE 0x40 /* Use neither */
|
||||
|
||||
#define SPCIO_LINEEDIT 0x80 /* Valid only with PTY */
|
||||
|
||||
/* Other flags */
|
||||
|
||||
#define SPCIO_SYSTEM 0x100 /* Use system() - Spawns a SHELL */
|
||||
#define SPCIO_LINEORIENTED 0x200 /* Invoke callback on line bounds */
|
||||
/* It is possible to break two byte
|
||||
characters. See note on XeSPCRead. */
|
||||
#define SPCIO_WAIT 0x400 /* Wait for process to finish */
|
||||
#define SPCIO_USE_XTOOLKIT 0x800 /* Use the X toolkit */
|
||||
#define SPCIO_SYNC_TERMINATOR 0x1000 /* Handle termination synchronously */
|
||||
#define SPCIO_USE_LOGFILE 0x2000 /* Use logfile for stderr -- only
|
||||
valid with SPCIO_NOIO */
|
||||
|
||||
#define SPCIO_SIGNAL_PGRP 0x20000 /* Propagate signals to entire process
|
||||
group. */
|
||||
#define SPCIO_FORCE_CONTEXT 0x40000 /* Error on SPC Spawn if context dir
|
||||
is not present */
|
||||
|
||||
/*
|
||||
* Routines
|
||||
*/
|
||||
|
||||
|
||||
/* spc.c */
|
||||
|
||||
|
||||
#if defined(__STDC__) || defined(__cplusplus) || defined(c_plusplus)
|
||||
# define EXTERN_DECL(type, name, arglist) type name arglist
|
||||
# if defined(__cplusplus) && defined(__c_callable)
|
||||
# define EXTERN_C_CALLABLE(type, name, arglist) \
|
||||
extern "C" { type name arglist ; }
|
||||
# else
|
||||
# define EXTERN_C_CALLABLE(type, name, arglist) \
|
||||
EXTERN_DECL(type, name, arglist)
|
||||
# endif
|
||||
#else
|
||||
#ifdef _AIX
|
||||
# define EXTERN_C_CALLABLE(type, name, arglist) \
|
||||
extern type name arglist
|
||||
# define EXTERN_DECL(type, name, arglist) \
|
||||
type name arglist
|
||||
#else /* _AIX */
|
||||
# define EXTERN_DECL(type, name, arglist) name arglist
|
||||
# define EXTERN_C_DECL(type, name, arglist) EXTERN_DECL(type, name, arglist)
|
||||
|
||||
#endif /* (_AIX) */
|
||||
#endif
|
||||
|
||||
EXTERN_C_CALLABLE(SPC_Channel_Ptr, XeSPCOpen, (XeString hostname, int iomode));
|
||||
|
||||
/*
|
||||
Open an SPC channel. Process will run on 'hostname' (or the local
|
||||
host if value is NULL), with the specified iomode.
|
||||
*/
|
||||
|
||||
EXTERN_C_CALLABLE(int, XeSPCClose, (SPC_Channel_Ptr channel));
|
||||
|
||||
/*
|
||||
Close an SPC channel. Closing a channel will automatically deactivate it
|
||||
(meaning that any subprocess associated with the channel is terminated).
|
||||
*/
|
||||
|
||||
EXTERN_DECL(int, XeSPCReset, (SPC_Channel_Ptr channel));
|
||||
|
||||
/*
|
||||
Reset an SPC channel. This will allow it to be used in a subsequent
|
||||
spawn or exec call.
|
||||
*/
|
||||
|
||||
|
||||
EXTERN_DECL(int, XeSPCRead,
|
||||
(SPC_Channel_Ptr channel, int connector,
|
||||
XeString buffer, int length));
|
||||
|
||||
/*
|
||||
Read length characters from an SPC channel into some preallocated buffer.
|
||||
Note that it is possible to split a two-byte character, if the first
|
||||
byte if the character is read in just at buffer[length]. However, the
|
||||
next read will return the second byte (just like Unix read). The
|
||||
'connector' value is either STDOUT or STDERR.
|
||||
*/
|
||||
|
||||
EXTERN_DECL(int, XeSPCWrite,
|
||||
(SPC_Channel_Ptr channel, XeString buffer, int length));
|
||||
|
||||
/*
|
||||
Write length characters from buffer to the standard input of a
|
||||
process on the other side of an SPC channel.
|
||||
*/
|
||||
|
||||
EXTERN_C_CALLABLE(int, XeSPCActive, (SPC_Channel_Ptr channel));
|
||||
|
||||
/*
|
||||
Returns True when channel is active, False otherwise
|
||||
*/
|
||||
|
||||
EXTERN_DECL(int, XeSPCData, (SPC_Channel_Ptr channel));
|
||||
|
||||
/*
|
||||
Returns True when channel be read from, False otherwise
|
||||
*/
|
||||
|
||||
EXTERN_C_CALLABLE(int, XeSPCSpawn,
|
||||
(XeString pathname, XeString context_dir, XeString *argv,
|
||||
XeString *envp, SPC_Channel_Ptr channel));
|
||||
|
||||
/*
|
||||
Spawn an application under SPC
|
||||
*/
|
||||
|
||||
EXTERN_DECL(SPC_Channel_Ptr, XeSPCOpenAndSpawn,
|
||||
(XeString hostname, int iomode, XeString pathname,
|
||||
XeString context_dir, XeString *argv, XeString *envp));
|
||||
|
||||
/*
|
||||
Combine the Open and Spawn channel operations
|
||||
*/
|
||||
|
||||
EXTERN_DECL(int, XeSPCExecuteProcess, (SPC_Channel_Ptr channel));
|
||||
|
||||
/*
|
||||
Restart a new subprocess on a channel
|
||||
*/
|
||||
|
||||
EXTERN_C_CALLABLE(void, XeSPCKillProcesses, (int wait));
|
||||
|
||||
/*
|
||||
Kill all known executing processes (useful for catching SIGTERM, etc)
|
||||
*/
|
||||
|
||||
EXTERN_DECL(int, XeSPCKillProcess, (SPC_Channel_Ptr channel, int wait));
|
||||
|
||||
/*
|
||||
Kill executing process on an SPC channel. 'wait' TRUE means don't
|
||||
return from call until process is completely terminated (including
|
||||
after user specified callbacks are called).
|
||||
*/
|
||||
|
||||
EXTERN_DECL(int, XeSPCInterruptProcess, (SPC_Channel_Ptr channel));
|
||||
|
||||
/*
|
||||
Interrupt executing process on an SPC channel (send SIGINT).
|
||||
*/
|
||||
|
||||
EXTERN_DECL(int, XeSPCSignalProcess, (SPC_Channel_Ptr channel, int sig));
|
||||
|
||||
/*
|
||||
Send an arbitrary signal to executing process on an SPC channel.
|
||||
*/
|
||||
|
||||
typedef
|
||||
EXTERN_DECL(void, (*SbInputHandlerProc),
|
||||
(void *client_data, XeString buf, int nchars, int connector));
|
||||
|
||||
EXTERN_C_CALLABLE(int, XeSPCAddInput,
|
||||
(SPC_Channel_Ptr channel,
|
||||
SbInputHandlerProc handler,
|
||||
void *client_data));
|
||||
|
||||
/*
|
||||
Add an input channel handler
|
||||
*/
|
||||
|
||||
/*
|
||||
* The user input handler takes the following form:
|
||||
*
|
||||
* void UserInputHandler(client_data, text, size, connection)
|
||||
* void * client_data; *** Useful for passing widet destination ***
|
||||
* XeString text; *** The text coming from the SPC channel ***
|
||||
* int size; *** The number of character in passed text ***
|
||||
* int connection; *** The connection where data was received ***
|
||||
* *** (STDOUT or STDERR) ***
|
||||
*/
|
||||
|
||||
typedef
|
||||
EXTERN_DECL(void, (*SPC_TerminateHandlerType),
|
||||
(SPC_Channel_Ptr chan,
|
||||
int pid,
|
||||
int type,
|
||||
int cause,
|
||||
void *Terminate_Data));
|
||||
|
||||
EXTERN_C_CALLABLE(int, XeSPCRegisterTerminator,
|
||||
(SPC_Channel_Ptr channel,
|
||||
SPC_TerminateHandlerType teminator,
|
||||
void * client_data));
|
||||
|
||||
/*
|
||||
Add a termination handler to a channel (called when sub-process dies)
|
||||
*/
|
||||
|
||||
/*
|
||||
* The user termination handler takes the following form:
|
||||
*
|
||||
* void UserTerminator(channel, pid, type, cause, client_data)
|
||||
* SPC_CHannel_ptr channel;
|
||||
* int pid; *** The Process ID of the terminated appl. ***
|
||||
* int type; *** The type of termination (see above) ***
|
||||
* int cause; *** The number associated w/termination ***
|
||||
* void * client_data; *** User specified client data ***
|
||||
*/
|
||||
|
||||
/*
|
||||
* These are the channel access routines
|
||||
*/
|
||||
|
||||
EXTERN_DECL(XeString, XeSPCGetDevice,
|
||||
(SPC_Channel_Ptr channel, int connector, int side));
|
||||
|
||||
/*
|
||||
Return the device name associated with a side of a channel device
|
||||
pair. 'connector' is either STDIN, STDOUT, or STDERR, and 'side' is
|
||||
either MASTER_SIDE or SLAVE_SIDE. This call is valid only in PTY
|
||||
channels.
|
||||
*/
|
||||
|
||||
EXTERN_DECL(int, XeSPCGetProcessStatus,
|
||||
(SPC_Channel_Ptr channel, int *type, int *cause));
|
||||
|
||||
/*
|
||||
Fill in the type and cause of a process termination.
|
||||
*/
|
||||
|
||||
EXTERN_DECL(int, XeSPCAttach, (SPC_Channel_Ptr channel, int pid));
|
||||
|
||||
/*
|
||||
Returns True if a process ID was associated with an SPC channel.
|
||||
*/
|
||||
|
||||
EXTERN_DECL(int, XeSPCDetach, (SPC_Channel_Ptr channel));
|
||||
|
||||
EXTERN_DECL(int, XeSPCGetPID, (SPC_Channel_Ptr channel));
|
||||
|
||||
/*
|
||||
Returns the Process ID of the channel or NULL if none
|
||||
*/
|
||||
|
||||
EXTERN_DECL(int, XeSPCGetLogfile,
|
||||
(SPC_Channel_Ptr channel, XeString *host, XeString *file));
|
||||
|
||||
/*
|
||||
Return the logfile for the channel. If the channel was not opened
|
||||
with SPCIO_USE_LOGFILE specified, it will return NULL. Also note
|
||||
that it returns an XeString *, not an XeString.
|
||||
*/
|
||||
|
||||
EXTERN_DECL(int, XeSPCRemoveLogfile, (SPC_Channel_Ptr channel));
|
||||
|
||||
/*
|
||||
Remove the logfile associated with the channel
|
||||
*/
|
||||
|
||||
/*
|
||||
*
|
||||
* Features currently not implemented:
|
||||
*
|
||||
* SPCIO_WAIT with ptys
|
||||
*
|
||||
* SEPARATEREADERROR with ptys
|
||||
*
|
||||
* Complete error checking. For example, there
|
||||
* are no checks for trying to write to a channel
|
||||
* opened W/O SPCIO_WRITE specified
|
||||
*
|
||||
*/
|
||||
|
||||
EXTERN_DECL(int, XeSPCGetChannelSyncFd, (SPC_Channel_Ptr channel));
|
||||
|
||||
/*
|
||||
Get the file descriptor for checking synchronous termination. This
|
||||
is used for interfacing with event loops.
|
||||
*/
|
||||
|
||||
EXTERN_DECL(SPC_Channel_Ptr, XeSPCHandleTerminator, (int fd));
|
||||
|
||||
/*
|
||||
Handle a synchronous termination condition
|
||||
|
||||
This routine is to be used with the file descriptor returned by
|
||||
XeSPCGetChannelSyncFd. The idea is that one opens a channel using
|
||||
SPCIO_SYNC_TERMINATOR set in the iomode, and then at some point
|
||||
checks for input available on the returned file descriptor (possibly
|
||||
using a select(2) system call). If there is input, it means that
|
||||
some SYNC_TERMINATOR channel had a subprocess die. The program then
|
||||
calls XeSPCHandleTerminator to get the termination handler invoked.
|
||||
IT IS THE RESPONSIBILITY OF THE USER PROGRAM TO EVENTUALLY CALL
|
||||
XeSPCHandleTerminator. IF IT DOES NOT, THE PROGRAM MAY DEADLOCK
|
||||
ITSELF.
|
||||
*/
|
||||
|
||||
|
||||
/* SPC Error handling */
|
||||
|
||||
typedef struct _SPCError { /* An SPC Error message */
|
||||
XeString text; /* The text */
|
||||
XeString format; /* How to format args */
|
||||
XeSeverity severity; /* How bad is it, doc? */
|
||||
char use_errno; /* Whether to use the system errno */
|
||||
} SPCError;
|
||||
|
||||
/* Use this to get the current error number */
|
||||
|
||||
extern int XeSPCErrorNumber;
|
||||
|
||||
EXTERN_DECL(SPCError *, XeSPCLookupError, (int errnum));
|
||||
|
||||
/*
|
||||
Returns the SPCError structure associated with the passed error number or
|
||||
NULL if the passed error number is not a valid SPC error. The
|
||||
error structure returned will be overwritten by a subsequent
|
||||
XeSPCLookupError call.
|
||||
*/
|
||||
|
||||
EXTERN_DECL(void, XeSPCShutdownCallbacks, (void));
|
||||
|
||||
EXTERN_DECL(void, XeSPCRestartCallbacks, (void));
|
||||
|
||||
/* These two routines are used to temporarily suspend SPC callbacks */
|
||||
|
||||
EXTERN_DECL(int, XeSetpgrp, (int read_current_termio));
|
||||
|
||||
/*
|
||||
This routine will do the following:
|
||||
|
||||
1. open /dev/tty
|
||||
2. get the termio information from the file descriptor just opened
|
||||
3. close /dev/tty
|
||||
3. allocate a master / slave pty pair, opening the master side
|
||||
4. set the termio info of the master side to be the result of step 2
|
||||
5. setpgrp
|
||||
6. open the slave side.
|
||||
|
||||
All of this has the effect of making the process which called this
|
||||
routine immune to interrupts, etc., but also passing on the termio
|
||||
characteristics of the original tty.
|
||||
|
||||
If read_current_termio is non-zero, steps 1-3 will NOT be performed, but
|
||||
instead this routine will get the information from the following termio
|
||||
struct:
|
||||
|
||||
*/
|
||||
|
||||
EXTERN_DECL(XeHostInfo, SPC_GetHostinfo, (SPC_Channel_Ptr channel));
|
||||
|
||||
/*
|
||||
Return information about the host (os, os-ver, hw) to which "channel"
|
||||
is currently connected. The return is to a static structure of static
|
||||
strings. Do not modify or free and of them!
|
||||
*/
|
||||
|
||||
/*
|
||||
**
|
||||
** New B.00 functions
|
||||
**
|
||||
*/
|
||||
|
||||
EXTERN_C_CALLABLE(int, XeSPCSendEOF, (SPC_Channel_Ptr channel));
|
||||
|
||||
/*
|
||||
Close the standard input of the process on the other side of the channel
|
||||
*/
|
||||
|
||||
EXTERN_C_CALLABLE(int, XeSPCSetTermio,
|
||||
(SPC_Channel_Ptr channel,
|
||||
int connection,
|
||||
int side,
|
||||
struct termios *termio));
|
||||
|
||||
/*
|
||||
Set the termio value of the PTY associated with 'connection' (STDIN,
|
||||
STDOUT, or STDERR), on 'side' (MASTER_SIDE or SLAVE_SIDE) to the
|
||||
value pointed to by termio. This call must be made before the
|
||||
subprocess is spawned.
|
||||
*/
|
||||
|
||||
#endif /* #ifdef _spc_h */
|
||||
@@ -1,69 +0,0 @@
|
||||
/*
|
||||
* CDE - Common Desktop Environment
|
||||
*
|
||||
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
|
||||
*
|
||||
* These libraries and programs are free software; you can
|
||||
* redistribute them and/or modify them under the terms of the GNU
|
||||
* Lesser General Public License as published by the Free Software
|
||||
* Foundation; either version 2 of the License, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* These libraries and programs are distributed in the hope that
|
||||
* they will be useful, but WITHOUT ANY WARRANTY; without even the
|
||||
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU Lesser General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with these libraries and programs; if not, write
|
||||
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
|
||||
* Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/*
|
||||
* File: stringbuf.h $XConsortium: stringbuf.h /main/3 1995/10/26 15:49:00 rswiston $
|
||||
* Language: C
|
||||
*
|
||||
* (c) Copyright 1988, Hewlett-Packard Company, all rights reserved.
|
||||
*
|
||||
* (c) Copyright 1993, 1994 Hewlett-Packard Company *
|
||||
* (c) Copyright 1993, 1994 International Business Machines Corp. *
|
||||
* (c) Copyright 1993, 1994 Sun Microsystems, Inc. *
|
||||
* (c) Copyright 1993, 1994 Novell, Inc. *
|
||||
*/
|
||||
|
||||
#ifndef _stringbuf_h
|
||||
#define _stringbuf_h
|
||||
|
||||
typedef struct _XeStringBuffer {
|
||||
int last_char; /* index of trailing NULL */
|
||||
int size;
|
||||
int increment; /* how much to expand when more space is needed */
|
||||
XeString buffer;
|
||||
} *XeStringBuffer;
|
||||
|
||||
|
||||
int XeAppendToStringBuffer
|
||||
#if defined(__STDC__) || defined(__cplusplus) || defined(c_plusplus)
|
||||
(XeStringBuffer buffer, XeString string);
|
||||
#else
|
||||
();
|
||||
#endif
|
||||
|
||||
XeStringBuffer XeMakeStringBuffer
|
||||
#if defined(__STDC__) || defined(__cplusplus) || defined(c_plusplus)
|
||||
(int increment_size);
|
||||
#else
|
||||
();
|
||||
#endif
|
||||
|
||||
/* erase the contents (but don't deallocate any space). */
|
||||
void XeClearStringBuffer
|
||||
#if defined(__STDC__) || defined(__cplusplus) || defined(c_plusplus)
|
||||
(XeStringBuffer buffer);
|
||||
#else
|
||||
();
|
||||
#endif
|
||||
|
||||
/*** add nothing after the following endif ***/
|
||||
#endif /* _stringbuf_h */
|
||||
@@ -1,61 +0,0 @@
|
||||
/*
|
||||
* CDE - Common Desktop Environment
|
||||
*
|
||||
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
|
||||
*
|
||||
* These libraries and programs are free software; you can
|
||||
* redistribute them and/or modify them under the terms of the GNU
|
||||
* Lesser General Public License as published by the Free Software
|
||||
* Foundation; either version 2 of the License, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* These libraries and programs are distributed in the hope that
|
||||
* they will be useful, but WITHOUT ANY WARRANTY; without even the
|
||||
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU Lesser General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with these libraries and programs; if not, write
|
||||
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
|
||||
* Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/*
|
||||
* File: usersig.h $XConsortium: usersig.h /main/3 1995/10/26 15:49:19 rswiston $
|
||||
* Language: C
|
||||
*
|
||||
* (c) Copyright 1989, Hewlett-Packard Company, all rights reserved.
|
||||
*
|
||||
* (c) Copyright 1993, 1994 Hewlett-Packard Company *
|
||||
* (c) Copyright 1993, 1994 International Business Machines Corp. *
|
||||
* (c) Copyright 1993, 1994 Sun Microsystems, Inc. *
|
||||
* (c) Copyright 1993, 1994 Novell, Inc. *
|
||||
*/
|
||||
|
||||
#ifndef _usersig_h
|
||||
#define _usersig_h
|
||||
|
||||
/* -------------------------------------------- */
|
||||
/* Requires: */
|
||||
#ifdef __recursive_includes
|
||||
#include <signal.h>
|
||||
#endif
|
||||
/* -------------------------------------------- */
|
||||
|
||||
#define XE_SIG_NOT_IN_TABLE -2
|
||||
|
||||
extern int XeNameToSignal
|
||||
#if defined(__STDC__) || defined(__cplusplus) || defined(c_plusplus)
|
||||
(XeString name);
|
||||
#else
|
||||
();
|
||||
#endif
|
||||
|
||||
extern XeString XeSignalToName
|
||||
#if defined(__STDC__) || defined(__cplusplus) || defined(c_plusplus)
|
||||
(int sig);
|
||||
#else
|
||||
();
|
||||
#endif
|
||||
|
||||
#endif /* _usersig_h */
|
||||
@@ -1,79 +0,0 @@
|
||||
/*
|
||||
* CDE - Common Desktop Environment
|
||||
*
|
||||
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
|
||||
*
|
||||
* These libraries and programs are free software; you can
|
||||
* redistribute them and/or modify them under the terms of the GNU
|
||||
* Lesser General Public License as published by the Free Software
|
||||
* Foundation; either version 2 of the License, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* These libraries and programs are distributed in the hope that
|
||||
* they will be useful, but WITHOUT ANY WARRANTY; without even the
|
||||
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU Lesser General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with these libraries and programs; if not, write
|
||||
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
|
||||
* Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/*
|
||||
* File: boolean.h $XConsortium: boolean.h /main/3 1995/10/26 16:10:48 rswiston $
|
||||
*
|
||||
* (c) Copyright 1993, 1994 Hewlett-Packard Company
|
||||
* (c) Copyright 1993, 1994 International Business Machines Corp.
|
||||
* (c) Copyright 1993, 1994 Sun Microsystems, Inc.
|
||||
* (c) Copyright 1993, 1994 Novell, Inc.
|
||||
*/
|
||||
|
||||
#ifndef __BOOLEAN_H_
|
||||
#define __BOOLEAN_H_
|
||||
|
||||
#if defined(__aix)
|
||||
#undef NULL
|
||||
#define NULL 0
|
||||
#endif
|
||||
|
||||
#if defined(SVR4)
|
||||
#include <sys/types.h>
|
||||
|
||||
#if defined(sun) && defined(_XOPEN_SOURCE)
|
||||
#ifndef B_TRUE
|
||||
#define B_TRUE _B_TRUE
|
||||
#endif
|
||||
#ifndef B_FALSE
|
||||
#define B_FALSE _B_FALSE
|
||||
#endif
|
||||
#endif /* sun && _XOPEN_SOURCE */
|
||||
|
||||
#ifndef boolean
|
||||
typedef boolean_t boolean;
|
||||
#endif
|
||||
|
||||
#ifndef TRUE
|
||||
#define TRUE B_TRUE
|
||||
#endif
|
||||
|
||||
#ifndef FALSE
|
||||
#define FALSE B_FALSE
|
||||
#endif
|
||||
#endif /* SVR4 */
|
||||
|
||||
|
||||
#if !defined(SVR4)
|
||||
#ifndef TRUE
|
||||
#define TRUE 1
|
||||
#endif
|
||||
|
||||
#ifndef FALSE
|
||||
#define FALSE 0
|
||||
#endif
|
||||
|
||||
#ifndef boolean
|
||||
typedef int boolean;
|
||||
#endif
|
||||
#endif /* ! SVR4 */
|
||||
#endif /* __BOOLEAN_H_ */
|
||||
@@ -1,63 +0,0 @@
|
||||
/*
|
||||
* CDE - Common Desktop Environment
|
||||
*
|
||||
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
|
||||
*
|
||||
* These libraries and programs are free software; you can
|
||||
* redistribute them and/or modify them under the terms of the GNU
|
||||
* Lesser General Public License as published by the Free Software
|
||||
* Foundation; either version 2 of the License, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* These libraries and programs are distributed in the hope that
|
||||
* they will be useful, but WITHOUT ANY WARRANTY; without even the
|
||||
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU Lesser General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with these libraries and programs; if not, write
|
||||
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
|
||||
* Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/*
|
||||
* $XConsortium: pathutils.h /main/4 1996/05/08 11:21:09 drk $
|
||||
*
|
||||
* (c) Copyright 1996 Digital Equipment Corporation.
|
||||
* (c) Copyright 1993,1994,1996 Hewlett-Packard Company.
|
||||
* (c) Copyright 1993,1994,1996 International Business Machines Corp.
|
||||
* (c) Copyright 1993,1994,1996 Sun Microsystems, Inc.
|
||||
* (c) Copyright 1993,1994,1996 Novell, Inc.
|
||||
* (c) Copyright 1996 FUJITSU LIMITED.
|
||||
* (c) Copyright 1996 Hitachi.
|
||||
*/
|
||||
|
||||
#ifndef __PATHUTILS_H_
|
||||
#define __PATHUTILS_H_
|
||||
|
||||
#include <stddef.h>
|
||||
#include <codelibs/boolean.h>
|
||||
|
||||
#ifndef MAXPATHLEN
|
||||
#define MAXPATHLEN 1024
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern char *pathcollapse(const char *src,
|
||||
char *dst = NULL,
|
||||
boolean show_dir = FALSE);
|
||||
#elif defined(__STDC__)
|
||||
extern char *pathcollapse(const char *src, char *dst, boolean show_dir);
|
||||
#else /* old-style C */
|
||||
extern char *pathcollapse();
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __PATHUTILS_H_ */
|
||||
@@ -1,56 +0,0 @@
|
||||
/*
|
||||
* CDE - Common Desktop Environment
|
||||
*
|
||||
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
|
||||
*
|
||||
* These libraries and programs are free software; you can
|
||||
* redistribute them and/or modify them under the terms of the GNU
|
||||
* Lesser General Public License as published by the Free Software
|
||||
* Foundation; either version 2 of the License, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* These libraries and programs are distributed in the hope that
|
||||
* they will be useful, but WITHOUT ANY WARRANTY; without even the
|
||||
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU Lesser General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with these libraries and programs; if not, write
|
||||
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
|
||||
* Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/*
|
||||
* File: shellutils.h $XConsortium: shellutils.h /main/3 1995/10/26 16:13:31 rswiston $
|
||||
*
|
||||
* (c) Copyright 1993, 1994 Hewlett-Packard Company
|
||||
* (c) Copyright 1993, 1994 International Business Machines Corp.
|
||||
* (c) Copyright 1993, 1994 Sun Microsystems, Inc.
|
||||
* (c) Copyright 1993, 1994 Novell, Inc.
|
||||
*/
|
||||
|
||||
#ifndef __SHELLUTILS_H_
|
||||
#define __SHELLUTILS_H_
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
char const *const *shellscan(char const *str, int *argc = (int *)0,
|
||||
unsigned opts = 0);
|
||||
}
|
||||
#else
|
||||
extern char **shellscan();
|
||||
#endif
|
||||
|
||||
#define SHX_NOGLOB 0x0001
|
||||
#define SHX_NOTILDE 0x0002
|
||||
#define SHX_NOVARS 0x0004
|
||||
#define SHX_NOQUOTES 0x0008
|
||||
#define SHX_NOSPACE 0x0010
|
||||
#define SHX_NOMETA 0x0020
|
||||
#define SHX_NOCMD 0x0040
|
||||
#define SHX_COMPLETE 0x0080
|
||||
|
||||
#define SHX_NOGRAVE 0x0040 /* Obsolete, use NOCMD */
|
||||
|
||||
#endif /* __SHELLUTILS_H_ */
|
||||
Reference in New Issue
Block a user