Hi tech@,
Here is a diff to use C99 initializers in wsdisplay_font struct
definitions for Spleen kernel fonts.
Comments? OK?
Index: sys/dev/wsfont/spleen12x24.h
===================================================================
RCS file: /cvs/src/sys/dev/wsfont/spleen12x24.h,v
retrieving revision 1.6
diff -u -p -r1.6 spleen12x24.h
--- sys/dev/wsfont/spleen12x24.h 21 Jun 2020 19:03:29 -0000 1.6
+++ sys/dev/wsfont/spleen12x24.h 22 Jun 2020 09:44:40 -0000
@@ -29,18 +29,18 @@
static u_char spleen12x24_data[];
struct wsdisplay_font spleen12x24 = {
- "Spleen 12x24", /* typeface name */
- 0, /* index */
- ' ', /* firstchar */
- 256 - ' ', /* numchars */
- WSDISPLAY_FONTENC_ISO, /* encoding */
- 12, /* width */
- 24, /* height */
- 2, /* stride */
- WSDISPLAY_FONTORDER_L2R, /* bit order */
- WSDISPLAY_FONTORDER_L2R, /* byte order */
- NULL, /* cookie */
- spleen12x24_data /* data */
+ .name = "Spleen 12x24",
+ .index = 0,
+ .firstchar = ' ',
+ .numchars = 256 - ' ',
+ .encoding = WSDISPLAY_FONTENC_ISO,
+ .fontwidth = 12,
+ .fontheight = 24,
+ .stride = 2,
+ .bitorder = WSDISPLAY_FONTORDER_L2R,
+ .byteorder = WSDISPLAY_FONTORDER_L2R,
+ .cookie = NULL,
+ .data = spleen12x24_data
};
static u_char spleen12x24_data[] = {
Index: sys/dev/wsfont/spleen16x32.h
===================================================================
RCS file: /cvs/src/sys/dev/wsfont/spleen16x32.h,v
retrieving revision 1.5
diff -u -p -r1.5 spleen16x32.h
--- sys/dev/wsfont/spleen16x32.h 21 Jun 2020 19:03:29 -0000 1.5
+++ sys/dev/wsfont/spleen16x32.h 22 Jun 2020 09:44:40 -0000
@@ -29,18 +29,18 @@
static u_char spleen16x32_data[];
struct wsdisplay_font spleen16x32 = {
- "Spleen 16x32", /* typeface name */
- 0, /* index */
- ' ', /* firstchar */
- 256 - ' ', /* numchars */
- WSDISPLAY_FONTENC_ISO, /* encoding */
- 16, /* width */
- 32, /* height */
- 2, /* stride */
- WSDISPLAY_FONTORDER_L2R, /* bit order */
- WSDISPLAY_FONTORDER_L2R, /* byte order */
- NULL, /* cookie */
- spleen16x32_data /* data */
+ .name = "Spleen 16x32",
+ .index = 0,
+ .firstchar = ' ',
+ .numchars = 256 - ' ',
+ .encoding = WSDISPLAY_FONTENC_ISO,
+ .fontwidth = 16,
+ .fontheight = 32,
+ .stride = 2,
+ .bitorder = WSDISPLAY_FONTORDER_L2R,
+ .byteorder = WSDISPLAY_FONTORDER_L2R,
+ .cookie = NULL,
+ .data = spleen16x32_data
};
static u_char spleen16x32_data[] = {
Index: sys/dev/wsfont/spleen32x64.h
===================================================================
RCS file: /cvs/src/sys/dev/wsfont/spleen32x64.h,v
retrieving revision 1.6
diff -u -p -r1.6 spleen32x64.h
--- sys/dev/wsfont/spleen32x64.h 21 Jun 2020 19:03:29 -0000 1.6
+++ sys/dev/wsfont/spleen32x64.h 22 Jun 2020 09:44:41 -0000
@@ -29,18 +29,18 @@
static u_char spleen32x64_data[];
struct wsdisplay_font spleen32x64 = {
- "Spleen 32x64", /* typeface name */
- 0, /* index */
- ' ', /* firstchar */
- 256 - ' ', /* numchars */
- WSDISPLAY_FONTENC_ISO, /* encoding */
- 32, /* width */
- 64, /* height */
- 4, /* stride */
- WSDISPLAY_FONTORDER_L2R, /* bit order */
- WSDISPLAY_FONTORDER_L2R, /* byte order */
- NULL, /* cookie */
- spleen32x64_data /* data */
+ .name = "Spleen 32x64",
+ .index = 0,
+ .firstchar = ' ',
+ .numchars = 256 - ' ',
+ .encoding = WSDISPLAY_FONTENC_ISO,
+ .fontwidth = 32,
+ .fontheight = 64,
+ .stride = 4,
+ .bitorder = WSDISPLAY_FONTORDER_L2R,
+ .byteorder = WSDISPLAY_FONTORDER_L2R,
+ .cookie = NULL,
+ .data = spleen32x64_data
};
static u_char spleen32x64_data[] = {
Index: sys/dev/wsfont/spleen5x8.h
===================================================================
RCS file: /cvs/src/sys/dev/wsfont/spleen5x8.h,v
retrieving revision 1.5
diff -u -p -r1.5 spleen5x8.h
--- sys/dev/wsfont/spleen5x8.h 21 Jun 2020 19:03:29 -0000 1.5
+++ sys/dev/wsfont/spleen5x8.h 22 Jun 2020 09:44:41 -0000
@@ -29,18 +29,18 @@
static u_char spleen5x8_data[];
struct wsdisplay_font spleen5x8 = {
- "Spleen 5x8", /* typeface name */
- 0, /* index */
- ' ', /* firstchar */
- 128 - ' ', /* numchars */
- WSDISPLAY_FONTENC_ISO, /* encoding */
- 5, /* width */
- 8, /* height */
- 1, /* stride */
- WSDISPLAY_FONTORDER_L2R, /* bit order */
- WSDISPLAY_FONTORDER_L2R, /* byte order */
- NULL, /* cookie */
- spleen5x8_data /* data */
+ .name = "Spleen 5x8",
+ .index = 0,
+ .firstchar = ' ',
+ .numchars = 128 - ' ',
+ .encoding = WSDISPLAY_FONTENC_ISO,
+ .fontwidth = 5,
+ .fontheight = 8,
+ .stride = 1,
+ .bitorder = WSDISPLAY_FONTORDER_L2R,
+ .byteorder = WSDISPLAY_FONTORDER_L2R,
+ .cookie = NULL,
+ .data = spleen5x8_data
};
static u_char spleen5x8_data[] = {
Index: sys/dev/wsfont/spleen8x16.h
===================================================================
RCS file: /cvs/src/sys/dev/wsfont/spleen8x16.h,v
retrieving revision 1.4
diff -u -p -r1.4 spleen8x16.h
--- sys/dev/wsfont/spleen8x16.h 21 Jun 2020 19:03:29 -0000 1.4
+++ sys/dev/wsfont/spleen8x16.h 22 Jun 2020 09:44:41 -0000
@@ -29,18 +29,18 @@
static u_char spleen8x16_data[];
struct wsdisplay_font spleen8x16 = {
- "Spleen 8x16", /* typeface name */
- 0, /* index */
- ' ', /* firstchar */
- 256 - ' ', /* numchars */
- WSDISPLAY_FONTENC_ISO, /* encoding */
- 8, /* width */
- 16, /* height */
- 1, /* stride */
- WSDISPLAY_FONTORDER_L2R, /* bit order */
- WSDISPLAY_FONTORDER_L2R, /* byte order */
- NULL, /* cookie */
- spleen8x16_data /* data */
+ .name = "Spleen 8x16",
+ .index = 0,
+ .firstchar = ' ',
+ .numchars = 256 - ' ',
+ .encoding = WSDISPLAY_FONTENC_ISO,
+ .fontwidth = 8,
+ .fontheight = 16,
+ .stride = 1,
+ .bitorder = WSDISPLAY_FONTORDER_L2R,
+ .byteorder = WSDISPLAY_FONTORDER_L2R,
+ .cookie = NULL,
+ .data = spleen8x16_data
};
static u_char spleen8x16_data[] = {