NR subroutines in Mac format ?


javier
03-19-2003, 04:14 PM
I recently bought the NR for my
Mac OS 10.2.
I have a problem with the format of the
files. When i try to compile any subroutine
using g77 -c file.for i got this message:
Line too long as of (?) [info -f g77 M LEX]
I edit the source file with Emacs for
Mac OS X and the code appears in a single
line where the end of line turned into ^M.
I fixed by hand this with one of the subroutines,
deleting the ^M and pressing return to break
the lines and then i can compile the subroutine.
Does anyone know why i cannot compile the
NR for Mac in my Mac ?
The Mac OS X as you probably know is a
UNIX based system but the source
code of the NR for Mac don't look like files
in UNIX format since they cannot be read
by emacs.

thanks

Bill Press
03-20-2003, 09:23 PM
Javier,

Well, I have to first say up front that I am not a Mac person. But it looks to me as if your compiler is expecting a different end-of-line (EOL) convention than that in which the NR files are supplied.

The Mac versions of NR are supplied with the standard old Mac convention of ^M for end of line.

If you have Perl on your machine, you might download and try the EOL conversion script located at
http://www.nr.com/utils/flip.pl
This can be used to change the EOL convention of a text file from or to any of Windows (^J^M), Mac (^M), and Unix (^J). One of them ought to be right!

Cheers,
Bill P

javier
03-21-2003, 01:13 AM
hi Bill,

That is the reason
I asked in a previous thread,
before buying the NR for Mac,
if they were compatible with
the new Mac OS X. Well, obviously they
are not compatible. I have been converting
some subroutines and i can compile then.

I think you should provide a Mac OS X version
of your NR or say explicitely in your web page
that the current Mac version is not
Mac OS X compatible.
Mac OS X is a BSD UNIX
based system. I can compile with no
problems many programs with my
Linux Makefiles. It should be simple for you
to provide a Mac OS X compatible version.

Javier Ferrandis

hernlund
06-12-2003, 04:16 AM
Javier,

Just get the UNIX or linux version of whatever source code you receive. Apple has seen the light (thank you Steve Jobs!) that bsd unix with a MacOS environment built on top is the ultimate OS. The old conventions are just disappearing. If you need other unix.linux software for OSX, check out the fink project:

http://fink.sourceforge.net

John