diff options
| author | Michael Kerrisk <mtk.manpages@gmail.com> | 2007-05-19 04:30:20 +0000 |
|---|---|---|
| committer | Michael Kerrisk <mtk.manpages@gmail.com> | 2007-05-19 04:30:20 +0000 |
| commit | 2b2581ee37f080c0a95d20aedecd5cb04e81ef4a (patch) | |
| tree | 4ce1a3bcc3cd8793e50f48abba8eab04c8e7ea07 /man2/intro.2 | |
| parent | 2dd578fd5b80cbfe5892b200633aa1442c4ac674 (diff) | |
| download | man-pages-2b2581ee37f080c0a95d20aedecd5cb04e81ef4a.tar.gz | |
Fix inconsistencies in order of .SH sections
Diffstat (limited to 'man2/intro.2')
| -rw-r--r-- | man2/intro.2 | 92 |
1 files changed, 46 insertions, 46 deletions
diff --git a/man2/intro.2 b/man2/intro.2 index bbbcd45911..d8a8cd5439 100644 --- a/man2/intro.2 +++ b/man2/intro.2 @@ -83,50 +83,8 @@ These macros create a function called \fIname\fP with the arguments you specify. Once you include the _syscall() in your source file, you call the system call by \fIname\fP. -.SH EXAMPLE -.sp -.nf -#include <stdio.h> -#include <errno.h> -#include <linux/unistd.h> /* for _syscallX macros/related stuff */ -#include <linux/kernel.h> /* for struct sysinfo */ - -_syscall1(int, sysinfo, struct sysinfo *, info); - -/* Note: if you copy directly from the nroff source, remember to -REMOVE the extra backslashes in the printf statement. */ - -int -main(void) -{ - struct sysinfo s_info; - int error; - - error = sysinfo(&s_info); - printf("code error = %d\\n", error); - printf("Uptime = %lds\\nLoad: 1 min %lu / 5 min %lu / 15 min %lu\\n" - "RAM: total %lu / free %lu / shared %lu\\n" - "Memory in buffers = %lu\\nSwap: total %lu / free %lu\\n" - "Number of processes = %d\\n", - s_info.uptime, s_info.loads[0], - s_info.loads[1], s_info.loads[2], - s_info.totalram, s_info.freeram, - s_info.sharedram, s_info.bufferram, - s_info.totalswap, s_info.freeswap, - s_info.procs); - exit(EXIT_SUCCESS); -} -.fi -.SS "Sample Output" -.nf -code error = 0 -uptime = 502034s -Load: 1 min 13376 / 5 min 5504 / 15 min 1152 -RAM: total 15343616 / free 827392 / shared 8237056 -Memory in buffers = 5066752 -Swap: total 27881472 / free 24698880 -Number of processes = 40 -.fi +.SH FILES +.I /usr/include/linux/unistd.h .SH "CONFORMING TO" Certain codes are used to indicate Unix variants and standards to which calls in the section conform. @@ -172,8 +130,50 @@ Some architectures, notably ia64, do not provide the _syscall macros. On these architectures, .BR syscall (2) must be used. -.SH FILES -.I /usr/include/linux/unistd.h +.SH EXAMPLE +.sp +.nf +#include <stdio.h> +#include <errno.h> +#include <linux/unistd.h> /* for _syscallX macros/related stuff */ +#include <linux/kernel.h> /* for struct sysinfo */ + +_syscall1(int, sysinfo, struct sysinfo *, info); + +/* Note: if you copy directly from the nroff source, remember to +REMOVE the extra backslashes in the printf statement. */ + +int +main(void) +{ + struct sysinfo s_info; + int error; + + error = sysinfo(&s_info); + printf("code error = %d\\n", error); + printf("Uptime = %lds\\nLoad: 1 min %lu / 5 min %lu / 15 min %lu\\n" + "RAM: total %lu / free %lu / shared %lu\\n" + "Memory in buffers = %lu\\nSwap: total %lu / free %lu\\n" + "Number of processes = %d\\n", + s_info.uptime, s_info.loads[0], + s_info.loads[1], s_info.loads[2], + s_info.totalram, s_info.freeram, + s_info.sharedram, s_info.bufferram, + s_info.totalswap, s_info.freeswap, + s_info.procs); + exit(EXIT_SUCCESS); +} +.fi +.SS "Sample Output" +.nf +code error = 0 +uptime = 502034s +Load: 1 min 13376 / 5 min 5504 / 15 min 1152 +RAM: total 15343616 / free 827392 / shared 8237056 +Memory in buffers = 5066752 +Swap: total 27881472 / free 24698880 +Number of processes = 40 +.fi .SH "SEE ALSO" .BR syscall (2), .BR errno (3), |
