bug-ncurses
[Top][All Lists]
Advanced

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

[PATCH 3/3] Stop using `ad`, `na`, `hy` requests.


From: G. Branden Robinson
Subject: [PATCH 3/3] Stop using `ad`, `na`, `hy` requests.
Date: Fri, 29 Sep 2023 14:14:06 -0500

* Migrate from `sp` request to man(7) `PP` macro in function synopses.
* Restore filling after synopsis (curs_sp_funcs).
* Protect literals from hyphenation using `\%` instead.
* Permit adjustment to be used in a long list of literals.

Some cargo-cult influence was discernible; it's not necessary to use the
`na` request when filling is disabled already with `nf`--`nf` implies
`na`.
---
 man/curs_sp_funcs.3x  | 52 ++++++++++++++++++++-----------------------
 man/curs_window.3x    | 26 ++++++++++------------
 man/form_variables.3x | 18 ++++++---------
 man/term_variables.3x |  4 +---
 4 files changed, 44 insertions(+), 56 deletions(-)

diff --git a/man/curs_sp_funcs.3x b/man/curs_sp_funcs.3x
index db8766f8..670e0f45 100644
--- a/man/curs_sp_funcs.3x
+++ b/man/curs_sp_funcs.3x
@@ -39,8 +39,7 @@ .SH NAME
 .SH SYNOPSIS
 \fB#include <curses.h>\fP
 .nf
-.na
-.sp
+.PP
 \fBint alloc_pair_sp(SCREEN* \fIsp\fB, int \fIfg\fB, int \fIbg\fB);\fR
 \fBint assume_default_colors_sp(SCREEN* \fIsp\fB, int \fIfg\fB, int 
\fIbg\fB);\fR
 \fBint baudrate_sp(SCREEN* \fIsp\fB);\fR
@@ -51,7 +50,7 @@ .SH SYNOPSIS
 \fBint curs_set_sp(SCREEN* \fIsp\fB, int \fIvisibility\fR);\fR
 \fBint def_prog_mode_sp(SCREEN* \fIsp\fB);\fR
 \fBint def_shell_mode_sp(SCREEN* \fIsp\fB);\fR
-.sp
+.PP
 \fBint define_key_sp(SCREEN* \fIsp\fB, const char * \fIdefinition\fB, int 
\fIkeycode\fB);\fR
 \fBint delay_output_sp(SCREEN* \fIsp\fB, int \fIms\fB);\fR
 \fBint doupdate_sp(SCREEN* \fIsp\fB);\fR
@@ -62,7 +61,7 @@ .SH SYNOPSIS
 \fBint extended_color_content_sp(SCREEN * \fIsp\fB, int \fIcolor\fB, int * 
\fIr\fB, int * \fIg\fB, int * \fIb\fB);\fR
 \fBint extended_pair_content_sp(SCREEN* \fIsp\fB, int \fIpair\fB, int * 
\fIfg\fB, int * \fIbg\fB);\fR
 \fBint extended_slk_color_sp(SCREEN* \fIsp\fB, int \fIpair\fB);\fR
-.sp
+.PP
 \fBvoid filter_sp(SCREEN* \fIsp\fB);\fR
 \fBint find_pair_sp(SCREEN* \fIsp\fB, int \fIfg\fB, int \fIbg\fB);\fR
 \fBint flash_sp(SCREEN* \fIsp\fB);\fR
@@ -73,7 +72,7 @@ .SH SYNOPSIS
 \fBWINDOW* getwin_sp(SCREEN* \fIsp\fB, FILE* \fIfilep\fB);\fR
 \fBint halfdelay_sp(SCREEN* \fIsp\fB, int \fItenths\fB);\fR
 \fBbool has_colors_sp(SCREEN* \fIsp\fB);\fR
-.sp
+.PP
 \fBbool has_ic_sp(SCREEN* \fIsp\fB);\fR
 \fBbool has_il_sp(SCREEN* \fIsp\fB);\fR
 \fBint has_key_sp(SCREEN* \fIsp\fB, int \fIch\fB);\fR
