Hello, This diff harmonises the indentation of struct members and comments in several manpages. Also fixes line wraps of comments on 80 column terminals. General uses tabs for general indentation and 4 spaces on tight spots. Also uses extra space to align pointers and non-pointers as we do this on certain places in our source.
OK? bye, Jan Index: sys/kbind.2 =================================================================== RCS file: /cvs/src/lib/libc/sys/kbind.2,v retrieving revision 1.3 diff -u -p -r1.3 kbind.2 --- sys/kbind.2 1 Sep 2016 10:08:03 -0000 1.3 +++ sys/kbind.2 26 Oct 2021 14:15:37 -0000 @@ -25,7 +25,7 @@ .Bd -literal struct __kbind { void *kb_addr; - size_t kb_size; + size_t kb_size; }; #define KBIND_BLOCK_MAX 2 /* powerpc and sparc64 need 2 blocks */ #define KBIND_DATA_MAX 24 /* sparc64 needs 6, four-byte words */ Index: sys/kqueue.2 =================================================================== RCS file: /cvs/src/lib/libc/sys/kqueue.2,v retrieving revision 1.44 diff -u -p -r1.44 kqueue.2 --- sys/kqueue.2 22 Apr 2021 15:30:12 -0000 1.44 +++ sys/kqueue.2 26 Oct 2021 14:16:16 -0000 @@ -141,11 +141,11 @@ The structure is defined as: .Bd -literal struct kevent { - uintptr_t ident; /* identifier for this event */ - short filter; /* filter for event */ - u_short flags; /* action flags for kqueue */ - u_int fflags; /* filter flag value */ - int64_t data; /* filter data value */ + uintptr_t ident; /* identifier for this event */ + short filter; /* filter for event */ + u_short flags; /* action flags for kqueue */ + u_int fflags; /* filter flag value */ + int64_t data; /* filter data value */ void *udata; /* opaque user data identifier */ }; .Ed Index: sys/ktrace.2 =================================================================== RCS file: /cvs/src/lib/libc/sys/ktrace.2,v retrieving revision 1.38 diff -u -p -r1.38 ktrace.2 --- sys/ktrace.2 1 Sep 2021 15:51:45 -0000 1.38 +++ sys/ktrace.2 26 Oct 2021 14:17:20 -0000 @@ -136,12 +136,12 @@ followed by a trace point specific struc The generic header is: .Bd -literal struct ktr_header { - uint ktr_type; /* trace record type */ - pid_t ktr_pid; /* process id */ - pid_t ktr_tid; /* thread id */ - struct timespec ktr_time; /* timestamp */ - char ktr_comm[MAXCOMLEN+1]; /* command name */ - size_t ktr_len; /* length of buf */ + uint ktr_type; /* trace record type */ + pid_t ktr_pid; /* process id */ + pid_t ktr_tid; /* thread id */ + struct timespec ktr_time; /* timestamp */ + char ktr_comm[MAXCOMLEN+1]; /* command name */ + size_t ktr_len; /* length of buf */ }; .Ed .Pp Index: sys/nfssvc.2 =================================================================== RCS file: /cvs/src/lib/libc/sys/nfssvc.2,v retrieving revision 1.23 diff -u -p -r1.23 nfssvc.2 --- sys/nfssvc.2 31 May 2015 23:54:25 -0000 1.23 +++ sys/nfssvc.2 26 Oct 2021 15:54:29 -0000 @@ -63,16 +63,16 @@ is called with the flag and a pointer to a structure: .Bd -literal struct nfsd_srvargs { - struct nfsd *nsd_nfsd; /* Pointer to in kernel nfsd struct */ - uid_t nsd_uid; /* Effective uid mapped to cred */ - u_int32_t nsd_haddr; /* IP address of client */ - struct xucred nsd_cr; /* Cred. uid maps to */ - int nsd_authlen; /* Length of auth string (ret) */ - u_char *nsd_authstr; /* Auth string (ret) */ - int nsd_verflen; /* and the verifier */ - u_char *nsd_verfstr; - struct timeval nsd_timestamp; /* timestamp from verifier */ - u_int32_t nsd_ttl; /* credential ttl (sec) */ + struct nfsd *nsd_nfsd; /* Pointer to in kernel nfsd struct */ + uid_t nsd_uid; /* Effective uid mapped to cred */ + u_int32_t nsd_haddr; /* IP address of client */ + struct xucred nsd_cr; /* Cred. uid maps to */ + int nsd_authlen; /* Length of auth string (ret) */ + u_char *nsd_authstr; /* Auth string (ret) */ + int nsd_verflen; /* and the verifier */ + u_char *nsd_verfstr; + struct timeval nsd_timestamp; /* timestamp from verifier */ + u_int32_t nsd_ttl; /* credential ttl (sec) */ }; .Ed .Pp @@ -87,9 +87,9 @@ with the flag and a pointer to a structure: .Bd -literal struct nfsd_args { - int sock; /* Socket to serve */ - caddr_t name; /* Client address for connection based sockets */ - int namelen; /* Length of name */ + int sock; /* Socket to serve */ + caddr_t name; /* Client address for connection based sockets */ + int namelen; /* Length of name */ }; .Ed .Sh RETURN VALUES Index: sys/poll.2 =================================================================== RCS file: /cvs/src/lib/libc/sys/poll.2,v retrieving revision 1.36 diff -u -p -r1.36 poll.2 --- sys/poll.2 18 Aug 2018 16:55:30 -0000 1.36 +++ sys/poll.2 26 Oct 2021 15:55:03 -0000 @@ -65,7 +65,7 @@ Points to an array of structures, which are defined as: .Bd -literal -offset indent struct pollfd { - int fd; + int fd; short events; short revents; }; Index: sys/ptrace.2 =================================================================== RCS file: /cvs/src/lib/libc/sys/ptrace.2,v retrieving revision 1.40 diff -u -p -r1.40 ptrace.2 --- sys/ptrace.2 1 May 2021 16:11:09 -0000 1.40 +++ sys/ptrace.2 26 Oct 2021 15:56:16 -0000 @@ -191,10 +191,10 @@ The I/O request is encoded in a defined as: .Bd -literal -offset indent struct ptrace_io_desc { - int piod_op; - void *piod_offs; - void *piod_addr; - size_t piod_len; + int piod_op; + void *piod_offs; + void *piod_addr; + size_t piod_len; }; .Ed .Pp Index: sys/read.2 =================================================================== RCS file: /cvs/src/lib/libc/sys/read.2,v retrieving revision 1.37 diff -u -p -r1.37 read.2 --- sys/read.2 11 Feb 2020 13:19:17 -0000 1.37 +++ sys/read.2 26 Oct 2021 15:56:34 -0000 @@ -83,8 +83,8 @@ the structure is defined as: .Bd -literal -offset indent struct iovec { - void *iov_base; - size_t iov_len; + void *iov_base; + size_t iov_len; }; .Ed .Pp Index: sys/recv.2 =================================================================== RCS file: /cvs/src/lib/libc/sys/recv.2,v retrieving revision 1.47 diff -u -p -r1.47 recv.2 --- sys/recv.2 11 Jan 2019 06:10:13 -0000 1.47 +++ sys/recv.2 26 Oct 2021 15:58:03 -0000 @@ -170,13 +170,13 @@ This structure has the following form, a .In sys/socket.h : .Bd -literal struct msghdr { - void *msg_name; /* optional address */ - socklen_t msg_namelen; /* size of address */ - struct iovec *msg_iov; /* scatter/gather array */ - unsigned int msg_iovlen; /* # elements in msg_iov */ - void *msg_control; /* ancillary data, see below */ - socklen_t msg_controllen; /* ancillary data buffer len */ - int msg_flags; /* flags on received message */ + void *msg_name; /* optional address */ + socklen_t msg_namelen; /* size of address */ + struct iovec *msg_iov; /* scatter/gather array */ + unsigned int msg_iovlen; /* # elements in msg_iov */ + void *msg_control; /* ancillary data, see below */ + socklen_t msg_controllen; /* ancillary data buffer len */ + int msg_flags; /* flags on received message */ }; .Ed .Pp Index: sys/semctl.2 =================================================================== RCS file: /cvs/src/lib/libc/sys/semctl.2,v retrieving revision 1.17 diff -u -p -r1.17 semctl.2 --- sys/semctl.2 23 Oct 2021 21:17:45 -0000 1.17 +++ sys/semctl.2 26 Oct 2021 16:05:26 -0000 @@ -54,9 +54,9 @@ The operation to be performed is specifi .Fa arg is a union of the following fields: .Bd -literal - int val; /* value for SETVAL */ - struct semid_ds *buf; /* buffer for IPC_{STAT,SET} */ - u_short *array; /* array for GETALL & SETALL */ + int val; /* value for SETVAL */ + struct semid_ds *buf; /* buffer for IPC_{STAT,SET} */ + u_short *array; /* array for GETALL & SETALL */ .Ed .Pp The @@ -71,11 +71,11 @@ commands is defined as follows in .In sys/sem.h : .Bd -literal struct semid_ds { - struct ipc_perm sem_perm; /* operation permissions */ - struct sem *sem_base; /* semaphore set */ - u_short sem_nsems; /* number of sems in set */ - time_t sem_otime; /* last operation time */ - time_t sem_ctime; /* last change time */ + struct ipc_perm sem_perm; /* operation permissions */ + struct sem *sem_base; /* semaphore set */ + u_short sem_nsems; /* number of sems in set */ + time_t sem_otime; /* last operation time */ + time_t sem_ctime; /* last change time */ }; .Ed .Pp @@ -92,13 +92,14 @@ structure is defined in and looks like this: .Bd -literal struct ipc_perm { - uid_t cuid; /* creator user id */ - gid_t cgid; /* creator group id */ - uid_t uid; /* user id */ - gid_t gid; /* group id */ - mode_t mode; /* r/w permission (see chmod(2)) */ - u_short seq; /* sequence # (to generate unique msg/sem/shm id) */ - key_t key; /* user specified msg/sem/shm key */ + uid_t cuid; /* creator user id */ + gid_t cgid; /* creator group id */ + uid_t uid; /* user id */ + gid_t gid; /* group id */ + mode_t mode; /* r/w permission (see chmod(2)) */ + u_short seq; /* sequence # */ + /* (to generate unique msg/sem/shm id) */ + key_t key; /* user specified msg/sem/shm key */ }; .Ed .Pp Index: sys/shmctl.2 =================================================================== RCS file: /cvs/src/lib/libc/sys/shmctl.2,v retrieving revision 1.18 diff -u -p -r1.18 shmctl.2 --- sys/shmctl.2 23 Oct 2021 21:17:45 -0000 1.18 +++ sys/shmctl.2 26 Oct 2021 16:11:19 -0000 @@ -57,15 +57,15 @@ This structure is defined as follows in .In sys/shm.h : .Bd -literal struct shmid_ds { - struct ipc_perm shm_perm; /* operation permissions */ - int shm_segsz; /* size of segment in bytes */ - pid_t shm_lpid; /* pid of last shm op */ - pid_t shm_cpid; /* pid of creator */ - short shm_nattch; /* # of current attaches */ - time_t shm_atime; /* last shmat() time*/ - time_t shm_dtime; /* last shmdt() time */ - time_t shm_ctime; /* last change by shmctl() */ - void *shm_internal; /* sysv stupidity */ + struct ipc_perm shm_perm; /* operation permissions */ + int shm_segsz; /* size of segment in bytes */ + pid_t shm_lpid; /* pid of last shm op */ + pid_t shm_cpid; /* pid of creator */ + short shm_nattch; /* # of current attaches */ + time_t shm_atime; /* last shmat() time*/ + time_t shm_dtime; /* last shmdt() time */ + time_t shm_ctime; /* last change by shmctl() */ + void *shm_internal; /* sysv stupidity */ }; .Ed .Pp @@ -87,7 +87,8 @@ struct ipc_perm { uid_t uid; /* user id */ gid_t gid; /* group id */ mode_t mode; /* r/w permission (see chmod(2)) */ - u_short seq; /* sequence # (to generate unique msg/sem/shm id) */ + u_short seq; /* sequence # */ + /* (to generate unique msg/sem/shm id) */ key_t key; /* user specified msg/sem/shm key */ }; .Ed Index: sys/sigaltstack.2 =================================================================== RCS file: /cvs/src/lib/libc/sys/sigaltstack.2,v retrieving revision 1.23 diff -u -p -r1.23 sigaltstack.2 --- sys/sigaltstack.2 22 Apr 2018 13:23:46 -0000 1.23 +++ sys/sigaltstack.2 26 Oct 2021 16:17:34 -0000 @@ -41,8 +41,8 @@ .Bd -literal typedef struct sigaltstack { void *ss_sp; - size_t ss_size; - int ss_flags; + size_t ss_size; + int ss_flags; } stack_t; .Ed .Ft int Index: sys/stat.2 =================================================================== RCS file: /cvs/src/lib/libc/sys/stat.2,v retrieving revision 1.48 diff -u -p -r1.48 stat.2 --- sys/stat.2 3 Jan 2021 18:10:27 -0000 1.48 +++ sys/stat.2 26 Oct 2021 16:21:05 -0000 @@ -137,21 +137,21 @@ as defined by and into which information is placed concerning the file. .Bd -literal struct stat { - dev_t st_dev; /* inode's device */ - ino_t st_ino; /* inode's number */ - mode_t st_mode; /* inode protection mode */ - nlink_t st_nlink; /* number of hard links */ - uid_t st_uid; /* user ID of the file's owner */ - gid_t st_gid; /* group ID of the file's group */ - dev_t st_rdev; /* device type */ - struct timespec st_atim; /* time of last access */ - struct timespec st_mtim; /* time of last data modification */ - struct timespec st_ctim; /* time of last file status change */ - off_t st_size; /* file size, in bytes */ - blkcnt_t st_blocks; /* blocks allocated for file */ - blksize_t st_blksize;/* optimal blocksize for I/O */ - u_int32_t st_flags; /* user defined flags for file */ - u_int32_t st_gen; /* file generation number */ + dev_t st_dev; /* inode's device */ + ino_t st_ino; /* inode's number */ + mode_t st_mode; /* inode protection mode */ + nlink_t st_nlink; /* number of hard links */ + uid_t st_uid; /* user ID of the file's owner */ + gid_t st_gid; /* group ID of the file's group */ + dev_t st_rdev; /* device type */ + struct timespec st_atim; /* time of last access */ + struct timespec st_mtim; /* time of last data modification */ + struct timespec st_ctim; /* time of last file status change */ + off_t st_size; /* file size, in bytes */ + blkcnt_t st_blocks; /* blocks allocated for file */ + blksize_t st_blksize; /* optimal blocksize for I/O */ + u_int32_t st_flags; /* user defined flags for file */ + u_int32_t st_gen; /* file generation number */ }; .Ed .Pp Index: sys/statfs.2 =================================================================== RCS file: /cvs/src/lib/libc/sys/statfs.2,v retrieving revision 1.27 diff -u -p -r1.27 statfs.2 --- sys/statfs.2 3 Jan 2021 18:10:27 -0000 1.27 +++ sys/statfs.2 26 Oct 2021 16:27:41 -0000 @@ -60,34 +60,34 @@ typedef struct { int32_t val[2]; } fsid_ #define MNAMELEN 90 /* length of buffer for returned name */ struct statfs { - u_int32_t f_flags; /* copy of mount flags */ - u_int32_t f_bsize; /* file system block size */ - u_int32_t f_iosize; /* optimal transfer block size */ + u_int32_t f_flags; /* copy of mount flags */ + u_int32_t f_bsize; /* file system block size */ + u_int32_t f_iosize; /* optimal transfer block size */ - /* unit is f_bsize */ - u_int64_t f_blocks; /* total data blocks in file system */ - u_int64_t f_bfree; /* free blocks in fs */ - int64_t f_bavail; /* free blocks avail to non-superuser */ + /* unit is f_bsize */ + u_int64_t f_blocks; /* total data blocks in file system */ + u_int64_t f_bfree; /* free blocks in fs */ + int64_t f_bavail; /* free blocks avail to non-superuser */ - u_int64_t f_files; /* total file nodes in file system */ - u_int64_t f_ffree; /* free file nodes in fs */ - int64_t f_favail; /* free file nodes avail to non-root */ + u_int64_t f_files; /* total file nodes in file system */ + u_int64_t f_ffree; /* free file nodes in fs */ + int64_t f_favail; /* free file nodes avail to non-root */ - u_int64_t f_syncwrites; /* count of sync writes since mount */ - u_int64_t f_syncreads; /* count of sync reads since mount */ - u_int64_t f_asyncwrites; /* count of async writes since mount */ - u_int64_t f_asyncreads; /* count of async reads since mount */ + u_int64_t f_syncwrites; /* count of sync writes since mount */ + u_int64_t f_syncreads; /* count of sync reads since mount */ + u_int64_t f_asyncwrites; /* count of async writes since mount */ + u_int64_t f_asyncreads; /* count of async reads since mount */ - fsid_t f_fsid; /* file system id */ - u_int32_t f_namemax; /* maximum filename length */ - uid_t f_owner; /* user that mounted the file system */ - u_int64_t f_ctime; /* last mount [-u] time */ + fsid_t f_fsid; /* file system id */ + u_int32_t f_namemax; /* maximum filename length */ + uid_t f_owner; /* user that mounted the file system */ + u_int64_t f_ctime; /* last mount [-u] time */ - char f_fstypename[MFSNAMELEN]; /* fs type name */ - char f_mntonname[MNAMELEN]; /* directory on which mounted */ - char f_mntfromname[MNAMELEN]; /* mounted file system */ - char f_mntfromspec[MNAMELEN]; /* special for mount request */ - union mount_info mount_info; /* per-filesystem mount options */ + char f_fstypename[MFSNAMELEN]; /* fs type name */ + char f_mntonname[MNAMELEN]; /* directory on which mounted */ + char f_mntfromname[MNAMELEN]; /* mounted file system */ + char f_mntfromspec[MNAMELEN]; /* special for mount request */ + union mount_info mount_info; /* per-filesystem mount options */ }; .Ed .Pp Index: sys/swapctl.2 =================================================================== RCS file: /cvs/src/lib/libc/sys/swapctl.2,v retrieving revision 1.24 diff -u -p -r1.24 swapctl.2 --- sys/swapctl.2 2 Apr 2019 13:07:28 -0000 1.24 +++ sys/swapctl.2 26 Oct 2021 16:31:31 -0000 @@ -98,10 +98,10 @@ struct swapent { .Pp The flags are defined as .Bd -literal - SWF_INUSE in use: we have swapped here - SWF_ENABLE enabled: we can swap here - SWF_BUSY busy: I/O happening here - SWF_FAKE fake: still being built + SWF_INUSE in use: we have swapped here + SWF_ENABLE enabled: we can swap here + SWF_BUSY busy: I/O happening here + SWF_FAKE fake: still being built .Ed .Pp All but Index: sys/write.2 =================================================================== RCS file: /cvs/src/lib/libc/sys/write.2,v retrieving revision 1.42 diff -u -p -r1.42 write.2 --- sys/write.2 6 Sep 2019 19:25:08 -0000 1.42 +++ sys/write.2 26 Oct 2021 16:33:53 -0000 @@ -83,8 +83,8 @@ the structure is defined as: .Bd -literal -offset indent struct iovec { - void *iov_base; - size_t iov_len; + void *iov_base; + size_t iov_len; }; .Ed .Pp