]> git.ipfire.org Git - thirdparty/man-pages.git/commitdiff
Many pages: EXAMPLES: Add wrapper comments SRC BEGIN and SRC END
authorAlejandro Colomar <alx.manpages@gmail.com>
Sat, 10 Sep 2022 21:21:45 +0000 (23:21 +0200)
committerAlex Colomar <alx.manpages@gmail.com>
Sat, 10 Sep 2022 21:21:45 +0000 (23:21 +0200)
This is used by the Makefile to extract the example program.

Signed-off-by: Alex Colomar <alx.manpages@gmail.com>
99 files changed:
man3/CPU_SET.3
man3/MAX.3
man3/__ppc_get_timebase.3
man3/atexit.3
man3/backtrace.3
man3/bsearch.3
man3/bswap.3
man3/cacos.3
man3/cacosh.3
man3/catan.3
man3/catanh.3
man3/circleq.3
man3/clock_getcpuclockid.3
man3/dl_iterate_phdr.3
man3/dlinfo.3
man3/dlopen.3
man3/duplocale.3
man3/encrypt.3
man3/end.3
man3/endian.3
man3/envz_add.3
man3/fmemopen.3
man3/fmtmsg.3
man3/fopencookie.3
man3/fread.3
man3/frexp.3
man3/ftw.3
man3/get_nprocs_conf.3
man3/get_phys_pages.3
man3/getaddrinfo.3
man3/getaddrinfo_a.3
man3/getdate.3
man3/getgrent_r.3
man3/getgrouplist.3
man3/getline.3
man3/getopt.3
man3/getprotoent_r.3
man3/getpwent_r.3
man3/getpwnam.3
man3/getservent_r.3
man3/getsubopt.3
man3/getutent.3
man3/gnu_get_libc_version.3
man3/hsearch.3
man3/if_nameindex.3
man3/inet.3
man3/inet_net_pton.3
man3/inet_pton.3
man3/insque.3
man3/list.3
man3/makecontext.3
man3/mallinfo.3
man3/malloc_info.3
man3/mallopt.3
man3/matherr.3
man3/mbstowcs.3
man3/mcheck.3
man3/mq_getattr.3
man3/mq_notify.3
man3/mtrace.3
man3/newlocale.3
man3/nl_langinfo.3
man3/offsetof.3
man3/posix_spawn.3
man3/pthread_attr_init.3
man3/pthread_cancel.3
man3/pthread_cleanup_push.3
man3/pthread_create.3
man3/pthread_getattr_default_np.3
man3/pthread_getattr_np.3
man3/pthread_getcpuclockid.3
man3/pthread_mutexattr_setrobust.3
man3/pthread_setaffinity_np.3
man3/pthread_setname_np.3
man3/pthread_setschedparam.3
man3/pthread_sigmask.3
man3/qsort.3
man3/rand.3
man3/rpmatch.3
man3/rtime.3
man3/scandir.3
man3/sem_wait.3
man3/setaliasent.3
man3/setbuf.3
man3/shm_open.3
man3/slist.3
man3/stailq.3
man3/stpcpy.3
man3/strcat.3
man3/strcmp.3
man3/strftime.3
man3/strptime.3
man3/strsep.3
man3/strtok.3
man3/strtol.3
man3/strverscmp.3
man3/tailq.3
man3/tsearch.3
man3/wordexp.3

index fb194d9013ae6a76de1c6c7a03c4806e19906520..4d0b269b36bc9b235adc4c3a5a6161677f8b13f3 100644 (file)
@@ -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 <sched.h>
@@ -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),
index fec4e5d27d89f85badf2fec36b22ceb69edd816b..ea2042c2b0cc678b34f9f4cd4a110feea443f02f 100644 (file)
@@ -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 <stdio.h>
 #include <stdlib.h>
@@ -68,6 +69,7 @@ main(int argc, char *argv[])
     exit(EXIT_SUCCESS);
 }
 .EE
+.\" SRC END
 .SH SEE ALSO
 .BR fmax (3),
 .BR fmin (3)
index ca27b2277186dd61907750a50660df621f95a517..70390cb017c558814b9d0f8f10d6eb414d4982cd 100644 (file)
@@ -53,6 +53,7 @@ between two calls to
 .BR __ppc_get_timebase ().
 .SS Program source
 \&
+.\" SRC BEGIN (__ppc_get_timebase.c)
 .EX
 #include <inttypes.h>
 #include <stdint.h>
@@ -91,6 +92,7 @@ main(void)
     exit(EXIT_SUCCESS);
 }
 .EE
+.\" SRC END
 .SH SEE ALSO
 .BR time (2),
 .BR usleep (3)
index 422a579de6738e2aabd763d07867a463e08a4a6b..920ade1d7231f73827e66d3556dd67726362f5f9 100644 (file)
@@ -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 <stdio.h>
 #include <stdlib.h>
@@ -160,6 +161,7 @@ main(void)
     exit(EXIT_SUCCESS);
 }
 .EE
+.\" SRC END
 .SH SEE ALSO
 .BR _exit (2),
 .BR dlopen (3),
index 3151c5482d92d7eedffe8cb14e3e6011d40fef1f..8b91cb1258fb58a84fe51bcaa51b0fb2c478350c 100644 (file)
@@ -217,6 +217,7 @@ backtrace() returned 8 addresses
 .in
 .SS Program source
 \&
+.\" SRC BEGIN (backtrace.c)
 .EX
 #include <execinfo.h>
 #include <stdio.h>
@@ -277,6 +278,7 @@ main(int argc, char *argv[])
     exit(EXIT_SUCCESS);
 }
 .EE
+.\" SRC END
 .SH SEE ALSO
 .BR addr2line (1),
 .BR gcc (1),
index 83f0152051e38dde75f2b98611f9e16c93da9a9d..ede91e3790afb5a0bc1aa3c5fc8ccc565f8d0994 100644 (file)
@@ -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 <stdio.h>
 #include <stdlib.h>
@@ -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),
index 52d20ae158e35b21b1ed7162e5e06083224fabea..833cd9ee33701e6b6d76e7434613951be4fb7ae9 100644 (file)
@@ -38,6 +38,7 @@ $ \fB./a.out 0x0123456789abcdef\fP
 .in
 .SS Program source
 \&
+.\" SRC BEGIN (bswap.c)
 .EX
 #include <stdio.h>
 #include <stdint.h>
