Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r73796 - in sandbox/e_float/libs/e_float: build test/linpack_test/libf2c
From: e_float_at_[hidden]
Date: 2011-08-15 15:29:47


Author: christopher_kormanyos
Date: 2011-08-15 15:29:47 EDT (Mon, 15 Aug 2011)
New Revision: 73796
URL: http://svn.boost.org/trac/boost/changeset/73796

Log:
- Cleaned up F2C header.
- Added a reminder regarding GCC location to Makefile comments.
Text files modified:
   sandbox/e_float/libs/e_float/build/Makefile | 2
   sandbox/e_float/libs/e_float/test/linpack_test/libf2c/f2c.h | 453 ++++++++++++++++++++-------------------
   2 files changed, 232 insertions(+), 223 deletions(-)

Modified: sandbox/e_float/libs/e_float/build/Makefile
==============================================================================
--- sandbox/e_float/libs/e_float/build/Makefile (original)
+++ sandbox/e_float/libs/e_float/build/Makefile 2011-08-15 15:29:47 EDT (Mon, 15 Aug 2011)
@@ -107,6 +107,8 @@
 # ------------------------------------------------------------------------------
 # Development tools
 # ------------------------------------------------------------------------------
+#GCC = i686-w64-mingw32-gcc
+#CC = i686-w64-mingw32-g++
 GCC = gcc
 CC = g++
 SED = sed

Modified: sandbox/e_float/libs/e_float/test/linpack_test/libf2c/f2c.h
==============================================================================
--- sandbox/e_float/libs/e_float/test/linpack_test/libf2c/f2c.h (original)
+++ sandbox/e_float/libs/e_float/test/linpack_test/libf2c/f2c.h 2011-08-15 15:29:47 EDT (Mon, 15 Aug 2011)
@@ -1,227 +1,234 @@
-/* f2c.h -- Standard Fortran to C header file */
+// f2c.h -- Standard Fortran to C header file
+// Modified by Chris for improved portability.
 
-/** barf [ba:rf] 2. "He suggested using FORTRAN, and everybody barfed."
-
- - From The Shogakukan DICTIONARY OF NEW ENGLISH (Second edition) */
+// barf [ba:rf] 2. "He suggested using FORTRAN, and everybody barfed."
+// - From The Shogakukan DICTIONARY OF NEW ENGLISH (Second edition)
 
 #ifndef F2C_INCLUDE
