home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / lang / c / 19376 < prev    next >
Encoding:
Internet Message Format  |  1993-01-07  |  1.6 KB

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