delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2013/12/05/08:50:37

X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f
X-Recipient: djgpp AT delorie DOT com
Message-ID: <52A08513.3050807@gmx.de>
Date: Thu, 05 Dec 2013 14:52:19 +0100
From: Juan Manuel Guerrero <juan DOT guerrero AT gmx DOT de>
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.1.0
MIME-Version: 1.0
To: djgpp AT delorie DOT com
Subject: Re: Question about different behavior of fclose/fread on plain dos
and windows.
References: <529D448A DOT 7050208 AT gmx DOT de> <831u1u5se3 DOT fsf AT gnu DOT org> <529DD111 DOT 8050000 AT gmx DOT de> <83r49u3xhn DOT fsf AT gnu DOT org> <529FEB30 DOT 301 AT gmx DOT de> <op DOT w7l9zdbg5zc71u AT localhost>
In-Reply-To: <op.w7l9zdbg5zc71u@localhost>
X-Provags-ID: V03:K0:tM3TCke0hs50HF9jXWpce0i5znY4g1X69KT+LrgRb/odj72cmKa
iVgxGGYurgk08LAlj/xWKdzzOVMzHm5DKWMSUcQrHiW3YijNzBMQ7CSPeyFMMpgWLoY6or7
p05vROY76n6Pcv3Nz/D1wqYivilet2+9J3c/XSW4VVE+0krgYUNaV15DGGBkdhFXbBo174g
7X/7NW0F87KGv7b8mFI0Q==
Reply-To: djgpp AT delorie DOT com

Am 05.12.2013 12:24, schrieb Rod Pemberton:
> On Wed, 04 Dec 2013 21:55:44 -0500, Juan Manuel Guerrero <juan DOT guerrero AT gmx DOT de> wrote:
>
>> I do not have OpenWATCOM or other dos compilers to compare against DJGPP.
>>
>
> I tested OpenWatcom v1.3.  I don't have newer v1.7 or current v.1.9
> installed.  I tested the code as 16-bit (wcl/l=dos) and 32-bit
> (wcl386/l=dos4g), in real-mode MS-DOS v7.10 and Window SE DOS console,
> and without file.txt, with file.txt, with file.txt where 'pipapo' was
> changed to 'zzzzzz'.  So, that's total of 12 tests.
>
> OW returned in all cases:
>
> fwrite(fw) OK (7): pipapo
> fread(fr) OK (0):
> fread(fr) OK (7): pipapo
>
>
> Rod Pemberton

In that case I fear we are seeing a bug.
I have used the following batch file to check
all windows and dos versions available to me:

-----------------------------------------------
del *.txt

: Compiled with 2.03
a3 > a3.txt
sed "s/pipapo/qwertz123/" file.txt > file
mv -vf file file.txt
a3 >> a3.txt
del file.txt

: Compiled with 2.04
a4 > a4.txt
sed "s/pipapo/qwertz123/" file.txt > file
mv -vf file file.txt
a4 >> a4.txt
del file.txt

: Compiled with CVS repository code
a5 > a5.txt
sed "s/pipapo/qwertz123/" file.txt > file
mv -vf file file.txt
a5 >> a5.txt
del file.txt
-----------------------------------------------


All results are identical on all systems.  I will
print only the result for a5 (Compiled with CVS
repository code).  The only difference to the other
results is that they do not have "before" and after"
entries:


Win98SE
before: 0
after: 0
before: 0
after: 0
fwrite(fw) OK (7): pipapo
fread(fr) OK (0):
fread(fr) OK (7): pipapo
before: 10
after: 0
before: 0
after: 0
fwrite(fw) OK (7): pipapo
fread(fr) OK (0):
fread(fr) OK (7): pipapo

MSDOS 7.1
before: 0
after: 0
before: 0
after: 0
fwrite(fw) OK (7): pipapo
fread(fr) OK (0):
fread(fr) KO (0):
before: 10
after: 0
before: 10
after: 10
fwrite(fw) OK (7): pipapo
fread(fr) KO (7): qwertz1 AT k
@
fread(fr) OK (7): qwertz1 AT k
@


The bottom line is again, all windows versions work, all dos versions fail.


Regards,
Juan M. Guerrero

- Raw text -


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