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,52 @@
XCOMM $XConsortium: Imakefile /main/8 1996/10/09 14:08:30 drk $
PROGRAMS = Rlogging
INCLUDES = -I. -I$(DTINCLUDESRC)
LOCAL_INCLUDES = -I../shared -I$(TOP)/lib/
SYS_LIBRARIES = -lm
EXTRA_DEFINES = -DLOG -DSYNLIB
#if defined(ApolloArchitecture)
EXTRA_DEFINES = -Dapollo -D_CMDINV
#if defined(SHLIB)
LOCAL_LIBRARIES = -A inlib,$(XLIB)
#endif
#endif
#if defined(SunArchitecture)
SYS_LIBRARIES = -lm -ldl -lgen -lC
SYNLIB=$(TOP)/lib/synlib/libsynlibTst.a
XTST=/usr/openwin/lib/libXtst.a
#endif
#if defined(USLArchitecture)
SYS_LIBRARIES = -lm -ldl -lgen
#endif
#if defined(UXPArchitecture)
SYS_LIBRARIES = -lm -ldl -lgen
#endif
LOCAL_LIBRARIES = ../shared/libtermtest.a $(SYNLIB) $(XTST) $(XEXT) $(XLIB)
SRCS = Rlogging.c
OBJS = Rlogging.o
NormalLibraryObjectRule()
ComplexProgramTarget($(PROGRAMS))
saber_src: $(SRCS)
XCOMM setopt load_flags $(CFLAGS)
XCOMM load $(SRCS) $(LOCAL_LIBRARIES)
unsaber_src:
XCOMM unload $(SRCS)

View File

@@ -0,0 +1,23 @@
/* $XConsortium: README /main/2 1996/07/15 14:22:05 drk $ */
TestName: Rlogging
Description: This program tests the functionality of dtterm with
following resource options set
"logging True",
"logging True ",
"logging True logFile Term.Log",
"logging False logFile Term.Log",
and invokes either one the scripts (test-l, test+l, test-lf)
to verify the functionality
How to run: have two displays, run the program in one pointing to other
display. Also, you have to set the PATH to ../util. (i.e
TOP/cde1/dtterm/tests/util)
commandline: -o dtterm.object

View File

@@ -0,0 +1,129 @@
/* $XConsortium: Rlogging.c /main/3 1995/10/31 11:52:32 rswiston $ */
#include <stdio.h>
#include <math.h>
#include "synvar.h"
#include "common.h"
#ifdef LOG
FILE *TermLog;
#define SAVELOG fclose(TermLog); TermLog = fopen("term.log", "a");
#endif
char LogStr[200];
static char *LogAction[] = {
/*0*/ "Testing Resourse Option:logging True",
/*1*/ "Testing Resourse Option:logging True but in unwritable directory",
/*2*/ "Testing Resourse Option:logging True logFile Term.Log",
/*3*/ "Testing Resourse Option:logging False logFile Term.Log",
};
static char *ResourceArr[] = {
/*0*/ "logging True",
/*1*/ "logging True ",
/*2*/ "logging True logFile Term.Log",
/*3*/ "logging False logFile Term.Log",
};
int MakeResourceFile(ResArr)
char *ResArr;
{
FILE *ResFile;
int i, j, Len;
char Resource[50], Value[50];
if ((ResFile = fopen("res", "w")) == NULL)
{LogError("Resource File Creation fail"); return(-1);}
for (i=0; i < 50; i++) Resource[i] = BLANK;
for (i=0; i < 50; i++) Value[i] = BLANK;
Len = strlen(ResArr); i=0;
while (i < Len) {
j = 0;
while (ResArr[i] != BLANK) Resource[j++] = ResArr[i++];
Resource[j] = NULLCHAR;
i++; j = 0;
while ((ResArr[i] != BLANK) && (ResArr[i] != NULLCHAR))
Value[j++] = ResArr[i++];
Value[j] = NULLCHAR;
i++;
fprintf(ResFile, "%s*%s: %s\n", TERM_EMU, Resource, Value);
}
fclose(ResFile);
}
#define ArrCount (int) (sizeof(ResourceArr) / sizeof(char *))
main(argc, argv)
int argc;
char *argv[];
{
SynStatus Result;
char Command[NEED_LEN];
int i;
#ifdef LOG
if ((TermLog = fopen("term.log", "a")) == NULL) {
if ((TermLog = fopen("term.log", "w")) == NULL)
{printf("Logfile could not be opened \n"); exit(-1);}
}
LogError("****************************************************************************");
LogTime();
sprintf(Command, "TestName: <%s> STARTS\n", argv[0]);
LogError(Command);
#endif
InitTest(argc, argv);
CheckCapsLock();
ExecCommand("mkdir tmplog");
for (i=0; i < ArrCount; i++) {
CheckCapsLock();
ExecCommand("xrdb -load xrdb.out");
MakeResourceFile(ResourceArr[i]);
CheckCapsLock();
ExecCommand("xrdb -merge res"); sleep(5);
CheckCapsLock();
ExecCommand("mv DTtermLog* tmplog"); sleep(1);
ExecCommand("mv Term.Log tmplog"); sleep(1);
if (i == 1) { /* try in un writable directory */
ExecCommand("mkdir unwrite"); sleep(1);
ExecCommand("chmod 555 unwrite"); sleep(1);
ExecCommand("cd unwrite"); sleep(1);
}
LogError(LogAction[i]);
strcpy(Command, TERM_EMU);
CheckCapsLock();
ExecCommand(Command); sleep(1);
if (WaitWinMap("TermWin") < 0) continue;
AssignWinName("TermWin", TERM_EMU);
JustExit("TermWin");
WaitWinUnMap("TermWin", 10L);
switch (i) {
case 0:
ExecCommand("test-l"); break;
case 1:
ExecCommand("test+l"); break;
case 2:
ExecCommand("test-lf"); break;
case 3: ExecCommand("test+l"); break;
}
if (i == 1) {
ExecCommand("cd ..");
ExecCommand("rmdir unwrite");
}
sleep(2);
}
ExecCommand("mv tmplog/DTtermLog* ."); sleep(1);
ExecCommand("mv tmplog/Term.Log ."); sleep(1);
ExecCommand("rmdir tmplog");
CheckCapsLock();
ExecCommand("xrdb -load xrdb.out");
CloseTest(False);
#ifdef LOG
sprintf(Command, "TestName: <%s> ENDS\n", argv[0]);
LogError(Command);
LogError("****************************************************************************");
fclose(TermLog);
#endif
}