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,58 @@
XCOMM $XConsortium: Imakefile /main/8 1996/10/09 14:10:56 drk $
PROGRAMS = tabctrl
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 = ../shared/libtermtest.a $(SYNLIB) $(XTST) $(XEXT) $(XLIB)
SRCS = tabctrl.c
OBJS = tabctrl.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,21 @@
/* $XConsortium: README /main/2 1996/07/15 14:29:56 drk $ */
TestName: tabctrl
Description: This program tests the tab functionality of dtterm.
The following escape sequences are tested
"\033[g"
"\033[3g"
"\033H"
and recordes or compares the image. the result of the test
is logged in file term.log
How to run: invoke dtterm and run the program with any of the following
option
commandline: -o dtterm.object
-o dtterm.object -r -save (for recording)
-o dtterm.object -compare -save (for comparing)

View File

@@ -0,0 +1,127 @@
/* $XConsortium: tabctrl.c /main/3 1995/10/31 12:02:15 rswiston $ */
#include <stdio.h>
#include "synvar.h"
#ifdef LOG
FILE *TermLog;
#define SAVELOG fclose(TermLog); TermLog = fopen("term.log", "a");
#endif
char LogStr[200];
#define BELL 007
#define BACKSPACE 010
#define HORI_TAB 011
#define NEWLINE 012
#define VERTI_TAB 013
#define NEWPAGE 014
#define CARRI_RET 015
void TestTabCtrl(WinName)
char *WinName;
{
int i,j,k, l, Lines, Cols, TabSpace, TabCount;
char Str[IMAGE_FILE_LEN];
START(1, 0, 0, 0, 0);
TabSpace = 5; /* how to take parameter */
if (CheckTermStatus() == -1)
{printf("terminal emulator malfunctioning\n"); exit(-1);}
ClearScreen();
GetWinSize(&Lines, &Cols);
#ifdef DEBUG
fprintf(TermLog, "WINDOW Size Cols: %d Lines: %d \n", Cols, Lines);
SAVELOG;
#endif
ClearAllTabs();
HomeUp();
SetTab();
TabCount = (Cols / TabSpace);
if ((Cols % TabSpace) == 0) TabCount -= 1;
for (i=0; i < TabCount; i++)
{CursorForward(TabSpace); SetTab();}
HomeUp();
for (k=0; k < Lines; k++) {
for (j=0; j < TabCount; j++) {
sprintf(Str, "*%c", HORI_TAB); WRITETEST(Str);
#ifdef SLOW
sleep(1);
#endif
for (l=0; l < TabSpace-1; l++) {
sprintf(Str, "%c", BACKSPACE); WRITETEST(Str);
#ifdef SLOW
sleep(1);
#endif
}
for (l=0; l < TabSpace-1; l++)
{sprintf(Str, "-");WRITETEST(Str);}
}
sprintf(Str, "*");WRITETEST(Str);
for (l=0; l < ((Cols-1) % TabSpace); l++)
{sprintf(Str, "-"); WRITETEST(Str);}
if (k < (Lines -1)) {
switch ((k % 3)) {
case 0: sprintf(Str, "%c", NEWLINE); WRITETEST(Str); break;
case 1: sprintf(Str, "%c%c", CARRI_RET, VERTI_TAB); WRITETEST(Str);
break;
case 2: sprintf(Str, "%c%c", CARRI_RET, NEWPAGE); WRITETEST(Str);
break;
}
}
}
#ifdef SYNLIB
sprintf(Str, "%stabctrl1", IMAGE_DIR);
MatchWindows(WinName, Str);
#endif
HomeUp();
for (j=0; j < TabCount; j++)
{sprintf(Str, "%c", HORI_TAB); WRITETEST(Str); ClearCurTab();}
HomeUp(); ClearScreen();
for (k=0; k < Lines; k++) {
sprintf(Str, "*%c", HORI_TAB); WRITETEST(Str);
sprintf(Str, "%c", NEWLINE); WRITETEST(Str);
}
#ifdef SYNLIB
sprintf(Str, "%stabctrl2", IMAGE_DIR);
MatchWindows(WinName, Str);
#endif
HomeUp(); TabSpace = 8;
TabCount = (Cols / TabSpace);
if ((Cols % TabSpace) == 0) TabCount -= 1;
for (i=0; i < TabCount; i++)
{CursorForward(TabSpace); SetTab();}
DONE();
}
main(argc, argv)
int argc;
char *argv[];
{
#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);}
}
fprintf(TermLog, "**************************************************\n");
LogTime();
fprintf(TermLog, "TestName: <%s> STARTS\n", argv[0]);
#endif
#ifdef SYNLIB
InitTest(argc, argv);
AssignWinName("TermWin", TERM_EMU);
#endif
TestTabCtrl("TermWin");
#ifdef SYNLIB
CloseTest(False);
#endif
#ifdef LOG
fprintf(TermLog, "TestName: <%s> ENDS\n", argv[0]);
fclose(TermLog);
#endif
}