Browse Source

Remove trailing whitespace from source files.

This is a trivial cleanup (done with a script, Ron!).

Signed-off-by: Dan Cross <cross@gajendra.net>
Dan Cross 7 years ago
parent
commit
817997447b
100 changed files with 290 additions and 290 deletions
  1. 1 1
      sys/src/9/386/pci.c
  2. 1 1
      sys/src/9/386/vgavesa.c
  3. 14 14
      sys/src/9/amd64/cbscreen.c
  4. 1 1
      sys/src/9/amd64/deviig.c
  5. 10 10
      sys/src/9/amd64/devvga.c
  6. 9 9
      sys/src/9/amd64/io.h
  7. 1 1
      sys/src/9/amd64/mem.h
  8. 5 5
      sys/src/9/amd64/root/cpu.c
  9. 18 18
      sys/src/9/amd64/screen.c
  10. 1 1
      sys/src/9/amd64/screen.h
  11. 1 1
      sys/src/9/amd64/sdiahci.c
  12. 1 1
      sys/src/9/boot/aux.c
  13. 6 6
      sys/src/9/port/corebootscreen.c
  14. 1 1
      sys/src/9/port/corebootscreen.h
  15. 3 3
      sys/src/9/port/dev9p.c
  16. 15 15
      sys/src/9/port/devbridge.c
  17. 6 6
      sys/src/9/port/devcoreboot.c
  18. 4 4
      sys/src/9/port/devpci.c
  19. 2 2
      sys/src/9/port/devramfs.c
  20. 3 3
      sys/src/9/port/devvcon.c
  21. 1 1
      sys/src/9/port/sysfile.c
  22. 1 1
      sys/src/9/port/usbehci.c
  23. 4 4
      sys/src/9/port/virtio_lib.c
  24. 3 3
      sys/src/9/test/1/main.c
  25. 1 1
      sys/src/cmd/9660srv/9660srv.c
  26. 1 1
      sys/src/cmd/9660srv/iobuf.c
  27. 12 12
      sys/src/cmd/aan.c
  28. 6 6
      sys/src/cmd/acid/builtin.c
  29. 6 6
      sys/src/cmd/acid/dbg.y
  30. 6 6
      sys/src/cmd/acid/dot.c
  31. 3 3
      sys/src/cmd/acid/expr.c
  32. 3 3
      sys/src/cmd/acid/lex.c
  33. 1 1
      sys/src/cmd/acid/list.c
  34. 1 1
      sys/src/cmd/acid/util.c
  35. 2 2
      sys/src/cmd/acme/acme.c
  36. 2 2
      sys/src/cmd/acme/edit.c
  37. 1 1
      sys/src/cmd/acme/elog.c
  38. 1 1
      sys/src/cmd/acme/exec.c
  39. 1 1
      sys/src/cmd/acme/fsys.c
  40. 1 1
      sys/src/cmd/acme/look.c
  41. 2 2
      sys/src/cmd/acme/util.c
  42. 3 3
      sys/src/cmd/acme/wind.c
  43. 5 5
      sys/src/cmd/acpi/alltables.c
  44. 2 2
      sys/src/cmd/acpi/crs.c
  45. 2 2
      sys/src/cmd/acpi/irq.c
  46. 5 5
      sys/src/cmd/aquarela/cifscmd.c
  47. 1 1
      sys/src/cmd/aquarela/client.c
  48. 1 1
      sys/src/cmd/aquarela/nbdgram.c
  49. 3 3
      sys/src/cmd/aquarela/nbns.c
  50. 1 1
      sys/src/cmd/aquarela/nbss.c
  51. 1 1
      sys/src/cmd/aquarela/netbios.h
  52. 1 1
      sys/src/cmd/aquarela/smbbuffer.c
  53. 1 1
      sys/src/cmd/aquarela/smbcomdir.c
  54. 6 6
      sys/src/cmd/aquarela/smbcomopen.c
  55. 2 2
      sys/src/cmd/aquarela/smbcomread.c
  56. 1 1
      sys/src/cmd/aquarela/smbcomsetinfo.c
  57. 3 3
      sys/src/cmd/aquarela/smbcomwrite.c
  58. 1 1
      sys/src/cmd/aquarela/smbconnect.c
  59. 1 1
      sys/src/cmd/aquarela/smbdat.h
  60. 1 1
      sys/src/cmd/aquarela/smblisten.c
  61. 10 10
      sys/src/cmd/aquarela/smbrap2.c
  62. 1 1
      sys/src/cmd/aquarela/smbrap2client.c
  63. 1 1
      sys/src/cmd/aquarela/smbstring.c
  64. 2 2
      sys/src/cmd/aquarela/smbtrans2find.c
  65. 1 1
      sys/src/cmd/aquarela/smbtrans2set.c
  66. 2 2
      sys/src/cmd/aquarela/testnbdgram.c
  67. 1 1
      sys/src/cmd/ar.c
  68. 3 3
      sys/src/cmd/archfs.c
  69. 2 2
      sys/src/cmd/auth/authsrv.c
  70. 1 1
      sys/src/cmd/auth/convbio.c
  71. 1 1
      sys/src/cmd/auth/debug.c
  72. 1 1
      sys/src/cmd/auth/dsa2pub.c
  73. 1 1
      sys/src/cmd/auth/dsa2ssh.c
  74. 1 1
      sys/src/cmd/auth/dsagen.c
  75. 1 1
      sys/src/cmd/auth/factotum/apop.c
  76. 3 3
      sys/src/cmd/auth/factotum/chap.c
  77. 1 1
      sys/src/cmd/auth/factotum/dat.h
  78. 1 1
      sys/src/cmd/auth/factotum/fgui.c
  79. 1 1
      sys/src/cmd/auth/factotum/fs.c
  80. 1 1
      sys/src/cmd/auth/factotum/httpdigest.c
  81. 3 3
      sys/src/cmd/auth/factotum/p9any.c
  82. 1 1
      sys/src/cmd/auth/factotum/p9cr.c
  83. 1 1
      sys/src/cmd/auth/factotum/pass.c
  84. 2 2
      sys/src/cmd/auth/factotum/rpc.c
  85. 1 1
      sys/src/cmd/auth/factotum/secstore.c
  86. 8 8
      sys/src/cmd/auth/factotum/util.c
  87. 1 1
      sys/src/cmd/auth/factotum/wep.c
  88. 1 1
      sys/src/cmd/auth/newns.c
  89. 1 1
      sys/src/cmd/auth/printnetkey.c
  90. 2 2
      sys/src/cmd/auth/readnvram.c
  91. 1 1
      sys/src/cmd/auth/respond.c
  92. 6 6
      sys/src/cmd/auth/rsa2any.c
  93. 1 1
      sys/src/cmd/auth/rsa2pub.c
  94. 1 1
      sys/src/cmd/auth/rsafill.c
  95. 1 1
      sys/src/cmd/auth/rsagen.c
  96. 10 10
      sys/src/cmd/aux/8prefix.c
  97. 2 2
      sys/src/cmd/aux/9pcon.c
  98. 5 5
      sys/src/cmd/aux/apm.c
  99. 1 1
      sys/src/cmd/aux/astarld.c
  100. 2 2
      sys/src/cmd/aux/cddb.c

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

@@ -417,7 +417,7 @@ pcicfginit(void)
 	unlock(&pcicfginitlock);
 
 	// Bring the virtio devices live.
-	
+
 	virtiosetup();
 
 	//if(getconf("*pcihinv"))

+ 1 - 1
sys/src/9/386/vgavesa.c

@@ -1,4 +1,4 @@
-/* 
+/*
  * This file is part of the UCB release of Plan 9. It is subject to the license
  * terms in the LICENSE file found in the top-level directory of this
  * distribution and at http://akaros.cs.berkeley.edu/files/Plan9License. No

+ 14 - 14
sys/src/9/amd64/cbscreen.c

@@ -35,15 +35,15 @@ VGAscr vgascreen[1];
 
 Cursor	arrow = {
 	{ -1, -1 },
-	{ 0xFF, 0xFF, 0x80, 0x01, 0x80, 0x02, 0x80, 0x0C, 
-	  0x80, 0x10, 0x80, 0x10, 0x80, 0x08, 0x80, 0x04, 
-	  0x80, 0x02, 0x80, 0x01, 0x80, 0x02, 0x8C, 0x04, 
-	  0x92, 0x08, 0x91, 0x10, 0xA0, 0xA0, 0xC0, 0x40, 
+	{ 0xFF, 0xFF, 0x80, 0x01, 0x80, 0x02, 0x80, 0x0C,
+	  0x80, 0x10, 0x80, 0x10, 0x80, 0x08, 0x80, 0x04,
+	  0x80, 0x02, 0x80, 0x01, 0x80, 0x02, 0x8C, 0x04,
+	  0x92, 0x08, 0x91, 0x10, 0xA0, 0xA0, 0xC0, 0x40,
 	},
-	{ 0x00, 0x00, 0x7F, 0xFE, 0x7F, 0xFC, 0x7F, 0xF0, 
-	  0x7F, 0xE0, 0x7F, 0xE0, 0x7F, 0xF0, 0x7F, 0xF8, 
-	  0x7F, 0xFC, 0x7F, 0xFE, 0x7F, 0xFC, 0x73, 0xF8, 
-	  0x61, 0xF0, 0x60, 0xE0, 0x40, 0x40, 0x00, 0x00, 
+	{ 0x00, 0x00, 0x7F, 0xFE, 0x7F, 0xFC, 0x7F, 0xF0,
+	  0x7F, 0xE0, 0x7F, 0xE0, 0x7F, 0xF0, 0x7F, 0xF8,
+	  0x7F, 0xFC, 0x7F, 0xFE, 0x7F, 0xFC, 0x73, 0xF8,
+	  0x61, 0xF0, 0x60, 0xE0, 0x40, 0x40, 0x00, 0x00,
 	},
 };
 
@@ -289,7 +289,7 @@ setpalette(uint32_t p, uint32_t r, uint32_t g, uint32_t b)
 }
 
 /*
- * On some video cards (e.g. Mach64), the palette is used as the 
+ * On some video cards (e.g. Mach64), the palette is used as the
  * DAC registers for >8-bit modes.  We don't want to set them when the user
  * is trying to set a colormap and the card is in one of these modes.
  */
@@ -391,7 +391,7 @@ hwdraw(Memdrawparam *par)
 		if(mask->data->bdata == gscreendata.bdata)
 			swcursoravoid(par->mr);
 	}
-	
+
 	if(dst->data->bdata != gscreendata.bdata)
 		return 0;
 
@@ -423,7 +423,7 @@ hwdraw(Memdrawparam *par)
 	&& (par->op&S) == S)
 		return scr->scroll(scr, par->r, par->sr);
 
-	return 0;	
+	return 0;
 }
 
 void
@@ -463,7 +463,7 @@ vgalinearaddr(VGAscr *scr, uint32_t paddr, int size)
 		 */
 		error("cannot grow vga frame buffer");
 	}
-	
+
 	/* round to page boundary, just in case */
 	x = paddr&(4*KiB-1);
 	npaddr = paddr-x;
@@ -485,7 +485,7 @@ vgalinearaddr(VGAscr *scr, uint32_t paddr, int size)
 
 
 /*
- * Software cursor. 
+ * Software cursor.
  */
 int	swvisible;	/* is the cursor visible? */
 int	swenabled;	/* is the cursor supposed to be on the screen? */
@@ -581,7 +581,7 @@ swload(VGAscr *v, Cursor *curs)
 	 * Build cursor image and mask.
 	 * Image is just the usual cursor image
 	 * but mask is a transparent alpha mask.
-	 * 
+	 *
 	 * The 16x16x8 memimages do not have
 	 * padding at the end of their scan lines.
 	 */

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

@@ -137,7 +137,7 @@ iigctl(Cmdbuf *cb)
 	case CMblank:
 		drawblankscreen(1);
 		return;
-	
+
 	case CMunblank:
 		drawblankscreen(0);
 		return;

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

