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,62 @@
XCOMM $XConsortium: Imakefile /main/9 1996/10/09 14:11:04 drk $
INCLUDES = -I. -I$(DTINCLUDESRC)
LOCAL_INCLUDES = -I../shared -I$(TOP)/lib/
SYS_LIBRARIES = -lm
EXTRA_DEFINES = -DLOG -DSYNLIB
#ifdef HPArchitecture
EXTRA_DEFINES = -DLOG -DSYNLIB
#endif
#if defined(HPOSFArchitecture)
#endif
#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 = $(XTST) $(XEXT) $(XLIB)
PROGRAMS = $(PROG1) $(PROG2) $(PROG3)
PROG1 = printlines
SRCS1 = printlines.c
OBJS1 = printlines.o
PROG2 = termget
SRCS2 = termget.c
OBJS2 = termget.o
PROG3 = wait5write
SRCS3 = wait5write.c
OBJS3 = wait5write.o
ComplexProgramTarget_1($(PROG1),$(LOCAL_LIBRARIES),)
ComplexProgramTarget_2($(PROG2),$(LOCAL_LIBRARIES),)
ComplexProgramTarget_3($(PROG3),$(LOCAL_LIBRARIES),)
saber_src: $(SRCS)
XCOMM setopt load_flags $(CFLAGS)
XCOMM load $(SRCS) $(LOCAL_LIBRARIES)
unsaber_src:
XCOMM unload $(SRCS)

View File

@@ -0,0 +1,3 @@
/* $XConsortium: README /main/2 1996/07/15 14:30:36 drk $ */

View File

@@ -0,0 +1,13 @@
/* $XConsortium: printlines.c /main/3 1995/10/31 12:02:59 rswiston $ */
#include <stdio.h>
main(argc, argv)
int argc;
char *argv[];
{
int i;
for (i=0; i < 100; i++)
printf("Testing SaveLines: This line number is %d \n", i);
}

View File

@@ -0,0 +1,48 @@
/* $XConsortium: termget.c /main/3 1995/10/31 12:03:12 rswiston $ */
#include <stdio.h>
#include <fcntl.h>
#include <sys/termios.h>
FILE *Ptr;
LogError(Str)
char *Str;
{
fprintf(Ptr, "%s \n", Str);
}
main()
{
int FilePtr, i, Error=0;
struct termios termio_orig;
Ptr = fopen("term.log", "a");
if ((FilePtr = open("/dev/tty", O_RDWR)) < 0)
{LogError("Could not open tty "); exit(-1);}
if(tcgetattr(FilePtr, &termio_orig) < 0)
{LogError("tcgetattr failed "); exit(-1);}
if (termio_orig.c_cc[VINTR] != '!')
{LogError("intr not set"); Error = 1;}
if (termio_orig.c_cc[VQUIT] != '@')
{LogError("quit not set"); Error = 1;}
if (termio_orig.c_cc[VERASE] != '#')
{LogError("erase not set"); Error = 1;}
if (termio_orig.c_cc[VKILL] != '$')
{LogError("kill not set"); Error = 1;}
if (termio_orig.c_cc[VEOF] != '%')
{LogError("eof not set"); Error = 1;}
if (termio_orig.c_cc[VEOL] != '^')
{LogError("eol not set"); Error = 1;}
if (termio_orig.c_cc[VSWTCH] != '&')
{LogError("swtch not set"); Error = 1;}
if (termio_orig.c_cc[VSTART] != '*')
{LogError("start not set"); Error = 1;}
if (termio_orig.c_cc[VSTOP] != '(')
{LogError("stop not set"); Error = 1;}
if (termio_orig.c_cc[VSUSP] != ')')
{LogError("susp not set"); Error = 1;}
if (Error == 1) LogError("Test Failed");
else LogError("Test Passed");
fclose(Ptr);
}

View File

