/* @(#)genftoca.fc 17.1.1.1 (ES0-DMD) 01/25/02 17:34: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 Massachusetss Ave, Cambridge, MA 02139, USA. Corresponding 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 ===========================================================================*/ /*++++++++++++++++++++++++ GENFTOCA.FC +++++++++++++++++++++++++++++++++++ .LANGUAGE C .IDENTIFICATION Module GENFTOCA.FC .COMMENTS Contains GENCNV, GENNUM, GENLGN, GENTIM .AUTHOR K. Banse ESO - Garching .KEYWORDS tools .ENVIRONMENT FORTRAN and C standards .VERSION [1.00] 880414: created .VERSION [3.00] 901213: Master file. CG. .VERSION [3.10] 920507: Extracted from genftoc.fc, KB -----------------------------------------------------------------------------*/ #include #include SUBROUTINE GENCNV(text,type,maxval,ibuf,rbuf,dbuf,mm) CHARACTER text; /* IN: input line (terminated by \0 ) */ fint2c *type; /* IN: = 1, for integer; = 2, for real; = 4, doubl pre*/ fint2c *maxval; /* IN: maximal no. of output values */ fint2c *ibuf; /* OUT: integer output buffer */ float *rbuf; /* OUT: real output buffer */ double *dbuf; /* OUT: double precision output buffer */ fint2c *mm; { *mm = CGN_CNVT(STRIPPED_STRING(text),(int)*type,(int)*maxval,ibuf,rbuf,dbuf); } SUBROUTINE GENNUM(text) CHARACTER text; /* IN: input string */ { int ret; ret = CGN_NUMBER(STRIPPED_STRING(text)); return(ret); } SUBROUTINE GENLGN(infile,outfile,maxout) CHARACTER infile; /* IN: input file name */ CHARACTER outfile; /* OUT: result file name */ fint2c *maxout; /* IN: max length of outfile */ { char *tmpfil; tmpfil = C_STRING(outfile); CGN_LOGNAM(STRIPPED_STRING(infile),tmpfil,(int)*maxout); STRFCOPY(outfile,tmpfil); } SUBROUTINE GENTIM(time) CHARACTER time; /* OUT: pointer to string of char containing the time */ { char *mytime; mytime = C_STRING(time); OSY_ASCTIM(mytime); STRFCOPY(time,mytime); }