Browse Source

remove uint

It's got an implied size (32 bits) and that was always confusing.

Use u32.

Per Charles, for Plan 9 source and kenc, it was best to make
everything *except* long long be 32 bits, including int.
This is the same as gcc as it happens.

Signed-off-by: Ronald G. Minnich <rminnich@gmail.com>
Ronald G. Minnich 3 years ago
parent
commit
5e2e7abcad
100 changed files with 372 additions and 372 deletions
  1. 0 1
      aarch64/include/u.h
  2. 2 2
      acme/bin/source/acd/acd.h
  3. 1 1
      acme/bin/source/acd/util.c
  4. 1 1
      acme/bin/source/acd/win.c
  5. 2 2
      acme/bin/source/adict/win.c
  6. 1 1
      acme/bin/source/adict/win.h
  7. 2 2
      acme/bin/source/win/dat.h
  8. 1 1
      acme/bin/source/win/util.c
  9. 1 1
      acme/bin/source/win/win.c
  10. 3 3
      acme/mail/src/dat.h
  11. 2 2
      acme/mail/src/util.c
  12. 1 1
      acme/mail/src/win.c
  13. 1 1
      acme/news/src/util.c
  14. 1 1
      acme/news/src/win.c
  15. 2 2
      acme/news/src/win.h
  16. 2 2
      acme/wiki/src/awiki.h
  17. 1 1
      acme/wiki/src/util.c
  18. 1 1
      acme/wiki/src/win.c
  19. 2 3
      amd64/include/u.h
  20. 2 3
      riscv/include/u.h
  21. 1 1
      sys/include/9p.h
  22. 4 4
      sys/include/auth.h
  23. 2 2
      sys/include/cc.h
  24. 3 3
      sys/include/control.h
  25. 1 1
      sys/include/elf.h
  26. 10 10
      sys/include/fcall.h
  27. 2 2
      sys/include/ip.h
  28. 4 4
      sys/include/libc.h
  29. 1 1
      sys/include/libsec.h
  30. 6 6
      sys/include/mp.h
  31. 5 5
      sys/include/nfs3.h
  32. 1 1
      sys/include/oventi.h
  33. 1 1
      sys/include/scribble.h
  34. 18 18
      sys/include/sunrpc.h
  35. 5 5
      sys/include/thread.h
  36. 1 1
      sys/include/usb/hid.h
  37. 1 1
      sys/include/usb/serial.h
  38. 18 18
      sys/include/venti.h
  39. 2 2
      sys/include/virtio_lib.h
  40. 17 17
      sys/src/9/386/ether8169.c
  41. 14 14
      sys/src/9/386/etherigbe.c
  42. 2 2
      sys/src/9/386/pci.c
  43. 1 1
      sys/src/9/amd64/acpi.h
  44. 3 3
      sys/src/9/amd64/dat.h
  45. 1 1
      sys/src/9/amd64/devacpi.c
  46. 1 1
      sys/src/9/amd64/ether8139.c
  47. 18 18
      sys/src/9/amd64/ether82563.c
  48. 1 1
      sys/src/9/amd64/fns.h
  49. 2 2
      sys/src/9/amd64/ioapic.c
  50. 2 2
      sys/src/9/amd64/mmu.c
  51. 4 3
      sys/src/9/amd64/msi.c
  52. 10 10
      sys/src/9/amd64/physalloc.c
  53. 8 8
      sys/src/9/amd64/qmalloc.c
  54. 3 3
      sys/src/9/amd64/sdiahci.c
  55. 2 2
      sys/src/9/ip/arp.c
  56. 1 1
      sys/src/9/ip/esp.c
  57. 6 6
      sys/src/9/ip/ip.h
  58. 1 1
      sys/src/9/ip/ipv6.c
  59. 10 10
      sys/src/9/ip/tcp.c
  60. 1 1
      sys/src/9/port/cache.c
  61. 2 2
      sys/src/9/port/chan.c
  62. 1 1
      sys/src/9/port/corebootscreen.c
  63. 2 2
      sys/src/9/port/corebootscreen.h
  64. 6 6
      sys/src/9/port/dev9p.c
  65. 2 2
      sys/src/9/port/devbridge.c
  66. 1 1
      sys/src/9/port/devcec.c
  67. 2 2
      sys/src/9/port/devcons.c
  68. 3 3
      sys/src/9/port/devmnt.c
  69. 2 2
      sys/src/9/port/devmntn.c
  70. 1 1
      sys/src/9/port/devramfs.c
  71. 1 1
      sys/src/9/port/devroot.c
  72. 3 3
      sys/src/9/port/devtrace.c
  73. 2 2
      sys/src/9/port/devvcon.c
  74. 1 1
      sys/src/9/port/fault.c
  75. 1 1
      sys/src/9/port/lib.h
  76. 1 1
      sys/src/9/port/netif.h
  77. 10 10
      sys/src/9/port/portdat.h
  78. 6 6
      sys/src/9/port/portfns.h
  79. 1 1
      sys/src/9/port/qio.c
  80. 3 3
      sys/src/9/port/rmap.c
  81. 1 1
      sys/src/9/port/segment.c
  82. 1 1
      sys/src/9/port/sysproc.c
  83. 1 1
      sys/src/9/port/taslock.c
  84. 1 1
      sys/src/9/port/tcklock.c
  85. 3 3
      sys/src/9/riscv/dat.h
  86. 1 1
      sys/src/9/riscv/fns.h
  87. 3 3
      sys/src/9/riscv/mmu.c
  88. 10 10
      sys/src/9/riscv/physalloc.c
  89. 7 7
      sys/src/9/riscv/qmalloc.c
  90. 2 2
      sys/src/cmd/acid/lex.c
  91. 2 2
      sys/src/cmd/acme/acme.c
  92. 4 3
      sys/src/cmd/acme/addr.c
  93. 18 17
      sys/src/cmd/acme/buff.c
  94. 6 6
      sys/src/cmd/acme/dat.h
  95. 8 8
      sys/src/cmd/acme/disk.c
  96. 1 1
      sys/src/cmd/acme/ecmd.c
  97. 1 1
      sys/src/cmd/acme/edit.c
  98. 6 6
      sys/src/cmd/acme/elog.c
  99. 8 8
      sys/src/cmd/acme/exec.c
  100. 14 14
      sys/src/cmd/acme/file.c

+ 0 - 1
aarch64/include/u.h

@@ -16,7 +16,6 @@ typedef signed short i16;
 typedef unsigned short u16;
 typedef signed int i32;
 typedef unsigned int u32;
-typedef unsigned int uint;
 typedef signed long long i64;
 typedef unsigned long long u64;
 typedef u64 usize;

+ 2 - 2
acme/bin/source/acd/acd.h

@@ -67,7 +67,7 @@ extern	void		winclosebody(Window*);
 extern	void		wintagwrite(Window*, char*, int);
 extern	void		winname(Window*, char*);
 extern	void		winwriteevent(Window*, Event*);
-extern	void		winread(Window*, uint, uint, char*);
+extern	void		winread(Window*, u32, u32, char*);
 extern	int		windel(Window*, int);
 extern	void		wingetevent(Window*, Event*);
 extern	void		wineventproc(void*);
@@ -81,7 +81,7 @@ extern	void		winsetdump(Window*, char*, char*);
 
 extern	char*	readfile(char*, char*, int*);
 extern	void		ctlprint(int, char*, ...);
-extern	void*	emalloc(uint);
+extern	void*	emalloc(u32);
 extern	char*	estrdup(char*);
 extern	char*	estrstrdup(char*, char*);
 extern	char*	egrow(char*, char*, char*);

+ 1 - 1
acme/bin/source/acd/util.c

@@ -10,7 +10,7 @@
 #include "acd.h"
 
 void*
-emalloc(uint n)
+emalloc(u32 n)
 {
 	void *p;
 

+ 1 - 1
acme/bin/source/acd/win.c

@@ -204,7 +204,7 @@ nrunes(char *s, int nb)
 }
 
 void
