Mail Archives: djgpp/1998/04/16/02:20:37
From: | "John M. Aldrich" <fighteer AT cs DOT com>
|
Newsgroups: | comp.os.msdos.djgpp
|
Subject: | Re: A weird FWRITE() problem...
|
Date: | Wed, 15 Apr 1998 18:27:13 -0400
|
Organization: | Two pounds of chaos and a pinch of salt.
|
Lines: | 25
|
Message-ID: | <35353441.616C@cs.com>
|
References: | <01bd6681$a7519d40$ddc832ce AT tonythed>
|
NNTP-Posting-Host: | ppp228.cs.com
|
Mime-Version: | 1.0
|
To: | djgpp AT delorie DOT com
|
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp
|
Tony wrote:
>
> For some reason the fwrite() function is over writing the FILE structure
> the the pointer is pointing to. The pointer value is not changed but the
> data of the FILE structure is being over written with data from the buffer.
> Everything is correct just before the fwrite() function is executed. After
> execution, the file is written correctly but the FILE struc data is now
> trashed with data from the buffer. It all occurs during the execution of
> the function itself. I'm running inside RHIDE, using DR-DOS O/S, and
> CWSDPMI.
>
> Anyone got any ideas??? This doesn't seem to make any sense.
Please post enough sample code to demonstrate the problem, so that we
can at least make some vaguely accurate guess about what's wrong.
Without any useful information, all I can suggest is that you're making
some error when you pass the FILE * pointer to fwrite().
--
---------------------------------------------------------------------
| John M. Aldrich |"Men rarely (if ever) manage to dream |
| aka Fighteer I |up a god superior to themselves. Most |
| mailto:fighteer AT cs DOT com |gods have the manners and morals of a |
| http://www.cs.com/fighteer |spoiled child." - Lazarus Long |
---------------------------------------------------------------------
- Raw text -