xboard-devel
[Top][All Lists]
Advanced

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

Re: [XBoard-devel] Password dialog in ICS mode.


From: h.g. muller
Subject: Re: [XBoard-devel] Password dialog in ICS mode.
Date: Sun, 26 Jun 2011 15:00:29 +0200


A typical symptom is that one has to enter the password before the
password prompt shows (echo is correctly turned off however).

Indeed, I observe that too.

It might be due to a change I made in the ICS processing code (read_from_ics).
This has a loop that reads all waiting input from the ICS (not necessarily
anding in a linefeed), buffers it, and then starts processing it, by matching
commands at the beginning, and if there is nothing to match, advance the
matching point one character, and start matching there.

When the remaining part of the buffer is not a complete line, it copies it
to the start of the buffer, and returns, so that a new call to read_from_ics
(because new input is received) will append that to the 'leftover', and as soon
as there is again a complete line in the buffer the matching continues.

Now IIRC what I changed is that originally, the left-over partial line was sent
to the console before returning. And I let it be sent to the console only
after matching, i.e. after completion of the line by subsequent input.
The reason was that the original behavior interfered with colorization:
occasionally a message that should have been colorized would arrive split
over packets, and the left-over partial line would be printed before it was
match and recognized as having to be printed in another color, and thus
printed in the wrong color, so that only the trailing part of the line would
be colorized.

This got ever more annoying when I started to capture more and more
messages for prosessing, printing of which had to be suppressed.
You would see leading parts of such messages. This became kind of
unworkable with the seek graph, where FICS bombards you with seek
announcements, and the console was not-so-slowly filling up with
the leading part of those that happened to straddle packets. So I deferred
printing the left-over to the console to after it could be identified. This
cured the problem.

But unfortnately the password prompt is a partial line, so its printing
is now deferred until receptionof the next linefeed, which will only be
coming after you entered the password.

I guess the remedy must be to match for the password prompt
even in partial lines, and if it is recognized, print it to the cosole,
and remove it from the leftover.



reply via email to

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