-winread(Window *w, uint q0, uint q1, char *data)
+winread(Window *w, u32 q0, u32 q1, char *data)
 {
 	int m, n, nr;
 	char buf[256];

+ 2 - 2
acme/bin/source/adict/win.c

@@ -14,7 +14,7 @@
 #include "win.h"
 
 void*
-erealloc(void *p, uint n)
+erealloc(void *p, u32 n)
 {
 	p = realloc(p, n);
 	if(p == nil)
@@ -100,7 +100,7 @@ nrunes(char *s, int nb)
 }
 
 void
-wread(Win *w, uint q0, uint q1, char *data)
+wread(Win *w, u32 q0, u32 q1, char *data)
 {
 	int m, n, nr;
 	char buf[256];

+ 1 - 1
acme/bin/source/adict/win.h

@@ -47,7 +47,7 @@ struct Win
 int     dead(Win*);
 void	wnew(Win*);
 void	wwritebody(Win*, char *s, int n);
-void	wread(Win*, uint, uint, char*);
+void	wread(Win*, u32, u32, char*);
 void	wclean(Win*);
 void	wname(Win*, char*);
 void	wdormant(Win*);

+ 2 - 2
acme/bin/source/win/dat.h

@@ -66,7 +66,7 @@ extern	int		winopenfile(Window*, char*);
 extern	void		wintagwrite(Window*, char*, int);
 extern	void		winname(Window*, char*);
 extern	void		winwriteevent(Window*, Event*);
-extern	int		winread(Window*, uint, uint, char*);
+extern	int		winread(Window*, u32, u32, char*);
 extern	int		windel(Window*, int);
 extern	void		wingetevent(Window*, Event*);
 extern	void		wineventproc(void*);
@@ -77,7 +77,7 @@ extern	void		windormant(Window*);
 extern	void		winsetdump(Window*, char*, char*);
 
 extern	void		ctlprint(int, char*, ...);
-extern	void*	emalloc(uint);
+extern	void*	emalloc(u32);
 extern	char*	estrdup(char*);
 extern	char*	estrstrdup(char*, char*);
 extern	char*	egrow(char*, char*, char*);

+ 1 - 1
acme/bin/source/win/util.c

@@ -14,7 +14,7 @@
 #include "dat.h"
 
 void*
-emalloc(uint n)
+emalloc(u32 n)
 {
 	void *p;
 

+ 1 - 1
acme/bin/source/win/win.c

@@ -176,7 +176,7 @@ nrunes(char *s, int nb)
 }
 
 int
-winread(Window *w, uint q0, uint q1, char *data)
+winread(Window *w, u32 q0, u32 q1, char *data)
 {
 	int m, n, nr, nb;
 	char buf[256];

+ 3 - 3
acme/mail/src/dat.h

@@ -109,7 +109,7 @@ extern	void		winclosebody(Window*);
 extern	void		wintagwrite(Window*, char*, int);
 extern	void		winname(Window*, char*);
 extern	void		winwriteevent(Window*, Event*);
-extern	void		winread(Window*, uint, uint, char*);
+extern	void		winread(Window*, u32, u32, char*);
 extern	int		windel(Window*, int);
 extern	void		wingetevent(Window*, Event*);
 extern	void		wineventproc(void*);
@@ -145,8 +145,8 @@ extern	void		mesgfreeparts(Message*);
 extern	char*	readfile(char*, char*, int*);
 extern	char*	readbody(char*, char*, int*);
 extern	void		ctlprint(int, char*, ...);
-extern	void*	emalloc(uint);
-extern	void*	erealloc(void*, uint);
+extern	void*	emalloc(u32);
+extern	void*	erealloc(void*, u32);
 extern	char*	estrdup(char*);
 extern	char*	estrstrdup(char*, char*);
 extern	char*	egrow(char*, char*, char*);

+ 2 - 2
acme/mail/src/util.c

@@ -15,7 +15,7 @@
 #include "dat.h"
 
 void*
-emalloc(uint n)
+emalloc(u32 n)
 {
 	void *p;
 
@@ -28,7 +28,7 @@ emalloc(uint n)
 }
 
 void*
-erealloc(void *p, uint n)
+erealloc(void *p, u32 n)
 {
 	p = realloc(p, n);
 	if(p == nil)

+ 1 - 1
acme/mail/src/win.c

@@ -200,7 +200,7 @@ winwriteevent(Window *w, Event *e)
 }
 
 void
-winread(Window *w, uint q0, uint q1, char *data)
+winread(Window *w, u32 q0, u32 q1, char *data)
 {
 	int m, n, nr;
 	char buf[256];

+ 1 - 1
acme/news/src/util.c

@@ -14,7 +14,7 @@
 #include "win.h"
 
 void*
-emalloc(uint n)
+emalloc(u32 n)
 {
 	void *p;
 

+ 1 - 1
acme/news/src/win.c

@@ -208,7 +208,7 @@ nrunes(char *s, int nb)
 }
 
 void
-winread(Window *w, uint q0, uint q1, char *data)
+winread(Window *w, u32 q0, u32 q1, char *data)
 {
 	int m, n, nr;
 	char buf[256];

+ 2 - 2
acme/news/src/win.h

@@ -59,7 +59,7 @@ extern	void		winclosebody(Window*);
 extern	void		wintagwrite(Window*, char*, int);
 extern	void		winname(Window*, char*);
 extern	void		winwriteevent(Window*, Event*);
-extern	void		winread(Window*, uint, uint, char*);
+extern	void		winread(Window*, u32, u32, char*);
 extern	int		windel(Window*, int);
 extern	void		wingetevent(Window*, Event*);
 extern	void		wineventproc(void*);
@@ -73,7 +73,7 @@ extern	void		winsetdump(Window*, char*, char*);
 
 extern	char*	readfile(char*, char*, int*);
 extern	void		ctlprint(int, char*, ...);
-extern	void*	emalloc(uint);
+extern	void*	emalloc(u32);
 extern	char*	estrdup(char*);
 extern	char*	estrstrdup(char*, char*);
 extern	char*	estrstrstrdup(char*, char*, char*);

+ 2 - 2
acme/wiki/src/awiki.h

@@ -64,7 +64,7 @@ extern	void		winclosebody(Window*);
 extern	void		wintagwrite(Window*, char*, int);
 extern	void		winname(Window*, char*);
 extern	void		winwriteevent(Window*, Event*);
-extern	void		winread(Window*, uint, uint, char*);
+extern	void		winread(Window*, u32, u32, char*);
 extern	int		windel(Window*, int);
 extern	void		wingetevent(Window*, Event*);
 extern	void		wineventproc(void*);
@@ -79,7 +79,7 @@ extern	void		winsetdump(Window*, char*, char*);
 
 extern	char*	readfile(char*, char*, int*);
 extern	void		ctlprint(int, char*, ...);
-extern	void*	emalloc(uint);
+extern	void*	emalloc(u32);
 extern	char*	estrdup(char*);
 extern	char*	estrstrdup(char*, char*);
 extern	char*	egrow(char*, char*, char*);

+ 1 - 1
acme/wiki/src/util.c

@@ -10,7 +10,7 @@
 #include "awiki.h"
 
 void*
-emalloc(uint n)
+emalloc(u32 n)
 {
 	void *p;
 

+ 1 - 1
acme/wiki/src/win.c

@@ -204,7 +204,7 @@ nrunes(char *s, int nb)
 }
 
 void
-winread(Window *w, uint q0, uint q1, char *data)
+winread(Window *w, u32 q0, u32 q1, char *data)
 {
 	int m, n, nr;
 	char buf[256];

+ 2 - 3
amd64/include/u.h

@@ -20,7 +20,6 @@ typedef signed long long i64;
 typedef u64 		usize;
 typedef	i64		isize;
 
-typedef unsigned int	uint;
 typedef	u32	Rune;
 typedef union FPdbleword FPdbleword;
 typedef u64	jmp_buf[10]; // for registers.
@@ -69,8 +68,8 @@ union FPdbleword
 {
 	double	x;
 	struct {	/* little endian */
-		uint lo;
-		uint hi;
+		u32 lo;
+		u32 hi;
 	};
 };
 

+ 2 - 3
riscv/include/u.h

@@ -20,7 +20,6 @@ typedef	signed long long i64;
 typedef	u64		usize;
 typedef	i64		isize;
 
-typedef unsigned int	uint;
 typedef	u32		Rune;
 typedef union FPdbleword FPdbleword;
 // This is a guess! Assumes float!
@@ -41,8 +40,8 @@ union FPdbleword
 {
 	double	x;
 	struct {	/* little endian */
-		uint lo;
-		uint hi;
+		u32 lo;
+		u32 hi;
 	};
 };
 

+ 1 - 1
sys/include/9p.h

@@ -206,7 +206,7 @@ struct Srv {
 /* below is implementation-specific; don't use */
 	Fidpool*	fpool;
 	Reqpool*	rpool;
-	uint		msize;
+	u32		msize;
 
 	u8 *	rbuf;
 	QLock		rlock;

+ 4 - 4
sys/include/auth.h

@@ -45,7 +45,7 @@ struct AuthRpc
 	char ibuf[AuthRpcMax+1];	/* +1 for NUL in auth_rpc.c */
 	char obuf[AuthRpcMax];
 	char *arg;
-	uint narg;
+	u32 narg;
 };
 
 struct AuthInfo
@@ -135,8 +135,8 @@ extern void		auth_freeAI(AuthInfo *ai);
 extern int		auth_chuid(AuthInfo *ai, char *ns);
 extern Chalstate	*auth_challenge(char*, ...);
 extern AuthInfo*	auth_response(Chalstate*);
-extern int		auth_respond(void*, uint, char*, uint, void*,
-				       uint, AuthGetkey *getkey, char*,
+extern int		auth_respond(void*, u32, char*, u32, void*,
+				       u32, AuthGetkey *getkey, char*,
 				       ...);
 extern void		auth_freechal(Chalstate*);
 extern AuthInfo*	auth_userpasswd(char *user, char *passwd);
@@ -146,6 +146,6 @@ extern AuthInfo*	auth_getinfo(AuthRpc *rpc);
 extern AuthRpc*		auth_allocrpc(int afd);
 extern Attr*		auth_attr(AuthRpc *rpc);
 extern void		auth_freerpc(AuthRpc *rpc);
-extern uint		auth_rpc(AuthRpc *rpc, char *verb, void *a,
+extern u32		auth_rpc(AuthRpc *rpc, char *verb, void *a,
 				    int n);
 extern int		auth_wep(char*, char*, ...);

+ 2 - 2
sys/include/cc.h

@@ -741,9 +741,9 @@ Bits	band(Bits, Bits);
 Bits	bnot(Bits);
 int	bany(Bits*);
 int	bnum(Bits);
-Bits	blsh(uint);
+Bits	blsh(u32);
 int	beq(Bits, Bits);
-int	bset(Bits, uint);
+int	bset(Bits, u32);
 
 /*
  * dpchk.c

+ 3 - 3
sys/include/control.h

@@ -133,7 +133,7 @@ extern char *ctltypenames[];
 /* Functions used internally */
 void		_ctladdgroup(Control*, Control*);
 void		_ctlargcount(Control*, CParse*, int);
-Control*	_createctl(Controlset*, char*, uint, char*);
+Control*	_createctl(Controlset*, char*, u32, char*);
 Rune*		_ctlrunestr(char*);
 char*		_ctlstrrune(Rune*);
 void		_ctlputsnarf(Rune*);
@@ -182,8 +182,8 @@ void		ctlerror(char*, ...);
 Control*	controlcalled(char*);
 
 /* publicly visible error-checking allocation routines */
-void*		ctlmalloc(uint);
-void*		ctlrealloc(void*, uint);
+void*		ctlmalloc(u32);
+void*		ctlrealloc(void*, u32);
 char*		ctlstrdup(char*);
 
 /* creation */

+ 1 - 1
sys/include/elf.h

@@ -87,7 +87,7 @@ typedef struct {
 
 typedef struct Sym {
 	i64		value;
-	uint		sig;
+	u32		sig;
 	char		type;
 	char		*name;
 } Sym;

+ 10 - 10
sys/include/fcall.h

@@ -30,7 +30,7 @@ struct	Fcall
 			char	*ename;		/* Rerror */
 		};
 		struct {
-			uint	errno;		/* Rlerror */
+			u32	errno;		/* Rlerror */
 		};
 		struct {
 			Qid	qid;		/* Rattach, Ropen, Rcreate */
@@ -167,19 +167,19 @@ enum
 	Rreaddir
 };
 
-uint	convM2S(u8*, uint, Fcall*);
-uint	convS2M(Fcall*, u8*, uint);
-uint	sizeS2M(Fcall*);
+u32	convM2S(u8*, u32, Fcall*);
+u32	convS2M(Fcall*, u8*, u32);
+u32	sizeS2M(Fcall*);
 
-int	statcheck(u8 *abuf, uint nbuf);
-uint	convM2D(u8*, uint, Dir*, char*);
-uint	convLM2D(u8*, uint, Dir*);
-uint	convD2M(Dir*, u8*, uint);
-uint	sizeD2M(Dir*);
+int	statcheck(u8 *abuf, u32 nbuf);
+u32	convM2D(u8*, u32, Dir*, char*);
+u32	convLM2D(u8*, u32, Dir*);
+u32	convD2M(Dir*, u8*, u32);
+u32	sizeD2M(Dir*);
 
 int	fcallfmt(Fmt*);
 int	dirfmt(Fmt*);
 int	dirmodefmt(Fmt*);
 
-int	read9pmsg(int, void*, uint);
+int	read9pmsg(int, void*, u32);
 

+ 2 - 2
sys/include/ip.h

@@ -180,10 +180,10 @@ int	equivip6(u8*, u8*);
 Ipifc*	readipifc(char*, Ipifc*, int);
 
 void	hnputv(void*, u64);
-void	hnputl(void*, uint);
+void	hnputl(void*, u32);
 void	hnputs(void*, u16);
 u64	nhgetv(void*);
-uint	nhgetl(void*);
+u32	nhgetl(void*);
 u16	nhgets(void*);
 u16	ptclbsum(u8*, int);
 

+ 4 - 4
sys/include/libc.h

@@ -558,7 +558,7 @@ typedef
 struct Dir {
 	/* system-modified data */
 	u16	type;	/* server type */
-	uint	dev;	/* server subtype */
+	u32	dev;	/* server subtype */
 	/* file data */
 	Qid	qid;	/* unique id from server */
 	u32	mode;	/* permissions */
@@ -599,8 +599,8 @@ extern	int	chdir(const char*);
 extern	int	close(int);
 extern	int	create(const char*, int, u32);
 extern	int	dup(int, int);
-extern	char*	errno2str(uint errno);
-extern	int	errstr(char*, uint);
+extern	char*	errno2str(u32 errno);
+extern	int	errstr(char*, u32);
 extern	int	exec(const char*, char* const[]);
 extern	int	execl(const char*, ...);
 extern	int	fork(void);
@@ -655,7 +655,7 @@ extern	void	nulldir(Dir*);
 extern	i32	dirreadall(int, Dir**);
 extern	int	getpid(void);
 extern	int	getppid(void);
-extern	void	rerrstr(char*, uint);
+extern	void	rerrstr(char*, u32);
 extern	char*	sysname(void);
 extern	void	werrstr(const char*, ...);
 

+ 1 - 1
sys/include/libsec.h

@@ -24,7 +24,7 @@ struct AESstate
 	u32	setup;
 	int	rounds;
 	int	keybytes;
-	uint	ctrsz;
+	u32	ctrsz;
 	u8	key[AESmaxkey];			/* unexpanded key */
 	u32	ekey[4*(AESmaxrounds + 1)];	/* encryption key */
 	u32	dkey[4*(AESmaxrounds + 1)];	/* decryption key */

+ 6 - 6
sys/include/mp.h

@@ -50,12 +50,12 @@ mpint*	mprand(int bits, void (*gen)(u8*, int), mpint *b);
 mpint*	strtomp(char*, char**, int, mpint*);	/* ascii */
 int	mpfmt(Fmt*);
 char*	mptoa(mpint*, int, char*, int);
-mpint*	letomp(u8*, uint, mpint*);	/* byte array, little-endian */
-int	mptole(mpint*, u8*, uint, u8**);
-mpint*	betomp(u8*, uint, mpint*);	/* byte array, little-endian */
-int	mptobe(mpint*, u8*, uint, u8**);
-uint	mptoui(mpint*);			/* unsigned int */
-mpint*	uitomp(uint, mpint*);
+mpint*	letomp(u8*, u32, mpint*);	/* byte array, little-endian */
+int	mptole(mpint*, u8*, u32, u8**);
+mpint*	betomp(u8*, u32, mpint*);	/* byte array, little-endian */
+int	mptobe(mpint*, u8*, u32, u8**);
+u32	mptoui(mpint*);			/* unsigned int */
+mpint*	uitomp(u32, mpint*);
 int	mptoi(mpint*);			/* int */
 mpint*	itomp(int, mpint*);
 u64	mptouv(mpint*);			/* unsigned vlong */

+ 5 - 5
sys/include/nfs3.h

@@ -74,9 +74,9 @@ struct NfsMount3TMnt {
 
 struct NfsMount3RMnt {
 	NfsMount3Call call;
-	uint status;
+	u32 status;
 	u8 *handle;
-	uint len;
+	u32 len;
 	u32 *auth;
 	u32 nauth;
 };
@@ -129,14 +129,14 @@ struct NfsMount3RExport {
 	u32 count;
 };
 
-uint nfsMount3ExportGroupSize(u8*);
-uint nfsMount3ExportSize(NfsMount3Export*);
+u32 nfsMount3ExportGroupSize(u8*);
+u32 nfsMount3ExportSize(NfsMount3Export*);
 int nfsMount3ExportPack(u8*, u8*, u8**, NfsMount3Export*);
 int nfsMount3ExportUnpack(u8*, u8*, u8**, char**, char***,
 			  NfsMount3Export*);
 int nfsMount3EntryPack(u8*, u8*, u8**, NfsMount3Entry*);
 int nfsMount3EntryUnpack(u8*, u8*, u8**, NfsMount3Entry*);
-uint nfsMount3EntrySize(NfsMount3Entry*);
+u32 nfsMount3EntrySize(NfsMount3Entry*);
 
 extern SunProg nfsMount3Prog;
 

+ 1 - 1
sys/include/oventi.h

@@ -180,7 +180,7 @@ int vtSync(VtSession *s);
 
 int vtZeroExtend(int type, u8 *buf, int n, int nn);
 int vtZeroTruncate(int type, u8 *buf, int n);
-int vtParseScore(char*, uint, u8[VtScoreSize]);
+int vtParseScore(char*, u32, u8[VtScoreSize]);
 
 void vtRootPack(VtRoot*, u8*);
 int vtRootUnpack(VtRoot*, u8*);

+ 1 - 1
sys/include/scribble.h

@@ -18,7 +18,7 @@ typedef struct pen_point {
 } pen_point;
 
 typedef struct Stroke {
-	uint			npts;	/*Number of pen_point in array.*/
+	u32			npts;	/*Number of pen_point in array.*/
 	pen_point*	pts;	/*Array of points.*/
 } Stroke;
 

+ 18 - 18
sys/include/sunrpc.h

@@ -55,9 +55,9 @@ typedef enum {
 
 struct SunAuthInfo
 {
-	uint flavor;
+	u32 flavor;
 	u8 *data;
-	uint ndata;
+	u32 ndata;
 };
 
 struct SunAuthUnix
@@ -73,7 +73,7 @@ struct SunAuthUnix
 struct SunRpc
 {
 	u32 xid;
-	uint iscall;
+	u32 iscall;
 
 	/*
 	 * only sent on wire in call
@@ -82,19 +82,19 @@ struct SunRpc
 	u32 proc;
 
 	/* call */
-	// uint proc;
+	// u32 proc;
 	u32 prog, vers;
 	SunAuthInfo cred;
 	SunAuthInfo verf;
 	u8 *data;
-	uint ndata;
+	u32 ndata;
 
 	/* reply */
 	u32 status;
 	// SunAuthInfo verf;
 	u32 low, high;
 	// uchar *data;
-	// uint ndata;
+	// u32 ndata;
 };
 
 typedef enum
@@ -112,17 +112,17 @@ struct SunCall
 void sunErrstr(SunStatus);
 
 void sunRpcPrint(Fmt*, SunRpc*);
-uint sunRpcSize(SunRpc*);
+u32 sunRpcSize(SunRpc*);
 SunStatus sunRpcPack(u8*, u8*, u8**, SunRpc*);
 SunStatus sunRpcUnpack(u8*, u8*, u8**, SunRpc*);
 
 void sunAuthInfoPrint(Fmt*, SunAuthInfo*);
-uint sunAuthInfoSize(SunAuthInfo*);
+u32 sunAuthInfoSize(SunAuthInfo*);
 int sunAuthInfoPack(u8*, u8*, u8**, SunAuthInfo*);
 int sunAuthInfoUnpack(u8*, u8*, u8**, SunAuthInfo*);
 
 void sunAuthUnixPrint(Fmt*, SunAuthUnix*);
-uint sunAuthUnixSize(SunAuthUnix*);
+u32 sunAuthUnixSize(SunAuthUnix*);
 int sunAuthUnixPack(u8*, u8*, u8**, SunAuthUnix*);
 int sunAuthUnixUnpack(u8*, u8*, u8**, SunAuthUnix*);
 
@@ -133,7 +133,7 @@ int sunUint1Unpack(u8*, u8*, u8**, u1int*);
 
 int sunStringPack(u8*, u8*, u8**, char**, u32);
 int sunStringUnpack(u8*, u8*, u8**, char**, u32);
-uint sunStringSize(char*);
+u32 sunStringSize(char*);
 
 int sunUint32Pack(u8*, u8*, u8**, u32*);
 int sunUint32Unpack(u8*, u8*, u8**, u32*);
@@ -144,11 +144,11 @@ int sunVarOpaquePack(u8*, u8*, u8**, u8**, u32*,
 		     u32);
 int sunVarOpaqueUnpack(u8*, u8*, u8**, u8**, u32*,
 		       u32);
-uint sunVarOpaqueSize(u32);
+u32 sunVarOpaqueSize(u32);
 
 int sunFixedOpaquePack(u8*, u8*, u8**, u8*, u32);
 int sunFixedOpaqueUnpack(u8*, u8*, u8**, u8*, u32);
-uint sunFixedOpaqueSize(u32);
+u32 sunFixedOpaqueSize(u32);
 
 /*
  * Sun RPC Program
@@ -157,8 +157,8 @@ typedef struct SunProc SunProc;
 typedef struct SunProg SunProg;
 struct SunProg
 {
-	uint prog;
-	uint vers;
+	u32 prog;
+	u32 vers;
 	SunProc *proc;
 	int nproc;
 };
@@ -167,17 +167,17 @@ struct SunProc
 {
 	int (*pack)(u8*, u8*, u8**, SunCall*);
 	int (*unpack)(u8*, u8*, u8**, SunCall*);
-	uint (*size)(SunCall*);
+	u32 (*size)(SunCall*);
 	void (*fmt)(Fmt*, SunCall*);
-	uint sizeoftype;
+	u32 sizeoftype;
 };
 
 SunStatus sunCallPack(SunProg*, u8*, u8*, u8**, SunCall*);
 SunStatus sunCallUnpack(SunProg*, u8*, u8*, u8**, SunCall*);
 SunStatus sunCallUnpackAlloc(SunProg*, SunCallType, u8*, u8*,
 			     u8**, SunCall**);
-uint sunCallSize(SunProg*, SunCall*);
-void sunCallSetup(SunCall*, SunProg*, uint);
+u32 sunCallSize(SunProg*, SunCall*);
+void sunCallSetup(SunCall*, SunProg*, u32);
 
 /*
  * Formatting

+ 5 - 5
sys/include/thread.h

@@ -26,8 +26,8 @@ enum {
 
 struct Channel {
 	int	s;		/* Size of the channel (may be zero) */
-	uint	f;		/* Extraction point (insertion pt: (f+n) % s) */
-	uint	n;		/* Number of values in the channel */
+	u32	f;		/* Extraction point (insertion pt: (f+n) % s) */
+	u32	n;		/* Number of values in the channel */
 	int	e;		/* Element size */
 	int	freed;		/* Set when channel is being deleted */
 	volatile Alt **qentry;	/* Receivers/senders waiting (malloc) */
@@ -79,8 +79,8 @@ int	nbsend(Channel *c, void *v);
 int	nbsendp(Channel *c, void *v);
 int	nbsendul(Channel *c, u32 v);
 void	needstack(int);
-int	proccreate(void (*f)(void *arg), void *arg, uint stacksize);
-int	procrfork(void (*f)(void *arg), void *arg, uint stacksize, int flag);
+int	proccreate(void (*f)(void *arg), void *arg, u32 stacksize);
+int	procrfork(void (*f)(void *arg), void *arg, u32 stacksize, int flag);
 void**	procdata(void);
 void	procexec(Channel *, char *, char *[]);
 void	procexecl(Channel *, char *, ...);
@@ -90,7 +90,7 @@ u32	recvul(Channel *c);
 int	send(Channel *c, void *v);
 int	sendp(Channel *c, void *v);
 int	sendul(Channel *c, u32 v);
-int	threadcreate(void (*f)(void *arg), void *arg, uint stacksize);
+int	threadcreate(void (*f)(void *arg), void *arg, u32 stacksize);
 void**	threaddata(void);
 void	threadexits(char *);
 void	threadexitsall(char *);

+ 1 - 1
sys/include/usb/hid.h

@@ -105,7 +105,7 @@ struct HidInterface {
 
 struct HidRepTempl{
 	int	id;				/* id which may not be present */
-	uint	sz;				/* in bytes */
+	u32	sz;				/* in bytes */
 	int	nifcs;
 	HidInterface ifcs[MaxIfc];
 };

+ 1 - 1
sys/include/usb/serial.h

@@ -46,7 +46,7 @@ struct Serialport {
 	u8	ctlstate;
 
 	/* serial parameters */
-	uint	baud;
+	u32	baud;
 	int	stop;
 	int	mctl;
 	int	parity;

+ 18 - 18
sys/include/venti.h

@@ -22,7 +22,7 @@ typedef struct Packet Packet;
 
 Packet*	packetalloc(void);
 void	packetappend(Packet*, u8 *buf, int n);
-uint	packetasize(Packet*);
+u32	packetasize(Packet*);
 int	packetcmp(Packet*, Packet*);
 int	packetcompact(Packet*);
 void	packetconcat(Packet*, Packet*);
@@ -37,7 +37,7 @@ u8 *	packetheader(Packet*, int n);
 u8 *	packetpeek(Packet*, u8 *buf, int offset, int n);
 void	packetprefix(Packet*, u8 *buf, int n);
 void	packetsha1(Packet*, u8 sha1[20]);
-uint	packetsize(Packet*);
+u32	packetsize(Packet*);
 Packet*	packetsplit(Packet*, int n);
 void	packetstats(void);
 u8 *	packettrailer(Packet*, int n);
@@ -55,7 +55,7 @@ struct VtLog
 	VtLog	*next;		/* in hash table */
 	char	*name;
 	VtLogChunk *chunk;
-	uint	nchunk;
+	u32	nchunk;
 	VtLogChunk *w;
 	QLock	lk;
 	int	ref;
@@ -68,7 +68,7 @@ struct VtLogChunk
 	char	*wp;
 };
 
-VtLog*	vtlogopen(char *name, uint size);
+VtLog*	vtlogopen(char *name, u32 size);
 void	vtlogprint(VtLog *log, char *fmt, ...);
 void	vtlog(char *name, char *fmt, ...);
 void	vtlogclose(VtLog*);
@@ -124,8 +124,8 @@ enum
 };
 
 /* convert to/from on-disk type numbers */
-uint vttodisktype(uint);
-uint vtfromdisktype(uint);
+u32 vttodisktype(u32);
+u32 vtfromdisktype(u32);
 
 /*
  * VtEntry describes a Venti stream
@@ -187,8 +187,8 @@ extern u8 vtzeroscore[VtScoreSize];
 /*
  * zero extend and truncate blocks
  */
-void vtzeroextend(int type, u8 *buf, uint n, uint nn);
-uint vtzerotruncate(int type, u8 *buf, uint n);
+void vtzeroextend(int type, u8 *buf, u32 n, u32 nn);
+u32 vtzerotruncate(int type, u8 *buf, u32 n);
 
 /*
  * parse score: mungs s
@@ -286,14 +286,14 @@ struct VtFcall
 	char	*uid;		/* Thello */
 	u8	strength;	/* Thello */
 	u8	*crypto;	/* Thello */
-	uint	ncrypto;	/* Thello */
+	u32	ncrypto;	/* Thello */
 	u8	*codec;		/* Thello */
-	uint	ncodec;		/* Thello */
+	u32	ncodec;		/* Thello */
 	char	*sid;		/* Rhello */
 	u8	rcrypto;	/* Rhello */
 	u8	rcodec;		/* Rhello */
 	u8	*auth;		/* TauthX, RauthX */
-	uint	nauth;		/* TauthX, RauthX */
+	u32	nauth;		/* TauthX, RauthX */
 	u8	score[VtScoreSize];	/* Tread, Rwrite */
 	u8	blocktype;	/* Tread, Twrite */
 	u16	count;		/* Tread */
@@ -325,8 +325,8 @@ struct VtConn
 	void	*readq;
 	int	state;
 	void	*wait[256];
-	uint	ntag;
-	uint	nsleep;
+	u32	ntag;
+	u32	nsleep;
 	Packet	*part;
 	Rendez	tagrend;
 	Rendez	rpcfork;
@@ -373,13 +373,13 @@ void	vtsendproc(void*);	/* VtConn */
 
 int	vtconnect(VtConn*);
 int	vthello(VtConn*);
-int	vtread(VtConn*, u8 score[VtScoreSize], uint type,
+int	vtread(VtConn*, u8 score[VtScoreSize], u32 type,
 		  u8 *buf, int n);
-int	vtwrite(VtConn*, u8 score[VtScoreSize], uint type,
+int	vtwrite(VtConn*, u8 score[VtScoreSize], u32 type,
 		   u8 *buf, int n);
-Packet*	vtreadpacket(VtConn*, u8 score[VtScoreSize], uint type,
+Packet*	vtreadpacket(VtConn*, u8 score[VtScoreSize], u32 type,
 			    int n);
-int	vtwritepacket(VtConn*, u8 score[VtScoreSize], uint type,
+int	vtwritepacket(VtConn*, u8 score[VtScoreSize], u32 type,
 			 Packet *p);
 int	vtsync(VtConn*);
 int	vtping(VtConn*);
@@ -426,7 +426,7 @@ VtBlock*vtcachelocal(VtCache*, u32 addr, int type);
 VtBlock*vtcacheglobal(VtCache*, u8[VtScoreSize], int type);
 VtBlock*vtcacheallocblock(VtCache*, int type);
 void	vtcachesetwrite(VtCache*,
-	int(*)(VtConn*, u8[VtScoreSize], uint, u8*, int));
+	int(*)(VtConn*, u8[VtScoreSize], u32, u8*, int));
 void	vtblockput(VtBlock*);
 u32	vtcacheblocksize(VtCache*);
 int	vtblockwrite(VtBlock*);

+ 2 - 2
sys/include/virtio_lib.h

@@ -41,8 +41,8 @@ typedef struct virtq {
 	u16 lastused;
 	u16 waiting;
 	Lock l;
-	uint free;
-	uint nfree;
+	u32 free;
+	u32 nfree;
 	void *pdev;					// use this to reference the virtio device control structure which is per-driver
 	int idx;					// driver use only, index of the queue per device
 	void *pqdata;				// per-queue private data (may be shared between queues of the same device)

+ 17 - 17
sys/src/9/386/ether8169.c

@@ -324,18 +324,18 @@ typedef struct Ctlr {
 
 	QLock slock; /* statistics */
 	Dtcc *dtcc;
-	uint txdu;
-	uint tcpf;
-	uint udpf;
-	uint ipf;
-	uint fovf;
-	uint ierrs;
-	uint rer;
-	uint rdu;
-	uint punlc;
-	uint fovw;
-	uint mcast;
-	uint frag; /* partial packets; rb was too small */
+	u32 txdu;
+	u32 tcpf;
+	u32 udpf;
+	u32 ipf;
+	u32 fovf;
+	u32 ierrs;
+	u32 rer;
+	u32 rdu;
+	u32 punlc;
+	u32 fovw;
+	u32 mcast;
+	u32 frag; /* partial packets; rb was too small */
 } Ctlr;
 
 static Ctlr *rtl8169ctlrhead;
@@ -351,7 +351,7 @@ static Ctlr *rtl8169ctlrtail;
 static int
 rtl8169miimir(Mii *mii, int pa, int ra)
 {
-	uint r;
+	u32 r;
 	int timeo;
 	Ctlr *ctlr;
 
@@ -376,7 +376,7 @@ rtl8169miimir(Mii *mii, int pa, int ra)
 static int
 rtl8169miimiw(Mii *mii, int pa, int ra, int data)
 {
-	uint r;
+	u32 r;
 	int timeo;
 	Ctlr *ctlr;
 
@@ -937,7 +937,7 @@ rtl8169attach(Ether *edev)
 static void
 rtl8169link(Ether *edev)
 {
-	uint r;
+	u32 r;
 	int limit;
 	Ctlr *ctlr;
 
@@ -1151,7 +1151,7 @@ rtl8169interrupt(Ureg *u, void *arg)
 }
 
 int
-vetmacv(Ctlr *ctlr, uint *macv)
+vetmacv(Ctlr *ctlr, u32 *macv)
 {
 	*macv = csr32r(ctlr, Tcr) & HwveridMASK;
 	switch(*macv){
@@ -1190,7 +1190,7 @@ rtl8169pci(void)
 	Pcidev *p;
 	Ctlr *ctlr;
 	int i, port, pcie;
-	uint macv;
+	u32 macv;
 
 	p = nil;
 	while((p = pcimatch(p, 0, 0)) != nil){

+ 14 - 14
sys/src/9/386/etherigbe.c

@@ -371,7 +371,7 @@ enum {			       /* Receive Delay Timer Ring */
 };
 
 typedef struct Rd { /* Receive Descriptor */
-	uint addr[2];
+	u32 addr[2];
 	u16 length;
 	u16 checksum;
 	unsigned char status;
@@ -402,7 +402,7 @@ enum {		    /* Rd errors */
 typedef struct Td Td;
 struct Td { /* Transmit Descriptor */
 	union {
-		uint addr[2]; /* Data */
+		u32 addr[2]; /* Data */
 		struct {      /* Context */
 			unsigned char ipcss;
 			unsigned char ipcso;
@@ -412,8 +412,8 @@ struct Td { /* Transmit Descriptor */
 			u16 tucse;
 		};
 	};
-	uint control;
-	uint status;
+	u32 control;
+	u32 status;
 };
 
 enum {			     /* Td control */
@@ -492,16 +492,16 @@ struct Ctlr {
 	Watermark wmtd;
 
 	QLock slock;
-	uint statistics[Nstatistics];
-	uint lsleep;
-	uint lintr;
-	uint rsleep;
-	uint rintr;
-	uint txdw;
-	uint tintr;
-	uint ixsm;
-	uint ipcs;
-	uint tcpcs;
+	u32 statistics[Nstatistics];
+	u32 lsleep;
+	u32 lintr;
+	u32 rsleep;
+	u32 rintr;
+	u32 txdw;
+	u32 tintr;
+	u32 ixsm;
+	u32 ipcs;
+	u32 tcpcs;
 
 	unsigned char ra[Eaddrlen]; /* receive address */
 	u32 mta[128];	    /* multicast table array */

+ 2 - 2
sys/src/9/386/pci.c

@@ -80,14 +80,14 @@ tbdffmt(Fmt *fmt)
 {
 	char *p;
 	int l, r;
-	uint type, tbdf;
+	u32 type, tbdf;
 
 	if((p = malloc(READSTR)) == nil)
 		return fmtstrcpy(fmt, "(tbdfconv)");
 
 	switch(fmt->r){
 	case 'T':
-		tbdf = va_arg(fmt->args, uint);
+		tbdf = va_arg(fmt->args, u32);
 		type = BUSTYPE(tbdf);
 		if(type < nelem(bustypes))
 			l = snprint(p, READSTR, bustypes[type]);

+ 1 - 1
sys/src/9/amd64/acpi.h

@@ -428,7 +428,7 @@ struct Slit {
 
 struct SlEntry {
 	int dom;   /* proximity domain */
-	uint dist; /* distance to proximity domain */
+	u32 dist; /* distance to proximity domain */
 };
 
 /* Fixed ACPI description table.

+ 3 - 3
sys/src/9/amd64/dat.h

@@ -376,9 +376,9 @@ struct Sys {
 
 	u64 cyclefreq; /* Frequency of user readable cycle counter (mach 0) */
 
-	uint pgszlg2[NPGSZ];  /* per Mach or per Sys? */
-	uint pgszmask[NPGSZ]; /* Per sys -aki */
-	uint pgsz[NPGSZ];
+	u32 pgszlg2[NPGSZ];  /* per Mach or per Sys? */
+	u32 pgszmask[NPGSZ]; /* Per sys -aki */
+	u32 pgsz[NPGSZ];
 	int npgsz;
 };
 static_assert(sizeof(Sys) <= (1 * MiB - 1 * KiB), "Sys is too big");

+ 1 - 1
sys/src/9/amd64/devacpi.c

@@ -150,7 +150,7 @@ static Acpilist *acpilists;
  * so size matters.
  */
 static Acpilist *
-findlist(usize base, uint size)
+findlist(usize base, u32 size)
 {
 	Acpilist *a = acpilists;
 	if(v)

+ 1 - 1
sys/src/9/amd64/ether8139.c

@@ -217,7 +217,7 @@ typedef struct Ctlr {
 	int dis;  /* disconnect counter */
 	int fcsc; /* false carrier sense counter */
 	int rec;  /* RX_ER counter */
-	uint mcast;
+	u32 mcast;
 } Ctlr;
 
 static Ctlr *ctlrhead;

+ 18 - 18
sys/src/9/amd64/ether82563.c

@@ -540,17 +540,17 @@ struct Ctlr {
 	Watermark wmtd;
 
 	QLock slock;
-	uint statistics[Nstatistics];
-	uint lsleep;
-	uint lintr;
-	uint rsleep;
-	uint rintr;
-	uint txdw;
-	uint tintr;
-	uint ixsm;
-	uint ipcs;
-	uint tcpcs;
-	uint speeds[4];
+	u32 statistics[Nstatistics];
+	u32 lsleep;
+	u32 lintr;
+	u32 rsleep;
+	u32 rintr;
+	u32 txdw;
+	u32 tintr;
+	u32 ixsm;
+	u32 ipcs;
+	u32 tcpcs;
+	u32 speeds[4];
 
 	u8 ra[Eaddrlen]; /* receive address */
 	u32 mta[128];    /* multicast table array */
@@ -573,8 +573,8 @@ struct Ctlr {
 	int fcrtl;
 	int fcrth;
 
-	uint pbs; /* packet buffer size */
-	uint pba; /* packet buffer allocation */
+	u32 pbs; /* packet buffer size */
+	u32 pba; /* packet buffer allocation */
 };
 
 #define csr32r(c, r) (*((c)->nic + ((r) / 4)))
@@ -1218,10 +1218,10 @@ phynum(Ctlr *ctlr)
 	return ctlr->phynum;
 }
 
-static uint
+static u32
 phyread(Ctlr *ctlr, int reg)
 {
-	uint phy, i;
+	u32 phy, i;
 
 	if(reg >= 32)
 		iprint("phyread: reg %d >= 32\n", reg);
@@ -1238,10 +1238,10 @@ phyread(Ctlr *ctlr, int reg)
 	return phy & 0xffff;
 }
 
-static uint
+static u32
 phywrite(Ctlr *ctlr, int reg, u16 val)
 {
-	uint phy, i;
+	u32 phy, i;
 
 	if(reg >= 32)
 		iprint("phyread: reg %d >= 32\n", reg);
@@ -1353,7 +1353,7 @@ k1fix(Ctlr *ctlr)
 static void
 i82563lproc(void *v)
 {
-	uint phy, sp, a, phy79, prevlink;
+	u32 phy, sp, a, phy79, prevlink;
 	Ctlr *ctlr;
 	Ether *edev;
 

+ 1 - 1
sys/src/9/amd64/fns.h

@@ -233,7 +233,7 @@ void sysrforkret(void);
 void *KADDR(usize);
 u64 PADDR(void *);
 
-#define BIOSSEG(a) KADDR(((uint)(a)) << 4)
+#define BIOSSEG(a) KADDR(((u32)(a)) << 4)
 
 /*
  * apic.c

+ 2 - 2
sys/src/9/amd64/ioapic.c

@@ -499,7 +499,7 @@ ioapicintrdd(u32 *hi, u32 *lo)
 static int
 nextvec(void)
 {
-	uint vecno;
+	u32 vecno;
 
 	lock(&idtnolock);
 	vecno = idtno;
@@ -525,7 +525,7 @@ msimask(Vkey *v, int mask)
 static int
 intrenablemsi(Vctl *v, Pcidev *p)
 {
-	uint vno, lo, hi;
+	u32 vno, lo, hi;
 	u64 msivec;
 
 	vno = nextvec();

+ 2 - 2
sys/src/9/amd64/mmu.c

@@ -316,7 +316,7 @@ Panic:
 }
 
 static u64
-pteflags(uint attr)
+pteflags(u32 attr)
 {
 	u64 flags;
 
@@ -360,7 +360,7 @@ allocptpage(Proc *p, int level)
  * For 1*GiB pages, we use two levels.
  */
 void
-mmuput(usize va, Page *pg, uint attr)
+mmuput(usize va, Page *pg, u32 attr)
 {
 	Proc *up;
 	int pgsz;

+ 4 - 3
sys/src/9/amd64/msi.c

@@ -71,7 +71,7 @@ blacklist(Pcidev *p)
 int
 pcimsienable(Pcidev *p, u64 vec)
 {
-	uint c, f, d, datao, lopri, dmode, logical;
+	u32 c, f, d, datao, lopri, dmode, logical;
 
 	c = msicap(p);
 	if(c == 0)
@@ -91,7 +91,8 @@ pcimsienable(Pcidev *p, u64 vec)
 		pcicfgw32(p, c + 8, 0);
 	}
 	dmode = (vec >> 8) & 7;
-	pcicfgw16(p, c + datao, Msidassert | Msidlogical * logical | Msidmode * dmode | ((uint)vec & 0xff));
+	pcicfgw16(p, c + datao,
+		  Msidassert | Msidlogical * logical | Msidmode * dmode | ((u32)vec & 0xff));
 	if(f & Vmask)
 		pcicfgw32(p, c + datao + 4, 0);
 
@@ -106,7 +107,7 @@ pcimsienable(Pcidev *p, u64 vec)
 int
 pcimsimask(Pcidev *p, int mask)
 {
-	uint c, f;
+	u32 c, f;
 
 	c = msicap(p);
 	if(c == 0)

+ 10 - 10
sys/src/9/amd64/physalloc.c

@@ -33,15 +33,15 @@ enum {
 	Avail = 1,
 };
 
-#define INDEX(b, v) ((uint)(((v)) / (b)->bminsz))
+#define INDEX(b, v) ((u32)(((v)) / (b)->bminsz))
 #define BLOCK(b, i) ((i)-INDEX((b), (b)->memory))
 
 typedef struct Buddy Buddy;
 struct Buddy {
 	i16 tag; /* Used or Avail */
 	i16 kval;
-	uint next;
-	uint prev;
+	u32 next;
+	u32 prev;
 	void *p;
 };
 
@@ -60,7 +60,7 @@ struct Bal {
 	int kmax;	/* Maximum lg2 */
 	u64 bminsz; /* minimum block sz */
 	u64 memory;
-	uint kspan;
+	u32 kspan;
 
 	Buddy *blocks;
 	Buddy *avail;
@@ -90,7 +90,7 @@ seprintphysstats(char *s, char *e)
 static void
 xphysfree(Bal *b, u64 data, u64 size)
 {
-	uint i;
+	u32 i;
 	Buddy *l, *p;
 	Buddy *blocks, *avail;
 
@@ -195,7 +195,7 @@ physfree(u64 data, u64 size)
 static void *
 xphystag(Bal *b, u64 data)
 {
-	uint i;
+	u32 i;
 	Buddy *blocks;
 
 	DBG("phystag\n");
@@ -509,7 +509,7 @@ lg2floor(u64 w)
 static u64
 xphysalloc(Bal *b, u64 size, void *tag)
 {
-	uint i, j, k;
+	u32 i, j, k;
 	Buddy *l, *p;
 	Buddy *avail, *blocks;
 	u64 m;
@@ -617,7 +617,7 @@ physalloc(u64 size, int *colorp, void *tag)
 static void
 dump(Bal *b)
 {
-	uint bi, i, k;
+	u32 bi, i, k;
 	Buddy *blocks;
 
 	blocks = b->blocks;
@@ -653,7 +653,7 @@ physallocdump(void)
 static int
 plop(Bal *b, u64 a, int k, int type)
 {
-	uint i;
+	u32 i;
 	Buddy *l;
 
 	DBG("plop(a %#p k %d type %d)\n", a, k, type);
@@ -671,7 +671,7 @@ static int
 iimbchunk(Bal *b, u64 a, u64 e, int type)
 {
 	int k;
-	uint s;
+	u32 s;
 
 	a = ROUNDUP(a, b->bminsz);
 	e = ROUNDDN(e, b->bminsz);

+ 8 - 8
sys/src/9/amd64/qmalloc.c

@@ -29,7 +29,7 @@ typedef struct Qlist Qlist;
 union Header {
 	struct {
 		Header *next;
-		uint size;
+		u32 size;
 	} s;
 	Align al;
 };
@@ -38,7 +38,7 @@ struct Qlist {
 	Lock lk;
 	Header *first;
 
-	uint nalloc;
+	u32 nalloc;
 };
 
 enum {
@@ -138,7 +138,7 @@ qmallocalign(usize nbytes, usize align, i32 offset, usize span)
 	Qlist *qlist;
 	usize aligned;
 	Header **pp, *p, *q, *r;
-	uint naligned, nunits, n;
+	u32 naligned, nunits, n;
 
 	if(nbytes == 0 || offset != 0 || span != 0)
 		return nil;
@@ -268,7 +268,7 @@ qmalloc(usize nbytes)
 {
 	Qlist *qlist;
 	Header *p, *q;
-	uint nunits, n;
+	u32 nunits, n;
 
 	///* FIXME: (ignore for now)
 	if(nbytes == 0)
@@ -329,7 +329,7 @@ qfreeinternal(void *ap)
 {
 	Qlist *qlist;
 	Header *p, *q;
-	uint nunits;
+	u32 nunits;
 
 	if(ap == nil)
 		return;
@@ -381,7 +381,7 @@ u32
 msize(void *ap)
 {
 	Header *p;
-	uint nunits;
+	u32 nunits;
 
 	if(ap == nil)
 		return 0;
@@ -572,7 +572,7 @@ realloc(void *ap, u32 size)
 	void *v;
 	Header *p;
 	u32 osize;
-	uint nunits, ounits;
+	u32 nunits, ounits;
 
 	/*
 	 * Easy stuff:
@@ -666,7 +666,7 @@ mallocinit(void)
 }
 
 static int
-morecore(uint nunits)
+morecore(u32 nunits)
 {
 	/*
 	 * First (simple) cut.

+ 3 - 3
sys/src/9/amd64/sdiahci.c

@@ -1061,7 +1061,7 @@ setstate(Drive *d, int state)
 static void
 resetdisk(Drive *d)
 {
-	uint state, det, stat;
+	u32 state, det, stat;
 	Aport *p;
 
 	p = d->port;
@@ -2264,7 +2264,7 @@ iawctl(SDunit *u, Cmdbuf *cmd)
 	char **f;
 	Ctlr *c;
 	Drive *d;
-	uint i;
+	u32 i;
 
 	c = u->dev->ctlr;
 	d = c->drive[u->subno];
@@ -2326,7 +2326,7 @@ iawctl(SDunit *u, Cmdbuf *cmd)
 }
 
 static char *
-portr(char *p, char *e, uint x)
+portr(char *p, char *e, u32 x)
 {
 	int i, a;
 

+ 2 - 2
sys/src/9/ip/arp.c

@@ -74,7 +74,7 @@ arpinit(Fs *f)
 static Arpent *
 newarp6(Arp *arp, u8 *ip, Ipifc *ifc, int addrxt)
 {
-	uint t;
+	u32 t;
 	Block *next, *xp;
 	Arpent *a, *e, *f, **l;
 	Medium *medium = ifc->medium;
@@ -570,7 +570,7 @@ arpread(Arp *arp, char *p, u32 offset, int len)
 extern int
 rxmitsols(Arp *arp)
 {
-	uint sflag;
+	u32 sflag;
 	Block *next, *xp;
 	Arpent *a, *b, **l;
 	Fs *f;

+ 1 - 1
sys/src/9/ip/esp.c

@@ -688,7 +688,7 @@ setalg(Espcb *ecb, char **f, int n, Algorithm *alg)
 {
 	u8 *key;
 	int c, nbyte, nchar;
-	uint i;
+	u32 i;
 
 	if(n < 2 || n > 3)
 		return "bad format";

+ 6 - 6
sys/src/9/ip/ip.h

@@ -122,7 +122,7 @@ struct Fragment6 {
 	Fragment6 *next;
 	u8 src[IPaddrlen];
 	u8 dst[IPaddrlen];
-	uint id;
+	u32 id;
 	u32 age;
 };
 
@@ -176,8 +176,8 @@ struct Conv {
 	Proto *p;
 
 	int restricted;	  /* remote port is restricted */
-	uint ttl;	  /* max time to live */
-	uint tos;	  /* type of service */
+	u32 ttl;	  /* max time to live */
+	u32 tos;	  /* type of service */
 	int ignoreadvice; /* don't terminate connection on icmp errors */
 
 	u8 ipversion;
@@ -599,11 +599,11 @@ struct Arpent {
 	Arpent *hash;
 	Block *hold;
 	Block *last;
-	uint ctime; /* time entry was created or refreshed */
-	uint utime; /* time entry was last used */
+	u32 ctime; /* time entry was created or refreshed */
+	u32 utime; /* time entry was last used */
 	u8 state;
 	Arpent *nextrxt; /* re-transmit chain */
-	uint rtime;	 /* time for next retransmission */
+	u32 rtime;	 /* time for next retransmission */
 	u8 rxtsrem;
 	Ipifc *ifc;
 	u8 ifcid; /* must match ifc->id */

+ 1 - 1
sys/src/9/ip/ipv6.c

@@ -462,7 +462,7 @@ Block *
 ip6reassemble(IP *ip, int uflen, Block *bp, Ip6hdr *ih)
 {
 	int fend, offset, ovlap, len, fragsize, pktposn;
-	uint id;
+	u32 id;
 	u8 src[IPaddrlen], dst[IPaddrlen];
 	Block *bl, **l, *last, *prev;
 	Fraghdr6 *fraghdr;

+ 10 - 10
sys/src/9/ip/tcp.c

@@ -215,7 +215,7 @@ struct Tcpctl {
 		u32 wnd; /* Tcp send window */
 		u32 urg; /* Urgent data pointer */
 		u32 wl2;
-		uint scale; /* how much to right shift window */
+		u32 scale; /* how much to right shift window */
 			    /* in xmitted packets */
 		/* to implement tahoe and reno TCP */
 		u32 dupacks; /* number of duplicate acks rcvd */
@@ -235,20 +235,20 @@ struct Tcpctl {
 		u32 urg;	 /* Urgent pointer */
 		u32 ackptr; /* last acked sequence */
 		int blocked;
-		uint scale; /* how much to left shift window in */
+		u32 scale; /* how much to left shift window in */
 			    /* rcv'd packets */
 	} rcv;
 	u32 iss;	   /* Initial sequence number */
 	u32 cwind;	   /* Congestion window */
 	u32 abcbytes; /* appropriate byte counting rfc 3465 */
-	uint scale;	   /* desired snd.scale */
+	u32 scale;	   /* desired snd.scale */
 	u32 ssthresh; /* Slow start threshold */
 	int resent;	   /* Bytes just resent */
 	int irs;	   /* Initial received squence */
 	u16 mss;	   /* Maximum segment size */
 	int rerecv;	   /* Overlap of data rerecevived */
 	u32 window;   /* Our receive window (queue) */
-	uint qscale;	   /* Log2 of our receive window (queue) */
+	u32 qscale;	   /* Log2 of our receive window (queue) */
 	u8 backoff;   /* Exponential backoff counter */
 	int backedoff;	   /* ms we've backed off for rexmits */
 	u8 flags;	   /* State flags */
@@ -263,7 +263,7 @@ struct Tcpctl {
 	int srtt;	    /* Smoothed round trip */
 	int mdev;	    /* Mean deviation of round trip */
 	int kacounter;	    /* count down for keep alive */
-	uint sndsyntime;    /* time syn sent */
+	u32 sndsyntime;    /* time syn sent */
 	u32 time;	    /* time Finwait2 or Syn_received was sent */
 	u32 timeuna;   /* snd.una when time was set */
 	int nochecksum;	    /* non-zero means don't send checksums */
@@ -682,9 +682,9 @@ enum {
 };
 
 static void
-tcpabcincr(Tcpctl *tcb, uint acked)
+tcpabcincr(Tcpctl *tcb, u32 acked)
 {
-	uint limit;
+	u32 limit;
 
 	tcb->abcbytes += acked;
 	if(tcb->cwind < tcb->ssthresh){
@@ -852,7 +852,7 @@ localclose(Conv *s, char *reason) /* called with tcb locked */
 
 /* mtu (- TCP + IP hdr len) of 1st hop */
 static int
-tcpmtu(Proto *tcp, u8 *addr, int version, uint *scale)
+tcpmtu(Proto *tcp, u8 *addr, int version, u32 *scale)
 {
 	Ipifc *ifc;
 	int mtu;
@@ -1469,7 +1469,7 @@ sndsynack(Proto *tcp, Limbo *lp)
 	Tcp4hdr ph4;
 	Tcp6hdr ph6;
 	Tcp seg;
-	uint scale;
+	u32 scale;
 
 	/* make pseudo header */
 	switch(lp->version){
@@ -2549,7 +2549,7 @@ static void
 tcpoutput(Conv *s)
 {
 	Tcp seg;
-	uint msgs;
+	u32 msgs;
 	Tcpctl *tcb;
 	Block *hbp, *bp;
 	int sndcnt;

+ 1 - 1
sys/src/9/port/cache.c

@@ -32,7 +32,7 @@ struct Extent {
 typedef struct Mntcache Mntcache;
 struct Mntcache {
 	Qid qid;
-	uint devno;
+	u32 devno;
 	Dev *dev;
 	QLock QLock;
 	Extent *list;

+ 2 - 2
sys/src/9/port/chan.c

@@ -518,7 +518,7 @@ eqchan(Chan *a, Chan *b, int skipvers)
 }
 
 int
-eqchanddq(Chan *c, int dc, uint devno, Qid qid, int skipvers)
+eqchanddq(Chan *c, int dc, u32 devno, Qid qid, int skipvers)
 {
 	if(c->qid.path != qid.path)
 		return 0;
@@ -754,7 +754,7 @@ cclone(Chan *c)
 
 /* also used by sysfile.c:/^mountfix */
 int
-findmount(Chan **cp, Mhead **mp, int dc, uint devno, Qid qid)
+findmount(Chan **cp, Mhead **mp, int dc, u32 devno, Qid qid)
 {
 	Proc *up = externup();
 	Pgrp *pg;

+ 1 - 1
sys/src/9/port/corebootscreen.c

@@ -672,7 +672,7 @@ screenputc(char *buf)
 {
 	print("%s\n", __func__);
 	int w;
-	uint pos;
+	u32 pos;
 	Point p;
 	Rectangle r;
 	static int *xp;

+ 2 - 2
sys/src/9/port/corebootscreen.h

@@ -61,8 +61,8 @@ enum {
 struct CorebootScreen {
 	Lock l;
 	Cursor Cursor;
-	uint wid; /* width in pixels */
-	uint ht;  /* height in pixels */
+	u32 wid; /* width in pixels */
+	u32 ht;  /* height in pixels */
 	int open;
 };
 

+ 6 - 6
sys/src/9/port/dev9p.c

@@ -117,7 +117,7 @@ static struct v9pmnt {
 	int pcuse;				// cache usage counter (entering processes)
 	int pchit;				// cache hits counter
 	int pcmiss;				// cache misses counter
-	uint mounted;				// true if mounted
+	u32 mounted;				// true if mounted
 } * mounts;
 
 // Find a hold buffer structure by PID. Nil is returned if no process found.
@@ -345,7 +345,7 @@ v9pread(Chan *c, void *buf, i32 n, i64 off)
 			if(p + dirlen > e)
 				break;
 			u8 *pn = p + 41;
-			uint lstrs = 0;
+			u32 lstrs = 0;
 			for(int i = 0; i < 4; i++){
 				int ns = GBIT16(pn);
 				lstrs += ns + 1;
@@ -358,7 +358,7 @@ v9pread(Chan *c, void *buf, i32 n, i64 off)
 				d.uid = eve;
 				d.gid = eve;
 				d.muid = eve;
-				uint dms = convD2M(&d, xnbuf, dirlen);
+				u32 dms = convD2M(&d, xnbuf, dirlen);
 				validstat(xnbuf, dms);
 				mntdirfix(xnbuf, c);
 				xnbuf = xnbuf + dms;
@@ -417,11 +417,11 @@ phread(Chan *c, void *va, i32 n, i64 offset)
 		break;
 	case Rstat:
 		mlen = GBIT16(msg);
-		uint nbuf = GBIT16(msg + 9);
+		u32 nbuf = GBIT16(msg + 9);
 		u8 *buf = msg + 9;
 		Dir d;
 		u8 *pn = buf + 41;
-		uint lstrs = 0;
+		u32 lstrs = 0;
 		for(int i = 0; i < 4; i++){
 			int ns = GBIT16(pn);
 			lstrs += ns + 1;
@@ -433,7 +433,7 @@ phread(Chan *c, void *va, i32 n, i64 offset)
 			d.uid = eve;
 			d.gid = eve;
 			d.muid = eve;
-			uint dms = convD2M(&d, buf, nbuf);
+			u32 dms = convD2M(&d, buf, nbuf);
 			PBIT16(msg + 7, dms);
 			mlen = 9 + dms;
 			PBIT32(msg, mlen);

+ 2 - 2
sys/src/9/port/devbridge.c

@@ -692,7 +692,7 @@ static Centry *
 cachelookup(Bridge *b, u8 d[Eaddrlen])
 {
 	int i;
-	uint h;
+	u32 h;
 	Centry *p;
 	long sec;
 
@@ -729,7 +729,7 @@ static void
 cacheupdate(Bridge *b, u8 d[Eaddrlen], int port)
 {
 	int i;
-	uint h;
+	u32 h;
 	Centry *p, *pp;
 	long sec;
 

+ 1 - 1
sys/src/9/port/devcec.c

@@ -222,7 +222,7 @@ cbput(Conn *cp, int c)
 static void
 trace(Block *bp)
 {
-	uint type;
+	u32 type;
 	Pkt *p;
 
 	if(tflag == 0)

+ 2 - 2
sys/src/9/port/devcons.c

@@ -224,13 +224,13 @@ consactive(void)
 struct {
 	Lock lk;
 	char buf[1048576];
-	uint n;
+	u32 n;
 } kmesg;
 
 static void
 kmesgputs(char *str, int n)
 {
-	uint nn, d;
+	u32 nn, d;
 
 	ilock(&kmesg.lk);
 	/* take the tail of huge writes */

+ 3 - 3
sys/src/9/port/devmnt.c

@@ -35,7 +35,7 @@ struct Mntrpc {
 	Mnt *m;		 /* Mount device during rpc */
 	Rendez r;	 /* Place to hang out */
 	u8 *rpc;	 /* I/O Data buffer */
-	uint rpclen;	 /* len of buffer */
+	u32 rpclen;	 /* len of buffer */
 	Block *b;	 /* reply blocks */
 	char done;	 /* Rpc completed */
 	u64 stime;	 /* start time for mnt statistics */
@@ -57,7 +57,7 @@ struct Mntalloc {
 	Mntrpc *rpcfree;
 	int nrpcfree;
 	int nrpcused;
-	uint id;
+	u32 id;
 	u32 tagmask[NMASK];
 } mntalloc;
 
@@ -1236,7 +1236,7 @@ mntchk(Chan *c)
 void
 mntdirfix(u8 *dirbuf, Chan *c)
 {
-	uint r;
+	u32 r;
 
 	r = c->dev->dc;
 	dirbuf += BIT16SZ; /* skip count */

+ 2 - 2
sys/src/9/port/devmntn.c

@@ -35,7 +35,7 @@ struct Mntrpc {
 	Mnt *m;		 /* Mount device during rpc */
 	Rendez r;	 /* Place to hang out */
 	u8 *rpc;	 /* I/O Data buffer */
-	uint rpclen;	 /* len of buffer */
+	u32 rpclen;	 /* len of buffer */
 	Block *b;	 /* reply blocks */
 	char done;	 /* Rpc completed */
 	u64 stime;	 /* start time for mnt statistics */
@@ -57,7 +57,7 @@ struct Mntalloc {
 	Mntrpc *rpcfree;
 	int nrpcfree;
 	int nrpcused;
-	uint id;
+	u32 id;
 	u32 tagmask[NMASK];
 } mntalloc;
 

+ 1 - 1
sys/src/9/port/devramfs.c

@@ -361,7 +361,7 @@ typedef union Header Header;
 union Header {
 	struct {
 		Header *next;
-		uint size;
+		u32 size;
 	} s;
 	Align al;
 };

+ 1 - 1
sys/src/9/port/devroot.c

@@ -24,7 +24,7 @@ enum {
 
 typedef struct Dirlist Dirlist;
 struct Dirlist {
-	uint base;
+	u32 base;
 	Dirtab *dir;
 	u8 **data;
 	int ndir;

+ 3 - 3
sys/src/9/port/devtrace.c

@@ -64,7 +64,7 @@ int traceactive = 0;
 /* trace indices. These are just unsigned longs. You mask them
  * to get an index. This makes fifo empty/full etc. trivial.
  */
-static uint pw = 0, pr = 0;
+static u32 pw = 0, pr = 0;
 static int tracesactive = 0;
 static int all = 0;
 static int watching = 0;
@@ -336,7 +336,7 @@ traceoff(struct Trace *p)
 static struct Tracelog *
 newpl(void)
 {
-	uint index;
+	u32 index;
 
 	index = ainc((int *)&pw);
 
@@ -594,7 +594,7 @@ traceread(Chan *c, void *a, i32 n, i64 offset)
 				cp[0] = eventname[pl->info];
 				cp++;
 				*cp++ = ' ';
-				hex32((uint)pl->pc, cp);
+				hex32((u32)pl->pc, cp);
 				cp[8] = ' ';
 				cp += 9;
 				hex64(pl->ticks, cp);

+ 2 - 2
sys/src/9/port/devvcon.c

@@ -138,8 +138,8 @@ vconstat(Chan *c, u8 *dp, i32 n)
 static Chan *
 vconopen(Chan *c, int omode)
 {
-	uint t = TYPE(c->qid);
-	uint vdidx = DEV(c->qid);
+	u32 t = TYPE(c->qid);
+	u32 vdidx = DEV(c->qid);
 	if(vdidx >= nvcon)
 		error(Ebadarg);
 	c = devopen(c, omode, (Dirtab *)0, 0, vcongen);

+ 1 - 1
sys/src/9/port/fault.c

@@ -129,7 +129,7 @@ fixfault(Segment *s, usize addr, int ftype, int dommuput, int color)
 	Pte **p, *etp;
 	usize soff;
 	u64 pgsz;
-	uint mmuattr;
+	u32 mmuattr;
 	Page **pg, *lkp, *new;
 	Page *(*fn)(Segment *, usize);
 

+ 1 - 1
sys/src/9/port/lib.h

@@ -228,7 +228,7 @@ struct Qid {
 struct Dir {
 	/* system-modified data */
 	u16 type; /* server type */
-	uint dev;      /* server subtype */
+	u32 dev;      /* server subtype */
 	/* file data */
 	Qid qid;	/* unique id from server */
 	u32 mode;	/* permissions */

+ 1 - 1
sys/src/9/port/netif.h

@@ -110,7 +110,7 @@ struct Netif {
 	void (*promiscuous)(void *, int);
 	void (*multicast)(void *, u8 *, int);
 	int (*hwmtu)(void *, int);    /* get/set mtu */
-	void (*scanbs)(void *, uint); /* scan for base stations */
+	void (*scanbs)(void *, u32); /* scan for base stations */
 };
 
 void netifinit(Netif *, char *, int, u32);

+ 10 - 10
sys/src/9/port/portdat.h

@@ -198,7 +198,7 @@ struct Chan {
 	i64 offset;	   /* in fd */
 	i64 devoffset; /* in underlying device; see read */
 	Dev *dev;
-	uint devno;
+	u32 devno;
 	u16 mode; /* read/write */
 	u16 flag;
 	Qid qid;
@@ -316,7 +316,7 @@ struct Mnt {
 	Chan *c;       /* Channel to file service */
 	Proc *rip;     /* Reader in progress */
 	Mntrpc *queue; /* Queue of pending requests on this channel */
-	uint id;       /* Multiplexer id for channel check */
+	u32 id;       /* Multiplexer id for channel check */
 	Mnt *list;     /* Free list */
 	int flags;     /* cache */
 	int msize;     /* data + IOHDRSZ */
@@ -488,7 +488,7 @@ struct Segment {
 	u16 steal; /* Page stealer lock */
 	u16 type;	/* segment type */
 	int pgszi;	/* page size index in Mach MMMU */
-	uint ptepertab;
+	u32 ptepertab;
 	int color;
 	usize base; /* virtual base */
 	usize top;	/* virtual top */
@@ -871,12 +871,12 @@ struct Proc {
 	int prepagemem;
 	Nixpctl *nixpctl; /* NIX queue based system calls */
 
-	uint ntrap;	  /* # of traps while in this process */
-	uint nintr;	  /* # of intrs while in this process */
-	uint nsyscall;	  /* # of syscalls made by the process */
-	uint nactrap;	  /* # of traps in the AC for this process */
-	uint nacsyscall;  /* # of syscalls in the AC for this process */
-	uint nicc;	  /* # of ICCs for the process */
+	u32 ntrap;	  /* # of traps while in this process */
+	u32 nintr;	  /* # of intrs while in this process */
+	u32 nsyscall;	  /* # of syscalls made by the process */
+	u32 nactrap;	  /* # of traps in the AC for this process */
+	u32 nacsyscall;  /* # of syscalls in the AC for this process */
+	u32 nicc;	  /* # of ICCs for the process */
 	u64 actime1; /* ticks as of last call in AC */
 	u64 actime;  /* ∑time from call in AC to ret to AC, and... */
 	u64 tctime;  /* ∑time from call received to call handled */
@@ -941,7 +941,7 @@ extern int nsyscall;
 extern Pgalloc pga;
 extern Physseg physseg[];
 extern Procalloc procalloc;
-extern uint qiomaxatomic;
+extern u32 qiomaxatomic;
 extern char *statename[];
 extern char *sysname;
 

+ 6 - 6
sys/src/9/port/portfns.h

@@ -115,10 +115,10 @@ int elf64ldseg(Chan *c, usize *entryp, Ldseg **rp, char *mach,
 int emptystr(char *);
 int encrypt(void *, void *, int);
 void envcpy(Egrp *, Egrp *);
-int eqchanddq(Chan *, int, uint, Qid, int);
+int eqchanddq(Chan *, int, u32, Qid, int);
 int eqqid(Qid, Qid);
 void error(char *);
-char *errno2str(uint);
+char *errno2str(u32);
 void exhausted(char *);
 void exit(int);
 u64 fastticks(u64 *);
@@ -127,7 +127,7 @@ u64 fastticks2us(u64);
 int fault(usize, usize, int);
 void fdclose(int, int);
 Chan *fdtochan(int, int, int, int);
-int findmount(Chan **, Mhead **, int, uint, Qid);
+int findmount(Chan **, Mhead **, int, u32, Qid);
 int fixfault(Segment *, usize, int, int, int);
 void fmtinit(void);
 void forceclosefgrp(void);
@@ -146,7 +146,7 @@ void gotolabel(Label *);
 int haswaitq(void *);
 void hexdump(void *v, int length);
 void pahexdump(usize pa, int len);
-void hnputl(void *, uint);
+void hnputl(void *, u32);
 void hnputs(void *, u16);
 void hnputv(void *, u64);
 i32 hostdomainwrite(char *, i32);
@@ -205,7 +205,7 @@ u64 mk64fract(u64, u64);
 void mkqid(Qid *, i64, u32, int);
 void mmuflush(void);
 void mmuprocinit(Proc *);
-void mmuput(usize, Page *, uint);
+void mmuput(usize, Page *, u32);
 void mmurelease(Proc *);
 void mmuswitch(Proc *);
 Chan *mntattachversion(char *muxattach, char *version, u8 tag,
@@ -234,7 +234,7 @@ Segment *newseg(int, usize, u64);
 void newzmap(Segment *);
 void nexterror(void);
 void notemark(Watermark *, int);
-uint nhgetl(void *);
+u32 nhgetl(void *);
 u16 nhgets(void *);
 u64 nhgetv(void *);
 void nixprepage(int);

+ 1 - 1
sys/src/9/port/qio.c

@@ -61,7 +61,7 @@ enum {
 	Maxatomic = 64 * 1024,
 };
 
-uint qiomaxatomic = Maxatomic;
+u32 qiomaxatomic = Maxatomic;
 
 void
 ixsummary(void)

+ 3 - 3
sys/src/9/port/rmap.c

@@ -29,10 +29,10 @@ struct RMap {
 };
 
 void
-rmapfree(RMap *rmap, usize addr, uint size)
+rmapfree(RMap *rmap, usize addr, u32 size)
 {
 	Map *mp;
-	uint t;
+	u32 t;
 
 	if(size == 0)
 		return;
@@ -74,7 +74,7 @@ rmapfree(RMap *rmap, usize addr, uint size)
 }
 
 usize
-rmapalloc(RMap *rmap, usize addr, uint size, int align)
+rmapalloc(RMap *rmap, usize addr, u32 size, int align)
 {
 	Map *mp;
 	u32 maddr, oaddr;

+ 1 - 1
sys/src/9/port/segment.c

@@ -46,7 +46,7 @@ newseg(int type, usize base, u64 size)
 {
 	Segment *s;
 	int mapsize;
-	uint pgsz;
+	u32 pgsz;
 
 	if(size > SEGMAPSIZE * (PTEMAPMEM / BIGPGSZ))
 		error(Enovmem);

+ 1 - 1
sys/src/9/port/sysproc.c

@@ -889,7 +889,7 @@ syserrstr(Ar0 *ar0, ...)
 	va_start(list, ar0);
 
 	/*
-	 * int errstr(char* err, uint nerr);
+	 * int errstr(char* err, u32 nerr);
 	 * should really be
 	 * usize errstr(char* err, usize nerr);
 	 * but errstr always returns 0.

+ 1 - 1
sys/src/9/port/taslock.c

@@ -62,7 +62,7 @@ clearwaitstats(void)
 void
 addwaitstat(usize pc, u64 t0, int type)
 {
-	uint i;
+	u32 i;
 	u64 w;
 
 	if(waitstats.on == 0)

+ 1 - 1
sys/src/9/port/tcklock.c

@@ -65,7 +65,7 @@ clearwaitstats(void)
 void
 addwaitstat(usize pc, u64 t0, int type)
 {
-	uint i;
+	u32 i;
 	u64 w;
 
 	if(waitstats.on == 0)

+ 3 - 3
sys/src/9/riscv/dat.h

@@ -339,9 +339,9 @@ struct Sys {
 
 	u64 cyclefreq; /* Frequency of user readable cycle counter (mach 0) */
 
-	uint pgszlg2[NPGSZ];  /* per Mach or per Sys? */
-	uint pgszmask[NPGSZ]; /* Per sys -aki */
-	uint pgsz[NPGSZ];
+	u32 pgszlg2[NPGSZ];  /* per Mach or per Sys? */
+	u32 pgszmask[NPGSZ]; /* Per sys -aki */
+	u32 pgsz[NPGSZ];
 	int npgsz;
 
 	unsigned char _57344_[2][4 * KiB]; /* unused */

+ 1 - 1
sys/src/9/riscv/fns.h

@@ -202,7 +202,7 @@ void sysrforkret(void);
 void *KADDR(usize);
 u64 PADDR(void *);
 
-#define BIOSSEG(a) KADDR(((uint)(a)) << 4)
+#define BIOSSEG(a) KADDR(((u32)(a)) << 4)
 
 /*
  * apic.c

+ 3 - 3
sys/src/9/riscv/mmu.c

@@ -392,7 +392,7 @@ mmuptpcheck(Proc *proc)
 {
 	int lvl, npgs, i;
 	Page *lp, *p, *pgs[16], *fp;
-	uint idx[16];
+	u32 idx[16];
 
 	if(proc == nil)
 		return;
@@ -435,7 +435,7 @@ mmuptpcheck(Proc *proc)
 }
 
 static u64
-pteflags(uint attr)
+pteflags(u32 attr)
 {
 	u64 flags;
 
@@ -472,7 +472,7 @@ invlpg(usize _)
  * For 1*GiB pages, we use two levels.
  */
 void
-mmuput(usize va, Page *pg, uint attr)
+mmuput(usize va, Page *pg, u32 attr)
 {
 	Proc *up = externup();
 	int lvl, user, x, pgsz;

+ 10 - 10
sys/src/9/riscv/physalloc.c

@@ -34,15 +34,15 @@ enum {
 	Avail = 1,
 };
 
-#define INDEX(b, v) ((uint)(((v)) / (b)->bminsz))
+#define INDEX(b, v) ((u32)(((v)) / (b)->bminsz))
 #define BLOCK(b, i) ((i)-INDEX((b), (b)->memory))
 
 typedef struct Buddy Buddy;
 struct Buddy {
 	i16 tag; /* Used or Avail */
 	i16 kval;
-	uint next;
-	uint prev;
+	u32 next;
+	u32 prev;
 	void *p;
 };
 
@@ -61,7 +61,7 @@ struct Bal {
 	int kmax;	/* Maximum lg2 */
 	u64 bminsz; /* minimum block sz */
 	u64 memory;
-	uint kspan;
+	u32 kspan;
 
 	Buddy *blocks;
 	Buddy *avail;
@@ -91,7 +91,7 @@ seprintphysstats(char *s, char *e)
 static void
 xphysfree(Bal *b, u64 data, u64 size)
 {
-	uint i;
+	u32 i;
 	Buddy *l, *p;
 	Buddy *blocks, *avail;
 
@@ -196,7 +196,7 @@ physfree(u64 data, u64 size)
 static void *
 xphystag(Bal *b, u64 data)
 {
-	uint i;
+	u32 i;
 	Buddy *blocks;
 
 	DBG("phystag\n");
@@ -510,7 +510,7 @@ lg2floor(u64 w)
 static u64
 xphysalloc(Bal *b, u64 size, void *tag)
 {
-	uint i, j, k;
+	u32 i, j, k;
 	Buddy *l, *p;
 	Buddy *avail, *blocks;
 	u64 m;
@@ -619,7 +619,7 @@ physalloc(u64 size, int *colorp, void *tag)
 static void
 dump(Bal *b)
 {
-	uint bi, i, k;
+	u32 bi, i, k;
 	Buddy *blocks;
 
 	blocks = b->blocks;
@@ -655,7 +655,7 @@ physallocdump(void)
 static int
 plop(Bal *b, u64 a, int k, int type)
 {
-	uint i;
+	u32 i;
 	Buddy *l;
 
 	DBG("plop(a %#p k %d type %d)\n", a, k, type);
@@ -673,7 +673,7 @@ static int
 iimbchunk(Bal *b, u64 a, u64 e, int type)
 {
 	int k;
-	uint s;
+	u32 s;
 
 	a = ROUNDUP(a, b->bminsz);
 	e = ROUNDDN(e, b->bminsz);

+ 7 - 7
sys/src/9/riscv/qmalloc.c

@@ -29,7 +29,7 @@ typedef struct Qlist Qlist;
 union Header {
 	struct {
 		Header *next;
-		uint size;
+		u32 size;
 	} s;
 	Align al;
 };
@@ -38,7 +38,7 @@ struct Qlist {
 	Lock lk;
 	Header *first;
 
-	uint nalloc;
+	u32 nalloc;
 };
 
 enum {
@@ -138,7 +138,7 @@ qmallocalign(usize nbytes, usize align, i32 offset, usize span)
 	Qlist *qlist;
 	usize aligned;
 	Header **pp, *p, *q, *r;
-	uint naligned, nunits, n;
+	u32 naligned, nunits, n;
 
 	if(nbytes == 0 || offset != 0 || span != 0)
 		return nil;
@@ -276,7 +276,7 @@ qfreeinternal(void *ap)
 {
 	Qlist *qlist;
 	Header *p, *q;
-	uint nunits;
+	u32 nunits;
 
 	if(ap == nil)
 		return;
@@ -328,7 +328,7 @@ u32
 msize(void *ap)
 {
 	Header *p;
-	uint nunits;
+	u32 nunits;
 
 	if(ap == nil)
 		return 0;
@@ -519,7 +519,7 @@ realloc(void *ap, u32 size)
 	void *v;
 	Header *p;
 	u32 osize;
-	uint nunits, ounits;
+	u32 nunits, ounits;
 
 	/*
 	 * Easy stuff:
@@ -611,7 +611,7 @@ mallocinit(void)
 }
 
 static int
-morecore(uint nunits)
+morecore(u32 nunits)
 {
 	/*
 	 * First (simple) cut.

+ 2 - 2
sys/src/cmd/acid/lex.c

@@ -561,7 +561,7 @@ Lsym*
 enter(char *name, int t)
 {
 	Lsym *s;
-	uint h;
+	u32 h;
 	char *p;
 	Value *v;
 
@@ -592,7 +592,7 @@ Lsym*
 look(char *name)
 {
 	Lsym *s;
-	uint h;
+	u32 h;
 	char *p;
 
 	h = 0;

+ 2 - 2
sys/src/cmd/acme/acme.c

@@ -430,7 +430,7 @@ mousethread(void *v)
 {
 	Text *t, *argt;
 	int but;
-	uint q0, q1;
+	u32 q0, q1;
 	Window *w;
 	Plumbmsg *pm;
 	Mouse m;
@@ -600,7 +600,7 @@ waitthread(void *v)
 {
 	Waitmsg *w;
 	Command *c, *lc;
-	uint pid;
+	u32 pid;
 	int found, ncmd;
 	Rune *cmd;
 	char *err;

+ 4 - 3
sys/src/cmd/acme/addr.c

@@ -60,7 +60,7 @@ isregexc(int r)
 Range
 number(Mntdir *md, Text *t, Range r, int line, int dir, int size, int *evalp)
 {
-	uint q0, q1;
+	u32 q0, q1;
 
 	if(size == Char){
 		if(dir == Fore)
@@ -156,11 +156,12 @@ regexp(Mntdir *md, Text *t, Range lim, Range r, Rune *pat, int dir, int *foundp)
 }
 
 Range
-address(Mntdir *md, Text *t, Range lim, Range ar, void *a, uint q0, uint q1, int (*getc)(void*, uint),  int *evalp, uint *qp)
+address(Mntdir *md, Text *t, Range lim, Range ar, void *a, u32 q0, u32 q1,
+	int (*getc)(void*, u32),  int *evalp, u32 *qp)
 {
 	int dir, size, npat;
 	int prevc, c, nc, n;
-	uint q;
+	u32 q;
 	Rune *pat;
 	Range r, nr;
 

+ 18 - 17
sys/src/cmd/acme/buff.c

@@ -27,7 +27,7 @@ enum
 
 static
 void
-sizecache(Buffer *b, uint n)
+sizecache(Buffer *b, u32 n)
 {
 	if(n <= b->cmax)
 		return;
@@ -37,7 +37,7 @@ sizecache(Buffer *b, uint n)
 
 static
 void
-addblock(Buffer *b, uint i, uint n)
+addblock(Buffer *b, u32 i, u32 n)
 {
 	if(i > b->nbl)
 		error("internal error: addblock");
@@ -51,7 +51,7 @@ addblock(Buffer *b, uint i, uint n)
 
 static
 void
-delblock(Buffer *b, uint i)
+delblock(Buffer *b, u32 i)
 {
 	if(i >= b->nbl)
 		error("internal error: delblock");
@@ -83,10 +83,10 @@ flush(Buffer *b)
 
 static
 void
-setcache(Buffer *b, uint q0)
+setcache(Buffer *b, u32 q0)
 {
 	Block **blp, *bl;
-	uint i, q;
+	u32 i, q;
 
 	if(q0 > b->nc)
 		error("internal error: setcache");
@@ -128,9 +128,9 @@ setcache(Buffer *b, uint q0)
 }
 
 void
-bufinsert(Buffer *b, uint q0, Rune *s, uint n)
+bufinsert(Buffer *b, u32 q0, Rune *s, u32 n)
 {
-	uint i, m, t, off;
+	u32 i, m, t, off;
 
 	if(q0 > b->nc)
 		error("internal error: bufinsert");
@@ -209,9 +209,9 @@ bufinsert(Buffer *b, uint q0, Rune *s, uint n)
 }
 
 void
-bufdelete(Buffer *b, uint q0, uint q1)
+bufdelete(Buffer *b, u32 q0, u32 q1)
 {
-	uint m, n, off;
+	u32 m, n, off;
 
 	if(!(q0<=q1 && q0<=b->nc && q1<=b->nc))
 		error("internal error: bufdelete");
@@ -233,19 +233,20 @@ bufdelete(Buffer *b, uint q0, uint q1)
 }
 
 static int
-bufloader(void *v, uint q0, Rune *r, int nr)
+bufloader(void *v, u32 q0, Rune *r, int nr)
 {
 	bufinsert(v, q0, r, nr);
 	return nr;
 }
 
-uint
-loadfile(int fd, uint q0, int *nulls, int(*f)(void*, uint, Rune*, int), void *arg)
+u32
+loadfile(int fd, u32 q0, int *nulls, int(*f)(void*, u32, Rune*, int),
+	 void *arg)
 {
 	char *p;
 	Rune *r;
 	int l, m, n, nb, nr;
-	uint q1;
+	u32 q1;
 
 	p = emalloc((Maxblock+UTFmax+1)*sizeof p[0]);
 	r = runemalloc(Maxblock);
@@ -277,8 +278,8 @@ loadfile(int fd, uint q0, int *nulls, int(*f)(void*, uint, Rune*, int), void *ar
 	return q1-q0;
 }
 
-uint
-bufload(Buffer *b, uint q0, int fd, int *nulls)
+u32
+bufload(Buffer *b, u32 q0, int fd, int *nulls)
 {
 	if(q0 > b->nc)
 		error("internal error: bufload");
@@ -286,9 +287,9 @@ bufload(Buffer *b, uint q0, int fd, int *nulls)
 }
 
 void
-bufread(Buffer *b, uint q0, Rune *s, uint n)
+bufread(Buffer *b, u32 q0, Rune *s, u32 n)
 {
-	uint m;
+	u32 m;
 
 	if(!(q0<=b->nc && q0+n<=b->nc))
 		error("bufread: internal error");

+ 6 - 6
sys/src/cmd/acme/dat.h

@@ -183,9 +183,9 @@ struct Text
 	File	*file;
 	Frame	Frame;
 	Reffont	*reffont;
-	uint	org;
-	uint	q0;
-	uint	q1;
+	u32	org;
+	u32	q0;
+	u32	q1;
 	int	what;
 	int	tabstop;
 	Window	*w;
@@ -195,8 +195,8 @@ struct Text
 	Row	*row;
 	Column	*col;
 
-	uint	eq0;	/* start of typing for ESC */
-	uint	cq0;	/* cache position */
+	u32	eq0;	/* start of typing for ESC */
+	u32	cq0;	/* cache position */
 	int		ncache;	/* storage for insert */
 	int		ncachealloc;
 	Rune	*cache;
@@ -269,7 +269,7 @@ struct Window
 	Rune		**incl;
 	Reffont	*reffont;
 	QLock	ctllock;
-	uint		ctlfid;
+	u32		ctlfid;
 	char		*dumpstr;
 	char		*dumpdir;
 	int		dumpid;

+ 8 - 8
sys/src/cmd/acme/disk.c

@@ -55,10 +55,10 @@ diskinit()
 }
 
 static
-uint
-ntosize(uint n, uint *ip)
+u32
+ntosize(u32 n, u32 *ip)
 {
-	uint size;
+	u32 size;
 
 	if(n > Maxblock)
 		error("internal error: ntosize");
@@ -72,9 +72,9 @@ ntosize(uint n, uint *ip)
 }
 
 Block*
-disknewblock(Disk *d, uint n)
+disknewblock(Disk *d, u32 n)
 {
-	uint i, j, size;
+	u32 i, j, size;
 	Block *b;
 
 	size = ntosize(n, &i);
@@ -100,7 +100,7 @@ disknewblock(Disk *d, uint n)
 void
 diskrelease(Disk *d, Block *b)
 {
-	uint i;
+	u32 i;
 
 	ntosize(b->n, &i);
 	b->next = d->free[i];
@@ -108,7 +108,7 @@ diskrelease(Disk *d, Block *b)
 }
 
 void
-diskwrite(Disk *d, Block **bp, Rune *r, uint n)
+diskwrite(Disk *d, Block **bp, Rune *r, u32 n)
 {
 	int size, nsize;
 	Block *b;
@@ -127,7 +127,7 @@ diskwrite(Disk *d, Block **bp, Rune *r, uint n)
 }
 
 void
-diskread(Disk *d, Block *b, Rune *r, uint n)
+diskread(Disk *d, Block *b, Rune *r, u32 n)
 {
 	int tot, nr;
 	char *p;

+ 1 - 1
sys/src/cmd/acme/ecmd.c

@@ -293,7 +293,7 @@ D_cmd(Text *t, Cmd *cp)
 }
 
 static int
-readloader(void *v, uint q0, Rune *r, int nr)
+readloader(void *v, u32 q0, Rune *r, int nr)
 {
 	if(nr > 0)
 		eloginsert(v, q0, r, nr);

+ 1 - 1
sys/src/cmd/acme/edit.c

@@ -155,7 +155,7 @@ editerror(char *fmt, ...)
 }
 
 void
-editcmd(Text *ct, Rune *r, uint n)
+editcmd(Text *ct, Rune *r, u32 n)
 {
 	char *err;
 

+ 6 - 6
sys/src/cmd/acme/elog.c

@@ -38,9 +38,9 @@ typedef struct Buflog Buflog;
 struct Buflog
 {
 	i16	type;		/* Replace, Filename */
-	uint		q0;		/* location of change (unused in f) */
-	uint		nd;		/* # runes to delete */
-	uint		nr;		/* # runes in string or file name */
+	u32		q0;		/* location of change (unused in f) */
+	u32		nd;		/* # runes to delete */
+	u32		nr;		/* # runes in string or file name */
 };
 
 enum
@@ -131,7 +131,7 @@ elogflush(File *f)
 void
 elogreplace(File *f, int q0, int q1, Rune *r, int nr)
 {
-	uint gap;
+	u32 gap;
 
 	if(q0==q1 && nr==0)
 		return;
@@ -226,8 +226,8 @@ elogapply(File *f)
 {
 	Buflog b;
 	Rune *buf;
-	uint i, n, up, mod;
-	uint tq0, tq1;
+	u32 i, n, up, mod;
+	u32 tq0, tq1;
 	Buffer *log;
 	Text *t;
 	int owner;

+ 8 - 8
sys/src/cmd/acme/exec.c

@@ -128,9 +128,9 @@ isexecc(int c)
 }
 
 void
-execute(Text *t, uint aq0, uint aq1, int external, Text *argt)
+execute(Text *t, u32 aq0, u32 aq1, int external, Text *argt)
 {
-	uint q0, q1;
+	u32 q0, q1;
 	Rune *r, *s;
 	char *b, *a, *aa;
 	Exectab *e;
@@ -231,7 +231,7 @@ execute(Text *t, uint aq0, uint aq1, int external, Text *argt)
 }
 
 char*
-printarg(Text *argt, uint q0, uint q1)
+printarg(Text *argt, u32 q0, u32 q1)
 {
 	char *buf;
 
@@ -371,7 +371,7 @@ sort(Text *et, Text*a, Text*b, int c, int d, Rune*e, int f)
 		colsort(et->col);
 }
 
-uint
+u32
 seqof(Window *w, int isundo)
 {
 	/* if it's undo, see who changed with us */
@@ -387,7 +387,7 @@ undo(Text *et, Text*a, Text*b, int flag1, int ic, Rune*d, int e)
 	int i, j;
 	Column *c;
 	Window *w;
-	uint seq;
+	u32 seq;
 
 	if(et==nil || et->w== nil)
 		return;
@@ -575,7 +575,7 @@ get(Text *et, Text *t, Text *argt, int flag1, int a, Rune *arg, int narg)
 void
 putfile(File *f, int q0, int q1, Rune *namer, int nname)
 {
-	uint n, m;
+	u32 n, m;
 	Rune *r;
 	char *s, *name, *p;
 	int i, fd, q;
@@ -729,7 +729,7 @@ dump(Text *a, Text *b, Text *argt, int isdump, int c, Rune *arg, int narg)
 void
 cut(Text *et, Text *t, Text*a, int dosnarf, int docut, Rune*b, int ic)
 {
-	uint q0, q1, n, locked, c;
+	u32 q0, q1, n, locked, c;
 	Rune *r;
 
 	/*
@@ -797,7 +797,7 @@ void
 paste(Text *et, Text *t, Text*a, int selectall, int tobody, Rune*b, int ic)
 {
 	int c;
-	uint q, q0, q1, n;
+	u32 q, q0, q1, n;
 	Rune *r;
 
 	/* if(tobody), use body of executing window  (Paste or Send command) */

+ 14 - 14
sys/src/cmd/acme/file.c

@@ -35,9 +35,9 @@ struct Undo
 {
 	i16	type;		/* Delete, Insert, Filename */
 	i16	mod;	/* modify bit */
-	uint		seq;		/* sequence number */
-	uint		p0;		/* location of change (unused in f) */
-	uint		n;		/* # runes in string or file name */
+	u32		seq;		/* sequence number */
+	u32		p0;		/* location of change (unused in f) */
+	u32		n;		/* # runes in string or file name */
 };
 
 enum
@@ -80,7 +80,7 @@ filedeltext(File *f, Text *t)
 }
 
 void
-fileinsert(File *f, uint p0, Rune *s, uint ns)
+fileinsert(File *f, u32 p0, Rune *s, u32 ns)
 {
 	if(p0 > f->Buffer.nc)
 		error("internal error: fileinsert");
@@ -92,7 +92,7 @@ fileinsert(File *f, uint p0, Rune *s, uint ns)
 }
 
 void
-fileuninsert(File *f, Buffer *delta, uint p0, uint ns)
+fileuninsert(File *f, Buffer *delta, u32 p0, u32 ns)
 {
 	Undo u;
 
@@ -106,7 +106,7 @@ fileuninsert(File *f, Buffer *delta, uint p0, uint ns)
 }
 
 void
-filedelete(File *f, uint p0, uint p1)
+filedelete(File *f, u32 p0, u32 p1)
 {
 	if(!(p0<=p1 && p0<=f->Buffer.nc && p1<=f->Buffer.nc))
 		error("internal error: filedelete");
@@ -118,11 +118,11 @@ filedelete(File *f, uint p0, uint p1)
 }
 
 void
-fileundelete(File *f, Buffer *delta, uint p0, uint p1)
+fileundelete(File *f, Buffer *delta, u32 p0, u32 p1)
 {
 	Undo u;
 	Rune *buf;
-	uint i, n;
+	u32 i, n;
 
 	/* undo a deletion by inserting */
 	u.type = Insert;
@@ -171,8 +171,8 @@ fileunsetname(File *f, Buffer *delta)
 	bufinsert(delta, delta->nc, (Rune*)&u, Undosize);
 }
 
-uint
-fileload(File *f, uint p0, int fd, int *nulls)
+u32
+fileload(File *f, u32 p0, int fd, int *nulls)
 {
 	if(f->seq > 0)
 		error("undo in file.load unimplemented");
@@ -180,7 +180,7 @@ fileload(File *f, uint p0, int fd, int *nulls)
 }
 
 /* return sequence number of pending redo */
-uint
+u32
 fileredoseq(File *f)
 {
 	Undo u;
@@ -194,12 +194,12 @@ fileredoseq(File *f)
 }
 
 void
-fileundo(File *f, int isundo, uint *q0p, uint *q1p)
+fileundo(File *f, int isundo, u32 *q0p, u32 *q1p)
 {
 	Undo u;
 	Rune *buf;
-	uint i, j, n, up;
-	uint stop;
+	u32 i, j, n, up;
+	u32 stop;
 	Buffer *delta, *epsilon;
 
 	if(isundo){

Some files were not shown because too many files changed in this diff