1
/*===========================================================================
2
Copyright (C) 1995-2007 European Southern Observatory (ESO)
4
This program is free software; you can redistribute it and/or
5
modify it under the terms of the GNU General Public License as
6
published by the Free Software Foundation; either version 2 of
7
the License, or (at your option) any later version.
9
This program is distributed in the hope that it will be useful,
10
but WITHOUT ANY WARRANTY; without even the implied warranty of
11
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
GNU General Public License for more details.
14
You should have received a copy of the GNU General Public
15
License along with this program; if not, write to the Free
16
Software Foundation, Inc., 675 Massachusetts Ave, Cambridge,
19
Correspondence concerning ESO-MIDAS should be addressed as follows:
20
Internet e-mail: midas@eso.org
21
Postal address: European Southern Observatory
22
Data Management Division
23
Karl-Schwarzschild-Strasse 2
24
D 85748 Garching bei Muenchen
26
===========================================================================*/
28
/*+++++++++++++++++++++++++++ SC interface module SCE +++++++++++++++++++++++
30
.IDENTIFICATION Module SCE
31
.AUTHOR K. Banse ESO - Garching
32
.KEYWORDS standard interfaces, errors
33
.ENVIRONMENT VMS and UNIX
40
----------------------------------------------------------------------------*/
52
int SCECNT(action,cont,log,disp)
54
/*+++++++++++++++++++++++++++++++++++++++++++++++++++
56
implement the C-version of the module ERRCNTRL_ST
61
--------------------------------------------------------*/
63
char *action /* IN : GET or PUT */;
64
int *cont /* IN : pointer to continuation flag */;
65
int *log /* IN : pointer to log flag */;
66
int *disp /* IN : pointer to display flag */;
71
if ((*action == 'G') || (*action == 'g')) /* get ERRO flags */
78
else /* put ERRO flags */
92
void SCETER(myerrno,text)
94
/*+++++++++++++++++++++++++++++++++++++++++++++++++++
96
put error no. 'myerrno' into key PROGSTAT + stop execution
101
--------------------------------------------------------*/
103
int myerrno /* IN: error no. */;
104
char *text /* IN: message to display */;
113
if (KIWORDS[OFF_ERROR+3] != 0)
115
MID_ERROR("APP",text,myerrno,1);
116
SCTMES(M_RED_COLOR,text); /* display + log error message */
119
MID_ERROR("APP",text,myerrno,0);
122
memset((void *)mytext,32,(size_t)80); /* int 32 = ' ' */
123
(void) memcpy(mytext,text,(size_t)strlen(text));
125
(void) SCKWRC("MID$ERRMESS",1,mytext,1,80,&unit);
127
MID_ABORT(myerrno,100); /* and disappear like anybody else... */