@@ -61,6 +62,7 @@ main(int argc, char *argv[])
     exit(EXIT_SUCCESS);
 }
 .EE
+.\" SRC END
 .SH SEE ALSO
 .BR byteorder (3),
 .BR endian (3)
index 777a8d8cf6b52cb92cf7303e09d36ee952765754..56f8912a306b1baf3d2041952102faf87b4a15f3 100644 (file)
@@ -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),
index 1d17cb8722f8d49de50d797d6b511874496f5daf..d21e47364abe7158ba513079cf66506784446428 100644 (file)
@@ -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),
index 5005c556c694ac069e060a99a34dd35dc41686cb..7ff383e5b63c3fc6a15ea488d90b6639a6ffed22 100644 (file)
@@ -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),
index 68b33985f3838b35ca9391377acd18bf123716b6..621ba11a1cf2fcfa6e235123969c0b0dd0af52c6 100644 (file)
@@ -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),
index a50a9a20280bddcbb966fd092565e4a7c74dc0de..3973c5280cdda1b10bf72318be927a168f120676 100644 (file)
@@ -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 <stddef.h>
 #include <stdio.h>
@@ -313,6 +314,7 @@ main(void)
     exit(EXIT_SUCCESS);
 }
 .EE
+.\" SRC END
 .SH SEE ALSO
 .BR insque (3),
 .BR queue (7)
index 0ad1916fc0067878d4ca89910983775bc668396e..d70332bccddb25240489d75cd97f2fa868d2fed8 100644 (file)
@@ -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 <stdint.h>
@@ -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),
index 8297a79857290e88a930386a2612ad90e9b30291..ac4297fb4df6dbc4669d28a60bdd209b9cd59c9d 100644 (file)
@@ -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 <link.h>
@@ -334,6 +335,7 @@ main(int argc, char *argv[])
     exit(EXIT_SUCCESS);
 }
 .EE
+.\" SRC END
 .SH SEE ALSO
 .BR ldd (1),
 .BR objdump (1),
index baf020ff33e87ba6c3c4f82d06bcdb805e9efdfa..c79467ac1ba9454cc60da67311a07ddd0082f98f 100644 (file)
@@ -245,6 +245,7 @@ dls_serpath[1].dls_name = /usr/lib64
 .in
 .SS Program source
 \&
+.\" SRC BEGIN (dlinfo.c)
 .EX
 #define _GNU_SOURCE
 #include <dlfcn.h>
@@ -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),
index 9924016857e8a5699ba42b61d51fe6862de69468..7e075a562e8c92bfc9ff3a2400fcedee77201449 100644 (file)
@@ -551,6 +551,7 @@ $ \fB./a.out\fP
 .in
 .SS Program source
 \&
+.\" SRC BEGIN (dlopen.c)
 .EX
 #include <stdio.h>
 #include <stdlib.h>
@@ -604,6 +605,7 @@ main(void)
     exit(EXIT_SUCCESS);
 }
 .EE
+.\" SRC END
 .SH SEE ALSO
 .BR ld (1),
 .BR ldd (1),
index cb14395d03d4adc4ad2a36d8a0efe26e8d7b4bd1..8712734ed5fbb0b89660b94c962fae04c4619a71 100644 (file)
@@ -117,6 +117,7 @@ ABC
 .in
 .SS Program source
 \&
+.\" SRC BEGIN (duplocale.c)
 .EX
 #define _XOPEN_SOURCE 700
 #include <ctype.h>
@@ -159,6 +160,7 @@ main(int argc, char *argv[])
     exit(EXIT_SUCCESS);
 }
 .EE
+.\" SRC END
 .SH SEE ALSO
 .BR freelocale (3),
 .BR newlocale (3),
index e466cd07310b91207ea53b10f9817dd2809a5666..9f42c7444497fe8cac14970616a0fc870cf7b0e7 100644 (file)
@@ -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 <stdio.h>
@@ -200,6 +201,7 @@ main(void)
     exit(EXIT_SUCCESS);
 }
 .EE
+.\" SRC END
 .SH SEE ALSO
 .BR cbc_crypt (3),
 .BR crypt (3),
index ca9a5be1173b1cc34ad28f07c0632af685ed1e17..1ee11da79512eae9c7fca8bf16cabbb1cdd3fd79 100644 (file)
@@ -67,6 +67,7 @@ First address past:
 .in
 .SS Program source
 \&
+.\" SRC BEGIN (end.c)
 .EX
 #include <stdio.h>
 #include <stdlib.h>
@@ -85,6 +86,7 @@ main(int argc, char *argv[])
     exit(EXIT_SUCCESS);
 }
 .EE
+.\" SRC END
 .SH SEE ALSO
 .BR objdump (1),
 .BR readelf (1),
index 6d12fea85651811d042129318fc4b6d1667025f3..e03350b52c23b4b24db59097b06c856c116d572a 100644 (file)
@@ -130,6 +130,7 @@ htobe32(x.u32) = 0x11223344
 .in
 .SS Program source
 \&
+.\" SRC BEGIN (endian.c)
 .EX
 #include <endian.h>
 #include <stdint.h>
@@ -156,6 +157,7 @@ main(int argc, char *argv[])
     exit(EXIT_SUCCESS);
 }
 .EE
+.\" SRC END
 .SH SEE ALSO
 .BR bswap (3),
 .BR byteorder (3)
index 6c31424f62a3fca88e01896d3c19b8b5b1f94103..c5a7ee309bfdf2f203ac8c687d76f3dff44dd2cd 100644 (file)
@@ -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 <stdio.h>
 #include <stdlib.h>
@@ -164,5 +165,6 @@ main(int argc, char *argv[], char *envp[])
     exit(EXIT_SUCCESS);
 }
 .EE
+.\" SRC END
 .SH SEE ALSO
 .BR argz_add (3)
index 598aa4380b77a163470f30d5aaf6a17baa9a8618..d7f5a383d48c141440ba61fc13126c724ab19221 100644 (file)
@@ -300,6 +300,7 @@ size=11; ptr=1 529 1849
 .in
 .SS Program source
 \&
+.\" SRC BEGIN (fmemopen.c)
 .EX
 #define _GNU_SOURCE
 #include <string.h>
@@ -349,6 +350,7 @@ main(int argc, char *argv[])
     exit(EXIT_SUCCESS);
 }
 .EE
