1
/* @(#)thtest.c 19.1 (ES0-DMD) 02/25/03 14:12:48 */
2
/*===========================================================================
3
Copyright (C) 1995 European Southern Observatory (ESO)
5
This program is free software; you can redistribute it and/or
6
modify it under the terms of the GNU General Public License as
7
published by the Free Software Foundation; either version 2 of
8
the License, or (at your option) any later version.
10
This program is distributed in the hope that it will be useful,
11
but WITHOUT ANY WARRANTY; without even the implied warranty of
12
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
GNU General Public License for more details.
15
You should have received a copy of the GNU General Public
16
License along with this program; if not, write to the Free
17
Software Foundation, Inc., 675 Massachusetss Ave, Cambridge,
20
Corresponding concerning ESO-MIDAS should be addressed as follows:
21
Internet e-mail: midas@eso.org
22
Postal address: European Southern Observatory
23
Data Management Division
24
Karl-Schwarzschild-Strasse 2
25
D 85748 Garching bei Muenchen
27
===========================================================================*/
29
/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
33
.AUTHOR Francois Ochsenbein [ESO-IPG]
35
.COMMENTS Test of th (hierarchical help) routines
36
.ENVIRONMENT TermWindows
37
.VERSION 2.1 (Version '2' of TermWindows)
38
.VERSION 2.2 02-Jul-1987: Merging with TermDisplay.
39
.VERSION 2.3 02-Dec-1987: Usage of WhileInput
40
------------------------------------------------------------*/
52
/*===========================================================================*/
55
.PURPOSE Just test the Help until the Interrupt
66
OpenLog ("thtest.log","Testing TH (Help) facilities");
67
LogLevel (GetOption('t'));
70
if_not (InitWindows(GetTerminalName(), (char *)0, -1)) {
71
fi_puts (2, "****Bad Terminal Initialisation (see Log File)");
75
wd = OpenWindow("Main Dialogue", -3, -40, 3, 40, _NORMAL_,
77
/* _BORDER_|_BORDER2_, 0); */
80
Put(wd, "Hash factor: ");
82
Gets(wd, file, sizeof(file));
89
Put(wd, "Tracing level: ");
90
Gets(wd, file, sizeof(file));
97
status = Gets(wd, file, sizeof(file));
98
if (status < 0) break;
100
if(help = th_init(file, NULL_WINDOW, NULL_WINDOW, NULL_WINDOW))
102
SetAttr(wd, _BOLD_|_BLINK_|_REVERSE_);
104
SetAttr(wd, _NORMAL_);
107
while (status >= 0) {
108
th_help(help, "", 0);
110
Put(wd, "Returned in main program...");
111
status = GetKey(wd, &ch);