diff options
author | William Joye <wjoye@cfa.harvard.edu> | 2019-05-10 15:55:01 (GMT) |
---|---|---|
committer | William Joye <wjoye@cfa.harvard.edu> | 2019-05-10 15:55:01 (GMT) |
commit | 9646e8d50bc1481de77459d59738826f9c256ad6 (patch) | |
tree | e47684c08ae346d96e3c6ea8780f3886fe74e6f6 /ast/c2f77.c | |
parent | 37e757832a7f2c690cea41df5bf9cfa9ee18f67f (diff) | |
download | blt-9646e8d50bc1481de77459d59738826f9c256ad6.zip blt-9646e8d50bc1481de77459d59738826f9c256ad6.tar.gz blt-9646e8d50bc1481de77459d59738826f9c256ad6.tar.bz2 |
upgrade ast 8.7.1
Diffstat (limited to 'ast/c2f77.c')
-rw-r--r-- | ast/c2f77.c | 125 |
1 files changed, 0 insertions, 125 deletions
diff --git a/ast/c2f77.c b/ast/c2f77.c deleted file mode 100644 index 1801a55..0000000 --- a/ast/c2f77.c +++ /dev/null @@ -1,125 +0,0 @@ -/* -* Name: -* c2f77.c - -* Purpose: -* Implement the interface between the C and FORTRAN 77 languages. - -* Description: -* This file implements language-specific functions which support -* the FORTRAN 77 interface to the AST library. -* -* Note that this module is not a class implementation, although it -* resembles one. - -* Notes: -* - Some of the functions in this module are potentially platform -* dependent and may need to be re-implemented when porting the AST -* library to new platforms. - -* Copyright: -* Copyright (C) 1997-2006 Council for the Central Laboratory of the -* Research Councils - -* Licence: -* This program is free software: you can redistribute it and/or -* modify it under the terms of the GNU Lesser General Public -* License as published by the Free Software Foundation, either -* version 3 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 Lesser General Public License for more details. -* -* You should have received a copy of the GNU Lesser General -* License along with this program. If not, see -* <http://www.gnu.org/licenses/>. - -* Authors: -* DSB: D.S. Berry (Starlink) -* RFWS: R.F. Warren-Smith (Starlink) - -* History: -* 15-NOV-1996 (RFWS): -* Original version (based on work by DSB and on code from the -* Starlink CNF library). -*/ - -/* Define the astCLASS macro (even although this is not a class - implementation) to obtain access to protected interfaces. */ -#define astCLASS - -/* Include files. */ -/* ============== */ -/* Interface definitions. */ -/* ---------------------- */ -#include "error.h" /* Error reporting facilities */ -#include "c2f77.h" /* Interface to this module */ - -/* Function implementations. */ -/* ========================= */ -void astStringExport_( const char *source_c, char *dest_f, int dest_len ) { -/* -*+ -* Name: -* astStringExport - -* Purpose: -* Export a C string to a FORTRAN string. - -* Type: -* Protected function. - -* Synopsis: -* #include "c2f77.h" -* void astStringExport( const char *source_c, char *dest_f, int dest_len ) - -* Description: -* This function creates a FORTRAN string from a C string, storing -* it in the supplied memory. If the C string is shorter than the -* space allocated for the FORTRAN string, then it is padded with -* blanks. If the C string is longer than the space allocated for -* the FORTRAN string, then the string is truncated. - -* Parameters: -* source_c -* A pointer to the input C string. -* dest_f -* A pointer to the output FORTRAN string. -* dest_len -* The length of the output FORTRAN string. - -* Notes: -* - This function is potentially platform-specific. For example, -* if FORTRAN strings were passed by descriptor, then the -* descriptor address would be passed as "dest_f" and this must -* then be used to locate the actual FORTRAN character data. -* - This function is described as protected but is in fact -* available through the public interface so that it may be used in -* constructing the FORTRAN 77 public interface. -* - This is the UNIX version of this function. -*- -*/ - -/* Local Variables:*/ - int i; /* Loop counter for characters */ - int *status; /* Pointer to inherited status value */ - -/* Get a pointer to the inherited status value. */ - status = astGetStatusPtr; - -/* Check the global error status. */ - if ( !astOK ) return; - -/* Copy the characters of the input C string to the output FORTRAN - string, taking care not to go beyond the end of the FORTRAN - string.*/ - for ( i = 0; source_c[ i ] && ( i < dest_len ); i++ ) { - dest_f[ i ] = source_c[ i ]; - } - -/* Fill the rest of the output FORTRAN string with blanks. */ - for ( ; i < dest_len; i++ ) dest_f[ i ] = ' '; -} |