Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e412e7a

Browse files
committed
Fix lots of small markup nits.
Wrapped some long lines.
1 parent 23382f5 commit e412e7a

1 file changed

Lines changed: 64 additions & 54 deletions

File tree

Doc/lib/libcurses.tex

Lines changed: 64 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -79,17 +79,18 @@ \subsection{Functions \label{curses-functions}}
7979

8080
\begin{funcdesc}{color_content}{color_number}
8181
Returns the intensity of the red, green, and blue (RGB) components in
82-
the color \var{color_number}, which must be between 0 and COLORS. A
83-
3-tuple is returned, containing the R,G,B values for the given color,
84-
which will be between 0 (no component) and 1000 (maximum amount of
85-
component).
82+
the color \var{color_number}, which must be between \code{0} and
83+
\constant{COLORS}. A 3-tuple is returned, containing the R,G,B values
84+
for the given color, which will be between \code{0} (no component) and
85+
\code{1000} (maximum amount of component).
8686
\end{funcdesc}
8787

8888
\begin{funcdesc}{color_pair}{color_number}
8989
Returns the attribute value for displaying text in the specified
9090
color. This attribute value can be combined with
9191
\constant{A_STANDOUT}, \constant{A_REVERSE}, and the other
92-
\constant{A_*} attributes. \function{pair_number()} is the counterpart to this function.
92+
\constant{A_*} attributes. \function{pair_number()} is the
93+
counterpart to this function.
9394
\end{funcdesc}
9495

9596
\begin{funcdesc}{curs_set}{visibility}
@@ -231,30 +232,32 @@ \subsection{Functions \label{curses-functions}}
231232
characters typed by the user are immediately available to the program.
232233
However, after blocking for \var{tenths} tenths of seconds, an
233234
exception is raised if nothing has been typed. The value of
234-
\var{tenths} must be a number between 1 and 255. Use \function{nocbreak()} to
235-
leave half-delay mode.
235+
\var{tenths} must be a number between 1 and 255. Use
236+
\function{nocbreak()} to leave half-delay mode.
236237
\end{funcdesc}
237238

238239
\begin{funcdesc}{init_color}{color_number, r, g, b}
239240
Changes the definition of a color, taking the number of the color to
240241
be changed followed by three RGB values (for the amounts of red,
241242
green, and blue components). The value of \var{color_number} must be
242-
between 0 and COLORS. Each of \var{r}, \var{g}, \var{b}, must be a
243-
value between 0 and 1000. When \function{init_color()} is used, all
244-
occurrences of that color on the screen immediately change to the new
245-
definition. This function is a no-op on most terminals; it is active
246-
only if \function{can_change_color()} returns 1.
243+
between \code{0} and \constant{COLORS}. Each of \var{r}, \var{g},
244+
\var{b}, must be a value between \code{0} and \code{1000}. When
245+
\function{init_color()} is used, all occurrences of that color on the
246+
screen immediately change to the new definition. This function is a
247+
no-op on most terminals; it is active only if
248+
\function{can_change_color()} returns \code{1}.
247249
\end{funcdesc}
248250

249251
\begin{funcdesc}{init_pair}{pair_number, fg, bg}
250252
Changes the definition of a color-pair. It takes three arguments: the
251253
number of the color-pair to be changed, the foreground color number,
252254
and the background color number. The value of \var{pair_number} must
253-
be between 1 and COLOR_PAIRS-1 (the 0 color pair is wired to white on
254-
black and cannot be changed). The value of \var{fg} and \var{bg}
255-
arguments must be between 0 and COLORS. If the color-pair was
256-
previously initialized, the screen is refreshed and all occurrences of
257-
that color-pair are changed to the new definition.
255+
be between \code{1} and \code{COLOR_PAIRS - 1} (the \code{0} color
256+
pair is wired to white on black and cannot be changed). The value of
257+
\var{fg} and \var{bg} arguments must be between \code{0} and
258+
\constant{COLORS}. If the color-pair was previously initialized, the
259+
screen is refreshed and all occurrences of that color-pair are changed
260+
to the new definition.
258261
\end{funcdesc}
259262

260263
\begin{funcdesc}{initscr}{}
@@ -429,8 +432,9 @@ \subsection{Functions \label{curses-functions}}
429432
\begin{funcdesc}{setupterm}{\optional{termstr, fd}}
430433
Initializes the terminal. \var{termstr} is a string giving the
431434
terminal name; if omitted, the value of the TERM environment variable
432-
will be used. \var{fd} is the file descriptor to which any initialization sequences will be sent; if not supplied, the file descriptor for
433-
\code{sys.stdout} will be used.
435+
will be used. \var{fd} is the file descriptor to which any
436+
initialization sequences will be sent; if not supplied, the file
437+
descriptor for \code{sys.stdout} will be used.
434438
\end{funcdesc}
435439

436440
\begin{funcdesc}{start_color}{}
@@ -440,10 +444,11 @@ \subsection{Functions \label{curses-functions}}
440444

441445
\function{start_color()} initializes eight basic colors (black, red,
442446
green, yellow, blue, magenta, cyan, and white), and two global
443-
variables in the \module{curses} module, COLORS and COLOR_PAIRS,
444-
containing the maximum number of colors and color-pairs the terminal
445-
can support. It also restores the colors on the terminal to the
446-
values they had when the terminal was just turned on.
447+
variables in the \module{curses} module, \constant{COLORS} and
448+
\constant{COLOR_PAIRS}, containing the maximum number of colors and
449+
color-pairs the terminal can support. It also restores the colors on
450+
the terminal to the values they had when the terminal was just turned
451+
on.
447452
\end{funcdesc}
448453

449454
\begin{funcdesc}{termattrs}{}
@@ -459,16 +464,16 @@ \subsection{Functions \label{curses-functions}}
459464

460465
\begin{funcdesc}{tigetflag}{capname}
461466
Returns the value of the Boolean capability corresponding to the
462-
terminfo capability name \var{capname}. The value -1 is returned if
463-
\var{capname} is not a Boolean capability, or 0 if it is canceled or
464-
absent from the terminal description.
467+
terminfo capability name \var{capname}. The value \code{-1} is
468+
returned if \var{capname} is not a Boolean capability, or \code{0} if
469+
it is canceled or absent from the terminal description.
465470
\end{funcdesc}
466471

467472
\begin{funcdesc}{tigetnum}{capname}
468473
Returns the value of the numeric capability corresponding to the
469-
terminfo capability name \var{capname}. The value -2 is returned if
470-
\var{capname} is not a numeric capability, or -1 if it is canceled or absent
471-
from the terminal description.
474+
terminfo capability name \var{capname}. The value \code{-2} is
475+
returned if \var{capname} is not a numeric capability, or \code{-1} if
476+
it is canceled or absent from the terminal description.
472477
\end{funcdesc}
473478

474479
\begin{funcdesc}{tigetstr}{capname}
@@ -481,13 +486,14 @@ \subsection{Functions \label{curses-functions}}
481486
\begin{funcdesc}{tparm}{str\optional{,...}}
482487
Instantiates the string \var{str} with the supplied parameters, where
483488
\var{str} should be a parameterized string obtained from the terminfo
484-
database. E.g. \code{tparm(tigetstr("cup"),5,3)} could result in
485-
\code{"\e{}033[6;4H"}, the exact result depending on terminal type.
489+
database. E.g. \code{tparm(tigetstr("cup"), 5, 3)} could result in
490+
\code{'\e{}033[6;4H'}, the exact result depending on terminal type.
486491
\end{funcdesc}
487492

488493
\begin{funcdesc}{typeahead}{fd}
489494
Specifies that the file descriptor \var{fd} be used for typeahead
490-
checking. If \var{fd} is -1, then no typeahead checking is done.
495+
checking. If \var{fd} is \code{-1}, then no typeahead checking is
496+
done.
491497

492498
The curses library does ``line-breakout optimization'' by looking for
493499
typeahead periodically while updating the screen. If input is found,
@@ -516,13 +522,13 @@ \subsection{Functions \label{curses-functions}}
516522
\end{funcdesc}
517523

518524
\begin{funcdesc}{use_env}{flag}
519-
If used, this function should be called before \function{initscr} or
525+
If used, this function should be called before \function{initscr()} or
520526
newterm are called. When \var{flag} is false, the values of
521527
lines and columns specified in the terminfo database will be
522-
used, even if environment variables LINES and COLUMNS (used by
523-
default) are set, or if curses is running in a window (in which
524-
case default behavior would be to use the window size if LINES
525-
and COLUMNS are not set).
528+
used, even if environment variables \envvar{LINES} and
529+
\envvar{COLUMNS} (used by default) are set, or if curses is running in
530+
a window (in which case default behavior would be to use the window
531+
size if \envvar{LINES} and \envvar{COLUMNS} are not set).
526532
\end{funcdesc}
527533

528534
\subsection{Window Objects \label{curses-window-objects}}
@@ -669,7 +675,7 @@ \subsection{Window Objects \label{curses-window-objects}}
669675

670676
\begin{methoddesc}{echochar}{ch\optional{, attr}}
671677
Add character \var{ch} with attribute \var{attr}, and immediately
672-
call \method{refresh} on the window.
678+
call \method{refresh()} on the window.
673679
\end{methoddesc}
674680

675681
\begin{methoddesc}{enclose}{y, x}
@@ -691,7 +697,7 @@ \subsection{Window Objects \label{curses-window-objects}}
691697
\begin{methoddesc}{getch}{\optional{x, y}}
692698
Get a character. Note that the integer returned does \emph{not} have to
693699
be in \ASCII{} range: function keys, keypad keys and so on return numbers
694-
higher then 256. In no-delay mode, an exception is raised if there is
700+
higher than 256. In no-delay mode, an exception is raised if there is
695701
no input.
696702
\end{methoddesc}
697703

@@ -840,18 +846,19 @@ \subsection{Window Objects \label{curses-window-objects}}
840846
\end{methoddesc}
841847

842848
\begin{methoddesc}{mvwin}{new_y, new_x}
843-
Move the window so its upper-left corner is at \code{(\var{new_y}, \var{new_x})}.
849+
Move the window so its upper-left corner is at
850+
\code{(\var{new_y}, \var{new_x})}.
844851
\end{methoddesc}
845852

846853
\begin{methoddesc}{nodelay}{yes}
847-
If \var{yes} is 1, \method{getch()} will be non-blocking.
854+
If \var{yes} is \code{1}, \method{getch()} will be non-blocking.
848855
\end{methoddesc}
849856

850857
\begin{methoddesc}{notimeout}{yes}
851-
If \var{yes} is 1, escape sequences will not be timed out.
858+
If \var{yes} is \code{1}, escape sequences will not be timed out.
852859

853-
If \var{yes} is 0, after a few milliseconds, an escape sequence will
854-
not be interpreted, and will be left in the input stream as is.
860+
If \var{yes} is \code{0}, after a few milliseconds, an escape sequence
861+
will not be interpreted, and will be left in the input stream as is.
855862
\end{methoddesc}
856863

857864
\begin{methoddesc}{noutrefresh}{}
@@ -861,27 +868,27 @@ \subsection{Window Objects \label{curses-window-objects}}
861868
\end{methoddesc}
862869

863870
\begin{methoddesc}{overlay}{destwin\optional{, sminrow, smincol,
864-
dminrow, dmincol, dmaxrow, dmaxcol}}
871+
dminrow, dmincol, dmaxrow, dmaxcol}}
865872
Overlay the window on top of \var{destwin}. The windows need not be
866873
the same size, only the overlapping region is copied. This copy is
867874
non-destructive, which means that the current background character
868875
does not overwrite the old contents of \var{destwin}.
869876

870877
To get fine-grained control over the copied region, the second form
871-
of \method{overlay} can be used. \var{sminrow} and \var{smincol} are
878+
of \method{overlay()} can be used. \var{sminrow} and \var{smincol} are
872879
the upper-left coordinates of the source window, and the other variables
873880
mark a rectangle in the destination window.
874881
\end{methoddesc}
875882

876883
\begin{methoddesc}{overwrite}{destwin\optional{, sminrow, smincol,
877-
dminrow, dmincol, dmaxrow, dmaxcol}}
884+
dminrow, dmincol, dmaxrow, dmaxcol}}
878885
Overwrite the window on top of \var{destwin}. The windows need not be
879-
the same size, in which case only the overlapping region is copied. This copy is
880-
destructive, which means that the current background character
881-
overwrites the old contents of \var{destwin}.
886+
the same size, in which case only the overlapping region is
887+
copied. This copy is destructive, which means that the current
888+
background character overwrites the old contents of \var{destwin}.
882889

883890
To get fine-grained control over the copied region, the second form
884-
of \method{overwrite} can be used. \var{sminrow} and \var{smincol} are
891+
of \method{overwrite()} can be used. \var{sminrow} and \var{smincol} are
885892
the upper-left coordinates of the source window, the other variables
886893
mark a rectangle in the destination window.
887894
\end{methoddesc}
@@ -904,7 +911,8 @@ \subsection{Window Objects \label{curses-window-objects}}
904911
next \method{refresh()} call.
905912
\end{methoddesc}
906913

907-
\begin{methoddesc}{refresh}{ \optional{pminrow, pmincol, sminrow, smincol, smaxrow, smaxcol} }
914+
\begin{methoddesc}{refresh}{\optional{pminrow, pmincol, sminrow,
915+
smincol, smaxrow, smaxcol}}
908916
Update the display immediately (sync actual screen with previous
909917
drawing/deleting methods).
910918

@@ -913,7 +921,8 @@ \subsection{Window Objects \label{curses-window-objects}}
913921
needed to indicate what part of the pad and screen are involved.
914922
\var{pminrow} and \var{pmincol} specify the upper left-hand corner of the
915923
rectangle to be displayed in the pad. \var{sminrow}, \var{smincol},
916-
\var{smaxrow}, and \var{smaxcol} specify the edges of the rectangle to be displayed on the screen. The lower right-hand corner of the
924+
\var{smaxrow}, and \var{smaxcol} specify the edges of the rectangle to
925+
be displayed on the screen. The lower right-hand corner of the
917926
rectangle to be displayed in the pad is calculated from the screen
918927
coordinates, since the rectangles must be the same size. Both
919928
rectangles must be entirely contained within their respective
@@ -1283,7 +1292,8 @@ \subsection{Textbox objects \label{curses-textpad-objects}}
12831292
\lineii{Ctrl-A}{Go to left edge of window.}
12841293
\lineii{Ctrl-B}{Cursor left, wrapping to previous line if appropriate.}
12851294
\lineii{Ctrl-D}{Delete character under cursor.}
1286-
\lineii{Ctrl-E}{Go to right edge (stripspaces off) or end of line (stripspaces on).}
1295+
\lineii{Ctrl-E}{Go to right edge (stripspaces off) or end of line
1296+
(stripspaces on).}
12871297
\lineii{Ctrl-F}{Cursor right, wrapping to next line when appropriate.}
12881298
\lineii{Ctrl-G}{Terminate, returning the window contents.}
12891299
\lineii{Ctrl-H}{Delete character backward.}

0 commit comments

Comments
 (0)