+.\" SRC END
 .SH SEE ALSO
 .BR fopen (3),
 .BR fopencookie (3),
index d8f30a85ae493185e31dc3053fbc03279ccdcd2a..a3ba128428ab77aced6b356c709e5df14ba7fd45 100644 (file)
@@ -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 <stdio.h>
 #include <stdlib.h>
@@ -304,6 +305,7 @@ main(void)
     exit(EXIT_SUCCESS);
 }
 .EE
+.\" SRC END
 .PP
 The output should be:
 .PP
index 400455e3560fe8f126818f75a2401afbcec31203..8f09ab8b5eee9718042a81f92df235cebe83c55f 100644 (file)
@@ -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 <sys/types.h>
@@ -448,6 +449,7 @@ main(int argc, char *argv[])
     exit(EXIT_SUCCESS);
 }
 .EE
+.\" SRC END
 .SH SEE ALSO
 .BR fclose (3),
 .BR fmemopen (3),
index 2ae36c1a4e16befeba10dd3f11c17a0d5a0e05c8..2fcceaa5f518a65eadbb3c83e18411c2d3403d47 100644 (file)
@@ -112,6 +112,7 @@ Class: 0x02
 .in
 .SS Program source
 \&
+.\" SRC BEGIN (fread.c)
 .EX
 #include <stdio.h>
 #include <stdlib.h>
@@ -151,6 +152,7 @@ main(void)
     exit(EXIT_SUCCESS);
 }
 .EE
+.\" SRC END
 .SH SEE ALSO
 .BR read (2),
 .BR write (2),
index b672683669a6948f1188a723f171b421f7e90fc7..0c99b2f7166650e2658bde67a7c69e8075d9f0ee 100644 (file)
@@ -115,6 +115,7 @@ frexp(\-4, &e) = \-0.5: \-0.5 * 2\(ha3 = \-4
 .in
 .SS Program source
 \&
+.\" SRC BEGIN (frexp.c)
 .EX
 #include <math.h>
 #include <float.h>
@@ -135,6 +136,7 @@ main(int argc, char *argv[])
     exit(EXIT_SUCCESS);
 }
 .EE
+.\" SRC END
 .SH SEE ALSO
 .BR ldexp (3),
 .BR modf (3)
index 505a75522fc65bc34e743a6bb10aac98cf01acc3..1ad0950169526cfc4881eeb55758dbd37e1fc107 100644 (file)
@@ -444,6 +444,7 @@ argument when calling
 .BR nftw ().
 .SS Program source
 \&
+.\" SRC BEGIN (ftw.c)
 .EX
 #define _XOPEN_SOURCE 500
 #include <ftw.h>
@@ -493,6 +494,7 @@ main(int argc, char *argv[])
     exit(EXIT_SUCCESS);
 }
 .EE
+.\" SRC END
 .SH SEE ALSO
 .BR stat (2),
 .BR fts (3),
index bbe920a69b2a3fdcef5ed96fb8084bbc00816ef7..e41ea5c1703b1c6574d1594b5e870cccfb9eaa4e 100644 (file)
@@ -75,6 +75,7 @@ and
 .BR get_nprocs_conf ()
 can be used.
 .PP
+.\" SRC BEGIN (get_nprocs_conf.c)
 .EX
 #include <stdlib.h>
 #include <stdio.h>
@@ -89,5 +90,6 @@ main(int argc, char *argv[])
     exit(EXIT_SUCCESS);
 }
 .EE
+.\" SRC END
 .SH SEE ALSO
 .BR nproc (1)
index 0af07e9e3a5f1593c8070fe6360217a2d8c422d5..c64233fc40f7beb27cd80ad271b780636882302f 100644 (file)
@@ -70,6 +70,7 @@ and
 .BR get_avphys_pages ()
 can be used.
 .PP
+.\" SRC BEGIN (get_phys_pages.c)
 .EX
 #include <stdio.h>
 #include <stdlib.h>
@@ -84,5 +85,6 @@ main(int argc, char *argv[])
     exit(EXIT_SUCCESS);
 }
 .EE
+.\" SRC END
 .SH SEE ALSO
 .BR sysconf (3)
index 8a97b7008f5a7afd7fd2da69973131dda2247323..3ef9e494edb50bf1e97c0e68a5073490e7bcff7e 100644 (file)
@@ -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 <sys/types.h>
 #include <stdio.h>
@@ -735,8 +736,10 @@ main(int argc, char *argv[])
     }
 }
 .EE
+.\" SRC END
 .SS Client program
 \&
+.\" SRC BEGIN (client.c)
 .EX
 #include <sys/types.h>
 #include <sys/socket.h>
@@ -831,6 +834,7 @@ main(int argc, char *argv[])
     exit(EXIT_SUCCESS);
 }
 .EE
+.\" SRC END
 .SH SEE ALSO
 .\" .BR getipnodebyaddr (3),
 .\" .BR getipnodebyname (3),
index 131b781fd48f4800dec2388404605dc759260693..903b1466991b3fae73f34f9cc7d08d9850673d74 100644 (file)
@@ -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 <netdb.h>
@@ -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 <netdb.h>
@@ -597,6 +600,7 @@ main(int argc, char *argv[])
     exit(EXIT_SUCCESS);
 }
 .EE
+.\" SRC END
 .SH SEE ALSO
 .BR getaddrinfo (3),
 .BR inet (3),
index 7554d401ca0d3f2d0813d7b58ee06d1f2899ffbc..a5fbb4e309bf727a65bea5568261bcd8ae2af5ef 100644 (file)
@@ -269,6 +269,7 @@ Call 3 ("12:22:33") succeeded:
 .in
 .SS Program source
 \&
+.\" SRC BEGIN (getdate.c)
 .EX
 #define _GNU_SOURCE
 #include <time.h>
@@ -304,6 +305,7 @@ main(int argc, char *argv[])
     exit(EXIT_SUCCESS);
 }
 .EE
+.\" SRC END
 .SH SEE ALSO
 .BR time (2),
 .BR localtime (3),
index 8a47bf59e74b5175e8973a8799f72db5e06e8d64..085bd2a596e177136fbc9aeb7aea089931ed2079 100644 (file)
@@ -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 <grp.h>
@@ -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),
index 36c73816d98c8166c90a8e988a5ba3b1452ab611..9bfe4869b338ba3b45162bb71b4e1fda1947271f 100644 (file)
@@ -134,6 +134,7 @@ ngroups = 3
 .in
 .SS Program source
 \&
