~mcf/drawterm

c5a356510b5e64d703fb5c59bf0a33de28ee7e92 — Michael Forney 4 months ago 284fa7c tip
use C99 designated initializer syntax
5 files changed, 32 insertions(+), 32 deletions(-)

M kern/chan.c
M kern/devssl.c
M kern/devtls.c
M libip/eipfmt.c
M libsec/tlshand.c
M kern/chan.c => kern/chan.c +2 -2
@@ 1513,8 1513,8 @@ char isfrog[256]={
	/*BKS*/	1, 1, 1, 1, 1, 1, 1, 1,
	/*DLE*/	1, 1, 1, 1, 1, 1, 1, 1,
	/*CAN*/	1, 1, 1, 1, 1, 1, 1, 1,
	['/']	1,
	[0x7f]	1,
	['/']	= 1,
	[0x7f]	= 1,
};

/*

M kern/devssl.c => kern/devssl.c +7 -7
@@ 111,13 111,13 @@ static void	dsnew(Chan *c, Dstate **);
static long	sslput(Dstate *s, Block * volatile b);

char *sslnames[] = {
[Qclonus]	"clone",
[Qdata]		"data",
[Qctl]		"ctl",
[Qsecretin]	"secretin",
[Qsecretout]	"secretout",
[Qencalgs]	"encalgs",
[Qhashalgs]	"hashalgs",
[Qclonus]	= "clone",
[Qdata]		= "data",
[Qctl]		= "ctl",
[Qsecretin]	= "secretin",
[Qsecretout]	= "secretout",
[Qencalgs]	= "encalgs",
[Qhashalgs]	= "hashalgs",
};

static int

M kern/devtls.c => kern/devtls.c +8 -8
@@ 258,14 258,14 @@ static char	*tlsstate(int s);
static void	pdump(int, void*, char*);

static char *tlsnames[] = {
[Qclonus]		"clone",
[Qencalgs]	"encalgs",
[Qhashalgs]	"hashalgs",
[Qdata]		"data",
[Qctl]		"ctl",
[Qhand]		"hand",
[Qstatus]		"status",
[Qstats]		"stats",
[Qclonus]	= "clone",
[Qencalgs]	= "encalgs",
[Qhashalgs]	= "hashalgs",
[Qdata]		= "data",
[Qctl]		= "ctl",
[Qhand]		= "hand",
[Qstatus]	= "status",
[Qstats]	= "stats",
};

static int convdir[] = { Qctl, Qdata, Qhand, Qstatus, Qstats };

M libip/eipfmt.c => libip/eipfmt.c +9 -9
@@ 9,15 9,15 @@ enum

uchar prefixvals[256] =
{
[0x00] 0 | Isprefix,
[0x80] 1 | Isprefix,
[0xC0] 2 | Isprefix,
[0xE0] 3 | Isprefix,
[0xF0] 4 | Isprefix,
[0xF8] 5 | Isprefix,
[0xFC] 6 | Isprefix,
[0xFE] 7 | Isprefix,
[0xFF] 8 | Isprefix,
[0x00] = 0 | Isprefix,
[0x80] = 1 | Isprefix,
[0xC0] = 2 | Isprefix,
[0xE0] = 3 | Isprefix,
[0xF0] = 4 | Isprefix,
[0xF8] = 5 | Isprefix,
[0xFC] = 6 | Isprefix,
[0xFE] = 7 | Isprefix,
[0xFF] = 8 | Isprefix,
};

int

M libsec/tlshand.c => libsec/tlshand.c +6 -6
@@ 356,12 356,12 @@ static struct {
	int len;
} hashfun[] = {
/*	[0x00]  is reserved for MD5+SHA1 for < TLS1.2 */
	[0x01]	{md5,		MD5dlen},
	[0x02]	{sha1,		SHA1dlen},
	[0x03]	{sha2_224,	SHA2_224dlen},
	[0x04]	{sha2_256,	SHA2_256dlen},
	[0x05]	{sha2_384,	SHA2_384dlen},
	[0x06]	{sha2_512,	SHA2_512dlen},
	[0x01]	= {md5,		MD5dlen},
	[0x02]	= {sha1,	SHA1dlen},
	[0x03]	= {sha2_224,	SHA2_224dlen},
	[0x04]	= {sha2_256,	SHA2_256dlen},
	[0x05]	= {sha2_384,	SHA2_384dlen},
	[0x06]	= {sha2_512,	SHA2_512dlen},
};

// signature algorithms (only RSA and ECDSA at the moment)