lout-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Lout FAQ/HOWTO


From: Valeriy E. Ushakov
Subject: Re: Lout FAQ/HOWTO
Date: Fri, 31 Oct 1997 00:35:38 +0300

On Thu, Oct 30, 1997 at 02:34:54PM -0500, Chris Herborth wrote:

> Previously, Valeriy E. Ushakov (address@hidden) writes:
> > On Thu, Oct 16, 1997 at 06:09:16PM +0200, Eric Marsden wrote:
> > 
> > >    <p>Several of these ports have problems reading Lout <tt/.li/
> > >    database files.
> > 
> > It's misleading.  Only NT port has this problem, and you don't mention
> > it.  I'm looking into this bug in my spare time.  It looks like a
> > stdio problem (Lout reads input in 8k chunks, but ftell later returns
> > some weird value not divisible by 8k).
> 
> I've had similar symptoms under QNX and BeOS as well; QNX runs on Intel
> boxes, is POSIX 1003.1, and features WATCOM C as a compiler, and BeOS
> runs on PowerPC boxes, is nearly POSIX 1003.1, and features Metrowerks
> C++ as a compiler.

I wasn't aware of your problems.  Does QNX and BeOS has text/binary
file distinction?

I've traced NT bug down to wrong return value from ftell() in
LexNextTokenPos() in z02.c that is solely responsible for wrong
offsets in .li files.

The VC4.2 ftell() logic is rather contorted and the state of FILE
looks odd.  I'm yet to find some time to look at what happens with
FILE in the fread().  Yes, *the* fread() as there's the ONLY call to
fread() in the whole program in srcnext() in z02.c (well, there's
another one in z45.c in borrowed GNU sort code, but it's unrelated to
Lout's own IO).

As a shotgun debugging measure, try to lower the BUFFER_SIZE in z02.c
(8k as shipped) to match your stdio buffering (4k in VC4.2).  Haven't
tried this, but going to ASAP.  (I'm hunting a nasty memory leak in
another program and it consumes most of my time).

Hope it helps.  If you'll fix this bug in either of your ports, please
let me know what the problem was.

PS: Hmm, can you please send me a copy of standard.li you get after
    init run.  I'd like to compare it with the one I got on NT.

SY, Uwe
-- 
address@hidden                         |       Zu Grunde kommen
http://www.ptc.spbu.ru/~uwe/            |       Ist zu Grunde gehen


reply via email to

[Prev in Thread] Current Thread [Next in Thread]