X-Git-Url: https://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=doc%2Fhtml%2Fman%2Fcurs_outopts.3x.html;h=819134c62ae619c9c21b5667b0be94d1c27b007a;hp=5fe4fa1eea5223d57f83a1b1d9a7775787962cf8;hb=91d451ffc473b358d8d74506d2da8871e44fbd7b;hpb=cb4427a16794d98049b4d790b810d62217501f9f diff --git a/doc/html/man/curs_outopts.3x.html b/doc/html/man/curs_outopts.3x.html index 5fe4fa1e..819134c6 100644 --- a/doc/html/man/curs_outopts.3x.html +++ b/doc/html/man/curs_outopts.3x.html @@ -1,6 +1,7 @@ - @@ -47,7 +48,7 @@
clearok, idlok, idcok, immedok, leaveok, setscrreg, wsetscrreg, - scrollok, nl, nonl - curses output options + scrollok - curses output options
@@ -58,11 +59,10 @@ void idcok(WINDOW *win, bool bf); void immedok(WINDOW *win, bool bf); int leaveok(WINDOW *win, bool bf); + int scrollok(WINDOW *win, bool bf); + int setscrreg(int top, int bot); int wsetscrreg(WINDOW *win, int top, int bot); - int scrollok(WINDOW *win, bool bf); - int nl(void); - int nonl(void);
@@ -117,7 +117,17 @@ cursor motions. -
+
+ The scrollok option controls what happens when the cursor of a window + is moved off the edge of the window or scrolling region, either as a + result of a newline action on the bottom line, or typing the last char- + acter of the last line. If disabled, (bf is FALSE), the cursor is left + on the bottom line. If enabled, (bf is TRUE), the window is scrolled + up one line (Note that to get the physical scrolling effect on the ter- + minal, it is also necessary to call idlok). + + +
The setscrreg and wsetscrreg routines allow the application programmer to set a software scrolling region in a window. The top and bot param- eters are the line numbers of the top and bottom margin of the @@ -131,57 +141,37 @@ line capability, they will probably be used by the output routines.) -
- The scrollok option controls what happens when the cursor of a window - is moved off the edge of the window or scrolling region, either as a - result of a newline action on the bottom line, or typing the last char- - acter of the last line. If disabled, (bf is FALSE), the cursor is left - on the bottom line. If enabled, (bf is TRUE), the window is scrolled - up one line (Note that to get the physical scrolling effect on the ter- - minal, it is also necessary to call idlok). - - -
- The nl and nonl routines control whether the underlying display device - translates the return key into newline on input, and whether it trans- - lates newline into return and line-feed on output (in either case, the - call addch('\n') does the equivalent of return and line feed on the - virtual screen). Initially, these translations do occur. If you dis- - able them using nonl, curses will be able to make better use of the - line-feed capability, resulting in faster cursor motion. Also, curses - will then be able to detect the return key. - -
- The functions setscrreg and wsetscrreg return OK upon success and ERR - upon failure. All other routines that return an integer always return + The functions setscrreg and wsetscrreg return OK upon success and ERR + upon failure. All other routines that return an integer always return OK. X/Open Curses does not define any error conditions. - In this implementation, those functions that have a window pointer will - return an error if the window pointer is null. + In this implementation, - wclrtoeol - returns an error if the cursor position is about to wrap. + o those functions that have a window pointer will return an error if + the window pointer is null - wsetscrreg - returns an error if the scrolling region limits extend out- - side the window. + o wsetscrreg returns an error if the scrolling region limits extend + outside the window. - X/Open does not define any error conditions. This implementation re- + X/Open does not define any error conditions. This implementation re- turns an error if the window pointer is null.
These functions are described in the XSI Curses standard, Issue 4. - The XSI Curses standard is ambiguous on the question of whether raw - should disable the CRLF translations controlled by nl and nonl. BSD - curses did turn off these translations; AT&T curses (at least as late - as SVr1) did not. We choose to do so, on the theory that a programmer - requesting raw input wants a clean (ideally 8-bit clean) connection - that the operating system will not alter. + From the outset, ncurses used nl/nonl to control the conversion of new- + lines to carriage return/line-feed on output as well as input. XSI + Curses documents only the use of these functions for input. This dif- + ference arose from converting the pcurses source (which used ioctl + calls with the sgttyb structure) to termios (i.e., the POSIX terminal + interface). In the former, both input and output were controlled via a + single option CRMOD, while the latter separates these features. Be- + cause that conversion interferes with output optimization, nl/nonl were + amended after ncurses 6.2 to eliminate their effect on output. Some historic curses implementations had, as an undocumented feature, the ability to do the equivalent of clearok(..., 1) by saying touch- @@ -200,8 +190,8 @@
- Note that clearok, leaveok, scrollok, idcok, nl, nonl and setscrreg may - be macros. + Note that clearok, leaveok, scrollok, idcok, and setscrreg may be + macros. The immedok routine is useful for windows that are used as terminal em- ulators. @@ -226,9 +216,8 @@