+.\" SRC BEGIN (getgrouplist.c)
 .EX
 #include <stdio.h>
 #include <stdlib.h>
@@ -191,6 +192,7 @@ main(int argc, char *argv[])
     exit(EXIT_SUCCESS);
 }
 .EE
+.\" SRC END
 .SH SEE ALSO
 .BR getgroups (2),
 .BR setgroups (2),
index 4b6fa47818cf4616b29f610c76c9c217f8f762de..e5b14d1cc0d5e0ba00567e7a5de27cca64952b4f 100644 (file)
@@ -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 <stdio.h>
@@ -177,6 +178,7 @@ main(int argc, char *argv[])
     exit(EXIT_SUCCESS);
 }
 .EE
+.\" SRC END
 .SH SEE ALSO
 .BR read (2),
 .BR fgets (3),
index f20938115737688c7156a987b86e7fc0bc9a5e9f..bf2df5865114dba74efdfb429ab82b5423f849ea 100644 (file)
@@ -427,6 +427,7 @@ with no associated value; and
 .IR "\-t val" ,
 which expects an associated value.
 .PP
+.\" SRC BEGIN (getopt.c)
 .EX
 #include <unistd.h>
 #include <stdlib.h>
@@ -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 <stdio.h>     /* for printf */
 #include <stdlib.h>    /* 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)
index 2e3815a3036bc472d925b53d45d79129d06a3e4d..affd20fe6312ec37496a93620073b92c89cc89df 100644 (file)
@@ -165,6 +165,7 @@ Call failed/record not found
 .in
 .SS Program source
 \&
+.\" SRC BEGIN (getprotoent_r.c)
 .EX
 #define _GNU_SOURCE
 #include <ctype.h>
@@ -237,6 +238,7 @@ main(int argc, char *argv[])
     exit(EXIT_SUCCESS);
 }
 .EE
+.\" SRC END
 .SH SEE ALSO
 .BR getprotoent (3),
 .BR protocols (5)
index bde13f399e7e4e72ddbdb2713e0a4b9686c63cb4..ea7cb3cdc736ce37fc843bbb2dc746c791848ebe 100644 (file)
@@ -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 <pwd.h>
@@ -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),
index 219d377339f0b74847a19b895f0f511a7a72b13c..0f5044b2e33525bc8a1eb8d80dd61d430ec0e486 100644 (file)
@@ -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 <pwd.h>
 #include <stdint.h>
@@ -325,6 +326,7 @@ main(int argc, char *argv[])
     exit(EXIT_SUCCESS);
 }
 .EE
+.\" SRC END
 .SH SEE ALSO
 .BR endpwent (3),
 .BR fgetpwent (3),
index 4e7b1f03de45c11ac52ff1ce66c35540b50cec8f..bee718d7fcbcbfeae0c736ab307c24f85fc112a5 100644 (file)
@@ -165,6 +165,7 @@ Call failed/record not found
 .in
 .SS Program source
 \&
+.\" SRC BEGIN (getservent_r.c)
 .EX
 #define _GNU_SOURCE
 #include <ctype.h>
@@ -243,6 +244,7 @@ main(int argc, char *argv[])
     exit(EXIT_SUCCESS);
 }
 .EE
+.\" SRC END
 .SH SEE ALSO
 .BR getservent (3),
 .BR services (5)
index 7693fb9c04445dfacd7e9d981d53c85365b6f6b0..686b5e25277123aa28516eb2d6ddb42212c7eff7 100644 (file)
@@ -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 <stdlib.h>
@@ -242,5 +243,6 @@ main(int argc, char *argv[])
     exit(EXIT_SUCCESS);
 }
 .EE
+.\" SRC END
 .SH SEE ALSO
 .BR getopt (3)
index 41d5490afeac8c6fc0668157a7b4b5b38ffb8432..0c0540ee5a2ca26da1c22868f7941e35aa4a73d9 100644 (file)
@@ -293,6 +293,7 @@ should check the return values of
 and
 .BR ttyname (3).
 .PP
+.\" SRC BEGIN (getutent.c)
 .EX
 #include <string.h>
 #include <stdlib.h>
@@ -335,6 +336,7 @@ main(int argc, char *argv[])
     exit(EXIT_SUCCESS);
 }
 .EE
+.\" SRC END
 .SH SEE ALSO
 .BR getutmp (3),
 .BR utmp (5)
index 967a504f59b46178ce492d025adad0ebd7009810..221f9bc96a6d3ecf2e4cb952a2a4c358e303d4fe 100644 (file)
@@ -61,6 +61,7 @@ GNU libc release: stable
 .in
 .SS Program source
 \&
+.\" SRC BEGIN (gnu_get_libc_version.c)
 .EX
 #include <gnu/libc\-version.h>
 #include <stdlib.h>
@@ -74,5 +75,6 @@ main(int argc, char *argv[])
     exit(EXIT_SUCCESS);
 }
 .EE
+.\" SRC END
 .SH SEE ALSO
 .BR confstr (3)
index 61774dbaf01d1b3642c4cebc18038d15cc928517..0b58fab196b3b50e0df5cfbc62e416331920735f 100644 (file)
@@ -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 <stdio.h>
 #include <stdlib.h>
@@ -330,6 +331,7 @@ main(void)
     exit(EXIT_SUCCESS);
 }
 .EE
+.\" SRC END
 .SH SEE ALSO
 .BR bsearch (3),
 .BR lsearch (3),
index 82be58e9ef04df2393059e316add04fe83f5c2c8..3a6afd8191e4ce937a41064129edf986176e1395 100644 (file)
@@ -120,6 +120,7 @@ $ \fB./a.out\fI
 .EE
 .in
 .SS Program source
+.\" SRC BEGIN (if_nameindex.c)
 .EX
 #include <net/if.h>
 #include <stdio.h>
@@ -145,6 +146,7 @@ main(int argc, char *argv[])
     exit(EXIT_SUCCESS);
 }
 .EE
+.\" SRC END
 .SH SEE ALSO
 .BR getsockopt (2),
 .BR setsockopt (2),
