On Thursday 14 May 2009 16:06:36 Cathey, Jim wrote:
> >The escape reply should always come in as a single unit
> >without interspersed characters
>
> Yabbut... if the save/move/probe/restore is issued in a
> single write() call then the (eventual) response can be
> trusted to give you an accurate size.  While the returned
> sequence will always be contiguous it could be split over
> more than one read() call due to VMIN/VTIME, phase of the
> moon, etc., and could be preceded or followed by unrelated
> user input activity.  All of which has to be sorted out.

All of which was discussed back in october when I was fixing it in the vi 
escape parsing logic, which got genericized into libbb shortly afterwards 
according to the svn log.  (Serial ports are _guaranteed_ to decouple this, 
but it's fixable, and what I was talking about was the _sequence_ of 
characters, not the blocking.)

> There will always be border cases for a where-am-I probe,
> due to shared tty devices.  It's not 100% reliable, and
> I recommend against it.

What the heck is a "shared tty device"?

> I think the best solution (best as in relatively easy to
> implement, yet as foolproof as can be had) is to use the probe
> once to query width, and run open-loop thereafter while using
> a ^L (or whatever) to resync the view if it gets messed up
> for any reason.

*bzzt*  Thanks for playing.

> It might be nice, however, if your shell was still capable
> of running against an ASR-33, or ADM-3, or some other non-VT100
> type device, so you'd need to know when not to probe.  (TERM=
> setting?  set -o setting?)

Busybox does not compile or run on Unix System 6.

> >The really _fun_ part is where the user hits cursor up followed
> >by capital R.
>
> This used to be handled by noting that the characters were received
> far enough apart that they couldn't be considered to be an automatic
> response, and thus weren't candidates for functions but rather just
> individual keystrokes.

Been there, done that, go look at the thread from october.

Rob
-- 
Latency is more important than throughput. It's that simple. - Linus Torvalds
_______________________________________________
busybox mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/busybox

Reply via email to