🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: demon.ip.developers
Article #614

Re: TextWin: why doesn't ftp '#' show immediately?

#614
From: John Washington
Date: Sun, 02 Mar 1997 00:00
54 lines
2735 bytes
Not interested in TextWin, Ka9q, or Dos?  Skip to (*) below!

I'm now 99.9% certain that TextWin's version of display() is
sitting in a pwait() unless either a \n is sent to it or
someone wakes it up.  "Wakes it up" is vague, but at
present, I'm hitting it with
                    tprintf ("\r%d ", counter++);
                    tflush ();
                    alert (sp->Display, 1);
                    psignal (sp->Display, 0);
and I haven't investigated whether one or both "wake it up".

Without the above wake-up, display() is waiting, but with
it, display() calls rrecvchar(), which returns -1, so there
is still no useful action.

So I no longer suspect tw's mechanisms for updating "dirty
areas" of windows, and at present my attn is directed to
usputs() in sockuser.c.  Indeed, this does have code
dependant on \n, but AFAICS the extra effect is to expand \n
to an end-of-line sequence if nec.

I can't see anything in this area that would work
differently, depending on whether or not the output goes to
the current window.  However, I feel vague on how buffers
get across from the output socket to the input socket of the
corresponding display process.

(*)

Anyhow, perhaps this thread could usefully wander off to
more general matters.  I wonder if other developers could
share their advice on testing/debugging?  I find that modern
debuggers, altho brilliant, are not well suited to
investigating time-dependant programs such as comms.  I've
not tried running ka9q under td386 (would it work?) because
I reckon that any attempt to use breakpoints or single step
would pretty soon drop the line or at least alter the
picture.

It's my birthday this week, but I doubt if I'll be getting a
hardware debugger.  So I feel reduced to a slow cycle of adding
a few lines of instrumentation and recompiling every time. :-(
Generally I either call a function to log info to a file, or
write direct to video ram.  On this particular problem I've
been writing to video ram at the top (border) of the
relevant window.  It works, but it feels like pushing a rock
uphill with my nose.

Anyone, any cures for a sore nose?

--
John Washington
Technical Details
Message-ID: <857297254snz@wash.demon.co.uk>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <856807122snz@wash.demon.co.uk> <857022636snx@warren.demon.co.uk> <857079981snz@wash.demon.co.uk>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10bb05,e158132d43e5f687
X-Google-Attributes: gid10bb05,public
From: john@wash.demon.co.uk (John Washington)
Subject: Re: TextWin: why doesn't ftp '#' show immediately?
Date: 1997/03/02
Message-ID: <857297254snz@wash.demon.co.uk>
X-Deja-AN: 222509364
X-Mail2News-Path: wash.demon.co.uk
References: <856807122snz@wash.demon.co.uk> <857022636snx@warren.demon.co.uk> <857079981snz@wash.demon.co.uk>
X-Mail2News-User: john@wash.demon.co.uk
Newsgroups: demon.ip.developers