qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] ncurses: resize console if required
@ 2008-04-28  3:54 Carlo Marcelo Arenas Belon
  2008-04-28  8:58 ` Samuel Thibault
  2008-04-28 10:14 ` Thiemo Seufer
  0 siblings, 2 replies; 9+ messages in thread
From: Carlo Marcelo Arenas Belon @ 2008-04-28  3:54 UTC (permalink / raw)
  To: qemu-devel

The following patch instructs qemu to print an escape command to resize the
curses console to 80x25 if detected to have a different geometry (xterm and
friends use 80x24 by default).

Carlo

---
Index: curses.c
===================================================================
--- curses.c	(revision 4274)
+++ curses.c	(working copy)
@@ -367,6 +367,11 @@
 
     invalidate = 1;
 
+    /* check size of console and try to adjust if needed */
+    getmaxyx(stdscr, gheight, gwidth);
+    if ((gwidth != 80) || (gheight != 25)) {
+	printf("\033[8;25;80t");
+    }
     /* Standard VGA initial text mode dimensions */
     curses_resize(ds, 80, 25);
 }

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2008-04-28 23:18 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-28  3:54 [Qemu-devel] [PATCH] ncurses: resize console if required Carlo Marcelo Arenas Belon
2008-04-28  8:58 ` Samuel Thibault
2008-04-28 17:56   ` Carlo Marcelo Arenas Belon
2008-04-28 23:16     ` Samuel Thibault
2008-04-28 10:14 ` Thiemo Seufer
2008-04-28 17:31   ` Carlo Marcelo Arenas Belon
2008-04-28 17:20     ` Samuel Thibault
2008-04-28 19:17     ` andrzej zaborowski
2008-04-28 23:18       ` Samuel Thibault

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).