@@ -121,9 +121,9 @@ vgareset(void)
 {
 	/* reserve the 'standard' vga registers */
 	if(ioalloc(0x2b0, 0x2df-0x2b0+1, 0, "vga") < 0)
-		panic("vga ports already allocated"); 
+		panic("vga ports already allocated");
 	if(ioalloc(0x3c0, 0x3da-0x3c0+1, 0, "vga") < 0)
-		panic("vga ports already allocated"); 
+		panic("vga ports already allocated");
 	addarchfile("realmodemem", 0660, rmemread, rmemwrite);
 }
 
@@ -157,7 +157,7 @@ vgaopen(Chan* c, int omode)
 	if ((uint32_t)c->qid.path == Qvgaovlctl) {
 		if (scr->dev && scr->dev->ovlctl)
 			scr->dev->ovlctl(scr, c, openctl, strlen(openctl));
-		else 
+		else
 			error(Enonexist);
 	}
 	return devopen(c, omode, vgadir, nelem(vgadir), devgen);
@@ -229,7 +229,7 @@ vgaread(Chan* c, void* a, int32_t n, int64_t off)
 				scr->gscreen->r.max.x, scr->gscreen->r.max.y,
 				scr->gscreen->depth, chantostr(chbuf, scr->gscreen->chan));
 
-			if(Dx(scr->gscreen->r) != Dx(physgscreenr) 
+			if(Dx(scr->gscreen->r) != Dx(physgscreenr)
 			|| Dy(scr->gscreen->r) != Dy(physgscreenr))
 				len += snprint(p+len, READSTR-len, "actualsize %dx%d\n",
 					physgscreenr.max.x, physgscreenr.max.y);
@@ -380,7 +380,7 @@ vgactl(Cmdbuf *cb)
 		physgscreenr = Rect(0,0,x,y);
 		scr->gscreen->clipr = physgscreenr;
 		return;
-	
+
 	case CMpalettedepth:
 		x = strtoul(cb->f[1], &p, 0);
 		if(x != 8 && x != 6)
@@ -395,7 +395,7 @@ vgactl(Cmdbuf *cb)
 		if(scr->dev && scr->dev->drawinit)
 			scr->dev->drawinit(scr);
 		return;
-	
+
 	case CMlinear:
 		if(cb->nf!=2 && cb->nf!=3)
 			error(Ebadarg);
@@ -407,7 +407,7 @@ vgactl(Cmdbuf *cb)
 		if(screenaperture(size, align) < 0)
 			error("not enough free address space");
 		return;
-/*	
+/*
 	case CMmemset:
 		memset((void*)strtoul(cb->f[1], 0, 0), atoi(cb->f[2]), atoi(cb->f[3]));
 		return;
@@ -416,11 +416,11 @@ vgactl(Cmdbuf *cb)
 	case CMblank:
 		drawblankscreen(1);
 		return;
-	
+
 	case CMunblank:
 		drawblankscreen(0);
 		return;
-	
+
 	case CMblanktime:
 		blanktime = strtoul(cb->f[1], 0, 0);
 		return;
@@ -449,7 +449,7 @@ vgactl(Cmdbuf *cb)
 		else
 			break;
 		return;
-	
+
 	case CMhwblank:
 		if(strcmp(cb->f[1], "on") == 0)
 			hwblank = 1;

+ 9 - 9
sys/src/9/amd64/io.h

@@ -287,17 +287,17 @@ struct Pcisiz
  * but adds fields to build the linked list of capabilities per device.
  *
  * struct virtio_pci_cap {
- *   u8 cap_vndr; // Generic PCI field: PCI_CAP_ID_VNDR 
- *   u8 cap_next; // Generic PCI field: next ptr. 
- *   u8 cap_len; // Generic PCI field: capability length 
- *   u8 cfg_type; // Identifies the structure. 
- *   u8 bar; // Where to find it. 
- *   u8 padding[3]; // Pad to full dword. 
- *   le32 offset; // Offset within bar. 
- *   le32 length; // Length of the structure, in bytes. 
+ *   u8 cap_vndr; // Generic PCI field: PCI_CAP_ID_VNDR
+ *   u8 cap_next; // Generic PCI field: next ptr.
+ *   u8 cap_len; // Generic PCI field: capability length
+ *   u8 cfg_type; // Identifies the structure.
+ *   u8 bar; // Where to find it.
+ *   u8 padding[3]; // Pad to full dword.
+ *   le32 offset; // Offset within bar.
+ *   le32 length; // Length of the structure, in bytes.
  * };
  */
- 
+
 enum {
 	PciCapVndr 	= 0x00,
 	PciCapNext 	= 0x01,

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

@@ -137,7 +137,7 @@
 #define PMAPADDR        (0xffffffffffe00000)
 #endif
 
-// YUCK. 
+// YUCK.
 /* stuff we did not want to bring in but ... */
  /* buffer for user space -- known to vga */
 #define RMBUF ((void*)(KZERO + 0x9000))

+ 5 - 5
sys/src/9/amd64/root/cpu.c

@@ -182,7 +182,7 @@ main(int argc, char **argv)
 	/* start up a process to pass along notes */
 	lclnoteproc(data);
 
-	/* 
+	/*
 	 *  Wait for the other end to execute and start our file service
 	 *  of /mnt/term
 	 */
@@ -273,7 +273,7 @@ old9p(int fd)
 		close(fd);
 		close(p[0]);
 	}
-	return p[1];	
+	return p[1];
 }
 
 /* Invoked with stdin, stdout and stderr connected to the network connection */
@@ -421,7 +421,7 @@ readstr(int fd, char *str, int len)
 
 	while(len) {
 		n = read(fd, str, 1);
-		if(n < 0) 
+		if(n < 0)
 			return -1;
 		if(*str == '\0')
 			return 0;
@@ -591,7 +591,7 @@ chuid(char* to)
 		werrstr("open #¤/caphash: %r");
 		return -1;
 	}
-	
+
 	cap = smprint("%s@Why can't we all just get along?", to);
 	p = strrchr(cap, '@');
 	hmac_sha1((uint8_t*)cap, p-cap, (uint8_t*)p+1, strlen(p+1), hash,
@@ -769,7 +769,7 @@ rmtnoteproc(void)
 			syslog(0, "cpu", "cpu -R: can't open %s", rmtnotefile);
 			_exits(0);
 		}
-	
+
 		for(;;){
 			n = read(fd, buf, sizeof(buf)-1);
 			if(n <= 0){

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

@@ -35,15 +35,15 @@ VGAscr vgascreen[1];
 
 Cursor	arrow = {
 	{ -1, -1 },
-	{ 0xFF, 0xFF, 0x80, 0x01, 0x80, 0x02, 0x80, 0x0C, 
-	  0x80, 0x10, 0x80, 0x10, 0x80, 0x08, 0x80, 0x04, 
-	  0x80, 0x02, 0x80, 0x01, 0x80, 0x02, 0x8C, 0x04, 
-	  0x92, 0x08, 0x91, 0x10, 0xA0, 0xA0, 0xC0, 0x40, 
+	{ 0xFF, 0xFF, 0x80, 0x01, 0x80, 0x02, 0x80, 0x0C,
+	  0x80, 0x10, 0x80, 0x10, 0x80, 0x08, 0x80, 0x04,
+	  0x80, 0x02, 0x80, 0x01, 0x80, 0x02, 0x8C, 0x04,
+	  0x92, 0x08, 0x91, 0x10, 0xA0, 0xA0, 0xC0, 0x40,
 	},
-	{ 0x00, 0x00, 0x7F, 0xFE, 0x7F, 0xFC, 0x7F, 0xF0, 
-	  0x7F, 0xE0, 0x7F, 0xE0, 0x7F, 0xF0, 0x7F, 0xF8, 
-	  0x7F, 0xFC, 0x7F, 0xFE, 0x7F, 0xFC, 0x73, 0xF8, 
-	  0x61, 0xF0, 0x60, 0xE0, 0x40, 0x40, 0x00, 0x00, 
+	{ 0x00, 0x00, 0x7F, 0xFE, 0x7F, 0xFC, 0x7F, 0xF0,
+	  0x7F, 0xE0, 0x7F, 0xE0, 0x7F, 0xF0, 0x7F, 0xF8,
+	  0x7F, 0xFC, 0x7F, 0xFE, 0x7F, 0xFC, 0x73, 0xF8,
+	  0x61, 0xF0, 0x60, 0xE0, 0x40, 0x40, 0x00, 0x00,
 	},
 };
 
@@ -292,7 +292,7 @@ setpalette(uint32_t p, uint32_t r, uint32_t g, uint32_t b)
 }
 
 /*
- * On some video cards (e.g. Mach64), the palette is used as the 
+ * On some video cards (e.g. Mach64), the palette is used as the
  * DAC registers for >8-bit modes.  We don't want to set them when the user
  * is trying to set a colormap and the card is in one of these modes.
  */
@@ -394,7 +394,7 @@ hwdraw(Memdrawparam *par)
 		if(mask->data->bdata == gscreendata.bdata)
 			swcursoravoid(par->mr);
 	}
-	
+
 	if(dst->data->bdata != gscreendata.bdata)
 		return 0;
 
@@ -426,7 +426,7 @@ hwdraw(Memdrawparam *par)
 	&& (par->op&S) == S)
 		return scr->scroll(scr, par->r, par->sr);
 
-	return 0;	
+	return 0;
 }
 
 void
@@ -469,7 +469,7 @@ vgalinearpci(VGAscr *scr)
 	uint32_t paddr;
 	int i, size, best;
 	Pcidev *p;
-	
+
 	p = scr->pci;
 	if(p == nil)
 		return;
@@ -491,9 +491,9 @@ vgalinearpci(VGAscr *scr)
 			continue;
 		if(p->mem[i].size < 640*480)	/* not big enough */
 			continue;