-#define F2C_INCLUDE
+ #define F2C_INCLUDE
+
+ typedef long int integer;
+ typedef unsigned long int uinteger;
+ typedef char* address;
+ typedef short int shortint;
+ typedef float real;
+ typedef double doublereal;
+ typedef struct struct_complex { real r, i; } complex;
+ typedef struct struct_doublecomplex { doublereal r, i; } doublecomplex;
+ typedef long int logical;
+ typedef short int shortlogical;
+ typedef char logical1;
+ typedef char integer1;
+ typedef signed long long longint; // Adjust for signed integer*8
+ typedef unsigned long long ulongint; // Adjust for unsigned integer*8
+ #define qbit_clear(a,b) ((a) & ~((ulongint)1 << (b)))
+ #define qbit_set(a,b) ((a) | ((ulongint)1 << (b)))
+
+ #define TRUE_ (1)
+ #define FALSE_ (0)
+
+ // Extern is for use with -E
+ #ifndef Extern
+ #define Extern extern
+ #endif
+
+ // I/O stuff
+ typedef long int flag;
+ typedef long int ftnlen;
+ typedef long int ftnint;
+
+ // external read, write
+ typedef struct struct_clist
+ {
+ flag cierr;
+ ftnint ciunit;
+ flag ciend;
+ char* cifmt;
+ ftnint cirec;
+ }
+ cilist;
+
+ // internal read, write
+ typedef struct struct_icilist
+ {
+ flag icierr;
+ char* iciunit;
+ flag iciend;
+ char* icifmt;
+ ftnint icirlen;
+ ftnint icirnum;
+ }
+ icilist;
+
+ // open
+ typedef struct struct_olist
+ {
+ flag oerr;
+ ftnint ounit;
+ char* ofnm;
+ ftnlen ofnmlen;
+ char* osta;
+ char* oacc;
+ char* ofm;
+ ftnint orl;
+ char* oblnk;
+ }
+ olist;
+
+ // close
+ typedef struct struct_cllist
+ {
+ flag cerr;
+ ftnint cunit;
+ char* csta;
+ }
+ cllist;
+
+ // rewind, backspace, endfile
+ typedef struct struct_alist
+ {
+ flag aerr;
+ ftnint aunit;
+ }
+ alist;
+
+ // inquire
+ typedef struct struct_inlist
+ {
+ flag inerr;
+ ftnint inunit;
+ char* infile;
+ ftnlen infilen;
+ ftnint* inex; // parameters in standard's order
+ ftnint* inopen;
+ ftnint* innum;
+ ftnint* innamed;
+ char* inname;
+ ftnlen innamlen;
+ char* inacc;
+ ftnlen inacclen;
+ char* inseq;
+ ftnlen inseqlen;
+ char * indir;
+ ftnlen indirlen;
+ char* infmt;
+ ftnlen infmtlen;
+ char* inform;
+ ftnint informlen;
+ char* inunf;
+ ftnlen inunflen;
+ ftnint* inrecl;
+ ftnint* innrec;
+ char* inblank;
+ ftnlen inblanklen;
+ }
+ inlist;
+
+ #define VOID void
+
+ typedef union union_Multitype
+ {
+ // for multiple entry points
+ integer1 g;
+ shortint h;
+ integer i;
+ //longint j;
+ real r;
+ doublereal d;
+ complex c;
+ doublecomplex z;
+ }
+ Multitype;
+
+ typedef struct struct_Vardesc
+ {
+ // for Namelist
+ char* name;
+ char* addr;
+ ftnlen* dims;
+ int type;
+ }
+ Vardesc;
+
+ typedef struct struct_Namelist
+ {
+ char* name;
+ Vardesc** vars;
+ int nvars;
+ }
+ Namelist;
+
+ #define abs(x) ((x) >= 0 ? (x) : -(x))
+ #define dabs(x) (doublereal)abs(x)
+ #ifndef min
+ #define min(a,b) ((a) <= (b) ? (a) : (b))
+ #endif
+ #ifndef max
+ #define max(a,b) ((a) >= (b) ? (a) : (b))
+ #endif
+ #define dmin(a,b) (doublereal)min(a,b)
+ #define dmax(a,b) (doublereal)max(a,b)
+ #define bit_test(a,b) ((a) >> (b) & 1)
+ #define bit_clear(a,b) ((a) & ~((uinteger)1 << (b)))
+ #define bit_set(a,b) ((a) | ((uinteger)1 << (b)))
+
+ // procedure parameter types for -A and -C++
+
+ #define F2C_proc_par_types 1
+
+ #ifdef __cplusplus
+ typedef int (*U_fp)(...); // Unknown procedure type
+ typedef shortint (*J_fp)(...);
+ typedef integer (*I_fp)(...);
+ typedef real (*R_fp)(...);
+ typedef doublereal (*D_fp)(...), (*E_fp)(...);
+ typedef VOID (*C_fp)(...); // Complex
+ typedef VOID (*Z_fp)(...); // Double Complex
+ typedef logical (*L_fp)(...);
+ typedef shortlogical (*K_fp)(...);
+ typedef VOID (*H_fp)(...); // Character
+ typedef int (*S_fp)(...); // Subroutine
+ #else
+ typedef int (*U_fp)(); // Unknown procedure type
+ typedef shortint (*J_fp)();
+ typedef integer (*I_fp)();
+ typedef real (*R_fp)();
+ typedef doublereal (*D_fp)(), (*E_fp)();
+ typedef VOID (*C_fp)(); // Complex
+ typedef VOID (*Z_fp)(); // Double Complex
+ typedef logical (*L_fp)();
+ typedef shortlogical (*K_fp)();
+ typedef VOID (*H_fp)(); // Character
+ typedef int (*S_fp)(); // Subroutine
+ #endif
+
+ // E_fp is for real functions when -R is not specified
+ typedef VOID C_f; // complex function
+ typedef VOID H_f; // character function
+ typedef VOID Z_f; // double complex function
+ typedef doublereal E_f; // real function with -R not specified
+
+ // undef any lower-case symbols that your C compiler predefines, e.g.:
+
+ #ifndef Skip_f2c_Undefs
+ #undef cray
+ #undef gcos
+ #undef mc68010
+ #undef mc68020
+ #undef mips
+ #undef pdp11
+ #undef sgi
+ #undef sparc
+ #undef sun
+ #undef sun2
+ #undef sun3
+ #undef sun4
+ #undef u370
+ #undef u3b
+ #undef u3b2
+ #undef u3b5
+ #undef unix
+ #undef vax
+ #endif
 
