Initial import of the CDE 2.1.30 sources from the Open Group.

This commit is contained in:
Peter Howkins
2012-03-10 18:21:40 +00:00
commit 83b6996daa
18978 changed files with 3945623 additions and 0 deletions

View File

@@ -0,0 +1,51 @@
XCOMM $TOG: Imakefile /main/11 1999/02/26 11:29:47 mgreess $
DEFINES = -DCDE_CONFIGURATION_TOP=\"$(CDE_CONFIGURATION_TOP)\" \
-DCDE_INSTALLATION_TOP=\"$(CDE_INSTALLATION_TOP)\"
INCLUDES = -I. -I$(DTHELPSRC)
#ifdef HPArchitecture
EXTRA_DEFINES = -D_XOPEN_SOURCE -D__hpux_8_0 -DFUNCPROTO
#endif
DEPLIBS = $(DEPDTHELPLIB) $(DEPDTSVCLIB) $(DEPTTLIB) $(DEPXLIB)
LOCAL_LIBRARIES = $(DTHELPLIB) $(DTSVCLIB) $(TTLIB) $(XLIB)
DEF_SYSTEM_PATH = DefaultSystemPath:X11ProjectRoot/bin
#if defined(SunArchitecture)
LOCAL_LIBRARIES = $(DTHELPLIB) $(DTSVCLIB) $(TTLIB) \
$(XMLIB) $(XTOOLLIB) $(XLIB)
SYS_LIBRARIES = -lm -ldl -lgen
#endif
#if defined(USLArchitecture)
LOCAL_LIBRARIES = $(DTHELPLIB) $(DTSVCLIB) $(TTLIB) \
$(XMLIB) $(XTOOLLIB) $(XLIB)
SYS_LIBRARIES = -lm -lgen
#endif
#if defined(LinuxArchitecture)
LOCAL_LIBRARIES = $(DTHELPLIB) $(DTSVCLIB) $(TTLIB) \
$(XMLIB) $(XTOOLLIB) $(XLIB)
SYS_LIBRARIES = -lm
#endif
#if defined(UXPArchitecture)
LOCAL_LIBRARIES = $(DTHELPLIB) $(DTSVCLIB) $(TTLIB) \
$(XMLIB) $(XTOOLLIB) $(XLIB)
SYS_LIBRARIES = -lm -lgen
#endif
SRCS = main.c spcd_event.c
OBJS = main.o spcd_event.o
ComplexProgramTarget(dtspcd)
LOCAL_CPP_DEFINES = -DCDE_CONFIGURATION_TOP=$(CDE_CONFIGURATION_TOP) \
-DCDE_INSTALLATION_TOP=$(CDE_INSTALLATION_TOP) \
-DCDE_LOGFILES_TOP=$(CDE_LOGFILES_TOP) \
-DDEF_SYSTEM_PATH=$(DEF_SYSTEM_PATH)
CppFileTarget(dtspcdenv,dtspcdenv.src,$(LOCAL_CPP_DEFINES),)
AllTarget(dtspcdenv)

View File

@@ -0,0 +1,39 @@
XCOMM $TOG: dtspcdenv.src /main/5 1999/02/26 11:30:21 mgreess $
XCOMM #########################################################################
XCOMM
XCOMM dtspcdenv
XCOMM
XCOMM Common Desktop Environment
XCOMM
XCOMM Configuration file for the dtspcd
XCOMM
XCOMM (c) Copyright 1996 Digital Equipment Corporation.
XCOMM (c) Copyright 1993,1994,1996 Hewlett-Packard Company.
XCOMM (c) Copyright 1993,1994,1996 International Business Machines Corp.
XCOMM (c) Copyright 1993,1994,1996 Sun Microsystems, Inc.
XCOMM (c) Copyright 1993,1994,1996 Novell, Inc.
XCOMM (c) Copyright 1996 FUJITSU LIMITED.
XCOMM (c) Copyright 1996 Hitachi.
XCOMM
XCOMM ************** DO NOT EDIT THIS FILE **************
XCOMM
XCOMM CDE_INSTALLATION_TOP/config/dtspcdenv is a factory-default file and will
XCOMM be unconditionally overwritten upon subsequent installations.
XCOMM Before making changes to the file, copy it to its configuration
XCOMM directory, CDE_CONFIGURATION_TOP/config/.
XCOMM
XCOMM ########################################################################
XCOMM
XCOMM Environment variables defined in this file will be propagated
XCOMM to processes started by the CDE Subprocess Control daemon 'dtspcd'.
XCOMM
XCOMM See the man page dtspcdenv(4M) for more information.
XCOMM
XCOMM ########################################################################
PATH=DEF_SYSTEM_PATH:$PATH
XCOMM
XCOMM SHELL is unset so its value in the user's password file
XCOMM on the remote execution host will take precedence.
unset SHELL

1233
cde/programs/dtspcd/main.c Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,6 @@
/* $XConsortium: spc-xt.c /main/3 1995/11/01 11:21:32 rswiston $ */
/*
* File: spc-xt.c
*
* This file is obsolete.
*/

