doc: make the library API pages a little more readable
Use of the the '.B' and '.BI' man documentation macros had rendered the three library API pages less readable than they could be. In addition, sometimes the pointer indicator and an identifier were separated by a space. So, this commit will trade those macros for some '.RI' and '.RB' macros plus treat the pointers consistently. [ plus we no longer italicize sort 'stacks' brackets ] Signed-off-by: Jim Warner <james.warner@comcast.net>
This commit is contained in:
parent
813cefe96a
commit
0df22d89db
44
doc/procps.3
44
doc/procps.3
@ -16,7 +16,7 @@
|
|||||||
.\" Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
.\" Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
.\" %%%LICENSE_END
|
.\" %%%LICENSE_END
|
||||||
.\"
|
.\"
|
||||||
.TH PROCPS 3 "January 2022" "libproc-2"
|
.TH PROCPS 3 "July 2022" "libproc-2"
|
||||||
.\" Please adjust this date whenever revising the manpage.
|
.\" Please adjust this date whenever revising the manpage.
|
||||||
.\"
|
.\"
|
||||||
.nh
|
.nh
|
||||||
@ -32,34 +32,34 @@ the files they access in the /proc pseudo filesystem:
|
|||||||
.RS +4
|
.RS +4
|
||||||
#include <procps/\fBnamed_interface\fR.h>
|
#include <procps/\fBnamed_interface\fR.h>
|
||||||
|
|
||||||
.BI "int procps_new (struct info **" info );
|
.RI "int\fB procps_new \fR (struct info **" info );
|
||||||
.BI "int procps_ref (struct info *" info );
|
.RI "int\fB procps_ref \fR (struct info *" info );
|
||||||
.BI "int procps_unref (struct info **" info );
|
.RI "int\fB procps_unref\fR (struct info **" info );
|
||||||
|
|
||||||
.BI "struct result *procps_get ("
|
.RB "struct result *" procps_get " ("
|
||||||
.BI " struct info *" info ,
|
.RI " struct info *" info ,
|
||||||
.RI "[ const char *" name ", ] \fBdiskstats\fR api only"
|
.RI "[ const char *" name ", ] \fBdiskstats\fR api only"
|
||||||
.BI " enum item " item );
|
.RI " enum item " item );
|
||||||
|
|
||||||
.BI "struct stack *procps_select ("
|
.RB "struct stack *" procps_select " ("
|
||||||
.BI " struct info *" info ,
|
.RI " struct info *" info ,
|
||||||
.RI "[ const char *" name ", ] \fBdiskstats\fR api only"
|
.RI "[ const char *" name ", ] \fBdiskstats\fR api only"
|
||||||
.BI " enum item *" items ,
|
.RI " enum item *" items ,
|
||||||
.BI " int " numitems );
|
.RI " int " numitems );
|
||||||
|
|
||||||
.BI "struct reaped *procps_reap ("
|
.RB "struct reaped *" procps_reap " ("
|
||||||
.BI " struct info *" info ,
|
.RI " struct info *" info ,
|
||||||
.RI "[ enum reap_type " what ", ] \fBstat\fR api only"
|
.RI "[ enum reap_type " what ", ] \fBstat\fR api only"
|
||||||
.BI " enum item *" items ,
|
.RI " enum item *" items ,
|
||||||
.BI " int " numitems );
|
.RI " int " numitems );
|
||||||
|
|
||||||
|
.RB "struct stack **" procps_sort " ("
|
||||||
|
.RI " struct info *" info ,
|
||||||
|
.RI " struct stack *" stacks [],
|
||||||
|
.RI " int " numstacked ,
|
||||||
|
.RI " enum item " sortitem ,
|
||||||
|
.RI " enum sort_order " order );
|
||||||
|
|
||||||
.BI "struct stack **procps_sort ("
|
|
||||||
.BI " struct info *" info ,
|
|
||||||
.BI " struct stack *" stacks[] ,
|
|
||||||
.BI " int " numstacked ,
|
|
||||||
.BI " enum item " sortitem ,
|
|
||||||
.BI " enum sort_order " order );
|
|
||||||
.RE
|
|
||||||
.fi
|
.fi
|
||||||
|
|
||||||
The above functions and structures are generic but the specific
|
The above functions and structures are generic but the specific
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
.\" Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
.\" Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
.\" %%%LICENSE_END
|
.\" %%%LICENSE_END
|
||||||
.\"
|
.\"
|
||||||
.TH PROCPS_MISC 3 "January 2022" "libproc-2"
|
.TH PROCPS_MISC 3 "July 2022" "libproc-2"
|
||||||
.\" Please adjust this date whenever revising the manpage.
|
.\" Please adjust this date whenever revising the manpage.
|
||||||
.\"
|
.\"
|
||||||
.nh
|
.nh
|
||||||
@ -30,27 +30,27 @@ procps_misc \- API for miscellaneous information in the /proc filesystem
|
|||||||
Platform Particulars
|
Platform Particulars
|
||||||
.RS 4
|
.RS 4
|
||||||
.PP
|
.PP
|
||||||
.B "long procps_cpu_count (void);"
|
.RB "long " procps_cpu_count " (void);
|
||||||
.B "long procps_hertz_get (void);"
|
.RB "long " procps_hertz_get " (void);
|
||||||
.B "unsigned int procps_pid_length (void);"
|
.RB "unsigned int " procps_pid_length " (void);
|
||||||
.B "int procps_linux_version (void);"
|
.RB "int " procps_linux_version " (void);
|
||||||
.RE
|
.RE
|
||||||
.PP
|
.PP
|
||||||
Runtime Particulars
|
Runtime Particulars
|
||||||
.PP
|
.PP
|
||||||
.RS 4
|
.RS 4
|
||||||
.BI "int procps_loadavg (double * " av1 ", double * " av5 ", double * " av15 ");"
|
.RI "int \fB procps_loadavg\fR (double *" av1 ", double *" av5 ", double *" av15 ");"
|
||||||
.BI "int procps_uptime (double * " uptime_secs ", double * " idle_secs ");"
|
.RI "int \fB procps_uptime\fR (double *" uptime_secs ", double *" idle_secs ");"
|
||||||
.B "char * procps_uptime_sprint (void);"
|
.RB "char *" procps_uptime_sprint " (void);"
|
||||||
.B "char * procps_uptime_sprint_short (void);"
|
.RB "char *" procps_uptime_sprint_short " (void);"
|
||||||
.RE
|
.RE
|
||||||
.PP
|
.PP
|
||||||
Namespace Particulars
|
Namespace Particulars
|
||||||
.PP
|
.PP
|
||||||
.RS 4
|
.RS 4
|
||||||
.BI "int procps_ns_get_id (const char * " name ");"
|
.RI "int \fB procps_ns_get_id\fR (const char *" name ");"
|
||||||
.BI "const char * procps_ns_get_name (int " id ");"
|
.RI "const char\fB *procps_ns_get_name\fR (int " id ");"
|
||||||
.BI "int procps_ns_read_pid (int " pid ", struct procps_ns * " nsp ");"
|
.RI "int \fB procps_ns_read_pid\fR (int " pid ", struct procps_ns *" nsp ");"
|
||||||
.RE
|
.RE
|
||||||
|
|
||||||
Link with \fI\-lproc-2\fP.
|
Link with \fI\-lproc-2\fP.
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
.\" Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
.\" Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
.\" %%%LICENSE_END
|
.\" %%%LICENSE_END
|
||||||
.\"
|
.\"
|
||||||
.TH PROCPS_PIDS 3 "January 2022" "libproc-2"
|
.TH PROCPS_PIDS 3 "July 2022" "libproc-2"
|
||||||
.\" Please adjust this date whenever revising the manpage.
|
.\" Please adjust this date whenever revising the manpage.
|
||||||
.\"
|
.\"
|
||||||
.nh
|
.nh
|
||||||
@ -27,41 +27,40 @@ procps_pids \- API to access process information in the /proc filesystem
|
|||||||
.nf
|
.nf
|
||||||
#include <procps/pids.h>
|
#include <procps/pids.h>
|
||||||
|
|
||||||
.BI "int procps_pids_new (struct pids_info **" info ", enum pids_item *" items ", int " numitems );
|
.RI "int\fB procps_pids_new \fR (struct pids_info **" info ", enum pids_item *" items ", int " numitems );
|
||||||
.BI "int procps_pids_ref (struct pids_info *" info );
|
.RI "int\fB procps_pids_ref \fR (struct pids_info *" info );
|
||||||
.BI "int procps_pids_unref (struct pids_info **" info );
|
.RI "int\fB procps_pids_unref\fR (struct pids_info **" info );
|
||||||
|
|
||||||
|
|
||||||
.BI "struct pids_stack *procps_pids_get ("
|
.RB "struct pids_stack *" procps_pids_get " ("
|
||||||
.BI " struct pids_info *" info ,
|
.RI " struct pids_info *" info ,
|
||||||
.BI " enum pids_fetch_type " which );
|
.RI " enum pids_fetch_type " which );
|
||||||
|
|
||||||
.BI "struct pids_fetch *procps_pids_reap ("
|
.RB "struct pids_fetch *" procps_pids_reap " ("
|
||||||
.BI " struct pids_info *" info ,
|
.RI " struct pids_info *" info ,
|
||||||
.BI " enum pids_fetch_type " which );
|
.RI " enum pids_fetch_type " which );
|
||||||
|
|
||||||
.BI "struct pids_fetch *procps_pids_select ("
|
.RB "struct pids_fetch *" procps_pids_select " ("
|
||||||
.BI " struct pids_info *" info ,
|
.RI " struct pids_info *" info ,
|
||||||
.BI " unsigned *" these ,
|
.RI " unsigned *" these ,
|
||||||
.BI " int " numthese ,
|
.RI " int " numthese ,
|
||||||
.BI " enum pids_select_type " which );
|
.RI " enum pids_select_type " which );
|
||||||
|
|
||||||
.BI "struct pids_stack **procps_pids_sort ("
|
.RB "struct pids_stack **" procps_pids_sort " ("
|
||||||
.BI " struct pids_info *" info ,
|
.RI " struct pids_info *" info ,
|
||||||
.BI " struct pids_stack *" stacks[] ,
|
.RI " struct pids_stack *" stacks [],
|
||||||
.BI " int " numstacked ,
|
.RI " int " numstacked ,
|
||||||
.BI " enum pids_item " sortitem ,
|
.RI " enum pids_item " sortitem ,
|
||||||
.BI " enum pids_sort_order " order );
|
.RI " enum pids_sort_order " order );
|
||||||
|
|
||||||
|
.RB "int " procps_pids_reset " ("
|
||||||
|
.RI " struct pids_info *" info ,
|
||||||
|
.RI " enum pids_item *" newitems ,
|
||||||
|
.RI " int " newnumitems );
|
||||||
|
|
||||||
.BI "int procps_pids_reset ("
|
.RB "struct pids_stack *" fatal_proc_unmounted " ("
|
||||||
.BI " struct pids_info *" info ,
|
.RI " struct pids_info *" info ,
|
||||||
.BI " enum pids_item *" newitems ,
|
.RI " int " return_self );
|
||||||
.BI " int " newnumitems );
|
|
||||||
|
|
||||||
.BI "struct pids_stack *fatal_proc_unmounted ("
|
|
||||||
.BI " struct pids_info *" info ,
|
|
||||||
.BI " int " return_self );
|
|
||||||
|
|
||||||
.fi
|
.fi
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user