Fri Nov 3 18:42:36 2017 UTC ()
Use c99 initializer for wsemul_ops


(maya)
diff -r1.16 -r1.17 src/sys/dev/wscons/wsemul_dumb.c
diff -r1.31 -r1.32 src/sys/dev/wscons/wsemul_sun.c
diff -r1.39 -r1.40 src/sys/dev/wscons/wsemul_vt100.c

cvs diff -r1.16 -r1.17 src/sys/dev/wscons/wsemul_dumb.c (expand / switch to context diff)
--- src/sys/dev/wscons/wsemul_dumb.c 2017/05/19 19:22:33 1.16
+++ src/sys/dev/wscons/wsemul_dumb.c 2017/11/03 18:42:35 1.17
@@ -1,4 +1,4 @@
-/* $NetBSD: wsemul_dumb.c,v 1.16 2017/05/19 19:22:33 macallan Exp $ */
+/* $NetBSD: wsemul_dumb.c,v 1.17 2017/11/03 18:42:35 maya Exp $ */
 
 /*
  * Copyright (c) 1996, 1997 Christopher G. Demetriou.  All rights reserved.
@@ -31,7 +31,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: wsemul_dumb.c,v 1.16 2017/05/19 19:22:33 macallan Exp $");
+__KERNEL_RCSID(0, "$NetBSD: wsemul_dumb.c,v 1.17 2017/11/03 18:42:35 maya Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -55,16 +55,16 @@
 void	wsemul_dumb_resetop(void *, enum wsemul_resetops);
 
 const struct wsemul_ops wsemul_dumb_ops = {
-	"dumb",
-	wsemul_dumb_cnattach,
-	wsemul_dumb_attach,
-	wsemul_dumb_output,
-	wsemul_dumb_translate,
-	wsemul_dumb_detach,
-	wsemul_dumb_resetop,
-	NULL,	/* getmsgattrs */
-	NULL,	/* setmsgattrs */
-	NULL	/* resize */
+	.name = "dumb",
+	.cnattach = wsemul_dumb_cnattach,
+	.attach = wsemul_dumb_attach,
+	.output = wsemul_dumb_output,
+	.translate = wsemul_dumb_translate,
+	.detach = wsemul_dumb_detach,
+	.reset = wsemul_dumb_resetop,
+	.getmsgattrs = NULL,
+	.setmsgattrs = NULL,
+	.resize = NULL,
 };
 
 struct wsemul_dumb_emuldata {

cvs diff -r1.31 -r1.32 src/sys/dev/wscons/wsemul_sun.c (expand / switch to context diff)
--- src/sys/dev/wscons/wsemul_sun.c 2017/11/03 17:57:58 1.31
+++ src/sys/dev/wscons/wsemul_sun.c 2017/11/03 18:42:35 1.32
@@ -1,4 +1,4 @@
-/* $NetBSD: wsemul_sun.c,v 1.31 2017/11/03 17:57:58 maya Exp $ */
+/* $NetBSD: wsemul_sun.c,v 1.32 2017/11/03 18:42:35 maya Exp $ */
 
 /*
  * Copyright (c) 1996, 1997 Christopher G. Demetriou.  All rights reserved.
@@ -33,7 +33,7 @@
 /* XXX DESCRIPTION/SOURCE OF INFORMATION */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: wsemul_sun.c,v 1.31 2017/11/03 17:57:58 maya Exp $");
+__KERNEL_RCSID(0, "$NetBSD: wsemul_sun.c,v 1.32 2017/11/03 18:42:35 maya Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -58,16 +58,16 @@
 void	wsemul_sun_resetop(void *, enum wsemul_resetops);
 
 const struct wsemul_ops wsemul_sun_ops = {
-	"sun",
-	wsemul_sun_cnattach,
-	wsemul_sun_attach,
-	wsemul_sun_output,
-	wsemul_sun_translate,
-	wsemul_sun_detach,
-	wsemul_sun_resetop,
-	NULL,	/* getmsgattrs */
-	NULL,	/* setmsgattrs */
-	NULL	/* resize */
+	.name = "sun",
+	.cnattach = wsemul_sun_cnattach,
+	.attach = wsemul_sun_attach,
+	.output = wsemul_sun_output,
+	.translate = wsemul_sun_translate,
+	.detach = wsemul_sun_detach,
+	.reset = wsemul_sun_resetop,
+	.getmsgattrs = NULL,
+	.setmsgattrs = NULL,
+	.resize = NULL,
 };
 
 #define	SUN_EMUL_STATE_NORMAL	0	/* normal processing */

cvs diff -r1.39 -r1.40 src/sys/dev/wscons/wsemul_vt100.c (expand / switch to context diff)
--- src/sys/dev/wscons/wsemul_vt100.c 2017/11/03 17:57:58 1.39
+++ src/sys/dev/wscons/wsemul_vt100.c 2017/11/03 18:42:35 1.40
@@ -1,4 +1,4 @@
-/* $NetBSD: wsemul_vt100.c,v 1.39 2017/11/03 17:57:58 maya Exp $ */
+/* $NetBSD: wsemul_vt100.c,v 1.40 2017/11/03 18:42:35 maya Exp $ */
 
 /*
  * Copyright (c) 1998
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: wsemul_vt100.c,v 1.39 2017/11/03 17:57:58 maya Exp $");
+__KERNEL_RCSID(0, "$NetBSD: wsemul_vt100.c,v 1.40 2017/11/03 18:42:35 maya Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_wsmsgattrs.h"
@@ -60,19 +60,19 @@
 static void wsemul_vt100_resize(void *, const struct wsscreen_descr *);
 
 const struct wsemul_ops wsemul_vt100_ops = {
-	"vt100",
-	wsemul_vt100_cnattach,
-	wsemul_vt100_attach,
-	wsemul_vt100_output,
-	wsemul_vt100_translate,
-	wsemul_vt100_detach,
-	wsemul_vt100_resetop,
+	.name = "vt100",
+	.cnattach = wsemul_vt100_cnattach,
+	.attach = wsemul_vt100_attach,
+	.output = wsemul_vt100_output,
+	.translate = wsemul_vt100_translate,
+	.detach = wsemul_vt100_detach,
+	.reset = wsemul_vt100_resetop,
 #ifdef WSDISPLAY_CUSTOM_OUTPUT
-	wsemul_vt100_getmsgattrs,
-	wsemul_vt100_setmsgattrs,
+	.getmsgattrs = wsemul_vt100_getmsgattrs,
+	.setmsgattrs = wsemul_vt100_setmsgattrs,
 #else
-	NULL,
-	NULL,
+	.getmsgattrs = NULL,
+	.setmsgattrs = NULL,
 #endif
 	.resize = wsemul_vt100_resize
 };