Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!bloom-beacon!mit-eddie!uw-beaver!teknowledge-vaxc!sri-unix!quintus!ok From: ok@quintus.uucp (Richard A. O'Keefe) Newsgroups: comp.lang.c Subject: Re: Portability across architectures.. Keywords: Portability, common data, files Message-ID: <326@quintus.UUCP> Date: 30 Aug 88 04:17:44 GMT References: <103@simsdevl.UUCP> Sender: news@quintus.UUCP Reply-To: ok@quintus.UUCP (Richard A. O'Keefe) Distribution: all Organization: Quintus Computer Systems, Inc. Lines: 17 In article <103@simsdevl.UUCP> dandc@simsdevl.UUCP (Dan DeClerck) writes: >A fellow programmer suggested an "XDR" standard from SUN, >but this seems to only work with inter-process communication. Have you *tried* it? Look at the name of the manual: "External Data Representation Protocol Specification" in "Networking on the Sun Workstation". You can send XDR-encoded data through sockets, but there is no necessary connexion between XDR and IPC. For your application, you want to use xdrstdio_create() to convert stdio streams to your files to XDR streams, and then just read and write the data with appropriate XDR calls. In fact, you will probably use the same routine for reading and writing, as the direction is encoded in the XDR stream, not in the calls. It's really very easy to use. (Easier than scanf(), anyway.)