mirror of https://github.com/mkerrisk/man-pages
Compare commits
38 Commits
19063c3c07
...
1cf69258ad
Author | SHA1 | Date |
---|---|---|
Alejandro Colomar | 1cf69258ad | |
Michael Kerrisk | e43e45b477 | |
Michael Kerrisk | 80a45bed73 | |
Alejandro Colomar | 0fbec630fd | |
Alejandro Colomar | 3bbc7a7554 | |
Alejandro Colomar | 1c55195743 | |
Michael Kerrisk | 3eb81f5117 | |
Alejandro Colomar | 58d7a46ccb | |
Alejandro Colomar | 5175f162a3 | |
Alejandro Colomar | 161c0ae7a6 | |
Alejandro Colomar | 099b33fbff | |
Alejandro Colomar | 2ce1caae32 | |
Alejandro Colomar | 3126777905 | |
Alejandro Colomar | 54dde4f8e3 | |
Alejandro Colomar | 7dfd227b7e | |
Alejandro Colomar | 881f51062f | |
Alejandro Colomar | e4b890cdb8 | |
Alejandro Colomar | 5f9596780c | |
Alejandro Colomar | 34afcb0dad | |
Alejandro Colomar | 94bf02f41b | |
Alejandro Colomar | a3ccd456f3 | |
Alejandro Colomar | 3a42b0815e | |
Alejandro Colomar | 5ae99ccb42 | |
Alejandro Colomar | b08daf3c0c | |
Alejandro Colomar | f493a71fe1 | |
Alejandro Colomar | bacf09154d | |
Alejandro Colomar | 4cc91169d0 | |
Alejandro Colomar | c20d4d883c | |
Alejandro Colomar | f750ab384c | |
Alejandro Colomar | fe10d82f6e | |
Alejandro Colomar | 2faa0fbddf | |
Alejandro Colomar | a2d963a81c | |
Alejandro Colomar | ea2807f8af | |
Alejandro Colomar | 6e7a60c016 | |
Alejandro Colomar | 27931e4a6b | |
Alejandro Colomar | d62694cc6e | |
Alejandro Colomar | 8632f524ef | |
Alejandro Colomar | 27398f1b64 |
|
@ -0,0 +1,13 @@
|
||||||
|
# Ignore everything new by default
|
||||||
|
/*
|
||||||
|
|
||||||
|
# Ignore everything in man?/ that doesn't follow conventions (e.g., tmp files)
|
||||||
|
!/man?/
|
||||||
|
/man?/*
|
||||||
|
!/man?/*.[1-8]
|
||||||
|
|
||||||
|
# These files change name in each release
|
||||||
|
!/man-pages*.Announce
|
||||||
|
!/man-pages*.lsm
|
||||||
|
|
||||||
|
!/scripts/
|
112
Makefile
112
Makefile
|
@ -1,35 +1,101 @@
|
||||||
DESTDIR=
|
# Do not print "Entering directory ..."
|
||||||
prefix?=/usr
|
MAKEFLAGS += --no-print-directory
|
||||||
MANDIR=$(prefix)/share/man
|
|
||||||
|
|
||||||
all: remove install
|
htmlbuilddir = $(CURDIR)/.html
|
||||||
|
HTOPTS =
|
||||||
|
|
||||||
uninstall remove:
|
DESTDIR =
|
||||||
for i in man?/*; do \
|
prefix = /usr/local
|
||||||
rm -f $(MANDIR)/"$$i" $(MANDIR)/"$$i".*; \
|
datarootdir = $(prefix)/share
|
||||||
done
|
docdir = $(datarootdir)/doc
|
||||||
|
mandir = $(datarootdir)/man
|
||||||
|
htmldir = $(docdir)
|
||||||
|
htmldir_ = $(htmldir)/man
|
||||||
|
htmlext = .html
|
||||||
|
|
||||||
|
INSTALL = install
|
||||||
|
INSTALL_DATA = $(INSTALL) -m 644
|
||||||
|
INSTALL_DIR = $(INSTALL) -m 755 -d
|
||||||
|
|
||||||
|
.PHONY: all
|
||||||
|
all:
|
||||||
|
$(MAKE) uninstall;
|
||||||
|
$(MAKE) install;
|
||||||
|
|
||||||
# Use with
|
# Use with
|
||||||
# make HTDIR=/some/dir HTOPTS=whatever html
|
# make HTOPTS=whatever html
|
||||||
# The sed removes the lines "Content-type: text/html\n\n"
|
# The sed removes the lines "Content-type: text/html\n\n"
|
||||||
html:
|
.PHONY: html
|
||||||
@if [ x$(HTDIR) = x ]; then echo "You must set HTDIR."; else \
|
html: | builddirs-html
|
||||||
for i in man?; do \
|
find man?/ -type f \
|
||||||
[ -d $(HTDIR)/"$$i" ] || mkdir -p $(HTDIR)/"$$i"; \
|
|while read f; do \
|
||||||
find "$$i/" -type f | while read f; do \
|
man2html $(HTOPTS) "$$f" \
|
||||||
man2html $(HTOPTS) $$f | \
|
|sed -e '1,2d' \
|
||||||
sed -e '1,2d' > $(HTDIR)/"$$i"/`basename $$f`.html; \
|
>"$(htmlbuilddir)/$${f}$(htmlext)" \
|
||||||
done; \
|
|| exit $$?; \
|
||||||
done; fi
|
done;
|
||||||
|
|
||||||
install:
|
.PHONY: builddirs-html
|
||||||
for i in man?; do \
|
builddirs-html:
|
||||||
install -d -m 755 $(DESTDIR)$(MANDIR)/"$$i" || exit $$?; \
|
find man?/ -type d \
|
||||||
install -m 644 "$$i"/* $(DESTDIR)$(MANDIR)/"$$i" || exit $$?; \
|
|while read d; do \
|
||||||
done
|
$(INSTALL_DIR) "$(htmlbuilddir)/$$d" || exit $$?; \
|
||||||
|
done;
|
||||||
|
|
||||||
|
.PHONY: install-html
|
||||||
|
install-html: | installdirs-html
|
||||||
|
cd $(htmlbuilddir) && \
|
||||||
|
find man?/ -type f \
|
||||||
|
|while read f; do \
|
||||||
|
$(INSTALL_DATA) -T "$$f" "$(DESTDIR)$(htmldir_)/$$f" || exit $$?; \
|
||||||
|
done;
|
||||||
|
|
||||||
|
.PHONY: installdirs-html
|
||||||
|
installdirs-html:
|
||||||
|
find man?/ -type d \
|
||||||
|
|while read d; do \
|
||||||
|
$(INSTALL_DIR) "$(DESTDIR)$(htmldir_)/$$d" || exit $$?; \
|
||||||
|
done;
|
||||||
|
|
||||||
|
.PHONY: install
|
||||||
|
install: | installdirs
|
||||||
|
find man?/ -type f \
|
||||||
|
|while read f; do \
|
||||||
|
$(INSTALL_DATA) -T "$$f" "$(DESTDIR)$(mandir)/$$f" || exit $$?; \
|
||||||
|
done;
|
||||||
|
|
||||||
|
.PHONY: installdirs
|
||||||
|
installdirs:
|
||||||
|
find man?/ -type d \
|
||||||
|
|while read d; do \
|
||||||
|
$(INSTALL_DIR) "$(DESTDIR)$(mandir)/$$d" || exit $$?; \
|
||||||
|
done;
|
||||||
|
|
||||||
|
.PHONY: uninstall remove
|
||||||
|
uninstall remove:
|
||||||
|
find man?/ -type f \
|
||||||
|
|while read f; do \
|
||||||
|
rm -f "$(DESTDIR)$(mandir)/$$f" || exit $$?; \
|
||||||
|
rm -f "$(DESTDIR)$(mandir)/$$f".* || exit $$?; \
|
||||||
|
done;
|
||||||
|
|
||||||
|
.PHONY: uninstall-html
|
||||||
|
uninstall-html:
|
||||||
|
find man?/ -type f \
|
||||||
|
|while read f; do \
|
||||||
|
rm -f "$(DESTDIR)$(htmldir_)/$$f".* || exit $$?; \
|
||||||
|
done;
|
||||||
|
|
||||||
|
.PHONY: clean
|
||||||
|
clean:
|
||||||
|
find man?/ -type f \
|
||||||
|
|while read f; do \
|
||||||
|
rm -f "$(htmlbuilddir)/$$f".* || exit $$?; \
|
||||||
|
done;
|
||||||
|
|
||||||
# Check if groff reports warnings (may be words of sentences not displayed)
|
# Check if groff reports warnings (may be words of sentences not displayed)
|
||||||
# from https://lintian.debian.org/tags/groff-message.html
|
# from https://lintian.debian.org/tags/groff-message.html
|
||||||
|
.PHONY: check-groff-warnings
|
||||||
check-groff-warnings:
|
check-groff-warnings:
|
||||||
GROFF_LOG="$$(mktemp --tmpdir manpages-checksXXXX)" || exit $$?; \
|
GROFF_LOG="$$(mktemp --tmpdir manpages-checksXXXX)" || exit $$?; \
|
||||||
for i in man?/*.[1-9]; \
|
for i in man?/*.[1-9]; \
|
||||||
|
|
|
@ -969,7 +969,7 @@ mask must also include
|
||||||
.B CLONE_VM
|
.B CLONE_VM
|
||||||
if
|
if
|
||||||
.B CLONE_SIGHAND
|
.B CLONE_SIGHAND
|
||||||
is specified
|
is specified.
|
||||||
.TP
|
.TP
|
||||||
.BR CLONE_STOPPED " (since Linux 2.6.0)"
|
.BR CLONE_STOPPED " (since Linux 2.6.0)"
|
||||||
.\" Precisely: Linux 2.6.0-test2
|
.\" Precisely: Linux 2.6.0-test2
|
||||||
|
|
|
@ -285,18 +285,6 @@ instance whose interest list is currently empty
|
||||||
or removed from the interest in another thread).
|
or removed from the interest in another thread).
|
||||||
The call will block until some file descriptor is later added to the
|
The call will block until some file descriptor is later added to the
|
||||||
interest list (in another thread) and that file descriptor becomes ready.
|
interest list (in another thread) and that file descriptor becomes ready.
|
||||||
.SH BUGS
|
|
||||||
In kernels before 2.6.37, a
|
|
||||||
.I timeout
|
|
||||||
value larger than approximately
|
|
||||||
.I LONG_MAX / HZ
|
|
||||||
milliseconds is treated as \-1 (i.e., infinity).
|
|
||||||
Thus, for example, on a system where
|
|
||||||
.I sizeof(long)
|
|
||||||
is 4 and the kernel
|
|
||||||
.I HZ
|
|
||||||
value is 1000,
|
|
||||||
this means that timeouts greater than 35.79 minutes are treated as infinity.
|
|
||||||
.SS C library/kernel differences
|
.SS C library/kernel differences
|
||||||
The raw
|
The raw
|
||||||
.BR epoll_pwait ()
|
.BR epoll_pwait ()
|
||||||
|
@ -312,6 +300,18 @@ The glibc
|
||||||
wrapper function specifies this argument as a fixed value
|
wrapper function specifies this argument as a fixed value
|
||||||
(equal to
|
(equal to
|
||||||
.IR sizeof(sigset_t) ).
|
.IR sizeof(sigset_t) ).
|
||||||
|
.SH BUGS
|
||||||
|
In kernels before 2.6.37, a
|
||||||
|
.I timeout
|
||||||
|
value larger than approximately
|
||||||
|
.I LONG_MAX / HZ
|
||||||
|
milliseconds is treated as \-1 (i.e., infinity).
|
||||||
|
Thus, for example, on a system where
|
||||||
|
.I sizeof(long)
|
||||||
|
is 4 and the kernel
|
||||||
|
.I HZ
|
||||||
|
value is 1000,
|
||||||
|
this means that timeouts greater than 35.79 minutes are treated as infinity.
|
||||||
.SH SEE ALSO
|
.SH SEE ALSO
|
||||||
.BR epoll_create (2),
|
.BR epoll_create (2),
|
||||||
.BR epoll_ctl (2),
|
.BR epoll_ctl (2),
|
||||||
|
|
|
@ -29,7 +29,6 @@ execveat \- execute program relative to a directory file descriptor
|
||||||
.SH SYNOPSIS
|
.SH SYNOPSIS
|
||||||
.nf
|
.nf
|
||||||
.BR "#include <linux/fcntl.h>" " /* Definition of " AT_* " constants */"
|
.BR "#include <linux/fcntl.h>" " /* Definition of " AT_* " constants */"
|
||||||
.BR "#include <sys/syscall.h>" " /* Definition of " SYS_* " constants */"
|
|
||||||
.B #include <unistd.h>
|
.B #include <unistd.h>
|
||||||
.PP
|
.PP
|
||||||
.BI "int execveat(int " dirfd ", const char *" pathname ,
|
.BI "int execveat(int " dirfd ", const char *" pathname ,
|
||||||
|
|
|
@ -824,7 +824,7 @@ fd = open("/path/to/dir", O_TMPFILE | O_RDWR,
|
||||||
|
|
||||||
/* File I/O on \(aqfd\(aq... */
|
/* File I/O on \(aqfd\(aq... */
|
||||||
|
|
||||||
linkat(fd, NULL, AT_FDCWD, "/path/for/file", AT_EMPTY_PATH);
|
linkat(fd, "", AT_FDCWD, "/path/for/file", AT_EMPTY_PATH);
|
||||||
|
|
||||||
/* If the caller doesn\(aqt have the CAP_DAC_READ_SEARCH
|
/* If the caller doesn\(aqt have the CAP_DAC_READ_SEARCH
|
||||||
capability (needed to use AT_EMPTY_PATH with linkat(2)),
|
capability (needed to use AT_EMPTY_PATH with linkat(2)),
|
||||||
|
|
|
@ -80,7 +80,7 @@ thus it is a good idea for portable applications to use a virtual
|
||||||
priority range and map it to the interval given by
|
priority range and map it to the interval given by
|
||||||
.BR sched_get_priority_max ()
|
.BR sched_get_priority_max ()
|
||||||
and
|
and
|
||||||
.BR sched_get_priority_min
|
.BR sched_get_priority_min ()
|
||||||
POSIX.1 requires
|
POSIX.1 requires
|
||||||
.\" POSIX.1-2001, POSIX.1-2008 (XBD 2.8.4)
|
.\" POSIX.1-2001, POSIX.1-2008 (XBD 2.8.4)
|
||||||
a spread of at least 32 between the maximum and the minimum values for
|
a spread of at least 32 between the maximum and the minimum values for
|
||||||
|
|
|
@ -31,7 +31,7 @@ __ppc_get_timebase, __ppc_get_timebase_freq \- get the current value
|
||||||
.nf
|
.nf
|
||||||
.B #include <sys/platform/ppc.h>
|
.B #include <sys/platform/ppc.h>
|
||||||
.PP
|
.PP
|
||||||
.BI "uint64_t __ppc_get_timebase(void)"
|
.BI "uint64_t __ppc_get_timebase(void);"
|
||||||
.BI "uint64_t __ppc_get_timebase_freq(void);"
|
.BI "uint64_t __ppc_get_timebase_freq(void);"
|
||||||
.fi
|
.fi
|
||||||
.SH DESCRIPTION
|
.SH DESCRIPTION
|
||||||
|
|
|
@ -36,8 +36,8 @@ basename, dirname \- parse pathname components
|
||||||
.fi
|
.fi
|
||||||
.SH DESCRIPTION
|
.SH DESCRIPTION
|
||||||
Warning: there are two different functions
|
Warning: there are two different functions
|
||||||
.BR basename ()
|
.BR basename ();
|
||||||
- see below.
|
see below.
|
||||||
.PP
|
.PP
|
||||||
The functions
|
The functions
|
||||||
.BR dirname ()
|
.BR dirname ()
|
||||||
|
|
14
man3/bswap.3
14
man3/bswap.3
|
@ -29,19 +29,19 @@ bswap_16, bswap_32, bswap_64 \- reverse order of bytes
|
||||||
.nf
|
.nf
|
||||||
.B #include <byteswap.h>
|
.B #include <byteswap.h>
|
||||||
.PP
|
.PP
|
||||||
.BI bswap_16( x );
|
.BI "uint16_t bswap_16(uint16_t " x );
|
||||||
.BI bswap_32( x );
|
.BI "uint32_t bswap_32(uint32_t " x );
|
||||||
.BI bswap_64( x );
|
.BI "uint64_t bswap_64(uint64_t " x );
|
||||||
.fi
|
.fi
|
||||||
.SH DESCRIPTION
|
.SH DESCRIPTION
|
||||||
These macros return a value in which the order of the bytes
|
These functions return a value in which the order of the bytes
|
||||||
in their 2-, 4-, or 8-byte arguments is reversed.
|
in their 2-, 4-, or 8-byte arguments is reversed.
|
||||||
.SH RETURN VALUE
|
.SH RETURN VALUE
|
||||||
These macros return the value of their argument with the bytes reversed.
|
These functions return the value of their argument with the bytes reversed.
|
||||||
.SH ERRORS
|
.SH ERRORS
|
||||||
These macros always succeed.
|
These functions always succeed.
|
||||||
.SH CONFORMING TO
|
.SH CONFORMING TO
|
||||||
These macros are GNU extensions.
|
These functions are GNU extensions.
|
||||||
.SH EXAMPLES
|
.SH EXAMPLES
|
||||||
The program below swaps the bytes of the 8-byte integer supplied as
|
The program below swaps the bytes of the 8-byte integer supplied as
|
||||||
its command-line argument.
|
its command-line argument.
|
||||||
|
|
|
@ -11,10 +11,10 @@ cpow, cpowf, cpowl \- complex power function
|
||||||
.nf
|
.nf
|
||||||
.B #include <complex.h>
|
.B #include <complex.h>
|
||||||
.PP
|
.PP
|
||||||
.BI "double complex cpow(double complex " x ", complex double " z ");"
|
.BI "double complex cpow(double complex " x ", double complex " z );
|
||||||
.BI "float complex cpowf(float complex " x ", complex float " z ");"
|
.BI "float complex cpowf(float complex " x ", float complex " z );
|
||||||
.BI "long double complex cpowl(long double complex " x ,
|
.BI "long double complex cpowl(long double complex " x ,
|
||||||
.BI " complex long double " z ");"
|
.BI " long double complex " z );
|
||||||
.PP
|
.PP
|
||||||
Link with \fI\-lm\fP.
|
Link with \fI\-lm\fP.
|
||||||
.fi
|
.fi
|
||||||
|
|
|
@ -31,9 +31,9 @@ dladdr, dladdr1 \- translate address to symbolic information
|
||||||
.B #define _GNU_SOURCE
|
.B #define _GNU_SOURCE
|
||||||
.B #include <dlfcn.h>
|
.B #include <dlfcn.h>
|
||||||
.PP
|
.PP
|
||||||
.BI "int dladdr(void *" addr ", Dl_info *" info );
|
.BI "int dladdr(const void *" addr ", Dl_info *" info );
|
||||||
.BI "int dladdr1(void *" addr ", Dl_info *" info ", void **" \
|
.BI "int dladdr1(const void *" addr ", Dl_info *" info ", void **" extra_info ,
|
||||||
extra_info ", int " flags );
|
.BI " int " flags );
|
||||||
.PP
|
.PP
|
||||||
Link with \fI\-ldl\fP.
|
Link with \fI\-ldl\fP.
|
||||||
.fi
|
.fi
|
||||||
|
|
|
@ -133,6 +133,7 @@ or
|
||||||
.BR sync (2),
|
.BR sync (2),
|
||||||
.BR write (2),
|
.BR write (2),
|
||||||
.BR fclose (3),
|
.BR fclose (3),
|
||||||
|
.BR fpurge (3),
|
||||||
.BR fileno (3),
|
.BR fileno (3),
|
||||||
.BR fopen (3),
|
.BR fopen (3),
|
||||||
.BR setbuf (3),
|
.BR setbuf (3),
|
||||||
|
|
|
@ -31,8 +31,8 @@ getutmp, getutmpx \- copy utmp structure to utmpx, and vice versa
|
||||||
.BR "#define _GNU_SOURCE" " /* See feature_test_macros(7) */"
|
.BR "#define _GNU_SOURCE" " /* See feature_test_macros(7) */"
|
||||||
.B #include <utmpx.h>
|
.B #include <utmpx.h>
|
||||||
.PP
|
.PP
|
||||||
.BI " void getutmp(const struct utmpx *" ux ", struct utmp *" u );
|
.BI "void getutmp(const struct utmpx *" ux ", struct utmp *" u );
|
||||||
.BI " void getutmpx(const struct utmp *" u ", struct utmpx *" ux );
|
.BI "void getutmpx(const struct utmp *" u ", struct utmpx *" ux );
|
||||||
.fi
|
.fi
|
||||||
.SH DESCRIPTION
|
.SH DESCRIPTION
|
||||||
The
|
The
|
||||||
|
|
|
@ -29,7 +29,7 @@ malloc_usable_size \- obtain size of block of memory allocated from heap
|
||||||
.nf
|
.nf
|
||||||
.B #include <malloc.h>
|
.B #include <malloc.h>
|
||||||
.PP
|
.PP
|
||||||
.BI "size_t malloc_usable_size (void *" ptr );
|
.BI "size_t malloc_usable_size(void *" ptr );
|
||||||
.fi
|
.fi
|
||||||
.SH DESCRIPTION
|
.SH DESCRIPTION
|
||||||
The
|
The
|
||||||
|
|
|
@ -35,7 +35,7 @@ on_exit \- register a function to be called at normal process termination
|
||||||
.nf
|
.nf
|
||||||
.B #include <stdlib.h>
|
.B #include <stdlib.h>
|
||||||
.PP
|
.PP
|
||||||
.BI "int on_exit(void (*" function ")(int , void *), void *" arg );
|
.BI "int on_exit(void (*" function ")(int, void *), void *" arg );
|
||||||
.fi
|
.fi
|
||||||
.PP
|
.PP
|
||||||
.RS -4
|
.RS -4
|
||||||
|
|
|
@ -110,7 +110,7 @@ l l l.
|
||||||
Interface Attribute Value
|
Interface Attribute Value
|
||||||
T{
|
T{
|
||||||
.BR open_memstream (),
|
.BR open_memstream (),
|
||||||
.BR open_wmemstream
|
.BR open_wmemstream ()
|
||||||
T} Thread safety MT-Safe
|
T} Thread safety MT-Safe
|
||||||
.TE
|
.TE
|
||||||
.hy
|
.hy
|
||||||
|
|
|
@ -39,7 +39,7 @@ perror \- print a system error message
|
||||||
.PP
|
.PP
|
||||||
.B #include <errno.h>
|
.B #include <errno.h>
|
||||||
.PP
|
.PP
|
||||||
.BI "const char * const " sys_errlist [];
|
.BI "const char *const " sys_errlist [];
|
||||||
.BI "int " sys_nerr ;
|
.BI "int " sys_nerr ;
|
||||||
.BI "int " errno "; \fR/* Not really declared this way; see errno(3) */"
|
.BI "int " errno "; \fR/* Not really declared this way; see errno(3) */"
|
||||||
.fi
|
.fi
|
||||||
|
|
|
@ -33,8 +33,8 @@ inherit-scheduler attribute in thread attributes object
|
||||||
.PP
|
.PP
|
||||||
.BI "int pthread_attr_setinheritsched(pthread_attr_t *" attr ,
|
.BI "int pthread_attr_setinheritsched(pthread_attr_t *" attr ,
|
||||||
.BI " int " inheritsched );
|
.BI " int " inheritsched );
|
||||||
.BI "int pthread_attr_getinheritsched(const pthread_attr_t *" attr ,
|
.BI "int pthread_attr_getinheritsched(const pthread_attr_t *restrict " attr ,
|
||||||
.BI " int *" inheritsched );
|
.BI " int *restrict " inheritsched );
|
||||||
.PP
|
.PP
|
||||||
Compile and link with \fI\-pthread\fP.
|
Compile and link with \fI\-pthread\fP.
|
||||||
.fi
|
.fi
|
||||||
|
|
|
@ -31,10 +31,10 @@ scheduling parameter attributes in thread attributes object
|
||||||
.nf
|
.nf
|
||||||
.B #include <pthread.h>
|
.B #include <pthread.h>
|
||||||
.PP
|
.PP
|
||||||
.BI "int pthread_attr_setschedparam(pthread_attr_t *" attr ,
|
.BI "int pthread_attr_setschedparam(pthread_attr_t *restrict " attr ,
|
||||||
.BI " const struct sched_param *" param );
|
.BI " const struct sched_param *restrict " param );
|
||||||
.BI "int pthread_attr_getschedparam(const pthread_attr_t *" attr ,
|
.BI "int pthread_attr_getschedparam(const pthread_attr_t *restrict " attr ,
|
||||||
.BI " struct sched_param *" param );
|
.BI " struct sched_param *restrict " param );
|
||||||
.PP
|
.PP
|
||||||
Compile and link with \fI\-pthread\fP.
|
Compile and link with \fI\-pthread\fP.
|
||||||
.fi
|
.fi
|
||||||
|
|
|
@ -32,7 +32,7 @@ get or set default thread-creation attributes
|
||||||
.B #include <pthread.h>
|
.B #include <pthread.h>
|
||||||
.PP
|
.PP
|
||||||
.BI "int pthread_getattr_default_np(pthread_attr_t *" attr );
|
.BI "int pthread_getattr_default_np(pthread_attr_t *" attr );
|
||||||
.BI "int pthread_setattr_default_np(pthread_attr_t *" attr );
|
.BI "int pthread_setattr_default_np(const pthread_attr_t *" attr );
|
||||||
.PP
|
.PP
|
||||||
Compile and link with \fI\-pthread\fP.
|
Compile and link with \fI\-pthread\fP.
|
||||||
.fi
|
.fi
|
||||||
|
|
|
@ -33,7 +33,7 @@ pthread_mutexattr_getrobust, pthread_mutexattr_setrobust
|
||||||
.PP
|
.PP
|
||||||
.BI "int pthread_mutexattr_getrobust(const pthread_mutexattr_t *" attr ,
|
.BI "int pthread_mutexattr_getrobust(const pthread_mutexattr_t *" attr ,
|
||||||
.BI " int *" robustness ");"
|
.BI " int *" robustness ");"
|
||||||
.BI "int pthread_mutexattr_setrobust(const pthread_mutexattr_t *" attr ,
|
.BI "int pthread_mutexattr_setrobust(pthread_mutexattr_t *" attr ,
|
||||||
.BI " int " robustness ");"
|
.BI " int " robustness ");"
|
||||||
.fi
|
.fi
|
||||||
.PP
|
.PP
|
||||||
|
|
25
man3/rpc.3
25
man3/rpc.3
|
@ -70,8 +70,8 @@ information with each remote procedure call.
|
||||||
This is the default authentication used by RPC.
|
This is the default authentication used by RPC.
|
||||||
.PP
|
.PP
|
||||||
.nf
|
.nf
|
||||||
.BI "AUTH *authunix_create(char *" host ", int " uid ", int " gid ,
|
.BI "AUTH *authunix_create(char *" host ", uid_t " uid ", gid_t " gid ,
|
||||||
.BI " int " len ", int *" aup_gids );
|
.BI " int " len ", gid_t *" aup_gids );
|
||||||
.fi
|
.fi
|
||||||
.IP
|
.IP
|
||||||
Create and return an RPC authentication handle that contains
|
Create and return an RPC authentication handle that contains
|
||||||
|
@ -100,7 +100,7 @@ with the appropriate parameters.
|
||||||
.nf
|
.nf
|
||||||
.BI "int callrpc(char *" host ", unsigned long " prognum ,
|
.BI "int callrpc(char *" host ", unsigned long " prognum ,
|
||||||
.BI " unsigned long " versnum ", unsigned long " procnum ,
|
.BI " unsigned long " versnum ", unsigned long " procnum ,
|
||||||
.BI " xdrproc_t " inproc ", char *" in ,
|
.BI " xdrproc_t " inproc ", const char *" in ,
|
||||||
.BI " xdrproc_t " outproc ", char *" out );
|
.BI " xdrproc_t " outproc ", char *" out );
|
||||||
.fi
|
.fi
|
||||||
.IP
|
.IP
|
||||||
|
@ -216,8 +216,8 @@ If the RPC library opened the associated socket, it will close it also.
|
||||||
Otherwise, the socket remains open.
|
Otherwise, the socket remains open.
|
||||||
.PP
|
.PP
|
||||||
.nf
|
.nf
|
||||||
.BI "CLIENT *clnt_create(char *" host ", unsigned long " prog ,
|
.BI "CLIENT *clnt_create(const char *" host ", unsigned long " prog ,
|
||||||
.BI " unsigned long " vers ", char *" proto );
|
.BI " unsigned long " vers ", const char *" proto );
|
||||||
.fi
|
.fi
|
||||||
.IP
|
.IP
|
||||||
Generic client creation routine.
|
Generic client creation routine.
|
||||||
|
@ -305,7 +305,7 @@ handle to the structure at address
|
||||||
.IR errp .
|
.IR errp .
|
||||||
.PP
|
.PP
|
||||||
.nf
|
.nf
|
||||||
.BI "void clnt_pcreateerror(char *" s );
|
.BI "void clnt_pcreateerror(const char *" s );
|
||||||
.fi
|
.fi
|
||||||
.IP
|
.IP
|
||||||
Print a message to standard error indicating why a client RPC
|
Print a message to standard error indicating why a client RPC
|
||||||
|
@ -332,7 +332,7 @@ Used after
|
||||||
.BR callrpc ().
|
.BR callrpc ().
|
||||||
.PP
|
.PP
|
||||||
.nf
|
.nf
|
||||||
.BI "clnt_perror(CLIENT *" clnt ", char *" s );
|
.BI "clnt_perror(CLIENT *" clnt ", const char *" s );
|
||||||
.fi
|
.fi
|
||||||
.IP
|
.IP
|
||||||
Print a message to standard error indicating why an RPC call failed;
|
Print a message to standard error indicating why an RPC call failed;
|
||||||
|
@ -345,7 +345,7 @@ Used after
|
||||||
.BR clnt_call ().
|
.BR clnt_call ().
|
||||||
.PP
|
.PP
|
||||||
.nf
|
.nf
|
||||||
.BI "char *clnt_spcreateerror(char *" s );
|
.BI "char *clnt_spcreateerror(const char *" s );
|
||||||
.fi
|
.fi
|
||||||
.IP
|
.IP
|
||||||
Like
|
Like
|
||||||
|
@ -383,7 +383,7 @@ returns pointer to static data, but the
|
||||||
result will not get overwritten on each call.
|
result will not get overwritten on each call.
|
||||||
.PP
|
.PP
|
||||||
.nf
|
.nf
|
||||||
.BI "char *clnt_sperror(CLIENT *" rpch ", char *" s );
|
.BI "char *clnt_sperror(CLIENT *" rpch ", const char *" s );
|
||||||
.fi
|
.fi
|
||||||
.IP
|
.IP
|
||||||
Like
|
Like
|
||||||
|
@ -601,7 +601,7 @@ See also
|
||||||
.PP
|
.PP
|
||||||
.nf
|
.nf
|
||||||
.BI "bool_t pmap_set(unsigned long " prognum ", unsigned long " versnum ,
|
.BI "bool_t pmap_set(unsigned long " prognum ", unsigned long " versnum ,
|
||||||
.BI " unsigned int " protocol ", unsigned short " port );
|
.BI " int " protocol ", unsigned short " port );
|
||||||
.fi
|
.fi
|
||||||
.IP
|
.IP
|
||||||
A user interface to the
|
A user interface to the
|
||||||
|
@ -781,7 +781,7 @@ This interface is obsoleted by
|
||||||
.nf
|
.nf
|
||||||
.BI "bool_t svc_register(SVCXPRT *" xprt ", unsigned long " prognum ,
|
.BI "bool_t svc_register(SVCXPRT *" xprt ", unsigned long " prognum ,
|
||||||
.BI " unsigned long " versnum ,
|
.BI " unsigned long " versnum ,
|
||||||
.BI " void (*" dispatch ")(svc_req *, SVCXPRT *),"
|
.BI " void (*" dispatch ")(struct svc_req *, SVCXPRT *),"
|
||||||
.BI " unsigned long " protocol );
|
.BI " unsigned long " protocol );
|
||||||
.fi
|
.fi
|
||||||
.IP
|
.IP
|
||||||
|
@ -894,7 +894,8 @@ Called when the desired program is not registered with the RPC package.
|
||||||
Service implementors usually do not need this routine.
|
Service implementors usually do not need this routine.
|
||||||
.PP
|
.PP
|
||||||
.nf
|
.nf
|
||||||
.BI "void svcerr_progvers(SVCXPRT *" xprt );
|
.BI "void svcerr_progvers(SVCXPRT *" xprt ", unsigned long " low_vers ,
|
||||||
|
.BI " unsigned long " high_vers );
|
||||||
.fi
|
.fi
|
||||||
.IP
|
.IP
|
||||||
Called when the desired version of a program is not registered
|
Called when the desired version of a program is not registered
|
||||||
|
|
|
@ -36,10 +36,10 @@ strsignal, sigdescr_np, sigdescr_np, sys_siglist \- return string describing sig
|
||||||
.B #include <string.h>
|
.B #include <string.h>
|
||||||
.PP
|
.PP
|
||||||
.BI "char *strsignal(int " sig );
|
.BI "char *strsignal(int " sig );
|
||||||
.BI "char *sigdescr_np(int " sig );
|
.BI "const char *sigdescr_np(int " sig );
|
||||||
.BI "char *sigabbrev_np(int " sig );
|
.BI "const char *sigabbrev_np(int " sig );
|
||||||
.PP
|
.PP
|
||||||
.BI "extern const char * const " sys_siglist [];
|
.BI "extern const char *const " sys_siglist [];
|
||||||
.fi
|
.fi
|
||||||
.PP
|
.PP
|
||||||
.RS -4
|
.RS -4
|
||||||
|
|
|
@ -37,7 +37,7 @@ tzset, tzname, timezone, daylight \- initialize time conversion information
|
||||||
.nf
|
.nf
|
||||||
.B #include <time.h>
|
.B #include <time.h>
|
||||||
.PP
|
.PP
|
||||||
.B void tzset (void);
|
.B void tzset(void);
|
||||||
.PP
|
.PP
|
||||||
.BI "extern char *" tzname [2];
|
.BI "extern char *" tzname [2];
|
||||||
.BI "extern long " timezone ;
|
.BI "extern long " timezone ;
|
||||||
|
|
|
@ -460,8 +460,8 @@ integers and their external representations.
|
||||||
This routine returns one if it succeeds, zero otherwise.
|
This routine returns one if it succeeds, zero otherwise.
|
||||||
.PP
|
.PP
|
||||||
.nf
|
.nf
|
||||||
.BI "bool_t xdr_union(XDR *" xdrs ", int *" dscmp ", char *" unp ,
|
.BI "bool_t xdr_union(XDR *" xdrs ", enum_t *" dscmp ", char *" unp ,
|
||||||
.BI " struct xdr_discrim *" choices ,
|
.BI " const struct xdr_discrim *" choices ,
|
||||||
.BI " xdrproc_t " defaultarm "); /* may equal NULL */"
|
.BI " xdrproc_t " defaultarm "); /* may equal NULL */"
|
||||||
.fi
|
.fi
|
||||||
.IP
|
.IP
|
||||||
|
|
|
@ -374,7 +374,7 @@ POSIX.1-2001 and later.
|
||||||
.BR getegid (2),
|
.BR getegid (2),
|
||||||
.BR getgroups (2),
|
.BR getgroups (2),
|
||||||
.BR getresgid (2),
|
.BR getresgid (2),
|
||||||
.BR getgrnam (2),
|
.BR getgrnam (3),
|
||||||
.BR credentials (7)
|
.BR credentials (7)
|
||||||
.RE
|
.RE
|
||||||
.\"------------------------------------- id_t -------------------------/
|
.\"------------------------------------- id_t -------------------------/
|
||||||
|
@ -675,7 +675,7 @@ C11 and later; POSIX.1-2001 and later.
|
||||||
.IR "See also" :
|
.IR "See also" :
|
||||||
.BR setlocale (3),
|
.BR setlocale (3),
|
||||||
.BR localeconv (3),
|
.BR localeconv (3),
|
||||||
.BR charsets (5),
|
.BR charsets (7),
|
||||||
.BR locale (7)
|
.BR locale (7)
|
||||||
.RE
|
.RE
|
||||||
.\"------------------------------------- ldiv_t -----------------------/
|
.\"------------------------------------- ldiv_t -----------------------/
|
||||||
|
@ -1534,7 +1534,7 @@ POSIX.1-2001 and later.
|
||||||
.BR getuid (2),
|
.BR getuid (2),
|
||||||
.BR geteuid (2),
|
.BR geteuid (2),
|
||||||
.BR getresuid (2),
|
.BR getresuid (2),
|
||||||
.BR getpwnam (2),
|
.BR getpwnam (3),
|
||||||
.BR credentials (7)
|
.BR credentials (7)
|
||||||
.RE
|
.RE
|
||||||
.\"------------------------------------- uintmax_t --------------------/
|
.\"------------------------------------- uintmax_t --------------------/
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# SPDX-License-Identifier: GPL-2.0-only
|
# SPDX-License-Identifier: GPL-2.0-only
|
||||||
########################################################################
|
########################################################################
|
||||||
#
|
#
|
||||||
# (C) Copyright 2021, Alejandro Colomar
|
# (C) Copyright 2020, 2021, Alejandro Colomar
|
||||||
# These functions are free software; you can redistribute them and/or
|
# These functions are free software; you can redistribute them and/or
|
||||||
# modify them under the terms of the GNU General Public License
|
# modify them under the terms of the GNU General Public License
|
||||||
# as published by the Free Software Foundation; version 2.
|
# as published by the Free Software Foundation; version 2.
|
||||||
|
@ -20,6 +20,21 @@
|
||||||
EX_OK=0;
|
EX_OK=0;
|
||||||
EX_USAGE=64;
|
EX_USAGE=64;
|
||||||
|
|
||||||
|
########################################################################
|
||||||
|
# C
|
||||||
|
|
||||||
|
# sed_rm_ccomments() removes C comments.
|
||||||
|
# It can't handle multiple comments in a sinlge line correctly,
|
||||||
|
# nor mixed or embedded //... and /*...*/ comments.
|
||||||
|
# Use as a filter (see man_lsfunc() in this file).
|
||||||
|
|
||||||
|
function sed_rm_ccomments()
|
||||||
|
{
|
||||||
|
sed 's%/\*.*\*/%%' \
|
||||||
|
|sed -E '\%/\*%,\%\*/%{\%(\*/|/\*)%!d; s%/\*.*%%; s%.*\*/%%;}' \
|
||||||
|
|sed 's%//.*%%';
|
||||||
|
}
|
||||||
|
|
||||||
########################################################################
|
########################################################################
|
||||||
# Linux kernel
|
# Linux kernel
|
||||||
|
|
||||||
|
@ -30,20 +45,20 @@ EX_USAGE=64;
|
||||||
|
|
||||||
function grep_syscall()
|
function grep_syscall()
|
||||||
{
|
{
|
||||||
if ! [ -v 1 ]; then
|
if (($# != 1)); then
|
||||||
>&2 echo "Usage: ${FUNCNAME[0]} <syscall>";
|
>&2 echo "Usage: ${FUNCNAME[0]} <syscall>";
|
||||||
return ${EX_USAGE};
|
return ${EX_USAGE};
|
||||||
fi
|
fi
|
||||||
|
|
||||||
find * -type f \
|
find * -type f \
|
||||||
|grep '\.c$' \
|
|grep '\.c$' \
|
||||||
|sort -V \
|
|sort \
|
||||||
|xargs pcregrep -Mn "(?s)^\w*SYSCALL_DEFINE.\(${1},.*?\)" \
|
|xargs pcregrep -Mn "(?s)^\w*SYSCALL_DEFINE.\(${1},.*?\)" \
|
||||||
|sed -E 's/^[^:]+:[0-9]+:/&\n/';
|
|sed -E 's/^[^:]+:[0-9]+:/&\n/';
|
||||||
|
|
||||||
find * -type f \
|
find * -type f \
|
||||||
|grep '\.[ch]$' \
|
|grep '\.[ch]$' \
|
||||||
|sort -V \
|
|sort \
|
||||||
|xargs pcregrep -Mn "(?s)^asmlinkage\s+[\w\s]+\**sys_${1}\s*\(.*?\)" \
|
|xargs pcregrep -Mn "(?s)^asmlinkage\s+[\w\s]+\**sys_${1}\s*\(.*?\)" \
|
||||||
|sed -E 's/^[^:]+:[0-9]+:/&\n/';
|
|sed -E 's/^[^:]+:[0-9]+:/&\n/';
|
||||||
}
|
}
|
||||||
|
@ -55,14 +70,14 @@ function grep_syscall()
|
||||||
|
|
||||||
function grep_syscall_def()
|
function grep_syscall_def()
|
||||||
{
|
{
|
||||||
if ! [ -v 1 ]; then
|
if (($# != 1)); then
|
||||||
>&2 echo "Usage: ${FUNCNAME[0]} <syscall>";
|
>&2 echo "Usage: ${FUNCNAME[0]} <syscall>";
|
||||||
return ${EX_USAGE};
|
return ${EX_USAGE};
|
||||||
fi
|
fi
|
||||||
|
|
||||||
find * -type f \
|
find * -type f \
|
||||||
|grep '\.c$' \
|
|grep '\.c$' \
|
||||||
|sort -V \
|
|sort \
|
||||||
|xargs pcregrep -Mn "(?s)^\w*SYSCALL_DEFINE.\(${1},.*?^}" \
|
|xargs pcregrep -Mn "(?s)^\w*SYSCALL_DEFINE.\(${1},.*?^}" \
|
||||||
|sed -E 's/^[^:]+:[0-9]+:/&\n/';
|
|sed -E 's/^[^:]+:[0-9]+:/&\n/';
|
||||||
}
|
}
|
||||||
|
@ -70,26 +85,35 @@ function grep_syscall_def()
|
||||||
########################################################################
|
########################################################################
|
||||||
# Linux man-pages
|
# Linux man-pages
|
||||||
|
|
||||||
# man_section() prints a specific manual page section (DESCRIPTION, SYNOPSIS,
|
# man_section() prints specific manual page sections (DESCRIPTION, SYNOPSIS,
|
||||||
# ...) of all manual pages in a directory (or in a single manual page file).
|
# ...) of all manual pages in a directory (or in a single manual page file).
|
||||||
# Usage example: .../man-pages$ man_section man2 SYNOPSIS;
|
# Usage example: .../man-pages$ man_section man2 SYNOPSIS 'CONFORMING TO';
|
||||||
|
|
||||||
function man_section()
|
function man_section()
|
||||||
{
|
{
|
||||||
if ! [ -v 2 ]; then
|
if (($# < 2)); then
|
||||||
>&2 echo "Usage: ${FUNCNAME[0]} <dir> <section>";
|
>&2 echo "Usage: ${FUNCNAME[0]} <dir> <section>...";
|
||||||
return ${EX_USAGE};
|
return ${EX_USAGE};
|
||||||
fi
|
fi
|
||||||
|
|
||||||
find "${1}" -type f \
|
local page="$1";
|
||||||
|xargs grep -l "\.SH ${2}" \
|
shift;
|
||||||
|sort -V \
|
local sect="$@";
|
||||||
|
|
||||||
|
find "${page}" -type f \
|
||||||
|
|xargs wc -l \
|
||||||
|
|grep -v -e '\b1 ' -e '\btotal\b' \
|
||||||
|
|awk '{ print $2 }' \
|
||||||
|
|sort \
|
||||||
|while read -r manpage; do
|
|while read -r manpage; do
|
||||||
<${manpage} \
|
cat \
|
||||||
sed -n \
|
<(<${manpage} sed -n '/^\.TH/,/^\.SH/{/^\.SH/!p}') \
|
||||||
-e '/^\.TH/,/^\.SH/{/^\.SH/!p}' \
|
<(for s in ${sect}; do
|
||||||
-e "/^\.SH ${2}/p" \
|
<${manpage} \
|
||||||
-e "/^\.SH ${2}/,/^\.SH/{/^\.SH/!p}" \
|
sed -n \
|
||||||
|
-e "/^\.SH ${s}/p" \
|
||||||
|
-e "/^\.SH ${s}/,/^\.SH/{/^\.SH/!p}"; \
|
||||||
|
done;) \
|
||||||
|man -P cat -l - 2>/dev/null;
|
|man -P cat -l - 2>/dev/null;
|
||||||
done;
|
done;
|
||||||
}
|
}
|
||||||
|
@ -101,30 +125,45 @@ function man_section()
|
||||||
|
|
||||||
function man_lsfunc()
|
function man_lsfunc()
|
||||||
{
|
{
|
||||||
if ! [ -v 1 ]; then
|
if (($# < 1)); then
|
||||||
>&2 echo "Usage: ${FUNCNAME[0]} <dir>";
|
>&2 echo "Usage: ${FUNCNAME[0]} <manpage|manNdir>...";
|
||||||
return ${EX_USAGE};
|
return ${EX_USAGE};
|
||||||
fi
|
fi
|
||||||
|
|
||||||
find "${@}" -type f \
|
for arg in "$@"; do
|
||||||
|xargs grep -l "\.SH SYNOPSIS" \
|
man_section "${arg}" 'SYNOPSIS';
|
||||||
|sort -V \
|
|
||||||
|while read -r manpage; do
|
|
||||||
<${manpage} \
|
|
||||||
sed -n \
|
|
||||||
-e '/^\.TH/,/^\.SH/{/^\.SH/!p}' \
|
|
||||||
-e "/^\.SH SYNOPSIS/p" \
|
|
||||||
-e "/^\.SH SYNOPSIS/,/^\.SH/{/^\.SH/!p}" \
|
|
||||||
|sed \
|
|
||||||
-e '/Feature/,$d' \
|
|
||||||
-e '/{/,/}/d' \
|
|
||||||
|man -P cat -l - 2>/dev/null;
|
|
||||||
done \
|
done \
|
||||||
|sed -n "/^SYNOPSIS/,/^\w/p" \
|
|sed_rm_ccomments \
|
||||||
|grep '^ \w' \
|
|pcregrep -Mn '(?s)^ [\w ]+ \**\w+\([\w\s(,)[\]*]+?(...)?\s*\); *$' \
|
||||||
|grep -v ':' \
|
|grep '^[0-9]' \
|
||||||
|sed 's/^[^(]* \**\(\w*\)(.*/\1/' \
|
|sed -E 's/^[^(]+ \**(\w+)\(.*/\1/' \
|
||||||
|grep '^\w' \
|
|uniq;
|
||||||
|
}
|
||||||
|
|
||||||
|
# man_lsvar() prints the name of all C variables declared in the SYNOPSIS
|
||||||
|
# of all manual pages in a directory (or in a single manual page file).
|
||||||
|
# Each name is printed in a separate line
|
||||||
|
# Usage example: .../man-pages$ man_lsvar man3;
|
||||||
|
|
||||||
|
function man_lsvar()
|
||||||
|
{
|
||||||
|
if (($# < 1)); then
|
||||||
|
>&2 echo "Usage: ${FUNCNAME[0]} <manpage|manNdir>...";
|
||||||
|
return ${EX_USAGE};
|
||||||
|
fi
|
||||||
|
|
||||||
|
for arg in "$@"; do
|
||||||
|
man_section "${arg}" 'SYNOPSIS';
|
||||||
|
done \
|
||||||
|
|sed_rm_ccomments \
|
||||||
|
|pcregrep -Mv '(?s)^ [\w ]+ \**\w+\([\w\s(,)[\]*]+?(...)?\s*\); *$' \
|
||||||
|
|pcregrep -Mn \
|
||||||
|
-e '(?s)^ +extern [\w ]+ \**\(\*+[\w ]+\)\([\w\s(,)[\]*]+?\s*\); *$' \
|
||||||
|
-e '^ +extern [\w ]+ \**[\w ]+; *$' \
|
||||||
|
|grep '^[0-9]' \
|
||||||
|
|grep -v 'typedef' \
|
||||||
|
|sed -E 's/^[0-9]+: +extern [^(]+ \**\(\*+(\w* )?(\w+)\)\(.*/\2/' \
|
||||||
|
|sed 's/^[0-9]\+: \+extern .* \**\(\w\+\); */\1/' \
|
||||||
|uniq;
|
|uniq;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -133,7 +172,7 @@ function man_lsfunc()
|
||||||
|
|
||||||
function pdfman()
|
function pdfman()
|
||||||
{
|
{
|
||||||
if ! [ -v 1 ]; then
|
if (($# != 1)); then
|
||||||
>&2 echo "Usage: ${FUNCNAME[0]} <man-page.n>";
|
>&2 echo "Usage: ${FUNCNAME[0]} <man-page.n>";
|
||||||
return ${EX_USAGE};
|
return ${EX_USAGE};
|
||||||
fi;
|
fi;
|
||||||
|
@ -147,6 +186,19 @@ function pdfman()
|
||||||
xdg-open ${tmp};
|
xdg-open ${tmp};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# man_gitstaged prints a list of all files with changes staged for commit
|
||||||
|
# (basename only if the files are within <man?/>), separated by ", ".
|
||||||
|
# Usage example: .../man-pages$ git commit -m "$(man_gitstaged): msg";
|
||||||
|
|
||||||
|
function man_gitstaged()
|
||||||
|
{
|
||||||
|
git diff --staged --name-only \
|
||||||
|
|sed "s/$/, /" \
|
||||||
|
|sed "s%man[1-9]/%%" \
|
||||||
|
|tr -d '\n' \
|
||||||
|
|sed "s/, $//"
|
||||||
|
}
|
||||||
|
|
||||||
########################################################################
|
########################################################################
|
||||||
# Glibc
|
# Glibc
|
||||||
|
|
||||||
|
@ -157,14 +209,14 @@ function pdfman()
|
||||||
|
|
||||||
function grep_glibc_prototype()
|
function grep_glibc_prototype()
|
||||||
{
|
{
|
||||||
if ! [ -v 1 ]; then
|
if (($# != 1)); then
|
||||||
>&2 echo "Usage: ${FUNCNAME[0]} <func>";
|
>&2 echo "Usage: ${FUNCNAME[0]} <func>";
|
||||||
return ${EX_USAGE};
|
return ${EX_USAGE};
|
||||||
fi
|
fi
|
||||||
|
|
||||||
find * -type f \
|
find * -type f \
|
||||||
|grep '\.h$' \
|
|grep '\.h$' \
|
||||||
|sort -V \
|
|sort \
|
||||||
|xargs pcregrep -Mn \
|
|xargs pcregrep -Mn \
|
||||||
"(?s)^[\w[][\w\s(,)[:\]]+\s+\**${1}\s*\([\w\s(,)[\]*]+?(...)?\)[\w\s(,)[:\]]*;" \
|
"(?s)^[\w[][\w\s(,)[:\]]+\s+\**${1}\s*\([\w\s(,)[\]*]+?(...)?\)[\w\s(,)[:\]]*;" \
|
||||||
|sed -E 's/^[^:]+:[0-9]+:/&\n/';
|
|sed -E 's/^[^:]+:[0-9]+:/&\n/';
|
||||||
|
|
|
@ -1,34 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
|
|
||||||
## SPDX-License-Identifier: GPL-2.0-only
|
|
||||||
########################################################################
|
|
||||||
##
|
|
||||||
## (C) Copyright 2020, Alejandro Colomar
|
|
||||||
## This program is free software; you can redistribute it and/or
|
|
||||||
## modify it under the terms of the GNU General Public License
|
|
||||||
## as published by the Free Software Foundation; version 2.
|
|
||||||
##
|
|
||||||
## This program is distributed in the hope that it will be useful,
|
|
||||||
## but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
## GNU General Public License for more details
|
|
||||||
## (http://www.gnu.org/licenses/gpl-2.0.html).
|
|
||||||
##
|
|
||||||
########################################################################
|
|
||||||
##
|
|
||||||
## The output of this script is a
|
|
||||||
## list of all files with changes staged for commit
|
|
||||||
## (basename only if the files are within "man?/"),
|
|
||||||
## separated by ", ".
|
|
||||||
## Usage:
|
|
||||||
## git commit -m "$(./scripts/modified_pages.sh): Short message here"
|
|
||||||
##
|
|
||||||
|
|
||||||
|
|
||||||
git status \
|
|
||||||
|sed "/Changes not staged for commit:/q" \
|
|
||||||
|grep -E "^\s*(modified|deleted|new file):" \
|
|
||||||
|sed "s/^.*:\s*/, /" \
|
|
||||||
|sed "s%man[1-9]/%%" \
|
|
||||||
|tr -d '\n' \
|
|
||||||
|sed "s/^, //"
|
|
Loading…
Reference in New Issue