bug-ncurses
[Top][All Lists]
Advanced

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

[PATCH 1/9] Set synopses more economically.


From: G. Branden Robinson
Subject: [PATCH 1/9] Set synopses more economically.
Date: Fri, 22 Sep 2023 12:58:04 -0500

Bracket synopsis with `nf` and `fi` requests; if one is going to use
*roff requests, it's better to use these than numerous `br` requests.

Use `PP` in favor of `sp`.

* man/curs_color.3x:
* man/curs_getyx.3x:
* man/curs_inopts.3x:
* man/curs_legacy.3x:
* man/curs_memleaks.3x:
* man/curs_mouse.3x:
* man/new_pair.3x: Do it.
---
 man/curs_color.3x    | 25 ++++++++-----------------
 man/curs_getyx.3x    |  7 +++----
 man/curs_inopts.3x   | 34 ++++++++++------------------------
 man/curs_legacy.3x   | 16 +++++++---------
 man/curs_memleaks.3x | 11 ++++-------
 man/curs_mouse.3x    | 17 +++++++----------
 man/curs_trace.3x    | 21 +++++++--------------
 man/new_pair.3x      |  6 +++---
 8 files changed, 49 insertions(+), 88 deletions(-)

diff --git a/man/curs_color.3x b/man/curs_color.3x
index 744ad385..7357fa99 100644
--- a/man/curs_color.3x
+++ b/man/curs_color.3x
@@ -55,41 +55,32 @@ .SH NAME
 \fB\%PAIR_NUMBER\fP \-
 manipulate terminal colors with \fIcurses\fR
 .SH SYNOPSIS
+.nf
 \fB#include <curses.h>\fP
-.sp
+.PP
 \fBint start_color(void);\fP
-.sp
+.PP
 \fBbool has_colors(void);\fP
-.br
 \fBbool can_change_color(void);\fP
-.sp
+.PP
 \fBint init_pair(short \fIpair\fB, short \fIf\fB, short \fIb\fB);\fR
-.br
 \fBint init_color(short \fIcolor\fB, short \fIr\fB, short \fIg\fB, short 
\fIb\fB);\fR
-.br
 /* extensions */
-.br
 \fBint init_extended_pair(int \fIpair\fB, int \fIf\fB, int \fIb\fB);\fR
-.br
 \fBint init_extended_color(int \fIcolor\fB, int \fIr\fB, int \fIg\fB, int 
\fIb\fB);\fR
-.sp
+.PP
 \fBint color_content(short \fIcolor\fB, short *\fIr\fB, short *\fIg\fB, short 
*\fIb\fB);\fR
-.br
 \fBint pair_content(short \fIpair\fB, short *\fIf\fB, short *\fIb\fB);\fR
-.br
 /* extensions */
-.br
 \fBint extended_color_content(int \fIcolor\fB, int *\fIr\fB, int *\fIg\fB, int 
*\fIb\fB);\fR
-.br
 \fBint extended_pair_content(int \fIpair\fB, int *\fIf\fB, int *\fIb\fB);\fR
-.sp
+.PP
 /* extensions */
-.br
 \fBvoid reset_color_pairs(void);\fP
-.sp
+.PP
 \fBint COLOR_PAIR(int \fIn\fB);\fR
-.br
 \fBPAIR_NUMBER(\fIattrs\fB);\fR
+.fi
 .SH DESCRIPTION
 .SS Overview
 \fBcurses\fP supports color attributes on terminals with that capability.
diff --git a/man/curs_getyx.3x b/man/curs_getyx.3x
index 05bce4f9..ebed93b9 100644
--- a/man/curs_getyx.3x
+++ b/man/curs_getyx.3x
@@ -36,15 +36,14 @@ .SH NAME
 \fB\%getmaxyx\fP \-
 get \fIcurses\fR cursor and window coordinates
 .SH SYNOPSIS
+.nf
 \fB#include <curses.h>\fP
-.sp
+.PP
 \fBvoid getyx(WINDOW *\fIwin\fB, int \fIy\fB, int \fIx\fB);\fR
-.br
 \fBvoid getparyx(WINDOW *\fIwin\fB, int \fIy\fB, int \fIx\fB);\fR
-.br
 \fBvoid getbegyx(WINDOW *\fIwin\fB, int \fIy\fB, int \fIx\fB);\fR
-.br
 \fBvoid getmaxyx(WINDOW *\fIwin\fB, int \fIy\fB, int \fIx\fB);\fR
+.fi
 .SH DESCRIPTION
 The \fBgetyx\fP macro places the current cursor position of the given window in
 the two integer variables \fIy\fP and \fIx\fP.
