X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f Message-ID: X-Originating-IP: [70.50.143.180] X-Originating-Email: [april_white AT sympatico DOT ca] Message-ID: <4258677E.3090208@sympatico.ca> Date: Sat, 09 Apr 2005 19:38:38 -0400 From: April White User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.5) Gecko/20031013 Thunderbird/0.3 X-Accept-Language: en-us, en MIME-Version: 1.0 To: djgpp AT delorie DOT com Subject: Re: problem with saving struct to disk References: <129 DOT 5a9df4a1 DOT 2f89aa98 AT cs DOT com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 09 Apr 2005 23:38:40.0832 (UTC) FILETIME=[42963400:01C53D5D] Reply-To: djgpp AT delorie DOT com April White wrote: > KTrumpetsRule AT cs DOT com wrote: > >> I'm having a problem saving a struct to disk using DJGPP. Normally >> I'd think the problem was me but in view of the fact that it works >> under SOME circumstances, I'm not sure. Here's the details. > And she puts her foot in her mouth. I just re-read the code and noticed something new... POWER *ptr_power_0 is passed in the i/o functions, but the fread() and fwrite() are using &power_0. power_0 is a variable, but if *ptr_power_0 points to it, why is that parameter there at all. Since you did not provide examples how file_read_power() and file_save_power() are called, I cannot tell if there problem is at a higher level. It seems that if you are going to go through the trouble of having POWER *ptr_power_0, you should use it in the fread() and fwrite() calls, like I mistakenly / correctly wrote before. April -- The first step is to say nice things about myself. The second, to do nice things for myself. The third, to find someone to buy me nice things.