1
/* @(#)stka.fc 19.1 (ES0-DMD) 02/25/03 13:54:15 */
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
/*++++++++++++++++++++++++ STKA.FC +++++++++++++++++++++++++++++++++++++++
31
.IDENTIFICATION Module STKA.FC
33
Module contains layer between the keyword related FORTRAN STxxxx interfaces
34
and the SC_interfaces written in (hopefully independent) C
35
.AUTHOR K. Banse ESO - Garching
36
.KEYWORDS standard interfaces.
37
.ENVIRONMENT FORTRAN and C standards
38
.VERSION [1.00] 871207: created from SXFTOC.C
39
.VERSION [2.60] 880411: modified new version - the last one
40
.VERSION [2.70] 900316: fix problems with TEXT_LEN+2
41
.VERSION [2.80] 920210: split up sck.fc into sck.fc + scka.fc
42
-----------------------------------------------------------------------------*/
46
#include <midas_def.h>
49
SUBROUTINE STKFND(key,type,noelem,bytelem,status)
50
CHARACTER key; /* IN: keyword name */
51
CHARACTER type; /* OUT: type of key - I, R, C, D or ' ' */
52
fint2c *noelem; /* OUT: no. of elements */
53
fint2c *bytelem; /* OUT: no. of bytes per element */
56
*status = SCKFND(STRIPPED_STRING(key),CHAR_LOC(type),noelem,bytelem);
60
SUBROUTINE STKINF(npos,field,buf,numbuf,status)
61
fint2c *npos; /* IN : position of keyword */
62
fint2c *field; /* IN :specifies desired info, */
63
/* 1 = NAME, 2 = TYPE, 3 = SIZE */
64
CHARACTER buf; /* OUT : buffer for NAME + TYPE info */
65
fint2c *numbuf; /* IN : max. length of buffer above */
68
*status = SCKINF(*npos,*field,CHAR_LOC(buf),KEYNAME_LEN,numbuf);
72
SUBROUTINE STKPRC(prompt,key,noelm,felem,maxvals,actvals,values,
74
CHARACTER prompt; /* IN : prompt string (null terminated) */
75
CHARACTER key; /* IN : name of keyword */
76
fint2c *noelm; /* IN : for character array, CHAR*noelm */
77
fint2c *felem; /* IN : 1st data item to be read */
78
fint2c *maxvals; /* IN : no. of elements to get */
79
fint2c *actvals; /* OUT: actual no. of elements returned */
80
CHARACTER values; /* OUT: buffer for data values */
81
fint2c *kunit; /* OUT: address of unit-pointer */
82
fint2c *knull; /* OUT: no. of null values in keyword */
85
*status = SCKPRC(STRIPPED_STRING(prompt),STRIPPED_STRING(key),
86
*noelm,*felem,*maxvals,actvals,
87
CHAR_LOC(values),kunit,knull);
91
SUBROUTINE STKPRD(prompt,key,felem,maxvals,actvals,values,kunit,knull,status)
92
CHARACTER prompt; /* IN : prompt string (null terminated) */
93
CHARACTER key; /* IN : name of keyword */
94
fint2c *felem; /* IN : 1st data item to be read */
95
fint2c *maxvals; /* IN : no. of elements to get */
96
fint2c *actvals; /* OUT: actual no. of elements returned */
97
double *values; /* OUT: buffer for data values */
98
fint2c *kunit; /* OUT: address of unit-pointer */
99
fint2c *knull; /* OUT: no. of null values in keyword */
102
*status = SCKPRD(STRIPPED_STRING(prompt),STRIPPED_STRING(key),
103
*felem,*maxvals,actvals,values,kunit,knull);
107
SUBROUTINE STKPRI(prompt,key,felem,maxvals,actvals,values,kunit,knull,status)
108
CHARACTER prompt; /* IN : prompt string (null terminated) */
109
CHARACTER key; /* IN : name of keyword */
110
fint2c *felem; /* IN : 1st data item to be read */
111
fint2c *maxvals; /* IN : no. of elements to get */
112
fint2c *actvals; /* OUT: actual no. of elements returned */
113
fint2c *values; /* OUT: buffer for data values */
114
fint2c *kunit; /* OUT: address of unit-pointer */
115
fint2c *knull; /* OUT: no. of null values in keyword */
118
*status = SCKPRI(STRIPPED_STRING(prompt),STRIPPED_STRING(key),
119
*felem,*maxvals,actvals,values,kunit,knull);
123
SUBROUTINE STKPRR(prompt,key,felem,maxvals,actvals,values,kunit,knull,status)
124
CHARACTER prompt; /* IN : prompt string (null terminated) */
125
CHARACTER key; /* IN : name of keyword */
126
fint2c *felem; /* IN : 1st data item to be read */
127
fint2c *maxvals; /* IN : no. of elements to get */
128
fint2c *actvals; /* OUT: actual no. of elements returned */
129
float *values; /* OUT: buffer for data values */
130
fint2c *kunit; /* OUT: address of unit-pointer */
131
fint2c *knull; /* OUT: no. of null values in keyword */
134
*status = SCKPRR(STRIPPED_STRING(prompt),STRIPPED_STRING(key),
135
*felem,*maxvals,actvals,values,kunit,knull);