2 * CDE - Common Desktop Environment
4 * Copyright (c) 1993-2012, The Open Group. All rights reserved.
6 * These libraries and programs are free software; you can
7 * redistribute them and/or modify them under the terms of the GNU
8 * Lesser General Public License as published by the Free Software
9 * Foundation; either version 2 of the License, or (at your option)
12 * These libraries and programs are distributed in the hope that
13 * they will be useful, but WITHOUT ANY WARRANTY; without even the
14 * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15 * PURPOSE. See the GNU Lesser General Public License for more
18 * You should have received a copy of the GNU Lesser General Public
19 * License along with these librararies and programs; if not, write
20 * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
21 * Floor, Boston, MA 02110-1301 USA
23 /* $XConsortium: scroll.c /main/3 1995/10/31 11:58:41 rswiston $ */
31 #define SAVELOG fclose(TermLog); TermLog = fopen("term.log", "a");
36 void TestScrolling(WinName)
40 int i, NumLines, NumCols;
44 if (CheckTermStatus() == -1)
45 {printf("terminal emulator malfunctioning\n"); DONE(); return;}
46 GetWinSize(&NumLines, &NumCols);
48 sprintf(LogStr, "WINDOW Size Cols: %d Lines: %d \n", NumCols, NumLines);
52 SetScrollType(DECModeSet);
53 SetScrollType(DECModeSave);
54 for (i=0; i < (20*NumLines); i++) {
55 sprintf(Str, "%s%d", "It's in smooth Scroll Mode. is it right", i);
61 SetScrollType(DECModeReset);
62 for (i=0; i < (20*NumLines); i++) {
63 sprintf(Str, "%s%d", "It's in Jump Scroll Mode. is it right", i);
67 SetScrollType(DECModeRestore);
70 for (i=0; i < (20*NumLines); i++) {
71 sprintf(Str, "%s%d", "It's in smooth Scroll Mode. is it right", i);
84 if ((TermLog = fopen("term.log", "a")) == NULL) {
85 if ((TermLog = fopen("term.log", "w")) == NULL)
86 {printf("Logfile could not be opened \n"); exit(-1);}
88 fprintf(TermLog, "**************************************************\n");
90 fprintf(TermLog, "TestName: <%s> STARTS\n", argv[0]);
94 AssignWinName("TermWin", TERM_EMU);
96 TestScrolling("TermWin");
101 fprintf(TermLog, "TestName: <%s> ENDS\n", argv[0]);