-typedef long int integer;
-typedef unsigned long int uinteger;
-typedef char *address;
-typedef short int shortint;
-typedef float real;
-typedef double doublereal;
-typedef struct { real r, i; } complex;
-typedef struct { doublereal r, i; } doublecomplex;
-typedef long int logical;
-typedef short int shortlogical;
-typedef char logical1;
-typedef char integer1;
-//#ifdef INTEGER_STAR_8 /* Adjust for integer*8. */
-typedef long long longint; /* system-dependent */
-typedef unsigned long long ulongint; /* system-dependent */
-#define qbit_clear(a,b) ((a) & ~((ulongint)1 << (b)))
-#define qbit_set(a,b) ((a) | ((ulongint)1 << (b)))
-//#endif
-
-#define TRUE_ (1)
-#define FALSE_ (0)
-
-/* Extern is for use with -E */
-#ifndef Extern
-#define Extern extern
-#endif
-
-/* I/O stuff */
-
-#ifdef f2c_i2
-/* for -i2 */
-typedef short flag;
-typedef short ftnlen;
-typedef short ftnint;
-#else
-typedef long int flag;
-typedef long int ftnlen;
-typedef long int ftnint;
-#endif
-
-/*external read, write*/
-typedef struct
-{ flag cierr;
- ftnint ciunit;
- flag ciend;
- char *cifmt;
- ftnint cirec;
-} cilist;
-
-/*internal read, write*/
-typedef struct
-{ flag icierr;
- char *iciunit;
- flag iciend;
- char *icifmt;
- ftnint icirlen;
- ftnint icirnum;
-} icilist;
-
-/*open*/
-typedef struct
-{ flag oerr;
- ftnint ounit;
- char *ofnm;
- ftnlen ofnmlen;
- char *osta;
- char *oacc;
- char *ofm;
- ftnint orl;
- char *oblnk;
-} olist;
-
-/*close*/
-typedef struct
-{ flag cerr;
- ftnint cunit;
- char *csta;
-} cllist;
-
-/*rewind, backspace, endfile*/
-typedef struct
-{ flag aerr;
- ftnint aunit;
-} alist;
-
-/* inquire */
-typedef struct
-{ flag inerr;
- ftnint inunit;
- char *infile;
- ftnlen infilen;
- ftnint *inex; /*parameters in standard's order*/
- ftnint *inopen;
- ftnint *innum;
- ftnint *innamed;
- char *inname;
- ftnlen innamlen;
- char *inacc;
- ftnlen inacclen;
- char *inseq;
- ftnlen inseqlen;
- char *indir;
- ftnlen indirlen;
- char *infmt;
- ftnlen infmtlen;
- char *inform;
- ftnint informlen;
- char *inunf;
- ftnlen inunflen;
- ftnint *inrecl;
- ftnint *innrec;
- char *inblank;
- ftnlen inblanklen;
-} inlist;
-
-#define VOID void
-
-union Multitype { /* for multiple entry points */
- integer1 g;
- shortint h;
- integer i;
- /* longint j; */
- real r;
- doublereal d;
- complex c;
- doublecomplex z;
- };
-
-typedef union Multitype Multitype;
-
-/*typedef long int Long;*/ /* No longer used; formerly in Namelist */
-
-struct Vardesc { /* for Namelist */
- char *name;
- char *addr;
- ftnlen *dims;
- int type;
- };
-typedef struct Vardesc Vardesc;
-
-struct Namelist {
- char *name;
- Vardesc **vars;
- int nvars;
- };
-typedef struct Namelist Namelist;
-
-#define abs(x) ((x) >= 0 ? (x) : -(x))
-#define dabs(x) (doublereal)abs(x)
-#ifndef min
-#define min(a,b) ((a) <= (b) ? (a) : (b))
-#endif
-#ifndef max
-#define max(a,b) ((a) >= (b) ? (a) : (b))
-#endif
-#define dmin(a,b) (doublereal)min(a,b)
-#define dmax(a,b) (doublereal)max(a,b)
-#define bit_test(a,b) ((a) >> (b) & 1)
-#define bit_clear(a,b) ((a) & ~((uinteger)1 << (b)))
-#define bit_set(a,b) ((a) | ((uinteger)1 << (b)))
-
-/* procedure parameter types for -A and -C++ */
-
-#define F2C_proc_par_types 1
-#ifdef __cplusplus
-typedef int /* Unknown procedure type */ (*U_fp)(...);
-typedef shortint (*J_fp)(...);
-typedef integer (*I_fp)(...);
-typedef real (*R_fp)(...);
-typedef doublereal (*D_fp)(...), (*E_fp)(...);
-typedef /* Complex */ VOID (*C_fp)(...);
-typedef /* Double Complex */ VOID (*Z_fp)(...);
-typedef logical (*L_fp)(...);
-typedef shortlogical (*K_fp)(...);
-typedef /* Character */ VOID (*H_fp)(...);
-typedef /* Subroutine */ int (*S_fp)(...);
-#else
-typedef int /* Unknown procedure type */ (*U_fp)();
-typedef shortint (*J_fp)();
-typedef integer (*I_fp)();
-typedef real (*R_fp)();
-typedef doublereal (*D_fp)(), (*E_fp)();
-typedef /* Complex */ VOID (*C_fp)();
-typedef /* Double Complex */ VOID (*Z_fp)();
-typedef logical (*L_fp)();
-typedef shortlogical (*K_fp)();
-typedef /* Character */ VOID (*H_fp)();
-typedef /* Subroutine */ int (*S_fp)();
-#endif
-/* E_fp is for real functions when -R is not specified */
-typedef VOID C_f; /* complex function */
-typedef VOID H_f; /* character function */
-typedef VOID Z_f; /* double complex function */
-typedef doublereal E_f; /* real function with -R not specified */
-
-/* undef any lower-case symbols that your C compiler predefines, e.g.: */
-
-#ifndef Skip_f2c_Undefs
-#undef cray
-#undef gcos
-#undef mc68010
-#undef mc68020
-#undef mips
-#undef pdp11
-#undef sgi
-#undef sparc
-#undef sun
-#undef sun2
-#undef sun3
-#undef sun4
-#undef u370
-#undef u3b
-#undef u3b2
-#undef u3b5
-#undef unix
-#undef vax
-#endif
-#endif
+#endif // F2C_INCLUDE


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk