bug-ncurses
[Top][All Lists]
Advanced

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

[PATCH 028/100] man/ncurses.3x: Revise and rename "Initialization" subse


From: G. Branden Robinson
Subject: [PATCH 028/100] man/ncurses.3x: Revise and rename "Initialization" subsection to "Application Structure".
Date: Sat, 30 Mar 2024 16:51:40 -0500

This section was muddling runtime initialization issues with concerns
that a programmer would have when starting to _write_ a curses program.

Mention the use of an event loop.

Move presentation of `endwin()` to the end.
---
 man/ncurses.3x | 17 ++++++++++++-----
 1 file changed, 12 insertions(+), 5 deletions(-)

diff --git a/man/ncurses.3x b/man/ncurses.3x
index 396cb0679..163b37087 100644
--- a/man/ncurses.3x
+++ b/man/ncurses.3x
@@ -169,10 +169,13 @@ .SH DESCRIPTION
 .I \%ncurses
 actions.
 See section \*(``ALTERNATE CONFIGURATIONS\*('' below.
-.SS Initialization
+.SS "Application Structure"
+A
+.I curses
+application uses information from the system locale;
+\fI\%setlocale\fP(3) prepares it for
 .I curses
-uses the locale initialized by the calling program.
-That is normally done with \fI\%setlocale\fP(3).
+library calls.
 .PP
 .RS 4
 .EX
@@ -180,7 +183,7 @@ .SS Initialization
 .EE
 .RE
 .PP
-If the locale is not initialized,
+If the locale is not thus initialized,
 the library assumes that characters are printable as in ISO\ 8859-1,
 to work with certain legacy programs.
 You should initialize the locale;
@@ -191,7 +194,6 @@ .SS Initialization
 must be called to initialize
 .I curses
 before use of any functions that deal with windows and screens.
-Call \fB\%endwin\fP(3X) before exiting the application.
 .PP
 To get character-at-a-time input without echoing\(emmost interactive,
 screen-oriented programs want this\(emuse the following sequence.
@@ -210,6 +212,11 @@ .SS Initialization
 keypad(stdscr, TRUE);
 .EE
 .RE
+.PP
+A
+.I curses
+program then often enters an event loop of some sort.
+Call \fB\%endwin\fP(3X) before exiting.
 .SS Overview
 A
 .I curses
-- 
2.30.2

Attachment: signature.asc
Description: PGP signature


reply via email to

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