bug-ncurses
[Top][All Lists]
Advanced

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

Re: Dan Weaver


From: Philippe Blain
Subject: Re: Dan Weaver
Date: Wed, 22 Jan 2003 20:42:29 +0100

----- Original Message -----
From: "Daniel Weaver" <address@hidden>
To: "Philippe Blain" <address@hidden>
Cc: "bug-ncurses" <address@hidden>
Sent: Thursday, January 16, 2003 2:48 AM
Subject: Re: Corrections for 20030111


>
> The code is correct.  It should NOT take into consideration XON/XOFF,
> pad baud rade and no pad character.
>
> Lets take for example XON/XOFF.  If I define two terminfo definitions
> with everything the same but the XON/XOFF boolean, ncurses should
> send the same strings.  The cursor movement would have the exact same
> cost regardless of the settings for XON/XOFF.
> -----------------------------
> Dan Weaver, ZNYX Networks
>
----------------------------------------------------------------------------
If two terminfo definitions have everything the same but the XON/XOFF
boolean,
any delay that is in a terminfo capability is not executed (by waiting or
sending nulls) when XON is true.
By doing so, their COSTS in 1/10th of milliseconds are different.

But, the terminfo man pages say :

       ..........   Normally,  padding  is advisory if the device
       has the xon capability; it is used  for  cost  computation
       but  does not trigger delays.  ...........................

   Delays and Padding
       .................
       If the terminal uses xon/xoff handshaking for flow control
       (that  is, it automatically emits ^S back to the host when
       its input buffers are close to full), set xon.  This capa­
       bility  suppresses  the emission of padding.  You can also
       set it for memory-mapped console devices effectively  that
=>     don't  have  a  speed  limit.   Padding information should
=>     still be included so that routines can make  better  deci­
=>     sions about relative costs, but actual pad characters will
=>     not be transmitted.
       .................

On that point, the current code of _nc_msec_cost() follows the text.
When 'padding_baud_rate' is defined, nothing is said about the cost.

       .................
       If pb (padding baud rate) is given, padding is  suppressed
       at  baud rates below the value of pb.  If the entry has no
       padding baud rate, then whether padding is emitted or  not
       is completely controlled by xon.
       .................

Suppose you wanted to say that delays are ALWAYS included in the costs,
but not NECESSARILY emitted.  So ok, we must follow the text and not
count on what is truly emitted.

Note that in ncurses, when comparing costs of different solutions, the
costs are often approximative, and i doubt this method always gives the
better choice (without adding the time spent computing the smaller cost).

----------------------------------------------------------------------------
- Philippe






reply via email to

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