Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!apple!agate!e260-1g.berkeley.edu!c60b-1eq From: c60b-1eq@e260-1g.berkeley.edu (Noam Mendelson) Newsgroups: comp.lang.c Subject: Re: Little problem with sizeof on PC Message-ID: <1991Apr24.031700.17233@agate.berkeley.edu> Date: 24 Apr 91 03:17:00 GMT References: <1991Apr23.022057.29511@ux1.cso.uiuc.edu> <1991Apr23.050747.19705@agate.berkeley.edu> Sender: root@agate.berkeley.edu (Charlie Root) Organization: University of California, Berkeley Lines: 22 In article rearl@gnu.ai.mit.edu (Robert Earl) writes: >In article <1991Apr23.050747.19705@agate.berkeley.edu> c60b-1eq@e260-1d.berkeley.edu (Noam Mendelson) writes: >| In article <1991Apr23.022057.29511@ux1.cso.uiuc.edu> allender@ux1.cso.uiuc.edu (Mark Allender) writes: >| The best thing would be to restructure the data file, using 202 byte blocks >| instead of 201 to be on the safe side. At worst, you're increasing the >| size of the data file by about .5%. >If it were just a data file, the best thing would be to make it a >plain text file and use fscanf() or fgets(), but he appears to want >only the header bit of it, so he should just be very careful to note >this binary representation could break under another operating >system/CPU/phase of the moon. If you want to take up disk space unnecessarily and decrease program performance, sure, you can create ASCII data files. Portability will be limited to the Intel 80x86 line, however, if you opt to use the binary method. -- +==========================================================================+ | Noam Mendelson ..!ucbvax!web!c60b-1eq | "I haven't lost my mind, | | c60b-1eq@web.Berkeley.EDU | it's backed up on tape | | University of California at Berkeley | somewhere." |