@@ -84,7 +83,7 @@ .SH SYNOPSIS
 \fBint init_pair_sp(SCREEN* \fIsp\fB, short \fIpair\fB, short \fIfg\fB, short 
\fIbg\fB);\fR
 \fBint intrflush_sp(SCREEN* \fIsp\fB, WINDOW* \fIwin\fB, bool \fIbf\fB);\fR
 \fBint is_cbreak_sp(SCREEN* \fIsp\fB);\fR
-.sp
+.PP
 \fBint is_echo_sp(SCREEN* \fIsp\fB);\fR
 \fBint is_nl_sp(SCREEN* \fIsp\fB);\fR
 \fBint is_raw_sp(SCREEN* \fIsp\fB);\fR
@@ -95,7 +94,7 @@ .SH SYNOPSIS
 \fBNCURSES_CONST char* keyname_sp(SCREEN* \fIsp\fB, int \fIc\fB);\fR
 \fBint keyok_sp(SCREEN* \fIsp\fB, int \fIkeycode\fB, bool \fIenable\fB);\fR
 \fBchar killchar_sp(SCREEN* \fIsp\fB);\fR
-.sp
+.PP
 \fBint killwchar_sp(SCREEN* \fIsp\fB, wchar_t *\fIch\fB);\fR
 \fBchar* longname_sp(SCREEN* \fIsp\fB);\fR
 \fBint mcprint_sp(SCREEN* \fIsp\fB, char *\fIdata\fB, int \fIlen\fB);\fR
@@ -106,7 +105,7 @@ .SH SYNOPSIS
 \fBWINDOW* newpad_sp(SCREEN* \fIsp\fB, int \fInrows\fB, int \fIncols\fB);\fR
 \fBSCREEN* new_prescr(void);\fP
 \fBSCREEN* newterm_sp(SCREEN* \fIsp\fB, const char *\fItype\fB, FILE 
*\fIoutfd\fB, FILE *\fIinfd\fB);\fR
-.sp
+.PP
 \fBWINDOW* newwin_sp(SCREEN* \fIsp\fB, int \fInlines\fB, int \fIncols\fB, int 
\fIbegin_y\fB, int \fIbegin_x\fB);\fR
 \fBint nl_sp(SCREEN* \fIsp\fB);\fR
 \fBint nocbreak_sp(SCREEN* \fIsp\fB);\fR
@@ -117,7 +116,7 @@ .SH SYNOPSIS
 \fBint noraw_sp(SCREEN* \fIsp\fB);\fR
 \fBint pair_content_sp(SCREEN* \fIsp\fB, short \fIpair\fB, short* \fIfg\fB, 
short* \fIbg\fB);\fR
 \fBvoid qiflush_sp(SCREEN* \fIsp\fB);\fR
-.sp
+.PP
 \fBint raw_sp(SCREEN* \fIsp\fB);\fR
 \fBvoid reset_color_pairs_sp(SCREEN* \fIsp\fB);\fR
 \fBint reset_prog_mode_sp(SCREEN* \fIsp\fB);\fR
@@ -128,7 +127,7 @@ .SH SYNOPSIS
 \fBint ripoffline_sp(SCREEN* \fIsp\fB, int \fIline\fB, int 
(*\fIinit\fB)(WINDOW* \fIwin\fB, int \fIfmt\fB));\fR
 \fBint savetty_sp(SCREEN* \fIsp\fB);\fR
 \fBint scr_init_sp(SCREEN* \fIsp\fB, const char *\fIfilename\fB);\fR
-.sp
+.PP
 \fBint scr_restore_sp(SCREEN* \fIsp\fB, const char *\fIfilename\fB);\fR
 \fBint scr_set_sp(SCREEN* \fIsp\fB, const char *\fIfilename\fB);\fR
 \fBint set_escdelay_sp(SCREEN* \fIsp\fB, int \fIms\fB);\fR
@@ -139,7 +138,7 @@ .SH SYNOPSIS
 \fBint slk_attron_sp(SCREEN* \fIsp\fB, const chtype \fIa\fB);\fR
 \fBattr_t slk_attr_sp(SCREEN* \fIsp\fB);\fR
 \fBint slk_clear_sp(SCREEN* \fIsp\fB);\fR
