Re: where() behavior in append mode

new topic     » goto parent     » topic index » view thread      » older message » newer message

Hi Rob, Hi Bob  smile

Rob writes:

>Bob writes:
> > after 3 days of weeping and gnashing of teeth trying to 
> > squash a bug, I noticed a problem with where()

> I ran your demo program and got the same incorrect results.
> I also translated/compiled with DJGPP and got the correct results.

> I believe you are correct that where() is unreliable
> on files opened in append mode when WATCOM is involved,
> i.e. in ex and exw, which are compiled with WATCOM.

> By the way, your example does work correctly if you call 
> flush() after puts(), but you shouldn't have to do that.

> I searched the Web and found a message posted by someone
> who encountered this same problem in Watcom 10.6 (that I'm using).
> He also looked at the source code for Watcom 11.0, and 
> found that they have "fixed" the problem, by forcing a flush() 
> inside the C ftell() library routine that I call to implement 
>  where().
> 
> I think I'll just put a warning in the docs for where() 
> in the 2.3 final release. Not many people use where() with
> files opened in append mode. You are the first to report this.
> Thanks for the detailed error report, and I'm sorry about the 
> time and emotional energy you wasted.

Maybe the better way may be a *new* document in docs 
with such the local and temporary issues related just
to different C compilers and their versions and the 
tips to work around that treacherous numerous 
all standard but so different ANSI Cs.

Then you can strongly separate the inner Euphoria's 
not so bad bugs :) from the old, nasty, secret C bugs :-[
and keep the pure EU docs more and more stable to make 
the ISO standard EU in future. 

Why not ISO EU standard, folks, peoples and nations ? smile

Why ?

Can we dream or no, we can not ?

Regards,
Igor Kachan
kinz at peterlink.ru
P.S. And I'm too lazy to corrupt 
good library.doc and lib_u_z.htm
now and to correct them after 
Watcom Open Source 1.0 released.

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu