- Joined
- Jan 15, 2008
- Messages
- 4
- Reaction score
- 1
- Points
- 3
- Location
- University of Maryland
- Your Mac's Specs
- MacPro, OSX 10.5 Leopard, 2 dual core Intel processors, 3.0 GHz, 10Gb RAM, 1.75Tb HD, Darwin 9.1.0
Hi:
I am trying to get a Linux program (ioapi 3.0) to run on my new Mac Pro. I have successfully converted some functions, but the following C code for Fortran bindings is not being recognized. The two included functions (name2cstr and fstr2cstr) are working. Any ideas?
Debra Baker
/** -------------------------- ENVYN() ------------------------- **/
FINT ENVYN( const char * lname,
const char * descrip,
const FINT * defaultval,
FINT * status,
FSTR_L llen,
FSTR_L dlen )
{
char nbuff[ BUFLEN ] ;
char dbuff[ BUFLEN ] ;
int result, istat ;
name2cstr( lname, nbuff, llen, BUFLEN ) ;
fstr2cstr( descrip, dbuff, dlen, BUFLEN ) ;
result = envync( nbuff, dbuff, (int)*defaultval, & istat ) ;
*status = (FINT) istat ;
return (FINT) result ;
} /** END MACH int function ENVYN() **/
/** ------------------------ ENVINT() -------------------------- **/
FINT ENVINT( const char * lname,
const char * descrip,
const int * defaultval,
FINT * status,
FSTR_L llen,
FSTR_L dlen )
{
char nbuff[ BUFLEN ] ;
char dbuff[ BUFLEN ] ;
int result, istat ;
name2cstr( lname, nbuff, llen, BUFLEN ) ;
fstr2cstr( descrip, dbuff, dlen, BUFLEN ) ;
result = (FINT) envintc( nbuff, dbuff, (int)*defaultval, & istat ) ;
*status = (FINT) istat ;
return (FINT) result ;
} /** END MACH int function ENVINT() **/
I am trying to get a Linux program (ioapi 3.0) to run on my new Mac Pro. I have successfully converted some functions, but the following C code for Fortran bindings is not being recognized. The two included functions (name2cstr and fstr2cstr) are working. Any ideas?
Debra Baker
/** -------------------------- ENVYN() ------------------------- **/
FINT ENVYN( const char * lname,
const char * descrip,
const FINT * defaultval,
FINT * status,
FSTR_L llen,
FSTR_L dlen )
{
char nbuff[ BUFLEN ] ;
char dbuff[ BUFLEN ] ;
int result, istat ;
name2cstr( lname, nbuff, llen, BUFLEN ) ;
fstr2cstr( descrip, dbuff, dlen, BUFLEN ) ;
result = envync( nbuff, dbuff, (int)*defaultval, & istat ) ;
*status = (FINT) istat ;
return (FINT) result ;
} /** END MACH int function ENVYN() **/
/** ------------------------ ENVINT() -------------------------- **/
FINT ENVINT( const char * lname,
const char * descrip,
const int * defaultval,
FINT * status,
FSTR_L llen,
FSTR_L dlen )
{
char nbuff[ BUFLEN ] ;
char dbuff[ BUFLEN ] ;
int result, istat ;
name2cstr( lname, nbuff, llen, BUFLEN ) ;
fstr2cstr( descrip, dbuff, dlen, BUFLEN ) ;
result = (FINT) envintc( nbuff, dbuff, (int)*defaultval, & istat ) ;
*status = (FINT) istat ;
return (FINT) result ;
} /** END MACH int function ENVINT() **/