index ee506228b34a2082233cf4b37644b9a7d8042b8d..3abbe055fb27e656a2a1dac3ab2445b1598a8f84 100644 (file)
@@ -287,6 +287,7 @@ Here are some example runs:
 .in
 .SS Program source
 \&
+.\" SRC BEGIN (inet.c)
 .EX
 #define _DEFAULT_SOURCE
 #include <arpa/inet.h>
@@ -312,6 +313,7 @@ main(int argc, char *argv[])
     exit(EXIT_SUCCESS);
 }
 .EE
+.\" SRC END
 .SH SEE ALSO
 .BR byteorder (3),
 .BR getaddrinfo (3),
index 8dce6b299708072b4df5b999323850175fed0a0e..c7859bf1da77171da364a1ea870b7673fcdcd598 100644 (file)
@@ -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)
index 807c4ea030183b21ae9947eb4e0f06482efcc29b..4f2bd623b55adea30529b4165d960a83859ef85f 100644 (file)
@@ -175,6 +175,7 @@ Here are some example runs:
 .in
 .SS Program source
 \&
+.\" SRC BEGIN (inet_pton.c)
 .EX
 #include <arpa/inet.h>
 #include <stdio.h>
@@ -215,6 +216,7 @@ main(int argc, char *argv[])
     exit(EXIT_SUCCESS);
 }
 .EE
+.\" SRC END
 .SH SEE ALSO
 .BR getaddrinfo (3),
 .BR inet (3),
index 5da2aa25847f3871824174d8d133816a6e41e2db..da690b222787d46427f1abd51d4653899169cc06 100644 (file)
@@ -149,6 +149,7 @@ That was a circular list
 .in
 .SS Program source
 \&
+.\" SRC BEGIN (insque.c)
 .EX
 #include <stdio.h>
 #include <stdlib.h>
@@ -240,5 +241,6 @@ main(int argc, char *argv[])
     exit(EXIT_SUCCESS);
 }
 .EE
+.\" SRC END
 .SH SEE ALSO
 .BR queue (7)
index 0f4bf978ea7370bdc6628d363350eb5824168093..34ed958634cd1555b3471fe72b6d77c87fb2629d 100644 (file)
@@ -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 <stddef.h>
 #include <stdio.h>
@@ -301,6 +302,7 @@ main(void)
     exit(EXIT_SUCCESS);
 }
 .EE
+.\" SRC END
 .SH SEE ALSO
 .BR insque (3),
 .BR queue (7)
index e2bc378c38e7b69c3b9682a45999c3f0dd99b90c..ee4265b240fbdd64a5be665a1dab97ffc9dcb356 100644 (file)
@@ -168,6 +168,7 @@ main: exiting
 .in
 .SS Program source
 \&
+.\" SRC BEGIN (makecontext.c)
 .EX
 #include <ucontext.h>
 #include <stdio.h>
@@ -227,6 +228,7 @@ main(int argc, char *argv[])
     exit(EXIT_SUCCESS);
 }
 .EE
+.\" SRC END
 .SH SEE ALSO
 .BR sigaction (2),
 .BR sigaltstack (2),
index 7991c9a4d0aa2220a24ea6ad763d84e1a8c0b36c..a1d13a38fd8fc676b24cad7d9b068083868ebdca 100644 (file)
@@ -255,6 +255,7 @@ Topmost releasable block (keepcost):   31168
 .in
 .SS Program source
 \&
+.\" SRC BEGIN (mallinfo.c)
 .EX
 #include <malloc.h>
 #include <stdlib.h>
@@ -327,6 +328,7 @@ main(int argc, char *argv[])
     exit(EXIT_SUCCESS);
 }
 .EE
+.\" SRC END
 .SH SEE ALSO
 .ad l
 .nh
index e49bb80717866eb52537c55c84860061af5bcc68..bf1c41e427cfcce7af0f2ac08cdbfa6d3f8435b9 100644 (file)
@@ -165,6 +165,7 @@ glibc 2.13
 .EE
 .in
 .SS Program source
+.\" SRC BEGIN (malloc_info.c)
 .EX
 #include <unistd.h>
 #include <stdlib.h>
@@ -250,6 +251,7 @@ main(int argc, char *argv[])
     exit(EXIT_SUCCESS);
 }
 .EE
+.\" SRC END
 .SH SEE ALSO
 .BR mallinfo (3),
 .BR malloc (3),
index 43438d213bef4cd0f233a0f047b90718e92d2812..61aabf73348aca086e6177c3481b5284ebf0ec95 100644 (file)
@@ -563,6 +563,7 @@ main(): returned from second free() call
 .in
 .SS Program source
 \&
+.\" SRC BEGIN (mallopt.c)
 .EX
 #include <malloc.h>
 #include <stdio.h>
@@ -595,6 +596,7 @@ main(int argc, char *argv[])
     exit(EXIT_SUCCESS);
 }
 .EE
+.\" SRC END
 .SH SEE ALSO
 .ad l
 .nh
index e5b8f645ac70310482df9ff6953f9443a4f36116..6dd85fe51c8263dc0d9ede87c76dd72d4a49f525 100644 (file)
@@ -359,6 +359,7 @@ x=12345.000000
 .in
 .SS Program source
 \&
+.\" SRC BEGIN (matherr.c)
 .EX
 #define _SVID_SOURCE
 #include <errno.h>
@@ -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),
index 30a2a86790f76acac8862fb32dbe722fea97770a..694c6c02a09719ca6f26b9f6aa128261562230cd 100644 (file)
@@ -145,6 +145,7 @@ Wide character string is: Grüße! (6 characters)
 .in
 .SS Program source
 \&
+.\" SRC BEGIN (mbstowcs.c)
 .EX
 #include <wctype.h>
 #include <locale.h>
@@ -230,6 +231,7 @@ main(int argc, char *argv[])
     exit(EXIT_SUCCESS);
 }
 .EE
+.\" SRC END
 .SH SEE ALSO
 .BR mblen (3),
 .BR mbsrtowcs (3),
index 032d9027372a588ca92a2ae7fd5069aad4c00a18..2d485f2d0d5e4e51b05cf16a4f2b0f88befcff3f 100644 (file)
@@ -179,6 +179,7 @@ Aborted (core dumped)
 .in
 .SS Program source
 \&
+.\" SRC BEGIN (mcheck.c)
 .EX
 #include <stdlib.h>
 #include <stdio.h>
