From: Alejandro Colomar Date: Sat, 10 Sep 2022 21:21:45 +0000 (+0200) Subject: Many pages: EXAMPLES: Add wrapper comments SRC BEGIN and SRC END X-Git-Tag: man-pages-6.00~49 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b0b6ab4e15df9abce3897775e866f6d9d3d5f18b;p=thirdparty%2Fman-pages.git Many pages: EXAMPLES: Add wrapper comments SRC BEGIN and SRC END This is used by the Makefile to extract the example program. Signed-off-by: Alex Colomar --- diff --git a/man3/CPU_SET.3 b/man3/CPU_SET.3 index fb194d9013..4d0b269b36 100644 --- a/man3/CPU_SET.3 +++ b/man3/CPU_SET.3 @@ -299,6 +299,7 @@ These bugs are fixed in glibc 2.9. The following program demonstrates the use of some of the macros used for dynamically allocated CPU sets. .PP +.\" SRC BEGIN (CPU_SET.c) .EX #define _GNU_SOURCE #include @@ -339,6 +340,7 @@ main(int argc, char *argv[]) exit(EXIT_SUCCESS); } .EE +.\" SRC END .SH SEE ALSO .BR sched_setaffinity (2), .BR pthread_attr_setaffinity_np (3), diff --git a/man3/MAX.3 b/man3/MAX.3 index fec4e5d27d..ea2042c2b0 100644 --- a/man3/MAX.3 +++ b/man3/MAX.3 @@ -45,6 +45,7 @@ Due to the usual arithmetic conversions, the result of these macros may be very different from either of the arguments. To avoid this, ensure that both arguments have the same type. .SH EXAMPLES +.\" SRC BEGIN (MAX.c) .EX #include #include @@ -68,6 +69,7 @@ main(int argc, char *argv[]) exit(EXIT_SUCCESS); } .EE +.\" SRC END .SH SEE ALSO .BR fmax (3), .BR fmin (3) diff --git a/man3/__ppc_get_timebase.3 b/man3/__ppc_get_timebase.3 index ca27b22771..70390cb017 100644 --- a/man3/__ppc_get_timebase.3 +++ b/man3/__ppc_get_timebase.3 @@ -53,6 +53,7 @@ between two calls to .BR __ppc_get_timebase (). .SS Program source \& +.\" SRC BEGIN (__ppc_get_timebase.c) .EX #include #include @@ -91,6 +92,7 @@ main(void) exit(EXIT_SUCCESS); } .EE +.\" SRC END .SH SEE ALSO .BR time (2), .BR usleep (3) diff --git a/man3/atexit.3 b/man3/atexit.3 index 422a579de6..920ade1d72 100644 --- a/man3/atexit.3 +++ b/man3/atexit.3 @@ -131,6 +131,7 @@ Since glibc 2.2.3, can be used within a shared library to establish functions that are called when the shared library is unloaded. .SH EXAMPLES +.\" SRC BEGIN (atexit.c) .EX #include #include @@ -160,6 +161,7 @@ main(void) exit(EXIT_SUCCESS); } .EE +.\" SRC END .SH SEE ALSO .BR _exit (2), .BR dlopen (3), diff --git a/man3/backtrace.3 b/man3/backtrace.3 index 3151c5482d..8b91cb1258 100644 --- a/man3/backtrace.3 +++ b/man3/backtrace.3 @@ -217,6 +217,7 @@ backtrace() returned 8 addresses .in .SS Program source \& +.\" SRC BEGIN (backtrace.c) .EX #include #include @@ -277,6 +278,7 @@ main(int argc, char *argv[]) exit(EXIT_SUCCESS); } .EE +.\" SRC END .SH SEE ALSO .BR addr2line (1), .BR gcc (1), diff --git a/man3/bsearch.3 b/man3/bsearch.3 index 83f0152051..ede91e3790 100644 --- a/man3/bsearch.3 +++ b/man3/bsearch.3 @@ -82,6 +82,7 @@ The example below first sorts an array of structures using then retrieves desired elements using .BR bsearch (). .PP +.\" SRC BEGIN (bsearch.c) .EX #include #include @@ -125,7 +126,7 @@ main(int argc, char *argv[]) exit(EXIT_SUCCESS); } .EE -.\" this example referred to in qsort.3 +.\" SRC END .SH SEE ALSO .BR hsearch (3), .BR lsearch (3), diff --git a/man3/bswap.3 b/man3/bswap.3 index 52d20ae158..833cd9ee33 100644 --- a/man3/bswap.3 +++ b/man3/bswap.3 @@ -38,6 +38,7 @@ $ \fB./a.out 0x0123456789abcdef\fP .in .SS Program source \& +.\" SRC BEGIN (bswap.c) .EX #include #include @@ -61,6 +62,7 @@ main(int argc, char *argv[]) exit(EXIT_SUCCESS); } .EE +.\" SRC END .SH SEE ALSO .BR byteorder (3), .BR endian (3) diff --git a/man3/cacos.3 b/man3/cacos.3 index 777a8d8cf6..56f8912a30 100644 --- a/man3/cacos.3 +++ b/man3/cacos.3 @@ -54,6 +54,7 @@ T} Thread safety MT-Safe .SH STANDARDS C99, POSIX.1-2001, POSIX.1-2008. .SH EXAMPLES +.\" SRC BEGIN (cacos.c) .EX /* Link with "\-lm" */ @@ -86,6 +87,7 @@ main(int argc, char *argv[]) exit(EXIT_SUCCESS); } .EE +.\" SRC END .SH SEE ALSO .BR ccos (3), .BR clog (3), diff --git a/man3/cacosh.3 b/man3/cacosh.3 index 1d17cb8722..d21e47364a 100644 --- a/man3/cacosh.3 +++ b/man3/cacosh.3 @@ -57,6 +57,7 @@ T} Thread safety MT-Safe .SH STANDARDS C99, POSIX.1-2001, POSIX.1-2008. .SH EXAMPLES +.\" SRC BEGIN (cacosh.c) .EX /* Link with "\-lm" */ @@ -86,6 +87,7 @@ main(int argc, char *argv[]) exit(EXIT_SUCCESS); } .EE +.\" SRC END .SH SEE ALSO .BR acosh (3), .BR cabs (3), diff --git a/man3/catan.3 b/man3/catan.3 index 5005c556c6..7ff383e5b6 100644 --- a/man3/catan.3 +++ b/man3/catan.3 @@ -54,6 +54,7 @@ T} Thread safety MT-Safe .SH STANDARDS C99, POSIX.1-2001, POSIX.1-2008. .SH EXAMPLES +.\" SRC BEGIN (catan.c) .EX /* Link with "\-lm" */ @@ -84,6 +85,7 @@ main(int argc, char *argv[]) exit(EXIT_SUCCESS); } .EE +.\" SRC END .SH SEE ALSO .BR ccos (3), .BR clog (3), diff --git a/man3/catanh.3 b/man3/catanh.3 index 68b33985f3..621ba11a1c 100644 --- a/man3/catanh.3 +++ b/man3/catanh.3 @@ -56,6 +56,7 @@ T} Thread safety MT-Safe .SH STANDARDS C99, POSIX.1-2001, POSIX.1-2008. .SH EXAMPLES +.\" SRC BEGIN (catanh.c) .EX /* Link with "\-lm" */ @@ -85,6 +86,7 @@ main(int argc, char *argv[]) exit(EXIT_SUCCESS); } .EE +.\" SRC END .SH SEE ALSO .BR atanh (3), .BR cabs (3), diff --git a/man3/circleq.3 b/man3/circleq.3 index a50a9a2028..3973c5280c 100644 --- a/man3/circleq.3 +++ b/man3/circleq.3 @@ -258,6 +258,7 @@ fix this limitation by allowing to safely be removed from the list and freed from within the loop without interfering with the traversal. .SH EXAMPLES +.\" SRC BEGIN (circleq.c) .EX #include #include @@ -313,6 +314,7 @@ main(void) exit(EXIT_SUCCESS); } .EE +.\" SRC END .SH SEE ALSO .BR insque (3), .BR queue (7) diff --git a/man3/clock_getcpuclockid.3 b/man3/clock_getcpuclockid.3 index 0ad1916fc0..d70332bccd 100644 --- a/man3/clock_getcpuclockid.3 +++ b/man3/clock_getcpuclockid.3 @@ -115,6 +115,7 @@ CPU\-time clock for PID 1 is 2.213466748 seconds .in .SS Program source \& +.\" SRC BEGIN (clock_getcpuclockid.c) .EX #define _XOPEN_SOURCE 600 #include @@ -149,6 +150,7 @@ main(int argc, char *argv[]) exit(EXIT_SUCCESS); } .EE +.\" SRC END .SH SEE ALSO .BR clock_getres (2), .BR timer_create (2), diff --git a/man3/dl_iterate_phdr.3 b/man3/dl_iterate_phdr.3 index 8297a79857..ac4297fb4d 100644 --- a/man3/dl_iterate_phdr.3 +++ b/man3/dl_iterate_phdr.3 @@ -284,6 +284,7 @@ Name: "/lib64/ld\-linux\-x86\-64.so.2" (7 segments) .in .SS Program source \& +.\" SRC BEGIN (dl_iterate_phdr.c) .EX #define _GNU_SOURCE #include @@ -334,6 +335,7 @@ main(int argc, char *argv[]) exit(EXIT_SUCCESS); } .EE +.\" SRC END .SH SEE ALSO .BR ldd (1), .BR objdump (1), diff --git a/man3/dlinfo.3 b/man3/dlinfo.3 index baf020ff33..c79467ac1b 100644 --- a/man3/dlinfo.3 +++ b/man3/dlinfo.3 @@ -245,6 +245,7 @@ dls_serpath[1].dls_name = /usr/lib64 .in .SS Program source \& +.\" SRC BEGIN (dlinfo.c) .EX #define _GNU_SOURCE #include @@ -310,6 +311,7 @@ main(int argc, char *argv[]) exit(EXIT_SUCCESS); } .EE +.\" SRC END .SH SEE ALSO .BR dl_iterate_phdr (3), .BR dladdr (3), diff --git a/man3/dlopen.3 b/man3/dlopen.3 index 9924016857..7e075a562e 100644 --- a/man3/dlopen.3 +++ b/man3/dlopen.3 @@ -551,6 +551,7 @@ $ \fB./a.out\fP .in .SS Program source \& +.\" SRC BEGIN (dlopen.c) .EX #include #include @@ -604,6 +605,7 @@ main(void) exit(EXIT_SUCCESS); } .EE +.\" SRC END .SH SEE ALSO .BR ld (1), .BR ldd (1), diff --git a/man3/duplocale.3 b/man3/duplocale.3 index cb14395d03..8712734ed5 100644 --- a/man3/duplocale.3 +++ b/man3/duplocale.3 @@ -117,6 +117,7 @@ ABC .in .SS Program source \& +.\" SRC BEGIN (duplocale.c) .EX #define _XOPEN_SOURCE 700 #include @@ -159,6 +160,7 @@ main(int argc, char *argv[]) exit(EXIT_SUCCESS); } .EE +.\" SRC END .SH SEE ALSO .BR freelocale (3), .BR newlocale (3), diff --git a/man3/encrypt.3 b/man3/encrypt.3 index e466cd0731..9f42c74444 100644 --- a/man3/encrypt.3 +++ b/man3/encrypt.3 @@ -153,6 +153,7 @@ See .SS Features in glibc In glibc 2.2, these functions use the DES algorithm. .SH EXAMPLES +.\" SRC BEGIN (encrypt.c) .EX #define _XOPEN_SOURCE #include @@ -200,6 +201,7 @@ main(void) exit(EXIT_SUCCESS); } .EE +.\" SRC END .SH SEE ALSO .BR cbc_crypt (3), .BR crypt (3), diff --git a/man3/end.3 b/man3/end.3 index ca9a5be117..1ee11da795 100644 --- a/man3/end.3 +++ b/man3/end.3 @@ -67,6 +67,7 @@ First address past: .in .SS Program source \& +.\" SRC BEGIN (end.c) .EX #include #include @@ -85,6 +86,7 @@ main(int argc, char *argv[]) exit(EXIT_SUCCESS); } .EE +.\" SRC END .SH SEE ALSO .BR objdump (1), .BR readelf (1), diff --git a/man3/endian.3 b/man3/endian.3 index 6d12fea856..e03350b52c 100644 --- a/man3/endian.3 +++ b/man3/endian.3 @@ -130,6 +130,7 @@ htobe32(x.u32) = 0x11223344 .in .SS Program source \& +.\" SRC BEGIN (endian.c) .EX #include #include @@ -156,6 +157,7 @@ main(int argc, char *argv[]) exit(EXIT_SUCCESS); } .EE +.\" SRC END .SH SEE ALSO .BR bswap (3), .BR byteorder (3) diff --git a/man3/envz_add.3 b/man3/envz_add.3 index 6c31424f62..c5a7ee309b 100644 --- a/man3/envz_add.3 +++ b/man3/envz_add.3 @@ -143,6 +143,7 @@ T} Thread safety MT-Safe .SH STANDARDS These functions are a GNU extension. .SH EXAMPLES +.\" SRC BEGIN (envz_add.c) .EX #include #include @@ -164,5 +165,6 @@ main(int argc, char *argv[], char *envp[]) exit(EXIT_SUCCESS); } .EE +.\" SRC END .SH SEE ALSO .BR argz_add (3) diff --git a/man3/fmemopen.3 b/man3/fmemopen.3 index 598aa4380b..d7f5a383d4 100644 --- a/man3/fmemopen.3 +++ b/man3/fmemopen.3 @@ -300,6 +300,7 @@ size=11; ptr=1 529 1849 .in .SS Program source \& +.\" SRC BEGIN (fmemopen.c) .EX #define _GNU_SOURCE #include @@ -349,6 +350,7 @@ main(int argc, char *argv[]) exit(EXIT_SUCCESS); } .EE +.\" SRC END .SH SEE ALSO .BR fopen (3), .BR fopencookie (3), diff --git a/man3/fmtmsg.3 b/man3/fmtmsg.3 index d8f30a85ae..a3ba128428 100644 --- a/man3/fmtmsg.3 +++ b/man3/fmtmsg.3 @@ -272,6 +272,7 @@ System V and UnixWare man pages tell us that these functions have been replaced by "pfmt() and addsev()" or by "pfmt(), vpfmt(), lfmt(), and vlfmt()", and will be removed later. .SH EXAMPLES +.\" SRC BEGIN (fmtmsg.c) .EX #include #include @@ -304,6 +305,7 @@ main(void) exit(EXIT_SUCCESS); } .EE +.\" SRC END .PP The output should be: .PP diff --git a/man3/fopencookie.3 b/man3/fopencookie.3 index 400455e356..8f09ab8b5e 100644 --- a/man3/fopencookie.3 +++ b/man3/fopencookie.3 @@ -286,6 +286,7 @@ could be improved to more robustly handle various error situations closing a stream that has already been closed). .SS Program source \& +.\" SRC BEGIN (fopencookie.c) .EX #define _GNU_SOURCE #include @@ -448,6 +449,7 @@ main(int argc, char *argv[]) exit(EXIT_SUCCESS); } .EE +.\" SRC END .SH SEE ALSO .BR fclose (3), .BR fmemopen (3), diff --git a/man3/fread.3 b/man3/fread.3 index 2ae36c1a4e..2fcceaa5f5 100644 --- a/man3/fread.3 +++ b/man3/fread.3 @@ -112,6 +112,7 @@ Class: 0x02 .in .SS Program source \& +.\" SRC BEGIN (fread.c) .EX #include #include @@ -151,6 +152,7 @@ main(void) exit(EXIT_SUCCESS); } .EE +.\" SRC END .SH SEE ALSO .BR read (2), .BR write (2), diff --git a/man3/frexp.3 b/man3/frexp.3 index b672683669..0c99b2f716 100644 --- a/man3/frexp.3 +++ b/man3/frexp.3 @@ -115,6 +115,7 @@ frexp(\-4, &e) = \-0.5: \-0.5 * 2\(ha3 = \-4 .in .SS Program source \& +.\" SRC BEGIN (frexp.c) .EX #include #include @@ -135,6 +136,7 @@ main(int argc, char *argv[]) exit(EXIT_SUCCESS); } .EE +.\" SRC END .SH SEE ALSO .BR ldexp (3), .BR modf (3) diff --git a/man3/ftw.3 b/man3/ftw.3 index 505a75522f..1ad0950169 100644 --- a/man3/ftw.3 +++ b/man3/ftw.3 @@ -444,6 +444,7 @@ argument when calling .BR nftw (). .SS Program source \& +.\" SRC BEGIN (ftw.c) .EX #define _XOPEN_SOURCE 500 #include @@ -493,6 +494,7 @@ main(int argc, char *argv[]) exit(EXIT_SUCCESS); } .EE +.\" SRC END .SH SEE ALSO .BR stat (2), .BR fts (3), diff --git a/man3/get_nprocs_conf.3 b/man3/get_nprocs_conf.3 index bbe920a69b..e41ea5c170 100644 --- a/man3/get_nprocs_conf.3 +++ b/man3/get_nprocs_conf.3 @@ -75,6 +75,7 @@ and .BR get_nprocs_conf () can be used. .PP +.\" SRC BEGIN (get_nprocs_conf.c) .EX #include #include @@ -89,5 +90,6 @@ main(int argc, char *argv[]) exit(EXIT_SUCCESS); } .EE +.\" SRC END .SH SEE ALSO .BR nproc (1) diff --git a/man3/get_phys_pages.3 b/man3/get_phys_pages.3 index 0af07e9e3a..c64233fc40 100644 --- a/man3/get_phys_pages.3 +++ b/man3/get_phys_pages.3 @@ -70,6 +70,7 @@ and .BR get_avphys_pages () can be used. .PP +.\" SRC BEGIN (get_phys_pages.c) .EX #include #include @@ -84,5 +85,6 @@ main(int argc, char *argv[]) exit(EXIT_SUCCESS); } .EE +.\" SRC END .SH SEE ALSO .BR sysconf (3) diff --git a/man3/getaddrinfo.3 b/man3/getaddrinfo.3 index 8a97b7008f..3ef9e494ed 100644 --- a/man3/getaddrinfo.3 +++ b/man3/getaddrinfo.3 @@ -642,6 +642,7 @@ and The programs are an echo server and client for UDP datagrams. .SS Server program \& +.\" SRC BEGIN (server.c) .EX #include #include @@ -735,8 +736,10 @@ main(int argc, char *argv[]) } } .EE +.\" SRC END .SS Client program \& +.\" SRC BEGIN (client.c) .EX #include #include @@ -831,6 +834,7 @@ main(int argc, char *argv[]) exit(EXIT_SUCCESS); } .EE +.\" SRC END .SH SEE ALSO .\" .BR getipnodebyaddr (3), .\" .BR getipnodebyname (3), diff --git a/man3/getaddrinfo_a.3 b/man3/getaddrinfo_a.3 index 131b781fd4..903b146699 100644 --- a/man3/getaddrinfo_a.3 +++ b/man3/getaddrinfo_a.3 @@ -332,6 +332,7 @@ gnu.org: 209.51.188.116 .PP Here is the program source code .PP +.\" SRC BEGIN (sync.c) .EX #define _GNU_SOURCE #include @@ -392,6 +393,7 @@ main(int argc, char *argv[]) exit(EXIT_SUCCESS); } .EE +.\" SRC END .SS Asynchronous example This example shows a simple interactive .BR getaddrinfo_a () @@ -421,6 +423,7 @@ $ \fB./a.out\fP .PP The program source is as follows: .PP +.\" SRC BEGIN (async.c) .EX #define _GNU_SOURCE #include @@ -597,6 +600,7 @@ main(int argc, char *argv[]) exit(EXIT_SUCCESS); } .EE +.\" SRC END .SH SEE ALSO .BR getaddrinfo (3), .BR inet (3), diff --git a/man3/getdate.3 b/man3/getdate.3 index 7554d401ca..a5fbb4e309 100644 --- a/man3/getdate.3 +++ b/man3/getdate.3 @@ -269,6 +269,7 @@ Call 3 ("12:22:33") succeeded: .in .SS Program source \& +.\" SRC BEGIN (getdate.c) .EX #define _GNU_SOURCE #include @@ -304,6 +305,7 @@ main(int argc, char *argv[]) exit(EXIT_SUCCESS); } .EE +.\" SRC END .SH SEE ALSO .BR time (2), .BR localtime (3), diff --git a/man3/getgrent_r.3 b/man3/getgrent_r.3 index 8a47bf59e7..085bd2a596 100644 --- a/man3/getgrent_r.3 +++ b/man3/getgrent_r.3 @@ -167,6 +167,7 @@ The function is not really reentrant since it shares the reading position in the stream with all other threads. .SH EXAMPLES +.\" SRC BEGIN (getgrent_r.c) .EX #define _GNU_SOURCE #include @@ -209,6 +210,7 @@ main(void) .\" printf("getgrent_r: %s", strerror(i)); .\" exit(EXIT_FAILURE); .\" } +.\" SRC END .SH SEE ALSO .BR fgetgrent (3), .BR getgrent (3), diff --git a/man3/getgrouplist.3 b/man3/getgrouplist.3 index 36c73816d9..9bfe4869b3 100644 --- a/man3/getgrouplist.3 +++ b/man3/getgrouplist.3 @@ -134,6 +134,7 @@ ngroups = 3 .in .SS Program source \& +.\" SRC BEGIN (getgrouplist.c) .EX #include #include @@ -191,6 +192,7 @@ main(int argc, char *argv[]) exit(EXIT_SUCCESS); } .EE +.\" SRC END .SH SEE ALSO .BR getgroups (2), .BR setgroups (2), diff --git a/man3/getline.3 b/man3/getline.3 index 4b6fa47818..e5b14d1cc0 100644 --- a/man3/getline.3 +++ b/man3/getline.3 @@ -143,6 +143,7 @@ and were originally GNU extensions. They were standardized in POSIX.1-2008. .SH EXAMPLES +.\" SRC BEGIN (getline.c) .EX #define _GNU_SOURCE #include @@ -177,6 +178,7 @@ main(int argc, char *argv[]) exit(EXIT_SUCCESS); } .EE +.\" SRC END .SH SEE ALSO .BR read (2), .BR fgets (3), diff --git a/man3/getopt.3 b/man3/getopt.3 index f209381157..bf2df58651 100644 --- a/man3/getopt.3 +++ b/man3/getopt.3 @@ -427,6 +427,7 @@ with no associated value; and .IR "\-t val" , which expects an associated value. .PP +.\" SRC BEGIN (getopt.c) .EX #include #include @@ -472,11 +473,13 @@ main(int argc, char *argv[]) exit(EXIT_SUCCESS); } .EE +.\" SRC END .SS getopt_long() The following example program illustrates the use of .BR getopt_long () with most of its features. .PP +.\" SRC BEGIN (getopt_long.c) .EX #include /* for printf */ #include /* for exit */ @@ -557,6 +560,7 @@ main(int argc, char *argv[]) exit(EXIT_SUCCESS); } .EE +.\" SRC END .SH SEE ALSO .BR getopt (1), .BR getsubopt (3) diff --git a/man3/getprotoent_r.3 b/man3/getprotoent_r.3 index 2e3815a303..affd20fe63 100644 --- a/man3/getprotoent_r.3 +++ b/man3/getprotoent_r.3 @@ -165,6 +165,7 @@ Call failed/record not found .in .SS Program source \& +.\" SRC BEGIN (getprotoent_r.c) .EX #define _GNU_SOURCE #include @@ -237,6 +238,7 @@ main(int argc, char *argv[]) exit(EXIT_SUCCESS); } .EE +.\" SRC END .SH SEE ALSO .BR getprotoent (3), .BR protocols (5) diff --git a/man3/getpwent_r.3 b/man3/getpwent_r.3 index bde13f399e..ea7cb3cdc7 100644 --- a/man3/getpwent_r.3 +++ b/man3/getpwent_r.3 @@ -171,6 +171,7 @@ The function is not really reentrant since it shares the reading position in the stream with all other threads. .SH EXAMPLES +.\" SRC BEGIN (getpwent_r.c) .EX #define _GNU_SOURCE #include @@ -207,6 +208,7 @@ main(void) .\" printf("getpwent_r: %s", strerror(i)); .\" exit(EXIT_SUCCESS); .\" } +.\" SRC END .SH SEE ALSO .BR fgetpwent (3), .BR getpw (3), diff --git a/man3/getpwnam.3 b/man3/getpwnam.3 index 219d377339..0f5044b2e3 100644 --- a/man3/getpwnam.3 +++ b/man3/getpwnam.3 @@ -277,6 +277,7 @@ The program below demonstrates the use of to find the full username and user ID for the username supplied as a command-line argument. .PP +.\" SRC BEGIN (getpwnam.c) .EX #include #include @@ -325,6 +326,7 @@ main(int argc, char *argv[]) exit(EXIT_SUCCESS); } .EE +.\" SRC END .SH SEE ALSO .BR endpwent (3), .BR fgetpwent (3), diff --git a/man3/getservent_r.3 b/man3/getservent_r.3 index 4e7b1f03de..bee718d7fc 100644 --- a/man3/getservent_r.3 +++ b/man3/getservent_r.3 @@ -165,6 +165,7 @@ Call failed/record not found .in .SS Program source \& +.\" SRC BEGIN (getservent_r.c) .EX #define _GNU_SOURCE #include @@ -243,6 +244,7 @@ main(int argc, char *argv[]) exit(EXIT_SUCCESS); } .EE +.\" SRC END .SH SEE ALSO .BR getservent (3), .BR services (5) diff --git a/man3/getsubopt.3 b/man3/getsubopt.3 index 7693fb9c04..686b5e2527 100644 --- a/man3/getsubopt.3 +++ b/man3/getsubopt.3 @@ -156,6 +156,7 @@ that string must be writable; it cannot be a string constant. .SH EXAMPLES The following program expects suboptions following a "\-o" option. .PP +.\" SRC BEGIN (getsubopt.c) .EX #define _XOPEN_SOURCE 500 #include @@ -242,5 +243,6 @@ main(int argc, char *argv[]) exit(EXIT_SUCCESS); } .EE +.\" SRC END .SH SEE ALSO .BR getopt (3) diff --git a/man3/getutent.3 b/man3/getutent.3 index 41d5490afe..0c0540ee5a 100644 --- a/man3/getutent.3 +++ b/man3/getutent.3 @@ -293,6 +293,7 @@ should check the return values of and .BR ttyname (3). .PP +.\" SRC BEGIN (getutent.c) .EX #include #include @@ -335,6 +336,7 @@ main(int argc, char *argv[]) exit(EXIT_SUCCESS); } .EE +.\" SRC END .SH SEE ALSO .BR getutmp (3), .BR utmp (5) diff --git a/man3/gnu_get_libc_version.3 b/man3/gnu_get_libc_version.3 index 967a504f59..221f9bc96a 100644 --- a/man3/gnu_get_libc_version.3 +++ b/man3/gnu_get_libc_version.3 @@ -61,6 +61,7 @@ GNU libc release: stable .in .SS Program source \& +.\" SRC BEGIN (gnu_get_libc_version.c) .EX #include #include @@ -74,5 +75,6 @@ main(int argc, char *argv[]) exit(EXIT_SUCCESS); } .EE +.\" SRC END .SH SEE ALSO .BR confstr (3) diff --git a/man3/hsearch.3 b/man3/hsearch.3 index 61774dbaf0..0b58fab196 100644 --- a/man3/hsearch.3 +++ b/man3/hsearch.3 @@ -285,6 +285,7 @@ Individual hash table entries can be added, but not deleted. The following program inserts 24 items into a hash table, then prints some of them. .PP +.\" SRC BEGIN (hsearch.c) .EX #include #include @@ -330,6 +331,7 @@ main(void) exit(EXIT_SUCCESS); } .EE +.\" SRC END .SH SEE ALSO .BR bsearch (3), .BR lsearch (3), diff --git a/man3/if_nameindex.3 b/man3/if_nameindex.3 index 82be58e9ef..3a6afd8191 100644 --- a/man3/if_nameindex.3 +++ b/man3/if_nameindex.3 @@ -120,6 +120,7 @@ $ \fB./a.out\fI .EE .in .SS Program source +.\" SRC BEGIN (if_nameindex.c) .EX #include #include @@ -145,6 +146,7 @@ main(int argc, char *argv[]) exit(EXIT_SUCCESS); } .EE +.\" SRC END .SH SEE ALSO .BR getsockopt (2), .BR setsockopt (2), diff --git a/man3/inet.3 b/man3/inet.3 index ee506228b3..3abbe055fb 100644 --- a/man3/inet.3 +++ b/man3/inet.3 @@ -287,6 +287,7 @@ Here are some example runs: .in .SS Program source \& +.\" SRC BEGIN (inet.c) .EX #define _DEFAULT_SOURCE #include @@ -312,6 +313,7 @@ main(int argc, char *argv[]) exit(EXIT_SUCCESS); } .EE +.\" SRC END .SH SEE ALSO .BR byteorder (3), .BR getaddrinfo (3), diff --git a/man3/inet_net_pton.3 b/man3/inet_net_pton.3 index 8dce6b2997..c7859bf1da 100644 --- a/man3/inet_net_pton.3 +++ b/man3/inet_net_pton.3 @@ -306,6 +306,7 @@ Raw address: c1a80180 .EE .in .SS Program source +.\" SRC BEGIN (inet_net_pton.c) .EX /* Link with "\-lresolv" */ @@ -364,6 +365,7 @@ main(int argc, char *argv[]) exit(EXIT_SUCCESS); } .EE +.\" SRC END .SH SEE ALSO .BR inet (3), .BR networks (5) diff --git a/man3/inet_pton.3 b/man3/inet_pton.3 index 807c4ea030..4f2bd623b5 100644 --- a/man3/inet_pton.3 +++ b/man3/inet_pton.3 @@ -175,6 +175,7 @@ Here are some example runs: .in .SS Program source \& +.\" SRC BEGIN (inet_pton.c) .EX #include #include @@ -215,6 +216,7 @@ main(int argc, char *argv[]) exit(EXIT_SUCCESS); } .EE +.\" SRC END .SH SEE ALSO .BR getaddrinfo (3), .BR inet (3), diff --git a/man3/insque.3 b/man3/insque.3 index 5da2aa2584..da690b2227 100644 --- a/man3/insque.3 +++ b/man3/insque.3 @@ -149,6 +149,7 @@ That was a circular list .in .SS Program source \& +.\" SRC BEGIN (insque.c) .EX #include #include @@ -240,5 +241,6 @@ main(int argc, char *argv[]) exit(EXIT_SUCCESS); } .EE +.\" SRC END .SH SEE ALSO .BR queue (7) diff --git a/man3/list.3 b/man3/list.3 index 0f4bf978ea..34ed958634 100644 --- a/man3/list.3 +++ b/man3/list.3 @@ -249,6 +249,7 @@ fixes this limitation by allowing to safely be removed from the list and freed from within the loop without interfering with the traversal. .SH EXAMPLES +.\" SRC BEGIN (list.c) .EX #include #include @@ -301,6 +302,7 @@ main(void) exit(EXIT_SUCCESS); } .EE +.\" SRC END .SH SEE ALSO .BR insque (3), .BR queue (7) diff --git a/man3/makecontext.3 b/man3/makecontext.3 index e2bc378c38..ee4265b240 100644 --- a/man3/makecontext.3 +++ b/man3/makecontext.3 @@ -168,6 +168,7 @@ main: exiting .in .SS Program source \& +.\" SRC BEGIN (makecontext.c) .EX #include #include @@ -227,6 +228,7 @@ main(int argc, char *argv[]) exit(EXIT_SUCCESS); } .EE +.\" SRC END .SH SEE ALSO .BR sigaction (2), .BR sigaltstack (2), diff --git a/man3/mallinfo.3 b/man3/mallinfo.3 index 7991c9a4d0..a1d13a38fd 100644 --- a/man3/mallinfo.3 +++ b/man3/mallinfo.3 @@ -255,6 +255,7 @@ Topmost releasable block (keepcost): 31168 .in .SS Program source \& +.\" SRC BEGIN (mallinfo.c) .EX #include #include @@ -327,6 +328,7 @@ main(int argc, char *argv[]) exit(EXIT_SUCCESS); } .EE +.\" SRC END .SH SEE ALSO .ad l .nh diff --git a/man3/malloc_info.3 b/man3/malloc_info.3 index e49bb80717..bf1c41e427 100644 --- a/man3/malloc_info.3 +++ b/man3/malloc_info.3 @@ -165,6 +165,7 @@ glibc 2.13 .EE .in .SS Program source +.\" SRC BEGIN (malloc_info.c) .EX #include #include @@ -250,6 +251,7 @@ main(int argc, char *argv[]) exit(EXIT_SUCCESS); } .EE +.\" SRC END .SH SEE ALSO .BR mallinfo (3), .BR malloc (3), diff --git a/man3/mallopt.3 b/man3/mallopt.3 index 43438d213b..61aabf7334 100644 --- a/man3/mallopt.3 +++ b/man3/mallopt.3 @@ -563,6 +563,7 @@ main(): returned from second free() call .in .SS Program source \& +.\" SRC BEGIN (mallopt.c) .EX #include #include @@ -595,6 +596,7 @@ main(int argc, char *argv[]) exit(EXIT_SUCCESS); } .EE +.\" SRC END .SH SEE ALSO .ad l .nh diff --git a/man3/matherr.3 b/man3/matherr.3 index e5b8f645ac..6dd85fe51c 100644 --- a/man3/matherr.3 +++ b/man3/matherr.3 @@ -359,6 +359,7 @@ x=12345.000000 .in .SS Program source \& +.\" SRC BEGIN (matherr.c) .EX #define _SVID_SOURCE #include @@ -422,6 +423,7 @@ main(int argc, char *argv[]) exit(EXIT_SUCCESS); } .EE +.\" SRC END .SH SEE ALSO .BR fenv (3), .BR math_error (7), diff --git a/man3/mbstowcs.3 b/man3/mbstowcs.3 index 30a2a86790..694c6c02a0 100644 --- a/man3/mbstowcs.3 +++ b/man3/mbstowcs.3 @@ -145,6 +145,7 @@ Wide character string is: Grüße! (6 characters) .in .SS Program source \& +.\" SRC BEGIN (mbstowcs.c) .EX #include #include @@ -230,6 +231,7 @@ main(int argc, char *argv[]) exit(EXIT_SUCCESS); } .EE +.\" SRC END .SH SEE ALSO .BR mblen (3), .BR mbsrtowcs (3), diff --git a/man3/mcheck.3 b/man3/mcheck.3 index 032d902737..2d485f2d0d 100644 --- a/man3/mcheck.3 +++ b/man3/mcheck.3 @@ -179,6 +179,7 @@ Aborted (core dumped) .in .SS Program source \& +.\" SRC BEGIN (mcheck.c) .EX #include #include @@ -205,6 +206,7 @@ main(int argc, char *argv[]) exit(EXIT_SUCCESS); } .EE +.\" SRC END .SH SEE ALSO .BR malloc (3), .BR mallopt (3), diff --git a/man3/mq_getattr.3 b/man3/mq_getattr.3 index 104ed51d53..2f439f584c 100644 --- a/man3/mq_getattr.3 +++ b/man3/mq_getattr.3 @@ -179,6 +179,7 @@ $ \fBcat /proc/sys/fs/mqueue/msgsize_default\fP .in .SS Program source \& +.\" SRC BEGIN (mq_getattr.c) .EX #include #include @@ -217,6 +218,7 @@ main(int argc, char *argv[]) exit(EXIT_SUCCESS); } .EE +.\" SRC END .SH SEE ALSO .BR mq_close (3), .BR mq_notify (3), diff --git a/man3/mq_notify.3 b/man3/mq_notify.3 index b4b2016322..d4ec9f5ed5 100644 --- a/man3/mq_notify.3 +++ b/man3/mq_notify.3 @@ -200,6 +200,7 @@ Notification is performed by creating a thread. The thread executes a function which reads one message from the queue and then terminates the process. .SS Program source +.\" SRC BEGIN (mq_notify.c) .EX #include #include @@ -261,6 +262,7 @@ main(int argc, char *argv[]) pause(); /* Process will be terminated by thread function */ } .EE +.\" SRC END .SH SEE ALSO .BR mq_close (3), .BR mq_getattr (3), diff --git a/man3/mtrace.3 b/man3/mtrace.3 index 93434219fa..a09e8b5e7a 100644 --- a/man3/mtrace.3 +++ b/man3/mtrace.3 @@ -125,8 +125,9 @@ command in a program that has memory leaks at two different locations. The demonstration uses the following program: .PP .in +4n -.EX .RB "$ " "cat t_mtrace.c" +.\" SRC BEGIN (t_mtrace.c) +.EX #include #include #include @@ -143,6 +144,7 @@ main(int argc, char *argv[]) exit(EXIT_SUCCESS); } .EE +.\" SRC END .in .PP When we run the program as follows, we see that diff --git a/man3/newlocale.3 b/man3/newlocale.3 index 89d8303560..a300fc622a 100644 --- a/man3/newlocale.3 +++ b/man3/newlocale.3 @@ -276,6 +276,7 @@ Te Paraire, te 07 o Poutū\-te\-rangi, 2014 00:38:44 CET .EE .in .SS Program source +.\" SRC BEGIN (newlocale.c) .EX #define _XOPEN_SOURCE 700 #include @@ -349,6 +350,7 @@ main(int argc, char *argv[]) exit(EXIT_SUCCESS); } .EE +.\" SRC END .SH SEE ALSO .BR locale (1), .BR duplocale (3), diff --git a/man3/nl_langinfo.3 b/man3/nl_langinfo.3 index dc2000d40c..ce05a606ab 100644 --- a/man3/nl_langinfo.3 +++ b/man3/nl_langinfo.3 @@ -323,6 +323,7 @@ The following program sets the character type and the numeric locale according to the environment and queries the terminal character set and the radix character. .PP +.\" SRC BEGIN (nl_langinfo.c) .EX #include #include @@ -341,6 +342,7 @@ main(int argc, char *argv[]) exit(EXIT_SUCCESS); } .EE +.\" SRC END .SH SEE ALSO .BR locale (1), .BR localeconv (3), diff --git a/man3/offsetof.3 b/man3/offsetof.3 index 2714717d50..3273ce82b1 100644 --- a/man3/offsetof.3 +++ b/man3/offsetof.3 @@ -79,6 +79,7 @@ sizeof(struct s)=16 .in .SS Program source \& +.\" SRC BEGIN (offsetof.c) .EX #include #include @@ -104,3 +105,4 @@ main(void) exit(EXIT_SUCCESS); } .EE +.\" SRC END diff --git a/man3/posix_spawn.3 b/man3/posix_spawn.3 index 7bf6dbd770..b60de1faa1 100644 --- a/man3/posix_spawn.3 +++ b/man3/posix_spawn.3 @@ -663,6 +663,7 @@ Child status: exited, status=127 .in .SS Program source \& +.\" SRC BEGIN (posix_spawn.c) .EX #include #include @@ -788,6 +789,7 @@ main(int argc, char *argv[]) exit(EXIT_SUCCESS); } .EE +.\" SRC END .SH SEE ALSO .nh \" Disable hyphenation .ad l diff --git a/man3/pthread_attr_init.3 b/man3/pthread_attr_init.3 index 2b625d7453..dfe4fd3d95 100644 --- a/man3/pthread_attr_init.3 +++ b/man3/pthread_attr_init.3 @@ -146,6 +146,7 @@ Thread attributes: .in .SS Program source \& +.\" SRC BEGIN (pthread_attr_init.c) .EX #define _GNU_SOURCE /* To get pthread_getattr_np() declaration */ #include @@ -293,6 +294,7 @@ main(int argc, char *argv[]) pause(); /* Terminates when other thread calls exit() */ } .EE +.\" SRC END .SH SEE ALSO .ad l .nh diff --git a/man3/pthread_cancel.3 b/man3/pthread_cancel.3 index 64557acca7..0e82b00037 100644 --- a/man3/pthread_cancel.3 +++ b/man3/pthread_cancel.3 @@ -148,6 +148,7 @@ main(): thread was canceled .in .SS Program source \& +.\" SRC BEGIN (pthread_cancel.c) .EX #include #include @@ -221,6 +222,7 @@ main(void) exit(EXIT_SUCCESS); } .EE +.\" SRC END .SH SEE ALSO .ad l .nh diff --git a/man3/pthread_cleanup_push.3 b/man3/pthread_cleanup_push.3 index 52c4bf32ac..0eb38a77d8 100644 --- a/man3/pthread_cleanup_push.3 +++ b/man3/pthread_cleanup_push.3 @@ -228,6 +228,7 @@ the clean-up handler was executed, because the argument given to was nonzero. .SS Program source \& +.\" SRC BEGIN (pthread_cleanup_push.c) .EX #include #include @@ -310,6 +311,7 @@ main(int argc, char *argv[]) exit(EXIT_SUCCESS); } .EE +.\" SRC END .SH SEE ALSO .BR pthread_cancel (3), .BR pthread_cleanup_push_defer_np (3), diff --git a/man3/pthread_create.3 b/man3/pthread_create.3 index 4555cc2e88..7f5f0ed3d5 100644 --- a/man3/pthread_create.3 +++ b/man3/pthread_create.3 @@ -264,6 +264,7 @@ Joined with thread 3; returned value was SERVUS .in .SS Program source \& +.\" SRC BEGIN (pthread_create.c) .EX #include #include @@ -389,6 +390,7 @@ main(int argc, char *argv[]) exit(EXIT_SUCCESS); } .EE +.\" SRC END .SH SEE ALSO .ad l .nh diff --git a/man3/pthread_getattr_default_np.3 b/man3/pthread_getattr_default_np.3 index ec2093ee22..269ee16997 100644 --- a/man3/pthread_getattr_default_np.3 +++ b/man3/pthread_getattr_default_np.3 @@ -100,6 +100,7 @@ Inherit scheduler: INHERIT .in .SS Program source \& +.\" SRC BEGIN (pthread_getattr_default_np.c) .EX #define _GNU_SOURCE #include @@ -177,6 +178,7 @@ main(int argc, char *argv[]) exit(EXIT_SUCCESS); } .EE +.\" SRC END .SH SEE ALSO .ad l .nh diff --git a/man3/pthread_getattr_np.3 b/man3/pthread_getattr_np.3 index 7c859a0573..7496e634e0 100644 --- a/man3/pthread_getattr_np.3 +++ b/man3/pthread_getattr_np.3 @@ -176,6 +176,7 @@ Attributes of created thread: .in .SS Program source \& +.\" SRC BEGIN (pthread_getattr_np.c) .EX #define _GNU_SOURCE /* To get pthread_getattr_np() declaration */ #include @@ -340,6 +341,7 @@ main(int argc, char *argv[]) pause(); /* Terminates when other thread calls exit() */ } .EE +.\" SRC END .SH SEE ALSO .ad l .nh diff --git a/man3/pthread_getcpuclockid.3 b/man3/pthread_getcpuclockid.3 index 82f991ad8c..fa5369472f 100644 --- a/man3/pthread_getcpuclockid.3 +++ b/man3/pthread_getcpuclockid.3 @@ -96,6 +96,7 @@ Subthread CPU time: 0.992 .in .SS Program source \& +.\" SRC BEGIN (pthread_getcpuclockid.c) .EX /* Link with "\-lrt" */ @@ -169,6 +170,7 @@ main(int argc, char *argv[]) exit(EXIT_SUCCESS); /* Terminates both threads */ } .EE +.\" SRC END .SH SEE ALSO .BR clock_gettime (2), .BR clock_settime (2), diff --git a/man3/pthread_mutexattr_setrobust.3 b/man3/pthread_mutexattr_setrobust.3 index 9bf2c3d1ec..3bd646cbd5 100644 --- a/man3/pthread_mutexattr_setrobust.3 +++ b/man3/pthread_mutexattr_setrobust.3 @@ -190,6 +190,7 @@ $ \fB./a.out\fP .EE .in .SS Program source +.\" SRC BEGIN (pthread_mutexattr_setrobust.c) .EX #include #include @@ -253,6 +254,7 @@ main(int argc, char *argv[]) } } .EE +.\" SRC END .SH SEE ALSO .ad l .nh diff --git a/man3/pthread_setaffinity_np.3 b/man3/pthread_setaffinity_np.3 index 33e907d82f..39e1490cde 100644 --- a/man3/pthread_setaffinity_np.3 +++ b/man3/pthread_setaffinity_np.3 @@ -155,6 +155,7 @@ and then calls .BR pthread_getaffinity_np () to check the resulting CPU affinity mask of the thread. .PP +.\" SRC BEGIN (pthread_setaffinity_np.c) .EX #define _GNU_SOURCE #include @@ -198,6 +199,7 @@ main(int argc, char *argv[]) exit(EXIT_SUCCESS); } .EE +.\" SRC END .SH SEE ALSO .BR sched_setaffinity (2), .BR CPU_SET (3), diff --git a/man3/pthread_setname_np.3 b/man3/pthread_setname_np.3 index 1155577872..19ba0f80b1 100644 --- a/man3/pthread_setname_np.3 +++ b/man3/pthread_setname_np.3 @@ -138,6 +138,7 @@ THREADFOO .in .SS Program source \& +.\" SRC BEGIN (pthread_setname_np.c) .EX #define _GNU_SOURCE #include @@ -195,6 +196,7 @@ main(int argc, char *argv[]) exit(EXIT_SUCCESS); } .EE +.\" SRC END .SH SEE ALSO .ad l .nh diff --git a/man3/pthread_setschedparam.3 b/man3/pthread_setschedparam.3 index 4a3e266a64..f129465c38 100644 --- a/man3/pthread_setschedparam.3 +++ b/man3/pthread_setschedparam.3 @@ -222,6 +222,7 @@ option, the output would have been the same, since is the default for the inherit scheduler attribute. .SS Program source \& +.\" SRC BEGIN (pthreads_sched_test.c) .EX /* pthreads_sched_test.c */ @@ -429,6 +430,7 @@ main(int argc, char *argv[]) exit(EXIT_SUCCESS); } .EE +.\" SRC END .SH SEE ALSO .ad l .nh diff --git a/man3/pthread_sigmask.3 b/man3/pthread_sigmask.3 index ffec8bce59..1a1c63f992 100644 --- a/man3/pthread_sigmask.3 +++ b/man3/pthread_sigmask.3 @@ -94,6 +94,7 @@ Signal handling thread got signal 10 .in .SS Program source \& +.\" SRC BEGIN (pthread_sigmask.c) .EX #include #include @@ -148,6 +149,7 @@ main(int argc, char *argv[]) pause(); /* Dummy pause so we can test program */ } .EE +.\" SRC END .SH SEE ALSO .BR sigaction (2), .BR sigpending (2), diff --git a/man3/qsort.3 b/man3/qsort.3 index c1abf3d97b..1007653df5 100644 --- a/man3/qsort.3 +++ b/man3/qsort.3 @@ -111,6 +111,7 @@ For one example of use, see the example under Another example is the following program, which sorts the strings given in its command-line arguments: .PP +.\" SRC BEGIN (qsort.c) .EX #include #include @@ -141,6 +142,7 @@ main(int argc, char *argv[]) exit(EXIT_SUCCESS); } .EE +.\" SRC END .SH SEE ALSO .BR sort (1), .BR alphasort (3), diff --git a/man3/rand.3 b/man3/rand.3 index 45d9ddab70..d313e91b2b 100644 --- a/man3/rand.3 +++ b/man3/rand.3 @@ -191,6 +191,7 @@ pseudo-random sequence produced by when given a particular seed. .PP .in +4n +.\" SRC BEGIN (rand.c) .EX #include #include @@ -218,6 +219,7 @@ main(int argc, char *argv[]) exit(EXIT_SUCCESS); } .EE +.\" SRC END .in .SH SEE ALSO .BR drand48 (3), diff --git a/man3/rpmatch.3 b/man3/rpmatch.3 index 96a4c28bed..d53fa8e0f0 100644 --- a/man3/rpmatch.3 +++ b/man3/rpmatch.3 @@ -141,6 +141,7 @@ The following program displays the results when .BR rpmatch () is applied to the string given in the program's command-line argument. .PP +.\" SRC BEGIN (rpmatch.c) .EX #define _SVID_SOURCE #include @@ -161,6 +162,7 @@ main(int argc, char *argv[]) exit(EXIT_SUCCESS); } .EE +.\" SRC END .SH SEE ALSO .BR fgets (3), .BR getline (3), diff --git a/man3/rtime.3 b/man3/rtime.3 index 5de2ec8257..3b52201a07 100644 --- a/man3/rtime.3 +++ b/man3/rtime.3 @@ -106,6 +106,7 @@ The program connects to a computer called "linux". Using "localhost" does not work. The result is the localtime of the computer "linux". .PP +.\" SRC BEGIN (rtime.c) .EX #include #include @@ -143,6 +144,7 @@ main(void) exit(EXIT_SUCCESS); } .EE +.\" SRC END .SH SEE ALSO .\" .BR netdate (1), .BR ntpdate (1), diff --git a/man3/scandir.3 b/man3/scandir.3 index 0807b8cb2d..0213507370 100644 --- a/man3/scandir.3 +++ b/man3/scandir.3 @@ -260,6 +260,7 @@ in reverse order. .\" .SS Program source \& +.\" SRC BEGIN (scandir.c) .EX #define _DEFAULT_SOURCE #include @@ -287,6 +288,7 @@ main(void) exit(EXIT_SUCCESS); } .EE +.\" SRC END .SH SEE ALSO .BR closedir (3), .BR fnmatch (3), diff --git a/man3/sem_wait.3 b/man3/sem_wait.3 index 3cc0ce09fd..24a4abc317 100644 --- a/man3/sem_wait.3 +++ b/man3/sem_wait.3 @@ -163,6 +163,7 @@ sem_timedwait() timed out .in .SS Program source \& +.\" SRC BEGIN (sem_wait.c) .EX #include #include @@ -239,6 +240,7 @@ main(int argc, char *argv[]) exit((s == 0) ? EXIT_SUCCESS : EXIT_FAILURE); } .EE +.\" SRC END .SH SEE ALSO .BR clock_gettime (2), .BR sem_getvalue (3), diff --git a/man3/setaliasent.3 b/man3/setaliasent.3 index 9d3cfb9682..6a203dfad2 100644 --- a/man3/setaliasent.3 +++ b/man3/setaliasent.3 @@ -142,6 +142,7 @@ The following example compiles with .IR "gcc example.c \-o example" . It will dump all names in the alias database. .PP +.\" SRC BEGIN (setaliasent.c) .EX #include #include @@ -167,6 +168,7 @@ main(void) exit(EXIT_SUCCESS); } .EE +.\" SRC END .SH SEE ALSO .BR getgrent (3), .BR getpwent (3), diff --git a/man3/setbuf.3 b/man3/setbuf.3 index 4a62952d78..d2381de2fc 100644 --- a/man3/setbuf.3 +++ b/man3/setbuf.3 @@ -197,6 +197,7 @@ points to still exists by the time is closed, which also happens at program termination. For example, the following is invalid: .PP +.\" SRC BEGIN (setbuf.c) .EX #include @@ -209,6 +210,7 @@ main(void) return 0; } .EE +.\" SRC END .SH SEE ALSO .BR stdbuf (1), .BR fclose (3), diff --git a/man3/shm_open.3 b/man3/shm_open.3 index c82b152be1..8ddad52b3e 100644 --- a/man3/shm_open.3 +++ b/man3/shm_open.3 @@ -289,6 +289,7 @@ Its primary purpose is to define a structure that will be imposed on the memory object that is shared between the two programs. .PP .in +4n +.\" SRC BEGIN (pshm_ucase.h) .EX #include #include @@ -313,6 +314,7 @@ struct shmbuf { char buf[BUF_SIZE]; /* Data being transferred */ }; .EE +.\" SRC END .in .\" .SS Program source: pshm_ucase_bounce.c @@ -330,6 +332,7 @@ in the memory by the "send" program and then posts the second semaphore to tell the "send" program that it may now access the shared memory. .PP .in +4n +.\" SRC BEGIN (pshm_ucase_bounce.c) .EX /* pshm_ucase_bounce.c @@ -400,6 +403,7 @@ main(int argc, char *argv[]) exit(EXIT_SUCCESS); } .EE +.\" SRC END .in .\" .SS Program source: pshm_ucase_send.c @@ -418,6 +422,7 @@ the "send" program prints the contents of the shared memory on standard output. .PP .in +4n +.\" SRC BEGIN (pshm_ucase_send.c) .EX /* pshm_ucase_send.c @@ -480,6 +485,7 @@ main(int argc, char *argv[]) exit(EXIT_SUCCESS); } .EE +.\" SRC END .in .SH SEE ALSO .BR close (2), diff --git a/man3/slist.3 b/man3/slist.3 index 7ca588919a..6e32dba90d 100644 --- a/man3/slist.3 +++ b/man3/slist.3 @@ -257,6 +257,7 @@ fixes this limitation by allowing to safely be removed from the list and freed from within the loop without interfering with the traversal. .SH EXAMPLES +.\" SRC BEGIN (slist.c) .EX #include #include @@ -312,6 +313,7 @@ main(void) exit(EXIT_SUCCESS); } .EE +.\" SRC END .SH SEE ALSO .BR insque (3), .BR queue (7) diff --git a/man3/stailq.3 b/man3/stailq.3 index bfce876721..359c1342c2 100644 --- a/man3/stailq.3 +++ b/man3/stailq.3 @@ -310,6 +310,7 @@ fixes this limitation by allowing to safely be removed from the list and freed from within the loop without interfering with the traversal. .SH EXAMPLES +.\" SRC BEGIN (stailq.c) .EX #include #include @@ -370,6 +371,7 @@ main(void) exit(EXIT_SUCCESS); } .EE +.\" SRC END .SH SEE ALSO .BR insque (3), .BR queue (7) diff --git a/man3/stpcpy.3 b/man3/stpcpy.3 index 1efa79133a..487ee6d090 100644 --- a/man3/stpcpy.3 +++ b/man3/stpcpy.3 @@ -85,6 +85,7 @@ to produce .BR foobar , which it then prints. .PP +.\" SRC BEGIN (stpcpy.c) .EX #define _GNU_SOURCE #include @@ -101,6 +102,7 @@ main(void) printf("%s\en", buffer); } .EE +.\" SRC END .SH SEE ALSO .BR bcopy (3), .BR memccpy (3), diff --git a/man3/strcat.3 b/man3/strcat.3 index 5738bb9be9..6c719dc001 100644 --- a/man3/strcat.3 +++ b/man3/strcat.3 @@ -191,6 +191,7 @@ will provide better performance.) .\" .SS Program source \& +.\" SRC BEGIN (strcat.c) .EX #include #include @@ -214,7 +215,7 @@ main(int argc, char *argv[]) } } .EE -.\" +.\" SRC END .SH SEE ALSO .BR bcopy (3), .BR memccpy (3), diff --git a/man3/strcmp.3 b/man3/strcmp.3 index 933011b9cb..5f1eb05678 100644 --- a/man3/strcmp.3 +++ b/man3/strcmp.3 @@ -156,6 +156,7 @@ $ \fB./string_comp ABC AB 2\fP .in .SS Program source \& +.\" SRC BEGIN (string_comp.c) .EX /* string_comp.c @@ -194,6 +195,7 @@ main(int argc, char *argv[]) exit(EXIT_SUCCESS); } .EE +.\" SRC END .SH SEE ALSO .BR bcmp (3), .BR memcmp (3), diff --git a/man3/strftime.3 b/man3/strftime.3 index 9a10275caa..ce4dcc1685 100644 --- a/man3/strftime.3 +++ b/man3/strftime.3 @@ -733,6 +733,7 @@ Result string is " 11" .in .SS Program source \& +.\" SRC BEGIN (strftime.c) .EX #include #include @@ -761,6 +762,7 @@ main(int argc, char *argv[]) exit(EXIT_SUCCESS); } .EE +.\" SRC END .SH SEE ALSO .BR date (1), .BR time (2), diff --git a/man3/strptime.3 b/man3/strptime.3 index e220f21b09..01f3873552 100644 --- a/man3/strptime.3 +++ b/man3/strptime.3 @@ -383,6 +383,7 @@ The following example demonstrates the use of and .BR strftime (3). .PP +.\" SRC BEGIN (strptime.c) .EX #define _XOPEN_SOURCE #include @@ -403,6 +404,7 @@ main(void) exit(EXIT_SUCCESS); } .EE +.\" SRC END .SH SEE ALSO .BR time (2), .BR getdate (3), diff --git a/man3/strsep.3 b/man3/strsep.3 index ba863e5eb6..7a7a7f5988 100644 --- a/man3/strsep.3 +++ b/man3/strsep.3 @@ -125,6 +125,7 @@ which, however, doesn't discard multiple delimiters or empty tokens: .in .SS Program source \& +.\" SRC BEGIN (strsep.c) .EX #include #include @@ -150,6 +151,7 @@ main(int argc, char *argv[]) exit(EXIT_SUCCESS); } .EE +.\" SRC END .SH SEE ALSO .BR index (3), .BR memchr (3), diff --git a/man3/strtok.3 b/man3/strtok.3 index 8872957d08..dd45e91c26 100644 --- a/man3/strtok.3 +++ b/man3/strtok.3 @@ -228,6 +228,7 @@ An example of the output produced by this program is the following: .in .SS Program source \& +.\" SRC BEGIN (strtok.c) .EX #include #include @@ -263,6 +264,7 @@ main(int argc, char *argv[]) exit(EXIT_SUCCESS); } .EE +.\" SRC END .PP Another example program using .BR strtok () diff --git a/man3/strtol.3 b/man3/strtol.3 index 8152c91e26..75973618cb 100644 --- a/man3/strtol.3 +++ b/man3/strtol.3 @@ -236,6 +236,7 @@ strtol: Numerical result out of range .in .SS Program source \& +.\" SRC BEGIN (strtol.c) .EX #include #include @@ -282,6 +283,7 @@ main(int argc, char *argv[]) exit(EXIT_SUCCESS); } .EE +.\" SRC END .SH SEE ALSO .BR atof (3), .BR atoi (3), diff --git a/man3/strverscmp.3 b/man3/strverscmp.3 index c5bb2825a0..00deff97e7 100644 --- a/man3/strverscmp.3 +++ b/man3/strverscmp.3 @@ -115,6 +115,7 @@ jan1 < jan10 .in .SS Program source \& +.\" SRC BEGIN (strverscmp.c) .EX #define _GNU_SOURCE #include @@ -139,6 +140,7 @@ main(int argc, char *argv[]) exit(EXIT_SUCCESS); } .EE +.\" SRC END .SH SEE ALSO .BR rename (1), .BR strcasecmp (3), diff --git a/man3/tailq.3 b/man3/tailq.3 index f96fe6e887..0064b643d2 100644 --- a/man3/tailq.3 +++ b/man3/tailq.3 @@ -335,6 +335,7 @@ fix this limitation by allowing to safely be removed from the list and freed from within the loop without interfering with the traversal. .SH EXAMPLES +.\" SRC BEGIN (tailq.c) .EX #include #include @@ -390,6 +391,7 @@ main(void) exit(EXIT_SUCCESS); } .EE +.\" SRC END .SH SEE ALSO .BR insque (3), .BR queue (7) diff --git a/man3/tsearch.3 b/man3/tsearch.3 index 1e177a6a9b..cb04853792 100644 --- a/man3/tsearch.3 +++ b/man3/tsearch.3 @@ -251,6 +251,7 @@ The following program inserts twelve random numbers into a binary tree, where duplicate numbers are collapsed, then prints the numbers in order. .PP +.\" SRC BEGIN (tsearch.c) .EX #define _GNU_SOURCE /* Expose declaration of tdestroy() */ #include @@ -323,6 +324,7 @@ main(void) exit(EXIT_SUCCESS); } .EE +.\" SRC END .SH SEE ALSO .BR bsearch (3), .BR hsearch (3), diff --git a/man3/wordexp.3 b/man3/wordexp.3 index 57f1794f33..ea3c631ecc 100644 --- a/man3/wordexp.3 +++ b/man3/wordexp.3 @@ -218,6 +218,7 @@ POSIX.1-2001, POSIX.1-2008. The output of the following example program is approximately that of "ls [a-c]*.c". .PP +.\" SRC BEGIN (wordexp.c) .EX #include #include @@ -237,6 +238,7 @@ main(int argc, char *argv[]) exit(EXIT_SUCCESS); } .EE +.\" SRC END .SH SEE ALSO .BR fnmatch (3), .BR glob (3)