@@ -0,0 +1,17 @@
TESTDIR=.
expect=${TESTDIR}/TermLog
actual=${TESTDIR}/HptermLog*
errlog=${TESTDIR}/term.log
if cmp -s ${expect} ${actual}
then
echo "Test Failed - Logfile created" >> ${errlog}
echo "" >> ${errlog}
else
echo "Logfile is not created and test is success" >> ${errlog}
echo "" >> ${errlog}
fi

View File

@@ -0,0 +1,39 @@
# this is a -ve test; change it to a positive test; assumes path is
# set to /users/vels/bin:/usr/bin/X11 (basic thing needed for executing
# this test) ; if == /users/vels/bin:/usr/bin/X11 it has not executed
# login shell
TESTDIR=.
expect=${TESTDIR}/shell.emu
actual=${TESTDIR}/shell.log
errlog=${TESTDIR}/term.log
path=$PATH
path=$PATH
echo "Path:" >> ${errlog}
echo ${path} >> ${errlog}
if [ ${path} != "/users/vels/bin:/usr/bin/X11:/bin" ]
then
echo "Test Failed - executed login shell" >> ${errlog}
echo "" >> ${errlog}
else
echo "Did not execute login shell and test is success" >> ${errlog}
echo "" >> ${errlog}
fi
#addtional test
#if cmp -s ${expect} ${actual}
#then
# echo "Test success - executed emu_shellu as SHELL" >> ${errlog}
# echo "" >> ${errlog}
#else
# echo "did not execute emu_shell as SHELL; and test is failure" >> ${errlog}
# diff ${expect} ${actual} 2>>${errlog}
# echo "" >> ${errlog}
#fi

View File

@@ -0,0 +1,18 @@
TESTDIR=.
expect=${TESTDIR}/TermLog
actual=${TESTDIR}/HptermLog*
errlog=${TESTDIR}/term.log
if cmp -s ${expect} ${actual}
then
echo "Logfile created and test is success" >> ${errlog}
echo "" >> ${errlog}
else
echo "Test Failed" >> ${errlog}
diff ${expect} ${actual} 2>>${errlog}
echo "" >> ${errlog}
fi

View File

@@ -0,0 +1,18 @@
TESTDIR=.
expect=${TESTDIR}/TermLog
actual=${TESTDIR}/Term.Log
errlog=${TESTDIR}/term.log
if cmp -s ${expect} ${actual}
then
echo "Logfile created and test is success" >> ${errlog}
echo "" >> ${errlog}
else
echo "Test Failed" >> ${errlog}
diff ${expect} ${actual} 2>>${errlog}
echo "" >> ${errlog}
fi

View File

@@ -0,0 +1,37 @@
# this is a -ve test; change it to a positive test; assumes path is
# set to /users/vels/bin:/usr/bin/X11 (basic thing needed for executing
# this test) ; if == /users/vels/bin:/usr/bin/X11 it has not executed
# login shell
TESTDIR=.
expect=${TESTDIR}/shell.emu
actual=${TESTDIR}/shell.log
errlog=${TESTDIR}/term.log
path=$PATH
echo "Path:" >> ${errlog}
echo ${path} >> ${errlog}
if [ ${path} != "/users/vels/bin:/usr/bin/X11:/bin" ]
then
echo "Test Success - executed login shell" >> ${errlog}
echo "" >> ${errlog}
else
echo "Test Fail: Did not execute login shell " >> ${errlog}
echo "" >> ${errlog}
fi
#addtional test
#if cmp -s ${expect} ${actual}
#then
# echo "Test success - executed emu_shellu as SHELL" >> ${errlog}
# echo "" >> ${errlog}
#else
# echo "did not execute emu_shell as SHELL; and test is failure" >> ${errlog}
# diff ${expect} ${actual} 2>>${errlog}
# echo "" >> ${errlog}
#fi

View File

@@ -0,0 +1,8 @@
/* $XConsortium: wait5write.c /main/3 1995/10/31 12:03:26 rswiston $ */
main()
{
int i;
sleep(5);
printf("xyz");
scanf("%d", &i);
}