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

« back to all changes in this revision

Viewing changes to libsrc/ftoc-old/sti.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
/* @(#)sti.fc   19.1 (ESO-IPG) 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
/*++++++++++++++++++++++++  STI.FC +++++++++++++++++++++++++++++++++++++++
 
30
.LANGUAGE C
 
31
.IDENTIFICATION Module STI.FC
 
32
.COMMENTS
 
33
Module contains layer between the Image realted 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] 880919:  use STRING_FCOPY to get character stuff back
 
41
.VERSION  [2.80] 881028:  START + STEP are now double
 
42
.VERSION  [2.90] 900316:  fix problems with FNAME_LEN+2
 
43
.VERSION  [3.00] 901213:  Master file. CG.
 
44
.VERSION  [3.01] 911217:  SCIGET needs to fill temporary strings. CG.
 
45
-----------------------------------------------------------------------------*/
 
46
 
 
47
#include <ftoc.h>
 
48
#include <ftoc_comm.h>
 
49
#include <midas_def.h>
 
50
        
 
51
 
 
52
 
 
53
SUBROUTINE STIGET(name,dattype,iomode,filtype,maxdim,naxis,npix,
 
54
       start,step,ident,cunit,pntr,no,status)
 
55
CHARACTER   name;       /* IN : data frame name */
 
56
fint2c  *dattype;       /* IN : data type */
 
57
fint2c  *iomode;        /* IN : mode for opening of frame */
 
58
fint2c  *filtype;       /* IN : type no: 1 = image, 2 = mask, 3 = table  */
 
59
fint2c  *maxdim;        /* IN : maximum number of dimensions */
 
60
fint2c  *naxis;         /* OUT: no of dimensions of the image */
 
61
fint2c  *npix;          /* OUT: size of each dimension  */
 
62
double  *start;         /* OUT: start coordinates: start is the address of an */
 
63
                        /*      array of naxis elements */
 
64
double  *step;          /* OUT: stepsizes : step is the address of an array of*/
 
65
                        /*      naxis elements */
 
66
CHARACTER   ident;      /* OUT: ascii identifier of image */
 
67
CHARACTER   cunit;      /* OUT: unit of each axis (16 char per unit) */
 
68
flong2c *pntr;
 
69
fint2c  *no;            /* OUT: file no. of data frame */
 
70
fint2c  *status;
 
71
{
 
72
    char *myident, *mycunit;
 
73
    char *mypntr;
 
74
 
 
75
    /*
 
76
     * Temporary strings need to contain original fortran strings
 
77
     */
 
78
    myident=C_STRING(ident);
 
79
    mycunit=C_STRING(cunit);
 
80
 
 
81
    *status = SCIGET(STRIPPED_STRING(name),*dattype,*iomode,*filtype,
 
82
                 *maxdim,naxis,npix,start,step,myident,mycunit,&mypntr,no);
 
83
    STRFCOPY(ident,myident);
 
84
    STRFCOPY(cunit,mycunit);
 
85
    *pntr = COMMON_INDEX(mypntr);
 
86
}