cfc.h

Go to the documentation of this file.
00001 
00002 #ifndef _CFC_H_
00003 #define _CFC_H_
00004 
00010 /***************************************************************************** 
00011  *                              Dependencies                                 * 
00012  *****************************************************************************/
00013 
00014 #ifndef WIN32
00015 #include <string.h>
00016 #else
00017 #include "win32.h"
00018 #endif
00019 
00020 /***************************************************************************** 
00021  *                          Macros & Definitions                             * 
00022  *****************************************************************************/
00023 
00025 #ifndef name2
00026 #define name2( x, y) x##y
00027 #endif /* name2 */
00028 
00029 #ifdef WIN32
00030 
00032 #ifdef WIN32_VS6 /* with Compaq Fortran under VisualStudio6 */
00033 #define CFC_API __stdcall
00034 #else
00035 #define CFC_API
00036 #endif
00037 
00038 #define CFC_EXPORT_NAME( func) func
00039 
00040 #else /* WIN32 */
00041 
00043 #define CFC_API
00044 
00046 #if defined( underscore)
00047 #define CFC_EXPORT_NAME( func) name2( func, _)
00048 #elif defined( f2c)
00049 #define CFC_EXPORT_NAME( func) name2( func, __)
00050 #else
00051 #define CFC_EXPORT_NAME( func) func
00052 #endif
00053 
00054 #endif /* WIN32 */
00055 
00059 typedef struct {
00060         char* value;
00061 #ifdef WIN32_VS6 /* with Compaq Fortran under VisualStudio6 */
00062         int length;
00063 #endif /* WIN32 */
00064 } CFC_FString;
00065 
00070 typedef struct {
00071         char* value;
00072 #ifdef WIN32_VS6 /* with Compaq Fortran under VisualStudio6 */
00073         int length;
00074 #endif /* WIN32 */
00075 } CFC_FzString;
00076 
00077 /***************************************************************************** 
00078  *                           Function prototypes                             * 
00079  *****************************************************************************/
00080 
00081 char* CFC_f2c_string( CFC_FString string);
00082 char* CFC_fz2c_string( CFC_FzString string);
00083 char* CFC_f2c_strcpy( char* cString, CFC_FString string, int length);
00084 char* CFC_fz2c_strcpy( char* cString, CFC_FzString string);
00085 char* CFC_c2f_strcpy( CFC_FString string, int maxLength, char* cString);
00086 char* CFC_c2fz_strcpy( CFC_FzString string, char* cString);
00087 
00088 #endif /* _CFC_H_ */
00089 

Generated on Tue Mar 13 15:15:39 2007 for SIC by  doxygen 1.5.1