Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!mailrus!ames!ncar!boulder!sunybcs!bingvaxu!leah!itsgw!steinmetz!uunet!sdrc!scjones From: scjones@sdrc.UUCP (Larry Jones) Newsgroups: comp.os.vms Subject: Re: VMS C reading fortran files Summary: Possible solutions Message-ID: <286@sdrc.UUCP> Date: 28 May 88 15:38:09 GMT References: <8805271004.AA15064@ucbvax.Berkeley.EDU> Organization: Structural Dynamics Research Corp., Cincinnati Lines: 30 In article <8805271004.AA15064@ucbvax.Berkeley.EDU>, HEARTEDC@UORHBV.BITNET writes: > > I have a problem with the way VMS C reads and writes fortran carriage > control files, and hope that someone can help me out. > > VMS C attempts to translate the carriage control information into C > equivalents (a "1" in column 1 into a \f, etc.). I think it does a > lousy job - but aside from that, I'd like it to skip the translation, > so that I can worry about the details myself. Well, firstly I have to disagree with you - VAX C does a fantastic job of converting FORTRAN carriage control into instream controls. (Or at least is has since V2.0 when they fixed the problems V1.0 had. I don't recall whether they ever fixed the documentation or not, though.) In any event, if you insist on doing the translations yourself, there are some options you can use when you open the file. If you use a mode of "rb" instead of "r" the library will not do any carriage control mappings at all. This may still be a problem since there aren't any newlines to mark record boundaries, but some of the library functions (fgets?) won't read more than a single record so you can use them to get a record at a time and then do your own translations. There are also additional arguments that can be specified on the open to set various RMS parameters and control the library behaviour - check the documentation for "open". ---- Larry Jones UUCP: ...!sdrc!scjones SDRC AT&T: (513) 576-2070 2000 Eastman Dr. BIX: ltl Milford, OH 45150 "When all else fails, read the directions."