home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.sgi
- Path: sparky!uunet!mcsun!Germany.EU.net!news.netmbx.de!zrz.tu-berlin.de!math.fu-berlin.de!Sirius.dfn.de!chx400!josef!sinkwitz
- From: sinkwitz@ifi.unizh.ch (Rainer Sinkwitz)
- Subject: Re: Binary File: SGI <-> IBM
- Message-ID: <1992Aug13.140617.2087@ifi.unizh.ch>
- Sender: sinkwitz@ifi.unizh.ch (Rainer Sinkwitz)
- Organization: University of Zurich, Department of Computer Science
- References: <1157@deere.com>
- Date: Thu, 13 Aug 92 14:06:17 GMT
- Lines: 32
-
-
- In article <1157@deere.com>, jrh@de.deere.com (John R. Howell) writes:
- > I have a binary file created with C fwrites and read with C freads.
- >
- > If I create this on an SGI (IRIX) and read it with an IBM RS6000, I seem to
- > read everything ok, but my floating point numbers don't make sense. If
- > I go the other way (IBM -> SGI) a similar thing happens.
- >
- > Apparently the integers are read correctly ...
- >
- ...
- The XDR package is a portable way to do this.
-
- % man xdr
-
- XDR(3R) Silicon Graphics XDR(3R)
-
- NAME
- xdr - External Data Representation (XDR) library routines
-
- SYNOPSIS AND DESCRIPTION
- These routines allow C programmers to describe arbitrary data structures
- in a machine-independent fashion. Data for remote procedure calls are
- transmitted using these routines.
-
- #include <rpc/rpc.h>
-
- --
- oooooo oooo Rainer Sinkwitz, Multimedia Lab sinkwitz@ifi.unizh.ch
- $ $ $ " University of Zurich, Switzerland VOICE +41-1-257-4346
- $"$$ """"$ Inst.f.Informatik, Winterthurerstr. 190 FAX +41-1-363-00-35
- o$o "$o $ooo" CH-8057-Z\"urich
-