@@ -205,6 +206,7 @@ main(int argc, char *argv[])
     exit(EXIT_SUCCESS);
 }
 .EE
+.\" SRC END
 .SH SEE ALSO
 .BR malloc (3),
 .BR mallopt (3),
index 104ed51d53dd09a621dea979d87ce5f0147da0e5..2f439f584c9e938081165c84b3980a97f31432dd 100644 (file)
@@ -179,6 +179,7 @@ $ \fBcat /proc/sys/fs/mqueue/msgsize_default\fP
 .in
 .SS Program source
 \&
+.\" SRC BEGIN (mq_getattr.c)
 .EX
 #include <mqueue.h>
 #include <sys/stat.h>
@@ -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),
index b4b20163226dc7998f83e41b7d1cc4a6cac7944f..d4ec9f5ed53cd4b22e562fa0cfb424c509905625 100644 (file)
@@ -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 <pthread.h>
 #include <mqueue.h>
@@ -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),
index 93434219fa313053d159b00fda73426af7b6f037..a09e8b5e7ac07ad0a0f8e7c46a041dd08377a854 100644 (file)
@@ -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 <mcheck.h>
 #include <stdlib.h>
 #include <stdio.h>
@@ -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
index 89d83035606ff506657ff2491dd2d2ee0bbed573..a300fc622ab9190dfc35088ec49906d1ec1d4a42 100644 (file)
@@ -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 <stdio.h>
@@ -349,6 +350,7 @@ main(int argc, char *argv[])
     exit(EXIT_SUCCESS);
 }
 .EE
+.\" SRC END
 .SH SEE ALSO
 .BR locale (1),
 .BR duplocale (3),
index dc2000d40cf06fa3a194721b5dfb618d819bb4c6..ce05a606abdca58a99d3d66070197de855bd4391 100644 (file)
@@ -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 <langinfo.h>
 #include <locale.h>
@@ -341,6 +342,7 @@ main(int argc, char *argv[])
     exit(EXIT_SUCCESS);
 }
 .EE
+.\" SRC END
 .SH SEE ALSO
 .BR locale (1),
 .BR localeconv (3),
index 2714717d504b0523da974e8b0cecc65278ac38a2..3273ce82b190c86675873ad4560c2c658bc15c0e 100644 (file)
@@ -79,6 +79,7 @@ sizeof(struct s)=16
 .in
 .SS Program source
 \&
+.\" SRC BEGIN (offsetof.c)
 .EX
 #include <stddef.h>
 #include <stdio.h>
@@ -104,3 +105,4 @@ main(void)
     exit(EXIT_SUCCESS);
 }
 .EE
+.\" SRC END
index 7bf6dbd770fe7269de03ffc329b9728f1d52440e..b60de1faa16f3927daa7aa591f160d8d4b85b837 100644 (file)
@@ -663,6 +663,7 @@ Child status: exited, status=127
 .in
 .SS Program source
 \&
+.\" SRC BEGIN (posix_spawn.c)
 .EX
 #include <spawn.h>
 #include <stdint.h>
@@ -788,6 +789,7 @@ main(int argc, char *argv[])
     exit(EXIT_SUCCESS);
 }
 .EE
+.\" SRC END
 .SH SEE ALSO
 .nh \" Disable hyphenation
 .ad l
index 2b625d7453b34ffd291b336821548f56ca0489f5..dfe4fd3d951c4f4083c4f9c97162c8732bb31a5a 100644 (file)
@@ -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 <pthread.h>
@@ -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
index 64557acca7261e77e5926567d0cb4435a39bf229..0e82b000378e174431e8a66b9df10a0be090bfcc 100644 (file)
@@ -148,6 +148,7 @@ main(): thread was canceled
 .in
 .SS Program source
 \&
+.\" SRC BEGIN (pthread_cancel.c)
 .EX
 #include <pthread.h>
 #include <stdio.h>
@@ -221,6 +222,7 @@ main(void)
     exit(EXIT_SUCCESS);
 }
 .EE
+.\" SRC END
 .SH SEE ALSO
 .ad l
 .nh
index 52c4bf32aca8a6c1b4bb22549ddec4f7453d1037..0eb38a77d862ca601920c28d2ad4a79105b56848 100644 (file)
@@ -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 <pthread.h>
 #include <sys/types.h>
@@ -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),
index 4555cc2e88079dd9a27a7439f34473eee68d02ae..7f5f0ed3d5b6bdd740fa70b7192fdcf3dcc06fe2 100644 (file)
@@ -264,6 +264,7 @@ Joined with thread 3; returned value was SERVUS
 .in
 .SS Program source
 \&
+.\" SRC BEGIN (pthread_create.c)
 .EX
 #include <pthread.h>
 #include <string.h>
@@ -389,6 +390,7 @@ main(int argc, char *argv[])
     exit(EXIT_SUCCESS);
 }
 .EE
+.\" SRC END
 .SH SEE ALSO
 .ad l
 .nh
index ec2093ee22ab87ab35d19e557e848ce1ae145a39..269ee16997bf4ecc24a02f93141aedd7cc5d46fa 100644 (file)
@@ -100,6 +100,7 @@ Inherit scheduler:   INHERIT
 .in
 .SS Program source
 \&
+.\" SRC BEGIN (pthread_getattr_default_np.c)
 .EX
 #define _GNU_SOURCE
 #include <pthread.h>
@@ -177,6 +178,7 @@ main(int argc, char *argv[])
     exit(EXIT_SUCCESS);
 }
 .EE
+.\" SRC END
 .SH SEE ALSO
 .ad l
 .nh
index 7c859a0573ce2341464aa5b1efd946306d8a55ed..7496e634e0132bafb77ebf2d5bc3ace4fe5d7dee 100644 (file)
@@ -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 <pthread.h>
@@ -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
index 82f991ad8c46b6c170b9a5341b8bfeb2a6f14655..fa5369472f7c0aa38bdc4f07d2474b8baff001e9 100644 (file)
@@ -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),
index 9bf2c3d1ec4631c173291212bfedb9aa9f23b58b..3bd646cbd5d5d734fdf65456eba3e5b205f28fc1 100644 (file)
@@ -190,6 +190,7 @@ $ \fB./a.out\fP
 .EE
 .in
 .SS Program source
+.\" SRC BEGIN (pthread_mutexattr_setrobust.c)
 .EX
 #include <stdlib.h>
 #include <stdio.h>
