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

« back to all changes in this revision

Viewing changes to libsrc/ftoc-old/stka.fc

  • 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
/* @(#)stka.fc  19.1 (ES0-DMD) 02/25/03 13:54:15 */
 
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
/*++++++++++++++++++++++++  STKA.FC +++++++++++++++++++++++++++++++++++++++
 
30
.LANGUAGE C
 
31
.IDENTIFICATION Module STKA.FC
 
32
.COMMENTS
 
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
-----------------------------------------------------------------------------*/
 
43
 
 
44
 
 
45
#include <ftoc.h>
 
46
#include <midas_def.h>
 
47
        
 
48
 
 
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  */
 
54
fint2c  *status;
 
55
{
 
56
     *status = SCKFND(STRIPPED_STRING(key),CHAR_LOC(type),noelem,bytelem);
 
57
}
 
58
 
 
59
 
 
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  */
 
66
fint2c  *status;
 
67
{
 
68
    *status = SCKINF(*npos,*field,CHAR_LOC(buf),KEYNAME_LEN,numbuf);
 
69
}
 
70
 
 
71
 
 
72
SUBROUTINE STKPRC(prompt,key,noelm,felem,maxvals,actvals,values,
 
73
        kunit,knull,status)
 
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 */
 
83
fint2c  *status;
 
84
{       
 
85
    *status = SCKPRC(STRIPPED_STRING(prompt),STRIPPED_STRING(key),
 
86
                     *noelm,*felem,*maxvals,actvals,
 
87
                     CHAR_LOC(values),kunit,knull);
 
88
}
 
89
 
 
90
 
 
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 */
 
100
fint2c  *status;
 
101
{       
 
102
    *status = SCKPRD(STRIPPED_STRING(prompt),STRIPPED_STRING(key),
 
103
                     *felem,*maxvals,actvals,values,kunit,knull);
 
104
}
 
105
 
 
106
 
 
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 */
 
116
fint2c  *status;
 
117
{       
 
118
    *status = SCKPRI(STRIPPED_STRING(prompt),STRIPPED_STRING(key),
 
119
                     *felem,*maxvals,actvals,values,kunit,knull);
 
120
}
 
121
 
 
122
 
 
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 */
 
132
fint2c  *status;
 
133
{       
 
134
    *status = SCKPRR(STRIPPED_STRING(prompt),STRIPPED_STRING(key),
 
135
                     *felem,*maxvals,actvals,values,kunit,knull);
 
136
}
 
137