Browse Source

clang: we can now build all of userland and boot

usbd dies with a suicide, as it seems to try to use floating point
in a note handler, oops. I bet there is a memcpy and clang generates
code to use xmm.

I remove the call to build libz/regression.json because clang got upset
with it.

There are many warnings, still, but at least we can build. I am going to get the warnings
fixed tonight/tomorrow and then add clang to the travis test matrix.

Signed-off-by: Ronald G. Minnich <rminnich@gmail.com>
Ronald G. Minnich 8 years ago
parent
commit
175b16f42f

+ 80 - 80
sys/src/9/boot/console.c

@@ -51,102 +51,102 @@ static Keybscan kbscan;
 
 static Rune kbtab[256] =
 {
-[0x00]	No,	'\x1b',	'1',	'2',	'3',	'4',	'5',	'6',
-[0x08]	'7',	'8',	'9',	'0',	'-',	'=',	'\b',	'\t',
-[0x10]	'q',	'w',	'e',	'r',	't',	'y',	'u',	'i',
-[0x18]	'o',	'p',	'[',	']',	'\n',	Ctrl,	'a',	's',
-[0x20]	'd',	'f',	'g',	'h',	'j',	'k',	'l',	';',
-[0x28]	'\'',	'`',	Shift,	'\\',	'z',	'x',	'c',	'v',
-[0x30]	'b',	'n',	'm',	',',	'.',	'/',	Shift,	'*',
-[0x38]	Alt,	' ',	Ctrl,	KF|1,	KF|2,	KF|3,	KF|4,	KF|5,
-[0x40]	KF|6,	KF|7,	KF|8,	KF|9,	KF|10,	Num,	Scroll,	'7',
-[0x48]	'8',	'9',	'-',	'4',	'5',	'6',	'+',	'1',
-[0x50]	'2',	'3',	'0',	'.',	No,	No,	No,	KF|11,
-[0x58]	KF|12,	No,	No,	No,	No,	No,	No,	No,
-[0x60]	No,	No,	No,	No,	No,	No,	No,	No,
-[0x68]	No,	No,	No,	No,	No,	No,	No,	No,
-[0x70]	No,	No,	No,	No,	No,	No,	No,	No,
-[0x78]	No,	View,	No,	Up,	No,	No,	No,	No,
+[0x00] =	No,	'\x1b',	'1',	'2',	'3',	'4',	'5',	'6',
+[0x08] =	'7',	'8',	'9',	'0',	'-',	'=',	'\b',	'\t',
+[0x10] =	'q',	'w',	'e',	'r',	't',	'y',	'u',	'i',
+[0x18] =	'o',	'p',	'[',	']',	'\n',	Ctrl,	'a',	's',
+[0x20] =	'd',	'f',	'g',	'h',	'j',	'k',	'l',	';',
+[0x28] =	'\'',	'`',	Shift,	'\\',	'z',	'x',	'c',	'v',
+[0x30] =	'b',	'n',	'm',	',',	'.',	'/',	Shift,	'*',
+[0x38] =	kbAlt,	' ',	Ctrl,	KF|1,	KF|2,	KF|3,	KF|4,	KF|5,
+[0x40] =	KF|6,	KF|7,	KF|8,	KF|9,	KF|10,	Num,	Scroll,	'7',
+[0x48] =	'8',	'9',	'-',	'4',	'5',	'6',	'+',	'1',
+[0x50] =	'2',	'3',	'0',	'.',	No,	No,	No,	KF|11,
+[0x58] =	KF|12,	No,	No,	No,	No,	No,	No,	No,
+[0x60] =	No,	No,	No,	No,	No,	No,	No,	No,
+[0x68] =	No,	No,	No,	No,	No,	No,	No,	No,
+[0x70] =	No,	No,	No,	No,	No,	No,	No,	No,
+[0x78] =	No,	View,	No,	Up,	No,	No,	No,	No,
 };
 
 static Rune kbtabshift[256] =
 {
-[0x00]	No,	'\x1b',	'!',	'@',	'#',	'$',	'%',	'^',
-[0x08]	'&',	'*',	'(',	')',	'_',	'+',	'\b',	'\t',
-[0x10]	'Q',	'W',	'E',	'R',	'T',	'Y',	'U',	'I',
-[0x18]	'O',	'P',	'{',	'}',	'\n',	Ctrl,	'A',	'S',
-[0x20]	'D',	'F',	'G',	'H',	'J',	'K',	'L',	':',
-[0x28]	'"',	'~',	Shift,	'|',	'Z',	'X',	'C',	'V',
-[0x30]	'B',	'N',	'M',	'<',	'>',	'?',	Shift,	'*',
-[0x38]	Alt,	' ',	Ctrl,	KF|1,	KF|2,	KF|3,	KF|4,	KF|5,
-[0x40]	KF|6,	KF|7,	KF|8,	KF|9,	KF|10,	Num,	Scroll,	'7',
-[0x48]	'8',	'9',	'-',	'4',	'5',	'6',	'+',	'1',
-[0x50]	'2',	'3',	'0',	'.',	No,	No,	No,	KF|11,
-[0x58]	KF|12,	No,	No,	No,	No,	No,	No,	No,
-[0x60]	No,	No,	No,	No,	No,	No,	No,	No,
-[0x68]	No,	No,	No,	No,	No,	No,	No,	No,
-[0x70]	No,	No,	No,	No,	No,	No,	No,	No,
-[0x78]	No,	Up,	No,	Up,	No,	No,	No,	No,
+[0x00] =	No,	'\x1b',	'!',	'@',	'#',	'$',	'%',	'^',
+[0x08] =	'&',	'*',	'(',	')',	'_',	'+',	'\b',	'\t',
+[0x10] =	'Q',	'W',	'E',	'R',	'T',	'Y',	'U',	'I',
+[0x18] =	'O',	'P',	'{',	'}',	'\n',	Ctrl,	'A',	'S',
+[0x20] =	'D',	'F',	'G',	'H',	'J',	'K',	'L',	':',
+[0x28] =	'"',	'~',	Shift,	'|',	'Z',	'X',	'C',	'V',
+[0x30] =	'B',	'N',	'M',	'<',	'>',	'?',	Shift,	'*',
+[0x38] =	kbAlt,	' ',	Ctrl,	KF|1,	KF|2,	KF|3,	KF|4,	KF|5,
+[0x40] =	KF|6,	KF|7,	KF|8,	KF|9,	KF|10,	Num,	Scroll,	'7',
+[0x48] =	'8',	'9',	'-',	'4',	'5',	'6',	'+',	'1',
+[0x50] =	'2',	'3',	'0',	'.',	No,	No,	No,	KF|11,
+[0x58] =	KF|12,	No,	No,	No,	No,	No,	No,	No,
+[0x60] =	No,	No,	No,	No,	No,	No,	No,	No,
+[0x68] =	No,	No,	No,	No,	No,	No,	No,	No,
+[0x70] =	No,	No,	No,	No,	No,	No,	No,	No,
+[0x78] =	No,	Up,	No,	Up,	No,	No,	No,	No,
 };
 
 static Rune kbtabesc1[256] =
 {
-[0x00]	No,	No,	No,	No,	No,	No,	No,	No,
-[0x08]	No,	No,	No,	No,	No,	No,	No,	No,
-[0x10]	No,	No,	No,	No,	No,	No,	No,	No,
-[0x18]	No,	No,	No,	No,	'\n',	Ctrl,	No,	No,
-[0x20]	No,	No,	No,	No,	No,	No,	No,	No,
-[0x28]	No,	No,	Shift,	No,	No,	No,	No,	No,
-[0x30]	No,	No,	No,	No,	No,	'/',	No,	Print,
-[0x38]	Altgr,	No,	No,	No,	No,	No,	No,	No,
-[0x40]	No,	No,	No,	No,	No,	No,	Break,	Home,
-[0x48]	Up,	Pgup,	No,	Left,	No,	Right,	No,	End,
-[0x50]	Down,	Pgdown,	Ins,	Del,	No,	No,	No,	No,
-[0x58]	No,	No,	No,	No,	No,	No,	No,	No,
-[0x60]	No,	No,	No,	No,	No,	No,	No,	No,
-[0x68]	No,	No,	No,	No,	No,	No,	No,	No,
-[0x70]	No,	No,	No,	No,	No,	No,	No,	No,
-[0x78]	No,	Up,	No,	No,	No,	No,	No,	No,
+[0x00] =	No,	No,	No,	No,	No,	No,	No,	No,
+[0x08] =	No,	No,	No,	No,	No,	No,	No,	No,
+[0x10] =	No,	No,	No,	No,	No,	No,	No,	No,
+[0x18] =	No,	No,	No,	No,	'\n',	Ctrl,	No,	No,
+[0x20] =	No,	No,	No,	No,	No,	No,	No,	No,
+[0x28] =	No,	No,	Shift,	No,	No,	No,	No,	No,
+[0x30] =	No,	No,	No,	No,	No,	'/',	No,	Print,
+[0x38] =	Altgr,	No,	No,	No,	No,	No,	No,	No,
+[0x40] =	No,	No,	No,	No,	No,	No,	Break,	Home,
+[0x48] =	Up,	Pgup,	No,	Left,	No,	Right,	No,	End,
+[0x50] =	Down,	Pgdown,	Ins,	Del,	No,	No,	No,	No,
+[0x58] =	No,	No,	No,	No,	No,	No,	No,	No,
+[0x60] =	No,	No,	No,	No,	No,	No,	No,	No,
+[0x68] =	No,	No,	No,	No,	No,	No,	No,	No,
+[0x70] =	No,	No,	No,	No,	No,	No,	No,	No,
+[0x78] =	No,	Up,	No,	No,	No,	No,	No,	No,
 };
 
 static Rune kbtabaltgr[256] =
 {
-[0x00]	No,	No,	No,	No,	No,	No,	No,	No,
-[0x08]	No,	No,	No,	No,	No,	No,	No,	No,
-[0x10]	No,	No,	No,	No,	No,	No,	No,	No,
-[0x18]	No,	No,	No,	No,	'\n',	Ctrl,	No,	No,
-[0x20]	No,	No,	No,	No,	No,	No,	No,	No,
-[0x28]	No,	No,	Shift,	No,	No,	No,	No,	No,
-[0x30]	No,	No,	No,	No,	No,	'/',	No,	Print,
-[0x38]	Altgr,	No,	No,	No,	No,	No,	No,	No,
-[0x40]	No,	No,	No,	No,	No,	No,	Break,	Home,
-[0x48]	Up,	Pgup,	No,	Left,	No,	Right,	No,	End,
-[0x50]	Down,	Pgdown,	Ins,	Del,	No,	No,	No,	No,
-[0x58]	No,	No,	No,	No,	No,	No,	No,	No,
-[0x60]	No,	No,	No,	No,	No,	No,	No,	No,
-[0x68]	No,	No,	No,	No,	No,	No,	No,	No,
-[0x70]	No,	No,	No,	No,	No,	No,	No,	No,
-[0x78]	No,	Up,	No,	No,	No,	No,	No,	No,
+[0x00] =	No,	No,	No,	No,	No,	No,	No,	No,
+[0x08] =	No,	No,	No,	No,	No,	No,	No,	No,
+[0x10] =	No,	No,	No,	No,	No,	No,	No,	No,
+[0x18] =	No,	No,	No,	No,	'\n',	Ctrl,	No,	No,
+[0x20] =	No,	No,	No,	No,	No,	No,	No,	No,
+[0x28] =	No,	No,	Shift,	No,	No,	No,	No,	No,
+[0x30] =	No,	No,	No,	No,	No,	'/',	No,	Print,
+[0x38] =	Altgr,	No,	No,	No,	No,	No,	No,	No,
+[0x40] =	No,	No,	No,	No,	No,	No,	Break,	Home,
+[0x48] =	Up,	Pgup,	No,	Left,	No,	Right,	No,	End,
+[0x50] =	Down,	Pgdown,	Ins,	Del,	No,	No,	No,	No,
+[0x58] =	No,	No,	No,	No,	No,	No,	No,	No,
+[0x60] =	No,	No,	No,	No,	No,	No,	No,	No,
+[0x68] =	No,	No,	No,	No,	No,	No,	No,	No,
+[0x70] =	No,	No,	No,	No,	No,	No,	No,	No,
+[0x78] =	No,	Up,	No,	No,	No,	No,	No,	No,
 };
 
 static Rune kbtabctrl[256] =
 {
-[0x00]	No,	'\x1b',	'\x11',	'\x12',	'\x13',	'\x14',	'\x15',	'\x16',
-[0x08]	'\x17',	'\x18',	'\x19',	'\x10',	'\n',	'\x1d',	'\b',	'\t',
-[0x10]	'\x11',	'\x17',	'\x05',	'\x12',	'\x14',	'\x19',	'\x15',	'\t',
-[0x18]	'\x0f',	'\x10',	'\x1b',	'\x1d',	'\n',	Ctrl,	'\x01',	'\x13',
-[0x20]	'\x04',	'\x06',	'\x07',	'\b',	'\n',	'\x0b',	'\x0c',	'\x1b',
-[0x28]	'\x07',	No,	Shift,	'\x1c',	'\x1a',	'\x18',	'\x03',	'\x16',
-[0x30]	'\x02',	'\x0e',	'\n',	'\x0c',	'\x0e',	'\x0f',	Shift,	'\n',
-[0x38]	Alt,	No,	Ctrl,	'\x05',	'\x06',	'\x07',	'\x04',	'\x05',
-[0x40]	'\x06',	'\x07',	'\x0c',	'\n',	'\x0e',	'\x05',	'\x06',	'\x17',
-[0x48]	'\x18',	'\x19',	'\n',	'\x14',	'\x15',	'\x16',	'\x0b',	'\x11',
-[0x50]	'\x12',	'\x13',	'\x10',	'\x0e',	No,	No,	No,	'\x0f',
-[0x58]	'\x0c',	No,	No,	No,	No,	No,	No,	No,
-[0x60]	No,	No,	No,	No,	No,	No,	No,	No,
-[0x68]	No,	No,	No,	No,	No,	No,	No,	No,
-[0x70]	No,	No,	No,	No,	No,	No,	No,	No,
-[0x78]	No,	'\x07',	No,	'\b',	No,	No,	No,	No,
+[0x00] =	No,	'\x1b',	'\x11',	'\x12',	'\x13',	'\x14',	'\x15',	'\x16',
+[0x08] =	'\x17',	'\x18',	'\x19',	'\x10',	'\n',	'\x1d',	'\b',	'\t',
+[0x10] =	'\x11',	'\x17',	'\x05',	'\x12',	'\x14',	'\x19',	'\x15',	'\t',
+[0x18] =	'\x0f',	'\x10',	'\x1b',	'\x1d',	'\n',	Ctrl,	'\x01',	'\x13',
+[0x20] =	'\x04',	'\x06',	'\x07',	'\b',	'\n',	'\x0b',	'\x0c',	'\x1b',
+[0x28] =	'\x07',	No,	Shift,	'\x1c',	'\x1a',	'\x18',	'\x03',	'\x16',
+[0x30] =	'\x02',	'\x0e',	'\n',	'\x0c',	'\x0e',	'\x0f',	Shift,	'\n',
+[0x38] =	kbAlt,	No,	Ctrl,	'\x05',	'\x06',	'\x07',	'\x04',	'\x05',
+[0x40] =	'\x06',	'\x07',	'\x0c',	'\n',	'\x0e',	'\x05',	'\x06',	'\x17',
+[0x48] =	'\x18',	'\x19',	'\n',	'\x14',	'\x15',	'\x16',	'\x0b',	'\x11',
+[0x50] =	'\x12',	'\x13',	'\x10',	'\x0e',	No,	No,	No,	'\x0f',
+[0x58] =	'\x0c',	No,	No,	No,	No,	No,	No,	No,
+[0x60] =	No,	No,	No,	No,	No,	No,	No,	No,
+[0x68] =	No,	No,	No,	No,	No,	No,	No,	No,
+[0x70] =	No,	No,	No,	No,	No,	No,	No,	No,
+[0x78] =	No,	'\x07',	No,	'\b',	No,	No,	No,	No,
 };
 
 int