@@ -253,6 +254,7 @@ main(int argc, char *argv[])
     }
 }
 .EE
+.\" SRC END
 .SH SEE ALSO
 .ad l
 .nh
index 33e907d82f3843ce44fd2f4e140c41adeb875f1b..39e1490cde1114dd15830ae8e28fe7ba51945e14 100644 (file)
@@ -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 <pthread.h>
@@ -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),
index 115557787275a63f1e41b50ef8758905ab8e660f..19ba0f80b1c82480cb4a8702d456a5a1ba810e88 100644 (file)
@@ -138,6 +138,7 @@ THREADFOO
 .in
 .SS Program source
 \&
+.\" SRC BEGIN (pthread_setname_np.c)
 .EX
 #define _GNU_SOURCE
 #include <pthread.h>
@@ -195,6 +196,7 @@ main(int argc, char *argv[])
     exit(EXIT_SUCCESS);
 }
 .EE
+.\" SRC END
 .SH SEE ALSO
 .ad l
 .nh
index 4a3e266a64c20a82f2ee6ad6b308036c33100ac2..f129465c38e42d3dc19db5dd30e9ae68a6c05dcd 100644 (file)
@@ -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
index ffec8bce59542f76be16cbe0bb2559ef2b757b2f..1a1c63f992eee5cf1ac12567296037af9c0df1af 100644 (file)
@@ -94,6 +94,7 @@ Signal handling thread got signal 10
 .in
 .SS Program source
 \&
+.\" SRC BEGIN (pthread_sigmask.c)
 .EX
 #include <pthread.h>
 #include <stdio.h>
@@ -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),
index c1abf3d97b6150496984d578994279ee69bc8318..1007653df504d1553a568dacb8d9e2a20516d867 100644 (file)
@@ -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 <stdio.h>
 #include <stdlib.h>
@@ -141,6 +142,7 @@ main(int argc, char *argv[])
     exit(EXIT_SUCCESS);
 }
 .EE
+.\" SRC END
 .SH SEE ALSO
 .BR sort (1),
 .BR alphasort (3),
index 45d9ddab70cd7d22a31a0684dba142d1906ed5d5..d313e91b2b6644ff239c5e6272cb647fc180f0b6 100644 (file)
@@ -191,6 +191,7 @@ pseudo-random sequence produced by
 when given a particular seed.
 .PP
 .in +4n
+.\" SRC BEGIN (rand.c)
 .EX
 #include <stdlib.h>
 #include <stdio.h>
@@ -218,6 +219,7 @@ main(int argc, char *argv[])
     exit(EXIT_SUCCESS);
 }
 .EE
+.\" SRC END
 .in
 .SH SEE ALSO
 .BR drand48 (3),
index 96a4c28bedbd750cc33884e966a8709dbd3deb07..d53fa8e0f0bf7aa29019c7e465503c6c8a8062ef 100644 (file)
@@ -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 <locale.h>
@@ -161,6 +162,7 @@ main(int argc, char *argv[])
     exit(EXIT_SUCCESS);
 }
 .EE
+.\" SRC END
 .SH SEE ALSO
 .BR fgets (3),
 .BR getline (3),
index 5de2ec8257d3e6b2be478c132c81fb6371ee1462..3b52201a072fb872d4f6c8a913e4a75fca8c3308 100644 (file)
@@ -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 <stdio.h>
 #include <stdlib.h>
@@ -143,6 +144,7 @@ main(void)
     exit(EXIT_SUCCESS);
 }
 .EE
+.\" SRC END
 .SH SEE ALSO
 .\" .BR netdate (1),
 .BR ntpdate (1),
index 0807b8cb2d2127a6892e3ff8b15147d93971e66f..021350737049294136a2aed2647ef45c6b32d16a 100644 (file)
@@ -260,6 +260,7 @@ in reverse order.
 .\"
 .SS Program source
 \&
+.\" SRC BEGIN (scandir.c)
 .EX
 #define _DEFAULT_SOURCE
 #include <dirent.h>
@@ -287,6 +288,7 @@ main(void)
     exit(EXIT_SUCCESS);
 }
 .EE
+.\" SRC END
 .SH SEE ALSO
 .BR closedir (3),
 .BR fnmatch (3),
index 3cc0ce09fd9b018f06b0ea4b29e0b0fca7faa852..24a4abc3170b72202c6c97490f3b55da3211ab54 100644 (file)
@@ -163,6 +163,7 @@ sem_timedwait() timed out
 .in
 .SS Program source
 \&
+.\" SRC BEGIN (sem_wait.c)
 .EX
 #include <unistd.h>
 #include <stdio.h>
@@ -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),
index 9d3cfb9682f8b162faf0e5384c3c0f1797750143..6a203dfad2793a7771ee014d581fd7ec790028f6 100644 (file)
@@ -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 <aliases.h>
 #include <stdio.h>
@@ -167,6 +168,7 @@ main(void)
     exit(EXIT_SUCCESS);
 }
 .EE
+.\" SRC END
 .SH SEE ALSO
 .BR getgrent (3),
 .BR getpwent (3),
index 4a62952d78d0d3c2a755c7a1aba1a977ebd327d1..d2381de2fcf0f07df3c0890d1e440eb7234d2335 100644 (file)
@@ -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 <stdio.h>
 
@@ -209,6 +210,7 @@ main(void)
     return 0;
 }
 .EE
+.\" SRC END
 .SH SEE ALSO
 .BR stdbuf (1),
 .BR fclose (3),
index c82b152be1fadcf30bfb075dc2f0fb3309a67892..8ddad52b3e14433b87d8f96081a67be3cc5285bb 100644 (file)
@@ -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 <sys/mman.h>
 #include <fcntl.h>
@@ -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),
index 7ca588919a9481736bb312436215e6b5847a89a2..6e32dba90dfed78830018de8ac15f245b2a574d0 100644 (file)
@@ -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 <stddef.h>
 #include <stdio.h>
@@ -312,6 +313,7 @@ main(void)
     exit(EXIT_SUCCESS);
 }
 .EE
+.\" SRC END
 .SH SEE ALSO
 .BR insque (3),
 .BR queue (7)
index bfce876721d38d50cecfb007c36e3cb287cd6aa2..359c1342c2b2cbd9a0d0a69bd239844f7ae7fe6f 100644 (file)
@@ -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 <stddef.h>
 #include <stdio.h>
