Change order of return values from getyx - fixes display of historical CPU.
authorRichard Jones <rjones@redhat.com>
Thu, 2 Sep 2010 08:00:35 +0000 (09:00 +0100)
committerRichard Jones <rjones@redhat.com>
Thu, 2 Sep 2010 08:00:35 +0000 (09:00 +0100)
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.

virt-top/virt_top.ml

index 36b7e17..3990b55 100644 (file)
@@ -1174,7 +1174,7 @@ let redraw =
 
     (* Display historical CPU time. *)
     let () =
 
     (* 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 " "
       let maxwidth = cols - x in
       let line =
        String.concat " "