From: Richard Jones Date: Thu, 2 Sep 2010 08:00:35 +0000 (+0100) Subject: Change order of return values from getyx - fixes display of historical CPU. X-Git-Tag: 1.0.5~14 X-Git-Url: http://git.annexia.org/?a=commitdiff_plain;h=0f6282595fbd36e53f25e42ab451a582818171b8;p=virt-top.git Change order of return values from getyx - fixes display of historical CPU. In this commit: http://cvs.savannah.gnu.org/viewvc/ocaml-tmk/functions.c?root=ocaml-tmk&r1=1.2&r2=1.3 Sam changed (fixed) the order that the coordinates are returned from the ncurses 'getyx' call. Since this commit was made 3 years ago it should be safe to assume everyone is using the new ocaml-ncurses by now. This meant the historical %CPU was being displayed off the bottom of the screen instead of on the top row at the right. Now it is displayed in the correct place. --- diff --git a/virt-top/virt_top.ml b/virt-top/virt_top.ml index 36b7e17..3990b55 100644 --- a/virt-top/virt_top.ml +++ b/virt-top/virt_top.ml @@ -1174,7 +1174,7 @@ let redraw = (* Display historical CPU time. *) let () = - let x, y = historical_cursor in (* Yes, it's a bug in ocaml-curses *) + let y, x = historical_cursor in let maxwidth = cols - x in let line = String.concat " "