From cf0a9ace579bbce17142667d4712e0b5bdc0da20 Mon Sep 17 00:00:00 2001 From: Michael Kerrisk Date: Thu, 5 Apr 2007 12:36:57 +0000 Subject: [PATCH] ffix --- Changes | 21 +++- man2/accept.2 | 2 - man2/chmod.2 | 5 +- man2/clone.2 | 1 - man2/epoll_create.2 | 1 - man2/epoll_ctl.2 | 22 ++-- man2/epoll_wait.2 | 22 ++-- man2/execve.2 | 2 - man2/fcntl.2 | 10 -- man2/getitimer.2 | 1 - man2/getresuid.2 | 1 - man2/getsockopt.2 | 2 - man2/intro.2 | 36 +++--- man2/ioctl_list.2 | 10 +- man2/ioprio_set.2 | 1 - man2/listen.2 | 1 - man2/llseek.2 | 1 - man2/lookup_dcookie.2 | 2 - man2/lseek.2 | 1 - man2/mkdir.2 | 1 - man2/mmap2.2 | 2 +- man2/mount.2 | 1 - man2/open.2 | 1 - man2/path_resolution.2 | 12 -- man2/pipe.2 | 1 - man2/pivot_root.2 | 1 - man2/poll.2 | 1 - man2/quotactl.2 | 1 - man2/read.2 | 1 - man2/readdir.2 | 1 - man2/readv.2 | 1 - man2/select_tut.2 | 217 ++++++++++++++++------------------ man2/set_tid_address.2 | 2 - man2/seteuid.2 | 1 - man2/setpgid.2 | 1 - man2/setresuid.2 | 1 - man2/setreuid.2 | 1 - man2/shmctl.2 | 1 - man2/sigaction.2 | 1 - man2/stat.2 | 1 - man2/statfs.2 | 1 - man2/statvfs.2 | 6 +- man2/sysctl.2 | 37 +++--- man2/sysfs.2 | 3 - man2/syslog.2 | 2 - man2/unimplemented.2 | 1 - man2/uselib.2 | 1 - man2/ustat.2 | 17 +-- man2/wait.2 | 1 - man3/INFINITY.3 | 2 - man3/__setfpucw.3 | 3 - man3/a64l.3 | 4 +- man3/aio_read.3 | 1 - man3/aio_write.3 | 2 - man3/atexit.3 | 30 +++-- man3/canonicalize_file_name.3 | 1 - man3/catopen.3 | 1 - man3/cfree.3 | 1 - man3/clearenv.3 | 4 - man3/cmsg.3 | 13 +- man3/des_crypt.3 | 2 - man3/dlopen.3 | 13 +- man3/dysize.3 | 1 - man3/encrypt.3 | 15 ++- man3/envz_add.3 | 23 ++-- man3/finite.3 | 1 - man3/fmemopen.3 | 5 +- man3/fmtmsg.3 | 37 +++--- man3/gamma.3 | 1 - man3/getdate.3 | 4 +- man3/getfsent.3 | 1 - man3/getgrent_r.3 | 49 ++++---- man3/getgrouplist.3 | 33 +++--- man3/getline.3 | 31 ++--- man3/getopt.3 | 32 ++--- man3/getpt.3 | 1 - man3/getpwent_r.3 | 46 +++---- man3/getrpcent.3 | 4 +- man3/getspnam.3 | 1 - man3/getttyent.3 | 1 - man3/getutent.3 | 49 ++++---- man3/getw.3 | 1 - man3/hsearch.3 | 70 ++++++----- man3/inet.3 | 6 +- man3/key_setsecret.3 | 4 - man3/lseek64.3 | 3 - man3/malloc_hook.3 | 12 +- man3/mkdtemp.3 | 4 +- man3/netlink.3 | 4 - man3/nl_langinfo.3 | 13 -- man3/offsetof.3 | 3 +- man3/perror.3 | 1 - man3/posix_memalign.3 | 7 -- man3/printf.3 | 8 +- man3/puts.3 | 1 - man3/realpath.3 | 2 +- man3/remquo.3 | 2 - man3/resolver.3 | 1 - man3/rtime.3 | 9 +- man3/rtnetlink.3 | 2 +- man3/scandir.3 | 5 +- man3/sem_wait.3 | 17 +-- man3/setaliasent.3 | 31 ++--- man3/setbuf.3 | 5 +- man3/sigvec.3 | 2 +- man3/stpcpy.3 | 6 +- man3/strptime.3 | 4 +- man3/strtod.3 | 1 - man3/syslog.3 | 2 - man3/termios.3 | 1 - man3/tsearch.3 | 15 ++- man3/ulimit.3 | 1 - man3/wordexp.3 | 11 +- man3/xcrypt.3 | 2 - man4/console.4 | 3 - man4/console_codes.4 | 2 - man4/console_ioctl.4 | 122 ++++++------------- man4/fd.4 | 6 - man4/full.4 | 1 - man4/lp.4 | 1 - man4/mem.4 | 3 - man4/mouse.4 | 7 -- man4/null.4 | 1 - man4/ram.4 | 1 - man4/st.4 | 25 ++-- man4/ttyS.4 | 1 - man4/tty_ioctl.4 | 34 ++---- man4/vcs.4 | 49 ++++---- man5/charmap.5 | 3 - man5/dir_colors.5 | 1 - man5/fs.5 | 1 - man5/host.conf.5 | 1 - man5/locale.5 | 29 ----- man5/nscd.conf.5 | 4 +- man5/nsswitch.conf.5 | 1 - man5/passwd.5 | 1 - man5/proc.5 | 2 - man5/protocols.5 | 3 - man5/services.5 | 2 - man5/slabinfo.5 | 2 - man5/ttytype.5 | 1 - man5/utmp.5 | 46 ++++--- man7/arp.7 | 9 +- man7/ascii.7 | 1 - man7/boot.7 | 10 -- man7/bootparam.7 | 187 ----------------------------- man7/charsets.7 | 10 -- man7/complex.7 | 13 +- man7/ddp.7 | 2 - man7/epoll.7 | 12 +- man7/glob.7 | 11 +- man7/icmp.7 | 1 - man7/ip.7 | 3 - man7/ipv6.7 | 15 +-- man7/iso_8859-1.7 | 2 - man7/iso_8859-15.7 | 2 - man7/iso_8859-16.7 | 3 - man7/iso_8859-2.7 | 3 - man7/iso_8859-7.7 | 2 - man7/iso_8859-9.7 | 2 - man7/koi8-r.7 | 2 - man7/netdevice.7 | 6 - man7/netlink.7 | 14 +-- man7/packet.7 | 28 +---- man7/posixoptions.7 | 3 - man7/raw.7 | 17 +-- man7/rtnetlink.7 | 7 -- man7/socket.7 | 4 - man7/udp.7 | 5 - man7/units.7 | 2 - man7/unix.7 | 9 -- man7/uri.7 | 2 - man7/x25.7 | 2 - man8/ldconfig.8 | 1 - man8/nscd.8 | 3 - 175 files changed, 637 insertions(+), 1238 deletions(-) diff --git a/Changes b/Changes index 5a29e25e3..2e1cd746c 100644 --- a/Changes +++ b/Changes @@ -12,16 +12,27 @@ been incorporated in changes in this release: Apologies if I missed anyone! -New pages ---------- - - Global changes -------------- +This release consists mainly of formatting fixes (to a large +number of pages) to achieve greater consistency across pages. +In addition, a number of example programs were reformatted +to more closely match K&R style. +With the exception of the few individual changes noted below, +no changes were made to content. + Typographical or grammatical errors have been corrected in several -places. (Special thanks to Nicolas François!) +places. Changes to individual pages --------------------------- + +bdflush.2 + mtk + Add header file to SYNOPSIS. + +select_tut.2 + mtk + Make SYNOPSIS match select.2. diff --git a/man2/accept.2 b/man2/accept.2 index b7bdccabc..54b255023 100644 --- a/man2/accept.2 +++ b/man2/accept.2 @@ -45,7 +45,6 @@ accept \- accept a connection on a socket .sp .BI "int accept(int " sockfd ", struct sockaddr *" addr ", socklen_t *" addrlen ); .SH DESCRIPTION - The .BR accept () system call is used with connection-based socket types @@ -294,7 +293,6 @@ They shouldn't have touched it in the first place, but once they did they felt it had to have a named type for some unfathomable reason (probably somebody didn't like losing face over having done the original stupid thing, so they silently just renamed their blunder)." - .SH "SEE ALSO" .BR bind (2), .BR connect (2), diff --git a/man2/chmod.2 b/man2/chmod.2 index 000f90300..0a8ea6132 100644 --- a/man2/chmod.2 +++ b/man2/chmod.2 @@ -50,7 +50,6 @@ Modes are specified by .IR or'ing the following: .RS -.sp .TP 1.0i S_ISUID 04000 set user ID on execution @@ -87,9 +86,8 @@ S_IWOTH .TP S_IXOTH 00001 execute/search by others -.sp .RE - +.PP The effective UID of the calling process must match the owner of the file, or the process must be privileged (Linux: it must have the .B CAP_FOWNER @@ -127,7 +125,6 @@ Depending on the file system, other errors can be returned. The more general errors for .BR chmod () are listed below: - .TP .B EACCES Search permission is denied on a component of the path prefix. diff --git a/man2/clone.2 b/man2/clone.2 index bd653af3c..3c745c606 100644 --- a/man2/clone.2 +++ b/man2/clone.2 @@ -515,7 +515,6 @@ at that address. The address involved may be changed by the .BR set_tid_address (2) system call. This is used by threading libraries. - .SS "sys_clone" The .B sys_clone diff --git a/man2/epoll_create.2 b/man2/epoll_create.2 index 5ee9fb5e0..98ceb4835 100644 --- a/man2/epoll_create.2 +++ b/man2/epoll_create.2 @@ -59,7 +59,6 @@ is set appropriately. .I size is not positive. .TP -.TP .B ENFILE The system limit on the total number of open files has been reached. .TP diff --git a/man2/epoll_ctl.2 b/man2/epoll_ctl.2 index 7b0292518..cf36b46c3 100644 --- a/man2/epoll_ctl.2 +++ b/man2/epoll_ctl.2 @@ -42,19 +42,21 @@ The .I struct epoll_event is defined as : .sp +.in +0.5i .nf - typedef union epoll_data { - void *ptr; - int fd; - __uint32_t u32; - __uint64_t u64; - } epoll_data_t; +typedef union epoll_data { + void *ptr; + int fd; + __uint32_t u32; + __uint64_t u64; +} epoll_data_t; - struct epoll_event { - __uint32_t events; /* Epoll events */ - epoll_data_t data; /* User data variable */ - }; +struct epoll_event { + __uint32_t events; /* Epoll events */ + epoll_data_t data; /* User data variable */ +}; .fi +.in -0.5i The .I events diff --git a/man2/epoll_wait.2 b/man2/epoll_wait.2 index c26a5a808..75cb5b791 100644 --- a/man2/epoll_wait.2 +++ b/man2/epoll_wait.2 @@ -62,19 +62,21 @@ The .I struct epoll_event is defined as : .sp +.in +0.5i .nf - typedef union epoll_data { - void *ptr; - int fd; - __uint32_t u32; - __uint64_t u64; - } epoll_data_t; +typedef union epoll_data { + void *ptr; + int fd; + __uint32_t u32; + __uint64_t u64; +} epoll_data_t; - struct epoll_event { - __uint32_t events; /* Epoll events */ - epoll_data_t data; /* User data variable */ - }; +struct epoll_event { + __uint32_t events; /* Epoll events */ + epoll_data_t data; /* User data variable */ +}; .fi +.in -0.5i The .I data diff --git a/man2/execve.2 b/man2/execve.2 index 736db80f4..41dc2b898 100644 --- a/man2/execve.2 +++ b/man2/execve.2 @@ -318,7 +318,6 @@ a #! executable shell script. .\" Linux versions have also had other security holes in \fBexecve\fP(), .\" that could be exploited for denial of service by a suitably crafted .\" ELF binary. There are no known problems with 2.0.34 or 2.2.15. - .SH HISTORICAL With Unix V6 the argument list of an .BR exec () @@ -330,7 +329,6 @@ argument list was not directly usable in a further .BR exec () call. Since Unix V7 both are NULL. - .SH "SEE ALSO" .BR chmod (2), .BR fork (2), diff --git a/man2/fcntl.2 b/man2/fcntl.2 index 34f00af88..79e832ff3 100644 --- a/man2/fcntl.2 +++ b/man2/fcntl.2 @@ -71,7 +71,6 @@ performs one of the operations described below on the open file descriptor .IR fd . The operation is determined by .IR cmd . -.P .SS "Duplicating a file descriptor" .TP .B F_DUPFD @@ -89,7 +88,6 @@ On success, the new descriptor is returned. See .BR dup (2) for further details. -.P .SS "File descriptor flags" The following commands manipulate the flags associated with a file descriptor. @@ -108,7 +106,6 @@ Read the file descriptor flags. .B F_SETFD Set the file descriptor flags to the value specified by .IR arg . -.P .SS "File status flags" Each open file description has certain associated status flags, initialized by @@ -153,7 +150,6 @@ flags. .\" FIXME According to POSIX.1-2001, O_SYNC should also be modifiable .\" via fcntl(2), but currently Linux does not permit this .\" See http://bugzilla.kernel.org/show_bug.cgi?id=5994 -.P .SS "Advisory locking" .BR F_GETLK ", " F_SETLK " and " F_SETLKW are used to acquire, release, and test for the existence of record @@ -329,7 +325,6 @@ should be avoided; use and .BR write (2) instead. -.P .SS "Mandatory locking" (Non-POSIX.) The above record locks may be either advisory or mandatory, @@ -375,7 +370,6 @@ permission bit (see .BR chmod (1) and .BR chmod (2)). -.P .SS "Managing signals" .BR F_GETOWN ", " F_SETOWN ", " F_GETSIG " and " F_SETSIG are used to manage I/O availability signals: @@ -561,7 +555,6 @@ are Linux specific. POSIX has asynchronous I/O and the .I aio_sigevent structure to achieve similar things; these are also available in Linux as part of the GNU C Library (Glibc). -.P .SS Leases .B F_SETLEASE and @@ -584,7 +577,6 @@ values is specified in the integer .IR arg : .RS -.TP .B F_RDLCK Take out a read lease. This will cause the calling process to be notified when @@ -701,7 +693,6 @@ structure as its second argument, and the field of this argument will hold the descriptor of the leased file that has been accessed by another process. (This is useful if the caller holds leases against multiple files). -.P .SS "File and directory change notification (dnotify)" .TP .B F_NOTIFY @@ -713,7 +704,6 @@ The events to be notified are specified in .IR arg , which is a bit mask specified by ORing together zero or more of the following bits: - .TS l l ---- diff --git a/man2/getitimer.2 b/man2/getitimer.2 index aa88456a4..eeafb295e 100644 --- a/man2/getitimer.2 +++ b/man2/getitimer.2 @@ -107,7 +107,6 @@ If the timer expires while the process is active (always true for .BR ITIMER_VIRTUAL ) the signal will be delivered immediately when generated. Otherwise the delivery will be offset by a small time dependent on the system loading. -.LP .SH "RETURN VALUE" On success, zero is returned. On error, \-1 is returned, and .I errno diff --git a/man2/getresuid.2 b/man2/getresuid.2 index 6319a765d..02164e1d0 100644 --- a/man2/getresuid.2 +++ b/man2/getresuid.2 @@ -41,7 +41,6 @@ and (both introduced in Linux 2.1.44) get the real UID, effective UID, and saved set-user-ID (resp. group ID's) of the current process. - .SH "RETURN VALUE" On success, zero is returned. On error, \-1 is returned, and .I errno diff --git a/man2/getsockopt.2 b/man2/getsockopt.2 index 20efb963e..302065736 100644 --- a/man2/getsockopt.2 +++ b/man2/getsockopt.2 @@ -120,12 +120,10 @@ For .BR setsockopt (), the parameter should be non-zero to enable a boolean option, or zero if the option is to be disabled. - .PP For a description of the available socket options see .BR socket (7) and the appropriate protocol man pages. - .SH "RETURN VALUE" On success, zero is returned. On error, \-1 is returned, and .I errno diff --git a/man2/intro.2 b/man2/intro.2 index 712e90453..05538fa79 100644 --- a/man2/intro.2 +++ b/man2/intro.2 @@ -55,7 +55,6 @@ on when to use one or other mechanism. A _syscall macro desired system call - .SS Setup The important thing to know about a system call is its prototype. You need to know how many arguments, their types, and the function return type. @@ -83,8 +82,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 -.nf .sp +.nf #include #include #include /* for _syscallX macros/related stuff */ @@ -95,24 +94,25 @@ _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) +int +main(void) { - struct sysinfo s_info; - int error; + 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); - return(0); + 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); + return(0); } .fi .SS "Sample Output" diff --git a/man2/ioctl_list.2 b/man2/ioctl_list.2 index 774daa5f4..d1ec13883 100644 --- a/man2/ioctl_list.2 +++ b/man2/ioctl_list.2 @@ -24,9 +24,7 @@ .TH IOCTL_LIST 2 2003-03-30 "Linux 1.3" "Linux Programmer's Manual" .SH NAME ioctl_list \- list of ioctl calls in Linux/i386 kernel - .SH DESCRIPTION - This is Ioctl List 1.3.27, a list of ioctl calls in Linux/i386 kernel 1.3.27. It contains 421 ioctls from /usr/include/{asm,linux}/*.h. For each ioctl, its numerical value, its name, and its argument @@ -43,7 +41,6 @@ separate section. .PP This list is very incomplete. Please e-mail changes and comments to . - .SH "IOCTL STRUCTURE" .\" added two sections - aeb Ioctl command values are 32-bit constants. @@ -79,15 +76,14 @@ sizeof(sizeof(struct)), or because of legacy values. Thus, it seems that the new structure only gave disadvantages: it does not help in checking, but it causes varying values for the various architectures. - .SH "RETURN VALUE" Decent ioctls return 0 on success and \-1 on error, while any output value is stored via the argument. However, quite a few ioctls in fact return an output value. This is not yet indicated below. - .nf + // Main table. // @@ -568,7 +564,6 @@ This is not yet indicated below. 0x0000560A VT_RESIZEX const struct vt_consize * - // More arguments. Some ioctl's take a pointer to a structure which contains additional @@ -656,9 +651,6 @@ in 'drivers/char/selection.c' TIOCLINUX-10 1 + const char * - - - // Duplicate ioctls This list does not include ioctls in the range SIOCDEVPRIVATE and diff --git a/man2/ioprio_set.2 b/man2/ioprio_set.2 index 34628987b..ab247c190 100644 --- a/man2/ioprio_set.2 +++ b/man2/ioprio_set.2 @@ -141,7 +141,6 @@ I/O priorities are supported for reads and for synchronous (O_DIRECT, O_SYNC) writes. I/O priorities are not supported for asynchronous writes because they are issued outside the context of the program dirtying the memory, and thus program-specific priorities do not apply. - .SH "RETURN VALUE" On success, .BR ioprio_get () diff --git a/man2/listen.2 b/man2/listen.2 index 543b25b24..784cbbaa0 100644 --- a/man2/listen.2 +++ b/man2/listen.2 @@ -85,7 +85,6 @@ length and this sysctl setting is ignored. See .BR tcp (7) for more information. - .SH "RETURN VALUE" On success, zero is returned. On error, \-1 is returned, and .I errno diff --git a/man2/llseek.2 b/man2/llseek.2 index 98438e969..685a4c095 100644 --- a/man2/llseek.2 +++ b/man2/llseek.2 @@ -60,7 +60,6 @@ or respectively. It returns the resulting file position in the argument .IR result . - .SH "RETURN VALUE" Upon successful completion, .BR _llseek () diff --git a/man2/lookup_dcookie.2 b/man2/lookup_dcookie.2 index 298124a40..4495ee59f 100644 --- a/man2/lookup_dcookie.2 +++ b/man2/lookup_dcookie.2 @@ -42,7 +42,6 @@ For .BR lookup_dcookie () to return successfully, the kernel must still hold a cookie reference to the directory entry. - .SH "NOTES" .BR lookup_dcookie () is a special-purpose system call, currently used only by the oprofile profiler. @@ -50,7 +49,6 @@ It relies on a kernel driver to register cookies for directory entries. The path returned may be suffixed by the string " (deleted)" if the directory entry has been removed. - .SH "RETURN VALUE" On success, .BR lookup_dcookie () diff --git a/man2/lseek.2 b/man2/lseek.2 index 83b73203d..c3a1c48a3 100644 --- a/man2/lseek.2 +++ b/man2/lseek.2 @@ -131,7 +131,6 @@ is incorrect English, but maintained for historical reasons. When converting old code, substitute values for \fIwhence\fP with the following macros: -.PP .TS c c l l. diff --git a/man2/mkdir.2 b/man2/mkdir.2 index ea0c02e53..b867a839f 100644 --- a/man2/mkdir.2 +++ b/man2/mkdir.2 @@ -39,7 +39,6 @@ otherwise it will be owned by the effective group ID of the process. If the parent directory has the set-group-ID bit set then so will the newly created directory. - .SH "RETURN VALUE" .BR mkdir () returns zero on success, or \-1 if an error occurred (in which case, diff --git a/man2/mmap2.2 b/man2/mmap2.2 index 6a379ed82..8b2cfe958 100644 --- a/man2/mmap2.2 +++ b/man2/mmap2.2 @@ -64,7 +64,7 @@ and is set appropriately. .SH ERRORS .TP -.SH EFAULT +EFAULT Problem with getting the data from userspace. .SH NOTES diff --git a/man2/mount.2 b/man2/mount.2 index 89a2e8bb3..81307897d 100644 --- a/man2/mount.2 +++ b/man2/mount.2 @@ -275,7 +275,6 @@ is set appropriately. The error values given below result from filesystem type independent errors. Each filesystem type may have its own special errors and its own special behavior. See the kernel source code for details. - .TP .B EACCES A component of a path was not searchable. (See also diff --git a/man2/open.2 b/man2/open.2 index 255a8f1ba..dcb6e562d 100644 --- a/man2/open.2 +++ b/man2/open.2 @@ -260,7 +260,6 @@ For a discussion of the effect of .BR O_NONBLOCK in conjunction with mandatory file locks and with file leases, see .BR fcntl (2). - .TP .B O_SYNC The file is opened for synchronous I/O. Any diff --git a/man2/path_resolution.2 b/man2/path_resolution.2 index 397fea477..0232d8b64 100644 --- a/man2/path_resolution.2 +++ b/man2/path_resolution.2 @@ -26,7 +26,6 @@ Unix/Linux path resolution \- find the file referred to by a filename .SH DESCRIPTION Some Unix/Linux system calls have as parameter one or more filenames. A filename (or pathname) is resolved as follows. - .SS "Step 1: Start of the resolution process" If the pathname starts with the '/' character, the starting lookup directory is the root directory of the current process. (A process inherits its @@ -49,7 +48,6 @@ system call.) Pathnames starting with a '/' character are called absolute pathnames. Pathnames not starting with a '/' are called relative pathnames. - .SS "Step 2: Walk along the path" Set the current lookup directory to the starting lookup directory. Now, for each non-final component of the pathname, where a component @@ -86,7 +84,6 @@ exceeded ("Too many levels of symbolic links"). .\" presently: max recursion depth during symlink resolution: 5 .\" max total number of symlinks followed: 40 .\" _POSIX_SYMLOOP_MAX is 8 - .SS "Step 3: Find the final entry" The lookup of the final component of the pathname goes just like that of all other components, as described in the previous step, @@ -98,7 +95,6 @@ is not necessarily an error if the component is not found \(em maybe we are just creating it. The details on the treatment of the final entry are described in the manual pages of the specific system calls. - .SS ". and .." By convention, every directory has the entries "." and "..", which refer to the directory itself and to its parent directory, @@ -109,7 +105,6 @@ their conventional meanings, regardless of whether they are actually present in the physical filesystem. One cannot walk down past the root: "/.." is the same as "/". - .SS "Mount points" After a "mount dev path" command, the pathname "path" refers to the root of the filesystem hierarchy on the device "dev", and no @@ -118,14 +113,12 @@ longer to whatever it referred to earlier. One can walk out of a mounted filesystem: "path/.." refers to the parent directory of "path", outside of the filesystem hierarchy on "dev". - .SS "Trailing slashes" If a pathname ends in a '/', that forces resolution of the preceding component as in Step 2: it has to exist and resolve to a directory. Otherwise a trailing '/' is ignored. (Or, equivalently, a pathname with a trailing '/' is equivalent to the pathname obtained by appending '.' to it.) - .SS "Final symlink" If the last component of a pathname is a symbolic link, then it depends on the system call whether the file referred to will be @@ -135,17 +128,14 @@ For example, the system call will operate on the symlink, while .BR stat (2) operates on the file pointed to by the symlink. - .SS "Length limit" There is a maximum length for pathnames. If the pathname (or some intermediate pathname obtained while resolving symbolic links) is too long, an ENAMETOOLONG error is returned ("File name too long"). - .SS "Empty pathname" In the original Unix, the empty pathname referred to the current directory. Nowadays POSIX decrees that an empty pathname must not be resolved successfully. Linux returns ENOENT in this case. - .SS "Permissions" The permission bits of a file consist of three groups of three bits, cf.\& .BR chmod (1) @@ -178,7 +168,6 @@ Similarly, Linux uses the fsgid ("file system group ID") instead of the effective group ID. See .BR setfsgid (2). .\" FIXME say something about filesystem mounted read-only ? - .SS "Bypassing permission checks: superuser and capabilities" On a traditional Unix system, the superuser .RI ( root , @@ -205,6 +194,5 @@ The CAP_DAC_READ_SEARCH capability grants read and search permission on directories, and read permission on ordinary files. .\" FIXME say something about immutable files .\" FIXME say something about ACLs - .SH "SEE ALSO" .BR capabilities (7) diff --git a/man2/pipe.2 b/man2/pipe.2 index 5e3b97843..8da88d3f3 100644 --- a/man2/pipe.2 +++ b/man2/pipe.2 @@ -115,7 +115,6 @@ main(int argc, char *argv[]) exit(EXIT_SUCCESS); } } - .fi .SH "SEE ALSO" .BR fork (2), diff --git a/man2/pivot_root.2 b/man2/pivot_root.2 index df2b4402c..820916bd0 100644 --- a/man2/pivot_root.2 +++ b/man2/pivot_root.2 @@ -80,7 +80,6 @@ On success, zero is returned. On error, \-1 is returned, and .SH ERRORS \fBpivot_root\fP() may return (in \fIerrno\fP) any of the errors returned by \fBstat(2)\fP. Additionally, it may return: - .TP .B EBUSY \fInew_root\fP or \fIput_old\fP are on the current root file system, diff --git a/man2/poll.2 b/man2/poll.2 index 4984d83bc..b927b13af 100644 --- a/man2/poll.2 +++ b/man2/poll.2 @@ -170,7 +170,6 @@ Priority data may be written. .PP Linux also knows about, but does not use .BR POLLMSG . -.PP .SS ppoll() The relationship between .BR poll () diff --git a/man2/quotactl.2 b/man2/quotactl.2 index ccfd9c751..bcde2e24e 100644 --- a/man2/quotactl.2 +++ b/man2/quotactl.2 @@ -167,7 +167,6 @@ Sync disk copy of a filesystem's quota. .TP .B Q_GETSTATS Get collected stats. - .SH "RETURN VALUE" On success, .BR quotactl () diff --git a/man2/read.2 b/man2/read.2 index 2e5978ed3..09bd205c5 100644 --- a/man2/read.2 +++ b/man2/read.2 @@ -56,7 +56,6 @@ is zero, \fBread\fP() returns zero and has no other results. If .I count is greater than SSIZE_MAX, the result is unspecified. -.PP .SH "RETURN VALUE" On success, the number of bytes read is returned (zero indicates end of file), and the file position is advanced by this number. diff --git a/man2/readdir.2 b/man2/readdir.2 index 6a0fae563..8756d9c89 100644 --- a/man2/readdir.2 +++ b/man2/readdir.2 @@ -90,7 +90,6 @@ is the size of not counting the null terminator. .I d_name is a null-terminated filename. -.PP .SH "RETURN VALUE" On success, 1 is returned. On end of directory, 0 is returned. diff --git a/man2/readv.2 b/man2/readv.2 index 840ba0f6c..6ba22ca1e 100644 --- a/man2/readv.2 +++ b/man2/readv.2 @@ -84,7 +84,6 @@ The function works just like .BR write (2) except that multiple buffers are written out. -.PP .SH "RETURN VALUE" On success, the .BR readv () diff --git a/man2/select_tut.2 b/man2/select_tut.2 index 2f3df9314..b830efe3c 100644 --- a/man2/select_tut.2 +++ b/man2/select_tut.2 @@ -189,26 +189,29 @@ program would look like: .nf int child_events = 0; -void child_sig_handler (int x) { +void +child_sig_handler(int x) +{ child_events++; - signal (SIGCHLD, child_sig_handler); + signal(SIGCHLD, child_sig_handler); } -int main (int argc, char **argv) { +int +main(int argc, char **argv) +{ sigset_t sigmask, orig_sigmask; - sigemptyset (&sigmask); - sigaddset (&sigmask, SIGCHLD); - sigprocmask (SIG_BLOCK, &sigmask, - &orig_sigmask); + sigemptyset(&sigmask); + sigaddset(&sigmask, SIGCHLD); + sigprocmask(SIG_BLOCK, &sigmask, &orig_sigmask); - signal (SIGCHLD, child_sig_handler); + signal(SIGCHLD, child_sig_handler); for (;;) { /* main loop */ for (; child_events > 0; child_events\-\-) { /* do event work here */ } - r = pselect (nfds, &rd, &wr, &er, 0, &orig_sigmask); + r = pselect(nfds, &rd, &wr, &er, 0, &orig_sigmask); /* main body of program */ } @@ -257,65 +260,61 @@ static int forward_port; #undef max #define max(x,y) ((x) > (y) ? (x) : (y)) -static int listen_socket (int listen_port) { +static int +listen_socket(int listen_port) +{ struct sockaddr_in a; int s; int yes; - if ((s = socket (AF_INET, SOCK_STREAM, 0)) < 0) { - perror ("socket"); + if ((s = socket(AF_INET, SOCK_STREAM, 0)) < 0) { + perror("socket"); return \-1; } yes = 1; - if (setsockopt - (s, SOL_SOCKET, SO_REUSEADDR, - (char *) &yes, sizeof (yes)) < 0) { - perror ("setsockopt"); - close (s); + if (setsockopt(s, SOL_SOCKET, SO_REUSEADDR, + (char *) &yes, sizeof(yes)) < 0) { + perror("setsockopt"); + close(s); return \-1; } - memset (&a, 0, sizeof (a)); - a.sin_port = htons (listen_port); + memset(&a, 0, sizeof(a)); + a.sin_port = htons(listen_port); a.sin_family = AF_INET; - if (bind - (s, (struct sockaddr *) &a, sizeof (a)) < 0) { - perror ("bind"); - close (s); + if (bind(s, (struct sockaddr *) &a, sizeof(a)) < 0) { + perror("bind"); + close(s); return \-1; } - printf ("accepting connections on port %d\\n", - (int) listen_port); - listen (s, 10); + printf("accepting connections on port %d\\n", listen_port); + listen(s, 10); return s; } -static int connect_socket (int connect_port, - char *address) { +static int +connect_socket(int connect_port, char *address) +{ struct sockaddr_in a; int s; - if ((s = socket (AF_INET, SOCK_STREAM, 0)) < 0) { - perror ("socket"); - close (s); + if ((s = socket(AF_INET, SOCK_STREAM, 0)) < 0) { + perror("socket"); + close(s); return \-1; } - memset (&a, 0, sizeof (a)); - a.sin_port = htons (connect_port); + memset(&a, 0, sizeof(a)); + a.sin_port = htons(connect_port); a.sin_family = AF_INET; - if (!inet_aton - (address, - (struct in_addr *) &a.sin_addr.s_addr)) { - perror ("bad IP address format"); - close (s); + if (!inet_aton(address, (struct in_addr *) &a.sin_addr.s_addr)) { + perror("bad IP address format"); + close(s); return \-1; } - if (connect - (s, (struct sockaddr *) &a, - sizeof (a)) < 0) { - perror ("connect()"); - shutdown (s, SHUT_RDWR); - close (s); + if (connect(s, (struct sockaddr *) &a, sizeof(a)) < 0) { + perror("connect()"); + shutdown(s, SHUT_RDWR); + close(s); return \-1; } return s; @@ -323,23 +322,25 @@ static int connect_socket (int connect_port, #define SHUT_FD1 { \\ if (fd1 >= 0) { \\ - shutdown (fd1, SHUT_RDWR); \\ - close (fd1); \\ + shutdown(fd1, SHUT_RDWR); \\ + close(fd1); \\ fd1 = \-1; \\ } \\ } #define SHUT_FD2 { \\ if (fd2 >= 0) { \\ - shutdown (fd2, SHUT_RDWR); \\ - close (fd2); \\ + shutdown(fd2, SHUT_RDWR); \\ + close(fd2); \\ fd2 = \-1; \\ } \\ } #define BUF_SIZE 1024 -int main (int argc, char **argv) { +int +main(int argc, char **argv) +{ int h; int fd1 = \-1, fd2 = \-1; char buf1[BUF_SIZE], buf2[BUF_SIZE]; @@ -347,72 +348,70 @@ int main (int argc, char **argv) { int buf2_avail, buf2_written; if (argc != 4) { - fprintf (stderr, - "Usage\\n\\tfwd \\ - \\n"); - exit (1); + fprintf(stderr, + "Usage\\n\\tfwd " + " \\n"); + exit(1); } - signal (SIGPIPE, SIG_IGN); + signal(SIGPIPE, SIG_IGN); - forward_port = atoi (argv[2]); + forward_port = atoi(argv[2]); - h = listen_socket (atoi (argv[1])); + h = listen_socket(atoi(argv[1])); if (h < 0) - exit (1); + exit(1); for (;;) { int r, nfds = 0; fd_set rd, wr, er; - FD_ZERO (&rd); - FD_ZERO (&wr); - FD_ZERO (&er); - FD_SET (h, &rd); - nfds = max (nfds, h); + FD_ZERO(&rd); + FD_ZERO(&wr); + FD_ZERO(&er); + FD_SET(h, &rd); + nfds = max(nfds, h); if (fd1 > 0 && buf1_avail < BUF_SIZE) { - FD_SET (fd1, &rd); - nfds = max (nfds, fd1); + FD_SET(fd1, &rd); + nfds = max(nfds, fd1); } if (fd2 > 0 && buf2_avail < BUF_SIZE) { - FD_SET (fd2, &rd); - nfds = max (nfds, fd2); + FD_SET(fd2, &rd); + nfds = max(nfds, fd2); } if (fd1 > 0 && buf2_avail \- buf2_written > 0) { - FD_SET (fd1, &wr); - nfds = max (nfds, fd1); + FD_SET(fd1, &wr); + nfds = max(nfds, fd1); } if (fd2 > 0 && buf1_avail \- buf1_written > 0) { - FD_SET (fd2, &wr); - nfds = max (nfds, fd2); + FD_SET(fd2, &wr); + nfds = max(nfds, fd2); } if (fd1 > 0) { - FD_SET (fd1, &er); - nfds = max (nfds, fd1); + FD_SET(fd1, &er); + nfds = max(nfds, fd1); } if (fd2 > 0) { - FD_SET (fd2, &er); - nfds = max (nfds, fd2); + FD_SET(fd2, &er); + nfds = max(nfds, fd2); } - r = select (nfds + 1, &rd, &wr, &er, NULL); + r = select(nfds + 1, &rd, &wr, &er, NULL); if (r == \-1 && errno == EINTR) continue; if (r < 0) { - perror ("select()"); - exit (1); + perror("select()"); + exit(1); } - if (FD_ISSET (h, &rd)) { + if (FD_ISSET(h, &rd)) { unsigned int l; struct sockaddr_in client_address; - memset (&client_address, 0, l = - sizeof (client_address)); - r = accept (h, (struct sockaddr *) - &client_address, &l); + memset(&client_address, 0, l = sizeof(client_address)); + r = accept(h, (struct sockaddr *) &client_address, &l); if (r < 0) { - perror ("accept()"); + perror("accept()"); } else { SHUT_FD1; SHUT_FD2; @@ -420,41 +419,39 @@ int main (int argc, char **argv) { buf2_avail = buf2_written = 0; fd1 = r; fd2 = - connect_socket (forward_port, - argv[3]); + connect_socket(forward_port, argv[3]); if (fd2 < 0) { SHUT_FD1; } else - printf ("connect from %s\\n", - inet_ntoa - (client_address.sin_addr)); + printf("connect from %s\\n", + inet_ntoa(client_address.sin_addr)); } } /* NB: read oob data before normal reads */ if (fd1 > 0) - if (FD_ISSET (fd1, &er)) { + if (FD_ISSET(fd1, &er)) { char c; errno = 0; - r = recv (fd1, &c, 1, MSG_OOB); + r = recv(fd1, &c, 1, MSG_OOB); if (r < 1) { SHUT_FD1; } else - send (fd2, &c, 1, MSG_OOB); + send(fd2, &c, 1, MSG_OOB); } if (fd2 > 0) - if (FD_ISSET (fd2, &er)) { + if (FD_ISSET(fd2, &er)) { char c; errno = 0; - r = recv (fd2, &c, 1, MSG_OOB); + r = recv(fd2, &c, 1, MSG_OOB); if (r < 1) { SHUT_FD1; } else - send (fd1, &c, 1, MSG_OOB); + send(fd1, &c, 1, MSG_OOB); } if (fd1 > 0) - if (FD_ISSET (fd1, &rd)) { + if (FD_ISSET(fd1, &rd)) { r = - read (fd1, buf1 + buf1_avail, + read(fd1, buf1 + buf1_avail, BUF_SIZE \- buf1_avail); if (r < 1) { SHUT_FD1; @@ -462,9 +459,9 @@ int main (int argc, char **argv) { buf1_avail += r; } if (fd2 > 0) - if (FD_ISSET (fd2, &rd)) { + if (FD_ISSET(fd2, &rd)) { r = - read (fd2, buf2 + buf2_avail, + read(fd2, buf2 + buf2_avail, BUF_SIZE \- buf2_avail); if (r < 1) { SHUT_FD2; @@ -472,24 +469,20 @@ int main (int argc, char **argv) { buf2_avail += r; } if (fd1 > 0) - if (FD_ISSET (fd1, &wr)) { + if (FD_ISSET(fd1, &wr)) { r = - write (fd1, - buf2 + buf2_written, - buf2_avail \- - buf2_written); + write(fd1, buf2 + buf2_written, + buf2_avail \- buf2_written); if (r < 1) { SHUT_FD1; } else buf2_written += r; } if (fd2 > 0) - if (FD_ISSET (fd2, &wr)) { + if (FD_ISSET(fd2, &wr)) { r = - write (fd2, - buf1 + buf1_written, - buf1_avail \- - buf1_written); + write(fd2, buf1 + buf1_written, + buf1_avail \- buf1_written); if (r < 1) { SHUT_FD2; } else @@ -502,12 +495,10 @@ int main (int argc, char **argv) { buf2_written = buf2_avail = 0; /* one side has closed the connection, keep writing to the other side until empty */ - if (fd1 < 0 - && buf1_avail \- buf1_written == 0) { + if (fd1 < 0 && buf1_avail \- buf1_written == 0) { SHUT_FD2; } - if (fd2 < 0 - && buf2_avail \- buf2_written == 0) { + if (fd2 < 0 && buf2_avail \- buf2_written == 0) { SHUT_FD1; } } @@ -625,7 +616,7 @@ follows: struct timeval tv; tv.tv_sec = 0; tv.tv_usec = 200000; /* 0.2 seconds */ - select (0, NULL, NULL, NULL, &tv); + select(0, NULL, NULL, NULL, &tv); .fi .PP This is only guaranteed to work on Unix systems, however. diff --git a/man2/set_tid_address.2 b/man2/set_tid_address.2 index e7fc5fdfc..d3c540a45 100644 --- a/man2/set_tid_address.2 +++ b/man2/set_tid_address.2 @@ -34,7 +34,6 @@ The kernel keeps for each process two values called and .I clear_child_tid that are NULL by default. - .SS set_child_tid If a process is started using .BR clone (2) @@ -50,7 +49,6 @@ When .I set_child_tid is set, the very first thing the new process does is writing its PID at this address. - .SS clear_child_tid If a process is started using .BR clone (2) diff --git a/man2/seteuid.2 b/man2/seteuid.2 index 0088f3eeb..8d59fc822 100644 --- a/man2/seteuid.2 +++ b/man2/seteuid.2 @@ -44,7 +44,6 @@ real user ID, the effective user ID or the saved set-user-ID. Precisely the same holds for .BR setegid () with "group" instead of "user". - .\" When .\" .I euid .\" equals \-1, nothing is changed. diff --git a/man2/setpgid.2 b/man2/setpgid.2 index d7098b344..73ba501ba 100644 --- a/man2/setpgid.2 +++ b/man2/setpgid.2 @@ -113,7 +113,6 @@ If the exit of the process causes a process group to become orphaned, and if any member of the newly-orphaned process group is stopped, then a SIGHUP signal followed by a SIGCONT signal will be sent to each process in the newly-orphaned process group. - .SH "RETURN VALUE" On success, .BR setpgid () diff --git a/man2/setresuid.2 b/man2/setresuid.2 index 6690cebf3..13e747618 100644 --- a/man2/setresuid.2 +++ b/man2/setresuid.2 @@ -61,7 +61,6 @@ sets the real GID, effective GID, and saved set-group-ID of the current process (and always modifies the file system GID to be the same as the effective GID), with the same restrictions for non-privileged processes. - .SH "RETURN VALUE" On success, zero is returned. On error, \-1 is returned, and .I errno diff --git a/man2/setreuid.2 b/man2/setreuid.2 index d7958a3a1..35222d2b9 100644 --- a/man2/setreuid.2 +++ b/man2/setreuid.2 @@ -76,7 +76,6 @@ Completely analogously, .BR setregid () sets real and effective group ID's of the current process, and all of the above holds with "group" instead of "user". - .SH "RETURN VALUE" On success, zero is returned. On error, \-1 is returned, and .I errno diff --git a/man2/shmctl.2 b/man2/shmctl.2 index c923dff9b..d0a8eb611 100644 --- a/man2/shmctl.2 +++ b/man2/shmctl.2 @@ -210,7 +210,6 @@ struct shm_info { unsigned long swap_attempts; /* Unused since Linux 2.4 */ unsigned long swap_successes; /* Unused since Linux 2.4 */ }; - .in -2n .fi .TP diff --git a/man2/sigaction.2 b/man2/sigaction.2 index f491d5969..fe64e4483 100644 --- a/man2/sigaction.2 +++ b/man2/sigaction.2 @@ -361,7 +361,6 @@ POLL_ERR:i/o error POLL_PRI:high priority input available POLL_HUP:device disconnected .TE - .SH "RETURN VALUE" .BR sigaction () returns 0 on success and \-1 on error. diff --git a/man2/stat.2 b/man2/stat.2 index 90666b483..d07fa584e 100644 --- a/man2/stat.2 +++ b/man2/stat.2 @@ -335,7 +335,6 @@ Unix V7 (and later systems) had S_IREAD, S_IWRITE, S_IEXEC, where POSIX prescribes the synonyms S_IRUSR, S_IWUSR, S_IXUSR. .SH "OTHER SYSTEMS" Values that have been (or are) in use on various systems: -.P .TS l l l l l. hex name ls octal description diff --git a/man2/statfs.2 b/man2/statfs.2 index c7d63cbe4..e30b45659 100644 --- a/man2/statfs.2 +++ b/man2/statfs.2 @@ -174,7 +174,6 @@ is not a directory. .TP .B EOVERFLOW Some values were too large to be represented in the returned struct. -.PP .SH "CONFORMING TO" Linux specific. The Linux diff --git a/man2/statvfs.2 b/man2/statvfs.2 index c298b66f3..58f7b38c1 100644 --- a/man2/statvfs.2 +++ b/man2/statvfs.2 @@ -46,7 +46,7 @@ is a pointer to a structure defined approximately as follows: .nf - struct statvfs { +struct statvfs { unsigned long f_bsize; /* file system block size */ unsigned long f_frsize; /* fragment size */ fsblkcnt_t f_blocks; /* size of fs in f_frsize units */ @@ -58,7 +58,7 @@ structure defined approximately as follows: unsigned long f_fsid; /* file system ID */ unsigned long f_flag; /* mount flags */ unsigned long f_namemax; /* maximum filename length */ - }; +}; .fi Here the types @@ -83,7 +83,6 @@ Read-only file system. Set-user-ID/set-group-ID bits are ignored by .BR exec (2). .LP - It is unspecified whether all members of the returned struct have meaningful values on all filesystems. @@ -150,7 +149,6 @@ is not a directory. .TP .B EOVERFLOW Some values were too large to be represented in the returned struct. -.PP .SH "CONFORMING TO" POSIX.1-2001 .SH NOTES diff --git a/man2/sysctl.2 b/man2/sysctl.2 index f9c06d089..044975296 100644 --- a/man2/sysctl.2 +++ b/man2/sysctl.2 @@ -51,13 +51,13 @@ or the maximum number of open files. The argument has the form .PP .nf struct __sysctl_args { - int *name; /* integer vector describing variable */ - int nlen; /* length of this vector */ - void *oldval; /* 0 or address where to store old value */ - size_t *oldlenp; /* available room for old value, - overwritten by actual size of old value */ - void *newval; /* 0 or address of new value */ - size_t newlen; /* size of new value */ + int *name; /* integer vector describing variable */ + int nlen; /* length of this vector */ + void *oldval; /* 0 or address where to store old value */ + size_t *oldlenp; /* available room for old value, + overwritten by actual size of old value */ + void *newval; /* 0 or address of new value */ + size_t newlen; /* size of new value */ }; .fi .PP @@ -66,7 +66,6 @@ a directory tree under .IR /proc/sys , and if the requested item is found calls some appropriate routine to read or modify the value. - .SH EXAMPLE .nf #include @@ -77,8 +76,9 @@ _syscall1(int, _sysctl, struct __sysctl_args *, args); int sysctl(int *name, int nlen, void *oldval, size_t *oldlenp, void *newval, size_t newlen) { - struct __sysctl_args args={name,nlen,oldval,oldlenp,newval,newlen}; - return _sysctl(&args); + struct __sysctl_args args = { name, nlen, oldval, oldlenp, + newval, newlen }; + return _sysctl(&args); } #define SIZE(x) sizeof(x)/sizeof(x[0]) @@ -88,16 +88,17 @@ char osname[OSNAMESZ]; int osnamelth; int name[] = { CTL_KERN, KERN_OSTYPE }; -main(){ - osnamelth = sizeof(osname); - if (sysctl(name, SIZE(name), osname, &osnamelth, 0, 0)) - perror("sysctl"); - else - printf("This machine is running %*s\en", osnamelth, osname); - return 0; +int +main(void) +{ + osnamelth = sizeof(osname); + if (sysctl(name, SIZE(name), osname, &osnamelth, 0, 0)) + perror("sysctl"); + else + printf("This machine is running %*s\en", osnamelth, osname); + return 0; } .fi - .SH "RETURN VALUE" Upon successful completion, .BR _sysctl () diff --git a/man2/sysfs.2 b/man2/sysfs.2 index e62e153ba..fced6d4e5 100644 --- a/man2/sysfs.2 +++ b/man2/sysfs.2 @@ -39,7 +39,6 @@ the kernel. The specific form of the call and the information returned depends on the .I option in effect: - .TP .B 1 Translate the file-system identifier string @@ -59,7 +58,6 @@ has enough space to accept the string. .B 3 Return the total number of file system types currently present in the kernel. - .PP The numbering of the file-system type indexes begins with zero. .SH "RETURN VALUE" @@ -87,7 +85,6 @@ is not a valid file-system type identifier; is out-of-bounds; .I option is invalid. -.PP .SH "CONFORMING TO" SVr4. .SH NOTE diff --git a/man2/syslog.2 b/man2/syslog.2 index 95d4be93d..e688ab2ec 100644 --- a/man2/syslog.2 +++ b/man2/syslog.2 @@ -154,7 +154,6 @@ as follows: #define KERN_INFO "<6>" /* informational */ #define KERN_DEBUG "<7>" /* debug-level messages */ .fi - .SH "RETURN VALUE" In case of error, \-1 is returned, and \fIerrno\fP is set. Otherwise, for \fItype\fP equal to 2, 3 or 4, \fBsyslog\fP() returns the number @@ -182,6 +181,5 @@ In libc4 and libc5 the number of this call was defined by .BR SYS_klog . In glibc 2.0 the syscall is baptised .BR klogctl (). - .SH "SEE ALSO" .BR syslog (3) diff --git a/man2/unimplemented.2 b/man2/unimplemented.2 index d458052ff..8585ad457 100644 --- a/man2/unimplemented.2 +++ b/man2/unimplemented.2 @@ -61,6 +61,5 @@ Some system calls, like and .BR delete_module (2) only exist when the Linux kernel was built with support for them. - .SH "SEE ALSO" .BR obsolete (2) diff --git a/man2/uselib.2 b/man2/uselib.2 index fd3540724..95c778a91 100644 --- a/man2/uselib.2 +++ b/man2/uselib.2 @@ -51,7 +51,6 @@ In addition to all of the error codes returned by and .BR mmap (2), the following may also be returned: - .TP .B EACCES The library specified by diff --git a/man2/ustat.2 b/man2/ustat.2 index d3ef03482..eb4d1a869 100644 --- a/man2/ustat.2 +++ b/man2/ustat.2 @@ -44,23 +44,18 @@ returns information about a mounted file system. is a device number identifying a device containing a mounted file system. .I ubuf -is a pointer to a ustat structure that contains the following +is a pointer to a \fIustat\fP structure that contains the following members: - -.sp .RS .nf -.ne 7 -.ta 8n 16n 32n -daddr_t f_tfree; /* Total free blocks */ -ino_t f_tinode; /* Number of free inodes */ -char f_fname[6]; /* Filsys name */ -char f_fpack[6]; /* Filsys pack name */ -.ta + +daddr_t f_tfree; /* Total free blocks */ +ino_t f_tinode; /* Number of free inodes */ +char f_fname[6]; /* Filsys name */ +char f_fpack[6]; /* Filsys pack name */ .fi .RE .PP - The last two fields, f_fname and f_fpack, are not implemented and will always be filled with null bytes ('\\0'). .SH "RETURN VALUE" diff --git a/man2/wait.2 b/man2/wait.2 index 3bce599ad..b73e4def3 100644 --- a/man2/wait.2 +++ b/man2/wait.2 @@ -519,7 +519,6 @@ killed by signal 15 [1]+ Done ./a.out $ - #include #include #include diff --git a/man3/INFINITY.3 b/man3/INFINITY.3 index d2b2efa86..fd9ae3556 100644 --- a/man3/INFINITY.3 +++ b/man3/INFINITY.3 @@ -60,7 +60,6 @@ The macros .BR HUGE_VALL expand to constants of types double, float and long double, respectively, that represent a large positive value, possibly plus infinity. - .SH AVAILABILITY On a glibc system, the macro HUGE_VAL is always available. Availability of the NAN macro can be tested using @@ -70,7 +69,6 @@ They will be defined by .I if _ISOC99_SOURCE or _GNU_SOURCE is defined, or __STDC_VERSION__ is defined and has a value not less than 199901L. - .SH "CONFORMING TO" C99 .SH "SEE ALSO" diff --git a/man3/__setfpucw.3 b/man3/__setfpucw.3 index 93fcc02f1..775380107 100644 --- a/man3/__setfpucw.3 +++ b/man3/__setfpucw.3 @@ -8,7 +8,6 @@ __setfpucw \- set fpu control word on i386 architecture (obsolete) .B #include .sp .BI "void __setfpucw((unsigned short) " control_word ); -.br .SH DESCRIPTION .BR __setfpucw () transfers @@ -17,7 +16,6 @@ to the registers of the fpu (floating point unit) on i386 architecture. This was used to control floating point precision, rounding and floating point exceptions. .SH EXAMPLE - .BR __setfpucw(0x1372) Set fpu control word on i386 architecture to @@ -27,7 +25,6 @@ Set fpu control word on i386 architecture to \- rounding to nearest .br \- exceptions on overflow, zero divide and NaN -.br .SH AVAILABILITY As of glibc 2.1 this function does not exist anymore. There are new functions from C99, with prototypes in diff --git a/man3/a64l.3 b/man3/a64l.3 index f27af271c..fe3a5daad 100644 --- a/man3/a64l.3 +++ b/man3/a64l.3 @@ -12,7 +12,6 @@ a64l, l64a \- convert between long and base-64 .BI "long a64l(char *" str64 ); .sp .BI "char *l64a(long " value ); -.sp .SH DESCRIPTION These functions provide a conversion between 32-bit long integers and little-endian base-64 ASCII strings (of length zero to six). @@ -30,14 +29,15 @@ sign-extends its 32-bit result. The 64 digits in the base 64 system are: .RS .nf + \&'.' represents a 0 \&'/' represents a 1 0-9 represent 2-11 A-Z represent 12-37 a-z represent 38-63 + .fi .RE -.br So 123 = 59*64^0 + 1*64^1 = "v/". .SH NOTES The value returned by diff --git a/man3/aio_read.3 b/man3/aio_read.3 index c48688c42..bb0eab7de 100644 --- a/man3/aio_read.3 +++ b/man3/aio_read.3 @@ -102,7 +102,6 @@ The buffer area being read into .\" or the control block of the operation must not be accessed during the operation or undefined results may occur. The memory areas involved must remain valid. - .SH "CONFORMING TO" POSIX.1-2001 .SH "SEE ALSO" diff --git a/man3/aio_write.3 b/man3/aio_write.3 index 3e589e455..c543a20fa 100644 --- a/man3/aio_write.3 +++ b/man3/aio_write.3 @@ -95,7 +95,6 @@ are invalid. .TP .B ENOSYS This function is not supported. - .SH NOTES It is a good idea to zero out the control block before use. This control block must not be changed while the write operation @@ -104,7 +103,6 @@ The buffer area being written out .\" or the control block of the operation must not be accessed during the operation or undefined results may occur. The memory areas involved must remain valid. - .SH "CONFORMING TO" POSIX.1-2001 .SH "SEE ALSO" diff --git a/man3/atexit.3 b/man3/atexit.3 index a85012572..7fa1ed9e0 100644 --- a/man3/atexit.3 +++ b/man3/atexit.3 @@ -66,23 +66,27 @@ it returns a non-zero value. #include #include -void bye(void) { - printf("That was all, folks\en"); +void +bye(void) +{ + printf("That was all, folks\en"); } -int main(){ - long a; - int i; +int +main(void) +{ + long a; + int i; - a = sysconf(_SC_ATEXIT_MAX); - printf("ATEXIT_MAX = %ld\en", a); + a = sysconf(_SC_ATEXIT_MAX); + printf("ATEXIT_MAX = %ld\en", a); - i = atexit(bye); - if (i != 0) { - fprintf(stderr, "cannot set exit function\en"); - return EXIT_FAILURE; - } - return EXIT_SUCCESS; + i = atexit(bye); + if (i != 0) { + fprintf(stderr, "cannot set exit function\en"); + return EXIT_FAILURE; + } + return EXIT_SUCCESS; } .fi .SH NOTES diff --git a/man3/canonicalize_file_name.3 b/man3/canonicalize_file_name.3 index bd2b49341..53f912644 100644 --- a/man3/canonicalize_file_name.3 +++ b/man3/canonicalize_file_name.3 @@ -17,7 +17,6 @@ The call .I canonicalize_file_name(path) is equivalent to the call .IR "realpath(path,\ NULL)" . - .SH "CONFORMING TO" The function is a GNU extension. .SH "SEE ALSO" diff --git a/man3/catopen.3 b/man3/catopen.3 index 68a870b6b..92e9a5da8 100644 --- a/man3/catopen.3 +++ b/man3/catopen.3 @@ -103,7 +103,6 @@ closes the message catalog identified by It invalidates any subsequent references to the message catalog defined by .IR catalog . -.LP .SH "RETURN VALUE" The function .BR catopen () diff --git a/man3/cfree.3 b/man3/cfree.3 index d587895d4..7b137cc50 100644 --- a/man3/cfree.3 +++ b/man3/cfree.3 @@ -56,7 +56,6 @@ The declaration is sometimes in .I and sometimes in .IR . -.LP .SS "3-arg cfree" Some SCO and Solaris versions have malloc libraries with a 3-argument .BR cfree (), diff --git a/man3/clearenv.3 b/man3/clearenv.3 index d96b04759..c2a97eba5 100644 --- a/man3/clearenv.3 +++ b/man3/clearenv.3 @@ -35,16 +35,13 @@ The \fBclearenv\fP() function clears the environment of all name-value pairs and sets the value of the external variable .I environ to NULL. - .SH "RETURN VALUE" The \fBclearenv\fP() function returns zero on success, and a non-zero value on failure. .\" Most versions of Unix return -1 on error, or do not even have errors. .\" Glibc info and the Watcom C library document "a non-zero value". - .SH AVAILABILITY Not in libc4, libc5. In glibc since glibc 2.0. - .SH "CONFORMING TO" Various Unix variants (DG/UX, HP-UX, QNX, ...). POSIX.9 (bindings for FORTRAN77). @@ -53,7 +50,6 @@ but changed its mind and scheduled these functions for some later issue of this standard (cf. B.4.6.1). However, POSIX.1-2001 only adds \fIputenv\fP(), and rejected \fBclearenv\fP(). - .SH NOTES Used in security-conscious applications. If it is unavailable the assignment diff --git a/man3/cmsg.3 b/man3/cmsg.3 index 3d073897f..65c6ad261 100644 --- a/man3/cmsg.3 +++ b/man3/cmsg.3 @@ -9,8 +9,7 @@ CMSG_ALIGN, CMSG_SPACE, CMSG_NXTHDR, CMSG_FIRSTHDR \- Access ancillary data .SH SYNOPSIS .B #include -.br -.sp 2 +.sp .BI "struct cmsghdr *CMSG_FIRSTHDR(struct msghdr *" msgh ); .br .BI "struct cmsghdr *CMSG_NXTHDR(struct msghdr *" msgh ", struct cmsghdr *" cmsg ); @@ -24,14 +23,12 @@ CMSG_ALIGN, CMSG_SPACE, CMSG_NXTHDR, CMSG_FIRSTHDR \- Access ancillary data .BI "unsigned char *CMSG_DATA(struct cmsghdr *" cmsg ); .sp .nf -.ta 8n 20n 32n struct cmsghdr { - socklen_t cmsg_len; /* data byte count, including header */ - int cmsg_level; /* originating protocol */ - int cmsg_type; /* protocol-specific type */ -/* followed by unsigned char cmsg_data[]; */ + socklen_t cmsg_len; /* data byte count, including header */ + int cmsg_level; /* originating protocol */ + int cmsg_type; /* protocol-specific type */ + /* followed by unsigned char cmsg_data[]; */ }; -.ta .fi .SH DESCRIPTION These macros are used to create and access control messages (also called diff --git a/man3/des_crypt.3 b/man3/des_crypt.3 index fa5d83752..30221f175 100644 --- a/man3/des_crypt.3 +++ b/man3/des_crypt.3 @@ -95,7 +95,6 @@ the parameter is the 8-byte initialization vector for the chaining. It is updated to the next initialization vector upon return. -.LP .SH "SEE ALSO" .BR des (1), .BR crypt (3) @@ -125,7 +124,6 @@ the macro .\" .BR ( stat ) .BI DES_FAILED( stat ) is false only for the first two statuses. - .\" So far the Sun page .\" Some additions - aeb .SH AVAILABILITY diff --git a/man3/dlopen.3 b/man3/dlopen.3 index 9224a39ba..90aa72cf6 100644 --- a/man3/dlopen.3 +++ b/man3/dlopen.3 @@ -345,7 +345,6 @@ The function does the same as .BR dlsym () but takes a version string as an additional argument. - .SH EXAMPLE Load the math library, and print the cosine of 2.0: .RS @@ -356,14 +355,16 @@ Load the math library, and print the cosine of 2.0: #include #include -int main(int argc, char **argv) { +int +main(int argc, char **argv) +{ void *handle; double (*cosine)(double); char *error; - handle = dlopen ("libm.so", RTLD_LAZY); + handle = dlopen("libm.so", RTLD_LAZY); if (!handle) { - fprintf (stderr, "%s\en", dlerror()); + fprintf(stderr, "%s\en", dlerror()); exit(1); } @@ -372,11 +373,11 @@ int main(int argc, char **argv) { .\" the dlsym() casting problem *(void **) (&cosine) = dlsym(handle, "cos"); if ((error = dlerror()) != NULL) { - fprintf (stderr, "%s\en", error); + fprintf(stderr, "%s\en", error); exit(1); } - printf ("%f\en", (*cosine)(2.0)); + printf("%f\en", (*cosine)(2.0)); dlclose(handle); return 0; } diff --git a/man3/dysize.3 b/man3/dysize.3 index 6f19fbd63..dec17b887 100644 --- a/man3/dysize.3 +++ b/man3/dysize.3 @@ -31,7 +31,6 @@ dysize \- get number of days for a given year .BR "#include " .sp .BI "int dysize(int " year ); -.sp .SH DESCRIPTION The function returns 365 for a normal year and 366 for a leap year. The calculation for leap year is based on: diff --git a/man3/encrypt.3 b/man3/encrypt.3 index d0d45c780..ba5e52bda 100644 --- a/man3/encrypt.3 +++ b/man3/encrypt.3 @@ -118,12 +118,15 @@ and .nf #include -main() { - char key[64]; /* bit pattern for key */ - char txt[64]; /* bit pattern for messages */ - setkey(key); - encrypt(txt, 0); /* encode */ - encrypt(txt, 1); /* decode */ +int +main(void) +{ + char key[64]; /* bit pattern for key */ + char txt[64]; /* bit pattern for messages */ + + setkey(key); + encrypt(txt, 0); /* encode */ + encrypt(txt, 1); /* decode */ } .fi .SH "NOTE" diff --git a/man3/envz_add.3 b/man3/envz_add.3 index 4970f56bd..7da54cd05 100644 --- a/man3/envz_add.3 +++ b/man3/envz_add.3 @@ -33,7 +33,6 @@ envz_remove, envz_strip \- environment string support .sp .BI "void" .BI "envz_strip(char **" envz ", size_t *" envz_len ); -.sp .SH DESCRIPTION These functions are glibc-specific. .LP @@ -117,19 +116,21 @@ if an allocation error occurs. .nf #include #include + int -main(int argc, char *argv[], char *envp[]) { - int i, e_len = 0; - char *str; +main(int argc, char *argv[], char *envp[]) +{ + int i, e_len = 0; + char *str; - for (i=0; envp[i] != NULL; i++) - e_len += strlen(envp[i]) + 1; + for (i=0; envp[i] != NULL; i++) + e_len += strlen(envp[i]) + 1; - str = envz_entry(*envp, e_len, "HOME"); - printf("%s\en", str); - str = envz_get(*envp, e_len, "HOME"); - printf("%s\en", str); - return 0; + str = envz_entry(*envp, e_len, "HOME"); + printf("%s\en", str); + str = envz_get(*envp, e_len, "HOME"); + printf("%s\en", str); + return 0; } .fi .SH "CONFORMING TO" diff --git a/man3/finite.3 b/man3/finite.3 index 80182fd6a..208ee3cbf 100644 --- a/man3/finite.3 +++ b/man3/finite.3 @@ -63,7 +63,6 @@ The .BR isinf () functions return 1 if \fIx\fP is plus infinity, \-1 is \fIx\fP is minus infinity, and 0 otherwise. - .SH NOTE Note that these functions are obsolete. C99 defines macros isfinite(), isinf() and isnan() (for all types) replacing them. diff --git a/man3/fmemopen.3 b/man3/fmemopen.3 index ebf4c08d5..d28aaaeb8 100644 --- a/man3/fmemopen.3 +++ b/man3/fmemopen.3 @@ -141,7 +141,6 @@ pointer. Otherwise, NULL is returned and the global variable .I errno is set to indicate the error. - .SH "EXAMPLE" The program below uses .BR fmemopen () @@ -163,7 +162,8 @@ size=11; ptr=1 529 1849 #include #include -int main(int argc, char *argv[]) +int +main(int argc, char *argv[]) { FILE *out, *in; int v, s; @@ -193,7 +193,6 @@ int main(int argc, char *argv[]) exit(EXIT_SUCCESS); } .fi -.sp .SH "CONFORMING TO" These functions are GNU extensions. .\" Jan 06: But they appear to be going up for standardization by diff --git a/man3/fmtmsg.3 b/man3/fmtmsg.3 index d21e6a90d..312ae556c 100644 --- a/man3/fmtmsg.3 +++ b/man3/fmtmsg.3 @@ -11,7 +11,6 @@ fmtmsg \- print formatted error messages .SH SYNOPSIS .nf -.sp .B #include .sp .BI "int fmtmsg(long " classification ", const char *" label , @@ -19,7 +18,6 @@ fmtmsg \- print formatted error messages .BI " int " severity ", const char *" text , .br .BI " const char *" action ", const char *" tag ); -.sp .fi .SH DESCRIPTION This function displays a message described by its parameters on the device(s) @@ -231,27 +229,30 @@ vpfmt(), lfmt(), and vlfmt()", and will be removed later. #include #include -int main() { - long class = MM_PRINT | MM_SOFT | MM_OPSYS | MM_RECOVER; - int err; - err = fmtmsg(class, "util-linux:mount", MM_ERROR, - "unknown mount option", "See mount(8).", "util-linux:mount:017"); - switch(err) { +int +main(void) +{ + long class = MM_PRINT | MM_SOFT | MM_OPSYS | MM_RECOVER; + int err; + err = fmtmsg(class, "util-linux:mount", MM_ERROR, + "unknown mount option", "See mount(8).", + "util-linux:mount:017"); + switch(err) { case MM_OK: - break; + break; case MM_NOTOK: - printf("Nothing printed\en"); - break; + printf("Nothing printed\en"); + break; case MM_NOMSG: - printf("Nothing printed to stderr\en"); - break; + printf("Nothing printed to stderr\en"); + break; case MM_NOCON: - printf("No console output\en"); - break; + printf("No console output\en"); + break; default: - printf("Unknown error from fmtmsg()\en"); - } - return 0; + printf("Unknown error from fmtmsg()\en"); + } + return 0; } .fi .PP diff --git a/man3/gamma.3 b/man3/gamma.3 index b51a08e4d..915d46adb 100644 --- a/man3/gamma.3 +++ b/man3/gamma.3 @@ -19,7 +19,6 @@ Link with \-lm. .SH DESCRIPTION For the definition of the Gamma function, see .BR tgamma (3). -.PP .SS "*BSD version" 4.4BSD and FreeBSD libm have a .BR gamma () diff --git a/man3/getdate.3 b/man3/getdate.3 index 4074ca0de..03667c853 100644 --- a/man3/getdate.3 +++ b/man3/getdate.3 @@ -24,7 +24,6 @@ .TH GETDATE 3 2001-12-26 "" "Linux Programmer's Manual" .SH NAME getdate \- convert a string to struct tm -.br .SH SYNOPSIS .B "#define _XOPEN_SOURCE" .br @@ -35,13 +34,12 @@ getdate \- convert a string to struct tm .BI "struct tm *getdate(const char *" string ); .sp .BI "extern int getdate_err;" -.sp 2 +.sp .B "#define _GNU_SOURCE" .br .B "#include " .sp .BI "int getdate_r (const char *" string ", struct tm *" res ); -.br .SH DESCRIPTION The function .BR getdate () diff --git a/man3/getfsent.3 b/man3/getfsent.3 index 5bf496ed4..5e61876d4 100644 --- a/man3/getfsent.3 +++ b/man3/getfsent.3 @@ -123,7 +123,6 @@ and .BR getfsspec () only return the first occurrence, these two functions are not suitable for use under Linux. -.LP .SH "SEE ALSO" .BR getmntent (3), .BR fstab (5) diff --git a/man3/getgrent_r.3 b/man3/getgrent_r.3 index 84d603c42..01d1a226e 100644 --- a/man3/getgrent_r.3 +++ b/man3/getgrent_r.3 @@ -58,10 +58,10 @@ as follows: .RS .nf struct group { - char *gr_name; /* group name */ - char *gr_passwd; /* group password */ - gid_t gr_gid; /* group ID */ - char **gr_mem; /* group members */ + char *gr_name; /* group name */ + char *gr_passwd; /* group password */ + gid_t gr_gid; /* group ID */ + char **gr_mem; /* group members */ }; .ta .fi @@ -104,26 +104,28 @@ Insufficient buffer space supplied. Try again with larger buffer. #include #define BUFLEN 4096 -int main() { - struct group grp, *grpp; - char buf[BUFLEN]; - int i; +int +main(void) +{ + struct group grp, *grpp; + char buf[BUFLEN]; + int i; - setgrent(); - while (1) { - i = getgrent_r(&grp, buf, BUFLEN, &grpp); - if (i) - break; - printf("%s (%d):", grpp->gr_name, grpp->gr_gid); - for (i = 0; ; i++) { - if (grpp->gr_mem[i] == NULL) - break; - printf(" %s", grpp->gr_mem[i]); - } - printf("\en"); - } - endgrent(); - return 0; + setgrent(); + while (1) { + i = getgrent_r(&grp, buf, BUFLEN, &grpp); + if (i) + break; + printf("%s (%d):", grpp->gr_name, grpp->gr_gid); + for (i = 0; ; i++) { + if (grpp->gr_mem[i] == NULL) + break; + printf(" %s", grpp->gr_mem[i]); + } + printf("\en"); + } + endgrent(); + return 0; } .fi .\" perhaps add error checking - should use strerror_r @@ -157,7 +159,6 @@ getgrent_r(struct group *grp, char *buf, int buflen, FILE **gr_fp); .in .fi -.sp .SH NOTES The function .BR getgrent_r () diff --git a/man3/getgrouplist.3 b/man3/getgrouplist.3 index f7041545d..c5d838293 100644 --- a/man3/getgrouplist.3 +++ b/man3/getgrouplist.3 @@ -51,23 +51,26 @@ This function is present since glibc 2.2.4. #include #include -int main() { - int i, ng = 0; - char *user = "who"; /* username here */ - gid_t *groups = NULL; - struct passwd *pw = getpwnam(user); - if (pw == NULL) - return 0; - - if (getgrouplist(user, pw->pw_gid, NULL, &ng) < 0) { - groups = (gid_t *) malloc(ng * sizeof (gid_t)); - getgrouplist(user, pw->pw_gid, groups, &ng); - } - - for(i = 0; i < ng; i++) - printf("%d\en", groups[i]); +int +main(void) +{ + int i, ng = 0; + char *user = "who"; /* username here */ + gid_t *groups = NULL; + struct passwd *pw = getpwnam(user); + if (pw == NULL) return 0; + + if (getgrouplist(user, pw->pw_gid, NULL, &ng) < 0) { + groups = (gid_t *) malloc(ng * sizeof (gid_t)); + getgrouplist(user, pw->pw_gid, groups, &ng); + } + + for(i = 0; i < ng; i++) + printf("%d\en", groups[i]); + + return 0; } .fi .SH "SEE ALSO" diff --git a/man3/getline.3 b/man3/getline.3 index cd69eafc5..68635756e 100644 --- a/man3/getline.3 +++ b/man3/getline.3 @@ -105,22 +105,23 @@ is not valid). #include #include -int main(void) +int +main(void) { - FILE * fp; - char * line = NULL; - size_t len = 0; - ssize_t read; - fp = fopen("/etc/motd", "r"); - if (fp == NULL) - exit(EXIT_FAILURE); - while ((read = getline(&line, &len, fp)) != \-1) { - printf("Retrieved line of length %zu :\en", read); - printf("%s", line); - } - if (line) - free(line); - return EXIT_SUCCESS; + FILE * fp; + char * line = NULL; + size_t len = 0; + ssize_t read; + fp = fopen("/etc/motd", "r"); + if (fp == NULL) + exit(EXIT_FAILURE); + while ((read = getline(&line, &len, fp)) != \-1) { + printf("Retrieved line of length %zu :\en", read); + printf("%s", line); + } + if (line) + free(line); + return EXIT_SUCCESS; } .fi .SH "CONFORMING TO" diff --git a/man3/getopt.3 b/man3/getopt.3 index 565b8238b..4d9f6c353 100644 --- a/man3/getopt.3 +++ b/man3/getopt.3 @@ -313,7 +313,7 @@ with most of its features. #include int -main (int argc, char **argv) { +main(int argc, char **argv) { int c; int digit_optind = 0; @@ -330,60 +330,60 @@ main (int argc, char **argv) { {0, 0, 0, 0} }; - c = getopt_long (argc, argv, "abc:d:012", + c = getopt_long(argc, argv, "abc:d:012", long_options, &option_index); if (c == \-1) break; switch (c) { case 0: - printf ("option %s", long_options[option_index].name); + printf("option %s", long_options[option_index].name); if (optarg) - printf (" with arg %s", optarg); - printf ("\\n"); + printf(" with arg %s", optarg); + printf("\\n"); break; case '0': case '1': case '2': if (digit_optind != 0 && digit_optind != this_option_optind) - printf ("digits occur in two different argv-elements.\\n"); + printf("digits occur in two different argv-elements.\\n"); digit_optind = this_option_optind; - printf ("option %c\\n", c); + printf("option %c\\n", c); break; case 'a': - printf ("option a\\n"); + printf("option a\\n"); break; case 'b': - printf ("option b\\n"); + printf("option b\\n"); break; case 'c': - printf ("option c with value '%s'\\n", optarg); + printf("option c with value '%s'\\n", optarg); break; case 'd': - printf ("option d with value '%s'\\n", optarg); + printf("option d with value '%s'\\n", optarg); break; case '?': break; default: - printf ("?? getopt returned character code 0%o ??\\n", c); + printf("?? getopt returned character code 0%o ??\\n", c); } } if (optind < argc) { - printf ("non-option ARGV-elements: "); + printf("non-option ARGV-elements: "); while (optind < argc) - printf ("%s ", argv[optind++]); - printf ("\\n"); + printf("%s ", argv[optind++]); + printf("\\n"); } - exit (0); + exit(0); } .fi .SH BUGS diff --git a/man3/getpt.3 b/man3/getpt.3 index ac89c2111..fbc6c6854 100644 --- a/man3/getpt.3 +++ b/man3/getpt.3 @@ -18,7 +18,6 @@ It is equivalent to .BI "open(" \fI"/dev/ptmx" , O_RDWR|O_NOCTTY ) on Linux systems, though the pseudo-terminal master is located elsewhere on some systems that use GNU Libc. - .SH "RETURN VALUE" .BR getpt () returns an open file descriptor upon successful completion. Otherwise, it diff --git a/man3/getpwent_r.3 b/man3/getpwent_r.3 index abd4aeac7..70b764e8a 100644 --- a/man3/getpwent_r.3 +++ b/man3/getpwent_r.3 @@ -58,13 +58,13 @@ as follows: .RS .nf struct passwd { - char *pw_name; /* user name */ - char *pw_passwd; /* user password */ - uid_t pw_uid; /* user ID */ - gid_t pw_gid; /* group ID */ - char *pw_gecos; /* real name */ - char *pw_dir; /* home directory */ - char *pw_shell; /* shell program */ + char *pw_name; /* user name */ + char *pw_passwd; /* user password */ + uid_t pw_uid; /* user ID */ + gid_t pw_gid; /* group ID */ + char *pw_gecos; /* real name */ + char *pw_dir; /* home directory */ + char *pw_shell; /* shell program */ }; .fi .RE @@ -106,22 +106,23 @@ Insufficient buffer space supplied. Try again with larger buffer. #include #define BUFLEN 4096 -int main() { - struct passwd pw, *pwp; - char buf[BUFLEN]; - int i; +int +main(void) +{ + struct passwd pw, *pwp; + char buf[BUFLEN]; + int i; - setpwent(); - while (1) { - i = getpwent_r(&pw, buf, BUFLEN, &pwp); - if (i) - break; - printf("%s (%d)\etHOME %s\etSHELL %s\en", - pwp->pw_name, pwp->pw_uid, - pwp->pw_dir, pwp->pw_shell); - } - endpwent(); - return 0; + setpwent(); + while (1) { + i = getpwent_r(&pw, buf, BUFLEN, &pwp); + if (i) + break; + printf("%s (%d)\etHOME %s\etSHELL %s\en", pwp->pw_name, + pwp->pw_uid, pwp->pw_dir, pwp->pw_shell); + } + endpwent(); + return 0; } .fi .\" perhaps add error checking - should use strerror_r @@ -155,7 +156,6 @@ getpwent_r(struct passwd *pwd, char *buf, int buflen, FILE **pw_fp); .in .fi -.sp .SH NOTES The function .BR getpwent_r () diff --git a/man3/getrpcent.3 b/man3/getrpcent.3 index 342f94f39..aec459c33 100644 --- a/man3/getrpcent.3 +++ b/man3/getrpcent.3 @@ -21,11 +21,11 @@ struct rpcent *getrpcbynumber(number) int number; .LP .ft B -setrpcent (stayopen) +setrpcent(stayopen) int stayopen; .LP .ft B -endrpcent () +endrpcent() .fi .SH DESCRIPTION .LP diff --git a/man3/getspnam.3 b/man3/getspnam.3 index 0eca3bb08..69b0f70b3 100644 --- a/man3/getspnam.3 +++ b/man3/getspnam.3 @@ -53,7 +53,6 @@ lckpwdf, ulckpwdf \- get shadow password file entry .BI "int sgetspent_r(const char *" s ", struct spwd *" spbuf , .br .BI " char *" buf ", size_t " buflen ", struct spwd **" spbufp ); -.sp .fi .SH DESCRIPTION Long ago it was considered safe to have encrypted passwords openly diff --git a/man3/getttyent.3 b/man3/getttyent.3 index 94647e3e8..3e93fd1d6 100644 --- a/man3/getttyent.3 +++ b/man3/getttyent.3 @@ -38,7 +38,6 @@ The function .BR getttyent () opens the file _PATH_TTYS (if necessary) and returns the first entry. If the file is already open, the next entry. - .SS "The ttyent structure" .nf struct ttyent { diff --git a/man3/getutent.3 b/man3/getutent.3 index 130a81893..bd1195d2e 100644 --- a/man3/getutent.3 +++ b/man3/getutent.3 @@ -122,37 +122,38 @@ and #include #include -int main(int argc, char *argv[]) +int +main(int argc, char *argv[]) { - struct utmp entry; + struct utmp entry; - system("echo before adding entry:;who"); + system("echo before adding entry:;who"); - entry.ut_type=USER_PROCESS; - entry.ut_pid=getpid(); - strcpy(entry.ut_line,ttyname(0)+strlen("/dev/")); - /* only correct for ptys named /dev/tty[pqr][0\-9a\-z] */ - strcpy(entry.ut_id,ttyname(0)+strlen("/dev/tty")); - time(&entry.ut_time); - strcpy(entry.ut_user,getpwuid(getuid())\->pw_name); - memset(entry.ut_host,0,UT_HOSTSIZE); - entry.ut_addr=0; - setutent(); - pututline(&entry); + entry.ut_type=USER_PROCESS; + entry.ut_pid=getpid(); + strcpy(entry.ut_line,ttyname(0)+strlen("/dev/")); + /* only correct for ptys named /dev/tty[pqr][0\-9a\-z] */ + strcpy(entry.ut_id,ttyname(0)+strlen("/dev/tty")); + time(&entry.ut_time); + strcpy(entry.ut_user,getpwuid(getuid())\->pw_name); + memset(entry.ut_host,0,UT_HOSTSIZE); + entry.ut_addr=0; + setutent(); + pututline(&entry); - system("echo after adding entry:;who"); + system("echo after adding entry:;who"); - entry.ut_type=DEAD_PROCESS; - memset(entry.ut_line,0,UT_LINESIZE); - entry.ut_time=0; - memset(entry.ut_user,0,UT_NAMESIZE); - setutent(); - pututline(&entry); + entry.ut_type=DEAD_PROCESS; + memset(entry.ut_line,0,UT_LINESIZE); + entry.ut_time=0; + memset(entry.ut_user,0,UT_NAMESIZE); + setutent(); + pututline(&entry); - system("echo after removing entry:;who"); + system("echo after removing entry:;who"); - endutent(); - return 0; + endutent(); + return 0; } .fi .SH FILES diff --git a/man3/getw.3 b/man3/getw.3 index a50e5f125..b24cfd38d 100644 --- a/man3/getw.3 +++ b/man3/getw.3 @@ -30,7 +30,6 @@ getw, putw \- input and output of words (ints) .BI "int getw(FILE *" stream ); .br .BI "int putw(int " w ", FILE *" stream ); -.br .SH DESCRIPTION \fBgetw\fP() reads a word (that is, an \fIint\fP) from \fIstream\fP. It's provided for compatibility with SVr4. We recommend you use diff --git a/man3/hsearch.3 b/man3/hsearch.3 index e978bcbbf..8668e75c1 100644 --- a/man3/hsearch.3 +++ b/man3/hsearch.3 @@ -39,7 +39,7 @@ hcreate, hdestroy, hsearch \- hash table management .BI "ENTRY *hsearch(ENTRY " item ", ACTION " action ); .sp .B "void hdestroy(void);" -.sp 2 +.sp .B #define _GNU_SOURCE .br .B #include @@ -150,47 +150,45 @@ The following program inserts 24 items in to a hash table, then prints some of them. .nf - #include - #include - #include +#include +#include +#include - char *data[] = { "alpha", "bravo", "charlie", "delta", - "echo", "foxtrot", "golf", "hotel", "india", "juliet", - "kilo", "lima", "mike", "november", "oscar", "papa", - "quebec", "romeo", "sierra", "tango", "uniform", - "victor", "whisky", "x-ray", "yankee", "zulu" - }; +char *data[] = { "alpha", "bravo", "charlie", "delta", + "echo", "foxtrot", "golf", "hotel", "india", "juliet", + "kilo", "lima", "mike", "november", "oscar", "papa", + "quebec", "romeo", "sierra", "tango", "uniform", + "victor", "whisky", "x-ray", "yankee", "zulu" +}; - int main() { - ENTRY e, *ep; - int i; +int main() { + ENTRY e, *ep; + int i; - /* starting with small table, and letting it grow does not work */ - hcreate(30); - for (i = 0; i < 24; i++) { - e.key = data[i]; - /* data is just an integer, instead of a - pointer to something */ - e.data = (void *)i; - ep = hsearch(e, ENTER); - /* there should be no failures */ - if (ep == NULL) { + /* starting with small table, and letting it grow does not work */ + hcreate(30); + for (i = 0; i < 24; i++) { + e.key = data[i]; + /* data is just an integer, instead of a + pointer to something */ + e.data = (void *)i; + ep = hsearch(e, ENTER); + /* there should be no failures */ + if (ep == NULL) { fprintf(stderr, "entry failed\\n"); exit(1); - } - } - for (i = 22; i < 26; i++) { - /* print two entries from the table, and - show that two are not in the table */ - e.key = data[i]; - ep = hsearch(e, FIND); - printf("%9.9s \-> %9.9s:%d\\n", e.key, - ep ? ep\->key : "NULL", - ep ? (int)(ep->data) : 0); - } - return 0; + } } - + for (i = 22; i < 26; i++) { + /* print two entries from the table, and + show that two are not in the table */ + e.key = data[i]; + ep = hsearch(e, FIND); + printf("%9.9s \-> %9.9s:%d\\n", e.key, + ep ? ep\->key : "NULL", ep ? (int)(ep->data) : 0); + } + return 0; +} .fi .SH "SEE ALSO" .BR bsearch (3), diff --git a/man3/inet.3 b/man3/inet.3 index b1ac003bb..6cdde291c 100644 --- a/man3/inet.3 +++ b/man3/inet.3 @@ -70,7 +70,6 @@ immediately above; it is obsolete because \-1 is a valid address (255.255.255.255), and \fBinet_aton\fP() provides a cleaner way to indicate error return. .PP - The \fBinet_network\fP() function extracts a number in host byte order suitable for use as an Internet address from \fIcp\fP, which is a string in numbers-and-dots notation. @@ -100,12 +99,9 @@ is defined in \fInetinet/in.h\fP as: .sp .RS .nf -.ne 7 -.ta 8n 16n struct in_addr { - unsigned long int s_addr; + unsigned long int s_addr; } -.ta .fi .RE .PP diff --git a/man3/key_setsecret.3 b/man3/key_setsecret.3 index 54a5b2791..14dc99887 100644 --- a/man3/key_setsecret.3 +++ b/man3/key_setsecret.3 @@ -21,7 +21,6 @@ key_secretkey_is_set \- interfaces to rpc keyserver daemon .BI "int key_setsecret(const char *" key ); .sp .B "int key_secretkey_is_set(void);" -.sp .SH DESCRIPTION The functions here are used within the RPC's secure authentication mechanism (AUTH_DES). There should be no need for user programs to @@ -52,16 +51,13 @@ The function .BR key_secretkey_is_set () can be used to determine whether a key has been set for the effective UID of the calling process. - .SH NOTE Note that we talk about two types of encryption here. One is asymmetric using a public and secret key. The other is symmetric, the 64-bit DES. .br The routines were part of the linux/doors-project, abandoned by now. - .SH "RETURN VALUES" The functions return 1 on success and 0 on failure. - .SH "SEE ALSO" .BR crypt (3) diff --git a/man3/lseek64.3 b/man3/lseek64.3 index 9668ef11b..c0e507885 100644 --- a/man3/lseek64.3 +++ b/man3/lseek64.3 @@ -81,7 +81,6 @@ compiles with .sp .fi in which case it is a 64-bit signed type. - .SS lseek64 Prototype: .nf @@ -110,7 +109,6 @@ The function .\" in glibc 2.0.94, not in 2.0.6 is available since glibc 2.1, and is defined to be an alias for .BR llseek (). - .SS llseek Prototype: .nf @@ -142,7 +140,6 @@ glibc 2.1.3 added the link-time warning .sp This makes this function unusable if one desires a warning-free compilation. - .SS _llseek All the above functions are implemented in terms of this system call. The prototype is: diff --git a/man3/malloc_hook.3 b/man3/malloc_hook.3 index 1286dbb51..4e20eb8d7 100644 --- a/man3/malloc_hook.3 +++ b/man3/malloc_hook.3 @@ -91,27 +91,29 @@ static void *(*old_malloc_hook)(size_t, const void *); void (*__malloc_initialize_hook) (void) = my_init_hook; static void -my_init_hook(void) { +my_init_hook(void) +{ old_malloc_hook = __malloc_hook; __malloc_hook = my_malloc_hook; } static void * -my_malloc_hook (size_t size, const void *caller) { +my_malloc_hook(size_t size, const void *caller) +{ void *result; /* Restore all old hooks */ __malloc_hook = old_malloc_hook; /* Call recursively */ - result = malloc (size); + result = malloc(size); /* Save underlying hooks */ old_malloc_hook = __malloc_hook; /* `printf' might call `malloc', so protect it too. */ - printf ("malloc(%u) called from %p returns %p\\n", - (unsigned int) size, caller, result); + printf("malloc(%u) called from %p returns %p\\n", + (unsigned int) size, caller, result); /* Restore our own hooks */ __malloc_hook = my_malloc_hook; diff --git a/man3/mkdtemp.3 b/man3/mkdtemp.3 index e9b4e0e07..31b087bf0 100644 --- a/man3/mkdtemp.3 +++ b/man3/mkdtemp.3 @@ -49,10 +49,8 @@ is set appropriately. .B EINVAL The last six characters of \fItemplate\fP were not XXXXXX. Now \fItemplate\fP is unchanged. - -.TP +.PP Also see \fBmkdir(2)\fP for other possible values for \fIerrno\fP. - .SH "CONFORMING TO" This funtion is present on the BSDs. .\" As at 2006, this function is being considered for a revision of POSIX.1 diff --git a/man3/netlink.3 b/man3/netlink.3 index 625971c65..76fc90f96 100644 --- a/man3/netlink.3 +++ b/man3/netlink.3 @@ -33,7 +33,6 @@ They are similar in spirit to the macros defined in for auxiliary data. The buffer passed to and from a netlink socket should be only accessed using these macros. .TP -.TP NLMSG_ALIGN Round the length of a netlink message up to align it properly. .TP @@ -43,7 +42,6 @@ in the .B nlmsg_len field of the .IR nlmsghdr . - .TP NLMSG_SPACE Return the number of bytes a netlink message with payload of the passed length @@ -70,12 +68,10 @@ Return true if the netlink message is not truncated and ok to parse. NLMSG_PAYLOAD Return the length of the payload associated with the .IR nlmsghdr . - .SH NOTES It is often better to use netlink via .B libnetlink than via the low level kernel interface. - .SH "SEE ALSO" .BR netlink (7) .PP diff --git a/man3/nl_langinfo.3 b/man3/nl_langinfo.3 index c6454b269..75807c551 100644 --- a/man3/nl_langinfo.3 +++ b/man3/nl_langinfo.3 @@ -29,7 +29,6 @@ be queried. .PP Examples for the locale elements that can be specified in \fIitem\fP using the constants defined in are: - .TP .BR CODESET \ (LC_CTYPE) Return a string with the name of the character encoding used in the @@ -38,63 +37,51 @@ selected locale, such as "UTF-8", "ISO-8859-1", or "ANSI_X3.4-1968" "locale charmap". For a list of character encoding names, try "locale \-m", cf.\& .BR locale (1). - .TP .BR D_T_FMT \ (LC_TIME) Return a string that can be used as a format string for .BR strftime (3) to represent time and date in a locale-specific way. - .TP .BR D_FMT \ (LC_TIME) Return a string that can be used as a format string for .BR strftime (3) to represent a date in a locale-specific way. - .TP .BR T_FMT \ (LC_TIME) Return a string that can be used as a format string for .BR strftime (3) to represent a time in a locale-specific way. - .TP .BR DAY_ "{1\(en7} (LC_TIME)" Return name of the \fIn\fP-th day of the week. [Warning: this follows the US convention DAY_1 = Sunday, not the international convention (ISO 8601) that Monday is the first day of the week.] - .TP .BR ABDAY_ "{1\(en7} (LC_TIME)" Return abbreviated name of the \fIn\fP-th day of the week. - .TP .BR MON_ "{1\(en12} (LC_TIME)" Return name of the \fIn\fP-th month. - .TP .BR ABMON_ "{1\(en12} (LC_TIME)" Return abbreviated name of the \fIn\fP-th month. - .TP .BR RADIXCHAR \ (LC_NUMERIC) Return radix character (decimal dot, decimal comma, etc.). - .TP .BR THOUSEP \ (LC_NUMERIC) Return separator character for thousands (groups of three digits). - .TP .BR YESEXPR \ (LC_MESSAGES) Return a regular expression that can be used with the .BR regex (3) function to recognize a positive response to a yes/no question. - .TP .BR NOEXPR \ (LC_MESSAGES) Return a regular expression that can be used with the .BR regex (3) function to recognize a negative response to a yes/no question. - .TP .BR CRNCYSTR \ (LC_MONETARY) Return the currency symbol, preceded by "\-" if the symbol should diff --git a/man3/offsetof.3 b/man3/offsetof.3 index 72ad7fa6d..f7e8b6af7 100644 --- a/man3/offsetof.3 +++ b/man3/offsetof.3 @@ -62,7 +62,8 @@ options, the program below produces the following output: #include #include -int main() +int +main(void) { struct s { int i; diff --git a/man3/perror.3 b/man3/perror.3 index 2ecf4cafd..084f88d08 100644 --- a/man3/perror.3 +++ b/man3/perror.3 @@ -93,7 +93,6 @@ Thus, if a failing call is not immediately followed by a call to the value of .I errno should be saved. - .SH "CONFORMING TO" The function .BR perror () diff --git a/man3/posix_memalign.3 b/man3/posix_memalign.3 index d733645d6..4227c4c71 100644 --- a/man3/posix_memalign.3 +++ b/man3/posix_memalign.3 @@ -69,7 +69,6 @@ It is equivalent to .IR "memalign(sysconf(_SC_PAGESIZE),size)" . For all three routines, the memory is not zeroed. - .SH "RETURN VALUE" .BR memalign () and @@ -81,7 +80,6 @@ returns zero on success, or one of the error values listed in the next section on failure. Note that .IR errno is not set. - .SH "ERRORS" .TP .B EINVAL @@ -92,7 +90,6 @@ parameter was not a power of two, or was not a multiple of .TP .B ENOMEM There was insufficient memory to fulfill the allocation request. - .SH NOTES On many systems there are alignment restrictions, e.g. on buffers used for direct block device I/O. POSIX specifies the @@ -141,7 +138,6 @@ GNU libc .BR malloc () always returns 8-byte aligned memory addresses, so these routines are only needed if you require larger alignment values. - .SH AVAILABILITY The functions .BR memalign () @@ -151,7 +147,6 @@ have been available in all Linux libc libraries. The function .BR posix_memalign () is available since glibc 2.1.91. - .SH "CONFORMING TO" The function .BR valloc () @@ -165,7 +160,6 @@ appears in SunOS 4.1.3 but not in 4.4BSD. The function .BR posix_memalign () comes from POSIX.1d. - .SH HEADERS Everybody agrees that .BR posix_memalign () @@ -183,7 +177,6 @@ Libc4,5 and glibc declare it in and perhaps also in (namely, if _GNU_SOURCE is defined, or _BSD_SOURCE is defined, or, for glibc, if _XOPEN_SOURCE_EXTENDED is defined, or, equivalently, _XOPEN_SOURCE is defined to a value not less than 500). - .SH "SEE ALSO" .BR brk (2), .BR getpagesize (2), diff --git a/man3/printf.3 b/man3/printf.3 index 518ed72bf..256f3b20e 100644 --- a/man3/printf.3 +++ b/man3/printf.3 @@ -495,7 +495,6 @@ and .BR Lf , .BR Lg , .BR LG ). - .SS "The conversion specifier" A character that specifies the type of conversion to be applied. The conversion specifiers and their meanings are: @@ -706,7 +705,6 @@ No argument is required. .B % A `%' is written. No argument is converted. The complete conversion specification is `%%'. -.PP .SH EXAMPLE .br .if \w'\*(Pi'=0 .ds Pi pi @@ -768,13 +766,13 @@ make_message(const char *fmt, ...) { char *p, *np; va_list ap; - if ((p = malloc (size)) == NULL) + if ((p = malloc(size)) == NULL) return NULL; while (1) { /* Try to print in the allocated space. */ va_start(ap, fmt); - n = vsnprintf (p, size, fmt, ap); + n = vsnprintf(p, size, fmt, ap); va_end(ap); /* If that worked, return the string. */ if (n > \-1 && n < size) @@ -794,7 +792,6 @@ make_message(const char *fmt, ...) { } .fi .RE - .SH NOTES The glibc implementation of the functions .BR snprintf () @@ -930,7 +927,6 @@ call to write to memory and creating a security hole. .\" .PP .\" Some floating point conversions under early libc4 .\" caused memory leaks. - .SH "SEE ALSO" .BR printf (1), .BR asprintf (3), diff --git a/man3/puts.3 b/man3/puts.3 index 403194940..a473698cb 100644 --- a/man3/puts.3 +++ b/man3/puts.3 @@ -98,7 +98,6 @@ and return a non-negative number on success, or .B EOF on error. -.PP .SH "CONFORMING TO" C89, C99 .SH BUGS diff --git a/man3/realpath.3 b/man3/realpath.3 index 05c10d8df..a2b139b9a 100644 --- a/man3/realpath.3 +++ b/man3/realpath.3 @@ -156,7 +156,7 @@ A typical source fragment would be #ifdef PATH_MAX path_max = PATH_MAX; #else - path_max = pathconf (path, _PC_PATH_MAX); + path_max = pathconf(path, _PC_PATH_MAX); if (path_max <= 0) path_max = 4096; #endif diff --git a/man3/remquo.3 b/man3/remquo.3 index cf3e6a33a..e07122253 100644 --- a/man3/remquo.3 +++ b/man3/remquo.3 @@ -16,7 +16,6 @@ remquo, remquof, remquol \- remainder and part of quotient .BI "float remquof(float " x ", float " y ", int *" quo ); .br .BI "long double remquol(long double " x ", long double " y ", int *" quo ); -.sp .fi .SH DESCRIPTION These functions compute the remainder and part of the quotient @@ -40,7 +39,6 @@ and agrees with the quotient in at least the low order 3 bits. For example, remquo(29.0,3.0) returns \-1.0 and might store 2. Note that the actual quotient might not fit in an integer. - .\" A possible application of this function might be the computation .\" of sin(x). Compute remquo(x, pi/2, &quo) or so. .\" diff --git a/man3/resolver.3 b/man3/resolver.3 index 657494cd9..b68ec89b1 100644 --- a/man3/resolver.3 +++ b/man3/resolver.3 @@ -138,7 +138,6 @@ contained in the structure \fI_res\fP, which is defined in \fI\fP. The only field that is normally manipulated by the user is \fI_res.options\fP. This field can contain the bitwise ``or'' of the following options: -.sp .TP .B RES_INIT True if \fBres_init\fP() has been called. diff --git a/man3/rtime.3 b/man3/rtime.3 index 22522e41d..b9e4a99ce 100644 --- a/man3/rtime.3 +++ b/man3/rtime.3 @@ -68,17 +68,19 @@ The result is the localtime of the computer 'linux'. int use_tcp = 0; char *servername = "linux"; -int main() { +int +main(void) +{ struct sockaddr_in name; struct rpc_timeval time1 = {0,0}; struct rpc_timeval timeout = {1,0}; struct hostent *hent; int ret; - memset((char *)&name, 0, sizeof(name)); + memset((char *) &name, 0, sizeof(name)); sethostent(1); hent = gethostbyname(servername); - memcpy((char *)&name.sin_addr, hent->h_addr, hent->h_length); + memcpy((char *) &name.sin_addr, hent->h_addr, hent->h_length); ret = rtime(&name, &time1, use_tcp ? NULL : &timeout); if (ret < 0) @@ -106,7 +108,6 @@ and requires .I instead of .IR . - .SH "BUGS" .BR rtime () in glibc <= 2.2.5 does not work properly on 64bit machines. diff --git a/man3/rtnetlink.3 b/man3/rtnetlink.3 index 4fa90e453..b995e0892 100644 --- a/man3/rtnetlink.3 +++ b/man3/rtnetlink.3 @@ -103,7 +103,7 @@ Creating a rtnetlink message to set a MTU of a device. rta->rta_len = sizeof(unsigned int); req.n.nlmsg_len = NLMSG_ALIGN(req.n.nlmsg_len) + RTA_LENGTH(sizeof(mtu)); - memcpy(RTA_DATA(rta), &mtu, sizeof (mtu)); + memcpy(RTA_DATA(rta), &mtu, sizeof(mtu)); send(rtnetlink_sk, &req, req.n.nlmsg_len); .fi .SH BUGS diff --git a/man3/scandir.3 b/man3/scandir.3 index 4d7fcfc43..e2d106867 100644 --- a/man3/scandir.3 +++ b/man3/scandir.3 @@ -118,7 +118,10 @@ earlier it used .nf /* print files in current directory in reverse order */ #include -main(){ + +int +main(void) +{ struct dirent **namelist; int n; diff --git a/man3/sem_wait.3 b/man3/sem_wait.3 index d9ceaf8be..4b27d34aa 100644 --- a/man3/sem_wait.3 +++ b/man3/sem_wait.3 @@ -70,13 +70,12 @@ in seconds and nanoseconds since the Epoch (00:00:00, 1 January 1970). This structure is defined as follows: .nf -.in +0.25i +.in +0.5i struct timespec { time_t tv_sec; /* Seconds */ long tv_nsec; /* Nanoseconds [0 .. 999999999] */ }; - -.in -0.25i +.in -0.5i .fi .PP If the timeout has already expired by the time of the call, @@ -194,9 +193,11 @@ handler(int sig) int sval; printf("sem_post() from handler\\n"); - if (sem_post(&sem) == -1) die("sem_post"); + if (sem_post(&sem) == -1) + die("sem_post"); - if (sem_getvalue(&sem, &sval) == -1) die("sem_getvalue"); + if (sem_getvalue(&sem, &sval) == -1) + die("sem_getvalue"); printf("sem_getvalue() from handler; value = %d\\n", sval); } /* handler */ @@ -209,14 +210,16 @@ main(int argc, char *argv[]) assert(argc == 3); /* Usage: ./a.out alarm-secs wait-secs */ - if (sem_init(&sem, 0, 0) == -1) die("sem_init"); + if (sem_init(&sem, 0, 0) == -1) + die("sem_init"); /* Establish SIGALRM handler; set alarm timer using argv[1] */ sa.sa_handler = handler; sigemptyset(&sa.sa_mask); sa.sa_flags = 0; - if (sigaction(SIGALRM, &sa, NULL) == -1) die("sigaction"); + if (sigaction(SIGALRM, &sa, NULL) == -1) + die("sigaction"); alarm(atoi(argv[1])); diff --git a/man3/setaliasent.3 b/man3/setaliasent.3 index 2a2f25d0d..196d87a26 100644 --- a/man3/setaliasent.3 +++ b/man3/setaliasent.3 @@ -103,20 +103,23 @@ It will dump all names in the alias database. #include #include -int main() { - struct aliasent *al; - setaliasent(); - for (;;) { - al = getaliasent(); - if (al == NULL) break; - printf("Name: %s\\n", al->alias_name); - } - if (errno) { - perror("reading alias"); - exit(EXIT_FAILURE); - } - endaliasent(); - exit(EXIT_SUCCESS); +int +main(void) +{ + struct aliasent *al; + setaliasent(); + for (;;) { + al = getaliasent(); + if (al == NULL) + break; + printf("Name: %s\\n", al->alias_name); + } + if (errno) { + perror("reading alias"); + exit(EXIT_FAILURE); + } + endaliasent(); + exit(EXIT_SUCCESS); } .fi .SH "CONFORMING TO" diff --git a/man3/setbuf.3 b/man3/setbuf.3 index 741e96de2..6f01b5b9b 100644 --- a/man3/setbuf.3 +++ b/man3/setbuf.3 @@ -170,7 +170,9 @@ For example, the following is illegal: .nf .sp #include -int main() + +int +main(void) { char buf[BUFSIZ]; setbuf(stdin, buf); @@ -178,7 +180,6 @@ int main() return 0; } .fi -.sp .SH "SEE ALSO" .BR fclose (3), .BR fflush (3), diff --git a/man3/sigvec.3 b/man3/sigvec.3 index 7fe8a5d68..a67eddac9 100644 --- a/man3/sigvec.3 +++ b/man3/sigvec.3 @@ -151,7 +151,7 @@ field given to using code such as the following: .nf - vec.sv_mask = sigmask(SIGQUIT) | sigpause (SIGABRT); + vec.sv_mask = sigmask(SIGQUIT) | sigpause(SIGABRT); /* Block SIGQUIT and SIGABRT during handler execution */ .fi diff --git a/man3/stpcpy.3 b/man3/stpcpy.3 index 8671a2f1a..796c23faa 100644 --- a/man3/stpcpy.3 +++ b/man3/stpcpy.3 @@ -53,9 +53,9 @@ For example, this program uses \fBstpcpy\fP() to concatenate \fBfoo\fP and main (void) { char *to = buffer; - to = stpcpy (to, "foo"); - to = stpcpy (to, "bar"); - printf ("%s\\n", buffer); + to = stpcpy(to, "foo"); + to = stpcpy(to, "bar"); + printf("%s\\n", buffer); } .fi .SH "CONFORMING TO" diff --git a/man3/strptime.3 b/man3/strptime.3 index a732a3bfe..b1997541e 100644 --- a/man3/strptime.3 +++ b/man3/strptime.3 @@ -270,7 +270,9 @@ and \fBstrftime\fP(). #include #include -int main() { +int +main(void) +{ struct tm tm; char buf[255]; diff --git a/man3/strtod.3 b/man3/strtod.3 index b73fe035c..ae9caaab3 100644 --- a/man3/strtod.3 +++ b/man3/strtod.3 @@ -105,7 +105,6 @@ is ``NAN'' (disregarding case) optionally followed by `(', a sequence of characters, followed by ')'. The character string specifies in an implementation-dependent way the type of NAN. - .SH "RETURN VALUE" These functions return the converted value, if any. diff --git a/man3/syslog.3 b/man3/syslog.3 index b423dd2f6..2b1b5a906 100644 --- a/man3/syslog.3 +++ b/man3/syslog.3 @@ -48,7 +48,6 @@ closelog, openlog, syslog \- send messages to the system logger .B #include .sp .BI "void vsyslog(int " priority ", const char *" format ", va_list " ap ); -.br .SH DESCRIPTION .BR closelog () closes the descriptor being used to write to the system logger. The use of @@ -196,7 +195,6 @@ generic user-level messages .TP .B LOG_UUCP UUCP subsystem - .SS level This determines the importance of the message. The levels are, in order of decreasing importance: diff --git a/man3/termios.3 b/man3/termios.3 index 119510941..fe6546f60 100644 --- a/man3/termios.3 +++ b/man3/termios.3 @@ -752,7 +752,6 @@ successfully carried out. Therefore, when making multiple changes it may be necessary to follow this call with a further call to .BR tcgetattr () to check that all changes have been performed successfully. - .SH NOTES Unix V7 and several later systems have a list of baud rates where after the fourteen values B0, ..., B9600 one finds the diff --git a/man3/tsearch.3 b/man3/tsearch.3 index acb188093..d5323fbfd 100644 --- a/man3/tsearch.3 +++ b/man3/tsearch.3 @@ -140,7 +140,8 @@ in order. void *root = NULL; -void *xmalloc(unsigned n) +void * +xmalloc(unsigned n) { void *p; p = malloc(n); @@ -150,7 +151,9 @@ void *xmalloc(unsigned n) exit(1); } -int compare(const void *pa, const void *pb) { +int +compare(const void *pa, const void *pb) +{ if (*(int *) pa < *(int *) pb) return \-1; if (*(int *) pa > *(int *) pb) @@ -158,7 +161,9 @@ int compare(const void *pa, const void *pb) { return 0; } -void action(const void *nodep, const VISIT which, const int depth) { +void +action(const void *nodep, const VISIT which, const int depth) +{ int *datap; switch(which) { @@ -177,7 +182,9 @@ void action(const void *nodep, const VISIT which, const int depth) { } } -int main() { +int +main(void) +{ int i, *ptr; void *val; diff --git a/man3/ulimit.3 b/man3/ulimit.3 index 4f38e6989..72f309567 100644 --- a/man3/ulimit.3 +++ b/man3/ulimit.3 @@ -64,7 +64,6 @@ Return the maximum possible address of the data segment. .B 4 (Implemented but no symbolic constant provided.) Return the maximum number of files that the calling process can open. - .SH "RETURN VALUE" On success, .BR ulimit () diff --git a/man3/wordexp.3 b/man3/wordexp.3 index ea0d5b8f7..28bf85c18 100644 --- a/man3/wordexp.3 +++ b/man3/wordexp.3 @@ -24,13 +24,11 @@ .SH NAME wordexp, wordfree \- perform word expansion like a posix-shell .SH SYNOPSIS -.sp .B "#include " .sp .BI "int wordexp(const char *" s ", wordexp_t *" p ", int " flags ); .sp .BI "void wordfree(wordexp_t *" p ); -.sp .SH DESCRIPTION The function .BR wordexp () @@ -72,7 +70,6 @@ frees the allocated memory again. More precisely, it does not free its argument, but it frees the array .I we_wordv and the strings that points to. - .SH EXAMPLE First a small example. The output is approximately that of "ls [a-c]*.c". .LP @@ -80,7 +77,8 @@ First a small example. The output is approximately that of "ls [a-c]*.c". #include #include -int main(int argc, char **argv) +int +main(int argc, char **argv) { wordexp_t p; char **w; @@ -110,7 +108,6 @@ If the argument contains a word that starts with an unquoted comment character #, then it is unspecified whether that word and all following words are ignored, or the # is treated as a non-comment character. - .SS "The expansion" The expansion done consists of the following stages: tilde expansion (replacing ~user by user's home directory), @@ -124,12 +121,10 @@ The result of expansion of special parameters .LP Field splitting is done using the environment variable $IFS. If it is not set, the field separators are space, tab and newline. - .SS "The output array" The array .I we_wordv contains the words found, followed by a NULL. - .SS "The flags argument" The .I flag @@ -190,10 +185,8 @@ Out of memory. .B WRDE_SYNTAX Shell syntax error, such as unbalanced parentheses or unmatched quotes. - .SH "CONFORMING TO" POSIX.1-2001 - .SH "SEE ALSO" .BR fnmatch (3), .BR glob (3) diff --git a/man3/xcrypt.3 b/man3/xcrypt.3 index fc75c651a..1ef2ac58d 100644 --- a/man3/xcrypt.3 +++ b/man3/xcrypt.3 @@ -10,7 +10,6 @@ .SH NAME xencrypt, xdecrypt, passwd2des \- RFS password encryption .SH SYNOPSIS -.sp .B "#include " .sp .BI "void passwd2des(char " *passwd ", char *" key ");" @@ -18,7 +17,6 @@ xencrypt, xdecrypt, passwd2des \- RFS password encryption .BI "int xencrypt(char *" secret ", char *" passwd ");" .sp .BI "int xdecrypt(char *" secret ", char *" passwd ");" -.sp .SH DESCRIPTION The function .BR passwd2des () diff --git a/man4/console.4 b/man4/console.4 index 24f14fda3..ebcddce16 100644 --- a/man4/console.4 +++ b/man4/console.4 @@ -60,7 +60,6 @@ The command (formerly \fBdisalloc\fP) will free the memory taken by the screen buffers for consoles that no longer have any associated process. - .SH PROPERTIES Consoles carry a lot of state. I hope to document that some other time. The most important fact is that the consoles simulate vt100 terminals. @@ -68,8 +67,6 @@ In particular, a console is reset to the initial state by printing the two characters ESC c. All escape sequences can be found in .BR console_codes (4). - -.LP .SH FILES .I /dev/console .br diff --git a/man4/console_codes.4 b/man4/console_codes.4 index 4566b6b94..dc1ad8532 100644 --- a/man4/console_codes.4 +++ b/man4/console_codes.4 @@ -164,7 +164,6 @@ and this entire sequence is ignored. (The idea is to ignore an echoed function key.) .PP The action of a CSI sequence is determined by its final character. -.PP .TS l l l. @ ICH Insert the indicated # of blank characters. @@ -214,7 +213,6 @@ Several attributes can be set in the same sequence, separated by semicolons. An empty parameter (between semicolons or string initiator or terminator) is interpreted as a zero. -.LP .TS l l. param result diff --git a/man4/console_ioctl.4 b/man4/console_ioctl.4 index 201f708bc..2e20b91ad 100644 --- a/man4/console_ioctl.4 +++ b/man4/console_ioctl.4 @@ -38,7 +38,6 @@ of \fI*argp\fP are set to the state of the LEDs, as follows: LED_CAP 0x04 caps lock led LEC_NUM 0x02 num lock led LED_SCR 0x01 scroll lock led - .IP \fBKDSETLED\fP Set the LEDs. The LEDs are set to correspond to the lower three bits of \fIargp\fP. However, if a higher order bit is set, @@ -50,46 +49,36 @@ keyboard flags, and KDGETLED/KDSETLED would also change the keyboard flags. Since 1.1.54 the leds can be made to display arbitrary information, but by default they display the keyboard flags. The following two ioctl's are used to access the keyboard flags. - .IP \fBKDGKBLED\fP Get keyboard flags CapsLock, NumLock, ScrollLock (not lights). \fIargp\fP points to a char which is set to the flag state. The low order three bits (mask 0x7) get the current flag state, and the low order bits of the next nibble (mask 0x70) get the default flag state. (Since 1.1.54.) - .IP \fBKDSKBLED\fP Set keyboard flags CapsLock, NumLock, ScrollLock (not lights). \fIargp\fP has the desired flag state. The low order three bits (mask 0x7) have the flag state, and the low order bits of the next nibble (mask 0x70) have the default flag state. (Since 1.1.54.) - .IP \fBKDGKBTYPE\fP Get keyboard type. This returns the value KB_101, defined as 0x02. - .IP \fBKDADDIO\fP Add I/O port as valid. Equivalent to ioperm(arg,1,1). - .IP \fBKDDELIO\fP Delete I/O port as valid. Equivalent to ioperm(arg,1,0). - .IP \fBKDENABIO\fP Enable I/O to video board. Equivalent to ioperm(0x3b4, 0x3df-0x3b4+1, 1). - .IP \fBKDDISABIO\fP Disable I/O to video board. Equivalent to ioperm(0x3b4, 0x3df-0x3b4+1, 0). - .IP \fBKDSETMODE\fP Set text/graphics mode. \fIargp\fP is one of these: KD_TEXT 0x00 KD_GRAPHICS 0x01 - .IP \fBKDGETMODE\fP Get text/graphics mode. \fIargp\fP points to a long which is set to one of the above values. - .IP \fBKDMKTONE\fP Generate tone of specified length. The lower 16 bits of \fIargp\fP specify the period in clock cycles, @@ -99,18 +88,15 @@ Control returns immediately. For example, \fIargp\fP = (125<<16) + 0x637 would specify the beep normally associated with a ctrl-G. (Thus since 0.99pl1; broken in 2.1.49-50.) - .IP \fBKIOCSOUND\fP Start or stop sound generation. The lower 16 bits of \fIargp\fP specify the period in clock cycles (that is, \fIargp\fP = 1193180/frequency). \fIargp\fP = 0 turns sound off. In either case, control returns immediately. - .IP \fBGIO_CMAP\fP Get the current default colour map from kernel. \fIargp\fP points to a 48-byte array. (Since 1.3.3.) - .IP \fBPIO_CMAP\fP Change the default text-mode colour map. \fIargp\fP points to a 48-byte array which contains, in order, the Red, Green, and Blue @@ -119,16 +105,14 @@ intensity. The default colours are, in order: black, dark red, dark green, brown, dark blue, dark purple, dark cyan, light grey, dark grey, bright red, bright green, yellow, bright blue, bright purple, bright cyan and white. (Since 1.3.3.) - .IP \fBGIO_FONT\fP Gets 256-character screen font in expanded form. \fIargp\fP points to an 8192 byte array. Fails with error code \fBEINVAL\fP if the currently loaded font is a 512-character font, or if the console is not in text mode. - .IP \fBGIO_FONTX\fP Gets screen font and associated information. \fIargp\fP points to a -struct consolefontdesc (see \fBPIO_FONTX\fP). On call, the +\fIstruct consolefontdesc\fP (see \fBPIO_FONTX\fP). On call, the \fIcharcount\fP field should be set to the maximum number of characters that would fit in the buffer pointed to by \fIchardata\fP. On return, the \fIcharcount\fP and \fIcharheight\fP are filled with @@ -137,66 +121,58 @@ the respective data for the currently loaded font, and the \fIcharcount\fP indicated enough space was available; otherwise the buffer is untouched and \fIerrno\fP is set to \fBENOMEM\fP. (Since 1.3.1.) - .IP \fBPIO_FONT\fP Sets 256-character screen font. Load font into the EGA/VGA character generator. \fIargp\fP points to a 8192 byte map, with 32 bytes per character. Only first \fIN\fP of them are used for an 8x\fIN\fP font (0 < \fIN\fP <= 32). This call also invalidates the Unicode mapping. - .IP \fBPIO_FONTX\fP Sets screen font and associated rendering information. \fIargp\fP points to a .nf struct consolefontdesc { - u_short \fIcharcount\fP; /* characters in font (256 or 512) */ - u_short \fIcharheight\fP; /* scan lines per character (1-32) */ - char *\fIchardata\fP; /* font data in expanded form */ + u_short \fIcharcount\fP; /* characters in font (256 or 512) */ + u_short \fIcharheight\fP; /* scan lines per character (1-32) */ + char *\fIchardata\fP; /* font data in expanded form */ }; .fi If necessary, the screen will be appropriately resized, and \fBSIGWINCH\fP sent to the appropriate processes. This call also invalidates the Unicode mapping. (Since 1.3.1.) - .IP \fBPIO_FONTRESET\fP Resets the screen font, size and Unicode mapping to the bootup defaults. \fIargp\fP is unused, but should be set to NULL to ensure compatibility with future versions of Linux. (Since 1.3.28.) - .IP \fBGIO_SCRNMAP\fP Get screen mapping from kernel. \fIargp\fP points to an area of size E_TABSZ, which is loaded with the font positions used to display each character. This call is likely to return useless information if the currently loaded font is more than 256 characters. - .IP \fBGIO_UNISCRNMAP\fP Get full Unicode screen mapping from kernel. \fIargp\fP points to an area of size E_TABSZ*sizeof(unsigned short), which is loaded with the Unicodes each character represent. A special set of Unicodes, starting at U+F000, are used to represent ``direct to font'' mappings. (Since 1.3.1.) - .IP \fBPIO_SCRNMAP\fP Loads the ``user definable'' (fourth) table in the kernel which maps bytes into console screen symbols. \fIargp\fP points to an area of size E_TABSZ. - .IP \fBPIO_UNISCRNMAP\fP Loads the ``user definable'' (fourth) table in the kernel which maps bytes into Unicodes, which are then translated into screen symbols according to the currently loaded Unicode-to-font map. Special Unicodes starting at U+F000 can be used to map directly to the font symbols. (Since 1.3.1.) - .IP \fBGIO_UNIMAP\fP Get Unicode-to-font mapping from kernel. \fIargp\fP points to a .nf struct unimapdesc { - u_short \fIentry_ct\fP; - struct unipair *\fIentries\fP; + u_short \fIentry_ct\fP; + struct unipair *\fIentries\fP; }; .fi @@ -204,30 +180,27 @@ where \fIentries\fP points to an array of .nf struct unipair { - u_short \fIunicode\fP; - u_short \fIfontpos\fP; + u_short \fIunicode\fP; + u_short \fIfontpos\fP; }; .fi (Since 1.1.92.) - .IP \fBPIO_UNIMAP\fP Put unicode-to-font mapping in kernel. \fIargp\fP points to a -struct unimapdesc. (Since 1.1.92) - +\fIstruct unimapdesc\fP. (Since 1.1.92) .IP \fBPIO_UNIMAPCLR\fP Clear table, possibly advise hash algorithm. \fIargp\fP points to a .nf struct unimapinit { - u_short \fIadvised_hashsize\fP; /* 0 if no opinion */ - u_short \fIadvised_hashstep\fP; /* 0 if no opinion */ - u_short \fIadvised_hashlevel\fP; /* 0 if no opinion */ + u_short \fIadvised_hashsize\fP; /* 0 if no opinion */ + u_short \fIadvised_hashstep\fP; /* 0 if no opinion */ + u_short \fIadvised_hashlevel\fP; /* 0 if no opinion */ }; .fi (Since 1.1.92.) - .IP \fBKDGKBMODE\fP Gets current keyboard mode. \fIargp\fP points to a long which is set to one of these: @@ -236,22 +209,18 @@ of these: K_XLATE 0x01 K_MEDIUMRAW 0x02 K_UNICODE 0x03 - .IP \fBKDSKBMODE\fP Sets current keyboard mode. \fIargp\fP is a long equal to one of the above values. - .IP \fBKDGKBMETA\fP Gets meta key handling mode. \fIargp\fP points to a long which is set to one of these: K_METABIT 0x03 set high order bit K_ESCPREFIX 0x04 escape prefix - .IP \fBKDSKBMETA\fP Sets meta key handling mode. \fIargp\fP is a long equal to one of the above values. - .IP \fBKDGKBENT\fP Gets one entry in key translation table (keycode to action code). \fIargp\fP points to a @@ -270,10 +239,9 @@ and \fIkb_index\fP is the keycode (0 <= \fIkb_index\fP < NR_KEYS). \fIkb_value\fP is set to the corresponding action code, or K_HOLE if there is no such key, or K_NOSUCHMAP if \fIkb_table\fP is invalid. - .IP \fBKDSKBENT\fP -Sets one entry in translation table. \fIargp\fP points to a struct kbentry. - +Sets one entry in translation table. \fIargp\fP points to +a \fIstruct kbentry\fP. .IP \fBKDGKBSENT\fP Gets one function key string. \fIargp\fP points to a @@ -286,10 +254,9 @@ struct kbsentry { \fIkb_string\fP is set to the (NULL terminated) string corresponding to the \fIkb_func\fPth function key action code. - .IP \fBKDSKBSENT\fP -Sets one function key string entry. \fIargp\fP points to a struct kbsentry. - +Sets one function key string entry. \fIargp\fP points to +a \fIstruct kbsentry\fP. .IP \fBKDGKBDIACR\fP Read kernel accent table. \fIargp\fP points to a @@ -303,37 +270,40 @@ struct kbdiacrs { where \fIkb_cnt\fP is the number of entries in the array, each of which is a -struct kbdiacr { u_char \fIdiacr\fP, \fIbase\fP, \fIresult\fP; +.nf +struct kbdiacr { + u_char \fIdiacr\fP; + u_char \fIbase\fP; + u_char \fIresult\fP; }; - .IP \fBKDGETKEYCODE\fP Read kernel keycode table entry (scan code to keycode). \fIargp\fP points to a .nf -struct kbkeycode { unsigned int \fIscancode\fP, \fIkeycode\fP; }; +struct kbkeycode { + unsigned int \fIscancode\fP; + unsigned int \fIkeycode\fP; +}; .fi \fIkeycode\fP is set to correspond to the given \fIscancode\fP. (89 <= \fIscancode\fP <= 255 only. For 1 <= \fIscancode\fP <= 88, \fIkeycode\fP==\fIscancode\fP.) (Since 1.1.63.) - .IP \fBKDSETKEYCODE\fP -Write kernel keycode table entry. \fIargp\fP points to struct kbkeycode. +Write kernel keycode table entry. \fIargp\fP points to +a \fIstruct kbkeycode\fP. (Since 1.1.63.) - .IP \fBKDSIGACCEPT\fP The calling process indicates its willingness to accept the signal \fIargp\fP when it is generated by pressing an appropriate key combination. (1 <= \fIargp\fP <= NSIG). (See spawn_console() in linux/drivers/char/keyboard.c.) - .IP \fBVT_OPENQRY\fP Returns the first available (non-opened) console. \fIargp\fP points to an int which is set to the number of the vt (1 <= \fI*argp\fP <= MAX_NR_CONSOLES). - .IP \fBVT_GETMODE\fP Get mode of active vt. \fIargp\fP points to a @@ -347,16 +317,15 @@ struct vt_mode { }; .fi -\&...which is set to the mode of the active vt. +which is set to the mode of the active vt. \fImode\fP is set to one of these values: VT_AUTO auto vt switching VT_PROCESS process controls switching VT_ACKACQ acknowledge switch - .IP \fBVT_SETMODE\fP -Set mode of active vt. \fIargp\fP points to a struct vt_mode. - +Set mode of active vt. \fIargp\fP points to +a \fIstruct vt_mode\fP. .IP \fBVT_GETSTATE\fP Get global vt state info. \fIargp\fP points to a @@ -370,20 +339,15 @@ struct vt_stat { For each vt in use, the corresponding bit in the \fIv_state\fP member is set. (Kernels 1.0 through 1.1.92.) - .IP \fBVT_RELDISP\fP Release a display. - .IP \fBVT_ACTIVATE\fP Switch to vt \fIargp\fP (1 <= \fIargp\fP <= MAX_NR_CONSOLES). - .IP \fBVT_WAITACTIVE\fP Wait until vt \fIargp\fP has been activated. - .IP \fBVT_DISALLOCATE\fP Deallocate the memory associated with vt \fIargp\fP. (Since 1.1.54.) - .IP \fBVT_RESIZE\fP Set the kernel's idea of screensize. \fIargp\fP points to a @@ -399,7 +363,6 @@ Note that this does not change the videomode. See .BR resizecons (8). (Since 1.1.54.) - .IP \fBVT_RESIZEX\fP Set the kernel's idea of various screen parameters. \fIargp\fP points to a @@ -420,7 +383,6 @@ multiple parameters are set, they must be self-consistent. Note that this does not change the videomode. See .BR resizecons(8). (Since 1.3.3.) - .PP The action of the following ioctls depends on the first byte in the struct pointed to by \fIargp\fP, referred to here as the \fIsubcode\fP. @@ -429,19 +391,20 @@ These are legal only for the superuser or the owner of the current tty. Dump the screen. Disappeared in 1.1.92. (With kernel 1.1.92 or later, read from /dev/vcsN or /dev/vcsaN instead.) - .IP "\fBTIOCLINUX, subcode=1\fP" Get task information. Disappeared in 1.1.92. - .IP "\fBTIOCLINUX, subcode=2\fP" Set selection. \fIargp\fP points to a +.nf - struct {char \fIsubcode\fP; - short \fIxs\fP, \fIys\fP, \fIxe\fP, \fIye\fP; - short \fIsel_mode\fP; - } +struct { + char \fIsubcode\fP; + short \fIxs\fP, \fIys\fP, \fIxe\fP, \fIye\fP; + short \fIsel_mode\fP; +} +.fi \fIxs\fP and \fIys\fP are the starting column and row. \fIxe\fP and \fIye\fP are the ending column and row. (Upper left corner is row=column=1.) @@ -450,39 +413,31 @@ column and row. (Upper left corner is row=column=1.) or 2 for line-by-line selection. The indicated screen characters are highlighted and saved in the static array sel_buffer in devices/char/console.c. - .IP "\fBTIOCLINUX, subcode=3\fP" Paste selection. The characters in the selection buffer are written to \fIfd\fP. - .IP "\fBTIOCLINUX, subcode=4\fP" Unblank the screen. - .IP "\fBTIOCLINUX, subcode=5\fP" Sets contents of a 256-bit look up table defining characters in a "word", for word-by-word selection. (Since 1.1.32.) - .IP "\fBTIOCLINUX, subcode=6\fP" \fIargp\fP points to a char which is set to the value of the kernel variable \fIshift_state\fP. (Since 1.1.32.) - .IP "\fBTIOCLINUX, subcode=7\fP" \fIargp\fP points to a char which is set to the value of the kernel variable \fIreport_mouse\fP. (Since 1.1.33.) - .IP "\fBTIOCLINUX, subcode=8\fP" Dump screen width and height, cursor position, and all the character-attribute pairs. (Kernels 1.1.67 through 1.1.91 only. With kernel 1.1.92 or later, read from /dev/vcsa* instead.) - .IP "\fBTIOCLINUX, subcode=9\fP" Restore screen width and height, cursor position, and all the character-attribute pairs. (Kernels 1.1.67 through 1.1.91 only. With kernel 1.1.92 or later, write to /dev/vcsa* instead.) - .IP "\fBTIOCLINUX, subcode=10\fP" Handles the Power Saving feature of the new generation of monitors. @@ -508,12 +463,10 @@ blank_timer times out, then you choose this option. (\fICaution:\fP Powering down frequently will damage the monitor.) (Since 1.1.76.) - .SH "RETURN VALUE" On success, 0 is returned. On error \-1 is returned, and \fIerrno\fP is set. .SH ERRORS \fIerrno\fP may take on these values: - .TP .B EBADF The file descriptor is invalid. @@ -546,7 +499,6 @@ of Unix, will not work on older versions of Linux, and will not work on future versions of Linux. Use POSIX functions. - .SH "SEE ALSO" .BR dumpkeys (1), .BR kbd_mode (1), diff --git a/man4/fd.4 b/man4/fd.4 index c26a1aad4..6fabf9526 100644 --- a/man4/fd.4 +++ b/man4/fd.4 @@ -47,7 +47,6 @@ entries for those formats to prevent their usage if you are not sure. .PP Drive independent device files which automatically detect the media format and capacity: -.PP .TS l l. Name Base minor # @@ -56,7 +55,6 @@ _ .TE .PP 5.25 inch double density device files: -.PP .TS lw(1i) l l l l l. Name Capac. Cyl. Sect. Heads Base minor # @@ -65,7 +63,6 @@ _ .TE .PP 5.25 inch high density device files: -.PP .TS lw(1i) l l l l l. Name Capac. Cyl. Sect. Heads Base minor # @@ -83,7 +80,6 @@ _ .TE .PP 3.5 inch double density device files: -.PP .TS lw(1i) l l l l l. Name Capac. Cyl. Sect. Heads Base minor # @@ -96,7 +92,6 @@ _ .TE .PP 3.5 inch high density device files: -.PP .TS lw(1i) l l l l l. Name Capac. Cyl. Sect. Heads Base minor # @@ -116,7 +111,6 @@ _ .TE .PP 3.5 inch extra density device files: -.PP .TS lw(1i) l l l l l. Name Capac. Cyl. Sect. Heads Base minor # diff --git a/man4/full.4 b/man4/full.4 index e3daa00d2..e4e46fb48 100644 --- a/man4/full.4 +++ b/man4/full.4 @@ -43,7 +43,6 @@ can be created with the following commands: mknod \-m 666 /dev/full c 1 7 chown root:root /dev/full - .fi .SH FILES /dev/full diff --git a/man4/lp.4 b/man4/lp.4 index 8184c13a3..dd3b1e2ff 100644 --- a/man4/lp.4 +++ b/man4/lp.4 @@ -83,7 +83,6 @@ Stores the currently used IRQ in \fIarg\fP. .IP "\fBint ioctl(int \fP\fIfd\fP\fB, LPGETSTATUS, int *\fP\fIarg\fP\fB)\fP" Stores the value of the status port in \fIarg\fP. The bits have the following meaning: -.sp .TS l l. LP_PBUSY inverted busy input, active high diff --git a/man4/mem.4 b/man4/mem.4 index 1697ab6cb..e51f1593a 100644 --- a/man4/mem.4 +++ b/man4/mem.4 @@ -44,7 +44,6 @@ It is typically created by: mknod \-m 660 /dev/mem c 1 1 .br chown root:kmem /dev/mem -.sp .RE .LP The file @@ -60,7 +59,6 @@ It is typically created by: mknod \-m 640 /dev/kmem c 1 2 .br chown root:kmem /dev/kmem -.sp .RE .LP \fBport\fP is similar to @@ -73,7 +71,6 @@ It is typically created by: mknod \-m 660 /dev/port c 1 4 .br chown root:mem /dev/port -.sp .RE .SH FILES .I /dev/mem diff --git a/man4/mouse.4 b/man4/mouse.4 index 004eb9e3e..9dd78af52 100644 --- a/man4/mouse.4 +++ b/man4/mouse.4 @@ -32,7 +32,6 @@ for a description. .SH DESCRIPTION .SS Introduction The pinout of the usual 9 pin plug as used for serial mice is: - .TS center; r c l. @@ -57,7 +56,6 @@ speeds. To select speeds, cycle through the speeds 9600, 4800, 2400 and 1200 bit/s, each time writing the two characters from the table below and waiting 0.1 seconds. The following table shows available speeds and the strings that select them: - .TS center; l l. @@ -75,7 +73,6 @@ and one stop bit at the speed of 1200 bits/sec. Data is sent to RxD in 3-byte packets. The \fIdx\fP and \fIdy\fP movements are sent as two's-complement, \fIlb\fP (\fIrb\fP) are set when the left (right) button is pressed: - .TS center; r c c c c c c c. @@ -105,7 +102,6 @@ and two stop bits at the speed of 1200 bits/sec. Data is sent to RxD in values, \fIdy\fP is send as negated sum of the two two's-complement values. \fIlb\fP (\fImb\fP, \fIrb\fP) are cleared when the left (middle, right) button is pressed: - .TS center; r c c c c c c c c. @@ -128,7 +124,6 @@ stop bit at the speed of 1200 bits/sec. Data is sent to RxD in 3-byte packets. \fIdx\fP and \fIdy\fP are sent as single signed values, the sign bit indicating a negative value. \fIlb\fP (\fImb\fP, \fIrb\fP) are set when the left (middle, right) button is pressed: - .TS center; r c c c c c c c c. @@ -137,12 +132,10 @@ byte d7 d6 d5 d4 d3 d2 d1 d0 2 0 dx6 dx5 dx4 dx3 dx2 dx1 dx0 3 0 dy6 dy5 dy4 dy3 dy2 dy1 dy0 .TE - .SH FILES .TP .I /dev/mouse A commonly used symlink pointing to a mouse device. - .SH "SEE ALSO" .BR ttyS (4), .BR gpm (8) diff --git a/man4/null.4 b/man4/null.4 index 8c1322dce..cc9dce2cc 100644 --- a/man4/null.4 +++ b/man4/null.4 @@ -38,7 +38,6 @@ mknod \-m 666 /dev/null c 1 3 mknod \-m 666 /dev/zero c 1 5 .br chown root:root /dev/null /dev/zero -.sp .RE .SH NOTES If these devices are not writable and readable for all users, many diff --git a/man4/ram.4 b/man4/ram.4 index 2989940c3..147261996 100644 --- a/man4/ram.4 +++ b/man4/ram.4 @@ -33,7 +33,6 @@ It is typically created by: mknod \-m 660 /dev/ram b 1 1 .br chown root:disk /dev/ram -.sp .RE .SH FILES /dev/ram diff --git a/man4/st.4 b/man4/st.4 index 0cd90830b..7f19c70d2 100644 --- a/man4/st.4 +++ b/man4/st.4 @@ -73,6 +73,7 @@ with two minor numbers for different options.) Devices are typically created by: .RS .nf + mknod \-m 666 /dev/st0 c 9 0 mknod \-m 666 /dev/st0l c 9 32 mknod \-m 666 /dev/st0m c 9 64 @@ -211,11 +212,10 @@ Not all drives support all operations. The driver returns an EIO error if the drive rejects an operation. .PP .nf -.ta +.4i +.7i +1i /* Structure for \s-1MTIOCTOP\s+1 \- mag tape op command: */ struct mtop { - short mt_op; /* operations defined below */ - int mt_count; /* how many of them */ + short mt_op; /* operations defined below */ + int mt_count; /* how many of them */ }; .fi .PP @@ -542,15 +542,15 @@ This request takes an argument of type .nf /* structure for \s-1MTIOCGET\s+1 \- mag tape get status command */ struct mtget { - long mt_type; - long mt_resid; + long mt_type; + long mt_resid; /* the following registers are device dependent */ - long mt_dsreg; - long mt_gstat; - long mt_erreg; + long mt_dsreg; + long mt_gstat; + long mt_erreg; /* The next two fields are not always used */ - daddr_t mt_fileno; - daddr_t mt_blkno; + daddr_t mt_fileno; + daddr_t mt_blkno; }; .fi .IP \fBmt_type\fP 11 @@ -649,10 +649,9 @@ Viper, Wangtek, ... ). .PP .nf /* structure for \s-1MTIOCPOS\s+1 \- mag tape get position command */ -struct mtpos { - long mt_blkno; /* current block number */ +struct mtpos { + long mt_blkno; /* current block number */ }; - .fi .SH "RETURN VALUE" .IP EIO 14 diff --git a/man4/ttyS.4 b/man4/ttyS.4 index fdd65d6f7..177c84024 100644 --- a/man4/ttyS.4 +++ b/man4/ttyS.4 @@ -39,7 +39,6 @@ mknod \-m 660 /dev/ttyS2 c 4 66 # base address 0x3e8 mknod \-m 660 /dev/ttyS3 c 4 67 # base address 0x2e8 .br chown root:tty /dev/ttyS[0\-3] -.sp .RE .SH FILES /dev/ttyS[0\-3] diff --git a/man4/tty_ioctl.4 b/man4/tty_ioctl.4 index 96edb4c60..3c57dd6ce 100644 --- a/man4/tty_ioctl.4 +++ b/man4/tty_ioctl.4 @@ -10,7 +10,6 @@ tty ioctl \- ioctls for terminals and serial lines .BR "#include " .sp .BI "int ioctl(int " fd ", int " cmd ", ...);" -.sp .SH DESCRIPTION The .BR ioctl () @@ -23,7 +22,6 @@ Use of makes for non-portable programs. Use the POSIX interface described in .BR termios (3) whenever possible. - .SS "Get and Set Terminal Attributes" .TP .BI "TCGETS struct termios *" argp @@ -65,7 +63,6 @@ instead of a .BI "TCSETAW const struct termio *" argp .TP .BI "TCSETAF const struct termio *" argp - .SS "Locking the termios structure" The termios structure of a tty can be locked. The lock is itself a termios structure, with non-zero bits or fields indicating a @@ -78,7 +75,6 @@ the terminal. .BI "TIOCSLCKTRMIOS const struct termios *" argp Sets the locking status of the termios structure of the terminal. Only root can do this. - .SS "Get and Set Window Size" Window sizes are kept in the kernel, but not used by the kernel (except in the case of virtual consoles, where the kernel will @@ -95,16 +91,15 @@ The struct used by these ioctls is defined as .nf struct winsize { - unsigned short ws_row; - unsigned short ws_col; - unsigned short ws_xpixel; /* unused */ - unsigned short ws_ypixel; /* unused */ + unsigned short ws_row; + unsigned short ws_col; + unsigned short ws_xpixel; /* unused */ + unsigned short ws_ypixel; /* unused */ }; .fi When the window size changes, a SIGWINCH signal is sent to the foreground process group. - .SS "Sending a Break" .TP .BI "TCSBRK int " arg @@ -150,7 +145,6 @@ Turn break on, that is, start sending zero bits. .TP .BI "TIOCCBRK void" Turn break off, that is, stop sending zero bits. - .SS "Software flow control" .TP .BI "TCXONC int " arg @@ -160,7 +154,6 @@ Equivalent to See .BR tcflow (3) for the argument values TCOOFF, TCOON, TCIOFF, TCION. - .SS "Buffer count and flushing" .TP .BI "FIONREAD int *" argp @@ -179,12 +172,10 @@ Equivalent to See .BR tcflush (3) for the argument values TCIFLUSH, TCOFLUSH, TCIOFLUSH. - .SS "Faking input" .TP .BI "TIOCSTI const char *" argp Insert the given byte in the input queue. - .SS "Redirecting console output" .TP .BI "TIOCCONS void" @@ -201,7 +192,6 @@ pointing at .I /dev/console or .IR /dev/tty0 . - .SS "Controlling tty" .TP .BI "TIOCSCTTY int " arg @@ -219,7 +209,6 @@ If the given tty was the controlling tty of the current process, give up this controlling tty. If the process was session leader, then send SIGHUP and SIGCONT to the foreground process group and all processes in the current session lose their controlling tty. - .SS "Process group and session ID" .TP .BI "TIOCGPGRP pid_t *" argp @@ -237,7 +226,6 @@ Set the foreground process group ID of this tty. .BI "TIOCGSID pid_t *" argp Get the session ID of the given tty. This will fail with ENOTTY in case the tty is not a master pty and not our controlling tty. Strange. - .SS "Exclusive mode" .TP .BI "TIOCEXCL void" @@ -249,7 +237,6 @@ operations on the terminal are permitted. .TP .BI "TIOCNXCL void" Disable exclusive mode. - .SS "Line discipline" .TP .BI "TIOCGETD int *" argp @@ -257,7 +244,6 @@ Get the line discipline of the tty. .TP .BI "TIOCSETD const int *" argp Set the line discipline of the tty. - .SS "Pseudo-tty ioctls" .TP .BI "TIOCPKT const int *" argp @@ -296,7 +282,6 @@ to implement a remote-echoed, locally `^S/^Q' flow-controlled remote login. The BSD ioctls TIOCSTOP, TIOCSTART, TIOCUCNTL, TIOCREMOTE have not been implemented under Linux. - .SS "Modem control" .TP .BI "TIOCMGET int *" argp @@ -326,7 +311,6 @@ TIOCM_RNG RNG (ring) TIOCM_RI see TIOCM_RNG TIOCM_DSR DSR (data set ready) .fi - .SS "Marking a line as local" .TP .BI "TIOCGSOFTCAR int *" argp @@ -348,15 +332,12 @@ unless the O_NONBLOCK flag is given. If CLOCAL is set, the line behaves as if DCD is always asserted. The software carrier flag is usually turned on for local devices, and is off for lines with modems. - .SS "Linux specific" For the TIOCLINUX ioctl, see .BR console_ioctl (4). - .SS "Kernel debugging" .sp .BR "#include " -.sp .TP .BI "TIOCTTYGSTRUCT struct tty_struct *" argp Get the tty_struct corresponding to @@ -372,14 +353,12 @@ Get the tty_struct corresponding to .\" .TP .\" .BI "TIOCSSERIAL const struct serial_struct *" argp .\" Set serial info. - .SH "RETURN VALUE" The .BR ioctl () system call returns 0 on success. On error it returns \-1 and sets .I errno appropriately. - .SH ERRORS .TP .B ENOIOCTLCMD @@ -402,7 +381,9 @@ Check the condition of DTR on the serial port. #include #include -main() { +int +main(void) +{ int fd, serial; fd = open("/dev/ttyS0", O_RDONLY); @@ -414,7 +395,6 @@ main() { close(fd); } .fi - .SH "SEE ALSO" .BR ioctl (2), .BR termios (3), diff --git a/man4/vcs.4 b/man4/vcs.4 index 238dcfb77..f0e49aff7 100644 --- a/man4/vcs.4 +++ b/man4/vcs.4 @@ -71,34 +71,35 @@ cursor of the second virtual console, then changes the background color there: .nf - #include - #include - #include - #include +#include +#include +#include +#include - int main() { - int fd; - char *device = "/dev/vcsa2"; - struct {unsigned char lines, cols, x, y;} scrn; - char ch, attrib; +int +main(void) +{ + int fd; + char *device = "/dev/vcsa2"; + struct {unsigned char lines, cols, x, y;} scrn; + char ch, attrib; - fd = open(device, O_RDWR); - if (fd < 0) { - perror(device); - exit(1); - } - (void) read(fd, &scrn, 4); - (void) lseek(fd, 4 + 2*(scrn.y*scrn.cols + scrn.x), 0); - (void) read(fd, &ch, 1); - (void) read(fd, &attrib, 1); - printf("ch='%c' attrib=0x%02x\\n", ch, attrib); - attrib ^= 0x10; - (void) lseek(fd, \-1, 1); - (void) write(fd, &attrib, 1); - return 0; + fd = open(device, O_RDWR); + if (fd < 0) { + perror(device); + exit(1); } + (void) read(fd, &scrn, 4); + (void) lseek(fd, 4 + 2*(scrn.y*scrn.cols + scrn.x), 0); + (void) read(fd, &ch, 1); + (void) read(fd, &attrib, 1); + printf("ch='%c' attrib=0x%02x\\n", ch, attrib); + attrib ^= 0x10; + (void) lseek(fd, \-1, 1); + (void) write(fd, &attrib, 1); + return 0; +} .fi - .SH FILES /dev/vcs[0\-63] .br diff --git a/man5/charmap.5 b/man5/charmap.5 index 3e658a4b3..0a061593e 100644 --- a/man5/charmap.5 +++ b/man5/charmap.5 @@ -65,7 +65,6 @@ comment-character for the rest of the file. It defaults to the number sign ( .B # ). - .PP The charmap-definition itself starts with the keyword .B CHARMAP @@ -76,12 +75,10 @@ define the character-encodings: .TP .I This form defines exactly one character and its encoding. - .TP .I ... This form defines a couple of characters. This is only useful for mutlibyte-characters, which are currently not implemented. - .PP The last line in a charmap-definition file must contain .B END CHARMAP. diff --git a/man5/dir_colors.5 b/man5/dir_colors.5 index deecec64a..1cf558d2c 100644 --- a/man5/dir_colors.5 +++ b/man5/dir_colors.5 @@ -57,7 +57,6 @@ always possible to override a global declaration by a subsequent terminal-specific one. .PP The following statements are recognized; case is insignificant: -.PP .TP .B TERM \fIterminal-type\fR Starts a terminal-specific section and specifies which terminal it diff --git a/man5/fs.5 b/man5/fs.5 index 3d2215a32..385dc510a 100644 --- a/man5/fs.5 +++ b/man5/fs.5 @@ -43,7 +43,6 @@ it, see for the mount command, and for the available mount options. Below a short description of a few of the available filesystems. - .TP .B "minix" is the filesystem used in the Minix operating system, the first to run diff --git a/man5/host.conf.5 b/man5/host.conf.5 index 5bf1d6a03..5c8fe3f6f 100644 --- a/man5/host.conf.5 +++ b/man5/host.conf.5 @@ -34,7 +34,6 @@ It should contain one configuration keyword per line, followed by appropriate configuration information. The keywords recognized are .IR order ", " trim ", " multi ", " nospoof ", " spoof ", and " reorder . These keywords are described below. - .TP .I order This keyword specifies how host lookups are to be performed. It diff --git a/man5/locale.5 b/man5/locale.5 index 3522c8bf4..0c7879133 100644 --- a/man5/locale.5 +++ b/man5/locale.5 @@ -46,7 +46,6 @@ the backslash ( is followed by a character that will be used as the comment-character for the rest of the file. It defaults to the number sign (#). - .PP The locale definition has one part for each locale category. Each part can be copied from another existing locale or @@ -54,7 +53,6 @@ can be defined from scratch. If the category should be copied, the only valid keyword in the definition is .B copy followed by the name of the locale which should be copied. - .\" FIXME glibc 2.2.2 added new non-standard locale categories: .\" LC_ADDRESS, LC_IDENTIFICATION, LC_MEASUREMENT, LC_NAME, .\" LC_PAPER, LC_TELEPHONE. These need to be documented. @@ -66,7 +64,6 @@ category starts with the string in the first column. There are the following keywords allowed: - .TP .I upper followed by a list of uppercase letters. The letters @@ -80,7 +77,6 @@ are included automatically. Characters also specified as or .B space are not allowed. - .TP .I lower followed by a list of lowercase letters. The letters @@ -94,7 +90,6 @@ are included automatically. Characters also specified as or .B space are not allowed. - .TP .I alpha followed by a list of letters. All character specified as either @@ -108,7 +103,6 @@ are automatically included. Characters also specified as or .B space are not allowed. - .TP .I digit followed by the characters classified as numeric digits. Only the @@ -117,7 +111,6 @@ digits trough .B 9 are allowed. They are included by default in this class. - .TP .I space followed by a list of characters defined as white-space @@ -138,7 +131,6 @@ are not allowed. The characters and .B are automatically included. - .TP .I cntrl followed by a list of control characters. @@ -166,7 +158,6 @@ specified as or the .B character are not allowed. - .TP .I graph followed by a list of printable characters, not including the @@ -183,7 +174,6 @@ are automatically included. Characters also specified as .B cntrl are not allowed. - .TP .I print followed by a list of printable characters, including the @@ -201,7 +191,6 @@ character are automatically included. Characters also specified as .B cntrl are not allowed. - .TP .I xdigit followed by a list of characters classified as hexadecimal @@ -217,7 +206,6 @@ trough .B A trough .BR F . - .TP .I blank followed by a list of characters classified as @@ -227,7 +215,6 @@ The characters and .B are automatically included. - .TP .I toupper followed by a list of mappings from lowercase to uppercase @@ -241,13 +228,11 @@ with semicolons. followed by a list of mappings from uppercase to lowercase letters. If the keyword tolower is not present, the reverse of the toupper list is used. - .PP The .B LC_CTYPE definition ends with the string .I END LC_CYTPE. - .SS LC_COLLATE The .B LC_COLLATE @@ -259,13 +244,10 @@ The definition starts with the string in the first column. There are the following keywords allowed: - .TP .I collating-element - .TP .I collating-symbol - .PP The order-definition starts with a line: .TP @@ -281,7 +263,6 @@ and is terminated with the keyword .TP .IR order_end . .PP - For more details see the sources in .I /usr/lib/nls/src notably the examples @@ -289,20 +270,17 @@ notably the examples .B Example and .B Example2 - .PP The .B LC_COLLATE definition ends with the string .IR END LC_COLLATE . - .SS LC_MONETARY The definition starts with the string .B LC_MONETARY in the first column. There are the following keywords allowed: - .TP .I int_curr_symbol followed by the international currency symbol. This must be a @@ -466,14 +444,12 @@ The .B LC_MONETARY definition ends with the string .I END LC_MONETARY. - .SS LC_NUMERIC The definition starts with the string .B LC_NUMERIC in the first column. The following keywords are allowed: - .TP .I decimal_point followed by the string that will be used as the decimal delimiter @@ -491,14 +467,12 @@ The .B LC_NUMERIC definition ends with the string .I END LC_NUMERIC. - .SS LC_TIME The definition starts with the string .B LC_TIME in the first column. The following keywords are allowed: - .TP .I abday followed by a list of abbreviated weekday names. The list starts with @@ -536,14 +510,12 @@ The .B LC_TIME definition ends with the string .I END LC_TIME. - .SS LC_MESSAGES The definition starts with the string .B LC_MESSAGES in the first column. The following keywords are allowed: - .TP .I yesexpr followed by a regular expression that describes possible @@ -552,7 +524,6 @@ yes-responses. .I noexpr followed by a regular expression that describes possible no-responses. - .PP The .B LC_MESSAGES diff --git a/man5/nscd.conf.5 b/man5/nscd.conf.5 index fa1010075..009791805 100644 --- a/man5/nscd.conf.5 +++ b/man5/nscd.conf.5 @@ -31,8 +31,7 @@ or TAB characters. A `#' (number sign) indicates the beginning of a comment; following characters, up to the end of the line, are not interpreted by nscd. - -Valid services are passwd, group, or hosts. +Valid services are \fIpasswd\fI, \fIgroup\fI, or \fIhosts\fI. .B logfile .I debug-file-name @@ -176,7 +175,6 @@ is shared with the clients so that they can directly search in them instead of having to ask the daemon over the socket each time a lookup is performed. .RE - .SH "SEE ALSO" .BR nscd (8) .SH AUTHOR diff --git a/man5/nsswitch.conf.5 b/man5/nsswitch.conf.5 index 583342241..719411824 100644 --- a/man5/nsswitch.conf.5 +++ b/man5/nsswitch.conf.5 @@ -198,7 +198,6 @@ available or does not allow queries. The default action is The service is temporarily unavailable. This could mean a file is locked or a server currently cannot accept more connections. The default action is `continue'. -.LP .SS Interaction with +/\- syntax (compat mode) Linux libc5 without NYS does not have the name service switch but does allow the user some policy control. In diff --git a/man5/passwd.5 b/man5/passwd.5 index 96c05599f..eab7b8a31 100644 --- a/man5/passwd.5 +++ b/man5/passwd.5 @@ -67,7 +67,6 @@ account:password:UID:GID:GECOS:directory:shell .RE .sp The field descriptions are: -.sp .RS .TP 1.0in .I account diff --git a/man5/proc.5 b/man5/proc.5 index 8e5183b1a..fc8abd0ee 100644 --- a/man5/proc.5 +++ b/man5/proc.5 @@ -60,7 +60,6 @@ .TH PROC 5 2005-05-12 "" "Linux Programmer's Manual" .SH NAME proc \- process information pseudo-filesystem - .SH DESCRIPTION The .I proc @@ -1668,7 +1667,6 @@ Linux version 1.0.9 (quinlan@phaze) #1 Sat May 14 01:51:54 EDT 1994 .TP .IR /proc/vmstat " (since Linux 2.6)" This file displays various virtual memory statistics. - .TP .IR /proc/zoneinfo " (since Linux 2.6.13)" This file display information about memory zones. diff --git a/man5/protocols.5 b/man5/protocols.5 index 645cc57ac..59bac1efb 100644 --- a/man5/protocols.5 +++ b/man5/protocols.5 @@ -52,7 +52,6 @@ If a line contains a hash mark (#), the hash mark and the part of the line following it are ignored. The field descriptions are: - .TP .I protocol the native name for the protocol. For example ip, tcp, or udp. @@ -64,10 +63,8 @@ header. .I aliases optional aliases for the protocol. .LP - This file might be distributed over a network using a networkwide naming service like Yellow Pages/NIS or BIND/Hesiod. - .SH FILES .TP .I /etc/protocols diff --git a/man5/services.5 b/man5/services.5 index 5469dc593..f97f225f6 100644 --- a/man5/services.5 +++ b/man5/services.5 @@ -115,7 +115,6 @@ is an optional space or tab separated list of other names for this service (but see the BUGS section below). Again, the names are case sensitive. .PP - Either spaces or tabs may be used to separate the fields. Comments are started by the hash sign (#) and continue until the end @@ -165,7 +164,6 @@ chargen 19/udp ttytst source ftp 21/tcp # 22 \- unassigned telnet 23/tcp -.sp .fi .RE .SH BUGS diff --git a/man5/slabinfo.5 b/man5/slabinfo.5 index 07b8fceac..356605967 100644 --- a/man5/slabinfo.5 +++ b/man5/slabinfo.5 @@ -101,11 +101,9 @@ and batchcount via: .nf echo "\fIcache_name limit batchcount\fP" > /proc/slabinfo .fi - .SH AVAILABILITY .I /proc/slabinfo exists since Linux 2.1.23. SMP per-CPU caches exist since Linux 2.4.0-test3. - .SH FILES .I diff --git a/man5/ttytype.5 b/man5/ttytype.5 index 887f808a3..b8b1d4d73 100644 --- a/man5/ttytype.5 +++ b/man5/ttytype.5 @@ -52,7 +52,6 @@ is: con80x25 tty1 .br vt320 ttys0 -.sp .RE .SH FILES .TP diff --git a/man5/utmp.5 b/man5/utmp.5 index 88f353196..807fa2844 100644 --- a/man5/utmp.5 +++ b/man5/utmp.5 @@ -68,36 +68,36 @@ around; details depend on the version of libc): #define UT_HOSTSIZE 256 struct exit_status { - short int e_termination; /* process termination status */ - short int e_exit; /* process exit status */ + short int e_termination; /* process termination status */ + short int e_exit; /* process exit status */ }; struct utmp { - short ut_type; /* type of login */ - pid_t ut_pid; /* PID of login process */ - char ut_line[UT_LINESIZE]; /* device name of tty \- "/dev/" */ - char ut_id[4]; /* init id or abbrev. ttyname */ - char ut_user[UT_NAMESIZE]; /* user name */ - char ut_host[UT_HOSTSIZE]; /* hostname for remote login */ - struct exit_status ut_exit; /* The exit status of a process - marked as DEAD_PROCESS */ + short ut_type; /* type of login */ + pid_t ut_pid; /* PID of login process */ + char ut_line[UT_LINESIZE]; /* device name of tty \- "/dev/" */ + char ut_id[4]; /* init id or abbrev. ttyname */ + char ut_user[UT_NAMESIZE]; /* user name */ + char ut_host[UT_HOSTSIZE]; /* hostname for remote login */ + struct exit_status ut_exit; /* The exit status of a process + marked as DEAD_PROCESS */ - /* The ut_session and ut_tv fields must be the same size when - compiled 32- and 64-bit. This allows data files and shared - memory to be shared between 32- and 64-bit applications */ + /* The ut_session and ut_tv fields must be the same size when + compiled 32- and 64-bit. This allows data files and shared + memory to be shared between 32- and 64-bit applications */ #if __WORDSIZE == 64 && defined __WORDSIZE_COMPAT32 - int32_t ut_session; /* Session ID, used for windowing */ - struct { - int32_t tv_sec; /* Seconds */ - int32_t tv_usec; /* Microseconds */ - } ut_tv; /* Time entry was made */ + int32_t ut_session; /* Session ID, used for windowing */ + struct { + int32_t tv_sec; /* Seconds */ + int32_t tv_usec; /* Microseconds */ + } ut_tv; /* Time entry was made */ #else - long int ut_session; /* Session ID, used for windowing */ - struct timeval ut_tv; /* Time entry was made */ + long int ut_session; /* Session ID, used for windowing */ + struct timeval ut_tv; /* Time entry was made */ #endif - int32_t ut_addr_v6[4]; /* IP address of remote host */ - char __unused[20]; /* Reserved for future use */ + int32_t ut_addr_v6[4]; /* IP address of remote host */ + char __unused[20]; /* Reserved for future use */ }; /* Backwards compatibility hacks. */ @@ -203,7 +203,6 @@ then instead of the call: .sp .ta 3i gettimeofday((struct timeval *) &ut.ut_tv, NULL); -.sp .fi .RE @@ -218,7 +217,6 @@ struct timeval tv; gettimeofday(&tv, NULL); ut.ut_tv.tv_sec = tv.tv_sec; ut.ut_tv.tv_usec = tv.tv_usec; -.sp .fi .RE .SH FILES diff --git a/man7/arp.7 b/man7/arp.7 index d674f7209..9988eb8dc 100644 --- a/man7/arp.7 +++ b/man7/arp.7 @@ -58,7 +58,6 @@ Linux will automatically add a non-permanent proxy arp entry when it receives a request for an address it forwards to and proxy arp is enabled on the receiving interface. When there is a reject route for the target no proxy arp entry is added. - .SH IOCTLS Three ioctls are available on all .B PF_INET @@ -94,7 +93,7 @@ must have the same type as the device which is specified in .IR arp_dev . .I arp_dev is a zero-terminated string which names a device. - +.RS .TS tab(:) allbox; c s @@ -108,9 +107,9 @@ ATF_USETRAILERS:Trailers requested ATF_NETMASK:Use a netmask ATF_DONTPUB:Don't answer .TE +.RE .PP - If the .B ATF_NETMASK flag is set, then @@ -120,7 +119,6 @@ Linux 2.2 does not support proxy network ARP entries, so this should be set to 0xffffffff, or 0 to remove an existing proxy arp entry. .B ATF_USETRAILERS is obsolete and should not be used. - .SH SYSCTLS ARP supports a sysctl interface to configure parameters on a global or per-interface basis. @@ -225,7 +223,6 @@ Defaults to 3. The maximum number of packets which may be queued for each unresolved address by other network layers. Defaults to 3. - .SH BUGS Some timer settings are specified in jiffies, which is architecture related. @@ -240,7 +237,6 @@ The same problem applies for some kernel protocols (e.g. NFS over UDP). This man page mashes IPv4 specific and shared between IPv4 and IPv6 functionality together. - .SH VERSIONS The .I struct arpreq @@ -255,7 +251,6 @@ the kernel for all reachable hosts on other interfaces (when forwarding and proxy arp is enabled for the interface). The neigh/* sysctls did not exist before Linux 2.2. - .SH "SEE ALSO" .BR capabilities (7), .BR ip (7) diff --git a/man7/ascii.7 b/man7/ascii.7 index 3cb13b76b..c898a8c58 100644 --- a/man7/ascii.7 +++ b/man7/ascii.7 @@ -43,7 +43,6 @@ The international counterpart of ASCII is known as ISO 646. The following table contains the 128 ASCII characters. .LP C program \f(CW'\eX'\fP escapes are noted. -.LP .if t \{\ .in 1i .ft CW diff --git a/man7/boot.7 b/man7/boot.7 index 6e40fc432..0c3160b8e 100644 --- a/man7/boot.7 +++ b/man7/boot.7 @@ -21,7 +21,6 @@ but can be roughly divided to the following steps: (iii) kernel startup, (iv) init and inittab, (v) boot scripts. We will describe each of these in more detail below. - .SS "Hardware\-boot" After power\-on or hard reset, control is given to a program stored on read only memory (normally @@ -44,13 +43,11 @@ to probe as possible boot devices. Then the hardware boot stage accesses the boot device, loads the OS Loader, which is located on a fixed position on the boot device, and transfers control to it. - .TP Note: We do not cover here booting from network. Those who want to investigate this subject may want to research: DHCP, TFTP, PXE, Etherboot. - .SS "OS Loader" In PC, the OS Loader is located in the first sector of the boot device \- this is the \fBMBR\fR @@ -83,7 +80,6 @@ interactive use, to enable specification of alternative kernel (maybe a backup in case the last compiled one isn't functioning) and to pass optional parameters to the kernel. - .SS "Kernel Startup" When the kernel is loaded, it initializes the devices (via their drivers), starts the swapper (it is a "kernel process", @@ -101,7 +97,6 @@ process which is numbered 1. This process executes the program .IR /sbin/init , passing any parameters that weren't handled by the kernel already. - .SS "init and inittab" When init starts it reads .I /etc/inittab @@ -120,7 +115,6 @@ and query the current run-level via However, since it is not convenient to manage individual services by editing this file, inittab only bootstraps a set of scripts that actually start/stop the individual services. - .SS "Boot Scripts" .TP @@ -131,7 +125,6 @@ as well as the major Linux distributions (RedHat, Debian, Mandrake, Suse, Caldera). Some systems (Slackware Linux, FreeBSD, OpenBSD) have a somewhat different scheme of boot scripts. .LP - For each managed service (mail, nfs server, cron, etc.) there is a single startup script located in a specific directory .RI ( /etc/init.d @@ -142,7 +135,6 @@ the word 'start' \-\- causing it to start the service, or the word accept other "convenience" parameters (e.g: 'restart', to stop and then start, 'status' do display the service status). Running the script without parameters displays the possible arguments. - .SS "Sequencing Directories" To make specific scripts start/stop at specific run-levels and in specific order, there are \fIsequencing directories\fR. These @@ -170,7 +162,6 @@ To manage the boot order and run-levels, we have to manage these links. However, on many versions of Linux, there are tools to help with this task (e.g: .BR chkconfig (8)). - .SS "Boot Configuration" Usually the daemons started may optionally receive command line options and parameters. To allow system administrators to change these @@ -189,7 +180,6 @@ files, and then use the variable values. .IR /etc/init.d/ , .IR /etc/rc[S0\-6].d/ . .I /etc/sysconfig/ - .SH "SEE ALSO" .BR inittab (5), .BR bootparam (7), diff --git a/man7/bootparam.7 b/man7/bootparam.7 index 4df3f2ba0..5a08df228 100644 --- a/man7/bootparam.7 +++ b/man7/bootparam.7 @@ -64,9 +64,7 @@ the DOS driver to twiddle a few mystical registers to put the card into a SB compatible mode. Booting DOS with the supplied driver, and then loading Linux from the DOS prompt with loadlin avoids the reset of the card that happens if one rebooted instead. - .SH "THE ARGUMENT LIST" - The kernel command line is parsed into a list of strings (boot arguments) separated by spaces. Most of the boot args take the form of: @@ -106,11 +104,8 @@ is passed to the init process is the word `single' which instructs init to boot the computer in single user mode, and not launch all the usual daemons. Check the manual page for the version of init installed on your system to see what arguments it accepts. - .SH "GENERAL NON-DEVICE SPECIFIC BOOT ARGS" - .SS "`init=...'" - This sets the initial command to be executed by the kernel. If this is not set, or cannot be found, the kernel will try .IR /etc/init , @@ -121,20 +116,14 @@ then then .IR /bin/sh and panic if all of this fails. - .SS "`nfsaddrs=...'" - This sets the nfs boot address to the given string. This boot address is used in case of a net boot. - .SS "`nfsroot=...'" - This sets the nfs root name to the given string. If this string does not begin with '/' or ',' or a digit, then it is prefixed by `/tftpboot/'. This root name is used in case of a net boot. - .SS "`no387'" - (Only when CONFIG_BUGi386 is defined.) Some i387 coprocessor chips have bugs that show up when used in 32 bit protected mode. For example, some of the early ULSI-387 chips would @@ -142,9 +131,7 @@ cause solid lockups while performing floating point calculations. Using the `no387' boot arg causes Linux to ignore the maths coprocessor even if you have one. Of course you must then have your kernel compiled with math emulation support! - .SS "`no-hlt'" - (Only when CONFIG_BUGi386 is defined.) Some of the early i486DX-100 chips have a problem with the `hlt' instruction, in that they can't reliably return to operating mode @@ -152,9 +139,7 @@ after this instruction is used. Using the `no-hlt' instruction tells Linux to just run an infinite loop when there is nothing else to do, and to not halt the CPU. This allows people with these broken chips to use Linux. - .SS "`root=...'" - This argument tells the kernel what device is to be used as the root filesystem while booting. The default of this setting is determined at compile time, and usually is the value of the root device of the @@ -185,9 +170,7 @@ The more awkward and less portable numeric specification of the above possible root devices in major/minor format is also accepted. (E.g., /dev/sda3 is major 8, minor 3, so you could use `root=0x803' as an alternative.) - .SS "`ro' and `rw'" - The `ro' option tells the kernel to mount the root filesystem as `readonly' so that filesystem consistency check programs (fsck) can do their work on a quiescent file system. No processes can @@ -201,9 +184,7 @@ This is the default. The choice between read-only and read/write can also be set using .BR rdev (8). - .SS "`reserve=...'" - This is used to protect I/O port regions from probes. The form of the command is: .IP @@ -225,9 +206,7 @@ reserve=0x300,32 blah=0x300 .LP keeps all device drivers except the driver for `blah' from probing 0x300-0x31f. - .SS "`mem=...'" - The BIOS call defined in the PC specification that returns the amount of installed memory was only designed to be able to report up to 64MB. Linux uses this BIOS call at boot to @@ -255,12 +234,10 @@ surely eventually.'' You can also use the boot argument `mem=nopentium' to turn off 4 MB pagetables on kernels configured for IA32 systems with a pentium or newer CPU. - .SS "`panic=N'" By default the kernel will not reboot after a panic, but this option will cause a kernel reboot after N seconds (if N > 0). This panic timeout can also be set by "echo N > /proc/sys/kernel/panic". - .SS "`reboot=[warm|cold][,[bios|hard]]'" (Only when CONFIG_BUGi386 is defined.) Since 2.0.22 a reboot is by default a cold reboot. @@ -272,18 +249,13 @@ By default a reboot is hard, by asking the keyboard controller to pulse the reset line low, but there is at least one type of motherboard where that doesn't work. The option `reboot=bios' will instead jump through the BIOS. - .SS "`nosmp'" and "`maxcpus=N'" (Only when __SMP__ is defined.) A command-line option of `nosmp' or `maxcpus=0' will disable SMP activation entirely; an option `maxcpus=N' limits the maximum number of CPUs activated in SMP mode to N. - - .SH "BOOT ARGUMENTS FOR USE BY KERNEL DEVELOPERS" - .SS "`debug'" - Kernel messages are handed off to the kernel log daemon klogd so that they may be logged to disk. Messages with a priority above .I console_loglevel @@ -294,9 +266,7 @@ print the messages of DEBUG priority. The console loglevel can also be set at run time via an option to klogd. See .BR klogd (8). - .SS "`profile=N'" - It is possible to enable a kernel profiling function, if one wishes to find out where the kernel is spending its CPU cycles. Profiling is enabled by setting the variable @@ -318,20 +288,15 @@ Probably you'll want to use a tool such as readprofile.c to digest it. Writing to .I /proc/profile will clear the counters. - .SS "`swap=N1,N2,N3,N4,N5,N6,N7,N8'" Set the eight parameters max_page_age, page_advance, page_decline, page_initial_age, age_cluster_fract, age_cluster_min, pageout_weight, bufferout_weight that control the kernel swap algorithm. For kernel tuners only. - .SS "`buff=N1,N2,N3,N4,N5,N6'" Set the six parameters max_buff_age, buff_advance, buff_decline, buff_initial_age, bufferout_weight, buffermem_grace that control kernel buffer memory management. For kernel tuners only. - - - .SH "BOOT ARGUMENTS FOR RAMDISK USE" (Only if the kernel was compiled with CONFIG_BLK_DEV_RAM.) In general it is a bad idea to use a ramdisk under Linux \(em @@ -354,23 +319,18 @@ in conjunction with the new ramdisk setup), see .IR /usr/src/linux/Documentation/ramdisk.txt . There are four parameters, two boolean and two integral. - .SS "`load_ramdisk=N'" If N=1, do load a ramdisk. If N=0, do not load a ramdisk. (This is the default.) - .SS "`prompt_ramdisk=N'" If N=1, do prompt for insertion of the floppy. (This is the default.) If N=0, do not prompt. (Thus, this parameter is never needed.) - .SS "`ramdisk_size=N' or (obsolete) `ramdisk=N'" Set the maximal size of the ramdisk(s) to N kB. The default is 4096 (4 MB). - .SS "`ramdisk_start=N'" Sets the starting block number (the offset on the floppy where the ramdisk starts) to N. This is needed in case the ramdisk follows a kernel image. - .SS "`noinitrd'" (Only if the kernel was compiled with CONFIG_BLK_DEV_RAM and CONFIG_BLK_DEV_INITRD.) @@ -392,10 +352,7 @@ leave the initrd data under (This device can be used only once: the data is freed as soon as the last process that used it has closed .IR /dev/initrd .) - - .SH "BOOT ARGUMENTS FOR SCSI DEVICES" - General notation for this section: .I iobase @@ -422,9 +379,7 @@ to supply a parity value with all information exchanges. Specifying a one indicates parity checking is enabled, and a zero disables parity checking. Again, not all adapters will support selection of parity behaviour as a boot argument. - .SS "`max_scsi_luns=...'" - A SCSI device can have a number of `sub-devices' contained within itself. The most common example is one of the new SCSI CD-ROMs that handle more than one disk at a time. Each CD is addressed as a @@ -441,9 +396,7 @@ To specify the number of probed LUNs at boot, one enters `max_scsi_luns=n' as a boot arg, where n is a number between one and eight. To avoid problems as described above, one would use n=1 to avoid upsetting such broken devices. - .SS "SCSI tape configuration" - Some boot time configuration of the SCSI tape driver can be achieved by using the following: .IP @@ -463,9 +416,7 @@ st=32,30,2 .LP Full details can be found in the README.st file that is in the scsi directory of the kernel source tree. - .SS "Adaptec aha151x, aha152x, aic6260, aic6360, SB16-SCSI configuration" - The aha numbers refer to cards and the aic numbers refer to the actual SCSI chip on these type of cards, including the Soundblaster-16 SCSI. @@ -488,9 +439,7 @@ aha152x=0x340,11,7,1 Note that the parameters must be specified in order, meaning that if you want to specify a parity setting, then you will have to specify an iobase, irq, scsi-id and reconnect value as well. - .SS "Adaptec aha154x configuration" - The aha1542 series cards have an i82077 floppy controller onboard, while the aha1540 series cards do not. These are busmastering cards, and have parameters to set the ``fairness'' that is used to share @@ -516,9 +465,7 @@ Newer revision cards allow you to select this value as part of the soft-configuration, older cards use jumpers. You can use values up to 10MB/s assuming that your motherboard is capable of handling it. Experiment with caution if using values over 5MB/s. - .SS "Adaptec aha274x, aha284x, aic7xxx configuration" - These boards can accept an argument of the form: .IP .BI aic7xxx= extended,no_reset @@ -530,9 +477,7 @@ disks is enabled. The .I no_reset value, if non-zero, tells the driver not to reset the SCSI bus when setting up the host adaptor at boot. - .SS "AdvanSys SCSI Hosts configuration (`advansys=')" - The AdvanSys driver can accept up to four i/o addresses that will be probed for an AdvanSys SCSI card. Note that these values (if used) do not effect EISA or PCI probing in any way. They are only used for @@ -540,12 +485,9 @@ probing ISA and VLB cards. In addition, if the driver has been compiled with debugging enabled, the level of debugging output can be set by adding an 0xdeb[0-f] parameter. The 0-f allows setting the level of the debugging messages to any of 16 levels of verbosity. - .SS "AM53C974" .IP .BI AM53C974= host-scsi-id,target-scsi-id,max-rate,max-offset -.LP - .SS "BusLogic SCSI Hosts configuration (`BusLogic=')" .IP .BI BusLogic= N1,N2,N3,N4,N5,S1,S2,... @@ -571,23 +513,16 @@ The string options are used to provide control over Tagged Queuing Error Recovery (ER:Default, ER:HardReset, ER:BusDeviceReset, ER:None, ER:), and over Host Adapter Probing (NoProbe, NoProbeISA, NoSortPCI). - .SS "EATA/DMA configuration" The default list of i/o ports to be probed can be changed by .IP .BI eata= iobase,iobase,... . -.LP - .SS "Future Domain TMC-16x0 configuration" .IP .BI fdomain= iobase,irq[,adapter_id] -.LP - .SS "Great Valley Products (GVP) SCSI controller configuration" .IP .BI gvp11= dma_transfer_bitmask -.LP - .SS "Future Domain TMC-8xx, TMC-950 configuration" .IP .BI tmc8xx= mem_base,irq @@ -597,7 +532,6 @@ The value is the value of the memory mapped I/O region that the card uses. This will usually be one of the following values: 0xc8000, 0xca000, 0xcc000, 0xce000, 0xdc000, 0xde000. - .SS "IN2000 configuration" .IP .BI in2000= S @@ -607,7 +541,6 @@ Recognized keywords (possibly with value) are: ioport:addr, noreset, nosync:x, period:ns, disconnect:x, debug:x, proc:x. For the function of these parameters, see .IR /usr/src/linux/drivers/scsi/in2000.c . - .SS "NCR5380 and NCR53C400 configuration" The boot arg is of the form .IP @@ -621,7 +554,6 @@ If the card doesn't use interrupts, then an IRQ value of 255 (0xff) will disable interrupts. An IRQ value of 254 means to autoprobe. More details can be found in the file .IR /usr/src/linux/drivers/scsi/README.g_NCR5380 . - .SS "NCR53C8xx configuration" .IP .BI ncr53c8xx= S @@ -633,16 +565,13 @@ fsn (force_sync_nego), tags (default_tags), sync (default_sync), verb (verbose), debug (debug), burst (burst_max). For the function of the assigned values, see .IR /usr/src/linux/drivers/scsi/ncr53c8xx.c . - .SS "NCR53c406a configuration" .IP .BI ncr53c406a= iobase[,irq[,fastpio]] .LP Specify irq = 0 for non-interrupt driven mode. Set fastpio = 1 for fast pio mode, 0 for slow mode. - .SS "Pro Audio Spectrum configuration" - The PAS16 uses a NC5380 SCSI chip, and newer models support jumperless configuration. The boot arg is of the form: .IP @@ -651,9 +580,7 @@ jumperless configuration. The boot arg is of the form: The only difference is that you can specify an IRQ value of 255, which will tell the driver to work without using interrupts, albeit at a performance loss. The iobase is usually 0x388. - .SS "Seagate ST-0x configuration" - If your card is not detected at boot time, you will then have to use a boot arg of the form: .IP @@ -664,9 +591,7 @@ The value is the value of the memory mapped I/O region that the card uses. This will usually be one of the following values: 0xc8000, 0xca000, 0xcc000, 0xce000, 0xdc000, 0xde000. - .SS "Trantor T128 configuration" - These cards are also based on the NCR5380 chip, and accept the following options: .IP @@ -675,18 +600,13 @@ following options: The valid values for .I mem_base are as follows: 0xcc000, 0xc8000, 0xdc000, 0xd8000. - .SS "UltraStor 14F/34F configuration" The default list of i/o ports to be probed can be changed by .IP .BI eata= iobase,iobase,... . -.LP - .SS "WD7000 configuration" .IP .BI wd7000= irq,dma,iobase -.LP - .SS "Commodore Amiga A2091/590 SCSI controller configuration" .IP .BI wd33c93= S @@ -695,11 +615,8 @@ where S is a comma-separated string of options. Recognized options are nosync:bitmask, nodma:x, period:ns, disconnect:x, debug:x, clock:x, next. For details, see .IR /usr/src/linux/drivers/scsi/wd33c93.c . - .SH "HARD DISKS" - .SS "IDE Disk/CD-ROM Driver Parameters" - The IDE driver accepts a number of parameters, which range from disk geometry specifications, to support for broken controller chips. Drive specific options are specified by using `hdX=' with X in `a'-`h'. @@ -712,32 +629,24 @@ Also note that `hd=' can be used to refer to the next unspecified drive in the (a, ..., h) sequence. For the following discussions, the `hd=' option will be cited for brevity. See the file README.ide in linux/drivers/block for more details. - .SS "The `hd=cyls,heads,sects[,wpcom[,irq]]' options" - These options are used to specify the physical geometry of the disk. Only the first three values are required. The cylinder/head/sectors values will be those used by fdisk. The write precompensation value is ignored for IDE disks. The IRQ value specified will be the IRQ used for the interface that the drive resides on, and is not really a drive specific parameter. - .SS "The `hd=serialize' option" - The dual IDE interface CMD-640 chip is broken as designed such that when drives on the secondary interface are used at the same time as drives on the primary interface, it will corrupt your data. Using this option tells the driver to make sure that both interfaces are never used at the same time. - .SS "The `hd=dtc2278' option" - This option tells the driver that you have a DTC-2278D IDE interface. The driver then tries to do DTC specific operations to enable the second interface and to enable faster transfer modes. - .SS "The `hd=noprobe' option" - Do not probe for this drive. For example, .IP hdb=noprobe hdb=1166,7,17 @@ -745,20 +654,14 @@ hdb=noprobe hdb=1166,7,17 would disable the probe, but still specify the drive geometry so that it would be registered as a valid block device, and hence usable. - .SS "The `hd=nowerr' option" - Some drives apparently have the WRERR_STAT bit stuck on permanently. This enables a work-around for these broken devices. - .SS "The `hd=cdrom' option" - This tells the IDE driver that there is an ATAPI compatible CD-ROM attached in place of a normal IDE hard disk. In most cases the CD-ROM is identified automatically, but if it isn't then this may help. - .SS "Standard ST-506 Disk Driver Options (`hd=')" - The standard disk driver can accept geometry arguments for the disks similar to the IDE driver. Note however that it only expects three values (C/H/S); any more or any less and it will silently ignore @@ -769,9 +672,7 @@ hd=cyls,heads,sects .LP If there are two disks installed, the above is repeated with the geometry parameters of the second disk. - .SS "XT Disk Driver Options (`xd=')" - If you are unfortunate enough to be using one of these old 8 bit cards that move data at a whopping 125kB/s then here is the scoop. If the card is not recognised, you will have to use a boot arg of the form: @@ -797,17 +698,12 @@ example usage for a WD1002 controller with the BIOS disabled/removed, using the `default' XT controller parameters: .IP xd=2,5,0x320,3 -.LP - .SS "Syquest's EZ* removable disks" .IP .BI ez= iobase[,irq[,rep[,nybble]]] -.LP - .SH "IBM MCA BUS DEVICES" See also .IR /usr/src/linux/Documentation/mca.txt . - .SS "PS/2 ESDI hard disks" It is possible to specify the desired geometry at boot time: .IP @@ -816,18 +712,12 @@ It is possible to specify the desired geometry at boot time: For a ThinkPad-720, add the option .IP .BR tp720=1 . -.LP - .SS "IBM Microchannel SCSI Subsystem configuration" .IP .BI ibmmcascsi= N .LP where N is the \fIpun\fP (SCSI ID) of the subsystem. - -.SH "CD-ROMs (Non-SCSI/ATAPI/IDE)" - .SS "The Aztech Interface" - The syntax for this type of card is: .IP aztcd=iobase[,magic_number] @@ -835,7 +725,6 @@ aztcd=iobase[,magic_number] If you set the magic_number to 0x79 then the driver will try and run anyway in the event of an unknown firmware version. All other values are ignored. - .SS "Parallel port CD-ROM drives" Syntax: .IP @@ -849,9 +738,7 @@ to choose the best automatically), `slv' is 1 if it should be a slave, and `dly' is a small integer for slowing down port accesses. The `nice' parameter controls the driver's use of idle CPU time, at the expense of some speed. - .SS "The CDU-31A and CDU-33A Sony Interface" - This CD-ROM interface is found on some of the Pro Audio Spectrum sound cards, and other Sony supplied interface cards. The syntax is as follows: @@ -867,23 +754,17 @@ The .I is_pas_card should be entered as `PAS' if using a Pro Audio Spectrum card, and otherwise it should not be specified at all. - .SS "The CDU-535 Sony Interface" - The syntax for this CD-ROM interface is: .IP sonycd535=iobase[,irq] .LP A zero can be used for the I/O base as a `placeholder' if one wishes to specify an IRQ value. - .SS "The GoldStar Interface" - The syntax for this CD-ROM interface is: .IP gscd=iobase -.LP - .SS "The ISP16 CD-ROM Interface" Syntax: .IP @@ -892,9 +773,7 @@ isp16=[iobase[,irq[,dma[,type]]]] (three integers and a string). If the type is given as `noisp16', the interface will not be configured. Other recognized types are: `Sanyo", `Sony', `Panasonic' and `Mitsumi'. - .SS "The Mitsumi Standard Interface" - The syntax for this CD-ROM interface is: .IP mcd=iobase,[irq[,wait_value]] @@ -906,43 +785,29 @@ having problems with their drive, and may or may not be implemented depending on a compile time #define. The Mitsumi FX400 is an IDE/ATAPI CD-ROM player and does not use the mcd driver. - .SS "The Mitsumi XA/MultiSession Interface" - This is for the same hardware as above, but the driver has extended features. Syntax: .IP mcdx=iobase[,irq] -.LP - .SS "The Optics Storage Interface" - The syntax for this type of card is: .IP optcd=iobase -.LP - .SS "The Phillips CM206 Interface" - The syntax for this type of card is: .IP cm206=[iobase][,irq] .LP - The driver assumes numbers between 3 and 11 are IRQ values, and numbers between 0x300 and 0x370 are I/O ports, so you can specify one, or both numbers, in any order. It also accepts `cm206=auto' to enable autoprobing. - .SS "The Sanyo Interface" - The syntax for this type of card is: .IP sjcd=iobase[,irq[,dma_channel]] -.LP - .SS "The SoundBlaster Pro Interface" - The syntax for this type of card is: .IP sbpcd=iobase,type @@ -950,9 +815,7 @@ sbpcd=iobase,type where type is one of the following (case sensitive) strings: `SoundBlaster', `LaserMate', or `SPEA'. The I/O base is that of the CD-ROM interface, and not that of the sound portion of the card. - .SH "ETHERNET DEVICES" - Different drivers make use of different parameters, but they all at least share having an IRQ, an I/O port base value, and a name. In its most generic form, it looks something like this: @@ -978,83 +841,55 @@ The Ethernet-HowTo has extensive documentation on using multiple cards and on the card/driver specific implementation of the param_n values where used. Interested readers should refer to the section in that document on their particular card. - .SH "THE FLOPPY DISK DRIVER" - There are many floppy driver options, and they are all listed in README.fd in linux/drivers/block. This information is taken directly from that file. - .SS "floppy=mask,allowed_drive_mask" - Sets the bitmask of allowed drives to mask. By default, only units 0 and 1 of each floppy controller are allowed. This is done because certain non-standard hardware (ASUS PCI motherboards) mess up the keyboard when accessing units 2 or 3. This option is somewhat obsoleted by the cmos option. - .SS "floppy=all_drives" - Sets the bitmask of allowed drives to all drives. Use this if you have more than two drives connected to a floppy controller. - .SS "floppy=asus_pci" - Sets the bitmask to allow only units 0 and 1. (The default) - .SS "floppy=daring" - Tells the floppy driver that you have a well behaved floppy controller. This allows more efficient and smoother operation, but may fail on certain controllers. This may speed up certain operations. - .SS "floppy=0,daring" - Tells the floppy driver that your floppy controller should be used with caution. - .SS "floppy=one_fdc" - Tells the floppy driver that you have only floppy controller (default) - .SS "floppy=two_fdc or floppy=address,two_fdc" - Tells the floppy driver that you have two floppy controllers. The second floppy controller is assumed to be at address. If address is not given, 0x370 is assumed. - .SS "floppy=thinkpad" - Tells the floppy driver that you have a Thinkpad. Thinkpads use an inverted convention for the disk change line. - .SS "floppy=0,thinkpad" - Tells the floppy driver that you don't have a Thinkpad. - .SS "floppy=drive,type,cmos" - Sets the cmos type of drive to type. Additionally, this drive is allowed in the bitmask. This is useful if you have more than two floppy drives (only two can be described in the physical cmos), or if your BIOS uses non-standard CMOS types. Setting the CMOS to 0 for the first two drives (default) makes the floppy driver read the physical cmos for those drives. - .SS "floppy=unexpected_interrupts" - Print a warning message when an unexpected interrupt is received (default behaviour) - .SS "floppy=no_unexpected_interrupts or floppy=L40SX" - Don't print a message when an unexpected interrupt is received. This is needed on IBM L40SX laptops in certain video modes. (There seems to be an interaction between video and floppy. The unexpected interrupts only affect performance, and can safely be ignored.) - .SH "THE SOUND DRIVER" - The sound driver can also accept boot args to override the compiled in values. This is not recommended, as it is rather complex. It is described in the Readme.Linux file, in linux/drivers/sound. It accepts @@ -1077,10 +912,7 @@ d \- DMA channel. As you can see it gets pretty messy, and you are better off to compile in your own personal values as recommended. Using a boot arg of `sound=0' will disable the sound driver entirely. - - .SH "ISDN DRIVERS" - .SS "The ICN ISDN driver" Syntax: .IP @@ -1088,7 +920,6 @@ icn=iobase,membase,icn_id1,icn_id2 .LP where icn_id1,icn_id2 are two strings used to identify the card in kernel messages. - .SS "The PCBIT ISDN driver" Syntax: .IP @@ -1097,7 +928,6 @@ pcbit=membase1,irq1[,membase2,irq2] where membaseN is the shared memory base of the N'th card, and irqN is the interrupt setting of the N'th card. The default is IRQ 5 and membase 0xD0000. - .SS "The Teles ISDN driver" Syntax: .IP @@ -1106,9 +936,7 @@ teles=iobase,irq,membase,protocol,teles_id where iobase is the i/o port address of the card, membase is the shared memory base address of the card, irq is the interrupt channel the card uses, and teles_id is the unique ASCII string identifier. - .SH "SERIAL PORT DRIVERS" - .SS "The RISCom/8 Multiport Serial Driver (`riscom8=')" Syntax: .IP @@ -1116,7 +944,6 @@ riscom=iobase1[,iobase2[,iobase3[,iobase4]]] .LP More details can be found in .IR /usr/src/linux/Documentation/riscom8.txt . - .SS "The DigiBoard Driver (`digi=')" If this option is used, it should have precisely six parameters. Syntax: @@ -1141,7 +968,6 @@ digi=1,0,0,16,0x200,851968 .LP More details can be found in .IR /usr/src/linux/Documentation/digiboard.txt . - .SS "The Baycom Serial/Parallel Radio Modem" Syntax: .IP @@ -1154,7 +980,6 @@ Here the * denotes that software DCD is to be used, and ser12/par96 chooses between the supported modem types. For more details, see .IR /usr/src/linux/drivers/net/README.baycom . - .SS "Soundcard radio modem driver" Syntax: .IP @@ -1165,9 +990,7 @@ the dummy 0 is required because of a bug in the setup code. The mode parameter is a string with syntax hw:modem, where hw is one of sbc, wss, wssfdx and modem is one of afsk1200, fsk9600. - .SH "THE LINE PRINTER DRIVER" - .SS "`lp='" Syntax: .IP @@ -1188,22 +1011,16 @@ The format of the argument is multiple port names. For example, lp=none,parport0 would use the first parallel port for lp1, and disable lp0. To disable the printer driver entirely, one can use lp=0. - .SS "WDT500/501 driver" Syntax: .IP wdt=io,irq -.LP - .SH "MOUSE DRIVERS" - .SS "`bmouse=irq'" The busmouse driver only accepts one parameter, that being the hardware IRQ value to be used. - .SS "`msmouse=irq'" And precisely the same is true for the msmouse driver. - .SS "ATARI mouse setup" .LP atamouse=threshold[,y-threshold] @@ -1212,18 +1029,14 @@ If only one argument is given, it is used for both x-threshold and y-threshold. Otherwise, the first argument is the x-threshold, and the second the y-threshold. These values must lie between 1 and 20 (inclusive); the default is 2. - .SH "VIDEO HARDWARE" - .SS "`no-scroll'" This option tells the console driver not to use hardware scroll (where a scroll is effected by moving the screen origin in video memory, instead of moving the data). It is required by certain Braille machines. - .SH AUTHORS Linus Torvalds (and many others) - .SH "SEE ALSO" .BR lilo.conf (5), .BR klogd (8), diff --git a/man7/charsets.7 b/man7/charsets.7 index dd4d371af..9b1cb7ecd 100644 --- a/man7/charsets.7 +++ b/man7/charsets.7 @@ -31,7 +31,6 @@ A complete list of charsets used in a officially supported locale in glibc 2.2.3 is: ISO-8859-{1,2,3,5,6,7,8,9,13,15}, CP1251, UTF-8, EUC-{KR,JP,TW}, KOI8-{R,U}, GB2312, GB18030, GBK, BIG5, BIG5-HKSCS and TIS-620 (in no particular order.) (Romanian may be switching to ISO-8859-16.) - .SH ASCII ASCII (American Standard Code For Information Interchange) is the original 7-bit character set, originally designed for American English. It is @@ -46,7 +45,6 @@ relative of ASCII that permitted replacing these characters.) .LP As Linux was written for hardware designed in the US, it natively supports ASCII. - .SH ISO 8859 ISO 8859 is a series of 15 8-bit character sets all of which have US ASCII in their low (7-bit) half, invisible control characters in @@ -151,7 +149,6 @@ are ISO-2022 compatible, unlike the ISO-8859 series. Console support for KOI8-R is available under Linux through user-mode utilities that modify keyboard bindings and the EGA graphics table, and employ the "user mapping" font table in the console driver. - .\" Thanks to Tomohiro KUBOTA for the following sections about .\" national standards. .SH JIS X 0208 @@ -167,7 +164,6 @@ and ISO-2022-JP. EUC-JP is the most important encoding for Linux and includes US ASCII and JIS X 0208. In EUC-JP, JIS X 0208 characters are expressed in two bytes, each of which is the JIS X 0208 code plus 0x80. - .SH KS X 1001 KS X 1001 is a Korean national standard character set. Just as JIS X 0208, characters are mapped into a 94x94 two-byte matrix. @@ -175,14 +171,12 @@ KS X 1001 is used like JIS X 0208, as a component to construct encodings such as EUC-KR, Johab, and ISO-2022-KR. EUC-KR is the most important encoding for Linux and includes US ASCII and KS X 1001. KS C 5601 is an older name for KS X 1001. - .SH GB 2312 GB 2312 is a mainland Chinese national standard character set used to express simplified Chinese. Just like JIS X 0208, characters are mapped into a 94x94 two-byte matrix used to construct EUC-CN. EUC-CN is the most important encoding for Linux and includes US ASCII and GB 2312. Note that EUC-CN is often called as GB, GB 2312, or CN-GB. - .SH Big5 Big5 is a popular character set in Taiwan to express traditional Chinese. (Big5 is both a character set and an encoding.) It is a @@ -190,13 +184,11 @@ superset of US ASCII. Non-ASCII characters are expressed in two bytes. Bytes 0xa1-0xfe are used as leading bytes for two-byte characters. Big5 and its extension is widely used in Taiwan and Hong Kong. It is not ISO 2022-compliant. - .SH TIS 620 TIS 620 is a Thai national standard character set and a superset of US ASCII. Like ISO 8859 series, Thai characters are mapped into 0xa1-0xfe. TIS 620 is the only commonly used character set under Linux besides UTF-8 to have combining characters. - .SH UNICODE Unicode (ISO 10646) is a standard which aims to unambiguously represent every character in every human language. Unicode's structure permits 20.1 bits @@ -253,7 +245,6 @@ Korean, but it is enough for most other purposes. At the current time, the console driver does not handle combining characters. So Thai, Sioux and any other script needing combining characters can't be handled on the console. - .SH "ISO 2022 AND ISO 4873" The ISO 2022 and 4873 standards describe a font-control model based on VT100 practice. This model is (partially) supported @@ -311,7 +302,6 @@ can only be invoked for codes with the high order bit set. In particular, ^N and ^O are not used anymore, ESC ( xx can be used only with xx=B, and ESC ) xx, ESC * xx, ESC + xx are equivalent to ESC \- xx, ESC . xx, ESC / xx, respectively. - .SH "SEE ALSO" .BR console (4), .BR console_codes (4), diff --git a/man7/complex.7 b/man7/complex.7 index 4da24a584..1978e7297 100644 --- a/man7/complex.7 +++ b/man7/complex.7 @@ -32,13 +32,16 @@ Your C-compiler can work with complex numbers if it supports the C99 standard. Link with \-lm. The imaginary unit is represented by I. .sp .nf -/* check that exp(i*pi) == \-1 */ +/* check that exp(i * pi) == \-1 */ #include /* for atan */ #include -main() { - double pi = 4*atan(1); - complex z = cexp(I*pi); - printf("%f+%f*i\\n", creal(z), cimag(z)); + +int +main(void) +{ + double pi = 4 * atan(1); + complex z = cexp(I * pi); + printf("%f + %f * i\\n", creal(z), cimag(z)); } .fi .SH "SEE ALSO" diff --git a/man7/ddp.7 b/man7/ddp.7 index 83358e7a7..0b5166533 100644 --- a/man7/ddp.7 +++ b/man7/ddp.7 @@ -132,13 +132,11 @@ The timer rate (in seconds) for the timer driving AARP. .PP The default values match the specification and should never need to be changed. - .SH IOCTLS All ioctls described in .BR socket (7) apply to ddp. .\" FIXME Add a section about multicasting - .SH NOTES Be very careful with the .B SO_BROADCAST diff --git a/man7/epoll.7 b/man7/epoll.7 index 1d66a3583..02f288370 100644 --- a/man7/epoll.7 +++ b/man7/epoll.7 @@ -79,7 +79,6 @@ A call to .BR epoll_wait (2) is done. .PP - If the .B RFD file descriptor has been added to the @@ -183,8 +182,8 @@ struct epoll_event ev, *events; for(;;) { nfds = epoll_wait(kdpfd, events, maxevents, \-1); - for(n = 0; n < nfds; ++n) { - if(events[n].data.fd == listener) { + for (n = 0; n < nfds; ++n) { + if (events[n].data.fd == listener) { client = accept(listener, (struct sockaddr *) &local, &addrlen); if(client < 0){ @@ -199,9 +198,9 @@ for(;;) { client); return \-1; } - } - else + } else { do_use_fd(events[n].data.fd); + } } } .fi @@ -220,9 +219,7 @@ calling .BR epoll_ctl (2) with .BR EPOLL_CTL_MOD . - .SH QUESTIONS AND ANSWERS - .TP .B Q1 What happens if you add the same fd to an epoll_set twice? @@ -322,7 +319,6 @@ it the other files will not get processed causing starvation. This is not specific to .BR epoll . .PP -.PP The solution is to maintain a ready list and mark the file descriptor as ready in its associated data structure, thereby allowing the application to remember which files need to be processed but still round robin amongst diff --git a/man7/glob.7 b/man7/glob.7 index 30a188f6c..0b0048472 100644 --- a/man7/glob.7 +++ b/man7/glob.7 @@ -46,7 +46,6 @@ A `?' (not between brackets) matches any single character. A `*' (not between brackets) matches any string, including the empty string. - .SS "Character classes" An expression `[...]' where the first character after the leading `[' is not an `!' matches a single character, @@ -55,7 +54,6 @@ The string enclosed by the brackets cannot be empty; therefore `]' can be allowed between the brackets, provided that it is the first character. (Thus, `[][!]' matches the three characters `[', `]' and `!'.) - .SS Ranges There is one special convention: two characters separated by `\-' denote a range. @@ -65,7 +63,6 @@ first or last character between the brackets. (Thus, `[]\-]' matches just the two characters `]' and `\-', and `[\-\-0]' matches the three characters `\-', `.', `0', since `/' cannot be matched.) - .SS Complementation An expression `[!...]' matches a single character, namely any character that is not matched by the expression obtained @@ -77,7 +74,6 @@ preceding them by a backslash, or, in case this is part of a shell command line, enclosing them in quotes. Between brackets these characters stand for themselves. Thus, `[[?*\e]' matches the four characters `[', `?', `*' and `\e'. - .SH PATHNAMES Globbing is applied on each of the components of a pathname separately. A `/' in a pathname cannot be matched by a `?' or `*' @@ -87,7 +83,6 @@ explicit `/' character; this would lead to a syntax error. If a filename starts with a `.', this character must be matched explicitly. (Thus, `rm *' will not remove .profile, and `tar c *' will not archive all your files; `tar c .' is better.) - .SH "EMPTY LISTS" The nice and simple rule given above: `expand a wildcard pattern into the list of matching pathnames' was the original Unix @@ -120,7 +115,6 @@ new scripts require to avoid error messages from .I rm called with an empty argument list.) - .SH NOTES .SS Regular expressions Note that wildcard patterns are not regular expressions, @@ -132,7 +126,6 @@ more copies of the preceding thing. Now that regular expressions have bracket expressions where the negation is indicated by a `^', POSIX has declared the effect of a wildcard pattern `[^...]' to be undefined. - .SS Character classes and Internationalization Of course ranges were originally meant to be ASCII ranges, so that `[\ \-%]' stands for `[\ !"#$%]' and `[a\-z]' stands @@ -155,11 +148,12 @@ and Y (inclusive) in the current collating sequence as defined by the LC_COLLATE category in the current locale. (iv) Named character classes, like -.br .nf + [:alnum:] [:alpha:] [:blank:] [:cntrl:] [:digit:] [:graph:] [:lower:] [:print:] [:punct:] [:space:] [:upper:] [:xdigit:] + .fi so that one can say `[[:lower:]]' instead of `[a\-z]', and have things work in Denmark, too, where there are three letters past `z' @@ -178,7 +172,6 @@ element from its equivalence class, as defined for the current locale. For example, `[[=a=]]' might be equivalent to `[aáàäâ]' (warning: Latin-1 here), that is, to `[a[.a-acute.][.a-grave.][.a-umlaut.][.a-circumflex.]]'. - .SH "SEE ALSO" .BR sh (1), .BR fnmatch (3), diff --git a/man7/icmp.7 b/man7/icmp.7 index 4c4819a8b..738dc2c73 100644 --- a/man7/icmp.7 +++ b/man7/icmp.7 @@ -105,7 +105,6 @@ Linux ICMP internally uses a raw socket to send ICMPs. This raw socket may appear in .BR netstat (8) output with a zero inode. -.PP .SH VERSIONS Support for the .B ICMP_ADDRESS diff --git a/man7/ip.7 b/man7/ip.7 index e04561ac7..1a60c3a40 100644 --- a/man7/ip.7 +++ b/man7/ip.7 @@ -96,7 +96,6 @@ unless the .B SO_REUSEADDR flag has been set. Care should be taken when using this flag as it makes TCP less reliable. - .SH "ADDRESS FORMAT" An IP socket address is defined as a combination of an IP interface address and a 16-bit port number. @@ -192,7 +191,6 @@ means any host and has the same effect on bind as .B INADDR_ANY for historical reasons. .SH "SOCKET OPTIONS" - IP supports some protocol specific socket options that can be set with .BR setsockopt (2) and read with @@ -850,7 +848,6 @@ capability); binding to a reserved port without superuser privileges (the .B CAP_NET_BIND_SERVICE capability). - .TP .B EADDRINUSE Tried to bind to an address already in use. diff --git a/man7/ipv6.7 b/man7/ipv6.7 index 7a1d40814..8e2fd6542 100644 --- a/man7/ipv6.7 +++ b/man7/ipv6.7 @@ -12,7 +12,6 @@ ipv6, PF_INET6 \- Linux IPv6 protocol implementation .br .B #include .sp -.sp .IB tcp6_socket " = socket(PF_INET6, SOCK_STREAM, 0);" .br .IB raw6_socket " = socket(PF_INET6, SOCK_RAW, " protocol ");" @@ -62,19 +61,17 @@ to v6 and it'll be mapped to v6. .sp .RS .nf -.ta 4n 5n 20n struct sockaddr_in6 { - u_int16_t sin6_family; /* AF_INET6 */ - u_int16_t sin6_port; /* port number */ - u_int32_t sin6_flowinfo; /* IPv6 flow information */ - struct in6_addr sin6_addr; /* IPv6 address */ - u_int32_t sin6_scope_id; /* Scope ID (new in 2.4) */ + u_int16_t sin6_family; /* AF_INET6 */ + u_int16_t sin6_port; /* port number */ + u_int32_t sin6_flowinfo; /* IPv6 flow information */ + struct in6_addr sin6_addr; /* IPv6 address */ + u_int32_t sin6_scope_id; /* Scope ID (new in 2.4) */ }; struct in6_addr { - unsigned char s6_addr[16]; /* IPv6 address */ + unsigned char s6_addr[16]; /* IPv6 address */ }; -.ta .fi .RE .sp diff --git a/man7/iso_8859-1.7 b/man7/iso_8859-1.7 index 188d20440..c0f574edd 100644 --- a/man7/iso_8859-1.7 +++ b/man7/iso_8859-1.7 @@ -44,7 +44,6 @@ Note that the ISO 8859-1 characters are also the first 256 characters of ISO 10646 (Unicode). .SS "ISO 8859 Alphabets" The full set of ISO 8859 alphabets includes: -.P .TS l l. ISO 8859-1 West European languages (Latin-1) @@ -69,7 +68,6 @@ which are printable and unlisted in the .BR ascii (7) manual page. The fourth column will only show the proper glyphs in an environment configured for ISO 8859-1. - .TS l l l c lp-1. Oct Dec Hex Char Description diff --git a/man7/iso_8859-15.7 b/man7/iso_8859-15.7 index 138f80435..9946d305a 100644 --- a/man7/iso_8859-15.7 +++ b/man7/iso_8859-15.7 @@ -42,7 +42,6 @@ Italian, Latin, Luxemburgish, Norwegian, Portuguese, Rhaeto-Romanic, Scottish Gaelic, Spanish, and Swedish. .SS "ISO 8859 Alphabets" The full set of ISO 8859 alphabets includes: -.P .TS l l. ISO 8859-1 West European languages (Latin-1) @@ -67,7 +66,6 @@ which are printable and unlisted in the .BR ascii (7) manual page. The fourth column will only show the proper glyphs in an environment configured for ISO 8859-15. - .TS l l l c lp-1. Oct Dec Hex Char Description diff --git a/man7/iso_8859-16.7 b/man7/iso_8859-16.7 index 085929cd5..303f9cad8 100644 --- a/man7/iso_8859-16.7 +++ b/man7/iso_8859-16.7 @@ -38,10 +38,8 @@ Romanian, Slovenian and Serbian. .P Also note that the following Cyrillic-based languages have one-to-one transliterations to Latin 10: Macedonian and Serbian. -.P .SS "ISO 8859 Alphabets" The full set of ISO 8859 alphabets includes: -.P .TS l l. ISO 8859-1 West European languages (Latin-1) @@ -66,7 +64,6 @@ which are printable and unlisted in the .BR ascii (7) manual page. The fourth column will only show the proper glyphs in an environment configured for ISO 8859-16. - .TS l l l c lp-1. Oct Dec Hex Char Description diff --git a/man7/iso_8859-2.7 b/man7/iso_8859-2.7 index fb781f912..4a859395d 100644 --- a/man7/iso_8859-2.7 +++ b/man7/iso_8859-2.7 @@ -41,10 +41,8 @@ Slovak, Slovenian and Sorbian. .P Also note that the following Cyrillic-based languages have one-to-one transliterations to Latin 2: Macedonian and Serbian. -.P .SS "ISO 8859 Alphabets" The full set of ISO 8859 alphabets includes: -.P .TS l l. ISO 8859-1 West European languages (Latin-1) @@ -69,7 +67,6 @@ which are printable and unlisted in the .BR ascii (7) manual page. The fourth column will only show the proper glyphs in an environment configured for ISO 8859-2. - .TS l l l c lp-1. Oct Dec Hex Char Description diff --git a/man7/iso_8859-7.7 b/man7/iso_8859-7.7 index 6dc1e48c5..225100480 100644 --- a/man7/iso_8859-7.7 +++ b/man7/iso_8859-7.7 @@ -31,7 +31,6 @@ character set (also known as ISO 646-IRV). ISO 8859-7 encodes the characters used in modern monotonic Greek. .SS "ISO 8859 Alphabets" The full set of ISO 8859 alphabets includes: -.P .TS l l. ISO 8859-1 West European languages (Latin-1) @@ -56,7 +55,6 @@ are printable and unlisted in the .BR ascii (7) manual page. The fourth column will only show the proper glyphs in an environment configured for ISO 8859-7. - .TS l l l c lp-1. Oct Dec Hex Char Description diff --git a/man7/iso_8859-9.7 b/man7/iso_8859-9.7 index a15a445cc..9ab429d7b 100644 --- a/man7/iso_8859-9.7 +++ b/man7/iso_8859-9.7 @@ -31,7 +31,6 @@ character set (also known as ISO 646-IRV). ISO 8859-9, also known as the "Latin Alphabet No. 5", encodes the characters used in Turkish. .SS "ISO 8859 Alphabets" The full set of ISO 8859 alphabets includes: -.P .TS l l. ISO 8859-1 West European languages (Latin-1) @@ -56,7 +55,6 @@ which are printable and unlisted in the .BR ascii (7) manual page. The fourth column will only show the proper glyphs in an environment configured for ISO 8859-9. - .TS l l l c lp-1. Oct Dec Hex Char Description diff --git a/man7/koi8-r.7 b/man7/koi8-r.7 index aa7c56c07..9d1529ef6 100644 --- a/man7/koi8-r.7 +++ b/man7/koi8-r.7 @@ -35,7 +35,6 @@ services at least all over the ex-SU territory. .PP KOI8-R is defined by RFC\ 1489 (Registration of a Cyrillic Character Set). - .SH NOTE KOI8-R was designed for mixed Russian/English texts and covers only Russian Cyrillic characters, so if you're looking for Ukrainian, @@ -46,7 +45,6 @@ area. .PP A more complete set of Cyrillic characters is also defined by the ISO-8859-5 character set. - .SS "KOI8-R Characters" The following table displays the characters in KOI8-R, which are printable and unlisted in the diff --git a/man7/netdevice.7 b/man7/netdevice.7 index f3d57350f..b3ab1d9dc 100644 --- a/man7/netdevice.7 +++ b/man7/netdevice.7 @@ -60,7 +60,6 @@ Normally, the user specifies which device to affect by setting .B ifr_name to the name of the interface. All other members of the structure may share memory. - .SH IOCTLS If an ioctl is marked as privileged then using it requires an effective user ID of 0 or the @@ -68,7 +67,6 @@ user ID of 0 or the capability. If this is not the case .B EPERM will be returned. - .TP .B SIOCGIFNAME Given the @@ -77,18 +75,15 @@ return the name of the interface in .BR ifr_name . This is the only ioctl which returns its result in .BR ifr_name . - .TP .B SIOCGIFINDEX Retrieve the interface index of the interface into .BR ifr_ifindex . - .TP .BR SIOCGIFFLAGS ", " SIOCSIFFLAGS Get or set the active flag word of the device. .B ifr_flags contains a bitmask of the following values: - .TS tab(:); c s @@ -113,7 +108,6 @@ IFF_DYNAMIC:T{ The addresses are lost when the interface goes down. T} .TE - Setting the active flag word is a privileged operation, but any process may read it. .TP diff --git a/man7/netlink.7 b/man7/netlink.7 index 7856d357b..39aca26e2 100644 --- a/man7/netlink.7 +++ b/man7/netlink.7 @@ -263,7 +263,6 @@ It is up to the application to detect when this happens (via the error returned by .BR recvmsg (2)) and resynchronise. - .SH "ADDRESS FORMATS" The .I sockaddr_nl @@ -338,7 +337,6 @@ Only processes with an effective UID of 0 or the capability may send or listen to a netlink multicast group. Any replies to a message received for a multicast group should be sent back to the sending PID and the multicast group. - .SH EXAMPLE The following example creates a .B NETLINK_ROUTE @@ -352,7 +350,7 @@ netlink socket which will listen to the .nf struct sockaddr_nl sa; -memset (&sa, 0, sizeof(sa)); +memset(&sa, 0, sizeof(sa)); snl.nl_family = AF_NETLINK; snl.nl_groups = RTMGRP_LINK | RTMGRP_IPV4_IFADDR; @@ -374,14 +372,14 @@ struct iovec iov = { (void *) nh, nh->nlmsg_len }; struct msghdr msg; msg = { (void *)&sa, sizeof(sa), &iov, 1, NULL, 0, 0 }; -memset (&sa, 0, sizeof(sa)); +memset(&sa, 0, sizeof(sa)); sa.nl_family = AF_NETLINK; nh->nlmsg_pid = 0; nh->nlmsg_seq = ++sequence_number; /* Request an ack from kernel by setting NLM_F_ACK. */ nh->nlmsg_flags |= NLM_F_ACK; -sendmsg (fd, &msg, 0); +sendmsg(fd, &msg, 0); .fi .in -0.25i @@ -397,7 +395,7 @@ struct msghdr msg; struct nlmsghdr *nh; msg = { (void *)&sa, sizeof(sa), &iov, 1, NULL, 0, 0 }; -len = recvmsg (fd, &msg, 0); +len = recvmsg(fd, &msg, 0); for (nh = (struct nlmsghdr *) buf; NLMSG_OK (nh, len); nh = NLMSG_NEXT (nh, len)) { @@ -414,17 +412,14 @@ for (nh = (struct nlmsghdr *) buf; NLMSG_OK (nh, len); } .fi .in -0.25i - .SH BUGS This manual page is not complete. - .SH NOTES It is often better to use netlink via .B libnetlink or .B libnl than via the low level kernel interface. - .SH VERSIONS The socket interface to netlink is a new feature of Linux 2.2. @@ -444,7 +439,6 @@ NETLINK_INET_DIAG, NETLINK_CONNECTOR and NETLINK_NETFILTER appeared in Linux 2.6.14. NETLINK_GENERIC and NETLINK_ISCSI appeared in Linux 2.6.15. - .SH "SEE ALSO" .BR cmsg (3), .BR netlink (3), diff --git a/man7/packet.7 b/man7/packet.7 index ef57834d6..6ee298553 100644 --- a/man7/packet.7 +++ b/man7/packet.7 @@ -95,7 +95,6 @@ flag is passed to .BR recvfrom (2) the real length of the packet on the wire is always returned, even when it is longer than the buffer. - .SH "ADDRESS TYPES" The sockaddr_ll is a device independent physical layer address. @@ -162,7 +161,6 @@ For bind only and .B sll_ifindex are used. - .SH "SOCKET OPTIONS" Packet sockets can be used to configure physical layer multicasting and promiscuous mode. It works by calling @@ -211,8 +209,6 @@ In addition the traditional ioctls .BR SIOCADDMULTI , .B SIOCDELMULTI can be used for the same purpose. - - .SH IOCTLS .B SIOCGSTAMP can be used to receive the time stamp of the last received packet. @@ -224,12 +220,10 @@ In addition all standard ioctls defined in and .BR socket (7) are valid on packet sockets. - .SH "ERROR HANDLING" Packet sockets do no error handling other than errors occurred while passing the packet to the device driver. They don't have the concept of a pending error. - .SH COMPATIBILITY In Linux 2.0, the only way to get a packet socket was by calling .BI "socket(PF_INET, SOCK_PACKET, " protocol )\fR. @@ -262,7 +256,6 @@ and is the device name as a null terminated string, e.g. eth0. This structure is obsolete and should not be used in new code. - .SH NOTES For portable programs it is suggested to use .B PF_PACKET @@ -293,48 +286,37 @@ The default for sending is the standard Ethernet DIX encapsulation with the protocol filled in. Packet sockets are not subject to the input or output firewall chains. - .SH ERRORS .TP .B ENETDOWN Interface is not up. - .TP .B ENOTCONN No interface address passed. - .TP .B ENODEV Unknown device name or interface index specified in interface address. - .TP .B EMSGSIZE Packet is bigger than interface MTU. - .TP .B ENOBUFS Not enough memory to allocate the packet. - .TP .B EFAULT User passed invalid memory address. - .TP .B EINVAL Invalid argument. - .TP .B ENXIO Interface address contained illegal interface index. - .TP .B EPERM User has insufficient privileges to carry out this operation. - .TP .B EADDRNOTAVAIL Unknown multicast group address passed. - .TP .B ENOENT No packet received. @@ -344,18 +326,19 @@ In addition other errors may be generated by the low-level driver. .B PF_PACKET is a new feature in Linux 2.2. Earlier Linux versions supported only .BR SOCK_PACKET . - .SH BUGS glibc 2.1 does not have a define for .BR SOL_PACKET . -The suggested workaround is to use -.in +0.25i +The suggested workaround is to use: +.in +0.5i .nf + #ifndef SOL_PACKET #define SOL_PACKET 263 #endif + .fi -.in -0.25i +.in -0.5i This is fixed in later glibc versions and also does not occur on libc5 systems. @@ -369,7 +352,6 @@ The extension is an ugly hack and should be replaced by a control message. There is currently no way to get the original destination address of packets via SOCK_DGRAM. - .SH HISTORICAL NOTE The include file .I diff --git a/man7/posixoptions.7 b/man7/posixoptions.7 index a4d7d7db6..e403faa57 100644 --- a/man7/posixoptions.7 +++ b/man7/posixoptions.7 @@ -773,15 +773,12 @@ are present. .SS "--- - _POSIX_VDISABLE" Always present (probably 0). Value to set a changeable special control character to indicate that it is disabled. - .SH "XOPEN EXTENSIONS" .BR _XOPEN_CRYPT , .BR _XOPEN_LEGACY , .BR _XOPEN_REALTIME , .BR _XOPEN_REALTIME_THREADS , .BR _XOPEN_UNIX . - .\" To be described. - .SH "SEE ALSO" .BR sysconf (3) diff --git a/man7/raw.7 b/man7/raw.7 index 60ffc7078..f62dd7126 100644 --- a/man7/raw.7 +++ b/man7/raw.7 @@ -15,7 +15,6 @@ raw, SOCK_RAW \- Linux IPv4 raw sockets .B #include .br .BI "raw_socket = socket(PF_INET, SOCK_RAW, int " protocol ); - .SH DESCRIPTION Raw sockets allow new IPv4 protocols to be implemented in user space. A raw socket receives or sends the raw datagram not @@ -47,7 +46,7 @@ header. Receiving of all IP protocols via .B IPPROTO_RAW is not possible using raw sockets. - +.RS .TS tab(:) allbox; c s @@ -58,8 +57,9 @@ Source Address:Filled in when zero. Packet Id:Filled in when zero. Total Length:Always filled in. .TE +.RE +.sp .PP - If .B IP_HDRINCL is specified and the IP header has a non-zero destination address then @@ -84,9 +84,7 @@ protocols or protocols with no user interface (like ICMP). When a packet is received, it is passed to any raw sockets which have been bound to its protocol before it is passed to other protocol handlers (e.g. kernel protocol modules). - .SH "ADDRESS FORMAT" - Raw sockets use the standard .I sockaddr_in address structure defined in @@ -102,7 +100,6 @@ is set to the protocol of the packet. See the .I include file for valid IP protocols. - .SH "SOCKET OPTIONS" Raw socket options can be set with .BR setsockopt (2) @@ -112,20 +109,17 @@ by passing the .B IPPROTO_RAW .\" Or SOL_RAW on Linux family flag. - .TP .B ICMP_FILTER Enable a special filter for raw sockets bound to the .B IPPROTO_ICMP protocol. The value has a bit set for each ICMP message type which should be filtered out. The default is to filter no ICMP messages. - .PP In addition all .BR ip (7) .B IPPROTO_IP socket options valid for datagram sockets are supported. - .SH NOTES By default raw sockets do path MTU (Maximum Transmission Unit) discovery. This means the kernel @@ -190,7 +184,6 @@ Sending on raw sockets should take the IP protocol from this ability was lost in Linux 2.2. The workaround is to use .BR IP_HDRINCL . - .SH "ERROR HANDLING" Errors originating from the network are only passed to the user when the socket is connected or the @@ -232,7 +225,6 @@ The user doesn't have permission to open raw sockets. Only processes with a effective user ID of 0 or the .B CAP_NET_RAW attribute may do that. - .SH VERSIONS .B IP_RECVERR and @@ -244,7 +236,6 @@ Linux 2.0 enabled some bug-to-bug compatibility with BSD in the raw socket code when the SO_BSDCOMPAT socket option was set \(em since Linux 2.2, this option no longer has that effect. - .SH BUGS Transparent proxy extensions are not described. @@ -260,10 +251,8 @@ The protocol that the socket was bound to or that was specified in the initial .BR socket (2) call is always used. - .SH AUTHORS This man page was written by Andi Kleen. - .SH "SEE ALSO" .BR recvmsg (2), .BR sendmsg (2), diff --git a/man7/rtnetlink.7 b/man7/rtnetlink.7 index 6a3ff21f0..35c5a7080 100644 --- a/man7/rtnetlink.7 +++ b/man7/rtnetlink.7 @@ -21,7 +21,6 @@ rtnetlink, NETLINK_ROUTE \- Linux IPv4 routing socket .B #include .BI "rtnetlink_socket = socket(PF_NETLINK, int " socket_type ", NETLINK_ROUTE);" - .SH DESCRIPTION Rtnetlink allows the kernel's routing tables to be read and altered. It is used within the kernel to communicate between @@ -34,7 +33,6 @@ through sockets. It is based on netlink messages, see .BR netlink (7) for more information. - .\" FIXME all these macros could be moved to rtnetlink(3) .SH "ROUTING ATTRIBUTES" Some rtnetlink messages have optional attributes after the initial header: @@ -50,7 +48,6 @@ struct rtattr { These attributes should be only manipulated using the RTA_* macros or libnetlink, see .BR rtnetlink (3). - .SH MESSAGES Rtnetlink consists of these message types (in addition to standard netlink messages): @@ -81,8 +78,6 @@ contains the device flags, see is the unique interface index, .B ifi_change is reserved for future use and should be always set to 0xFFFFFFFF. - - .TS tab(:); c @@ -156,7 +151,6 @@ IFA_BROADCAST:raw protocol address:broadcast address. IFA_ANYCAST:raw protocol address:anycast address IFA_CACHEINFO:struct ifa_cacheinfo:Address information. .TE - .\" FIXME struct ifa_cacheinfo .TP .BR RTM_NEWROUTE ", " RTM_DELROUTE ", " RTM_GETROUTE @@ -446,7 +440,6 @@ as described above. is a new feature of Linux 2.2. .SH BUGS This manual page is lacking and incomplete. - .SH "SEE ALSO" .BR cmsg (3), .BR rtnetlink (3), diff --git a/man7/socket.7 b/man7/socket.7 index 89d3d3406..ed5504197 100644 --- a/man7/socket.7 +++ b/man7/socket.7 @@ -24,7 +24,6 @@ socket \- Linux socket interface .B #include .br .IB mysocket " = socket(int " socket_family ", int " socket_type ", int " protocol ); - .SH DESCRIPTION This manual page describes the Linux networking socket layer user interface. The BSD compatible sockets @@ -43,7 +42,6 @@ or See .BR socket (2) for more information on families and types. - .SH "SOCKET LAYER FUNCTIONS" These functions are used by the user process to send or receive packets and to do other socket operations. @@ -125,7 +123,6 @@ The user can then wait for various events via .BR poll (2) or .BR select (2). -.PP .TS tab(:) allbox; c s s @@ -564,7 +561,6 @@ These operations can be accessed using .IB error " = ioctl(" ip_socket ", " ioctl_type ", " &value_result ");" .fi .in -0.25i - .TP .B SIOCGSTAMP Return a diff --git a/man7/udp.7 b/man7/udp.7 index 9268d86e6..0830b57c0 100644 --- a/man7/udp.7 +++ b/man7/udp.7 @@ -86,13 +86,11 @@ When turned off UDP will fragment outgoing UDP packets that exceed the interface MTU. However disabling it is not recommended for performance and reliability reasons. - .SH "ADDRESS FORMAT" UDP uses the IPv4 .B sockaddr_in address format described in .BR ip (7). - .SH "ERROR HANDLING" All fatal errors will be passed to the user as an error return even when the socket is not connected. This includes asynchronous errors @@ -175,13 +173,10 @@ may be returned by a send or receive on a UDP socket. .B ECONNREFUSED No receiver was associated with the destination address. This might be caused by a previous packet sent over the socket. - .SH VERSIONS IP_RECVERR is a new feature in Linux 2.2. - .SH CREDITS This man page was written by Andi Kleen. - .SH "SEE ALSO" .BR ip (7), .BR raw (7), diff --git a/man7/units.7 b/man7/units.7 index 0dbdfbddd..d332bd250 100644 --- a/man7/units.7 +++ b/man7/units.7 @@ -29,7 +29,6 @@ units, kilo, kibi, mega, mebi, giga, gibi \- decimal and binary prefixes The SI system of units uses prefixes that indicate powers of ten. A kilometer is 1000 meter, and a megawatt is 1000000 watt. Below the standard prefixes. - .RS .TS l l l. @@ -69,7 +68,6 @@ The binary prefixes resemble the decimal ones, but have an additional 'i' (and "Ki" starts with a capital 'K'). The names are formed by taking the first syllable of the names of the decimal prefix with roughly the same size, followed by "bi" for "binary". - .RS .TS l l l. diff --git a/man7/unix.7 b/man7/unix.7 index d733c31ca..05b0b6aff 100644 --- a/man7/unix.7 +++ b/man7/unix.7 @@ -21,7 +21,6 @@ interprocess communication .IB unix_socket " = socket(PF_UNIX, type, 0);" .br .IB error " = socketpair(PF_UNIX, type, 0, int *" sv ");" - .SH DESCRIPTION The .B PF_UNIX @@ -48,7 +47,6 @@ and delivers messages in the order that they were sent. Unix sockets support passing file descriptors or process credentials to other processes using ancillary data. - .SH "ADDRESS FORMAT" A Unix address is defined as a filename in the filesystem or as a unique string in the abstract namespace. Sockets created by @@ -86,7 +84,6 @@ The socket's address in this namespace is given by the rest of the bytes in .BR sun_path . Note that names in the abstract namespace are not zero-terminated. - .SH "SOCKET OPTIONS" For historical reasons these socket options are specified with a SOL_SOCKET type even though they are PF_UNIX specific. @@ -102,7 +99,6 @@ ancillary message. When this option is set and the socket is not yet connected a unique name in the abstract namespace will be generated automatically. Expects an integer boolean flag. - .SH "(UN)SUPPORTED FEATURES" The following paragraphs describe domain-specific details and unsupported features of the sockets API for Unix domain sockets on Linux. @@ -131,7 +127,6 @@ value imposes an upper limit on the size of outgoing datagrams. This limit is calculated as the doubled (see .BR socket (7)) option value less 32 bytes used for overhead. - .SH "ANCILLARY MESSAGES" Ancillary data is sent and received using .BR sendmsg (2) @@ -148,14 +143,12 @@ to SOL_SOCKET and the .B cmsg_type field to the type. For more information see .BR cmsg (3). - .TP .B SCM_RIGHTS Send or receive a set of open file descriptors from another process. The data portion contains an integer array of the file descriptors. The passed file descriptors behave as though they have been created with .BR dup (2). - .TP .B SCM_CREDENTIALS Send or receive Unix credentials. This can be used for authentication. @@ -188,14 +181,12 @@ To receive a message the .B SO_PASSCRED option must be enabled on the socket. - .SH VERSIONS .B SCM_CREDENTIALS and the abstract namespace were introduced with Linux 2.2 and should not be used in portable programs. (Some BSD-derived systems also support credential passing, but the implementation details differ.) - .SH NOTES In the Linux implementation, sockets which are visible in the filesystem honour the permissions of the directory they are in. Their diff --git a/man7/uri.7 b/man7/uri.7 index 3bfcb7cfb..6aca5d977 100644 --- a/man7/uri.7 +++ b/man7/uri.7 @@ -55,12 +55,10 @@ URI = [ absoluteURI | relativeURI ] [ "#" fragment ] absoluteURI = scheme ":" ( hierarchical_part | opaque_part ) .HP relativeURI = ( net_path | absolute_path | relative_path ) [ "?" query ] -.sp .HP scheme = "http" | "ftp" | "gopher" | "mailto" | "news" | "telnet" | "file" | "man" | "info" | "whatis" | "ldap" | "wais" | \&... .HP hierarchical_part = ( net_path | absolute_path ) [ "?" query ] -.sp .HP net_path = "//" authority [ absolute_path ] .HP diff --git a/man7/x25.7 b/man7/x25.7 index 62bbdd0fa..b03e32c13 100644 --- a/man7/x25.7 +++ b/man7/x25.7 @@ -7,14 +7,12 @@ .TH X25 7 1998-12-01 "Linux Man Page" "Linux Programmer's Manual" .SH NAME x25, PF_X25 \- ITU-T X.25 / ISO-8208 protocol interface. - .SH SYNOPSIS .B #include .br .B #include .sp .B x25_socket = socket(PF_X25, SOCK_SEQPACKET, 0); - .SH DESCRIPTION X25 sockets provide an interface to the X.25 packet layer protocol. This allows applications to diff --git a/man8/ldconfig.8 b/man8/ldconfig.8 index 7d85e2f70..4e1759073 100644 --- a/man8/ldconfig.8 +++ b/man8/ldconfig.8 @@ -147,7 +147,6 @@ use by experts only. .B \-p Print the lists of directories and candidate libraries stored in the current cache. - .SH FILES .PD 0 .TP 20 diff --git a/man8/nscd.8 b/man8/nscd.8 index 4678d274a..2ee5395ff 100644 --- a/man8/nscd.8 +++ b/man8/nscd.8 @@ -47,12 +47,10 @@ period for its data. Note that the shadow file is specifically not cached. .BR getspnam (3) calls remain uncached as a result. - .SH OPTIONS .TP .B "\-\-help" will give you a list with all options and what they do. - .SH NOTES Nscd doesn't know anything about the underlaying protocols for a service. This also means, that if you change @@ -62,7 +60,6 @@ configured .I /etc/nsswitch.conf to use DNS for host lookups. In such a case, you need to restart nscd. - .SH "SEE ALSO" .BR nscd.conf (5), .BR nsswitch.conf (5)