home *** CD-ROM | disk | FTP | other *** search
- Xref: sparky comp.lang.c:12688 comp.sys.sun.misc:3861
- Path: sparky!uunet!zaphod.mps.ohio-state.edu!wupost!uwm.edu!ogicse!plains!news.u.washington.edu!milton!chuckb
- From: chuckb@milton.u.washington.edu (Chuck Bass)
- Newsgroups: comp.lang.c,comp.sys.sun.misc
- Subject: Re: How to use the same file of structs on PC and Sun?
- Message-ID: <chuckb.714624791@milton>
- Date: 24 Aug 92 02:53:11 GMT
- Article-I.D.: milton.chuckb.714624791
- References: <71527@apple.Apple.COM> <THOMAS.TORNBLOM.92Aug24013032@beck.nexus.comm.se>
- Sender: news@u.washington.edu (USENET News System)
- Organization: University of Washington
- Lines: 16
-
- As has been previously stated having portable binary files is
- inherently not portable. Big endian/Little endian, byte
- alignment, format of floats and size of ints, longs and shorts
- are a sample of what you have to contend with.
-
- Unfortunately, the portable solution is to use ASCII files and
- read your files as text using fscanf or some such mechanism.
- This is not an ideal solution if file size is of any concern.
-
- Sorry if this isn't the answer that you wanted...
-
-
- Chuck Bass
- College of Forest Systems Engineering
- University of Washington
- chuckb@u.washington.edu
-