delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/05/09/11:00:21

Date: Thu, 9 May 1996 17:47:42 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: j DOT aldrich6 AT genie DOT com
Cc: djgpp AT delorie DOT com
Subject: Re: i/o file handling - intege
In-Reply-To: <199605091349.AA117369770@relay1.geis.com>
Message-Id: <Pine.SUN.3.91.960509174409.20870A-100000@is>
Mime-Version: 1.0

On Thu, 9 May 1996 j DOT aldrich6 AT genie DOT com wrote:

> >What is the appropriate way to read/write integers from/to a file with the
> same
> >size as it is stored in
> >memory, i.e. a long integer (32bit) would occupy 4 bytes in the file. I have
> >reached a solution but it seems

This thread is going on for so long, that another bit of info, however 
insignificant, won't hurt anybody.  So here goes: did you know there are 
functions specifically designed to read and write 32-bit words?  Well, 
there are, they are called `getw' and `putw'.  Look them up in the libc 
Info reference.  Warning: they are neither ANSI nor POSIX, so don't use 
them in a program that should be portable.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019