Re: sbin/wsconsctl: show more data
Frederic Cambus wrote: > On Mon, Mar 18, 2019 at 08:02:09PM +0200, Artturi Alm wrote: > > > > Revised diff below iterating on what Artturi previously sent, and > > > a snippet of wsconsctl output with the diff applied: > > > > > > display.width=1600 > > > display.height=900 > > > display.depth=32 > > > +display.fontwidth=12 > > > +display.fontheight=24 > > > display.emulations=vt100 > > > display.screentypes=std > > > display.focus=4 > > > > > > [1] https://undeadly.org/cgi?action=article&sid=20131023125815 > > > > > > Comments? OK? > > > > > > > While my opinion is irrelevant, it does look good to me, thanks :] > > Ping. Anyone willing to OK the revised diff? ok with me.
Re: sbin/wsconsctl: show more data
> Date: Wed, 27 Mar 2019 10:43:23 +0100 > From: Frederic Cambus > > On Mon, Mar 18, 2019 at 08:02:09PM +0200, Artturi Alm wrote: > > > > Revised diff below iterating on what Artturi previously sent, and > > > a snippet of wsconsctl output with the diff applied: > > > > > > display.width=1600 > > > display.height=900 > > > display.depth=32 > > > +display.fontwidth=12 > > > +display.fontheight=24 > > > display.emulations=vt100 > > > display.screentypes=std > > > display.focus=4 > > > > > > [1] https://undeadly.org/cgi?action=article&sid=20131023125815 > > > > > > Comments? OK? > > > > > > > While my opinion is irrelevant, it does look good to me, thanks :] > > Ping. Anyone willing to OK the revised diff? > > Would be useful to have this in 6.5. ok kettenis@
Re: sbin/wsconsctl: show more data
On Mon, Mar 18, 2019 at 08:02:09PM +0200, Artturi Alm wrote: > > Revised diff below iterating on what Artturi previously sent, and > > a snippet of wsconsctl output with the diff applied: > > > > display.width=1600 > > display.height=900 > > display.depth=32 > > +display.fontwidth=12 > > +display.fontheight=24 > > display.emulations=vt100 > > display.screentypes=std > > display.focus=4 > > > > [1] https://undeadly.org/cgi?action=article&sid=20131023125815 > > > > Comments? OK? > > > > While my opinion is irrelevant, it does look good to me, thanks :] Ping. Anyone willing to OK the revised diff? Would be useful to have this in 6.5.
Re: sbin/wsconsctl: show more data
On Mon, Mar 18, 2019 at 06:30:15PM +0100, Frederic Cambus wrote: > On Mon, Jan 07, 2019 at 04:27:46PM -0700, Theo de Raadt wrote: > > Ted Unangst wrote: > > > > > Artturi Alm wrote: > > > > display.width=1920 > > > > display.height=1200 > > > > display.depth=32 > > > > display.emulations=vt100 > > > > display.col_x_row=120x37 > > > > display.font_wxh=16x32 > > > > > > now that we've all had a chance to weigh in on the font, why are you > > > adding > > > this weird x format? speaking of ugly... it should print columns and rows > > > just > > > like width and height. > > > > it is a waste of kernel and userland code since another mechanism already > > exists > > > > use stty -a > > While I agree it doesn't make sense to add variables for showing > the number of columns and rows, as the information can be obtained > using ssty -a, displaying fontwidth and fontheight values would be > useful. This allows users to know the size of the currently loaded > font. > > Thinking forward, this would also allow to easily get those values > in shell scripts, which can be leveraged if we wanted to only embed > 7-bit ASCII characters in the kernel and load the full font later on, > or if someone wanted to continue the UTF-8 work [1] started by miod@. > > Revised diff below iterating on what Artturi previously sent, and > a snippet of wsconsctl output with the diff applied: > > display.width=1600 > display.height=900 > display.depth=32 > +display.fontwidth=12 > +display.fontheight=24 > display.emulations=vt100 > display.screentypes=std > display.focus=4 > > [1] https://undeadly.org/cgi?action=article&sid=20131023125815 > > Comments? OK? > While my opinion is irrelevant, it does look good to me, thanks :] -Artturi > Index: sbin/wsconsctl/display.c > === > RCS file: /cvs/src/sbin/wsconsctl/display.c,v > retrieving revision 1.20 > diff -u -p -r1.20 display.c > --- sbin/wsconsctl/display.c 8 May 2015 19:12:51 - 1.20 > +++ sbin/wsconsctl/display.c 18 Mar 2019 17:11:59 - > @@ -41,7 +41,7 @@ > #include "wsconsctl.h" > > u_int dpytype; > -u_int width, height, depth; > +u_int width, height, depth, fontwidth, fontheight; > int focus; > struct field_pc brightness, contrast, backlight; > int burnon, burnoff, vblank, kbdact, msact, outact; > @@ -54,6 +54,8 @@ struct field display_field_tab[] = { > { "width", &width, FMT_UINT, FLG_RDONLY }, > { "height", &height,FMT_UINT, FLG_RDONLY }, > { "depth", &depth, FMT_UINT, FLG_RDONLY }, > +{ "fontwidth", &fontwidth, FMT_UINT, FLG_RDONLY }, > +{ "fontheight", &fontheight,FMT_UINT, FLG_RDONLY }, > { "emulations", &emuls, FMT_EMUL, FLG_RDONLY }, > { "screentypes", &screens, FMT_SCREEN, FLG_RDONLY }, > { "focus", &focus, FMT_INT,FLG_NORDBACK }, > @@ -84,7 +86,7 @@ display_get_values(int fd) > const char *cmd_str; > void *ptr; > unsigned long cmd; > - int bon = 0, fbon = 0; > + int bon = 0, fbon = 0, son = 0; > > focus = gscr.idx = -1; > for (pf = display_field_tab; pf->name; pf++) { > @@ -102,6 +104,10 @@ display_get_values(int fd) > } else if (ptr == &emuls) { > fillioctl(WSDISPLAYIO_GETEMULTYPE); > emuls.idx=0; > + } else if (ptr == &fontwidth || ptr == &fontheight) { > + fillioctl(WSDISPLAYIO_GETSCREENTYPE); > + ptr = &screens; > + screens.idx = 0; > } else if (ptr == &screens) { > fillioctl(WSDISPLAYIO_GETSCREENTYPE); > screens.idx=0; > @@ -168,6 +174,11 @@ display_get_values(int fd) > emuls.idx=fd; > } else if (ptr == &screens) { > screens.idx=fd; > + if (!son) { > + fontwidth = screens.fontwidth; > + fontheight = screens.fontheight; > + } > + son++; > } else if (ptr == ¶m) { > struct field_pc *pc = pf->valp; >
Re: sbin/wsconsctl: show more data
On Mon, Jan 07, 2019 at 04:27:46PM -0700, Theo de Raadt wrote: > Ted Unangst wrote: > > > Artturi Alm wrote: > > > display.width=1920 > > > display.height=1200 > > > display.depth=32 > > > display.emulations=vt100 > > > display.col_x_row=120x37 > > > display.font_wxh=16x32 > > > > now that we've all had a chance to weigh in on the font, why are you adding > > this weird x format? speaking of ugly... it should print columns and rows > > just > > like width and height. > > it is a waste of kernel and userland code since another mechanism already > exists > > use stty -a While I agree it doesn't make sense to add variables for showing the number of columns and rows, as the information can be obtained using ssty -a, displaying fontwidth and fontheight values would be useful. This allows users to know the size of the currently loaded font. Thinking forward, this would also allow to easily get those values in shell scripts, which can be leveraged if we wanted to only embed 7-bit ASCII characters in the kernel and load the full font later on, or if someone wanted to continue the UTF-8 work [1] started by miod@. Revised diff below iterating on what Artturi previously sent, and a snippet of wsconsctl output with the diff applied: display.width=1600 display.height=900 display.depth=32 +display.fontwidth=12 +display.fontheight=24 display.emulations=vt100 display.screentypes=std display.focus=4 [1] https://undeadly.org/cgi?action=article&sid=20131023125815 Comments? OK? Index: sbin/wsconsctl/display.c === RCS file: /cvs/src/sbin/wsconsctl/display.c,v retrieving revision 1.20 diff -u -p -r1.20 display.c --- sbin/wsconsctl/display.c8 May 2015 19:12:51 - 1.20 +++ sbin/wsconsctl/display.c18 Mar 2019 17:11:59 - @@ -41,7 +41,7 @@ #include "wsconsctl.h" u_int dpytype; -u_int width, height, depth; +u_int width, height, depth, fontwidth, fontheight; int focus; struct field_pc brightness, contrast, backlight; int burnon, burnoff, vblank, kbdact, msact, outact; @@ -54,6 +54,8 @@ struct field display_field_tab[] = { { "width", &width, FMT_UINT, FLG_RDONLY }, { "height",&height,FMT_UINT, FLG_RDONLY }, { "depth", &depth, FMT_UINT, FLG_RDONLY }, +{ "fontwidth", &fontwidth, FMT_UINT, FLG_RDONLY }, +{ "fontheight",&fontheight,FMT_UINT, FLG_RDONLY }, { "emulations",&emuls, FMT_EMUL, FLG_RDONLY }, { "screentypes", &screens, FMT_SCREEN, FLG_RDONLY }, { "focus", &focus, FMT_INT,FLG_NORDBACK }, @@ -84,7 +86,7 @@ display_get_values(int fd) const char *cmd_str; void *ptr; unsigned long cmd; - int bon = 0, fbon = 0; + int bon = 0, fbon = 0, son = 0; focus = gscr.idx = -1; for (pf = display_field_tab; pf->name; pf++) { @@ -102,6 +104,10 @@ display_get_values(int fd) } else if (ptr == &emuls) { fillioctl(WSDISPLAYIO_GETEMULTYPE); emuls.idx=0; + } else if (ptr == &fontwidth || ptr == &fontheight) { + fillioctl(WSDISPLAYIO_GETSCREENTYPE); + ptr = &screens; + screens.idx = 0; } else if (ptr == &screens) { fillioctl(WSDISPLAYIO_GETSCREENTYPE); screens.idx=0; @@ -168,6 +174,11 @@ display_get_values(int fd) emuls.idx=fd; } else if (ptr == &screens) { screens.idx=fd; + if (!son) { + fontwidth = screens.fontwidth; + fontheight = screens.fontheight; + } + son++; } else if (ptr == ¶m) { struct field_pc *pc = pf->valp;
Re: sbin/wsconsctl: show more data
On Sat, Jan 05, 2019 at 10:39:46PM +0200, li...@wrant.com wrote: > Just need a manual page and a tunable at some point, didn't much before. > Still needed more text lines on the console and utf8 options previously. > > Got less chars now, so console is a regression in data thus readability. > Also, mention of direction in change log / commit message would be nice. > > On 27" 2560x1440 panel, usable res was 1920x1200 160x54 and then 160x65. > Topic: show more data, now 160x45 (spleen 16x32) << 425x110 (misc 6x13). > > 2010-2020, stuck at about 50 lines at 100 PPI is a huge waste of pixels. > if you're going to jsut complain w/o a diff, you should do it at the source of it[0]; or just patch and move on. -Artturi [0]: https://bugzilla.kernel.org/show_bug.cgi?id=172421
Re: sbin/wsconsctl: show more data
Mon, 07 Jan 2019 16:27:46 -0700 "Theo de Raadt" > > use stty -a > Also, probably complementary methods could be considered: $ tput co li $ wsfontload -l
Re: sbin/wsconsctl: show more data
Ted Unangst wrote: > Artturi Alm wrote: > > display.width=1920 > > display.height=1200 > > display.depth=32 > > display.emulations=vt100 > > display.col_x_row=120x37 > > display.font_wxh=16x32 > > now that we've all had a chance to weigh in on the font, why are you adding > this weird x format? speaking of ugly... it should print columns and rows just > like width and height. it is a waste of kernel and userland code since another mechanism already exists use stty -a
Re: sbin/wsconsctl: show more data
Artturi Alm wrote: > display.width=1920 > display.height=1200 > display.depth=32 > display.emulations=vt100 > display.col_x_row=120x37 > display.font_wxh=16x32 now that we've all had a chance to weigh in on the font, why are you adding this weird x format? speaking of ugly... it should print columns and rows just like width and height.
Re: sbin/wsconsctl: show more data
Thank you Frederic for the new console font. I agree with Mischa and Paul and find it very clean and readable, a definite improvement. -- Robert W. Curry
Re: sbin/wsconsctl: show more data
I have to concur with Paul! Saw the new font yesterday and was pleasantly surprised. Very nice! Mischa -- > On 6 Jan 2019, at 15:51, Paul de Weerd wrote: > > Lots of negativity here, so I just wanted to chime in - really love > the new console font! Crisp and easily readable letters, big enough > to be readable, with a reasonable number of letters per line > (${COLUMNS}) en lines per screen (${LINES}). It does mean pretty big > characters on big screens when in console mode, but on big screens I > want to run X anyway, so it's all good. What I understand of the > algorithm to pick the font size makes a lot of sense to me. > > Thank you Frederic for all the effort you put into this font and > making it happen on the console and in X through the fonts/spleen > port! > > Cheers, > > Paul 'WEiRD' de Weerd > > -- >> [<++>-]<+++.>+++[<-->-]<.>+++[<+ > +++>-]<.>++[<>-]<+.--.[-] > http://www.weirdnet.nl/ >
Re: sbin/wsconsctl: show more data
Lots of negativity here, so I just wanted to chime in - really love the new console font! Crisp and easily readable letters, big enough to be readable, with a reasonable number of letters per line (${COLUMNS}) en lines per screen (${LINES}). It does mean pretty big characters on big screens when in console mode, but on big screens I want to run X anyway, so it's all good. What I understand of the algorithm to pick the font size makes a lot of sense to me. Thank you Frederic for all the effort you put into this font and making it happen on the console and in X through the fonts/spleen port! Cheers, Paul 'WEiRD' de Weerd -- >[<++>-]<+++.>+++[<-->-]<.>+++[<+ +++>-]<.>++[<>-]<+.--.[-] http://www.weirdnet.nl/
Re: sbin/wsconsctl: show more data
Just need a manual page and a tunable at some point, didn't much before. Still needed more text lines on the console and utf8 options previously. Got less chars now, so console is a regression in data thus readability. Also, mention of direction in change log / commit message would be nice. On 27" 2560x1440 panel, usable res was 1920x1200 160x54 and then 160x65. Topic: show more data, now 160x45 (spleen 16x32) << 425x110 (misc 6x13). 2010-2020, stuck at about 50 lines at 100 PPI is a huge waste of pixels.
Re: sbin/wsconsctl: show more data
> I do NOT like this idea of being stuck with that for the next 10 years. when do make statements like that, why do you continue to believe any of us care about any of your opinions?
Re: sbin/wsconsctl: show more data
Hi Frederic, tech@, This 16x32 font looks both wasteful in screen estate, and difficult to read on both desktop and laptop screens of average 100 PPI (2010-2020) Can we actually (do better and) show more data, for example try using: 1) Default font size that is as close to minimum (and NOT maximum) as possible pixels per character? 2) Default typeface that is similar to (a subset of) misc from the X fonts (for future Unicode)? 3) Thin legible fonts on laptop / desktop screens (work) at one arm length (or at least pick this as default) instead of (NOT) big rectangular fonts for phone / tablet at nose distance (play)? 4) Tunables for user preference when the above do not align in this 2-years' resident font carver aesthetics / mood / vision quality? 5) Changes in direction of book fonts, NOT geoglyphs (alien road signs)? 6) Usable information display as higher priority over selected typeface? I do NOT like this idea of being stuck with that for the next 10 years. OpenBSD on 19-27" desktop is a very important use case for many people. I can make compromise and not care much for the font face, but the size as screen waste and lack of Unicode path really really annoys me a lot. Kind regards, Anton Lazarov Sat, 5 Jan 2019 01:50:22 +0200 Artturi Alm > Hi, > > guessing i'm not the only one wondering about these sizes, as w/current > snapshot the font does seem too big for me(on 2560x1440 display, for > which radeondrm(4) has never gotten the size right(giving only 1920x1200)). > > display.part of wsconsctl output w/the diff: > display.type=radeondrm > display.width=1920 > display.height=1200 > display.depth=32 > display.emulations=vt100 > display.col_x_row=120x37 > display.font_wxh=16x32 > display.screentypes=std > display.focus=4 > display.screen_on=250 > display.screen_off=0 > display.vblank=off > display.kbdact=on > display.msact=on > display.outact=on > > lazy(=ugly) not-so-minimal diff below. > > -Artturi > > > diff --git a/sbin/wsconsctl/display.c b/sbin/wsconsctl/display.c > index 6f789291142..9927a9d77c5 100644 > --- a/sbin/wsconsctl/display.c > +++ b/sbin/wsconsctl/display.c > @@ -42,6 +42,7 @@ > > u_int dpytype; > u_int width, height, depth; > +u_int cxr[2], fontwxh[2]; > int focus; > struct field_pc brightness, contrast, backlight; > int burnon, burnoff, vblank, kbdact, msact, outact; > @@ -55,6 +56,8 @@ struct field display_field_tab[] = { > { "height", &height,FMT_UINT, FLG_RDONLY }, > { "depth", &depth, FMT_UINT, FLG_RDONLY }, > { "emulations", &emuls, FMT_EMUL, FLG_RDONLY }, > +{ "col_x_row", &cxr, FMT_UINTX, FLG_RDONLY }, > +{ "font_wxh",&fontwxh, FMT_UINTX, FLG_RDONLY }, > { "screentypes", &screens, FMT_SCREEN, FLG_RDONLY }, > { "focus", &focus, FMT_INT,FLG_NORDBACK }, > { "brightness", &brightness,FMT_PC, FLG_MODIFY|FLG_INIT }, > @@ -85,6 +88,7 @@ display_get_values(int fd) > void *ptr; > unsigned long cmd; > int bon = 0, fbon = 0; > + int fson = 0; > > focus = gscr.idx = -1; > for (pf = display_field_tab; pf->name; pf++) { > @@ -102,6 +106,10 @@ display_get_values(int fd) > } else if (ptr == &emuls) { > fillioctl(WSDISPLAYIO_GETEMULTYPE); > emuls.idx=0; > + } else if (ptr == &cxr || ptr == &fontwxh) { > + fillioctl(WSDISPLAYIO_GETSCREENTYPE); > + ptr = &screens; > + screens.idx = 0; > } else if (ptr == &screens) { > fillioctl(WSDISPLAYIO_GETSCREENTYPE); > screens.idx=0; > @@ -168,6 +176,13 @@ display_get_values(int fd) > emuls.idx=fd; > } else if (ptr == &screens) { > screens.idx=fd; > + if (!fson) { > + cxr[0] = screens.ncols; > + cxr[1] = screens.nrows; > + fontwxh[0] = screens.fontwidth; > + fontwxh[1] = screens.fontheight; > + } > + fson++; > } else if (ptr == ¶m) { > struct field_pc *pc = pf->valp; > > diff --git a/sbin/wsconsctl/util.c b/sbin/wsconsctl/util.c > index b0ac4b3e23f..071baf31f85 100644 > --- a/sbin/wsconsctl/util.c > +++ b/sbin/wsconsctl/util.c > @@ -186,6 +186,7 @@ int name2int(char *, const struct nameint *, int); > void print_kmap(struct wskbd_map_data *); > void print_emul(struct wsdisplay_emultype *); > void print_screen(struct wsdisplay_screentype *); > +void print_uintx(u_int *); > > struct field * > field_by_name(struct field *field_tab, char *name) > @@ -316,6 +317,9 @@ pr_field(const char *pre, struct field *f, const char > *sep) > case FMT
Re: sbin/wsconsctl: show more data
You are failing to provide a proper bug report that has details, instead, it we got a convoluted diff and an extremely vague description that makes no sense. that makes it very hard to care. > On Sat, Jan 05, 2019 at 01:50:22AM +0200, Artturi Alm wrote: > > Hi, > > > > guessing i'm not the only one wondering about these sizes, as w/current > > snapshot the font does seem too big for me(on 2560x1440 display, for > > which radeondrm(4) has never gotten the size right(giving only 1920x1200)). > > > > display.part of wsconsctl output w/the diff: > > display.type=radeondrm > > display.width=1920 > > display.height=1200 > > display.depth=32 > > display.emulations=vt100 > > display.col_x_row=120x37 > > display.font_wxh=16x32 > > display.screentypes=std > > display.focus=4 > > display.screen_on=250 > > display.screen_off=0 > > display.vblank=off > > display.kbdact=on > > display.msact=on > > display.outact=on > > > > lazy(=ugly) not-so-minimal diff below. > > > > -Artturi > > > > fwiw., what i have w/o spleen: > display.type=radeondrm > display.width=1920 > display.height=1200 > display.depth=32 > display.emulations=vt100 > display.col_x_row=160x54 > display.font_wxh=12x22 > display.screentypes=std > > which is usable, and the wrong width/height doesn't matter so much. > i suppose i should have written to bugs@ at this point, with picture > showing the size of gaps around 'i', effectively making "libxxx" read > like "l i bxxx". > > -Artturi >
Re: sbin/wsconsctl: show more data
On Sat, Jan 05, 2019 at 01:50:22AM +0200, Artturi Alm wrote: > Hi, > > guessing i'm not the only one wondering about these sizes, as w/current > snapshot the font does seem too big for me(on 2560x1440 display, for > which radeondrm(4) has never gotten the size right(giving only 1920x1200)). > > display.part of wsconsctl output w/the diff: > display.type=radeondrm > display.width=1920 > display.height=1200 > display.depth=32 > display.emulations=vt100 > display.col_x_row=120x37 > display.font_wxh=16x32 > display.screentypes=std > display.focus=4 > display.screen_on=250 > display.screen_off=0 > display.vblank=off > display.kbdact=on > display.msact=on > display.outact=on > > lazy(=ugly) not-so-minimal diff below. > > -Artturi > fwiw., what i have w/o spleen: display.type=radeondrm display.width=1920 display.height=1200 display.depth=32 display.emulations=vt100 display.col_x_row=160x54 display.font_wxh=12x22 display.screentypes=std which is usable, and the wrong width/height doesn't matter so much. i suppose i should have written to bugs@ at this point, with picture showing the size of gaps around 'i', effectively making "libxxx" read like "l i bxxx". -Artturi
sbin/wsconsctl: show more data
Hi, guessing i'm not the only one wondering about these sizes, as w/current snapshot the font does seem too big for me(on 2560x1440 display, for which radeondrm(4) has never gotten the size right(giving only 1920x1200)). display.part of wsconsctl output w/the diff: display.type=radeondrm display.width=1920 display.height=1200 display.depth=32 display.emulations=vt100 display.col_x_row=120x37 display.font_wxh=16x32 display.screentypes=std display.focus=4 display.screen_on=250 display.screen_off=0 display.vblank=off display.kbdact=on display.msact=on display.outact=on lazy(=ugly) not-so-minimal diff below. -Artturi diff --git a/sbin/wsconsctl/display.c b/sbin/wsconsctl/display.c index 6f789291142..9927a9d77c5 100644 --- a/sbin/wsconsctl/display.c +++ b/sbin/wsconsctl/display.c @@ -42,6 +42,7 @@ u_int dpytype; u_int width, height, depth; +u_int cxr[2], fontwxh[2]; int focus; struct field_pc brightness, contrast, backlight; int burnon, burnoff, vblank, kbdact, msact, outact; @@ -55,6 +56,8 @@ struct field display_field_tab[] = { { "height",&height,FMT_UINT, FLG_RDONLY }, { "depth", &depth, FMT_UINT, FLG_RDONLY }, { "emulations",&emuls, FMT_EMUL, FLG_RDONLY }, +{ "col_x_row", &cxr, FMT_UINTX, FLG_RDONLY }, +{ "font_wxh", &fontwxh, FMT_UINTX, FLG_RDONLY }, { "screentypes", &screens, FMT_SCREEN, FLG_RDONLY }, { "focus", &focus, FMT_INT,FLG_NORDBACK }, { "brightness",&brightness,FMT_PC, FLG_MODIFY|FLG_INIT }, @@ -85,6 +88,7 @@ display_get_values(int fd) void *ptr; unsigned long cmd; int bon = 0, fbon = 0; + int fson = 0; focus = gscr.idx = -1; for (pf = display_field_tab; pf->name; pf++) { @@ -102,6 +106,10 @@ display_get_values(int fd) } else if (ptr == &emuls) { fillioctl(WSDISPLAYIO_GETEMULTYPE); emuls.idx=0; + } else if (ptr == &cxr || ptr == &fontwxh) { + fillioctl(WSDISPLAYIO_GETSCREENTYPE); + ptr = &screens; + screens.idx = 0; } else if (ptr == &screens) { fillioctl(WSDISPLAYIO_GETSCREENTYPE); screens.idx=0; @@ -168,6 +176,13 @@ display_get_values(int fd) emuls.idx=fd; } else if (ptr == &screens) { screens.idx=fd; + if (!fson) { + cxr[0] = screens.ncols; + cxr[1] = screens.nrows; + fontwxh[0] = screens.fontwidth; + fontwxh[1] = screens.fontheight; + } + fson++; } else if (ptr == ¶m) { struct field_pc *pc = pf->valp; diff --git a/sbin/wsconsctl/util.c b/sbin/wsconsctl/util.c index b0ac4b3e23f..071baf31f85 100644 --- a/sbin/wsconsctl/util.c +++ b/sbin/wsconsctl/util.c @@ -186,6 +186,7 @@ int name2int(char *, const struct nameint *, int); void print_kmap(struct wskbd_map_data *); void print_emul(struct wsdisplay_emultype *); void print_screen(struct wsdisplay_screentype *); +void print_uintx(u_int *); struct field * field_by_name(struct field *field_tab, char *name) @@ -316,6 +317,9 @@ pr_field(const char *pre, struct field *f, const char *sep) case FMT_CFG: mousecfg_pr_field((struct wsmouse_parameters *) f->valp); break; + case FMT_UINTX: + print_uintx((u_int *) f->valp); + break; default: errx(1, "internal error: pr_field: no format %d", f->format); break; @@ -551,3 +555,9 @@ print_screen(struct wsdisplay_screentype *screens) i = ioctl(fd, WSDISPLAYIO_GETSCREENTYPE, &s); } } + +void +print_uintx(u_int *ux) +{ + printf("%ux%u", ux[0], ux[1]); +} diff --git a/sbin/wsconsctl/wsconsctl.h b/sbin/wsconsctl/wsconsctl.h index 3a6e38d67e2..93d42ed600a 100644 --- a/sbin/wsconsctl/wsconsctl.h +++ b/sbin/wsconsctl/wsconsctl.h @@ -49,6 +49,7 @@ struct field { #define FMT_SCREEN 108 /* wsdisplay screen types */ #define FMT_STRING 109 /* free string */ #define FMT_CFG201 /* wsmouse parameters */ +#define FMT_UINTX 202 /* u_int x u_int */ int format; #define FLG_RDONLY 0x0001 /* variable cannot be modified */ #define FLG_WRONLY 0x0002 /* variable cannot be displayed */