View File

@@ -0,0 +1,111 @@
/*
* File: spcd_event.c $XConsortium: spcd_event.c /main/4 1996/01/15 13:49:32 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. *
*/
#define __need_fd_set
#include <bms/sbport.h> /* NOTE: sbport.h must be the first include. */
#include <SPC/spcP.h>
#include <bms/SbEvent.h>
#include <sys/types.h> /* for fd_set, FD_SET macros, et. al. */
#include <errno.h>
#ifndef __hpux
# define FD_SET_CAST(x) (x)
#else
# define FD_SET_CAST(x) ((int *)(x))
#endif /* __hpux */
struct {SbInputCallbackProc handler; void* data; }
SPCD_input_handlers [FD_SETSIZE],
SPCD_except_handlers[FD_SETSIZE];
int SPCD_max_fd = 1;
fd_set Sb_Input_Mask, Sb_Except_Mask;
SbInputId SPCD_AddInput(int fd, SbInputCallbackProc proc, void* data)
{SPCD_input_handlers[fd].handler = proc;
SPCD_input_handlers[fd].data = data;
FD_SET(fd, &Sb_Input_Mask);
if (SPCD_max_fd < fd) SPCD_max_fd = fd;
return fd; }
SbInputId SPCD_AddException(int fd, SbInputCallbackProc proc, void* data)
{SPCD_except_handlers[fd].handler = proc;
SPCD_except_handlers[fd].data = data;
FD_SET(fd, &Sb_Except_Mask);
if (SPCD_max_fd < fd) SPCD_max_fd = fd;
return fd; }
void SPCD_RemoveInput(SbInputId id)
{FD_CLR(id, &Sb_Input_Mask);
}
void SPCD_RemoveException(SbInputId id)
{FD_CLR(id, &Sb_Except_Mask);
}
void SPCD_MainLoopUntil(Boolean *flag)
{
int fd_vec_size = howmany(SPCD_max_fd, NFDBITS);
fd_set input_mask, except_mask;
int n, fd;
int result;
do {
for (n=0; n<fd_vec_size; n++) {
input_mask.fds_bits[n] = Sb_Input_Mask.fds_bits[n];
except_mask.fds_bits[n] = Sb_Except_Mask.fds_bits[n];
}
do result=select(SPCD_max_fd + 1, FD_SET_CAST(&input_mask),
FD_SET_CAST(NULL),
FD_SET_CAST(&except_mask), NULL);
while(result == -1 && errno==EINTR);
if(result < 0) {
SPC_Error(SPC_Bad_Select);
SPC_Format_Log((XeString)"Exiting server ...");
SPC_Close_Log();
exit (3);
}
/* Modified loop to break after a single hit on the select. This */
/* is necessary because there is nothing which stops the lower */
/* level input handlers from reading the data from a random file */
/* descriptor. If this happens, and the random file descriptor */
/* happens to be one on which this loop detected input, the */
/* process might hang. The solution is therefore to go back to */
/* the select after every input handler call. */
for (fd=0; fd < SPCD_max_fd+1; fd++)
{
SbInputId id = fd;
if(FD_ISSET(fd, &except_mask)) {
(*SPCD_except_handlers[fd].handler)(SPCD_except_handlers[fd].data, &fd, &id);
break;
}
if(FD_ISSET(fd, &input_mask)) {
(*SPCD_input_handlers[fd].handler)(SPCD_input_handlers[fd].data, &fd, &id);
break;
}
}
} while (!*flag);
}
void SPCD_BreakMainLoop(void)
{
/* no need to do anything */
}

View File

@@ -0,0 +1,60 @@
/*
* File: spcd_event.h $XConsortium: spcd_event.h /main/3 1995/11/01 11:22:05 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 _SPCD_event_h
#define _SPCD_event_h
#include <bms/SbEvent.h>
extern SbInputId SPCD_AddInput
#if defined(__STDC__) || defined(__cplusplus) || defined(c_plusplus)
(int fd, SbInputCallbackProc proc, void* data);
#else
();
#endif
extern SbInputId SPCD_AddException
#if defined(__STDC__) || defined(__cplusplus) || defined(c_plusplus)
(int fd, SbInputCallbackProc proc, void* data);
#else
();
#endif
extern void SPCD_RemoveInput
#if defined(__STDC__) || defined(__cplusplus) || defined(c_plusplus)
(SbInputId id);
#else
();
#endif
extern void SPCD_RemoveException
#if defined(__STDC__) || defined(__cplusplus) || defined(c_plusplus)
(SbInputId id);
#else
();
#endif
extern void SPCD_MainLoopUntil
#if defined(__STDC__) || defined(__cplusplus) || defined(c_plusplus)
(Boolean *flag);
#else
();
#endif
extern void SPCD_BreakMainLoop
#if defined(__STDC__) || defined(__cplusplus) || defined(c_plusplus)
(void);
#else
();
#endif
#endif /* _SPCD_event_h */