New To Mac-Forums?

Welcome to our community! Join the discussion today by registering your FREE account. If you have any problems with the registration process, please contact us!

Get your questions answered by community gurus Advice and insight from world-class Apple enthusiasts Exclusive access to members-only contests, giveaways and deals

Join today!

 
Start a Discussion
 

Mac-Forums Brief

Subscribe to Mac-Forums Brief to receive special offers from Mac-Forums partners and sponsors

Join the conversation RSS
OS X - Development and Darwin Discussion and questions about development for Mac OS X.

Linux to Darwin


Post Reply New Thread Subscribe

 
Thread Tools
Debra Baker

 
Debra Baker's Avatar
 
Member Since: Jan 15, 2008
Location: University of Maryland
Posts: 4
Debra Baker is on a distinguished road
Mac Specs: MacPro, OSX 10.5 Leopard, 2 dual core Intel processors, 3.0 GHz, 10Gb RAM, 1.75Tb HD, Darwin 9.1.0

Debra Baker is offline
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() **/
QUOTE Thanks
Debra Baker

 
Debra Baker's Avatar
 
Member Since: Jan 15, 2008
Location: University of Maryland
Posts: 4
Debra Baker is on a distinguished road
Mac Specs: MacPro, OSX 10.5 Leopard, 2 dual core Intel processors, 3.0 GHz, 10Gb RAM, 1.75Tb HD, Darwin 9.1.0

Debra Baker is offline
Correction to my e-mail: EVINT() works. The other delinquent function is:

/** ------------------------ ENVSTR() -------------------------- **/

void ENVSTR( const char * lname,
const char * description,
const char * defaultval,
char * eqname,
FINT * status,
FSTR_L namlen,
FSTR_L deslen,
FSTR_L deflen,
FSTR_L eqlen )
{
char nambuf[ BUFLEN ] ;
char desbuf[ BUFLEN ] ;
char defbuf[ BUFLEN ] ;
char eqbuf [ BUFLEN ] ;
int istat ;

name2cstr( lname , nambuf, namlen, BUFLEN ) ;
fstr2cstr( description, desbuf, deslen, BUFLEN ) ;
fstr2cstr( defaultval , defbuf, deflen, BUFLEN ) ;

envstrc( nambuf, desbuf, defbuf, eqbuf, & istat, eqlen ) ;

cstr2fstr( eqbuf, eqname, eqlen ) ;
*status = istat ;

return ;

} /** END MACH void function ENVSTR() **/
QUOTE Thanks
Debra Baker

 
Debra Baker's Avatar
 
Member Since: Jan 15, 2008
Location: University of Maryland
Posts: 4
Debra Baker is on a distinguished road
Mac Specs: MacPro, OSX 10.5 Leopard, 2 dual core Intel processors, 3.0 GHz, 10Gb RAM, 1.75Tb HD, Darwin 9.1.0

Debra Baker is offline
I fixed it! It wasn't a code issue (of course!)
QUOTE Thanks

Post Reply New Thread Subscribe


« Micropolis on Mac (open-source Simcity) | Shared or Distributed Memory? »
Thread Tools

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off
Forum Jump

Similar Threads
Thread
Thread Starter
Forum
Replies
Last Post
Best Linux on Mac? Best Way to Install? markw10 Running Windows (or anything else) on your Mac 9 12-23-2011 11:13 PM
Booting Linux PPC from a USB Drive on my PowerBook edokid Running Windows (or anything else) on your Mac 5 06-23-2011 05:53 PM
What is your opinion on the future of Linux and the Mac? RickR Schweb's Lounge 17 05-09-2008 05:47 AM
Macbook - Linux triple boot issues - HELP jhquest Running Windows (or anything else) on your Mac 2 10-02-2007 10:55 PM
XP, Vista, Ubuntu and then back home Kenotic Switcher Hangout 20 03-02-2007 01:29 AM

All times are GMT -4. The time now is 04:04 PM.

Powered by vBulletin
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
X

Welcome to Mac-Forums.com

Create your username to jump into the discussion!

New members like you have made this community the ultimate source for your Mac since 2003!


(4 digit year)

Already a member?