-		if(best==-1 
-		|| p->mem[i].size > p->mem[best].size 
-		|| (p->mem[i].size == p->mem[best].size 
+		if(best==-1
+		|| p->mem[i].size > p->mem[best].size
+		|| (p->mem[i].size == p->mem[best].size
 		  && (p->mem[i].bar&8)
 		  && !(p->mem[best].bar&8)))
 			best = i;
@@ -529,7 +529,7 @@ vgalinearaddr(VGAscr *scr, uint32_t paddr, int size)
 		 */
 		error("cannot grow vga frame buffer");
 	}
-	
+
 	/* round to page boundary, just in case */
 	x = paddr&(4*KiB-1);
 	npaddr = paddr-x;
@@ -551,7 +551,7 @@ vgalinearaddr(VGAscr *scr, uint32_t paddr, int size)
 
 
 /*
- * Software cursor. 
+ * Software cursor.
  */
 int	swvisible;	/* is the cursor visible? */
 int	swenabled;	/* is the cursor supposed to be on the screen? */
@@ -647,7 +647,7 @@ swload(VGAscr *v, Cursor *curs)
 	 * Build cursor image and mask.
 	 * Image is just the usual cursor image
 	 * but mask is a transparent alpha mask.
-	 * 
+	 *
 	 * The 16x16x8 memimages do not have
 	 * padding at the end of their scan lines.
 	 */

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

@@ -114,7 +114,7 @@ struct VGAscr {
 
 	uint32_t	io;				/* device specific registers */
 	uint32_t	*mmio;
-	
+
 	uint32_t	colormap[Pcolours][3];
 	int	palettedepth;
 

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

@@ -217,7 +217,7 @@ static	int	debug;
 static	int	prid = 1;
 static	int	datapi;
 
-// TODO: does this get initialized correctly? 
+// TODO: does this get initialized correctly?
 static char stab[] = {
 [0]	= 'i', 'm',
 [8]	= 't', 'c', 'p', 'e',

+ 1 - 1
sys/src/9/boot/aux.c

@@ -176,7 +176,7 @@ outin(char *prompt, char *def, int len)
 	if(cpuflag){
 		notify(catchint);
 		alarm(15*1000);
-	} 
+	}
 	print("%s[%s]: ", prompt, *def ? def : "no default");
 	memset(buf, 0, sizeof buf);
 	n = readline(buf, sizeof buf);

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

@@ -1,4 +1,4 @@
-/* 
+/*
  * This file is part of the UCB release of Plan 9. It is subject to the license
  * terms in the LICENSE file found in the top-level directory of this
  * distribution and at http://akaros.cs.berkeley.edu/files/Plan9License. No
@@ -85,8 +85,8 @@ static Rectangle window;
 
 static struct VGAdev cbvgadev = {
 	.name =  "coreboot",
-/*		
-		
+/*
+
 		void	(*enable)(VGAscr*);
 		void	(*disable)(VGAscr*);
 		void	(*page)(VGAscr*, int);
@@ -132,7 +132,7 @@ VGAscr vgascreen[1] = {
 static	void	screenwin(void);
 
 /*
- * Software cursor. 
+ * Software cursor.
  */
 int	swvisible;	/* is the cursor visible? */
 int	swenabled;	/* is the cursor supposed to be on the screen? */
@@ -283,7 +283,7 @@ swload(Cursor *curs)
 	 * Build cursor image and mask.
 	 * Image is just the usual cursor image
 	 * but mask is a transparent alpha mask.
-	 * 
+	 *
 	 * The 16x16x8 memimages do not have
 	 * padding at the end of their scan lines.
 	 */
@@ -388,7 +388,7 @@ screeninit(void)
 	print("%s: fb is %p\n", __func__, cbinfo.framebuffer);
 	if (!cbinfo.framebuffer)
 		return -1;
-	
+
 	fb = KADDR((uintptr_t)cbinfo.framebuffer);
 	framebuf.pixel =  KADDR(fb->physical_address);
 

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

@@ -1,4 +1,4 @@
-/* 
+/*
  * This file is part of the UCB release of Plan 9. It is subject to the license
  * terms in the LICENSE file found in the top-level directory of this
  * distribution and at http://akaros.cs.berkeley.edu/files/Plan9License. No

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

@@ -153,7 +153,7 @@ hbbypid(int tidx, int pid)
 
 // Find a mount tag index, return -1 if none found.
 
-static int 
+static int
 findtag(char *tag)
 {
 	for(int i = 0; i < nv9p; i++)
@@ -537,7 +537,7 @@ v9pwrite(Chan *c, void *va, int32_t n, int64_t offset)
 
 // Phantom device. It is used only for read/write operations. It is not registered in the
 // global table or devices, and is not addressable in any other way. It is only needed to
-// pass the reference to the read/write methods to the mount driver. 
+// pass the reference to the read/write methods to the mount driver.
 
 static Chan*
 phattach(char *spec)
@@ -623,7 +623,7 @@ mtagsread(Chan* c, void* buf, int32_t n, int64_t off)
 Dev phdevtab = {
 	.dc = 2151,			/* 1/9 */
 	.name = "9phantom",
-	
+
 	.reset = devreset,
 	.init = devinit,
 	.shutdown = devshutdown,

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

@@ -127,11 +127,11 @@ struct Port
 	Chan	*data[2];	// channel to data
 
 	Proc	*readp;		// read proc
-	
+
 	// the following uniquely identifies the port
 	int	type;
 	char	name[KNAMELEN];
-	
+
 	// owner hash - avoids bind/unbind races
 	unsigned long	ownhash;
 
@@ -378,7 +378,7 @@ bridgewrite(Chan *c, void *a, int32_t n, int64_t off)
 	Bridge *b = bridgetab + c->devno;
 	Cmdbuf *cb;
 	char *arg0, *p;
-	
+
 	USED(off);
 	switch(TYPE(c->qid)) {
 	default:
@@ -462,7 +462,7 @@ bridgegen(Chan *c, char *_, Dirtab*__, int ___, int s, Dir *dp)
 	default:
 		/* non-directory entries end up here */
 		if(c->qid.type & QTDIR)
-			panic("bridgegen: unexpected directory");	
+			panic("bridgegen: unexpected directory");
 		if(s != 0)
 			return -1;
 		dt = dirtab[TYPE(c->qid)];
@@ -614,7 +614,7 @@ portbind(Bridge *b, int argc, char *argv[])
 		port->data[1] = port->data[0];
 
 		poperror();
-		cclose(ctl);		
+		cclose(ctl);
 
 		break;
 	case Ttun:
@@ -738,7 +738,7 @@ cacheupdate(Bridge *b, uint8_t d[Eaddrlen], int port)
 		log(&b->Log, Logcache, "bad source address: %E\n", d);
 		return;
 	}
-	
+
 	h = 0;
 	for(i=0; i<Eaddrlen; i++) {
 		h *= 7;
@@ -811,7 +811,7 @@ cachedump(Bridge *b)
 	for(i=0; i<CacheSize; i++)
 		if(b->cache[i].expire != 0)
 			n++;
-	
+
 	n *= 51;	// change if print format is changed
 	n += 10;	// some slop at the end
 	buf = malloc(n);
@@ -823,7 +823,7 @@ cachedump(Bridge *b)
 	off = seconds() - sec;
 	for(i=0; i<CacheSize; i++,ce++) {
 		if(ce->expire == 0)
-			continue;	
+			continue;
 		c = (sec < ce->expire)?'v':'e';
 		p += snprint(p, ep-p, "%E %2d %10ld %10ld %10ld %c\n", ce->d,
 			ce->port, ce->src, ce->dst, ce->expire+off, c);
@@ -973,7 +973,7 @@ etherread(void *a)
 	Centry *ce;
 	long md, n;
 	extern Dev *devtab[];
-	
+
 	qlock(&b->QLock);
 	port->readp = up;	/* hide identity under a rock for unbind */
 
@@ -1091,7 +1091,7 @@ etherwrite(Port *port, Block *bp)
 	}
 	port->outfrag++;
 	if(waserror()){
-		freeblist(bp);	
+		freeblist(bp);
 		return;
 	}
 
@@ -1110,13 +1110,13 @@ etherwrite(Port *port, Block *bp)
 		xp = xp->next;
 	}
 	xp->rp += offset;
-	
+
 	if(0)
 		print("seglen=%d, dlen=%d, mf=%x, frag=%d\n",
 			seglen, dlen, mf, frag);
 	for(fragoff = 0; fragoff < dlen; fragoff += seglen) {
 		nb = allocb(ETHERHDRSIZE+IPHDR+seglen);
-		
+
 		feh = (Iphdr*)(nb->wp+ETHERHDRSIZE);
 
 		memmove(nb->wp, epkt, ETHERHDRSIZE+IPHDR);
@@ -1144,19 +1144,19 @@ etherwrite(Port *port, Block *bp)
 			chunk -= blklen;
 			if(xp->rp == xp->wp)
 				xp = xp->next;
-		} 
+		}
 
 		feh->cksum[0] = 0;
 		feh->cksum[1] = 0;
 		hnputs(feh->cksum, ipcsum(&feh->vihl));
-	
+
 		/* don't generate small packets */
 		if(BLEN(nb) < ETHERMINTU)
 			nb->wp = nb->rp + ETHERMINTU;
 		devtab[port->data[1]->qid.type]->bwrite(port->data[1], nb, 0);
 	}
 	poperror();
-	freeblist(bp);	
+	freeblist(bp);
 }
 
 // hold b lock

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

@@ -154,7 +154,7 @@ static void cb_parse_framebuffer(void *ptr, struct sysinfo_t *info)
 }
 
 static void cb_parse_x86_rom_var_mtrr(void *ptr, struct sysinfo_t *info)