@@ -370,6 +371,7 @@ main(void)
     exit(EXIT_SUCCESS);
 }
 .EE
+.\" SRC END
 .SH SEE ALSO
 .BR insque (3),
 .BR queue (7)
index 1efa79133a8af102fab8a9cd48602c063979fa7f..487ee6d090bb08a9d299515f097a258b199b5920 100644 (file)
@@ -85,6 +85,7 @@ to produce
 .BR foobar ,
 which it then prints.
 .PP
+.\" SRC BEGIN (stpcpy.c)
 .EX
 #define _GNU_SOURCE
 #include <string.h>
@@ -101,6 +102,7 @@ main(void)
     printf("%s\en", buffer);
 }
 .EE
+.\" SRC END
 .SH SEE ALSO
 .BR bcopy (3),
 .BR memccpy (3),
index 5738bb9be98f68a83f25a865ecfa40b589687b2b..6c719dc001bbbf608f1b2f087f6dbc65d3214e32 100644 (file)
@@ -191,6 +191,7 @@ will provide better performance.)
 .\"
 .SS Program source
 \&
+.\" SRC BEGIN (strcat.c)
 .EX
 #include <stdint.h>
 #include <string.h>
@@ -214,7 +215,7 @@ main(int argc, char *argv[])
     }
 }
 .EE
-.\"
+.\" SRC END
 .SH SEE ALSO
 .BR bcopy (3),
 .BR memccpy (3),
index 933011b9cbaad1728394ce7b915ffefa2d3bf6aa..5f1eb0567879079c5b658a5e34d134299960867a 100644 (file)
@@ -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),
index 9a10275caa39f7f7dd8fb99e080874cc56ed4964..ce4dcc1685d8a906fce3ca860cb7b75cdc39ec20 100644 (file)
@@ -733,6 +733,7 @@ Result string is "   11"
 .in
 .SS Program source
 \&
+.\" SRC BEGIN (strftime.c)
 .EX
 #include <time.h>
 #include <stdio.h>
@@ -761,6 +762,7 @@ main(int argc, char *argv[])
     exit(EXIT_SUCCESS);
 }
 .EE
+.\" SRC END
 .SH SEE ALSO
 .BR date (1),
 .BR time (2),
index e220f21b0956a5f0061ac32db6c1be0c59bf5f97..01f3873552092177566118c17f13b07efd0919ea 100644 (file)
@@ -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 <stdio.h>
@@ -403,6 +404,7 @@ main(void)
     exit(EXIT_SUCCESS);
 }
 .EE
+.\" SRC END
 .SH SEE ALSO
 .BR time (2),
 .BR getdate (3),
index ba863e5eb6975b15a090118479c2fc9d59ccb927..7a7a7f59881d0d5a8412d70a43c52829fea6c571 100644 (file)
@@ -125,6 +125,7 @@ which, however, doesn't discard multiple delimiters or empty tokens:
 .in
 .SS Program source
 \&
+.\" SRC BEGIN (strsep.c)
 .EX
 #include <stdio.h>
 #include <stdlib.h>
@@ -150,6 +151,7 @@ main(int argc, char *argv[])
     exit(EXIT_SUCCESS);
 }
 .EE
+.\" SRC END
 .SH SEE ALSO
 .BR index (3),
 .BR memchr (3),
index 8872957d086928d8d40f64159165f5eac60d33c1..dd45e91c263055fd91aa346e6abaac9c121eb38d 100644 (file)
@@ -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 <stdio.h>
 #include <stdlib.h>
@@ -263,6 +264,7 @@ main(int argc, char *argv[])
     exit(EXIT_SUCCESS);
 }
 .EE
+.\" SRC END
 .PP
 Another example program using
 .BR strtok ()
index 8152c91e2613ac3be3fcf48a937e3dcb8d87806c..75973618cb8c376ea7c601dc82c225552cba21c3 100644 (file)
@@ -236,6 +236,7 @@ strtol: Numerical result out of range
 .in
 .SS Program source
 \&
+.\" SRC BEGIN (strtol.c)
 .EX
 #include <stdlib.h>
 #include <limits.h>
@@ -282,6 +283,7 @@ main(int argc, char *argv[])
     exit(EXIT_SUCCESS);
 }
 .EE
+.\" SRC END
 .SH SEE ALSO
 .BR atof (3),
 .BR atoi (3),
index c5bb2825a06bbe7e6e3724602f9881c900f1dca7..00deff97e7c2910c092b1ee38904e4955922bb7d 100644 (file)
@@ -115,6 +115,7 @@ jan1 < jan10
 .in
 .SS Program source
 \&
+.\" SRC BEGIN (strverscmp.c)
 .EX
 #define _GNU_SOURCE
 #include <string.h>
@@ -139,6 +140,7 @@ main(int argc, char *argv[])
     exit(EXIT_SUCCESS);
 }
 .EE
+.\" SRC END
 .SH SEE ALSO
 .BR rename (1),
 .BR strcasecmp (3),
index f96fe6e887330409bf7a4101ec5a2dbfc0815352..0064b643d24f3af6ec73648f8a9f81e2a7a5ec6d 100644 (file)
@@ -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 <stddef.h>
 #include <stdio.h>
@@ -390,6 +391,7 @@ main(void)
     exit(EXIT_SUCCESS);
 }
 .EE
+.\" SRC END
 .SH SEE ALSO
 .BR insque (3),
 .BR queue (7)
index 1e177a6a9bdc8ea979c1166824a9d55fe4e0b960..cb0485379249d247688ea336394b3648e70eb14d 100644 (file)
@@ -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 <search.h>
@@ -323,6 +324,7 @@ main(void)
     exit(EXIT_SUCCESS);
 }
 .EE
+.\" SRC END
 .SH SEE ALSO
 .BR bsearch (3),
 .BR hsearch (3),
index 57f1794f33ef1fe1930173c84fe298ce4be6d7c3..ea3c631ecc05f2a7b6bd8b1b339c273b408d94d6 100644 (file)
@@ -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 <stdio.h>
 #include <stdlib.h>
@@ -237,6 +238,7 @@ main(int argc, char *argv[])
     exit(EXIT_SUCCESS);
 }
 .EE
+.\" SRC END
 .SH SEE ALSO
 .BR fnmatch (3),
 .BR glob (3)