bug-ncurses
[Top][All Lists]
Advanced

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

What, exactly, _is_ "line-breakout optimization"?


From: G. Branden Robinson
Subject: What, exactly, _is_ "line-breakout optimization"?
Date: Sun, 19 May 2024 08:59:45 -0500

A Google search suggests that this curious phrase is attested in only
one place in all of recorded literature: an ncurses man page (and
quotations thereof).

Your search - "line-breakout optimization" -curses -ncurses - did not match any 
documents.

Here's the context.

   typeahead
     curses does “line‐breakout optimization” by looking for typeahead
     periodically while updating the screen.  If input is found, and it
     is coming from a terminal, the current update is postponed until
     refresh(3NCURSES) or doupdate is called again.  This allows faster
     response to commands typed in advance.  Normally, the input FILE
     pointer passed to newterm, or stdin in the case that initscr was
     used, will be used to do this typeahead checking.  The typeahead
     routine specifies that the file descriptor fd is to be used to
     check for typeahead instead.  If fd is -1, then no typeahead
     checking is done.

This term dates back at least to ncurses 1.8.7.[1]  It's since been
copied to a comment in ncurses/tty/tty_update.c. (I assume by Thomas,
but the way the Git repo is constructed from RCS makes "git blame"
challenging.)

I think the rest of the paragraph makes clear enough what's going on,
but I'm wondering if anyone has any idea what the original author of
these words was trying to get at.  This feature doesn't have anything to
do with line breaks in the textual sense, or with newline characters;
most curses apps don't run in "cooked" mode.  It also doesn't have
anything to do with break signals on a serial line.

In summary, I'm not sure how any of the words "line", "break", or "out"
are applicable to this discussion.

It thus seems like an unhelpful term to me, illuminating nothing, and
I'm inclined to submit a patch getting rid of it.

Anyone have any light to throw?

Regards,
Branden

[1] undated in the NEWS file, but certainly before April 1996

Attachment: signature.asc
Description: PGP signature


reply via email to

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