#define vmr vmr_ /* parameter for Name Translation is l_ */ #define ROUTINE int /* @(#)ftoc_commc.fc 17.1.1.1 (ESO-DMD) 01/25/02 17:57:06 */ /*=========================================================================== Copyright (C) 1995 European Southern Observatory (ESO) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA. Correspondence concerning ESO-MIDAS should be addressed as follows: Internet e-mail: midas@eso.org Postal address: European Southern Observatory Data Management Division Karl-Schwarzschild-Strasse 2 D 85748 Garching bei Muenchen GERMANY ===========================================================================*/ /*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ .COPYRIGHT: Copyright (c) 1988 European Southern Observatory, .TYPE Test module .IDENT ftoc_commc.c .LANGUAGE C .AUTHOR Carlos Guirao [ESO/IPG] .ENVIRONMENT UNIX .COMMENT Print in the standard output the Fortran_to_C interface .REMARKS .VERSION 1.1 12-Aug-1988: Creation, CG ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/ #include #include #ifdef FTOC_COMMA #include #endif #ifdef FTOC_COMMB #include #endif /* */ static int array[3]; /* Common function */ #define csub csub_ ROUTINE csub(pntr) flong2c *pntr; { array[0] = 10; array[1] = 50; array[2] = 70; *pntr = COMMON_INDEX(array); } #define fin fin_ ROUTINE fin(stat) int *stat; { if (*stat != 0) exit(*stat); #ifdef FTOC_COMMA printf("ftoc_comma.h\n"); #endif #ifdef FTOC_COMMB printf("ftoc_commb.h\n"); #endif exit(0); } #define FMAP fmap_ ROUTINE FMAP(size,pntr,status) fint2c *size; /* IN : number of data values (pixels) to be mapped */ flong2c *pntr; /* OUT: pointer to data in memory */ fint2c *status; { char *mypntr; *status = map(*size,&mypntr); *pntr = COMMON_INDEX(mypntr); }