-.sp
+.PP
 \fBint slk_color_sp(SCREEN* \fIsp\fB, short \fIpair\fB);\fR
 \fBint slk_init_sp(SCREEN* \fIsp\fB, int \fIfmt\fB);\fR
 \fBchar* slk_label_sp(SCREEN* \fIsp\fB, int \fIlabnum\fB);\fR
@@ -150,7 +149,7 @@ .SH SYNOPSIS
 \fBint slk_touch_sp(SCREEN* \fIsp\fB);\fR
 \fBint start_color_sp(SCREEN* \fIsp\fB);\fR
 \fBattr_t term_attrs_sp(SCREEN* \fIsp\fB);\fR
-.sp
+.PP
 \fBchtype termattrs_sp(SCREEN* \fIsp\fB);\fR
 \fBchar* termname_sp(SCREEN* \fIsp\fB);\fR
 \fBint typeahead_sp(SCREEN* \fIsp\fB, int \fIfd\fB);\fR
@@ -161,33 +160,31 @@ .SH SYNOPSIS
 \fBvoid use_env_sp(SCREEN* \fIsp\fB, bool \fIbf\fB);\fR
 \fBint use_legacy_coding_sp(SCREEN* \fIsp\fB, int \fIlevel\fB);\fR
 \fBvoid use_tioctl_sp(SCREEN *\fIsp\fB, bool \fIbf\fB);\fR
-.sp
+.PP
 \fBint vid_attr_sp(SCREEN* \fIsp\fB, attr_t \fIattrs\fB, short \fIpair\fB, 
void * \fIopts\fB);\fR
 \fBint vid_puts_sp(SCREEN* \fIsp\fB, attr_t \fIattrs\fB, short \fIpair\fB, 
void * \fIopts\fB, NCURSES_SP_OUTC \fIputc\fB);\fR
 \fBint vidattr_sp(SCREEN* \fIsp\fB, chtype \fIattrs\fB);\fR
 \fBint vidputs_sp(SCREEN* \fIsp\fB, chtype \fIattrs\fB, NCURSES_SP_OUTC 
\fIputc\fB);\fR
 \fBwchar_t* wunctrl_sp(SCREEN* \fIsp\fB, cchar_t *\fIch\fB);\fR
-.ad
-.sp
+.PP
 \fB#include <form.h>\fP
-.sp
+.PP
 \fBFORM* new_form_sp(SCREEN* \fIsp\fB, FIELD **\fIfields\fB);\fR
-.sp
+.PP
 \fB#include <menu.h>\fP
-.sp
+.PP
 \fBMENU* new_menu_sp(SCREEN* \fIsp\fB, ITEM **\fIitems\fB);\fR
-.sp
+.PP
 \fB#include <panel.h>\fP
-.sp
+.PP
 \fBPANEL* ceiling_panel(SCREEN* \fIsp\fB);\fR
 .br
 \fBPANEL* ground_panel(SCREEN* \fIsp\fB);\fR
 .br
 \fBvoid update_panels_sp(SCREEN* \fIsp\fB);\fR
-.sp
+.PP
 \fB#include <term.h>\fP
-.sp
-.na
+.PP
 \fBint del_curterm_sp(SCREEN* \fIsp\fB, TERMINAL *\fIoterm\fB);\fR
 \fBint putp_sp(SCREEN* \fIsp\fB, const char *\fIstr\fB);\fR
 \fBint restartterm_sp(SCREEN* \fIsp\fB, NCURSES_CONST char*\fIterm\fB, int 
\fIfiledes\fB, int *\fIerrret\fB);\fR
@@ -198,18 +195,17 @@ .SH SYNOPSIS
 \fBchar* tgetstr_sp(SCREEN* \fIsp\fB, const char *\fIcapname\fB, char 
**\fIarea\fB);\fR
 \fBchar* tgoto_sp(SCREEN* \fIsp\fB, const char *\fIcapname\fB, int \fIcol\fB, 
int \fIrow\fB);\fR
 \fBint tigetflag_sp(SCREEN* \fIsp\fB, const char *\fIcapname\fB);\fR
