diff options
| author | Michael Kerrisk <mtk.manpages@gmail.com> | 2007-12-19 07:19:23 +0000 |
|---|---|---|
| committer | Michael Kerrisk <mtk.manpages@gmail.com> | 2007-12-19 07:19:23 +0000 |
| commit | a6e2f12821cc5cf9fb0edfabba3088b460990402 (patch) | |
| tree | 88b0751fd5d6bb39fc37b84abc29c4b61b556953 | |
| parent | 088a639be38030f6b6bfd344fb30636a85b207a4 (diff) | |
| download | man-pages-a6e2f12821cc5cf9fb0edfabba3088b460990402.tar.gz | |
Make the standard indent for code samples, shell session
logs, etc. to be ".in +4n".
| -rw-r--r-- | man2/_syscall.2 | 20 | ||||
| -rw-r--r-- | man2/getpagesize.2 | 8 | ||||
| -rw-r--r-- | man2/init_module.2 | 4 | ||||
| -rw-r--r-- | man2/times.2 | 4 | ||||
| -rw-r--r-- | man3/basename.3 | 4 | ||||
| -rw-r--r-- | man3/bsearch.3 | 7 | ||||
| -rw-r--r-- | man3/dlopen.3 | 8 | ||||
| -rw-r--r-- | man3/errno.3 | 8 | ||||
| -rw-r--r-- | man3/getsubopt.3 | 4 | ||||
| -rw-r--r-- | man3/mbrtowc.3 | 4 | ||||
| -rw-r--r-- | man3/printf.3 | 4 | ||||
| -rw-r--r-- | man3/rand.3 | 31 | ||||
| -rw-r--r-- | man3/realpath.3 | 4 | ||||
| -rw-r--r-- | man3/setaliasent.3 | 4 | ||||
| -rw-r--r-- | man3/setbuf.3 | 8 | ||||
| -rw-r--r-- | man3/stdarg.3 | 28 | ||||
| -rw-r--r-- | man3/strfmon.3 | 12 | ||||
| -rw-r--r-- | man3/termios.3 | 4 | ||||
| -rw-r--r-- | man3/timegm.3 | 4 | ||||
| -rw-r--r-- | man3/usleep.3 | 4 | ||||
| -rw-r--r-- | man4/console_codes.4 | 8 | ||||
| -rw-r--r-- | man4/rtc.4 | 6 | ||||
| -rw-r--r-- | man4/st.4 | 4 | ||||
| -rw-r--r-- | man5/acct.5 | 6 | ||||
| -rw-r--r-- | man5/slabinfo.5 | 6 | ||||
| -rw-r--r-- | man7/netdevice.7 | 4 |
26 files changed, 105 insertions, 103 deletions
diff --git a/man2/_syscall.2 b/man2/_syscall.2 index 9c6844649b..ae184b9b42 100644 --- a/man2/_syscall.2 +++ b/man2/_syscall.2 @@ -53,21 +53,21 @@ They have the form: .sp .RS .RI _syscall X ( type , name , type1 , arg1 , type2 , arg2 ,...) -.RS -.HP -where \fIX\fP is 0\(en5, which are the number of arguments taken by the +.RE +.PP +where +.IP +\fIX\fP is 0\(en6, which are the number of arguments taken by the system call -.HP +.IP \fItype\fP is the return type of the system call -.HP +.IP \fIname\fP is the name of the system call -.HP +.IP \fItypeN\fP is the Nth argument's type -.HP +.IP \fIargN\fP is the name of the Nth argument -.RE -.RE -.sp +.PP These macros create a function called \fIname\fP with the arguments you specify. Once you include the _syscall() in your source file, diff --git a/man2/getpagesize.2 b/man2/getpagesize.2 index a392d9a6e0..e68fe92506 100644 --- a/man2/getpagesize.2 +++ b/man2/getpagesize.2 @@ -47,12 +47,12 @@ The size of the kind of pages that .BR mmap (2) uses, is found using -.RS +.in +4n .nf #include <unistd.h> long sz = sysconf(_SC_PAGESIZE); .fi -.RE +.in (most systems allow the synonym .B _SC_PAGE_SIZE @@ -60,12 +60,12 @@ for .BR _SC_PAGESIZE ), or -.RS +.in +4n .nf #include <unistd.h> int sz = getpagesize(); .fi -.RE +.in .\" .SH HISTORY .\" This call first appeared in 4.2BSD. .SH CONFORMING TO diff --git a/man2/init_module.2 b/man2/init_module.2 index edb5670431..5d9559bb0b 100644 --- a/man2/init_module.2 +++ b/man2/init_module.2 @@ -25,7 +25,7 @@ The module image begins with a module structure and is followed by code and data as appropriate. The module structure is defined as follows: .PP -.RS +.in +4n .nf struct module { unsigned long size_of_struct; @@ -48,7 +48,7 @@ struct module { #endif }; .fi -.RE +.in .PP All of the pointer fields, with the exception of .I next diff --git a/man2/times.2 b/man2/times.2 index 87eb0230a5..2a6f3114a2 100644 --- a/man2/times.2 +++ b/man2/times.2 @@ -112,10 +112,10 @@ is set appropriately. SVr4, 4.3BSD, POSIX.1-2001. .SH NOTES The number of clock ticks per second can be obtained using: -.RS +.in +4n sysconf(_SC_CLK_TCK); -.RE +.in .PP In POSIX.1-1996 the symbol \fBCLK_TCK\fP (defined in .IR <time.h> ) diff --git a/man3/basename.3 b/man3/basename.3 index e35edf2d55..e24201266c 100644 --- a/man3/basename.3 +++ b/man3/basename.3 @@ -154,7 +154,7 @@ Before glibc 2.2.1, the glibc version of did not correctly handle pathnames with trailing '/' characters, and generated a segfault if given a NULL argument. .SH EXAMPLE -.RS +.in +4n .nf char *dirc, *basec, *bname, *dname; char *path = "/etc/passwd"; @@ -165,7 +165,7 @@ dname = dirname(dirc); bname = basename(basec); printf("dirname=%s, basename=%s\\n", dname, bname); .fi -.RE +.in .SH "SEE ALSO" .BR basename (1), .BR dirname (1), diff --git a/man3/bsearch.3 b/man3/bsearch.3 index d3b24aa785..924f910c71 100644 --- a/man3/bsearch.3 +++ b/man3/bsearch.3 @@ -33,10 +33,9 @@ bsearch \- binary search of a sorted array .nf .B #include <stdlib.h> .sp -.BI "void *bsearch(const void *" key ", const void *" base ", size_t " nmemb , -.RS -.BI "size_t " size ", int (*" compar ")(const void *, const void *));" -.RE +.BI "void *bsearch(const void *" key ", const void *" base , +.BI " size_t " nmemb ", size_t " size , +.BI " int (*" compar ")(const void *, const void *));" .fi .SH DESCRIPTION The diff --git a/man3/dlopen.3 b/man3/dlopen.3 index 68f55dcc3e..cec5767fdf 100644 --- a/man3/dlopen.3 +++ b/man3/dlopen.3 @@ -447,10 +447,10 @@ main(int argc, char **argv) .PP If this program were in a file named "foo.c", you would build the program with the following command: -.RS +.in +4n .LP gcc \-rdynamic \-o foo foo.c \-ldl -.RE +.in .PP Libraries exporting .BR _init () @@ -458,10 +458,10 @@ and .BR _fini () will want to be compiled as follows, using \fIbar.c\fP as the example name: -.RS +.in +4n .LP gcc \-shared \-nostartfiles \-o bar bar.c -.RE +.in .SH "SEE ALSO" .BR ld (1), .BR ldd (1), diff --git a/man3/errno.3 b/man3/errno.3 index 6013c923e4..688f867cdc 100644 --- a/man3/errno.3 +++ b/man3/errno.3 @@ -471,7 +471,7 @@ Improper link (POSIX.1) Exchange full .SH NOTES A common mistake is to do -.RS +.in +4n .nf if (somecall() == \-1) { @@ -480,7 +480,7 @@ if (somecall() == \-1) { } .fi -.RE +.in where .I errno no longer needs to have the value it had upon return from @@ -490,7 +490,7 @@ no longer needs to have the value it had upon return from If the value of .I errno should be preserved across a library call, it must be saved: -.RS +.in +4n .nf if (somecall() == \-1) { @@ -499,7 +499,7 @@ if (somecall() == \-1) { if (errsv == ...) { ... } } .fi -.RE +.in .PP It was common in traditional C to declare .I errno diff --git a/man3/getsubopt.3 b/man3/getsubopt.3 index e831569dfc..69b391c660 100644 --- a/man3/getsubopt.3 +++ b/man3/getsubopt.3 @@ -49,9 +49,9 @@ The following is an example of the kind of string that might be passed in .IR optionp : .sp -.RS +.in +4n .B ro,name=xyz -.RE +.in The .I tokens diff --git a/man3/mbrtowc.3 b/man3/mbrtowc.3 index 7be4d78375..7ac378d797 100644 --- a/man3/mbrtowc.3 +++ b/man3/mbrtowc.3 @@ -80,9 +80,9 @@ Otherwise, \fI*ps\fP must be a valid \fImbstate_t\fP object. An \fImbstate_t\fP object \fIa\fP can be initialized to the initial state by zeroing it, for example using .sp -.RS +.in +4n memset(&a, 0, sizeof(a)); -.RE +.in .SH "RETURN VALUE" The .BR mbrtowc () diff --git a/man3/printf.3 b/man3/printf.3 index 6d6f38d0c4..81da06a1ce 100644 --- a/man3/printf.3 +++ b/man3/printf.3 @@ -225,11 +225,11 @@ part of the locale. The POSIX locale uses `.' as radix character, and does not have a grouping character. Thus, -.RS +.in +4n .nf printf("%'.2f", 1234567.89); .fi -.RE +.in results in `1234567.89' in the POSIX locale, in `1234567,89' in the nl_NL locale, and in `1.234.567,89' in the da_DK locale. .SS "The flag characters" diff --git a/man3/rand.3 b/man3/rand.3 index 12c0792ddb..3d6e8cf534 100644 --- a/man3/rand.3 +++ b/man3/rand.3 @@ -140,20 +140,21 @@ In (William H. Press, Brian P. Flannery, Saul A. Teukolsky, William T. Vetterling; New York: Cambridge University Press, 1992 (2nd ed., p. 277)), the following comments are made: -.RS +.PP +.RS 4 "If you want to generate a random integer between 1 and 10, you should always do it by using high-order bits, as in -.RS +.in +4n .sp j = 1 + (int) (10.0 * (rand() / (RAND_MAX + 1.0))); .sp -.RE +.in and never by anything resembling -.RS +.in +4n .sp j = 1 + (rand() % 10); .sp -.RE +.in (which uses lower-order bits)." .RE .PP @@ -176,19 +177,21 @@ and .BR srand (), possibly useful when one needs the same sequence on two different machines. .sp +.in +4n .nf - static unsigned long next = 1; +static unsigned long next = 1; - /* RAND_MAX assumed to be 32767 */ - int myrand(void) { - next = next * 1103515245 + 12345; - return((unsigned)(next/65536) % 32768); - } +/* RAND_MAX assumed to be 32767 */ +int myrand(void) { + next = next * 1103515245 + 12345; + return((unsigned)(next/65536) % 32768); +} - void mysrand(unsigned seed) { - next = seed; - } +void mysrand(unsigned seed) { + next = seed; +} .fi +.in .SH "SEE ALSO" .BR drand48 (3), .BR random (3) diff --git a/man3/realpath.3 b/man3/realpath.3 index 358849a947..16ce6b6fc6 100644 --- a/man3/realpath.3 +++ b/man3/realpath.3 @@ -120,7 +120,7 @@ as found in \fI<limits.h>\fP or provided by the function. A typical source fragment would be .LP -.RS +.in +4n .nf #ifdef PATH_MAX path_max = PATH_MAX; @@ -130,7 +130,7 @@ A typical source fragment would be path_max = 4096; #endif .fi -.RE +.in (But see the BUGS section.) .LP The 4.4BSD, Linux and SUSv2 versions always return an absolute diff --git a/man3/setaliasent.3 b/man3/setaliasent.3 index 21186362cf..0b5da31b95 100644 --- a/man3/setaliasent.3 +++ b/man3/setaliasent.3 @@ -97,7 +97,7 @@ file. .SH "CONFORMING TO" These routines are glibc-specific. The NeXT has similar routines: -.RS +.in +4n .nf #include <aliasdb.h> @@ -107,7 +107,7 @@ void alias_endent(void); alias_ent *alias_getent(void); alias_ent *alias_getbyname(char *name); .fi -.RE +.in .SH EXAMPLE The following example compiles with .IR "gcc example.c \-o example" . diff --git a/man3/setbuf.3 b/man3/setbuf.3 index a80ce3773b..c97b0af755 100644 --- a/man3/setbuf.3 +++ b/man3/setbuf.3 @@ -131,9 +131,9 @@ The .BR setbuf () function is exactly equivalent to the call .PP -.RS +.in +4n setvbuf(stream, buf, buf ? _IOFBF : _IONBF, BUFSIZ); -.RE +.in .PP The .BR setbuffer () @@ -144,9 +144,9 @@ The .BR setlinebuf () function is exactly equivalent to the call: .PP -.RS +.in +4n setvbuf(stream, (char *) NULL, _IOLBF, 0); -.RE +.in .SH "RETURN VALUE" The function .BR setvbuf () diff --git a/man3/stdarg.3 b/man3/stdarg.3 index fd9e32a5e5..08245eb8b6 100644 --- a/man3/stdarg.3 +++ b/man3/stdarg.3 @@ -157,23 +157,23 @@ An obvious implementation would have a be a pointer to the stack frame of the variadic function. In such a setup (by far the most common) there seems nothing against an assignment -.RS +.in +4n .nf - va_list aq = ap; +va_list aq = ap; .fi -.RE +.in Unfortunately, there are also systems that make it an array of pointers (of length 1), and there one needs -.RS +.in +4n .nf - va_list aq; - *aq = *ap; +va_list aq; +*aq = *ap; .fi -.RE +.in Finally, on systems where parameters are passed in registers, it may be necessary for .BR va_start () @@ -187,16 +187,16 @@ can free the allocated memory again. To accommodate this situation, C99 adds a macro .BR va_copy (), so that the above assignment can be replaced by -.RS +.in +4n .nf - va_list aq; - va_copy(aq, ap); - ... - va_end(aq); +va_list aq; +va_copy(aq, ap); +... +va_end(aq); .fi -.RE +.in Each invocation of .BR va_copy () must be matched by a corresponding invocation of @@ -274,7 +274,6 @@ The function .I foo takes a string of format characters and prints out the argument associated with each format character based on the type. -.RS .nf #include <stdio.h> @@ -308,4 +307,3 @@ foo(char *fmt, ...) va_end(ap); } .fi -.RE diff --git a/man3/strfmon.3 b/man3/strfmon.3 index ad17ea5c9a..e580d436f9 100644 --- a/man3/strfmon.3 +++ b/man3/strfmon.3 @@ -129,20 +129,20 @@ Not in POSIX.1-2001. Present on several other systems. .SH EXAMPLE The call -.RS +.in +4n .nf strfmon(buf, sizeof(buf), "[%^=*#6n] [%=*#6i]", 1234.567, 1234.567); .fi -.RE +.in outputs -.RS +.in +4n [ fl **1234,57] [ NLG **1 234,57] -.RE +.in in the Dutch locale (with fl for "florijnen" and NLG for Netherlands Guilders). The grouping character is very ugly because it takes as much space as a digit, while it should not take more than half that, @@ -152,7 +152,7 @@ and "NLG" is preceded by one and followed by two spaces. This may be a bug in the locale files. The Italian, Australian, Swiss and Portuguese locales yield -.RS +.in +4n [ L. **1235] [ ITL **1.235] .br @@ -161,7 +161,7 @@ and Portuguese locales yield [Fr. **1234,57] [CHF **1.234,57] .br [ **1234$57Esc] [ **1.234$57PTE ] -.RE +.in .SH "SEE ALSO" .BR setlocale (3), .BR sprintf (3), diff --git a/man3/termios.3 b/man3/termios.3 index 6be37570e8..d72bd975f3 100644 --- a/man3/termios.3 +++ b/man3/termios.3 @@ -93,7 +93,7 @@ that is a pointer to a \fItermios\fP structure. This structure contains at least the following members: .ne 9 .sp -.RS +.in +4n .nf tcflag_t \fIc_iflag\fP; /* input modes */ tcflag_t \fIc_oflag\fP; /* output modes */ @@ -101,7 +101,7 @@ tcflag_t \fIc_cflag\fP; /* control modes */ tcflag_t \fIc_lflag\fP; /* local modes */ cc_t \fIc_cc\fP[\fBNCCS\fP]; /* control chars */ .fi -.RE +.in .PP The values that may be assigned to these fields are described below. In the case of the first four bit-mask fields, diff --git a/man3/timegm.3 b/man3/timegm.3 index c74c6f703c..05ae80eeb9 100644 --- a/man3/timegm.3 +++ b/man3/timegm.3 @@ -70,7 +70,7 @@ and restore the value of .BR TZ . Something like -.RS +.in +4n .nf #include <time.h> #include <stdlib.h> @@ -93,7 +93,7 @@ my_timegm(struct tm *tm) return ret; } .fi -.RE +.in .SH "SEE ALSO" .BR gmtime (3), .BR localtime (3), diff --git a/man3/usleep.3 b/man3/usleep.3 index e739a621ec..ef95fe08f7 100644 --- a/man3/usleep.3 +++ b/man3/usleep.3 @@ -87,7 +87,7 @@ in the range [0,1000000]. Programs will be more portable if they never mention this type explicitly. Use -.RS +.in +4n .nf .ta 8 .sp @@ -97,7 +97,7 @@ Use \&... usleep(usecs); .fi -.RE +.in .LP The interaction of this function with the .B SIGALRM diff --git a/man4/console_codes.4 b/man4/console_codes.4 index 176ae3bd56..57e4201e57 100644 --- a/man4/console_codes.4 +++ b/man4/console_codes.4 @@ -579,17 +579,17 @@ available with the X distribution. That document, though terse, is much longer than this manual page. For a chronological overview, .PP -.RS +.in +4n http://invisible-island.net/xterm/xterm.log.html -.RE +.in .PP details changes to xterm. .PP The \fIvttest\fP program .PP -.RS +.in +4n http://invisible-island.net/vttest/ -.RE +.in .PP demonstrates many of these control sequences. The \fIxterm\fP source distribution also contains sample diff --git a/man4/rtc.4 b/man4/rtc.4 index d8cc28f880..efb468cec2 100644 --- a/man4/rtc.4 +++ b/man4/rtc.4 @@ -80,7 +80,7 @@ or directly with the ioctl requests listed below. Besides tracking the date and time, many RTCs can also generate interrupts -.IP * +.IP * 3 on every clock update (i.e., once per second); .IP * at periodic intervals with a frequency that can be set to @@ -123,8 +123,7 @@ requests are defined on file descriptors connected to RTC devices: .TP .B RTC_RD_TIME Returns this RTC's time in the following structure: -.PP -.RS +.IP .in +4n .nf struct rtc_time { @@ -140,7 +139,6 @@ struct rtc_time { }; .fi .in -.RE .IP The fields in this structure have the same meaning and ranges as for the .I tm @@ -76,7 +76,7 @@ For instance, it is possible to control up to 64 tape drives with two minor numbers for different options.) .PP Devices are typically created by: -.RS +.in +4n .nf mknod \-m 666 /dev/st0 c 9 0 @@ -88,7 +88,7 @@ mknod \-m 666 /dev/nst0l c 9 160 mknod \-m 666 /dev/nst0m c 9 192 mknod \-m 666 /dev/nst0a c 9 224 .fi -.RE +.in .PP There is no corresponding block device. .PP diff --git a/man5/acct.5 b/man5/acct.5 index bb5c8898f8..fbc5fcda9a 100644 --- a/man5/acct.5 +++ b/man5/acct.5 @@ -30,9 +30,11 @@ acct \- execution accounting file .SH DESCRIPTION If the kernel was compiled with the process accounting option enabled, the system call -.RS + +.in +4n acct("/somewhere/accountingfile"); -.RE +.in + will start the process accounting. Each time a process terminates a record for this process is appended to the accounting file. diff --git a/man5/slabinfo.5 b/man5/slabinfo.5 index e54b8b6fb0..7133cd6acf 100644 --- a/man5/slabinfo.5 +++ b/man5/slabinfo.5 @@ -34,7 +34,7 @@ The file gives statistics. For example: .LP -.RS +.in +4n .nf % cat /proc/slabinfo slabinfo \- version: 1.1 @@ -51,7 +51,7 @@ size-8192 1 17 8192 1 17 2 size-4096 41 73 4096 41 73 1 \&... .fi -.RE +.in .LP For each slab cache, the cache name, the number of currently active objects, the total number of available objects, the @@ -104,9 +104,11 @@ before flushing objects to the global cache. It is possible to tune the SMP per-CPU slab cache limit and batchcount via: +.in +4n .nf echo "\fIcache_name limit batchcount\fP" > /proc/slabinfo .fi +.in .SH FILES .I <linux/slab.h> .SH VERSIONS diff --git a/man7/netdevice.7 b/man7/netdevice.7 index 7cd87a72e0..0c0c6ec4ad 100644 --- a/man7/netdevice.7 +++ b/man7/netdevice.7 @@ -259,13 +259,13 @@ macro in .IR <net/if.h> . Add the following to your program as a workaround: .sp -.RS +.in +4n .nf #ifndef ifr_newname #define ifr_newname ifr_ifru.ifru_slave #endif .fi -.RE +.in .SH "SEE ALSO" .BR proc (5), .BR capabilities (7), |
