-aclocal.m4
-META
-ocaml-libvirt-*.tar.gz
-ocaml-libvirt-*.exe
-html
-configure
-config.log
-config.status
-config.h
-config.cache
-Makefile
-Make.rules
-*/Makefile
-autom4te.cache
-core
-core.*
+*.a
+*.cma
*.cmi
*.cmo
*.cmx
-*.cma
*.cmxa
-*.o
-*.so
-*.a
-*.opt
*.dll
*.exe
-*~
-libvirt/libvirt_version.ml
-examples/list_domains
-examples/node_info
-mlvirsh/mlvirsh
-virt-ctrl/virt-ctrl
-virt-top/virt-top
-virt-df/virt-df
-wininstaller.nsis
+*.o
+*.opt
*.orig
-mlvirsh/mlvirsh_gettext.ml
-virt-ctrl/virt_ctrl_gettext.ml
-virt-df/virt_df_gettext.ml
-virt-top/virt_top_gettext.ml
-virt-top/virt_top_version.ml
-po/*.mo
-po/*.po.bak
-virt-df/virt_df_lvm2_lexer.ml
-virt-df/virt_df_lvm2_parser.ml
-virt-df/virt_df_lvm2_parser.mli
-virt-top-*.tar.gz
-virt-top/virt-top.1
-virt-top/virt-top.txt
\ No newline at end of file
+*.so
+*~
+
+META
+Makefile
+aclocal.m4
+config.cache
+config.h
+config.log
+config.status
+configure
+core
+core.*
+html
+
+/Make.rules
+/autom4te.cache
+/po/*.mo
+/po/*.po.bak
+/src/opt_gettext.ml
+/src/version.ml
+/src/virt-top
+/src/virt-top.1
+/src/virt-top.txt
+/virt-top-*.tar.gz
+++ /dev/null
-[main]
-host = https://www.transifex.net
-
-[virttop.virttoppot]
-file_filter = po/<lang>.po
-source_file = po/virt-top.pot
-source_lang = en
-
+2016-10-31 Richard W.M. Jones <rjones@redhat.com>
+
+ Rename source directory and files.
+ This renames the source directory from virt-top to src/ and removes
+ the unnecessary virt_top_* prefix from many source files.
+
+ This is entirely refactoring and makes no functional change.
+
+ Also this fixes the MANIFEST file and removes old Transifex
+ configuration, fixing commit defe5bdd4a32e0206a786d279e0f9cfc238e5e17.
+
+2016-01-04 Richard W.M. Jones <rjones@redhat.com>
+
+ build: Add -g flag to ocamlopt.
+ Modern ocamlopt supports the -g flag fine (very old versions did not).
+
+2015-02-21 Richard W.M. Jones <rjones@redhat.com>
+
+ Update translations from Zanata.
+
+ Move upstream translations from Tranifex to Zanata.
+ This is at the request of the Fedora localization team.
+ For further information see:
+
+ https://www.redhat.com/archives/libguestfs/2015-February/msg00168.html
+
+2014-08-02 Richard W.M. Jones <rjones@redhat.com>
+
+ Disable warning about immutable strings (for OCaml 4.02).
+
2012-10-12 Richard W.M. Jones <rjones@redhat.com>
Version 1.0.8.
MANIFEST
m4/ocaml.m4
po/as.po
+po/ca.po
po/de.po
po/es.po
+po/eu.po
po/fr.po
po/gu.po
+po/hu.po
+po/id.po
po/it.po
po/ja.po
+po/ka.po
po/kn.po
po/LINGUAS
po/Makefile.in
po/mr.po
po/nl.po
po/or.po
+po/pa.po
po/pl.po
po/pt_BR.po
po/pt.po
po/POTFILES
po/ru.po
+po/sr.po
+po/sv.po
po/te.po
+po/tg.po
+po/tr.po
po/uk.po
po/virt-top.pot
+po/zanata-pull.sh
+po/zanata.xml
po/zh_CN.po
po/zh_TW.po
README
TODO
-.tx/config
-virt-top/.depend
-virt-top/Makefile.in
-virt-top/README
-virt-top/virt-top.pod
-virt-top/virt_top.ml
-virt-top/virt_top.mli
-virt-top/virt_top_calendar1.ml
-virt-top/virt_top_calendar2.ml
-virt-top/virt_top_csv.ml
-virt-top/virt_top_main.ml
-virt-top/virt_top_utils.ml
-virt-top/virt_top_utils.mli
-virt-top/virt_top_version.ml.in
-virt-top/virt_top_xml.ml
+src/.depend
+src/Makefile.in
+src/README
+src/main.ml
+src/opt_calendar1.ml
+src/opt_calendar2.ml
+src/opt_csv.ml
+src/opt_xml.ml
+src/top.ml
+src/top.mli
+src/utils.ml
+src/utils.mli
+src/version.ml.in
+src/virt-top.pod
MAKENSIS = @MAKENSIS@
-SUBDIRS = virt-top
+SUBDIRS = src
all opt depend install:
- for d in $(SUBDIRS); do \
- $(MAKE) -C $$d $@; \
- if [ $$? -ne 0 ]; then exit 1; fi; \
- done
+ $(MAKE) -C src $@
clean:
for d in . $(SUBDIRS); do \
(cd $$d; rm -f *.cmi *.cmo *.cmx *.cma *.cmxa *.o *.a *.so *.opt *~ *.dll *.exe core); \
done
- rm -f virt-top/virt-top
+ rm -f src/virt-top
distclean: clean
rm -f config.h config.log config.status configure
rm -rf autom4te.cache
rm -f Makefile
- rm -f virt-top/Makefile
+ rm -f src/Makefile
# Distribution.
tar -cf - -T MANIFEST | tar -C $(PACKAGE)-$(VERSION) -xf -
$(INSTALL) -m 0755 configure $(PACKAGE)-$(VERSION)/
$(INSTALL) -m 0644 aclocal.m4 $(PACKAGE)-$(VERSION)/
- $(INSTALL) -m 0644 virt-top/virt-top.1 $(PACKAGE)-$(VERSION)/virt-top/
- $(INSTALL) -m 0644 virt-top/virt-top.txt $(PACKAGE)-$(VERSION)/virt-top/
+ $(INSTALL) -m 0644 src/virt-top.1 $(PACKAGE)-$(VERSION)/src/
+ $(INSTALL) -m 0644 src/virt-top.txt $(PACKAGE)-$(VERSION)/src/
tar zcf $(PACKAGE)-$(VERSION).tar.gz $(PACKAGE)-$(VERSION)
rm -rf $(PACKAGE)-$(VERSION)
ls -l $(PACKAGE)-$(VERSION).tar.gz
virt-top
----------------------------------------------------------------------
-Copyright (C) 2007-2012 Richard W.M. Jones, Red Hat Inc.
+Copyright (C) 2007-2016 Richard W.M. Jones, Red Hat Inc.
http://et.redhat.com/~rjones/virt-top/
http://libvirt.org/ocaml/
http://libvirt.org/
dnl Write gettext modules for the programs.
dnl http://www.le-gall.net/sylvain+violaine/documentation/ocaml-gettext/html/reference-manual/ch03s04.html
-for d in virt-top; do
- f=`echo $d | tr - _`_gettext.ml
- AC_MSG_NOTICE([creating $d/$f])
- rm -f $d/$f
- echo "(* This file is generated automatically by ./configure. *)" > $d/$f
- if test "x$OCAML_PKG_gettext" != "xno"; then
- # Gettext module is available, so use it.
- cat <<EOT >>$d/$f
+AC_MSG_NOTICE([creating src/opt_gettext.ml])
+rm -f src/opt_gettext.ml
+echo "(* This file is generated automatically by ./configure. *)" > src/opt_gettext.ml
+if test "x$OCAML_PKG_gettext" != "xno"; then
+ # Gettext module is available, so use it.
+ cat <<EOT >>src/opt_gettext.ml
module Gettext = Gettext.Program (
struct
- let textdomain = "$d"
+ let textdomain = "virt-top"
let codeset = None
let dir = None
let dependencies = [[]]
end
) (GettextStub.Native)
EOT
- else
- # No gettext module is available, so fake the translation functions.
- cat <<EOT >>$d/$f
+else
+ # No gettext module is available, so fake the translation functions.
+ cat <<EOT >>src/opt_gettext.ml
module Gettext = struct
external s_ : string -> string = "%identity"
external f_ : ('a -> 'b, 'c, 'd) format -> ('a -> 'b, 'c, 'd) format
= fun s p n -> if n = 1 then s else p
end
EOT
- fi
-done
+fi
dnl Summary.
echo "------------------------------------------------------------"
AC_CONFIG_FILES([Makefile
Make.rules
po/Makefile
- virt-top/Makefile
- virt-top/virt_top_version.ml
+ src/Makefile
+ src/version.ml
])
AC_OUTPUT
--- /dev/null
+main.cmo: top.cmi opt_gettext.cmo
+main.cmx: top.cmx opt_gettext.cmx
+opt_calendar1.cmo: top.cmi opt_gettext.cmo
+opt_calendar1.cmx: top.cmx opt_gettext.cmx
+opt_calendar2.cmo: top.cmi opt_gettext.cmo
+opt_calendar2.cmx: top.cmx opt_gettext.cmx
+opt_csv.cmo: top.cmi opt_gettext.cmo
+opt_csv.cmx: top.cmx opt_gettext.cmx
+opt_gettext.cmo:
+opt_gettext.cmx:
+opt_xml.cmo: top.cmi opt_gettext.cmo
+opt_xml.cmx: top.cmx opt_gettext.cmx
+top.cmi:
+top.cmo: version.cmo utils.cmi opt_gettext.cmo top.cmi
+top.cmx: version.cmx utils.cmx opt_gettext.cmx top.cmi
+utils.cmi:
+utils.cmo: opt_gettext.cmo utils.cmi
+utils.cmx: opt_gettext.cmx utils.cmi
+version.cmo:
+version.cmx:
endif
OBJS := \
- virt_top_version.cmo \
- virt_top_gettext.cmo \
- virt_top_utils.cmo \
- virt_top.cmo
+ version.cmo \
+ opt_gettext.cmo \
+ utils.cmo \
+ top.cmo
ifneq ($(OCAML_PKG_xml_light),no)
-OBJS += virt_top_xml.cmo
+OBJS += opt_xml.cmo
OCAMLCPACKAGES += -package xml-light
endif
ifneq ($(OCAML_PKG_csv),no)
-OBJS += virt_top_csv.cmo
+OBJS += opt_csv.cmo
OCAMLCPACKAGES += -package csv
endif
ifneq ($(OCAML_PKG_calendar),no)
ifeq ($(is_calendar2),no)
-OBJS += virt_top_calendar1.cmo
+OBJS += opt_calendar1.cmo
OCAMLCPACKAGES += -package calendar
else
-OBJS += virt_top_calendar2.cmo
+OBJS += opt_calendar2.cmo
OCAMLCPACKAGES += -package calendar
endif
endif
-OBJS += virt_top_main.cmo
+OBJS += main.cmo
XOBJS := $(OBJS:.cmo=.cmx)
The code is structured into these files:
- virt_top_utils.mli / virt_top_utils.ml
+ utils.mli, utils.ml
String functions and other small utility functions. This is
included directly into virt_top.ml.
- virt_top.mli / virt_top.ml
+ top.mli, top.ml
This is the virt-top program.
The function 'main_loop' runs the main loop and has sub-functions
to deal with keypresses, help screens and so on.
- virt_top_xml.ml
+ opt_gettext.ml
+ A generated file which adds gettext support if ocaml-gettext
+ was found at configure time, or else stubs it out.
+
+ opt_xml.ml
Any code which needs the optional xml-light library goes
in here. Mainly for parsing domain XML descriptions to get
The reason for having it in a separate file is so that we
don't depend on xml-light.
- virt_top_csv.ml
+ opt_csv.ml
Any code which needs the optional ocaml-csv library goes
in here. This implements the --csv command line option.
- virt_top_calendar.ml
+ opt_calendar1.ml, opt_calendar2.ml
Any code which needs the optional ocaml-calendar library
- goes in here. This implements the --end-time command line
- option.
+ (v1 or v2) goes in here. This implements the --end-time
+ command line option.
- virt_top_main.ml
+ main.ml
This is just a small bit of code to glue the modules together
- Virt_top + Virt_top_xml? + Virt_top_csv? + Virt_top_calendar?
+ Top + Opt_xml? + Opt_csv? + Opt_calendar{1,2}?
The man-page is generated from the single file:
open Curses
-open Virt_top_gettext.Gettext
-open Virt_top
+open Opt_gettext.Gettext
+open Top
(* Note: make sure we catch any exceptions and clean up the display.
*
open Printf
open ExtString
-open Virt_top_gettext.Gettext ;;
+open Opt_gettext.Gettext ;;
-Virt_top.parse_date_time :=
+Top.parse_date_time :=
fun time ->
let cal : Calendar.t =
if String.starts_with time "+" then ( (* +something *)
open Printf
open ExtString
-open Virt_top_gettext.Gettext ;;
+open Opt_gettext.Gettext ;;
-Virt_top.parse_date_time :=
+Top.parse_date_time :=
fun time ->
let cal : Calendar.t =
if String.starts_with time "+" then ( (* +something *)
This file contains all code which requires CSV support.
*)
-open Virt_top_gettext.Gettext
+open Opt_gettext.Gettext
(* Output channel, or None if CSV output not enabled. *)
let chan = ref None ;;
-Virt_top.csv_start :=
+Top.csv_start :=
fun filename ->
chan := Some (open_out filename) ;;
-Virt_top.csv_write :=
+Top.csv_write :=
fun row ->
match !chan with
| None -> () (* CSV output not enabled. *)
open ExtList
-open Virt_top_gettext.Gettext
+open Opt_gettext.Gettext
module C = Libvirt.Connect
module D = Libvirt.Domain
module N = Libvirt.Network ;;
-Virt_top.parse_device_xml :=
+Top.parse_device_xml :=
fun id dom ->
try
let xml = D.get_xml_desc dom in
open ExtList
open Curses
-open Virt_top_gettext.Gettext
-open Virt_top_utils
+open Opt_gettext.Gettext
+open Utils
module C = Libvirt.Connect
module D = Libvirt.Domain
and set_end_time time = end_time := Some ((!parse_date_time) time)
and display_version () =
printf "virt-top %s ocaml-libvirt %s\n"
- Virt_top_version.version Libvirt_version.version;
+ Version.version Libvirt_version.version;
exit 0
in
let argspec = Arg.align [
(* Banner at the top of the screen. *)
let banner =
sprintf (f_"virt-top %s ocaml-libvirt %s libvirt %d.%d.%d by Red Hat")
- Virt_top_version.version
+ Version.version
Libvirt_version.version
libvirt_major libvirt_minor libvirt_release in
let banner = pad cols banner in
open Printf
-open Virt_top_gettext.Gettext
+open Opt_gettext.Gettext
module C = Libvirt.Connect
module D = Libvirt.Domain
+++ /dev/null
-virt_top_calendar1.cmo: virt_top_gettext.cmo virt_top.cmi
-virt_top_calendar1.cmx: virt_top_gettext.cmx virt_top.cmx
-virt_top_calendar2.cmo: virt_top_gettext.cmo virt_top.cmi
-virt_top_calendar2.cmx: virt_top_gettext.cmx virt_top.cmx
-virt_top.cmi:
-virt_top.cmo: virt_top_version.cmo virt_top_utils.cmi virt_top_gettext.cmo virt_top.cmi
-virt_top.cmx: virt_top_version.cmx virt_top_utils.cmx virt_top_gettext.cmx virt_top.cmi
-virt_top_csv.cmo: virt_top_gettext.cmo virt_top.cmi
-virt_top_csv.cmx: virt_top_gettext.cmx virt_top.cmx
-virt_top_gettext.cmo:
-virt_top_gettext.cmx:
-virt_top_main.cmo: virt_top_gettext.cmo virt_top.cmi
-virt_top_main.cmx: virt_top_gettext.cmx virt_top.cmx
-virt_top_utils.cmi:
-virt_top_utils.cmo: virt_top_gettext.cmo virt_top_utils.cmi
-virt_top_utils.cmx: virt_top_gettext.cmx virt_top_utils.cmi
-virt_top_version.cmo:
-virt_top_version.cmx:
-virt_top_xml.cmo: virt_top_gettext.cmo virt_top.cmi
-virt_top_xml.cmx: virt_top_gettext.cmx virt_top.cmx