-.sp
+.PP
 \fBint tigetnum_sp(SCREEN* \fIsp\fB, const char *\fIcapname\fB);\fR
 \fBchar* tigetstr_sp(SCREEN* \fIsp\fB, const char *\fIcapname\fB);\fR
 \fR/* may instead use 9 long parameters */\fR
 \fBchar* tparm_sp(SCREEN* \fIsp\fB, const char *\fIstr\fB, ...);\fR
 \fBint tputs_sp(SCREEN* \fIsp\fB, const char *\fIstr\fB, int \fIaffcnt\fB, 
NCURSES_SP_OUTC \fIputc\fB);\fR
-.ad
-.sp
+.PP
 \fB#include <unctrl.h>\fP
-.sp
+.PP
 \fBNCURSES_CONST char* unctrl_sp(SCREEN* \fIsp\fB, chtype \fIc\fB);\fR
-.ad
+.fi
 .SH DESCRIPTION
 This implementation can be configured to provide a set of functions which
 improve the ability to manage multiple screens.
diff --git a/man/curs_window.3x b/man/curs_window.3x
index 96391f4d..e3abfa36 100644
--- a/man/curs_window.3x
+++ b/man/curs_window.3x
@@ -104,22 +104,20 @@ .SS newwin
 all of the window modes are initialized to the default values.
 These functions set window modes after a window is created:
 .RS
-.na
 .PP
-idcok,
-idlok,
-immedok,
-keypad,
-leaveok,
-nodelay,
-scrollok,
-setscrreg,
-syncok,
-wbkgdset,
-wbkgrndset, and
-wtimeout
+\fB\%idcok\fP
+\fB\%idlok\fP
+\fB\%immedok\fP
+\fB\%keypad\fP
+\fB\%leaveok\fP
+\fB\%nodelay\fP
+\fB\%scrollok\fP
+\fB\%setscrreg\fP
+\fB\%syncok\fP
+\fB\%wbkgdset\fP
+\fB\%wbkgrndset\fP and
+\fB\%wtimeout\fP.
 .RE
-.ad
 .SS delwin
 Calling \fBdelwin\fP deletes the named window, freeing all memory
 associated with it (it does not actually erase the window's screen
diff --git a/man/form_variables.3x b/man/form_variables.3x
index 18ed864a..c787f817 100644
--- a/man/form_variables.3x
+++ b/man/form_variables.3x
@@ -29,19 +29,15 @@
 .\"
 .\" $Id: form_variables.3x,v 1.12 2023/09/16 23:39:54 tom Exp $
 .TH form_variables 3X 2023-09-16 "ncurses 6.4" "Library calls"
-.na
-.hy 0
 .SH NAME
-\fBTYPE_ALNUM\fP,
-\fBTYPE_ALPHA\fP,
-\fBTYPE_ENUM\fP,
-\fBTYPE_INTEGER\fP,
-\fBTYPE_IPV4\fP,
-\fBTYPE_NUMERIC\fP,
-\fBTYPE_REGEXP\fP \-
+\fB\%TYPE_ALNUM\fP,
+\fB\%TYPE_ALPHA\fP,
+\fB\%TYPE_ENUM\fP,
+\fB\%TYPE_INTEGER\fP,
+\fB\%TYPE_IPV4\fP,
+\fB\%TYPE_NUMERIC\fP,
+\fB\%TYPE_REGEXP\fP \-
 form system global variables
-.ad
-.hy
 .SH SYNOPSIS
 .nf
 \fB#include <form.h>\fP
diff --git a/man/term_variables.3x b/man/term_variables.3x
index 0e8716d6..e72eba91 100644
--- a/man/term_variables.3x
+++ b/man/term_variables.3x
@@ -167,9 +167,7 @@ .SS Terminfo Names
 .\"
 .SH NOTES
 The low-level terminfo interface is initialized using
-.hy 0
-\fBsetupterm\fP(3X).
-.hy
+\fB\%setupterm\fP(3X).
 The upper-level curses interface uses the low-level terminfo interface,
 internally.
 .\"
-- 
2.30.2

Attachment: signature.asc
Description: PGP signature


reply via email to

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