From aeb4b1fc8bc0cace2d437a4ad75566956dd2b2d0 Mon Sep 17 00:00:00 2001 From: Michael Kerrisk Date: Sun, 23 Dec 2007 17:26:26 +0000 Subject: [PATCH] s/u_long/unsigned long/ s/ulong/unsigned long/ s/u_char/unsigned char/ s/u_short/unsigned short/ s/ushort/unsigned short/ s/u_int8_t/uint8_t s/u_int16_t/uint16_t s/u_int32_t/uint16_t s/u_int/unsigned int/ --- man2/recv.2 | 22 ++++++++--------- man3/btree.3 | 16 ++++++------ man3/dbopen.3 | 10 ++++---- man3/ether_aton.3 | 2 +- man3/fts.3 | 2 +- man3/hash.3 | 10 ++++---- man3/mpool.3 | 4 +-- man3/profil.3 | 3 ++- man3/rcmd.3 | 2 +- man3/recno.3 | 14 +++++------ man3/rpc.3 | 52 +++++++++++++++++++-------------------- man3/xdr.3 | 22 ++++++++--------- man4/console_ioctl.4 | 58 ++++++++++++++++++++++---------------------- man7/ddp.7 | 6 ++--- man7/ip.7 | 18 +++++++------- man7/ipv6.7 | 8 +++--- man7/svipc.7 | 16 ++++++------ 17 files changed, 133 insertions(+), 132 deletions(-) diff --git a/man2/recv.2 b/man2/recv.2 index 485c55052..2a8eced50 100644 --- a/man2/recv.2 +++ b/man2/recv.2 @@ -188,13 +188,13 @@ structure: struct sock_extended_err { - u_int32_t ee_errno; /* error number */ - u_int8_t ee_origin; /* where the error originated */ - u_int8_t ee_type; /* type */ - u_int8_t ee_code; /* code */ - u_int8_t ee_pad; - u_int32_t ee_info; /* additional information */ - u_int32_t ee_data; /* other data */ + uint32_t ee_errno; /* error number */ + uint8_t ee_origin; /* where the error originated */ + uint8_t ee_type; /* type */ + uint8_t ee_code; /* code */ + uint8_t ee_pad; + uint32_t ee_info; /* additional information */ + uint32_t ee_data; /* other data */ /* More data may follow */ }; @@ -319,11 +319,11 @@ The messages are of the form: .nf struct cmsghdr { - socklen_t cmsg_len; /* data byte count, including hdr */ - int cmsg_level; /* originating protocol */ - int cmsg_type; /* protocol-specific type */ + socklen_t cmsg_len; /* data byte count, including hdr */ + int cmsg_level; /* originating protocol */ + int cmsg_type; /* protocol-specific type */ /* followed by - u_char cmsg_data[]; */ + unsigned char cmsg_data[]; */ }; .fi .in diff --git a/man3/btree.3 b/man3/btree.3 index 020cd1604..af9cfc16d 100644 --- a/man3/btree.3 +++ b/man3/btree.3 @@ -63,14 +63,14 @@ include file as follows: .nf typedef struct { - u_long flags; - u_int cachesize; - int maxkeypage; - int minkeypage; - u_int psize; - int (*compare)(const DBT *key1, const DBT *key2); - size_t (*prefix)(const DBT *key1, const DBT *key2); - int lorder; + unsigned long flags; + unsigned int cachesize; + int maxkeypage; + int minkeypage; + unsigned int psize; + int (*compare)(const DBT *key1, const DBT *key2); + size_t (*prefix)(const DBT *key1, const DBT *key2); + int lorder; } BTREEINFO; .fi .in diff --git a/man3/dbopen.3 b/man3/dbopen.3 index 8529153a8..90820342a 100644 --- a/man3/dbopen.3 +++ b/man3/dbopen.3 @@ -146,13 +146,13 @@ least the following fields: typedef struct { DBTYPE type; int (*close)(const DB *db); - int (*del)(const DB *db, const DBT *key, u_int flags); + int (*del)(const DB *db, const DBT *key, unsigned int flags); int (*fd)(const DB *db); - int (*get)(const DB *db, DBT *key, DBT *data, u_int flags); + int (*get)(const DB *db, DBT *key, DBT *data, unsigned int flags); int (*put)(const DB *db, DBT *key, const DBT *data, - u_int flags); - int (*sync)(const DB *db, u_int flags); - int (*seq)(const DB *db, DBT *key, DBT *data, u_int flags); + unsigned int flags); + int (*sync)(const DB *db, unsigned int flags); + int (*seq)(const DB *db, DBT *key, DBT *data, unsigned int flags); } DB; .fi .in diff --git a/man3/ether_aton.3 b/man3/ether_aton.3 index 54eef50db..66b6c18f5 100644 --- a/man3/ether_aton.3 +++ b/man3/ether_aton.3 @@ -116,7 +116,7 @@ as: .in +4n .nf struct ether_addr { - u_int8_t ether_addr_octet[6]; + uint8_t ether_addr_octet[6]; } .fi .in diff --git a/man3/fts.3 b/man3/fts.3 index 52a8d0a6d..155da3ae5 100644 --- a/man3/fts.3 +++ b/man3/fts.3 @@ -105,7 +105,7 @@ described in greater detail below: .nf typedef struct _ftsent { - u_short fts_info; /* flags for FTSENT structure */ + unsigned short fts_info; /* flags for FTSENT structure */ char *fts_accpath; /* access path */ char *fts_path; /* root path */ short fts_pathlen; /* strlen(fts_path) */ diff --git a/man3/hash.3 b/man3/hash.3 index 2d8a42b55..05fa67f3b 100644 --- a/man3/hash.3 +++ b/man3/hash.3 @@ -62,11 +62,11 @@ include file as follows: .nf typedef struct { - u_int bsize; - u_int ffactor; - u_int nelem; - u_int cachesize; - u_int32_t (*hash)(const void *, size_t); + unsigned int bsize; + unsigned int ffactor; + unsigned int nelem; + unsigned int cachesize; + uint32_t (*hash)(const void *, size_t); int lorder; } HASHINFO; .fi diff --git a/man3/mpool.3 b/man3/mpool.3 index cab3f5b80..a8ddc75b7 100644 --- a/man3/mpool.3 +++ b/man3/mpool.3 @@ -49,9 +49,9 @@ mpool \- shared memory buffer pool .sp .BI "void *mpool_new(MPOOL *" mp ", pgno_t *" pgnoaddr "); .sp -.BI "void *mpool_get(MPOOL *" mp ", pgno_t " pgno ", u_int " flags "); +.BI "void *mpool_get(MPOOL *" mp ", pgno_t " pgno ", unsigned int " flags "); .sp -.BI "int mpool_put(MPOOL *" mp ", void *" pgaddr ", u_int " flags "); +.BI "int mpool_put(MPOOL *" mp ", void *" pgaddr ", unsigned int " flags "); .sp .BI "int mpool_sync(MPOOL *" mp "); .sp diff --git a/man3/profil.3 b/man3/profil.3 index 5a6a3b82c..e229ce8c8 100644 --- a/man3/profil.3 +++ b/man3/profil.3 @@ -31,7 +31,8 @@ profil \- execution time profile .SH SYNOPSIS .B #include .sp -.BI "int profil(u_short *" buf ", size_t " bufsiz ", size_t " offset ", u_int " scale ); +.BI "int profil(unsigned short *" buf ", size_t " bufsiz \ +", size_t " offset ", unsigned int " scale ); .sp .in -4n Feature Test Macro Requirements for glibc (see diff --git a/man3/rcmd.3 b/man3/rcmd.3 index 7033d6dba..f0e5a39b2 100644 --- a/man3/rcmd.3 +++ b/man3/rcmd.3 @@ -51,7 +51,7 @@ stream to a remote command .sp .BI "int rresvport(int *" port ); .sp -.BI "int iruserok(u_int32_t " raddr ", int " superuser ", " +.BI "int iruserok(uint32_t " raddr ", int " superuser ", " .BI " const char *" ruser ", const char *" luser ); .sp .BI "int ruserok(const char *" rhost ", int " superuser ", " diff --git a/man3/recno.3 b/man3/recno.3 index 0b63049e7..6d49b0e8e 100644 --- a/man3/recno.3 +++ b/man3/recno.3 @@ -69,13 +69,13 @@ include file as follows: .in +4n .nf typedef struct { - u_long flags; - u_int cachesize; - u_int psize; - int lorder; - size_t reclen; - u_char bval; - char *bfname; + unisgned long flags; + unsigned int cachesize; + unsigned int psize; + int lorder; + size_t reclen; + unsiged char bval; + char *bfname; } RECNOINFO; .fi .in diff --git a/man3/rpc.3 b/man3/rpc.3 index 931c9ecb2..6e960c25c 100644 --- a/man3/rpc.3 +++ b/man3/rpc.3 @@ -119,7 +119,7 @@ with the appropriate parameters. .sp .5 callrpc(host, prognum, versnum, procnum, inproc, in, outproc, out) char *host; -u_long prognum, versnum, procnum; +unsigned long prognum, versnum, procnum; char *in, *out; xdrproc_t inproc, outproc; .fi @@ -165,7 +165,7 @@ this routine. enum clnt_stat clnt_broadcast(prognum, versnum, procnum, inproc, in, outproc, out, eachresult) -u_long prognum, versnum, procnum; +unsigned long prognum, versnum, procnum; char *in, *out; xdrproc_t inproc, outproc; resultproc_t eachresult; @@ -220,7 +220,7 @@ this value is 1500 bytes. enum clnt_stat clnt_call(clnt, procnum, inproc, in, outproc, out, tout) CLIENT *clnt; -u_long procnum; +unsigned long procnum; xdrproc_t inproc, outproc; char *in, *out; struct timeval tout; @@ -281,7 +281,7 @@ Otherwise, the socket remains open. CLIENT * clnt_create(host, prog, vers, proto) char *host; -u_long prog, vers; +unsigned long prog, vers; char *proto; .fi .ft R @@ -564,7 +564,7 @@ on each call. .sp .5 CLIENT * clntraw_create(prognum, versnum) -u_long prognum, versnum; +unsigned long prognum, versnum; .fi .ft R .IP @@ -598,9 +598,9 @@ if it fails. CLIENT * clnttcp_create(addr, prognum, versnum, sockp, sendsz, recvsz) struct sockaddr_in *addr; -u_long prognum, versnum; +unsigned long prognum, versnum; int *sockp; -u_int sendsz, recvsz; +unsigned int sendsz, recvsz; .fi .ft R .IP @@ -652,7 +652,7 @@ if it fails. CLIENT * clntudp_create(addr, prognum, versnum, wait, sockp) struct sockaddr_in *addr; -u_long prognum, versnum; +unsigned long prognum, versnum; struct timeval wait; int *sockp; .fi @@ -707,7 +707,7 @@ CLIENT * clntudp_bufcreate(addr, prognum, versnum, wait, sockp, sendsize, recosize) struct sockaddr_in *addr; -u_long prognum, versnum; +unsigned long prognum, versnum; struct timeval wait; int *sockp; unsigned int sendsize; @@ -804,11 +804,11 @@ uses this routine. .ft B .nf .sp .5 -u_short +unsigned short pmap_getport(addr, prognum, versnum, protocol) struct sockaddr_in *addr; -u_long prognum, versnum; -u_int protocol; +unsigned long prognum, versnum; +unsigned int protocol; .fi .ft R .IP @@ -850,11 +850,11 @@ enum clnt_stat pmap_rmtcall(addr, prognum, versnum, procnum, inproc, in, outproc, out, tout, portp) struct sockaddr_in *addr; -u_long prognum, versnum, procnum; +unsigned long prognum, versnum, procnum; char *in, *out; xdrproc_t inproc, outproc; struct timeval tout; -u_long *portp; +unsigned long *portp; .fi .ft R .IP @@ -890,9 +890,9 @@ See also .nf .sp .5 pmap_set(prognum, versnum, protocol, port) -u_long prognum, versnum; -u_int protocol; -u_short port; +unsigned long prognum, versnum; +unsigned int protocol; +unsigned short port; .fi .ft R .IP @@ -922,7 +922,7 @@ Automatically done by .nf .sp .5 pmap_unset(prognum, versnum) -u_long prognum, versnum; +unsigned long prognum, versnum; .fi .ft R .IP @@ -944,7 +944,7 @@ otherwise. .nf .sp .5 registerrpc(prognum, versnum, procnum, procname, inproc, outproc) -u_long prognum, versnum, procnum; +unsigned long prognum, versnum, procnum; char *(*procname) () ; xdrproc_t inproc, outproc; .fi @@ -1177,9 +1177,9 @@ This interface is obsoleted by .sp .5 svc_register(xprt, prognum, versnum, dispatch, protocol) SVCXPRT *xprt; -u_long prognum, versnum; +unsigned long prognum, versnum; void (*dispatch) (); -u_long protocol; +unsigned long protocol; .fi .ft R .IP @@ -1282,7 +1282,7 @@ This routine returns one if it succeeds, zero otherwise. .sp .5 void svc_unregister(prognum, versnum) -u_long prognum, versnum; +unsigned long prognum, versnum; .fi .ft R .IP @@ -1412,8 +1412,8 @@ The routine calls SVCXPRT * svcfd_create(fd, sendsize, recvsize) int fd; -u_int sendsize; -u_int recvsize; +unsigned int sendsize; +unsigned int recvsize; .fi .ft R .IP @@ -1466,7 +1466,7 @@ if it fails. SVCXPRT * svctcp_create(sock, send_buf_size, recv_buf_size) int sock; -u_int send_buf_size, recv_buf_size; +unsigned int send_buf_size, recv_buf_size; .fi .ft R .IP @@ -1506,7 +1506,7 @@ choose suitable defaults. SVCXPRT * svcudp_bufcreate(sock, sendsize, recosize) int sock; -u_int sendsize, recosize; +unsigned int sendsize, recosize; .fi .ft R .IP diff --git a/man3/xdr.3 b/man3/xdr.3 index d66bb74cb..15308e0f7 100644 --- a/man3/xdr.3 +++ b/man3/xdr.3 @@ -18,7 +18,7 @@ routines. xdr_array(xdrs, arrp, sizep, maxsize, elsize, elproc) XDR *xdrs; char **arrp; -u_int *sizep, maxsize, elsize; +unsigned int *sizep, maxsize, elsize; xdrproc_t elproc; .fi .ft R @@ -72,7 +72,7 @@ This routine returns one if it succeeds, zero otherwise. xdr_bytes(xdrs, sp, sizep, maxsize) XDR *xdrs; char **sp; -u_int *sizep, maxsize; +unsigned int *sizep, maxsize; .fi .ft R .IP @@ -211,7 +211,7 @@ freed (recursively). .ft B .nf .sp .5 -u_int +unsigned int xdr_getpos(xdrs) XDR *xdrs; .fi @@ -306,7 +306,7 @@ void xdrmem_create(xdrs, addr, size, op) XDR *xdrs; char *addr; -u_int size; +unsigned int size; enum xdr_op op; .fi .ft R @@ -340,7 +340,7 @@ or xdr_opaque(xdrs, cp, cnt) XDR *xdrs; char *cp; -u_int cnt; +unsigned int cnt; .fi .ft R .IP @@ -361,7 +361,7 @@ This routine returns one if it succeeds, zero otherwise. xdr_pointer(xdrs, objpp, objsize, xdrobj) XDR *xdrs; char **objpp; -u_int objsize; +unsigned int objsize; xdrproc_t xdrobj; .fi .ft R @@ -387,7 +387,7 @@ linked lists. void xdrrec_create(xdrs, sendsize, recvsize, handle, readit, writeit) XDR *xdrs; -u_int sendsize, recvsize; +unsigned int sendsize, recvsize; char *handle; int (*readit) (), (*writeit) (); .fi @@ -497,7 +497,7 @@ This routine returns one if it succeeds, zero otherwise. xdr_reference(xdrs, pp, size, proc) XDR *xdrs; char **pp; -u_int size; +unsigned int size; xdrproc_t proc; .fi .ft R @@ -533,7 +533,7 @@ instead. .sp .5 xdr_setpos(xdrs, pos) XDR *xdrs; -u_int pos; +unsigned int pos; .fi .ft R .IP @@ -623,7 +623,7 @@ xdr_string(xdrs, sp, maxsize) XDR *xdrs; char **sp; -u_int maxsize; +unsigned int maxsize; .fi .ft R .IP @@ -758,7 +758,7 @@ Returns one if it succeeds, zero otherwise. xdr_vector(xdrs, arrp, size, elsize, elproc) XDR *xdrs; char *arrp; -u_int size, elsize; +unsigned int size, elsize; xdrproc_t elproc; .fi .ft R diff --git a/man4/console_ioctl.4 b/man4/console_ioctl.4 index 36df1bdd3..00667b226 100644 --- a/man4/console_ioctl.4 +++ b/man4/console_ioctl.4 @@ -160,9 +160,9 @@ points to a .in +4n .nf struct consolefontdesc { - u_short charcount; /* characters in font (256 or 512) */ - u_short charheight; /* scan lines per character (1-32) */ - char *chardata; /* font data in expanded form */ + unsigned short charcount; /* characters in font (256 or 512) */ + unsigned short charheight; /* scan lines per character (1-32) */ + char *chardata; /* font data in expanded form */ }; .fi .in @@ -210,7 +210,7 @@ Get Unicode-to-font mapping from kernel. .in +4n .nf struct unimapdesc { - u_short entry_ct; + unsigned short entry_ct; struct unipair *entries; }; .fi @@ -221,8 +221,8 @@ where \fIentries\fP points to an array of .in +4n .nf struct unipair { - u_short unicode; - u_short fontpos; + unsigned short unicode; + unsigned short fontpos; }; .fi .in @@ -239,9 +239,9 @@ Clear table, possibly advise hash algorithm. .in +4n .nf struct unimapinit { - u_short advised_hashsize; /* 0 if no opinion */ - u_short advised_hashstep; /* 0 if no opinion */ - u_short advised_hashlevel; /* 0 if no opinion */ + unsigned short advised_hashsize; /* 0 if no opinion */ + unsigned short advised_hashstep; /* 0 if no opinion */ + unsigned short advised_hashlevel; /* 0 if no opinion */ }; .fi .in @@ -276,9 +276,9 @@ Gets one entry in key translation table (keycode to action code). .in +4n .nf struct kbentry { - u_char kb_table; - u_char kb_index; - u_short kb_value; + unsigned char kb_table; + unsigned char kb_index; + unsigned short kb_value; }; .fi .in @@ -300,8 +300,8 @@ Gets one function key string. .in +4n .nf struct kbsentry { - u_char kb_func; - u_char kb_string[512]; + unsigned char kb_func; + unsigned char kb_string[512]; }; .fi .in @@ -331,9 +331,9 @@ is a .in +4n .nf struct kbdiacr { - u_char diacr; - u_char base; - u_char result; + unsigned char diacr; + unsigned char base; + unsigned char result; }; .in .IP \fBKDGETKEYCODE\fP @@ -400,9 +400,9 @@ Get global vt state info. .in +4n .nf struct vt_stat { - ushort v_active; /* active vt */ - ushort v_signal; /* signal to send */ - ushort v_state; /* vt bit mask */ + unsigned short v_active; /* active vt */ + unsigned short v_signal; /* signal to send */ + unsigned short v_state; /* vt bit mask */ }; .fi .in @@ -425,9 +425,9 @@ Set the kernel's idea of screensize. .in +4n .nf struct vt_sizes { - ushort v_rows; /* # rows */ - ushort v_cols; /* # columns */ - ushort v_scrollsize; /* no longer used */ + unsigned short v_rows; /* # rows */ + unsigned short v_cols; /* # columns */ + unsigned short v_scrollsize; /* no longer used */ }; .fi .in @@ -443,12 +443,12 @@ Set the kernel's idea of various screen parameters. .in +4n .nf struct vt_consize { - ushort v_rows; /* number of rows */ - ushort v_cols; /* number of columns */ - ushort v_vlin; /* number of pixel rows on screen */ - ushort v_clin; /* number of pixel rows per character */ - ushort v_vcol; /* number of pixel columns on screen */ - ushort v_ccol; /* number of pixel columns per character */ + unsigned short v_rows; /* number of rows */ + unsigned short v_cols; /* number of columns */ + unsigned short v_vlin; /* number of pixel rows on screen */ + unsigned short v_clin; /* number of pixel rows per character */ + unsigned short v_vcol; /* number of pixel columns on screen */ + unsigned short v_ccol; /* number of pixel columns per character */ }; .fi .in diff --git a/man7/ddp.7 b/man7/ddp.7 index e2f98b56d..3b1b6df7f 100644 --- a/man7/ddp.7 +++ b/man7/ddp.7 @@ -64,13 +64,13 @@ a node number, and a port number. .in +4n .nf struct at_addr { - u_short s_net; - u_char s_node; + unsigned short s_net; + unsigned char s_node; }; struct sockaddr_atalk { sa_family_t sat_family; /* address family */ - u_char sat_port; /* port */ + unsigned char sat_port; /* port */ struct at_addr sat_addr; /* net/node */ }; .ta diff --git a/man7/ip.7 b/man7/ip.7 index 4d1c4c663..7a03eb98d 100644 --- a/man7/ip.7 +++ b/man7/ip.7 @@ -115,13 +115,13 @@ is set to the IP protocol. .nf struct sockaddr_in { sa_family_t sin_family; /* address family: AF_INET */ - u_int16_t sin_port; /* port in network byte order */ + uint16_t sin_port; /* port in network byte order */ struct in_addr sin_addr; /* internet address */ }; /* Internet address. */ struct in_addr { - u_int32_t s_addr; /* address in network byte order */ + uint32_t s_addr; /* address in network byte order */ }; .fi .in @@ -408,13 +408,13 @@ structure: #define SO_EE_ORIGIN_ICMP6 3 struct sock_extended_err { - u_int32_t ee_errno; /* error number */ - u_int8_t ee_origin; /* where the error originated */ - u_int8_t ee_type; /* type */ - u_int8_t ee_code; /* code */ - u_int8_t ee_pad; - u_int32_t ee_info; /* additional information */ - u_int32_t ee_data; /* other data */ + uint32_t ee_errno; /* error number */ + uint8_t ee_origin; /* where the error originated */ + uint8_t ee_type; /* type */ + uint8_t ee_code; /* code */ + uint8_t ee_pad; + uint32_t ee_info; /* additional information */ + uint32_t ee_data; /* other data */ /* More data may follow */ }; diff --git a/man7/ipv6.7 b/man7/ipv6.7 index 2c7144707..26a8466e0 100644 --- a/man7/ipv6.7 +++ b/man7/ipv6.7 @@ -65,11 +65,11 @@ to v6 and it will be mapped to v6. .in +4n .nf 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 */ + uint16_t sin6_family; /* AF_INET6 */ + uint16_t sin6_port; /* port number */ + uint32_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) */ + uint32_t sin6_scope_id; /* Scope ID (new in 2.4) */ }; struct in6_addr { diff --git a/man7/svipc.7 b/man7/svipc.7 index 34047e204..e15ae3b6e 100644 --- a/man7/svipc.7 +++ b/man7/svipc.7 @@ -58,11 +58,11 @@ system header file, includes the following members: .nf struct ipc_perm { - uid_t cuid; /* creator user ID */ - gid_t cgid; /* creator group ID */ - uid_t uid; /* owner user ID */ - gid_t gid; /* owner group ID */ - ushort mode; /* r/w permissions */ + uid_t cuid; /* creator user ID */ + gid_t cgid; /* creator group ID */ + uid_t uid; /* owner user ID */ + gid_t gid; /* owner group ID */ + unsigned short mode; /* r/w permissions */ }; .fi .in @@ -201,7 +201,7 @@ struct semid_ds { struct ipc_perm sem_perm; time_t sem_otime; /* last operation time */ time_t sem_ctime; /* last change time */ - ulong sem_nsems; /* count of sems in set */ + unsigned long sem_nsems; /* count of sems in set */ }; .fi .in @@ -239,8 +239,8 @@ containing the following members: struct sem { int semval; /* semaphore value */ int sempid; /* PID for last operation */ -.\" ushort semncnt; /* nr awaiting semval to increase */ -.\" ushort semzcnt; /* nr awaiting semval = 0 */ +.\" unsigned short semncnt; /* nr awaiting semval to increase */ +.\" unsigned short semzcnt; /* nr awaiting semval = 0 */ } .fi .in