+ 14 - 14
sys/src/libhttpd/fail.c

@@ -23,33 +23,33 @@ struct Error
 
 Error errormsg[] =
 {
-	[HInternal]	{"500 Internal Error", "Internal Error",
+	[HInternal] =	{"500 Internal Error", "Internal Error",
 		"This server could not process your request due to an internal error."},
-	[HTempFail]	{"500 Internal Error", "Temporary Failure",
+	[HTempFail] =	{"500 Internal Error", "Temporary Failure",
 		"The object %s is currently inaccessible.<p>Please try again later."},
-	[HUnimp]	{"501 Not implemented", "Command not implemented",
+	[HUnimp] =	{"501 Not implemented", "Command not implemented",
 		"This server does not implement the %s command."},
-	[HUnkVers]	{"501 Not Implemented", "Unknown http version",
+	[HUnkVers] =	{"501 Not Implemented", "Unknown http version",
 		"This server does not know how to respond to http version %s."},
-	[HBadCont]	{"501 Not Implemented", "Impossible format",
+	[HBadCont] =	{"501 Not Implemented", "Impossible format",
 		"This server cannot produce %s in any of the formats your client accepts."},
-	[HBadReq]	{"400 Bad Request", "Strange Request",
+	[HBadReq] =	{"400 Bad Request", "Strange Request",
 		"Your client sent a query that this server could not understand."},
-	[HSyntax]	{"400 Bad Request", "Garbled Syntax",
+	[HSyntax] =	{"400 Bad Request", "Garbled Syntax",
 		"Your client sent a query with incoherent syntax."},
-	[HBadSearch]	{"400 Bad Request", "Inapplicable Search",
+	[HBadSearch] =	{"400 Bad Request", "Inapplicable Search",
 		"Your client sent a search that cannot be applied to %s."},
-	[HNotFound]	{"404 Not Found", "Object not found",
+	[HNotFound] =	{"404 Not Found", "Object not found",
 		"The object %s does not exist on this server."},
-	[HNoSearch]	{"403 Forbidden", "Search not supported",
+	[HNoSearch] =	{"403 Forbidden", "Search not supported",
 		"The object %s does not support the search command."},
-	[HNoData]	{"403 Forbidden", "No data supplied",
+	[HNoData] =	{"403 Forbidden", "No data supplied",
 		"Search or forms data must be supplied to %s."},
-	[HExpectFail]	{"403 Expectation Failed", "Expectation Failed",
+	[HExpectFail] =	{"403 Expectation Failed", "Expectation Failed",
 		"This server does not support some of your request's expectations."},
-	[HUnauth]	{"403 Forbidden", "Forbidden",
+	[HUnauth] =	{"403 Forbidden", "Forbidden",
 		"You are not allowed to see the object %s."},
-	[HOK]		{"200 OK", "everything is fine"},
+	[HOK] =		{"200 OK", "everything is fine"},
 };
 
 /*

+ 1 - 1
sys/src/libhttpd/parse.c

@@ -695,7 +695,7 @@ static void
 mimecontlen(Hlex *h, char *name)
 {
 	char *e;
-	uint32_t v;
+	unsigned long v;
 
 	if(lex(h) != Word)
 		return;

+ 1 - 1
sys/src/liblex/yyless.c

@@ -18,7 +18,7 @@ extern	int	yyprevious;
 void	yyunput(int c);
 
 void
-yyless(uintptr_t x)
+yyless(long x)
 {
 	char *lastch, *ptr;
 

File diff suppressed because it is too large
+ 812 - 812
sys/src/libmach/8db.c


+ 1 - 11
sys/src/libmach/obj.c

@@ -62,17 +62,7 @@ struct	Obj		/* functions to handle each intermediate (.$O) file */
 
 static Obj	obj[] =
 {			/* functions to identify and parse each type of obj */
-//	[Obj68020]	"68020 .2",	_is2, _read2,
-	[ObjAmd64]	"amd64 .6",	_is6, _read6,
-//	[ObjArm]	"arm .5",	_is5, _read5,
-//	[ObjAlpha]	"alpha .7",	_is7, _read7,
-//	[Obj386]	"386 .8",	_is8, _read8,
-//	[ObjSparc]	"sparc .k",	_isk, _readk,
-//	[ObjPower]	"power .q",	_isq, _readq,
-//	[ObjMips]	"mips .v",	_isv, _readv,
-//	[ObjSparc64]	"sparc64 .u",	_isu, _readu,
-//	[ObjPower64]	"power64 .9",	_is9, _read9,
-	[Maxobjtype]	0, 0
+	[Maxobjtype ]=	0, 0
 };
 
 struct	Symtab

+ 1 - 1
sys/src/libndb/ndbreorder.c

@@ -47,7 +47,7 @@ ndbreorder(Ndbtuple *t, Ndbtuple *x)
 	if(x != last->line){
 
 		/* find entry before x */
-		for(prev = last; prev->line != x; prev = prev->line);
+		for(prev = last; prev->line != x; prev = prev->line)
 			;
 
 		/* detach line */

+ 2 - 1
sys/src/libregexp/regcomp.c

@@ -26,7 +26,8 @@ struct Node
 }Node;
 
 /* max character classes per program is nelem(reprog->class) */
-static Reprog	*reprog;
+/* TODO: why does clang think this is never used if we declare it static? */
+/*static */Reprog	*reprog;
 
 /* max rune ranges per character class is nelem(classp->spans)/2 */
 #define NCCRUNE	nelem(classp->spans)

+ 0 - 7
sys/src/libstdio/dtoa.c

@@ -626,13 +626,6 @@ static const double
 bigtens[] = { 
 	1e16, 1e32, 1e64, 1e128, 1e256 };
 
-static const double tinytens[] = { 
-	1e-16, 1e-32, 1e-64, 1e-128,
-	9007199254740992.e-256
-};
-
-/* The factor of 2^53 in tinytens[4] helps us avoid setting the underflow */
-/* flag unnecessarily.  It leads to a song and dance at the end of strtod. */
 #define Scale_Bit 0x10
 #define n_bigtens 5
 

+ 1 - 1
sys/src/libstdio/vfprintf.c

@@ -297,7 +297,7 @@ ocvt_fixed(FILE *f, va_list *args, int flags, int width, int precision,
 	char digits[128];	/* no reasonable machine will ever overflow this */
 	char *sign;
 	char *dp;
-	int32_t snum;
+	int64_t snum;
 	unsigned long num;
 	int nout, npad, nlzero;
 

+ 13 - 13
sys/src/libusb/audio/audiofs.c

@@ -119,19 +119,19 @@ char	*rflush(Fid*), *rauth(Fid*),
 	*rversion(Fid*);
 
 char 	*(*fcalls[])(Fid*) = {
-	[Tflush]	rflush,
-	[Tversion]	rversion,
-	[Tauth]		rauth,
-	[Tattach]	rattach,
-	[Twalk]		rwalk,
-	[Topen]		ropen,
-	[Tcreate]	rcreate,
-	[Tread]		rread,
-	[Twrite]	rwrite,
-	[Tclunk]	rclunk,
-	[Tremove]	rremove,
-	[Tstat]		rstat,
-	[Twstat]	rwstat,
+	[Tflush] =	rflush,
+	[Tversion] =	rversion,
+	[Tauth] =		rauth,
+	[Tattach] =	rattach,
+	[Twalk] =		rwalk,
+	[Topen] =		ropen,
+	[Tcreate] =	rcreate,
+	[Tread] =		rread,
+	[Twrite] =	rwrite,
+	[Tclunk] =	rclunk,
+	[Tremove] =	rremove,
+	[Tstat] =		rstat,
+	[Twstat] =	rwstat,
 };
 
 char	Eperm[] =	"permission denied";

+ 4 - 4
sys/src/libusb/disk/disk.c

@@ -42,10 +42,10 @@ struct Dirtab
 
 static Dirtab dirtab[] =
 {
-	[Qdir]	"/",	DMDIR|0555,
-	[Qctl]	"ctl",	0664,		/* nothing secret here */
-	[Qraw]	"raw",	0640,
-	[Qdata]	"data",	0640,
+	[Qdir] =	"/",	DMDIR|0555,
+	[Qctl] =	"ctl",	0664,		/* nothing secret here */
+	[Qraw] =	"raw",	0640,
+	[Qdata] =	"data",	0640,
 };
 
 /*

+ 36 - 36
sys/src/libusb/disk/scsireq.c

@@ -42,42 +42,42 @@ extern int exabyte, force6bytecmds;
 static int debug = Debug;
 
 static char *scmdnames[256] = {
-[ScmdTur]	"Tur",
-[ScmdRewind]	"Rewind",
-[ScmdRsense]	"Rsense",
-[ScmdFormat]	"Format",
-[ScmdRblimits]	"Rblimits",
-[ScmdRead]	"Read",
-[ScmdWrite]	"Write",
-[ScmdSeek]	"Seek",
-[ScmdFmark]	"Fmark",
-[ScmdSpace]	"Space",
-[ScmdInq]	"Inq",
-[ScmdMselect6]	"Mselect6",
-[ScmdMselect10]	"Mselect10",
-[ScmdMsense6]	"Msense6",
-[ScmdMsense10]	"Msense10",
-[ScmdStart]	"Start",
-[ScmdRcapacity]	"Rcapacity",
-[ScmdRcapacity16]	"Rcap16",
-[ScmdExtread]	"Extread",
-[ScmdExtwrite]	"Extwrite",
-[ScmdExtseek]	"Extseek",
-
-[ScmdSynccache]	"Synccache",
-[ScmdRTOC]	"RTOC",
-[ScmdRdiscinfo]	"Rdiscinfo",
-[ScmdRtrackinfo]	"Rtrackinfo",
-[ScmdReserve]	"Reserve",
-[ScmdBlank]	"Blank",
-
-[ScmdCDpause]	"CDpause",
-[ScmdCDstop]	"CDstop",
-[ScmdCDplay]	"CDplay",
-[ScmdCDload]	"CDload",
-[ScmdCDscan]	"CDscan",
-[ScmdCDstatus]	"CDstatus",
-[Scmdgetconf]	"getconf",
+[ScmdTur] =	"Tur",
+[ScmdRewind] =	"Rewind",
+[ScmdRsense] =	"Rsense",
+[ScmdFormat] =	"Format",
+[ScmdRblimits] =	"Rblimits",
+[ScmdRead] =	"Read",
+[ScmdWrite] =	"Write",
+[ScmdSeek] =	"Seek",
+[ScmdFmark] =	"Fmark",
+[ScmdSpace] =	"Space",
+[ScmdInq] =	"Inq",
+[ScmdMselect6] =	"Mselect6",
+[ScmdMselect10] =	"Mselect10",
+[ScmdMsense6] =	"Msense6",
+[ScmdMsense10] =	"Msense10",
+[ScmdStart] =	"Start",
+[ScmdRcapacity] =	"Rcapacity",
+[ScmdRcapacity16] =	"Rcap16",
+[ScmdExtread] =	"Extread",
+[ScmdExtwrite] =	"Extwrite",
+[ScmdExtseek] =	"Extseek",
+
+[ScmdSynccache] =	"Synccache",
+[ScmdRTOC] =	"RTOC",
+[ScmdRdiscinfo] =	"Rdiscinfo",
+[ScmdRtrackinfo] =	"Rtrackinfo",
+[ScmdReserve] =	"Reserve",
+[ScmdBlank] =	"Blank",
+
+[ScmdCDpause] =	"CDpause",
+[ScmdCDstop] =	"CDstop",
+[ScmdCDplay] =	"CDplay",
+[ScmdCDload] =	"CDload",
+[ScmdCDscan] =	"CDscan",
+[ScmdCDstatus] =	"CDstatus",
+[Scmdgetconf] =	"getconf",
 };
 
 int32_t

+ 32 - 32
sys/src/libusb/kb/kb.c

@@ -80,38 +80,38 @@ struct Kin
  */
 static char sctab[256] =
 {
-[0x00]	0x0,	0x0,	0x0,	0x0,	0x1e,	0x30,	0x2e,	0x20,
-[0x08]	0x12,	0x21,	0x22,	0x23,	0x17,	0x24,	0x25,	0x26,
-[0x10]	0x32,	0x31,	0x18,	0x19,	0x10,	0x13,	0x1f,	0x14,
-[0x18]	0x16,	0x2f,	0x11,	0x2d,	0x15,	0x2c,	0x2,	0x3,
-[0x20]	0x4,	0x5,	0x6,	0x7,	0x8,	0x9,	0xa,	0xb,
-[0x28]	0x1c,	0x1,	0xe,	0xf,	0x39,	0xc,	0xd,	0x1a,
-[0x30]	0x1b,	0x2b,	0x2b,	0x27,	0x28,	0x29,	0x33,	0x34,
-[0x38]	0x35,	0x3a,	0x3b,	0x3c,	0x3d,	0x3e,	0x3f,	0x40,
-[0x40]	0x41,	0x42,	0x43,	0x44,	0x57,	0x58,	0x63,	0x46,
-[0x48]	0x77,	0x52,	0x47,	0x49,	0x53,	0x4f,	0x51,	0x4d,
-[0x50]	0x4b,	0x50,	0x48,	0x45,	0x35,	0x37,	0x4a,	0x4e,
-[0x58]	0x1c,	0x4f,	0x50,	0x51,	0x4b,	0x4c,	0x4d,	0x47,
-[0x60]	0x48,	0x49,	0x52,	0x53,	0x56,	0x7f,	0x74,	0x75,
-[0x68]	0x55,	0x59,	0x5a,	0x5b,	0x5c,	0x5d,	0x5e,	0x5f,
-[0x70]	0x78,	0x79,	0x7a,	0x7b,	0x0,	0x0,	0x0,	0x0,
-[0x78]	0x0,	0x0,	0x0,	0x0,	0x0,	0x0,	0x0,	0x71,
-[0x80]	0x73,	0x72,	0x0,	0x0,	0x0,	0x7c,	0x0,	0x0,
-[0x88]	0x0,	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
+[0xd8] =	0x0,	0x0,	0x0,	0x0,	0x0,	0x0,	0x0,	0x0,
+[0xe0] =	0x1d,	0x2a,	0x38,	0x7d,	0x61,	0x36,	0x64,	0x7e,
+[0xe8] =	0x0,	0x0,	0x0,	0x0,	0x0,	0x73,	0x72,	0x71,
+[0xf0] =	0x0,	0x0,	0x0,	0x0,	0x0,	0x0,	0x0,	0x0,
+[0xf8] =	0x0,	0x0,	0x0,	0x0,	0x0,	0x0,	0x0,	0x0,
 };
 
 static QLock inlck;

+ 13 - 13
sys/src/libusb/lib/fs.c

@@ -532,19 +532,19 @@ fsflush(Rpc *r)
 }
 
 Rpc* (*fscalls[])(Rpc*) = {
-	[Tversion]	fsversion,
-	[Tauth]		fsno,
-	[Tattach]	fsattach,
-	[Twalk]		fswalk,
-	[Topen]		fsopen,
-	[Tcreate]	fsno,
-	[Tread]		fsread,
-	[Twrite]	fswrite,
-	[Tclunk]	fsclunk,
-	[Tremove]	fsno,
-	[Tstat]		fsstat,
-	[Twstat]	fsno,
-	[Tflush]	fsflush,
+	[Tversion] =	fsversion,
+	[Tauth] =		fsno,
+	[Tattach] =	fsattach,
+	[Twalk] =		fswalk,
+	[Topen] =		fsopen,
+	[Tcreate] =	fsno,
+	[Tread] =		fsread,
+	[Twrite] =	fswrite,
+	[Tclunk] =	fsclunk,
+	[Tremove] =	fsno,
+	[Tstat] =		fsstat,
+	[Twstat] =	fsno,
+	[Tflush] =	fsflush,
 };
 
 static void

+ 3 - 3
sys/src/libusb/serial/serial.c

@@ -41,9 +41,9 @@ struct Dirtab {
 };
 
 static Dirtab dirtab[] = {
-	[Qroot]	"/",		DMDIR|0555,
-	[Qdata]	"%s",		0660,
-	[Qctl]	"%sctl",	0664,
+	[Qroot] =	"/",		DMDIR|0555,
+	[Qdata] =	"%s",		0660,
+	[Qctl] =	"%sctl",	0664,
 };
 
 /* someday? static int sdebug; */

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