diff --git a/man/curs_inopts.3x b/man/curs_inopts.3x
index 8e9b9863..b96c8103 100644
--- a/man/curs_inopts.3x
+++ b/man/curs_inopts.3x
@@ -60,56 +60,42 @@ .SH NAME
 \fB\%typeahead\fP \-
 get and set \fIcurses\fR terminal input options
 .SH SYNOPSIS
+.nf
 \fB#include <curses.h>\fP
 .PP
 \fBint cbreak(void);\fP
-.br
 \fBint nocbreak(void);\fP
-.sp
+.PP
 \fBint echo(void);\fP
-.br
 \fBint noecho(void);\fP
-.sp
+.PP
 \fBint intrflush(WINDOW *\fIwin\fB, bool \fIbf\fB);\fR
-.br
 \fBint keypad(WINDOW *\fIwin\fB, bool \fIbf\fB);\fR
-.br
 \fBint meta(WINDOW *\fIwin\fB, bool \fIbf\fB);\fR
-.br
 \fBint nodelay(WINDOW *\fIwin\fB, bool \fIbf\fB);\fR
-.br
 \fBint notimeout(WINDOW *\fIwin\fB, bool \fIbf\fB);\fR
-.sp
+.PP
 \fBint nl(void);\fP
-.br
 \fBint nonl(void);\fP
-.sp
+.PP
 \fBint raw(void);\fP
-.br
 \fBint noraw(void);\fP
-.sp
+.PP
 \fBvoid qiflush(void);\fP
-.br
 \fBvoid noqiflush(void);\fP
-.sp
+.PP
 \fBint halfdelay(int \fItenths\fB);\fR
-.br
 \fBvoid timeout(int \fIdelay\fB);\fR
-.br
 \fBvoid wtimeout(WINDOW *\fIwin\fB, int \fIdelay\fB);\fR
-.sp
+.PP
 \fBint typeahead(int \fIfd\fB);\fR
-.sp
+.PP
 /* extensions */
-.br
 \fBint is_cbreak(void);\fP
-.br
 \fBint is_echo(void);\fP
-.br
 \fBint is_nl(void);\fP
-.br
 \fBint is_raw(void);\fP
-.br
+.nf
 .SH DESCRIPTION
 The \fBncurses\fP library provides several functions which let an application
 change the way input from the terminal is handled.
diff --git a/man/curs_legacy.3x b/man/curs_legacy.3x
index 86c0176f..b36c9bb6 100644
--- a/man/curs_legacy.3x
+++ b/man/curs_legacy.3x
@@ -45,25 +45,23 @@ .SH NAME
 \fB\%getpary\fP \-
 get \fIcurses\fR cursor and window coordinates or attributes (legacy)
 .SH SYNOPSIS
+.nf
 \fB#include <curses.h>\fP
-.sp
+.PP
 \fBint getattrs(const WINDOW *\fIwin\fB);\fR
-.sp
+.PP
 \fBint getbegx(const WINDOW *\fIwin\fB);\fR
-.br
 \fBint getbegy(const WINDOW *\fIwin\fB);\fR
-.sp
+.PP
 \fBint getcurx(const WINDOW *\fIwin\fB);\fR
-.br
 \fBint getcury(const WINDOW *\fIwin\fB);\fR
-.sp
+.PP
 \fBint getmaxx(const WINDOW *\fIwin\fB);\fR
-.br
 \fBint getmaxy(const WINDOW *\fIwin\fB);\fR
-.sp
+.PP
 \fBint getparx(const WINDOW *\fIwin\fB);\fR
-.br
 \fBint getpary(const WINDOW *\fIwin\fB);\fR
+.fi
 .SH DESCRIPTION
 These legacy functions are simpler to use than the X/Open Curses functions:
 .bP
diff --git a/man/curs_memleaks.3x b/man/curs_memleaks.3x
index c04598a9..5dd0f5c2 100644
--- a/man/curs_memleaks.3x
+++ b/man/curs_memleaks.3x
@@ -42,21 +42,18 @@ .SH NAME
 \fB\%exit_terminfo\fP \-
 check for memory leaks in \fIcurses\fR
 .SH SYNOPSIS
+.nf
 \fB#include <curses.h>\fP
-.br
 \fBvoid exit_curses(int \fIcode\fB);\fR
-.sp
+.PP
 \fB#include <term.h>\fP
-.br
 \fBvoid exit_terminfo(int \fIcode\fB);\fR
-.sp
+.PP
 /* deprecated (intentionally not declared in curses.h or term.h) */
-.br
 \fBvoid _nc_freeall(void);\fP
-.br
 \fBvoid _nc_free_and_exit(int \fIcode\fB);\fR
-.br
 \fBvoid _nc_free_tinfo(int \fIcode\fB);\fR
+.fi
 .SH DESCRIPTION
 These functions are used to simplify analysis of memory leaks in the ncurses
 library.
