~ubuntu-branches/debian/jessie/eso-midas/jessie

« back to all changes in this revision

Viewing changes to util/help/helpmidas.c

  • Committer: Package Import Robot
  • Author(s): Ole Streicher
  • Date: 2014-04-22 14:44:58 UTC
  • Revision ID: package-import@ubuntu.com-20140422144458-okiwi1assxkkiz39
Tags: upstream-13.09pl1.2+dfsg
ImportĀ upstreamĀ versionĀ 13.09pl1.2+dfsg

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* @(#)helpmidas.c      19.1 (ES0-DMD) 02/25/03 14:36:06 */
 
2
/*===========================================================================
 
3
  Copyright (C) 1995 European Southern Observatory (ESO)
 
4
 
 
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.
 
9
 
 
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.
 
14
 
 
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, 
 
18
  MA 02139, USA.
 
19
 
 
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 
 
26
                        GERMANY
 
27
===========================================================================*/
 
28
 
 
29
/* @(#)helpmidas.c      19.1 (ES0-DMD) 02/25/03 14:36:06 */
 
30
/*===========================================================================
 
31
  Copyright (C) 1995 European Southern Observatory (ESO)
 
32
 
 
33
  This program is free software; you can redistribute it and/or 
 
34
  modify it under the terms of the GNU General Public License as 
 
35
  published by the Free Software Foundation; either version 2 of 
 
36
  the License, or (at your option) any later version.
 
37
 
 
38
  This program is distributed in the hope that it will be useful,
 
39
  but WITHOUT ANY WARRANTY; without even the implied warranty of
 
40
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
41
  GNU General Public License for more details.
 
42
 
 
43
  You should have received a copy of the GNU General Public 
 
44
  License along with this program; if not, write to the Free 
 
45
  Software Foundation, Inc., 675 Massachusetss Ave, Cambridge, 
 
46
  MA 02139, USA.
 
47
 
 
48
  Corresponding concerning ESO-MIDAS should be addressed as follows:
 
49
        Internet e-mail: midas@eso.org
 
50
        Postal address: European Southern Observatory
 
51
                        Data Management Division 
 
52
                        Karl-Schwarzschild-Strasse 2
 
53
                        D 85748 Garching bei Muenchen 
 
54
                        GERMANY
 
55
===========================================================================*/
 
56
 
 
57
/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 
58
.TYPE           Program
 
59
.NAME           thtest.c
 
60
.LANGUAGE       C
 
61
.AUTHOR         Francois Ochsenbein [ESO-IPG]
 
62
.CATEGORY       Help 
 
63
.COMMENTS       Test of th (hierarchical help) routines
 
64
.ENVIRONMENT    TermWindows
 
65
.VERSION  2.1   (Version '2' of TermWindows)
 
66
.VERSION  2.2   02-Jul-1987: Merging with TermDisplay.
 
67
.VERSION  2.3   02-Dec-1987: Usage of WhileInput
 
68
------------------------------------------------------------*/
 
69
 
 
70
#define PM_LEVEL        2
 
71
 
 
72
#include <twhelp.h>
 
73
#include <trace.h>
 
74
#include <macrogen.h>
 
75
#include <pgm.h>
 
76
 
 
77
static TWHELP *help;
 
78
 
 
79
 
 
80
int mymath(str, len)
 
81
/*+++++++
 
82
.PURPOSE Just output $ _ ^
 
83
.RETURNS 
 
84
--------*/
 
85
        char *str;      /* IN: Math. symbol */
 
86
        int  len;       /* IN: Length */
 
87
{
 
88
  return(tx_out(str, len));
 
89
}
 
90
 
 
91
/*===========================================================================*/
 
92
PGM(thtest)
 
93
/*+++++++
 
94
.PURPOSE Just test the Help until the Interrupt
 
95
.RETURNS 
 
96
--------*/
 
97
{
 
98
        int     status;
 
99
        char    ch, *logfile, *hfile;
 
100
        static  char file[40];
 
101
 
 
102
  SaveParms();
 
103
  
 
104
  logfile = GetParmString("-log=");
 
105
  if (logfile)  OpenLog (logfile,"Testing TH (Help) facilities"); 
 
106
 
 
107
  if_not (InitWindows(GetTerminalName(), (char *)0, -1)) {
 
108
        fi_puts (2, "****Bad Terminal Initialisation (see Log File)");
 
109
        return;
 
110
  }
 
111
 
 
112
  hfile = GetNextParm();
 
113
  if (!hfile)   hfile = "midas.ind";    /* Head file with indexes */
 
114
  help = InitHelp(hfile, NULL_WINDOW, NULL_WINDOW, NULL_WINDOW) ;
 
115
  hfile = "echelle/midas.ind";          /* Special Context      */
 
116
  AddHelp(help, hfile);
 
117
 
 
118
  SetHelpTitleOption(help, 1);          /* Use title from Help File     */
 
119
  
 
120
                /* Tell that / are used as topic separators */
 
121
        SetHelpSeparators(" /");
 
122
                /* Define what to do in case of Math. Symbols */
 
123
        tx_math(mymath);
 
124
 
 
125
        Help(help);
 
126
  
 
127
  EndWindows();
 
128
  return;
 
129
}