1
/* @(#)tba.fc 19.1 (ESO-IPG) 02/25/03 13:54:16 */
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
===========================================================================*/
30
.IDENTIFICATION tba.fc
32
.AUTHOR M. Peron (ESO-IPG))
33
.KEYWORDS Table system, FORTRAN interface
35
.VERSION 1.0 22-dec-1992: first version
36
.COMMENTS FORTRAN 77 to C interface layer.
40
#include <ftoc_comm.h> /* VMR common */
41
#include <ftoc_log.h> /* LOGICAL */
42
#include <midas_def.h>
44
ROUTINE TBAMAP(tid,row,col,index,status)
45
/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
46
.PURPOSE Return the address of the COMPLETE element array
48
------------------------------------------------------------------*/
56
*status = TCAMAP(*tid,*row,*col,&mypntr);
57
*index = COMMON_INDEX(mypntr);
60
ROUTINE TBAUNM(tid,index,status)
61
/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
62
.PURPOSE Unmap a part of the file that was mapped.
63
.RETURNS status (-1 if not mapped)
64
-------------------------------------------------------------*/
69
*status = TCAUNM(*tid,(char *)&((&vmr.addr)[*index-1]));
72
ROUTINE TBADEL(tid,row,col,index,items,status)
73
/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
74
.PURPOSE Deletes table elements.
75
.METHOD Writes a NULL value in the table.
77
-------------------------------------------------------------*/
85
*status = TCADEL(*tid,*row,*col,*index,*items);
89
SUBROUTINE TBAWRC(tid, row, col, index, items, value,status)
90
/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
91
.PURPOSE Writes table element, character string format.
93
-------------------------------------------------------------*/
102
*status = TCAWRC(*tid,*row,*col,*index,*items,C_STRING(value));
105
ROUTINE TBAWRD(tid, row, col, index, items, value,status)
106
/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
107
.PURPOSE Writes table element, double precision argument.
109
-------------------------------------------------------------*/
118
*status = TCAWRD(*tid,*row,*col,*index,*items,value);
121
ROUTINE TBAWRI(tid, row, col, index, items, value,status)
122
/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
123
.PURPOSE Writes table element, double precision argument.
125
-------------------------------------------------------------*/
134
*status = TCAWRI(*tid,*row,*col,*index,*items,value);
137
ROUTINE TBAWRR(tid, row, col, index, items, value,status)
138
/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
139
.PURPOSE Writes table element, double precision argument.
141
-------------------------------------------------------------*/
150
*status = TCAWRR(*tid,*row,*col,*index,*items,value);
153
SUBROUTINE TBARDC(tid, row, col, index, items, value,status)
154
/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
155
.PURPOSE Reads table element as a character string.
156
Arrays are edited with a comma between elements.
157
.RETURNS status (error and non-selected)
158
-------------------------------------------------------------*/
167
char myvalue[TBL_ROWLEN+1];
168
*status = TCARDC(*tid,*row,*col,*index,*items,myvalue);
169
STRFCOPY(value, myvalue);
174
ROUTINE TBARDD(tid, row, col, index, items, value,status)
175
/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
176
.PURPOSE Reads table element as a double precision number.
177
Arrays are edited with a comma between elements.
178
.RETURNS status (error and non-selected)
179
-------------------------------------------------------------*/
188
*status = TCARDD(*tid,*row,*col,*index,*items,value);
191
ROUTINE TBARDI(tid, row, col, index, items, value,status)
192
/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
193
.PURPOSE Reads table element as an integer
194
Arrays are edited with a comma between elements.
195
.RETURNS status (error and non-selected)
196
-------------------------------------------------------------*/
205
*status = TCARDI(*tid,*row,*col,*index,*items,value);
209
ROUTINE TBARDR(tid, row, col, index, items, value,status)
210
/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
211
.PURPOSE Reads table element as a floating point number
212
Arrays are edited with a comma between elements.
213
.RETURNS status (error and non-selected)
214
-------------------------------------------------------------*/
223
*status = TCARDR(*tid,*row,*col,*index,*items,value);
226
SUBROUTINE TBASCC(tid,row,col,index,items,value,next,status)
228
.PURPOSE F77 interface to TCASRC (search in character)
230
-------------------*/
240
*status = TCASRC(*tid,*row,*col,*index,*items,C_STRING(value),next);
244
ROUTINE TBASCD(tid,row,col,index,items,value,next,status)
246
.PURPOSE F77 interface to TCASRD
248
-------------------*/
258
*status = TCASRD(*tid,*row,*col,*index,*items,value,next);
261
ROUTINE TBASCI(tid,row,col,index,items,value,next,status)
263
.PURPOSE F77 interface to TCASRI
265
-------------------*/
275
*status = TCASRI(*tid,*row,*col,*index,*items,value,next);
278
ROUTINE TBASCR(tid,row,col,index,items,value,next,status)
280
.PURPOSE F77 interface to TCASRR
282
-------------------*/
292
*status = TCASRR(*tid,*row,*col,*index,*items,value,next);