diff --git a/man/curs_mouse.3x b/man/curs_mouse.3x
index 31d128f3..dcbeaf01 100644
--- a/man/curs_mouse.3x
+++ b/man/curs_mouse.3x
@@ -68,35 +68,32 @@ .SH NAME
 \fB\%mouseinterval\fP \-
 get mouse events in \fIcurses\fR
 .SH SYNOPSIS
+.nf
 \fB#include <curses.h>\fP
 .PP
 \fBtypedef unsigned long mmask_t;\fP
 .PP
-.nf
 \fBtypedef struct {\fP
 \fB    short id;         \fI/* ID to distinguish multiple devices */\fR
 \fB    int x, y, z;      \fI/* event coordinates */\fR
 \fB    mmask_t bstate;   \fI/* button state bits */\fR
 \fB} MEVENT;\fP
-.fi
 .PP
 \fBbool has_mouse(void);\fP
-.sp
+.PP
 \fBint getmouse(MEVENT *\fIevent\fB);\fR
-.br
 \fBint ungetmouse(MEVENT *\fIevent\fB);\fR
-.sp
+.PP
 \fBmmask_t mousemask(mmask_t \fInewmask\fB, mmask_t *\fIoldmask\fB);\fR
-.sp
+.PP
 \fBbool wenclose(const WINDOW *\fIwin\fB, int \fIy\fB, int \fIx\fB);\fR
-.sp
+.PP
 \fBbool mouse_trafo(int* \fIpY\fB, int* \fIpX\fB, bool \fIto_screen\fB);\fR
-.br
 \fBbool wmouse_trafo(const WINDOW* \fIwin\fB,\fR
                   \fBint* \fIpY\fB, int* \fIpX\fB, bool \fIto_screen\fB);\fR
-.sp
+.PP
 \fBint mouseinterval(int \fIerval\fB);\fR
-.br
+.fi
 .SH DESCRIPTION
 These functions provide an interface to mouse events from
 \fBncurses\fP(3X).
diff --git a/man/curs_trace.3x b/man/curs_trace.3x
index add2b6be..d9411619 100644
--- a/man/curs_trace.3x
+++ b/man/curs_trace.3x
@@ -53,35 +53,28 @@ .SH NAME
 \fB\%_tracemouse\fP \-
 \fIcurses\fR debugging routines
 .SH SYNOPSIS
+.nf
 \fB#include <curses.h>\fP
-.sp
+.PP
 \fBunsigned curses_trace(const unsigned \fIparam\fB);\fR
-.sp
+.PP
 \fBvoid _tracef(const char *\fIformat\fB, ...);\fR
-.sp
+.PP
 \fBchar *_traceattr(attr_t \fIattr\fB);\fR
-.br
 \fBchar *_traceattr2(int \fIbuffer\fB, chtype \fIch\fB);\fR
-.br
 \fBchar *_tracecchar_t(const cchar_t *\fIstring\fB);\fR
-.br
 \fBchar *_tracecchar_t2(int \fIbuffer\fB, const cchar_t *\fIstring\fB);\fR
-.br
 \fBchar *_tracechar(int \fIch\fB);\fR
-.br
 \fBchar *_tracechtype(chtype \fIch\fB);\fR
-.br
 \fBchar *_tracechtype2(int \fIbuffer\fB, chtype \fIch\fB);\fR
-.sp
+.PP
 \fBvoid _tracedump(const char *\fIlabel\fB, WINDOW *\fIwin\fB);\fR
-.br
 \fBchar *_nc_tracebits(void);\fP
-.br
 \fBchar *_tracemouse(const MEVENT *\fIevent\fB);\fR
-.sp
+.PP
 /* deprecated */
-.br
 \fBvoid trace(const unsigned int \fIparam\fB);\fR
+.fi
 .SH DESCRIPTION
 The \fIcurses trace\fP routines are used for debugging the ncurses libraries,
 as well as applications which use the ncurses libraries.
diff --git a/man/new_pair.3x b/man/new_pair.3x
index 772d09eb..52d7b02b 100644
--- a/man/new_pair.3x
+++ b/man/new_pair.3x
@@ -64,13 +64,13 @@ .SH NAME
 \fB\%free_pair\fP \-
 dynamically allocate \fIcurses\fR color pairs
 .SH SYNOPSIS
+.nf
 \fB#include <curses.h>\fP
-.sp
+.PP
 \fBint alloc_pair(int \fIfg\fB, int \fIbg\fB);\fR
-.br
 \fBint find_pair(int \fIfg\fB, int \fIbg\fB);\fR
-.br
 \fBint free_pair(int \fIpair\fB);\fR
+.fi
 .SH DESCRIPTION
 These functions are an extension to the curses library.
 They permit an application to dynamically allocate a color pair using
-- 
2.30.2

Attachment: signature.asc
Description: PGP signature


reply via email to

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