home *** CD-ROM | disk | FTP | other *** search
- Xref: sparky comp.lang.c:19376 comp.os.vms:20521
- Newsgroups: local.unix.help,comp.lang.c,comp.os.vms
- Path: sparky!uunet!utcsri!newsflash.concordia.ca!mizar.cc.umanitoba.ca!kaarts
- From: kaarts@ccu.umanitoba.ca (Kenneth John Aarts)
- Subject: Using C to read Fortran Files---Solved
- Message-ID: <C0Hzss.Fo5@ccu.umanitoba.ca>
- Sender: news@ccu.umanitoba.ca
- Nntp-Posting-Host: ccu.umanitoba.ca
- Organization: University of Manitoba, Winnipeg, Canada
- References: <C0Fyo3.70D@ccu.umanitoba.ca> <C0G1rw.81L@ccu.umanitoba.ca> <C0GHCC.Cwp@ccu.umanitoba.ca> <1993Jan7.030702.4174@dbased.nuo.dec.com>
- Date: Thu, 7 Jan 1993 19:07:39 GMT
- Lines: 24
-
- In <1993Jan7.030702.4174@dbased.nuo.dec.com> lionel@quark.enet.dec.com (Steve Lionel) writes:
-
-
- >It is the VAX C Run-Time Library which is doing this to you; it "interprets"
- >the FORTRAN carriage control, turning the leading "c" into an LF, as that's
- >what would happen if you printed the line on a terminal or printer. WHY
- >it does this I don't know, nor do I know how to stop it, but I thought
- >that at the least you should know where the problem is located.
-
- >All I can suggest is that, if possible, open the file from FORTRAN
- >specifying CARRIAGECONTROL='LIST'. I'll see what I can dig up about
- >solutions from the VAX C end.
-
- Thanks to the enormous number of people who emailed me advice. The problem
- is solved. Changing the fopen statement to
-
- fp = fopen("name","r","ctx=nocvt");
-
- solved my particular problems. Who would have figured? Thanks again,
-
- Ken
-
- (VAX C Run Time Library Ref. Man. , Table Ref-3. This option tells it
- to NOT convert fortran carriage control bytes.)
-