-{ 
+{
 	kmprint("%s, ignoring MTRR information.\n", __func__);
 }
 
@@ -173,10 +173,10 @@ int cb_parse_header(void *addr, int len, struct sysinfo_t *info)
 	for (i = 0; i < len; i += 16, ptr += 16) {
 		header = (struct cb_header *)ptr;
 		if (0)
-		kmprint("Check header %p sig %p val %02x %02x %02x %02x\n", header, header->signature, 
-				header->signature[0], 
-				header->signature[1], 
-				header->signature[2], 
+		kmprint("Check header %p sig %p val %02x %02x %02x %02x\n", header, header->signature,
+				header->signature[0],
+				header->signature[1],
+				header->signature[2],
 				header->signature[3]);
 		if (!strncmp((char *)header->signature, "LBIO", 4))
 			break;
@@ -211,7 +211,7 @@ int cb_parse_header(void *addr, int len, struct sysinfo_t *info)
 		switch (rec->tag) {
 		case CB_TAG_FORWARD:
 			forward = KADDR((unsigned long)((struct cb_forward *)rec)->forward);
-			kmprint("FORWARD: %p %p\n", (unsigned long)((struct cb_forward *)rec)->forward, 
+			kmprint("FORWARD: %p %p\n", (unsigned long)((struct cb_forward *)rec)->forward,
 					forward);
 			return cb_parse_header(forward, len, info);
 			continue;

+ 4 - 4
sys/src/9/port/devpci.c

@@ -54,7 +54,7 @@ pcidirgen(Chan *c, int t, int tbdf, Dir *dp)
 		devdir(c, q, up->genbuf, 128, eve, 0664, dp);
 		return 1;
 
-	// Display device capabilities as a directory, 
+	// Display device capabilities as a directory,
 	// each capability has an entry as a file.
 
 	case Qpcicap:
@@ -109,7 +109,7 @@ pcigen(Chan *c, char *d, Dirtab* dir, int i, int s, Dir *dp)
 		p = pcimatchtbdf(tbdf);
 		if(p == nil)
 			return -1;
-		
+
 		// Generate a directory entry for each PCI device capability
 		// gathered during the PCI bus scan.
 		// Each capability is displayed as a file of length equal to the length
@@ -120,13 +120,13 @@ pcigen(Chan *c, char *d, Dirtab* dir, int i, int s, Dir *dp)
 		// config type (cfg_type), B is BAR number, and O is offset within BAR.
 		// The capabilities files cannot be read or written. They are displayed
 		// for exploratory purposes only.
-			
+
 		if(TYPE(c->qid) == Qpcicap) {
 			if(s >= p->capcnt)
 				return -1;
 			q = (Qid){BUSBDF(tbdf)|(Qpcicap + s + 1), 0, 0};
 			Pcicap *pcp = p->capidx[s];
-			snprint(up->genbuf, sizeof up->genbuf, "cap%d.v%d.l%d.t%d.b%d.o%d", 
+			snprint(up->genbuf, sizeof up->genbuf, "cap%d.v%d.l%d.t%d.b%d.o%d",
 				s, pcp->vndr, pcp->caplen, pcp->type, pcp->bar, pcp->offset);
 			devdir(c, q, up->genbuf, pcp->length, eve, 0444, dp);
 			return 1;

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

@@ -45,7 +45,7 @@ printramfile(int offset, struct RamFile* file)
 	for(i = 0; i < offset; i++) {
 		print(" ");
 	}
-	print("ramfile: %x, magic:%x, name: %s, parent: %x, sibling:%x, length:%d, alloclength: %d, perm: %o\n", 
+	print("ramfile: %x, magic:%x, name: %s, parent: %x, sibling:%x, length:%d, alloclength: %d, perm: %o\n",
 			file, file->magic, file->name, file->parent, file->sibling, file->length, file->alloclength, file->perm);
 }
 
@@ -94,7 +94,7 @@ ramattach(char *spec)
 {
         Chan *c;
         char *buf;
-         
+
         c = newchan();
         mkqid(&c->qid, (int64_t)ramroot, 0, QTDIR);
         c->dev = devtabget('@', 0);

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

@@ -71,7 +71,7 @@ rwcommon(Vqctl *d, void *va, int32_t n, int qidx)
 		memmove(buf, va, n);
 	}
 	q2descr(vq, descr[0])->addr = PADDR(buf);
-	q2descr(vq, descr[0])->len = n;	
+	q2descr(vq, descr[0])->len = n;
 	if(!qidx) {
 		q2descr(vq, descr[0])->flags = VRING_DESC_F_WRITE;
 	}
@@ -191,11 +191,11 @@ vconclose(Chan* c)
 {
 }
 
-static uint32_t 
+static uint32_t
 wantfeat(uint32_t f) {
 	return VIRTIO_CONSOLE_F_SIZE;	// We want only console size, but not multiport for simplicity
 }
-	
+
 static void
 vconinit(void)
 {

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

@@ -1175,7 +1175,7 @@ static int dcok[] =  {
 /* to be used in chan.c to disallow attach to these devices
  */
 
-int 
+int
 checkdc(int dc)
 {
 	int i;

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

@@ -769,7 +769,7 @@ static void
 qhfree(Ctlr *ctlr, Qh *qh)
 {
 	Td *td, *ltd;
-	Qh *q;  
+	Qh *q;
 
 	if(qh == nil)
 		return;

+ 4 - 4
sys/src/9/port/virtio_lib.c

@@ -93,7 +93,7 @@ vqinterrupt(Virtq *q);
 // If the device's vq IO map is entirely zero, service all existing queues in turn.
 // Otherwise only those queues whose bit is set.
 
-static void 
+static void
 vqintr(Ureg *x, void *arg)
 {
 	Vqctl *dev = arg;
@@ -188,7 +188,7 @@ getdescr(Virtq *q, int n, uint16_t *descr)
 // Place a given number of populated descriptors into the virtqueue. Descriptor indices are
 // provided in an array. Descriptors will be queued in the order of increasing array index.
 // The process issuing this call will be suspended until the I/O operation on the virtqueue
-// completes. It is the calling process responsibility to return the used descriptors 
+// completes. It is the calling process responsibility to return the used descriptors
 // to the queue.
 
 int
@@ -338,7 +338,7 @@ initvdevs(Vqctl **vcs)
 
 // Identity finction for device features.
 
-static uint32_t 
+static uint32_t
 acceptallfeat(uint32_t feat)
 {
 	return feat;
@@ -397,7 +397,7 @@ readvdevcfg(Vqctl *vc, void *va, int32_t n, int64_t offset)
 void
 virtiosetup()
 {
-	if(nvq != 0 || cvq != nil) 
+	if(nvq != 0 || cvq != nil)
 		return;						// avoid repeated calls
 	print("virtio: initializing\n");
 	nvq = initvdevs(nil);

+ 3 - 3
sys/src/9/test/1/main.c

@@ -297,7 +297,7 @@ main(uint32_t ax, uint32_t bx)
 
 	vsvminit(MACHSTKSZ, NIXTC);
 
-	conf.nmach = 1;			
+	conf.nmach = 1;
 
 	fmtinit();
 	print("\nNIX\n");
@@ -336,7 +336,7 @@ main(uint32_t ax, uint32_t bx)
 	 * things like that completely broken).
 	 */
 	acpiinit();
-	
+
 	umeminit();
 	trapinit();
 	printinit();
@@ -366,7 +366,7 @@ main(uint32_t ax, uint32_t bx)
 	swapinit();
 	userinit();
 	nixsquids();
-testiccs();	
+testiccs();
 print("schedinit...\n");
 	schedinit();
 }

+ 1 - 1
sys/src/cmd/9660srv/9660srv.c

@@ -745,7 +745,7 @@ rzdir(Xfs *fs, Dir *d, int fmt, Drec *dp)
 		}
 	}
 	d->length = 0;
-	if((d->mode & DMDIR) == 0)	
+	if((d->mode & DMDIR) == 0)
 		d->length = fakemax(l32(dp->size));
 	d->type = 0;
 	d->dev = 0;

+ 1 - 1
sys/src/cmd/9660srv/iobuf.c

@@ -23,7 +23,7 @@
  * tarring up a Plan 9 distribution CD, we now use 16 128kb
  * buffers.  This works for ISO9660 because data is required
  * to be laid out contiguously; effectively we're doing agressive
- * readahead.  Because the buffers are so big and the typical 
+ * readahead.  Because the buffers are so big and the typical
  * disk accesses so concentrated, it's okay that we have so few
  * of them.
  *

+ 12 - 12
sys/src/cmd/aan.c

@@ -238,7 +238,7 @@ fromclient(void *v)
 	static int outmsg;
 
 	do {
-		b = recvp(empty);	
+		b = recvp(empty);
 		if ((int)(b->hdr.nb = read(0, b->buf, Bufsize)) <= 0) {
 			if ((int)b->hdr.nb < 0)
 				dmessage(2, "fromclient; Cannot read 9P message; %r\n");
@@ -266,7 +266,7 @@ fromnet(void *v)
 
 	while (!done) {
 		while (netfd < 0) {
-			dmessage(1, "fromnet; waiting for connection... (inmsg %d)\n", 
+			dmessage(1, "fromnet; waiting for connection... (inmsg %d)\n",
 					  inmsg);
 			sleep(1000);
 		}
@@ -308,7 +308,7 @@ fromnet(void *v)
 			dmessage(1, "fromnet; skipping message %d, currently at %d\n",
 				b->hdr.msg, inmsg);
 			continue;
-		}			
+		}
 
 		/* Process the acked list. */
 		acked = b->hdr.acked - lastacked;
@@ -325,7 +325,7 @@ fromnet(void *v)
 		lastacked = b->hdr.acked;
 		inmsg++;
 		showmsg(1, "fromnet", b);
-		if (writen(1, b->buf, len) < 0) 
+		if (writen(1, b->buf, len) < 0)
 			sysfatal("fromnet; cannot write to client; %r");
 	}
 	done = 1;
@@ -354,14 +354,14 @@ reconnect(void)
 	} else {
 		syslog(0, Logname, "waiting for connection on %s", devdir);
 		alarm(maxto * 1000);
- 		if ((lcfd = listen(devdir, ldir)) < 0) 
+ 		if ((lcfd = listen(devdir, ldir)) < 0)
 			sysfatal("reconnect; cannot listen; %r");
-	
+
 		if ((fd = accept(lcfd, ldir)) < 0)
 			sysfatal("reconnect; cannot accept; %r");
 		alarm(0);
 		close(lcfd);
-		
+
 		ep = getendpoints(ldir);
 		dmessage(1, "rsys '%s'\n", ep->rsys);
 		syslog(0, Logname, "connected from %s", ep->rsys);
@@ -400,8 +400,8 @@ showmsg(int level, char *s, Buf *b)
 		dmessage(level, "%s; b == nil\n", s);
 		return;
 	}
-	dmessage(level, "%s;  (len %d) %X %X %X %X %X %X %X %X %X (%p)\n", s, 
-		b->hdr.nb, 
+	dmessage(level, "%s;  (len %d) %X %X %X %X %X %X %X %X %X (%p)\n", s,
+		b->hdr.nb,
 		b->buf[0], b->buf[1], b->buf[2],
 		b->buf[3], b->buf[4], b->buf[5],
 		b->buf[6], b->buf[7], b->buf[8], b);
@@ -413,7 +413,7 @@ writen(int fd, uint8_t *buf, int nb)
 	int n, len = nb;
 
 	while (nb > 0) {
-		if (fd < 0) 
+		if (fd < 0)
 			return -1;
 		if ((n = write(fd, buf, nb)) < 0) {
 			dmessage(1, "writen; Write failed; %r\n");
@@ -440,9 +440,9 @@ timerproc(void *x)
 static void
 dmessage(int level, char *fmt, ...)
 {
-	va_list arg; 
+	va_list arg;
 
-	if (level > debug) 
+	if (level > debug)
 		return;
 	va_start(arg, fmt);
 	vfprint(2, fmt, arg);

+ 6 - 6
sys/src/cmd/acid/builtin.c

@@ -570,7 +570,7 @@ doaccess(Node *r, Node *args)
 
 	r->op = OCONST;
 	r->type = TINT;
-	r->ival = 0;		
+	r->ival = 0;
 	if(access(res.string->string, 4) == 0)
 		r->ival = 1;
 }
@@ -701,7 +701,7 @@ static int
 acidfmt(char *fmt, char *buf, int blen)
 {
 	char *r, *w, *e;
-	
+
 	w = buf;
 	e = buf+blen;
 	for(r=fmt; *r; r++){
@@ -839,7 +839,7 @@ map(Node *r, Node *args)
 			i = findseg(m, ent);
 		}
 		if(i < 0)
-			error("%s is not a map entry", ent);	
+			error("%s is not a map entry", ent);
 		l = l->next;
 		if(l->type != TINT)
 			error("map entry not int");
@@ -871,7 +871,7 @@ map(Node *r, Node *args)
 	}
 }
 
-void 
+void
 flatten(Node **av, Node *n)
 {
 	if(n == 0)
@@ -1252,7 +1252,7 @@ pcfile(Node *r, Node *args)
 	if(p == 0)
 		error("pcfile(addr): funny file %s", buf);
 	*p = '\0';
-	r->string = strnode(buf);	
+	r->string = strnode(buf);
 }
 
 void
@@ -1277,7 +1277,7 @@ pcline(Node *r, Node *args)
 	p = strrchr(buf, ':');
 	if(p == 0)
 		error("pcline(addr): funny file %s", buf);
-	r->ival = strtol(p+1, 0, 0);	
+	r->ival = strtol(p+1, 0, 0);
 }
 
 void fmtof(Node *r, Node *args)

+ 6 - 6
sys/src/cmd/acid/dbg.y

@@ -46,7 +46,7 @@
 
 %%
 
-prog		: 
+prog		:
 		| prog bigstmnt
 		;
 
@@ -116,7 +116,7 @@ member		: Tconst Tconst mname ';'
 		}
 		;
 
-zname		: 
+zname		:
 		{ $$ = 0; }
 		| Tid
 		;
@@ -184,7 +184,7 @@ zexpr		:
 expr		: castexpr
 		| expr '*' expr
 		{
-			$$ = an(OMUL, $1, $3); 
+			$$ = an(OMUL, $1, $3);
 		}
 		| expr '/' expr
 		{
@@ -273,11 +273,11 @@ castexpr	: monexpr
 		;
 
 monexpr		: term
-		| '*' monexpr 
+		| '*' monexpr
 		{
 			$$ = an(OINDM, $2, ZN);
 		}
-		| '@' monexpr 
+		| '@' monexpr
 		{
 			$$ = an(OINDC, $2, ZN);
 		}
@@ -324,7 +324,7 @@ monexpr		: term
 		}
 		| Teval monexpr
 		{
-			$$ = an(OEVAL, $2, ZN);	
+			$$ = an(OEVAL, $2, ZN);
 		}
 		;
 

+ 6 - 6
sys/src/cmd/acid/dot.c

@@ -55,9 +55,9 @@ odot(Node *n, Node *r)
 		error("no tag for (expr).%s", s);
 
 	/* Propagate types */
-	if(t->type) 
+	if(t->type)
 		r->comt = t->type->lt;
-	
+
 	addr = res.ival+t->offset;
 	if(t->fmt == 'a') {
 		r->op = OCONST;
@@ -65,7 +65,7 @@ odot(Node *n, Node *r)
 		r->type = TINT;
 		r->ival = addr;
 	}
-	else 
+	else
 		indir(cormap, addr, t->fmt, r);
 
 }
@@ -83,7 +83,7 @@ buildtype(Node *m, int d)
 
 	switch(m->op) {
 	case OLIST:
-		buildtype(m->left, d);		
+		buildtype(m->left, d);
 		buildtype(m->right, d);
 		break;
 
@@ -99,7 +99,7 @@ buildtype(Node *m, int d)
 		t->offset = m->ival;
 		if(m->left) {
 			t->type = m->left->sym;
-			t->fmt = 'a';			
+			t->fmt = 'a';
 		}
 		else {
 			t->type = 0;
@@ -110,7 +110,7 @@ buildtype(Node *m, int d)
 
 		*tail = t;
 		tail = &t->next;
-	}			
+	}
 }
 
 void

+ 3 - 3
sys/src/cmd/acid/expr.c

@@ -383,7 +383,7 @@ oadd(Node *n, Node *res)
 		if(r.type == TSTRING) {
 			res->type = TSTRING;
 			res->fmt = 's';
-			res->string = stradd(l.string, r.string); 
+			res->string = stradd(l.string, r.string);
 			break;
 		}
 		if(r.type == TINT) {
@@ -910,7 +910,7 @@ oeinc(Node *n, Node *res)
 			v->ival -= fmtsize(v);
 		else
 			v->ival += fmtsize(v);
-		break;			
+		break;
 	case TFLOAT:
 		if(n->op == OEDEC)
 			v->fval--;
@@ -939,7 +939,7 @@ opinc(Node *n, Node *res)
 			v->ival -= fmtsize(v);
 		else
 			v->ival += fmtsize(v);
-		break;			
+		break;
 	case TFLOAT:
 		if(n->op == OPDEC)
 			v->fval--;

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

@@ -64,8 +64,8 @@ void
 kinit(void)
 {
 	int i;
-	
-	for(i = 0; keywds[i].name; i++) 
+
+	for(i = 0; keywds[i].name; i++)
 		enter(keywds[i].name, keywds[i].terminal);
 }
 
@@ -355,7 +355,7 @@ loop:
 			return numsym('.');
 
 		return '.';
- 
+
 	case '(':
 	case ')':
 	case '[':

+ 1 - 1
sys/src/cmd/acid/list.c

@@ -63,7 +63,7 @@ build(Node *n)
 		l = al(res.type);
 		l->Store = res.Store;
 		*tail = l;
-		tail = &l->next;	
+		tail = &l->next;
 	}
 }
 

+ 1 - 1
sys/src/cmd/acid/util.c

@@ -48,7 +48,7 @@ unique(char *buf, Sym *s)
 		print("\t%s=%s %c/%llux\n", s->name, buf, s->type, s->value);
 	if(l == 0)
 		l = enter(buf, Tid);
-	return l;	
+	return l;
 }
 
 void

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

@@ -127,7 +127,7 @@ threadmain(int argc, char *argv[])
 		free(p);
 	}
 	if(maxtab == 0)
-		maxtab = 4; 
+		maxtab = 4;
 	if(loadfile)
 		rowloadfonts(loadfile);
 	putenv("font", fontnames[0]);
@@ -452,7 +452,7 @@ mousethread(void *v)
 	if(cplumb == nil)
 		alts[MPlumb].op = CHANNOP;
 	alts[NMALT].op = CHANEND;
-	
+
 	for(;;){
 		qlock(&row.QLock);
 		flushwarnings();

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

@@ -520,7 +520,7 @@ parsecmd(int nest)
 						if(nextc() == 'g')
 							cmd.flag = getch();
 					}
-			
+
 				}
 			}
 		}
@@ -617,7 +617,7 @@ simpleaddr(void)
 		addr.num = getnum(1);
 		break;
 	case '0': case '1': case '2': case '3': case '4':
-	case '5': case '6': case '7': case '8': case '9': 
+	case '5': case '6': case '7': case '8': case '9':
 		addr.num = getnum(1);
 		addr.type='l';
 		break;

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

@@ -251,7 +251,7 @@ elogapply(File *f)
 	 * but using coordinates relative to the unmodified buffer.  As we apply the log,
 	 * we have to update the coordinates to be relative to the modified buffer.
 	 * Textinsert and textdelete will do this for us; our only work is to apply the
-	 * convention that an insertion at t->q0==t->q1 is intended to select the 
+	 * convention that an insertion at t->q0==t->q1 is intended to select the
 	 * inserted text.
 	 */
 

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

@@ -165,7 +165,7 @@ execute(Text *t, uint aq0, uint aq1, int external, Text *argt)
 			f |= 2;
 		}
 		aa = getbytearg(argt, TRUE, TRUE, &a);
-		if(a){	
+		if(a){
 			if(strlen(a) > EVENTSIZE){	/* too big; too bad */
 				free(aa);
 				free(a);

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

@@ -483,7 +483,7 @@ fsyswalk(Xfid *x, Fid *f)
 			qunlock(&row.QLock);
 			dir = dirtabw;
 			goto Accept;
-	
+
     Regular:
 //			if(FILE(f->qid) == Qacme)	/* empty directory */
 //				break;

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

@@ -378,7 +378,7 @@ includename(Text *t, Rune *r, int n)
 		sprint(buf, "/%s/include", objtype);
 		objdir = bytetorune(buf, &i);
 		objdir = runerealloc(objdir, i+1);
-		objdir[i] = '\0';	
+		objdir[i] = '\0';
 	}
 
 	w = t->w;

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

@@ -119,7 +119,7 @@ errorwin(Mntdir *md, int owner)
 }
 
 /*
- * Incoming window should be locked. 
+ * Incoming window should be locked.
  * It will be unlocked and returned window
  * will be locked in its place.
  */
@@ -176,7 +176,7 @@ void
 addwarningtext(Mntdir *md, Rune *r, int nr)
 {
 	Warning *warn;
-	
+
 	for(warn = warnings; warn; warn=warn->next){
 		if(warn->md == md){
 			bufinsert(&warn->buf, warn->buf.nc, r, nr);

+ 3 - 3
sys/src/cmd/acme/wind.c

@@ -97,7 +97,7 @@ delrunepos(Window *w)
 {
 	int n;
 	Rune rune;
-	
+
 	for(n=0; n<w->tag.file->Buffer.nc; n++) {
 		bufread(&w->tag.file->Buffer, n, &rune, 1);
 		if(rune == ' ')
@@ -113,7 +113,7 @@ void
 movetodel(Window *w)
 {
 	int n;
-	
+
 	n = delrunepos(w);
 	if(n < 0)
 		return;
@@ -571,7 +571,7 @@ winctlprint(Window *w, char *buf, int fonts)
 	sprint(buf, "%11d %11d %11d %11d %11d ", w->id, w->tag.file->Buffer.nc,
 		w->body.file->Buffer.nc, w->isdir, w->dirty);
 	if(fonts)
-		return smprint("%s%11d %q %11d " , buf, Dx(w->body.Frame.r), 
+		return smprint("%s%11d %q %11d " , buf, Dx(w->body.Frame.r),
 			w->body.reffont->f->name, w->body.Frame.maxtab);
 	return buf;
 }

+ 5 - 5
sys/src/cmd/acpi/alltables.c

@@ -130,7 +130,7 @@ main(int argc, char *argv[])
 	    if (ACPI_FAILURE (Status))
 	    {
 		    /* AE_LIMIT means that no more tables are available */
-		    
+
 		    if (Status == AE_LIMIT)
 		    {
 			    break;
@@ -151,7 +151,7 @@ main(int argc, char *argv[])
     UINT32                  TableLength;
 
     TableLength = ApGetTableLength (Table);
-	    
+
         AcpiTbPrintTableHeader (Address, Table);
 
 
@@ -163,15 +163,15 @@ main(int argc, char *argv[])
         DB_BYTE_DISPLAY, 0);
     AcpiUtFilePrintf (1, "\n");
 
-	    ACPI_FREE (Table);	    
+	    ACPI_FREE (Table);
 	    if (TableStatus)
 	    {
 		    break;
 	    }
     }
-    
+
 #if 0
-    print("initit dables\n"); 
+    print("initit dables\n");
         status = AcpiLoadTables();
         if (ACPI_FAILURE(status))
 		sysfatal("Can't load ACPI tables: %d", status);

+ 2 - 2
sys/src/cmd/acpi/crs.c

@@ -150,7 +150,7 @@ main(int argc, char *argv[])
 		sysfatal("can't set up acpi tables: %d", status);
 
 	if (verbose)
-		print("init dables\n"); 
+		print("init dables\n");
         status = AcpiLoadTables();
         if (ACPI_FAILURE(status))
 		sysfatal("Can't load ACPI tables: %d", status);
@@ -158,7 +158,7 @@ main(int argc, char *argv[])
 	/* from acpi: */
     	/* If the Hardware Reduced flag is set, machine is always in acpi mode */
 	AcpiGbl_ReducedHardware = 1;
-	if (verbose) 
+	if (verbose)
 		print("LOADED TABLES.\n");
         status = AcpiEnableSubsystem(0);
         if (ACPI_FAILURE(status))

+ 2 - 2
sys/src/cmd/acpi/irq.c

@@ -87,7 +87,7 @@ main(int argc, char *argv[])
 		sysfatal("can't set up acpi tables: %d", status);
 
 	if (verbose)
-		print("init dables\n"); 
+		print("init dables\n");
         status = AcpiLoadTables();
         if (ACPI_FAILURE(status))
 		sysfatal("Can't load ACPI tables: %d", status);
@@ -95,7 +95,7 @@ main(int argc, char *argv[])
 	/* from acpi: */
     	/* If the Hardware Reduced flag is set, machine is always in acpi mode */
 	AcpiGbl_ReducedHardware = 1;
-	if (verbose) 
+	if (verbose)
 		print("LOADED TABLES.\n");
         status = AcpiEnableSubsystem(0);
         if (ACPI_FAILURE(status))

+ 5 - 5
sys/src/cmd/aquarela/cifscmd.c

@@ -37,10 +37,10 @@ tokenise(char *s, char **start, char **end)
 			if(to != *start)		/* we have data */
 				break;
 			s += n;				/* null string - keep looking */
-			while(*s && SEP(*s))	
+			while(*s && SEP(*s))
 				s++;
 			to = *start = s;
-		} 
+		}
 		else if(r == '\''){
 			s += n;				/* skip leading quote */
 			while(*s){
@@ -55,7 +55,7 @@ tokenise(char *s, char **start, char **end)
 			}
 			if(!*s)				/* no trailing quote */
 				break;
-			s++;				/* skip trailing quote */ 
+			s++;				/* skip trailing quote */
 		}
 		else  {
 			while(n--)
@@ -140,7 +140,7 @@ slut(Slut *s, char *pat)
 		s++;
 	}
 	Bprint(&bout, "%s unrecognised\n", pat);
-	return -1;	
+	return -1;
 }
 
 static int32_t
@@ -160,7 +160,7 @@ cmdopen(SmbClient *c, int argc, char *argv[])
 		return -1;
 	}
 	sm = slut(sharemodeslut, argv[1]);
-	if (sm < 0) 
+	if (sm < 0)
 		return -1;
 	om = slut(openmodeslut, argv[2]);
 	if (om < 0)

+ 1 - 1
sys/src/cmd/aquarela/client.c

@@ -64,7 +64,7 @@ udpannounce(void)
 
 void
 listen137(void *)
-{	
+{
 	for (;;) {
 		uint8_t msg[Udphdrsize + 576];
 		int len = read(fd137, msg, sizeof(msg));

+ 1 - 1
sys/src/cmd/aquarela/nbdgram.c

@@ -70,7 +70,7 @@ udplistener(void *)
 						s.flags &= 3;
 						ipmove(s.srcip, nbglobals.myipaddr);
 						s.srcport = NbDgramPort;
-						s.type = NbDgramError;	
+						s.type = NbDgramError;
 						s.error.code = NbDgramErrorDestinationNameNotPresent;
 						nbdgramsendto(uh->raddr, nhgets(uh->rport), &s);
 */

+ 3 - 3
sys/src/cmd/aquarela/nbns.c

@@ -40,7 +40,7 @@ struct {
 
 static void
 udplistener(void *)
-{	
+{
 	for (;;) {
 		uint8_t msg[Udphdrsize + 576];
 		int len = read(udp.fd, msg, sizeof(msg));
@@ -103,7 +103,7 @@ nbnsnextid(void)
 	unlock(&id);
 	return rv;
 }
-	
+
 NbnsTransaction *
 nbnstransactionnew(NbnsMessage *s, uint8_t *ipaddr)
 {
@@ -119,7 +119,7 @@ nbnstransactionnew(NbnsMessage *s, uint8_t *ipaddr)
 	t = mallocz(sizeof(*t), 1);
 	if (t == nil)
 		return nil;
-	t->id = s->id;	
+	t->id = s->id;
 	t->c = chancreate(sizeof(NbnsMessage *), 3);
 	if (t->c == nil) {
 		free(t);

+ 1 - 1
sys/src/cmd/aquarela/nbss.c

@@ -264,7 +264,7 @@ nbsslisten(NbName to, NbName from,int (*accept)(void *magic, NbSession *s, NBSSW
 
 void
 nbssfree(NbSession *s)
-{	
+{
 	deletesession((Session *)s);
 }
 

+ 1 - 1
sys/src/cmd/aquarela/netbios.h

@@ -8,7 +8,7 @@
  */
 
 enum {
-	NbNameLen = 16,	
+	NbNameLen = 16,
 	NbnsTimeoutBroadcast = 1000,
 	NbnsRetryBroadcast = 3,
 	NbnsPort = 137,

+ 1 - 1
sys/src/cmd/aquarela/smbbuffer.c

@@ -58,7 +58,7 @@ smbbufferinit(void *base, void *bdata, uint32_t blen)
 	SmbBuffer *b;
 	b = smbemalloc(sizeof(*b));
 	b->buf = base;
-	b->flags = STRUCT;	
+	b->flags = STRUCT;
 	b->rn = (uint8_t *)bdata - (uint8_t *)base;
 	b->wn = b->rn + blen;
 	b->realmaxlen = b->maxlen = b->wn;

+ 1 - 1
sys/src/cmd/aquarela/smbcomdir.c

@@ -32,7 +32,7 @@ smbcomcheckdirectory(SmbSession *s, SmbHeader *h, uint8_t *, SmbBuffer *b)
 		smbseterror(s, ERRSRV, ERRinvtid);
 		return SmbProcessResultError;
 	}
-	
+
 	smbstringprint(&fullpath, "%s%s", t->serv->path, path);
 smblogprintif(1, "smbcomcheckdirectory: statting %s\n", fullpath);
 	d = dirstat(fullpath);

+ 6 - 6
sys/src/cmd/aquarela/smbcomopen.c

@@ -43,8 +43,8 @@ openfile(SmbSession *s, SmbTree *t, char *path, uint16_t mode,
 	int diropen = 0;
 
 //smblogprint(-1, "%s A %r", path);
-	p9mode = (mode >> SMB_OPEN_MODE_ACCESS_SHIFT) & SMB_OPEN_MODE_ACCESS_MASK;	
-	share = (mode >> SMB_OPEN_MODE_SHARE_SHIFT) & SMB_OPEN_MODE_SHARE_MASK;	
+	p9mode = (mode >> SMB_OPEN_MODE_ACCESS_SHIFT) & SMB_OPEN_MODE_ACCESS_MASK;
+	share = (mode >> SMB_OPEN_MODE_SHARE_SHIFT) & SMB_OPEN_MODE_SHARE_MASK;
 	if (share == SMB_OPEN_MODE_SHARE_COMPATIBILITY) {
 	badshare:
 //smblogprint(-1, "%s SMB_OPEN_MODE_SHARE_COMPATIBILITY", path);
@@ -66,7 +66,7 @@ openfile(SmbSession *s, SmbTree *t, char *path, uint16_t mode,
 			smbseterror(s, ERRDOS, ERRnoaccess);
 			goto done;
 		}
-			
+
 		sf = smbsharedfileget(d, p9mode, &share);
 		if (sf == nil)
 			goto badshare;
@@ -174,7 +174,7 @@ smbcomopenandx(SmbSession *s, SmbHeader *h, uint8_t *pdata, SmbBuffer *b)
 {
 	uint8_t andxcommand;
 	uint16_t andxoffset, flags, mode, sattr, attr;
-	uint32_t createtime;	
+	uint32_t createtime;
 	uint16_t ofun;
 	uint32_t createsize, timeout;
 	char *path = nil;
@@ -312,7 +312,7 @@ smbcomopenandx(SmbSession *s, SmbHeader *h, uint8_t *pdata, SmbBuffer *b)
 		pr = smbchaincommand(s, h, andxoffsetfixupoffset, andxcommand, andxoffset, b);
 	else
 		pr = SmbProcessResultReply;
-	goto done;	
+	goto done;
 errordone:
 	pr = SmbProcessResultError;
 done:
@@ -403,7 +403,7 @@ smbcomcreate(SmbSession *s, SmbHeader *h, uint8_t *pdata, SmbBuffer *b)
 	smblogprint(h->command, "tid=%d\n", h->tid);
 	attr = smbnhgets(pdata); pdata += 2;
 	createtime = smbnhgetl(pdata);
-	if (!smbbuffergetb(b, &fmt) || fmt != 0x04 || 
+	if (!smbbuffergetb(b, &fmt) || fmt != 0x04 ||
 	    !smbbuffergetstring(b, h, SMB_STRING_PATH, &path)){
 		pr = SmbProcessResultError;
 		goto done;

+ 2 - 2
sys/src/cmd/aquarela/smbcomread.c

@@ -50,7 +50,7 @@ smbcomreadandx(SmbSession *s, SmbHeader *h, uint8_t *pdata, SmbBuffer *b)
 		smbseterror(s, ERRDOS, ERRbadfid);
 		return SmbProcessResultError;
 	}
-	
+
 	if (!f->ioallowed) {
 		smbseterror(s, ERRDOS, ERRbadaccess);
 		return SmbProcessResultError;
@@ -74,7 +74,7 @@ smbcomreadandx(SmbSession *s, SmbHeader *h, uint8_t *pdata, SmbBuffer *b)
 	smbbufferwritelimit(s->response, smbbufferwriteoffset(s->response) + 65535);
 	smbbufferoffsetputs(s->response, datafixup + 2, smbbufferwriteoffset(s->response));
 	seek(f->fd, offset, 0);
-	toread = smbbufferwritespace(s->response);	
+	toread = smbbufferwritespace(s->response);
 	if (toread > maxcount)
 		toread = maxcount;
 	nb = readn(f->fd, smbbufferwritepointer(s->response), toread);

+ 1 - 1
sys/src/cmd/aquarela/smbcomsetinfo.c

@@ -113,6 +113,6 @@ smbcomsetinformation(SmbSession *s, SmbHeader *h, uint8_t *pdata,
 			return SmbProcessResultError;
 		}
 	}
-	free(name);		
+	free(name);
 	return smbbufferputack(s->response, h, &s->peerinfo);
 }

+ 3 - 3
sys/src/cmd/aquarela/smbcomwrite.c

@@ -124,7 +124,7 @@ smbcomwrite(SmbSession *s, SmbHeader *h, uint8_t *pdata, SmbBuffer *b)
 		|| yacount != count
 		|| smbbufferreadspace(b) < count)
 		return SmbProcessResultFormat;
-	
+
 	t = smbidmapfind(s->tidmap, h->tid);
 	if (t == nil) {
 		smbseterror(s, ERRSRV, ERRinvtid);
@@ -135,7 +135,7 @@ smbcomwrite(SmbSession *s, SmbHeader *h, uint8_t *pdata, SmbBuffer *b)
 		smbseterror(s, ERRDOS, ERRbadfid);
 		return SmbProcessResultError;
 	}
-	
+
 	if (!f->ioallowed) {
 		smbseterror(s, ERRDOS, ERRbadaccess);
 		return SmbProcessResultError;
@@ -179,7 +179,7 @@ smbcomwriteandx(SmbSession *s, SmbHeader *h, uint8_t *pdata, SmbBuffer *b)
 		return SmbProcessResultFormat;
 
 	andxcommand = *pdata++;				// andx command
-	pdata++;					// reserved 
+	pdata++;					// reserved
 	andxoffset = smbnhgets(pdata); pdata += 2;	// andx offset
 	fid = smbnhgets(pdata); pdata += 2;		// fid
 	offset = smbnhgetl(pdata); pdata += 4;		// offset in file

+ 1 - 1
sys/src/cmd/aquarela/smbconnect.c

@@ -271,7 +271,7 @@ smblogdata(-1, smblogprint, smbbufferreadpointer(ob), smbbufferwriteoffset(ob),
 int
 smbtransactionclientreceive(void *magic, SmbBuffer *ib, char **)
 {
-	int32_t n; 
+	int32_t n;
 	SmbClient *c = magic;
 	smbbufferreset(ib);
 	n = nbssread(c->nbss, smbbufferwritepointer(ib), smbbufferwritespace(ib));

+ 1 - 1
sys/src/cmd/aquarela/smbdat.h

@@ -89,7 +89,7 @@ struct SmbSession {
 	SmbPeerInfo peerinfo;
 	Chalstate *cs;
 	struct {
-		char *accountname;	
+		char *accountname;
 		char *primarydomain;
 		char *nativeos;
 		char *nativelanman;

+ 1 - 1
sys/src/cmd/aquarela/smblisten.c

@@ -161,4 +161,4 @@ smblistencifs(SMBCIFSACCEPTFN *accept)
 	qunlock(&tcp);
 	return 0;
 }
-	
+

+ 10 - 10
sys/src/cmd/aquarela/smbrap2.c

@@ -240,7 +240,7 @@ netshareenum(SmbBuffer *inparam, SmbBuffer *outparam, SmbBuffer *outdata)
 
 	if (!smbbuffergets(inparam, &level))
 		return SmbProcessResultFormat;
-	
+
 	smblogprintif(smbglobals.log.rap2, "netshareenum(%lu, %lu)\n",
 		level, smbbufferwritespace(outdata));
 
@@ -274,7 +274,7 @@ netserverenum2(SmbBuffer *inparam, SmbBuffer *outparam, SmbBuffer *outdata)
 		pr = SmbProcessResultFormat;
 		goto done;
 	}
-	
+
 	smblogprintif(smbglobals.log.rap2, "netserverenum2(%lu, %lu, 0x%.8lux, %s)\n",
 		level, smbbufferwritespace(outdata), servertype, domain);
 
@@ -284,7 +284,7 @@ netserverenum2(SmbBuffer *inparam, SmbBuffer *outparam, SmbBuffer *outdata)
 	if (servertype == 0xffffffff)
 		servertype &= ~(SV_TYPE_DOMAIN_ENUM | SV_TYPE_LOCAL_LIST_ONLY);
 
-	if ((servertype & SV_TYPE_LOCAL_LIST_ONLY) != 0 && (servertype & SV_TYPE_DOMAIN_ENUM) == 0) 
+	if ((servertype & SV_TYPE_LOCAL_LIST_ONLY) != 0 && (servertype & SV_TYPE_DOMAIN_ENUM) == 0)
 		servertype = SV_TYPE_ALL & ~(SV_TYPE_DOMAIN_ENUM);
 
 	entries = 0;
@@ -304,7 +304,7 @@ netserverenum2(SmbBuffer *inparam, SmbBuffer *outparam, SmbBuffer *outdata)
 	si[entries] = 0;
 
 	pr = thingfill(outparam, outdata, &serverinfo, level, si);
-			
+
 done:
 	free(domain);
 	return pr;
@@ -329,7 +329,7 @@ netsharegetinfo(SmbBuffer *inparam, SmbBuffer *outparam, SmbBuffer *outdata)
 		pr = SmbProcessResultFormat;
 		goto done;
 	}
-	
+
 	smblogprintif(smbglobals.log.rap2, "netsharegetinfo(%s, %lu, %lu)\n",
 		netname, level, smbbufferwritespace(outdata));
 
@@ -367,7 +367,7 @@ netservergetinfo(SmbBuffer *inparam, SmbBuffer *outparam, SmbBuffer *outdata)
 		pr = SmbProcessResultFormat;
 		goto done;
 	}
-	
+
 	smblogprintif(smbglobals.log.rap2, "netservergetinfo(%lu, %lu)\n",
 		level, smbbufferwritespace(outdata));
 
@@ -375,7 +375,7 @@ netservergetinfo(SmbBuffer *inparam, SmbBuffer *outparam, SmbBuffer *outdata)
 		goto fmtfail;
 
 	pr = onethingfill(outparam, outdata, &shareinfo, level, &smbglobals.serverinfo);
-			
+
 done:
 	return pr;
 }
@@ -397,7 +397,7 @@ netwkstagetinfo(SmbBuffer *inparam, SmbBuffer *outparam, SmbBuffer *outdata)
 		pr = SmbProcessResultFormat;
 		goto done;
 	}
-	
+
 	smblogprintif(smbglobals.log.rap2, "netwkstagetinfo(%lu, %lu)\n",
 		level, smbbufferwritespace(outdata));
 
@@ -433,9 +433,9 @@ netwkstagetinfo(SmbBuffer *inparam, SmbBuffer *outparam, SmbBuffer *outdata)
 		pr = SmbProcessResultFormat;
 		goto done;
 	}
-	
+
 	pr = SmbProcessResultReply;
-			
+
 done:
 	return pr;
 }

+ 1 - 1
sys/src/cmd/aquarela/smbrap2client.c

@@ -103,7 +103,7 @@ smbnetserverenum2(SmbClient *c, uint32_t stype, char *domain,
 		*entriesp = entries;
 	}
 	else
-		rv = -1;	
+		rv = -1;
 done:
 	free(si);
 	smbbufferfree(&opb);

+ 1 - 1
sys/src/cmd/aquarela/smbstring.c

@@ -123,7 +123,7 @@ smbstrnput(uint8_t *buf, uint16_t n, uint16_t maxlen, char *string,
 	}
 	else
 		memcpy(p, string, l);
-	
+
 	p += l;
 	while (l++ < size)
 		*p++ = 0;

+ 2 - 2
sys/src/cmd/aquarela/smbtrans2find.c

@@ -127,7 +127,7 @@ populate(SmbSession *s, SmbDirCache *dc, Reprog *r, uint16_t informationlevel,
 	while (dc->i < dc->n && e < scount) {
 		uint32_t backup;
 		int rv;
-		
+
 		if (!smbmatch(dc->buf[dc->i].name, r)) {
 			dc->i++;
 			continue;
@@ -328,7 +328,7 @@ smbtrans2findnext2(SmbSession *s, SmbHeader *h)
 	}
 
 	populate(s, search->dc, search->rep, infolevel, flags, scount, &e, &nameoffset);
-	
+
 	eos = search->dc->i >= search->dc->n;
 	if ((flags & SMB_FIND_CLOSE) != 0 || ((flags & SMB_FIND_CLOSE_EOS) != 0 && eos))
 		smbsearchclose(s, search);

+ 1 - 1
sys/src/cmd/aquarela/smbtrans2set.c

@@ -171,7 +171,7 @@ smbtrans2setpathinformation(SmbSession *s, SmbHeader *h)
 //			length = size;
 //		else
 //			length = ~0LL;
-	
+
 		translogprint(s->transaction.in.setup[0], "size %lld\n", size);
 		translogprint(s->transaction.in.setup[0], "adate %d atime %d", adate, atime);
 		translogprint(s->transaction.in.setup[0], "mdate %d mtime %d\n", mdate, mtime);

+ 2 - 2
sys/src/cmd/aquarela/testnbdgram.c

@@ -58,7 +58,7 @@ deliver(void *, NbDgram *s)
 		print("not a supported mailslot\n");
 		goto done;
 	}
-	
+
 	if (!smbbuffergetb(b, &opcode)) {
 		print("not enough data for opcode\n");
 		goto done;
@@ -68,7 +68,7 @@ deliver(void *, NbDgram *s)
 		print("not a supported mailslot opcode %d\n", opcode);
 		goto done;
 	}
-	
+
 	if (!smbbuffergetb(b, &updatecount)
 		|| !smbbuffergetl(b, &periodicity)
 		|| !smbbuffergetstrn(b, 16, &servername)

+ 1 - 1
sys/src/cmd/ar.c

@@ -95,7 +95,7 @@ int	allobj = 1;			/* set when all members are object files of the same type */
 int	symdefsize;			/* size of symdef file */
 int	dupfound;			/* flag for duplicate symbol */
 Hashchain	*hash[NHASH];		/* hash table of text symbols */
-	
+
 #define	ARNAMESIZE	sizeof(astart->tail->hdr.name)
 
 char	poname[ARNAMESIZE+1];		/* name of pivot member */

+ 3 - 3
sys/src/cmd/archfs.c

@@ -167,20 +167,20 @@ fsread(Req *r)
 	int n;
 
 	a = r->fid->file->aux;
-	if(a->length <= r->ifcall.offset) 
+	if(a->length <= r->ifcall.offset)
 		r->ifcall.count = 0;
 	else if(a->length <= r->ifcall.offset+r->ifcall.count)
 		r->ifcall.count = a->length - r->ifcall.offset;
 
 	werrstr("unknown error");
-	if(Bseek(b, a->off+r->ifcall.offset, 0) < 0 
+	if(Bseek(b, a->off+r->ifcall.offset, 0) < 0
 	|| (n = Bread(b, r->ofcall.data, r->ifcall.count)) < 0) {
 		err[0] = '\0';
 		errstr(err, sizeof err);
 		respond(r, err);
 	} else {
 		r->ofcall.count = n;
-		respond(r, nil);	
+		respond(r, nil);
 	}
 }
 

+ 2 - 2
sys/src/cmd/auth/authsrv.c

@@ -689,9 +689,9 @@ mschap(Ticketreq *tr)
 	dupe = memcmp(reply.LMresp, reply.NTresp, MSresplen) == 0;
 
 	/*
-	 * It is valid to send the same response in both the LM and NTLM 
+	 * It is valid to send the same response in both the LM and NTLM
 	 * fields provided one of them is correct, if neither matches,
-	 * or the two fields are different and either fails to match, 
+	 * or the two fields are different and either fails to match,
 	 * the whole sha-bang fails.
 	 *
 	 * This is an improvement in security as it allows clients who

+ 1 - 1
sys/src/cmd/auth/convbio.c

@@ -84,7 +84,7 @@ ordbio(Biobuf *b, Acctbio *a)
 
 		/* get emails */
 		ne = 0;
-		for(cp = p; *cp && ne < Nemail;){	
+		for(cp = p; *cp && ne < Nemail;){
 			if(*cp != '<'){
 				cp++;
 				continue;

+ 1 - 1
sys/src/cmd/auth/debug.c

@@ -24,7 +24,7 @@ authdial(char *netroot, char *dom)
 {
 	char *p;
 	int rv;
-	
+
 	if(dom != nil){
 		/* look up an auth server in an authentication domain */
 		p = csgetvalue(netroot, "authdom", dom, "auth", nil);

+ 1 - 1
sys/src/cmd/auth/dsa2pub.c

@@ -44,7 +44,7 @@ main(int argc, char **argv)
 		sysfatal("%r");
 
 	s = smprint("key %A p=%B q=%B alpha=%B key=%B\n",
-		a, 
+		a,
 		key->pub.p, key->pub.q, key->pub.alpha, key->pub.key);
 	if(s == nil)
 		sysfatal("smprint: %r");

+ 1 - 1
sys/src/cmd/auth/dsa2ssh.c

@@ -27,7 +27,7 @@ main(int argc, char **argv)
 	DSApriv *k;
 	char *comment;
 	unsigned char buf[8192], *p;
-	
+
 	fmtinstall('B', mpfmt);
 	fmtinstall('[', encodefmt);
 	comment = "";

+ 1 - 1
sys/src/cmd/auth/dsagen.c

@@ -50,6 +50,6 @@ main(int argc, char **argv)
 
 	if(write(1, s, strlen(s)) != strlen(s))
 		sysfatal("write: %r");
-	
+
 	exits(nil);
 }

+ 1 - 1
sys/src/cmd/auth/factotum/apop.c

@@ -140,7 +140,7 @@ apopwrite(Fsstate *fss, void *va, uint n)
 		closekey(k);
 		fss->phase = CHaveResp;
 		return RpcOk;
-	
+
 	case SNeedUser:
 		if((v = _strfindattr(fss->attr, "user")) && strcmp(v, a) != 0)
 			return failure(fss, "bad user");

+ 3 - 3
sys/src/cmd/auth/factotum/chap.c

@@ -9,11 +9,11 @@
 
 /*
  * CHAP, MSCHAP
- * 
+ *
  * The client does not authenticate the server, hence no CAI
  *
  * Client protocol:
- *	write Chapchal 
+ *	write Chapchal
  *	read response Chapreply or MSchaprely structure
  *
  * Server protocol:
@@ -283,7 +283,7 @@ dochal(State *s)
 	s->asfd = _authdial(nil, dom);
 	if(s->asfd < 0)
 		goto err;
-	
+
 	memset(&s->tr, 0, sizeof(s->tr));
 	s->tr.type = s->astype;
 	safecpy(s->tr.authdom, dom, sizeof s->tr.authdom);

+ 1 - 1
sys/src/cmd/auth/factotum/dat.h

@@ -63,7 +63,7 @@ struct Fsstate
 		char *arg, buf[Maxrpc], *verb;
 		int iverb, narg, nbuf, nwant;
 	} rpc;
-	
+
 	/* persistent (cross-rpc) information */
 	char err[ERRMAX];
 	char keyinfo[3*Maxname];	/* key request */

+ 1 - 1
sys/src/cmd/auth/factotum/fgui.c

@@ -61,7 +61,7 @@ Control *b_remember;
 Control *b_accept;
 Control *b_refuse;
 
-RequestType rt[] = 
+RequestType rt[] =
 {
 	{ "/mnt/factotum/confirm",	confirm,	resizeconfirm, },
 	{ "/mnt/factotum/needkey",	needkey,	resizeneedkey, },

+ 1 - 1
sys/src/cmd/auth/factotum/fs.c

@@ -371,7 +371,7 @@ fsstat(Req *r)
 			respond(r, nil);
 			return;
 		}
-	respond(r, "file not found");	
+	respond(r, "file not found");
 }
 
 static void

+ 1 - 1
sys/src/cmd/auth/factotum/httpdigest.c

@@ -11,7 +11,7 @@
  * HTTPDIGEST - MD5 challenge/response authentication (RFC 2617)
  *
  * Client protocol:
- *	write challenge: nonce method uri 
+ *	write challenge: nonce method uri
  *	read response: 2*MD5dlen hex digits
  *
  * Server protocol:

+ 3 - 3
sys/src/cmd/auth/factotum/p9any.c

@@ -16,7 +16,7 @@
  *
  * Server protocol:
  * 	read list of protocols.
- *	write null-terminated 
+ *	write null-terminated
  */
 
 #include "dat.h"
@@ -283,7 +283,7 @@ p9anywrite(Fsstate *fss, void *va, uint n)
 				return failure(fss, "unknown version of p9any");
 			}
 		}
-	
+
 		/*
 		 * look for a key
 		 */
@@ -422,7 +422,7 @@ p9anywrite(Fsstate *fss, void *va, uint n)
 	}
 }
 
-Proto p9any = 
+Proto p9any =
 {
 .name=	"p9any",
 .init=		p9anyinit,

+ 1 - 1
sys/src/cmd/auth/factotum/p9cr.c

@@ -87,7 +87,7 @@ p9crinit(Proto *p, Fsstate *fss)
 
 	if((iscli = isclient(_strfindattr(fss->attr, "role"))) < 0)
 		return failure(fss, nil);
-	
+
 	s = emalloc(sizeof(*s));
 	s->asfd = -1;
 	if(p == &p9cr){

+ 1 - 1
sys/src/cmd/auth/factotum/pass.c

@@ -16,7 +16,7 @@
 #include "dat.h"
 
 typedef struct State State;
-struct State 
+struct State
 {
 	Key *key;
 };

+ 2 - 2
sys/src/cmd/auth/factotum/rpc.c

@@ -238,7 +238,7 @@ rpcstartlog(Attr *attr, Fsstate *fss, int ret)
 		return;
 	snprint(pre, sizeof pre, "%d: start %A yields phase %s", fss->seqnum,
 		attr, phasename(fss, fss->phase, tmp));
-	logret(pre, fss, ret);		
+	logret(pre, fss, ret);
 }
 
 int seqnum;
@@ -279,7 +279,7 @@ rpcread(Req *r)
 			_freeattr(fss->attr);
 			fss->attr = nil;
 			fss->phase = Notstarted;
-		}	
+		}
 		attr = _parseattr(fss->rpc.arg);
 		if((p = _strfindattr(attr, "proto")) == nil){
 			retstring(r, fss, "error did not specify proto");

+ 1 - 1
sys/src/cmd/auth/factotum/secstore.c

@@ -70,7 +70,7 @@ extern SConn* newSConn(int);	// arg is open file descriptor
 struct SConn{
 	void *chan;
 	int secretlen;
-	int (*secret)(SConn*, uint8_t*, int);// 
+	int (*secret)(SConn*, uint8_t*, int);//
 	int (*read)(SConn*, uint8_t*, int); // <0 if error;  errmess in buffer
 	int (*write)(SConn*, uint8_t*, int);
 	void (*free)(SConn*);		// also closes file descriptor

+ 8 - 8
sys/src/cmd/auth/factotum/util.c

@@ -373,7 +373,7 @@ findkey(Key **ret, Keyinfo *ki, char *fmt, ...)
 		return failure(ki->fss, nil);
 	}
 
-	nmatch = 0; 
+	nmatch = 0;
 	for(i=0; i<ring->nkey; i++){
 		k = ring->key[i];
 		if(_strfindattr(k->attr, "disabled") && !ki->usedisabled)
@@ -480,7 +480,7 @@ getnvramkey(int flag, char **secstorepw)
 	 * readnvram can return -1 meaning nvram wasn't written,
 	 * but safe still holds good data.
 	 */
-	if(readnvram(&safe, flag)<0 && safe.authid[0]==0) 
+	if(readnvram(&safe, flag)<0 && safe.authid[0]==0)
 		return nil;
 
 	/*
@@ -503,7 +503,7 @@ getnvramkey(int flag, char **secstorepw)
 
 	s = emalloc(512);
 	fmtinstall('H', encodefmt);
-	snprint(s, 512, "key proto=p9sk1 user=%q dom=%q !hex=%.*H !password=______", 
+	snprint(s, 512, "key proto=p9sk1 user=%q dom=%q !hex=%.*H !password=______",
 		safe.authid, safe.authdom, DESKEYLEN, safe.machkey);
 	writehostowner(safe.authid);
 
@@ -569,7 +569,7 @@ matchattr(Attr *pat, Attr *a0, Attr *a1)
 			break;
 		}
 	}
-	return 1;		
+	return 1;
 }
 
 void
@@ -595,7 +595,7 @@ initcap(void)
 }
 
 /*
- *  create a change uid capability 
+ *  create a change uid capability
  */
 char*
 mkcap(char *from, char *to)
@@ -638,7 +638,7 @@ phaseerror(Fsstate *s, char *op)
 {
 	char tmp[32];
 
-	werrstr("protocol phase error: %s in state %s", op, phasename(s, s->phase, tmp));	
+	werrstr("protocol phase error: %s in state %s", op, phasename(s, s->phase, tmp));
 	return RpcPhase;
 }
 
@@ -780,7 +780,7 @@ readcons(char *prompt, char *def, int raw)
 				fprint(fdout, "\n%s[%s]: ", prompt, def);
 			else
 				fprint(fdout, "\n%s: ", prompt);
-			
+
 			s[0] = 0;
 		} else {
 			s = estrappend(s, "%c", line[0]);
@@ -890,7 +890,7 @@ setattrs(Attr *a, Attr *b)
 		}
 continue2:;
 	}
-	return a;		
+	return a;
 }
 
 void

+ 1 - 1
sys/src/cmd/auth/factotum/wep.c

@@ -15,7 +15,7 @@
 #include "dat.h"
 
 typedef struct State State;
-struct State 
+struct State
 {
 	Key *key;
 };

+ 1 - 1
sys/src/cmd/auth/newns.c

@@ -68,4 +68,4 @@ main(int argc, char **argv)
 		errstr(err, sizeof err);
 	}
 	sysfatal("exec: %s: %r", argv[0]);
-}	
+}

+ 1 - 1
sys/src/cmd/auth/printnetkey.c

@@ -35,7 +35,7 @@ main(int argc, char *argv[])
 
 	u = argv[0];
 	fmtinstall('K', keyfmt);
-	
+
 	if(memchr(u, '\0', ANAMELEN) == 0)
 		error("bad user name");
 	key = findkey(NETKEYDB, u, keybuf);

+ 2 - 2
sys/src/cmd/auth/readnvram.c

@@ -26,7 +26,7 @@ main(int n, char **g)
 	 * readnvram can return -1 meaning nvram wasn't written,
 	 * but safe still holds good data.
 	 */
-	if(readnvram(&safe, 0) < 0 && safe.authid[0] == '\0') 
+	if(readnvram(&safe, 0) < 0 && safe.authid[0] == '\0')
 		sysfatal("readnvram: %r");
 
 	/*
@@ -39,7 +39,7 @@ main(int n, char **g)
 		sysfatal("bad key");
 
 	fmtinstall('H', encodefmt);
-	print("key proto=p9sk1 user=%q dom=%q !hex=%.*H !password=______\n", 
+	print("key proto=p9sk1 user=%q dom=%q !hex=%.*H !password=______\n",
 		safe.authid, safe.authdom, DESKEYLEN, safe.machkey);
 	exits(0);
 }

+ 1 - 1
sys/src/cmd/auth/respond.c

@@ -40,4 +40,4 @@ main(int argc, char **argv)
 	print("\n");
 }
 
-	
+

+ 6 - 6
sys/src/cmd/auth/rsa2any.c

@@ -118,27 +118,27 @@ getkey(int argc, char **argv, int needprivate, Attr **pa)
 	}
 	if((key->kp = strtomp(p, &p, 16, nil)) == nil || *p != 0){
 		fprint(2, "warning: bad !kp\n");
-		regen = 1;	
+		regen = 1;
 		goto regen;
 	}
 	if((p = _strfindattr(a, "!kq")) == nil){
 		fprint(2, "warning: no !kq\n");
-		regen = 1;	
+		regen = 1;
 		goto regen;
 	}
 	if((key->kq = strtomp(p, &p, 16, nil)) == nil || *p != 0){
 		fprint(2, "warning: bad !kq\n");
-		regen = 1;	
+		regen = 1;
 		goto regen;
 	}
 	if((p = _strfindattr(a, "!c2")) == nil){
 		fprint(2, "warning: no !c2\n");
-		regen = 1;	
+		regen = 1;
 		goto regen;
 	}
 	if((key->c2 = strtomp(p, &p, 16, nil)) == nil || *p != 0){
 		fprint(2, "warning: bad !c2\n");
-		regen = 1;	
+		regen = 1;
 		goto regen;
 	}
 regen:
@@ -294,7 +294,7 @@ uint8_t*
 putmp2(uint8_t *p, mpint *b)
 {
 	int bits, n;
-	
+
 	if(mpcmp(b, mpzero) == 0)
 		return put4(p, 0);
 	bits = mpsignif(b);

+ 1 - 1
sys/src/cmd/auth/rsa2pub.c

@@ -44,7 +44,7 @@ main(int argc, char **argv)
 		sysfatal("%r");
 
 	s = smprint("key %A size=%d ek=%B n=%B\n",
-		a, 
+		a,
 		mpsignif(key->pub.n), key->pub.ek, key->pub.n);
 	if(s == nil)
 		sysfatal("smprint: %r");

+ 1 - 1
sys/src/cmd/auth/rsafill.c

@@ -44,7 +44,7 @@ main(int argc, char **argv)
 		sysfatal("%r");
 
 	s = smprint("key %A size=%d ek=%B !dk=%B n=%B !p=%B !q=%B !kp=%B !kq=%B !c2=%B\n",
-		a, 
+		a,
 		mpsignif(key->pub.n), key->pub.ek,
 		key->dk, key->pub.n, key->p, key->q,
 		key->kp, key->kq, key->c2);

+ 1 - 1
sys/src/cmd/auth/rsagen.c

@@ -64,6 +64,6 @@ main(int argc, char **argv)
 
 	if(write(1, s, strlen(s)) != strlen(s))
 		sysfatal("write: %r");
-	
+
 	exits(nil);
 }

+ 10 - 10
sys/src/cmd/aux/8prefix.c

@@ -88,10 +88,10 @@ main(int argc, char **argv)
 	default:
 		usage();
 	}ARGEND
-	
+
 	if(argc < 2)
 		usage();
-	
+
 	prefix = argv[0];
 	argv++;
 	argc--;
@@ -105,7 +105,7 @@ main(int argc, char **argv)
 	if(verbose)
 		walkobjs(dump);
 	walkobjs(renamesyms);
-	
+
 	for(i=0; i<nobj; i++){
 		o = obj[i];
 		seek(o->fd, 0, 0);
@@ -129,7 +129,7 @@ renamesyms(int op, Sym *sym, uint8_t*, int)
 			break;
 		sym->newname = smprint("%s%s", prefix, sym->name);
 		break;
-	}	
+	}
 }
 
 void
@@ -143,7 +143,7 @@ dump(int op, Sym *sym, uint8_t*, int)
 	case ATEXT:
 		print("%s\n", sym->name);
 		break;
-	}	
+	}
 }
 
 void
@@ -175,7 +175,7 @@ int
 zaddr(uint8_t *p, Sym **symp)
 {
 	int c, t;
-	
+
 	t = p[0];
 	c = 1;
 	if(t & T_INDEX)
@@ -200,7 +200,7 @@ void*
 emalloc(uint32_t n)
 {
 	void *v;
-	
+
 	v = mallocz(n, 1);
 	if(v == nil)
 		sysfatal("out of memory");
@@ -244,7 +244,7 @@ openobj(char *name)
 {
 	Dir *d;
 	Obj *obj;
-	
+
 	obj = emalloc(sizeof *obj);
 	obj->name = name;
 	obj->version = version++;
@@ -263,7 +263,7 @@ void
 walkobjs(void (*fn)(int, Sym*, uint8_t*, int))
 {
 	int i;
-	
+
 	for(i=0; i<nobj; i++)
 		walkobj(obj[i], fn);
 }
@@ -291,7 +291,7 @@ walkobj(Obj *obj, void (*fn)(int, Sym*, uint8_t*, int))
 			p += 4+strlen(sym->name)+1;
 			fn(op, sym, p0, p-p0);
 			break;
-		
+
 		default:
 			p += 6;
 			p += zaddr(p, &sym);

+ 2 - 2
sys/src/cmd/aux/9pcon.c

@@ -52,7 +52,7 @@ watch(int fd)
 	int n;
 	uint8_t *buf;
 	Fcall f;
-	
+
 	buf = malloc(messagesize);
 	if(buf == nil)
 		sysfatal("out of memory");
@@ -315,7 +315,7 @@ shell9p(int fd)
 		print("\t-> %F\n", &t);
 	}
 }
-		
+
 void
 main(int argc, char **argv)
 {

+ 5 - 5
sys/src/cmd/aux/apm.c

@@ -119,7 +119,7 @@ apmevent(int e)
 
 	if(0 <= e && e < nelem(eventstr) && eventstr[e])
 		return eventstr[e];
-	
+
 	sprint(buf, "event 0x%x", (uint)e);
 	return buf;
 }
@@ -281,7 +281,7 @@ acstatus(int a)
 {
 	return xstatus(acstatusstr, nelem(acstatusstr), a);
 }
-	  
+
 static int
 apmversion(Apm *apm)
 {
@@ -765,7 +765,7 @@ batteryread(Req *r)
 		p += snprint(p, ep-p, "%s %d %d\n",
 			batterystatus(apm.battery[i].status),
 			apm.battery[i].percent, apm.battery[i].time);
-	
+
 	readstr(r, buf);
 	respond(r, nil);
 }
@@ -889,9 +889,9 @@ ctlread(Req *r)
 
 	p += snprint(p, ep-p, "ac %s\n", acstatus(apm.acstatus));
 	p += snprint(p, ep-p, "capabilities");
-	if(apm.capabilities & CapStandby) 
+	if(apm.capabilities & CapStandby)
 		p += snprint(p, ep-p, " standby");
-	if(apm.capabilities & CapSuspend) 
+	if(apm.capabilities & CapSuspend)
 		p += snprint(p, ep-p, " suspend");
 	if(apm.capabilities & CapSlowCpu)
 		p += snprint(p, ep-p, " slowcpu");

+ 1 - 1
sys/src/cmd/aux/astarld.c

@@ -165,7 +165,7 @@ main(int argc, char **argv)
 		mfd = open(file, ORDWR);
 		if(mfd < 0)
 			sysfatal("opening %s", file);
-	
+
 		if(write(cfd, "download", 8) != 8)
 			sysfatal("requesting download: %r");
 	} else {

+ 2 - 2
sys/src/cmd/aux/cddb.c

@@ -130,7 +130,7 @@ cddbfilltoc(Toc *t)
 
 	/*
 	 *	Protocol level 6 is the same as level 5 except that
-	 *	the character set is now UTF-8 instead of ISO-8859-1. 
+	 *	the character set is now UTF-8 instead of ISO-8859-1.
  	 */
 	fprint(fd, "proto 6\r\n");
 	DPRINT(2, "proto 6\r\n");
@@ -217,7 +217,7 @@ DPRINT(2, "cddb %s\n", p);
 
 				t->track[i].title = append(t->track[i].title, estrdup(p));
 			}
-		} 
+		}
 	} while(*p != '.');
 
 	fprint(fd, "quit\r\n");

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