X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;f=src%2Ftop.ml;h=75fbcb9865ac424d21ba2d7e449ba2009eff48fe;hb=42de3812f0bd97c3fa5114b39d9bb23c483d364b;hp=d4f76972e9215abb417e072614b8e48c99c8f9a4;hpb=a58c90e04e5b54f8c6a67b09a93cfc33402cf398;p=virt-top.git diff --git a/src/top.ml b/src/top.ml index d4f7697..75fbcb9 100644 --- a/src/top.ml +++ b/src/top.ml @@ -18,7 +18,6 @@ *) open Printf -open ExtList open Curses open Opt_gettext.Gettext @@ -33,12 +32,6 @@ module N = Libvirt.Network let rcfile = ".virt-toprc" -(* Hooks for CSV support (see [opt_csv.ml]). *) -let csv_start : (string -> unit) ref = - ref ( - fun _ -> failwith (s_"virt-top was compiled without support for CSV files") - ) - (* Hook for calendar support (see [opt_calendar.ml]). *) let parse_date_time : (string -> float) ref = ref ( @@ -84,7 +77,7 @@ let start_up () = and set_net_mode () = display_mode := NetDisplay and set_block_mode () = display_mode := BlockDisplay and set_csv filename = - (!csv_start) filename; + Csv_output.csv_set_filename filename; csv_enabled := true and no_init_file () = init_file := NoInitFile and set_init_file filename = init_file := InitFile filename @@ -420,7 +413,7 @@ and change_delay () = delay := int_of_float (newdelay *. 1000.); false ) with - Failure "float_of_string" -> + Failure _ -> print_msg (s_"Not a valid number"); true in refresh (); sleep (if error then 2 else 1)