Blame SOURCES/0005-Rename-source-directory-and-files.patch

985088
From b7c3ef13cbd9c9cd49005a32ffb70faf6f5bbe8c Mon Sep 17 00:00:00 2001
985088
From: "Richard W.M. Jones" <rjones@redhat.com>
985088
Date: Mon, 31 Oct 2016 12:01:40 +0000
985088
Subject: [PATCH 05/17] Rename source directory and files.
985088
985088
This renames the source directory from virt-top to src/ and removes
985088
the unnecessary virt_top_* prefix from many source files.
985088
985088
This is entirely refactoring and makes no functional change.
985088
985088
Also this fixes the MANIFEST file and removes old Transifex
985088
configuration, fixing commit defe5bdd4a32e0206a786d279e0f9cfc238e5e17.
985088
---
985088
 .gitignore                                         | 72 +++++++++-------------
985088
 .tx/config                                         |  8 ---
985088
 ChangeLog                                          | 30 +++++++++
985088
 MANIFEST                                           | 41 +++++++-----
985088
 Makefile.in                                        | 15 ++---
985088
 README                                             |  2 +-
985088
 configure.ac                                       | 29 ++++-----
985088
 src/.depend                                        | 20 ++++++
985088
 {virt-top => src}/Makefile.in                      | 18 +++---
985088
 {virt-top => src}/README                           | 22 ++++---
985088
 virt-top/virt_top_main.ml => src/main.ml           |  4 +-
985088
 .../virt_top_calendar1.ml => src/opt_calendar1.ml  |  4 +-
985088
 .../virt_top_calendar2.ml => src/opt_calendar2.ml  |  4 +-
985088
 virt-top/virt_top_csv.ml => src/opt_csv.ml         |  6 +-
985088
 virt-top/virt_top_xml.ml => src/opt_xml.ml         |  4 +-
985088
 virt-top/virt_top.ml => src/top.ml                 |  8 +--
985088
 virt-top/virt_top.mli => src/top.mli               |  0
985088
 virt-top/virt_top_utils.ml => src/utils.ml         |  2 +-
985088
 virt-top/virt_top_utils.mli => src/utils.mli       |  0
985088
 .../virt_top_version.ml.in => src/version.ml.in    |  0
985088
 {virt-top => src}/virt-top.pod                     |  0
985088
 virt-top/.depend                                   | 20 ------
985088
 22 files changed, 163 insertions(+), 146 deletions(-)
985088
 delete mode 100644 .tx/config
985088
 create mode 100644 src/.depend
985088
 rename {virt-top => src}/Makefile.in (91%)
985088
 rename {virt-top => src}/README (77%)
985088
 rename virt-top/virt_top_main.ml => src/main.ml (98%)
985088
 rename virt-top/virt_top_calendar1.ml => src/opt_calendar1.ml (97%)
985088
 rename virt-top/virt_top_calendar2.ml => src/opt_calendar2.ml (97%)
985088
 rename virt-top/virt_top_csv.ml => src/opt_csv.ml (94%)
985088
 rename virt-top/virt_top_xml.ml => src/opt_xml.ml (97%)
985088
 rename virt-top/virt_top.ml => src/top.ml (99%)
985088
 rename virt-top/virt_top.mli => src/top.mli (100%)
985088
 rename virt-top/virt_top_utils.ml => src/utils.ml (99%)
985088
 rename virt-top/virt_top_utils.mli => src/utils.mli (100%)
985088
 rename virt-top/virt_top_version.ml.in => src/version.ml.in (100%)
985088
 rename {virt-top => src}/virt-top.pod (100%)
985088
 delete mode 100644 virt-top/.depend
985088
985088
diff --git a/.gitignore b/.gitignore
985088
index d08e9e2..e3f77e7 100644
985088
--- a/.gitignore
985088
+++ b/.gitignore
985088
@@ -1,50 +1,36 @@
985088
-aclocal.m4
985088
-META
985088
-ocaml-libvirt-*.tar.gz
985088
-ocaml-libvirt-*.exe
985088
-html
985088
-configure
985088
-config.log
985088
-config.status
985088
-config.h
985088
-config.cache
985088
-Makefile
985088
-Make.rules
985088
-*/Makefile
985088
-autom4te.cache
985088
-core
985088
-core.*
985088
+*.a
985088
+*.cma
985088
 *.cmi
985088
 *.cmo
985088
 *.cmx
985088
-*.cma
985088
 *.cmxa
985088
-*.o
985088
-*.so
985088
-*.a
985088
-*.opt
985088
 *.dll
985088
 *.exe
985088
-*~
985088
-libvirt/libvirt_version.ml
985088
-examples/list_domains
985088
-examples/node_info
985088
-mlvirsh/mlvirsh
985088
-virt-ctrl/virt-ctrl
985088
-virt-top/virt-top
985088
-virt-df/virt-df
985088
-wininstaller.nsis
985088
+*.o
985088
+*.opt
985088
 *.orig
985088
-mlvirsh/mlvirsh_gettext.ml
985088
-virt-ctrl/virt_ctrl_gettext.ml
985088
-virt-df/virt_df_gettext.ml
985088
-virt-top/virt_top_gettext.ml
985088
-virt-top/virt_top_version.ml
985088
-po/*.mo
985088
-po/*.po.bak
985088
-virt-df/virt_df_lvm2_lexer.ml
985088
-virt-df/virt_df_lvm2_parser.ml
985088
-virt-df/virt_df_lvm2_parser.mli
985088
-virt-top-*.tar.gz
985088
-virt-top/virt-top.1
985088
-virt-top/virt-top.txt
985088
\ No newline at end of file
985088
+*.so
985088
+*~
985088
+
985088
+META
985088
+Makefile
985088
+aclocal.m4
985088
+config.cache
985088
+config.h
985088
+config.log
985088
+config.status
985088
+configure
985088
+core
985088
+core.*
985088
+html
985088
+
985088
+/Make.rules
985088
+/autom4te.cache
985088
+/po/*.mo
985088
+/po/*.po.bak
985088
+/src/opt_gettext.ml
985088
+/src/version.ml
985088
+/src/virt-top
985088
+/src/virt-top.1
985088
+/src/virt-top.txt
985088
+/virt-top-*.tar.gz
985088
diff --git a/.tx/config b/.tx/config
985088
deleted file mode 100644
985088
index 3e17770..0000000
985088
--- a/.tx/config
985088
+++ /dev/null
985088
@@ -1,8 +0,0 @@
985088
-[main]
985088
-host = https://www.transifex.net
985088
-
985088
-[virttop.virttoppot]
985088
-file_filter = po/<lang>.po
985088
-source_file = po/virt-top.pot
985088
-source_lang = en
985088
-
985088
diff --git a/ChangeLog b/ChangeLog
985088
index 8daca45..1b3999a 100644
985088
--- a/ChangeLog
985088
+++ b/ChangeLog
985088
@@ -1,3 +1,33 @@
985088
+2016-10-31  Richard W.M. Jones  <rjones@redhat.com>
985088
+
985088
+	Rename source directory and files.
985088
+	This renames the source directory from virt-top to src/ and removes
985088
+	the unnecessary virt_top_* prefix from many source files.
985088
+
985088
+	This is entirely refactoring and makes no functional change.
985088
+
985088
+	Also this fixes the MANIFEST file and removes old Transifex
985088
+	configuration, fixing commit defe5bdd4a32e0206a786d279e0f9cfc238e5e17.
985088
+
985088
+2016-01-04  Richard W.M. Jones  <rjones@redhat.com>
985088
+
985088
+	build: Add -g flag to ocamlopt.
985088
+	Modern ocamlopt supports the -g flag fine (very old versions did not).
985088
+
985088
+2015-02-21  Richard W.M. Jones  <rjones@redhat.com>
985088
+
985088
+	Update translations from Zanata.
985088
+
985088
+	Move upstream translations from Tranifex to Zanata.
985088
+	This is at the request of the Fedora localization team.
985088
+	For further information see:
985088
+
985088
+	https://www.redhat.com/archives/libguestfs/2015-February/msg00168.html
985088
+
985088
+2014-08-02  Richard W.M. Jones  <rjones@redhat.com>
985088
+
985088
+	Disable warning about immutable strings (for OCaml 4.02).
985088
+
985088
 2012-10-12  Richard W.M. Jones  <rjones@redhat.com>
985088
 
985088
 	Version 1.0.8.
985088
diff --git a/MANIFEST b/MANIFEST
985088
index c5958d7..2cf377f 100644
985088
--- a/MANIFEST
985088
+++ b/MANIFEST
985088
@@ -14,12 +14,17 @@ Make.rules.in
985088
 MANIFEST
985088
 m4/ocaml.m4
985088
 po/as.po
985088
+po/ca.po
985088
 po/de.po
985088
 po/es.po
985088
+po/eu.po
985088
 po/fr.po
985088
 po/gu.po
985088
+po/hu.po
985088
+po/id.po
985088
 po/it.po
985088
 po/ja.po
985088
+po/ka.po
985088
 po/kn.po
985088
 po/LINGUAS
985088
 po/Makefile.in
985088
@@ -27,30 +32,36 @@ po/ml.po
985088
 po/mr.po
985088
 po/nl.po
985088
 po/or.po
985088
+po/pa.po
985088
 po/pl.po
985088
 po/pt_BR.po
985088
 po/pt.po
985088
 po/POTFILES
985088
 po/ru.po
985088
+po/sr.po
985088
+po/sv.po
985088
 po/te.po
985088
+po/tg.po
985088
+po/tr.po
985088
 po/uk.po
985088
 po/virt-top.pot
985088
+po/zanata-pull.sh
985088
+po/zanata.xml
985088
 po/zh_CN.po
985088
 po/zh_TW.po
985088
 README
985088
 TODO
985088
-.tx/config
985088
-virt-top/.depend
985088
-virt-top/Makefile.in
985088
-virt-top/README
985088
-virt-top/virt-top.pod
985088
-virt-top/virt_top.ml
985088
-virt-top/virt_top.mli
985088
-virt-top/virt_top_calendar1.ml
985088
-virt-top/virt_top_calendar2.ml
985088
-virt-top/virt_top_csv.ml
985088
-virt-top/virt_top_main.ml
985088
-virt-top/virt_top_utils.ml
985088
-virt-top/virt_top_utils.mli
985088
-virt-top/virt_top_version.ml.in
985088
-virt-top/virt_top_xml.ml
985088
+src/.depend
985088
+src/Makefile.in
985088
+src/README
985088
+src/main.ml
985088
+src/opt_calendar1.ml
985088
+src/opt_calendar2.ml
985088
+src/opt_csv.ml
985088
+src/opt_xml.ml
985088
+src/top.ml
985088
+src/top.mli
985088
+src/utils.ml
985088
+src/utils.mli
985088
+src/version.ml.in
985088
+src/virt-top.pod
985088
diff --git a/Makefile.in b/Makefile.in
985088
index b310e58..d0aec17 100644
985088
--- a/Makefile.in
985088
+++ b/Makefile.in
985088
@@ -22,25 +22,22 @@ INSTALL		= @INSTALL@
985088
 
985088
 MAKENSIS	= @MAKENSIS@
985088
 
985088
-SUBDIRS		= virt-top
985088
+SUBDIRS		= src
985088
 
985088
 all opt depend install:
985088
-	for d in $(SUBDIRS); do \
985088
-	  $(MAKE) -C $$d $@; \
985088
-	  if [ $$? -ne 0 ]; then exit 1; fi; \
985088
-	done
985088
+	$(MAKE) -C src $@
985088
 
985088
 clean:
985088
 	for d in . $(SUBDIRS); do \
985088
 	  (cd $$d; rm -f *.cmi *.cmo *.cmx *.cma *.cmxa *.o *.a *.so *.opt *~ *.dll *.exe core); \
985088
 	done
985088
-	rm -f virt-top/virt-top
985088
+	rm -f src/virt-top
985088
 
985088
 distclean: clean
985088
 	rm -f config.h config.log config.status configure
985088
 	rm -rf autom4te.cache
985088
 	rm -f Makefile
985088
-	rm -f virt-top/Makefile
985088
+	rm -f src/Makefile
985088
 
985088
 # Distribution.
985088
 
985088
@@ -51,8 +48,8 @@ dist: ChangeLog
985088
 	tar -cf - -T MANIFEST | tar -C $(PACKAGE)-$(VERSION) -xf -
985088
 	$(INSTALL) -m 0755 configure $(PACKAGE)-$(VERSION)/
985088
 	$(INSTALL) -m 0644 aclocal.m4 $(PACKAGE)-$(VERSION)/
985088
-	$(INSTALL) -m 0644 virt-top/virt-top.1 $(PACKAGE)-$(VERSION)/virt-top/
985088
-	$(INSTALL) -m 0644 virt-top/virt-top.txt $(PACKAGE)-$(VERSION)/virt-top/
985088
+	$(INSTALL) -m 0644 src/virt-top.1 $(PACKAGE)-$(VERSION)/src/
985088
+	$(INSTALL) -m 0644 src/virt-top.txt $(PACKAGE)-$(VERSION)/src/
985088
 	tar zcf $(PACKAGE)-$(VERSION).tar.gz $(PACKAGE)-$(VERSION)
985088
 	rm -rf $(PACKAGE)-$(VERSION)
985088
 	ls -l $(PACKAGE)-$(VERSION).tar.gz
985088
diff --git a/README b/README
985088
index 5a8bc87..d97fa62 100644
985088
--- a/README
985088
+++ b/README
985088
@@ -1,7 +1,7 @@
985088
 virt-top
985088
 ----------------------------------------------------------------------
985088
 
985088
-Copyright (C) 2007-2012 Richard W.M. Jones, Red Hat Inc.
985088
+Copyright (C) 2007-2016 Richard W.M. Jones, Red Hat Inc.
985088
 http://et.redhat.com/~rjones/virt-top/
985088
 http://libvirt.org/ocaml/
985088
 http://libvirt.org/
985088
diff --git a/configure.ac b/configure.ac
985088
index 0d41cda..ad65465 100644
985088
--- a/configure.ac
985088
+++ b/configure.ac
985088
@@ -84,26 +84,24 @@ AC_CHECK_PROG(MSGFMT,msgfmt,msgfmt)
985088
 
985088
 dnl Write gettext modules for the programs.
985088
 dnl http://www.le-gall.net/sylvain+violaine/documentation/ocaml-gettext/html/reference-manual/ch03s04.html
985088
-for d in virt-top; do
985088
-    f=`echo $d | tr - _`_gettext.ml
985088
-    AC_MSG_NOTICE([creating $d/$f])
985088
-    rm -f $d/$f
985088
-    echo "(* This file is generated automatically by ./configure. *)" > $d/$f
985088
-    if test "x$OCAML_PKG_gettext" != "xno"; then
985088
-        # Gettext module is available, so use it.
985088
-        cat <<EOT >>$d/$f
985088
+AC_MSG_NOTICE([creating src/opt_gettext.ml])
985088
+rm -f src/opt_gettext.ml
985088
+echo "(* This file is generated automatically by ./configure. *)" > src/opt_gettext.ml
985088
+if test "x$OCAML_PKG_gettext" != "xno"; then
985088
+    # Gettext module is available, so use it.
985088
+    cat <<EOT >>src/opt_gettext.ml
985088
 module Gettext = Gettext.Program (
985088
   struct
985088
-    let textdomain = "$d"
985088
+    let textdomain = "virt-top"
985088
     let codeset = None
985088
     let dir = None
985088
     let dependencies = [[]]
985088
   end
985088
 ) (GettextStub.Native)
985088
 EOT
985088
-    else
985088
-        # No gettext module is available, so fake the translation functions.
985088
-        cat <<EOT >>$d/$f
985088
+else
985088
+    # No gettext module is available, so fake the translation functions.
985088
+    cat <<EOT >>src/opt_gettext.ml
985088
 module Gettext = struct
985088
   external s_ : string -> string = "%identity"
985088
   external f_ : ('a -> 'b, 'c, 'd) format -> ('a -> 'b, 'c, 'd) format
985088
@@ -115,8 +113,7 @@ module Gettext = struct
985088
     = fun s p n -> if n = 1 then s else p
985088
 end
985088
 EOT
985088
-    fi
985088
-done
985088
+fi
985088
 
985088
 dnl Summary.
985088
 echo "------------------------------------------------------------"
985088
@@ -128,7 +125,7 @@ AC_CONFIG_HEADERS([config.h])
985088
 AC_CONFIG_FILES([Makefile
985088
 	Make.rules
985088
 	po/Makefile
985088
-	virt-top/Makefile
985088
-	virt-top/virt_top_version.ml
985088
+	src/Makefile
985088
+	src/version.ml
985088
 	])
985088
 AC_OUTPUT
985088
diff --git a/src/.depend b/src/.depend
985088
new file mode 100644
985088
index 0000000..5325c54
985088
--- /dev/null
985088
+++ b/src/.depend
985088
@@ -0,0 +1,20 @@
985088
+main.cmo: top.cmi opt_gettext.cmo
985088
+main.cmx: top.cmx opt_gettext.cmx
985088
+opt_calendar1.cmo: top.cmi opt_gettext.cmo
985088
+opt_calendar1.cmx: top.cmx opt_gettext.cmx
985088
+opt_calendar2.cmo: top.cmi opt_gettext.cmo
985088
+opt_calendar2.cmx: top.cmx opt_gettext.cmx
985088
+opt_csv.cmo: top.cmi opt_gettext.cmo
985088
+opt_csv.cmx: top.cmx opt_gettext.cmx
985088
+opt_gettext.cmo:
985088
+opt_gettext.cmx:
985088
+opt_xml.cmo: top.cmi opt_gettext.cmo
985088
+opt_xml.cmx: top.cmx opt_gettext.cmx
985088
+top.cmi:
985088
+top.cmo: version.cmo utils.cmi opt_gettext.cmo top.cmi
985088
+top.cmx: version.cmx utils.cmx opt_gettext.cmx top.cmi
985088
+utils.cmi:
985088
+utils.cmo: opt_gettext.cmo utils.cmi
985088
+utils.cmx: opt_gettext.cmx utils.cmi
985088
+version.cmo:
985088
+version.cmx:
985088
diff --git a/virt-top/Makefile.in b/src/Makefile.in
985088
similarity index 91%
985088
rename from virt-top/Makefile.in
985088
rename to src/Makefile.in
985088
index e149b26..d29f2e8 100755
985088
--- a/virt-top/Makefile.in
985088
+++ b/src/Makefile.in
985088
@@ -39,28 +39,28 @@ OCAMLCPACKAGES  += -package gettext-stub
985088
 endif
985088
 
985088
 OBJS		:= \
985088
-		   virt_top_version.cmo \
985088
-		   virt_top_gettext.cmo \
985088
-		   virt_top_utils.cmo \
985088
-		   virt_top.cmo
985088
+		   version.cmo \
985088
+		   opt_gettext.cmo \
985088
+		   utils.cmo \
985088
+		   top.cmo
985088
 ifneq ($(OCAML_PKG_xml_light),no)
985088
-OBJS		+= virt_top_xml.cmo
985088
+OBJS		+= opt_xml.cmo
985088
 OCAMLCPACKAGES	+= -package xml-light
985088
 endif
985088
 ifneq ($(OCAML_PKG_csv),no)
985088
-OBJS		+= virt_top_csv.cmo
985088
+OBJS		+= opt_csv.cmo
985088
 OCAMLCPACKAGES	+= -package csv
985088
 endif
985088
 ifneq ($(OCAML_PKG_calendar),no)
985088
 ifeq ($(is_calendar2),no)
985088
-OBJS		+= virt_top_calendar1.cmo
985088
+OBJS		+= opt_calendar1.cmo
985088
 OCAMLCPACKAGES	+= -package calendar
985088
 else
985088
-OBJS		+= virt_top_calendar2.cmo
985088
+OBJS		+= opt_calendar2.cmo
985088
 OCAMLCPACKAGES	+= -package calendar
985088
 endif
985088
 endif
985088
-OBJS		+= virt_top_main.cmo
985088
+OBJS		+= main.cmo
985088
 
985088
 XOBJS		:= $(OBJS:.cmo=.cmx)
985088
 
985088
diff --git a/virt-top/README b/src/README
985088
similarity index 77%
985088
rename from virt-top/README
985088
rename to src/README
985088
index b594f95..47382a5 100755
985088
--- a/virt-top/README
985088
+++ b/src/README
985088
@@ -1,11 +1,11 @@
985088
 The code is structured into these files:
985088
 
985088
-  virt_top_utils.mli / virt_top_utils.ml
985088
+  utils.mli, utils.ml
985088
 
985088
     String functions and other small utility functions.  This is
985088
     included directly into virt_top.ml.
985088
 
985088
-  virt_top.mli / virt_top.ml
985088
+  top.mli, top.ml
985088
 
985088
     This is the virt-top program.
985088
 
985088
@@ -22,7 +22,11 @@ The code is structured into these files:
985088
     The function 'main_loop' runs the main loop and has sub-functions
985088
     to deal with keypresses, help screens and so on.
985088
 
985088
-  virt_top_xml.ml
985088
+  opt_gettext.ml
985088
+    A generated file which adds gettext support if ocaml-gettext
985088
+    was found at configure time, or else stubs it out.
985088
+
985088
+  opt_xml.ml
985088
 
985088
     Any code which needs the optional xml-light library goes
985088
     in here.  Mainly for parsing domain XML descriptions to get
985088
@@ -31,21 +35,21 @@ The code is structured into these files:
985088
     The reason for having it in a separate file is so that we
985088
     don't depend on xml-light.
985088
 
985088
-  virt_top_csv.ml
985088
+  opt_csv.ml
985088
 
985088
     Any code which needs the optional ocaml-csv library goes
985088
     in here.  This implements the --csv command line option.
985088
 
985088
-  virt_top_calendar.ml
985088
+  opt_calendar1.ml, opt_calendar2.ml
985088
 
985088
     Any code which needs the optional ocaml-calendar library
985088
-    goes in here.  This implements the --end-time command line
985088
-    option.
985088
+    (v1 or v2) goes in here.  This implements the --end-time
985088
+    command line option.
985088
 
985088
-  virt_top_main.ml
985088
+  main.ml
985088
 
985088
     This is just a small bit of code to glue the modules together
985088
-    Virt_top + Virt_top_xml? + Virt_top_csv? + Virt_top_calendar?
985088
+    Top + Opt_xml? + Opt_csv? + Opt_calendar{1,2}?
985088
 
985088
 The man-page is generated from the single file:
985088
 
985088
diff --git a/virt-top/virt_top_main.ml b/src/main.ml
985088
similarity index 98%
985088
rename from virt-top/virt_top_main.ml
985088
rename to src/main.ml
985088
index e8c4425..34d13c8 100644
985088
--- a/virt-top/virt_top_main.ml
985088
+++ b/src/main.ml
985088
@@ -21,8 +21,8 @@
985088
 
985088
 open Curses
985088
 
985088
-open Virt_top_gettext.Gettext
985088
-open Virt_top
985088
+open Opt_gettext.Gettext
985088
+open Top
985088
 
985088
 (* Note: make sure we catch any exceptions and clean up the display.
985088
  *
985088
diff --git a/virt-top/virt_top_calendar1.ml b/src/opt_calendar1.ml
985088
similarity index 97%
985088
rename from virt-top/virt_top_calendar1.ml
985088
rename to src/opt_calendar1.ml
985088
index 534465c..2c459fe 100755
985088
--- a/virt-top/virt_top_calendar1.ml
985088
+++ b/src/opt_calendar1.ml
985088
@@ -22,9 +22,9 @@
985088
 open Printf
985088
 open ExtString
985088
 
985088
-open Virt_top_gettext.Gettext ;;
985088
+open Opt_gettext.Gettext ;;
985088
 
985088
-Virt_top.parse_date_time :=
985088
+Top.parse_date_time :=
985088
 fun time ->
985088
   let cal : Calendar.t =
985088
     if String.starts_with time "+" then ( (* +something *)
985088
diff --git a/virt-top/virt_top_calendar2.ml b/src/opt_calendar2.ml
985088
similarity index 97%
985088
rename from virt-top/virt_top_calendar2.ml
985088
rename to src/opt_calendar2.ml
985088
index cc82eec..fd93704 100755
985088
--- a/virt-top/virt_top_calendar2.ml
985088
+++ b/src/opt_calendar2.ml
985088
@@ -24,9 +24,9 @@ open CalendarLib
985088
 open Printf
985088
 open ExtString
985088
 
985088
-open Virt_top_gettext.Gettext ;;
985088
+open Opt_gettext.Gettext ;;
985088
 
985088
-Virt_top.parse_date_time :=
985088
+Top.parse_date_time :=
985088
 fun time ->
985088
   let cal : Calendar.t =
985088
     if String.starts_with time "+" then ( (* +something *)
985088
diff --git a/virt-top/virt_top_csv.ml b/src/opt_csv.ml
985088
similarity index 94%
985088
rename from virt-top/virt_top_csv.ml
985088
rename to src/opt_csv.ml
985088
index e048856..6c3b2be 100644
985088
--- a/virt-top/virt_top_csv.ml
985088
+++ b/src/opt_csv.ml
985088
@@ -19,16 +19,16 @@
985088
    This file contains all code which requires CSV support.
985088
 *)
985088
 
985088
-open Virt_top_gettext.Gettext
985088
+open Opt_gettext.Gettext
985088
 
985088
 (* Output channel, or None if CSV output not enabled. *)
985088
 let chan = ref None ;;
985088
 
985088
-Virt_top.csv_start :=
985088
+Top.csv_start :=
985088
   fun filename ->
985088
     chan := Some (open_out filename) ;;
985088
 
985088
-Virt_top.csv_write :=
985088
+Top.csv_write :=
985088
   fun row ->
985088
     match !chan with
985088
     | None -> ()			(* CSV output not enabled. *)
985088
diff --git a/virt-top/virt_top_xml.ml b/src/opt_xml.ml
985088
similarity index 97%
985088
rename from virt-top/virt_top_xml.ml
985088
rename to src/opt_xml.ml
985088
index ab291d3..bb83780 100644
985088
--- a/virt-top/virt_top_xml.ml
985088
+++ b/src/opt_xml.ml
985088
@@ -21,13 +21,13 @@
985088
 
985088
 open ExtList
985088
 
985088
-open Virt_top_gettext.Gettext
985088
+open Opt_gettext.Gettext
985088
 
985088
 module C = Libvirt.Connect
985088
 module D = Libvirt.Domain
985088
 module N = Libvirt.Network ;;
985088
 
985088
-Virt_top.parse_device_xml :=
985088
+Top.parse_device_xml :=
985088
 fun id dom ->
985088
   try
985088
     let xml = D.get_xml_desc dom in
985088
diff --git a/virt-top/virt_top.ml b/src/top.ml
985088
similarity index 99%
985088
rename from virt-top/virt_top.ml
985088
rename to src/top.ml
985088
index 0aae24e..38658c6 100644
985088
--- a/virt-top/virt_top.ml
985088
+++ b/src/top.ml
985088
@@ -21,8 +21,8 @@ open Printf
985088
 open ExtList
985088
 open Curses
985088
 
985088
-open Virt_top_gettext.Gettext
985088
-open Virt_top_utils
985088
+open Opt_gettext.Gettext
985088
+open Utils
985088
 
985088
 module C = Libvirt.Connect
985088
 module D = Libvirt.Domain
985088
@@ -159,7 +159,7 @@ let start_up () =
985088
   and set_end_time time = end_time := Some ((!parse_date_time) time)
985088
   and display_version () =
985088
     printf "virt-top %s ocaml-libvirt %s\n"
985088
-      Virt_top_version.version Libvirt_version.version;
985088
+      Version.version Libvirt_version.version;
985088
     exit 0
985088
   in
985088
   let argspec = Arg.align [
985088
@@ -1723,7 +1723,7 @@ and show_help (_, _, _, _, _, _, hostname,
985088
   (* Banner at the top of the screen. *)
985088
   let banner =
985088
     sprintf (f_"virt-top %s ocaml-libvirt %s libvirt %d.%d.%d by Red Hat")
985088
-      Virt_top_version.version
985088
+      Version.version
985088
       Libvirt_version.version
985088
       libvirt_major libvirt_minor libvirt_release in
985088
   let banner = pad cols banner in
985088
diff --git a/virt-top/virt_top.mli b/src/top.mli
985088
similarity index 100%
985088
rename from virt-top/virt_top.mli
985088
rename to src/top.mli
985088
diff --git a/virt-top/virt_top_utils.ml b/src/utils.ml
985088
similarity index 99%
985088
rename from virt-top/virt_top_utils.ml
985088
rename to src/utils.ml
985088
index c5dc97d..3dc637d 100644
985088
--- a/virt-top/virt_top_utils.ml
985088
+++ b/src/utils.ml
985088
@@ -21,7 +21,7 @@
985088
 
985088
 open Printf
985088
 
985088
-open Virt_top_gettext.Gettext
985088
+open Opt_gettext.Gettext
985088
 
985088
 module C = Libvirt.Connect
985088
 module D = Libvirt.Domain
985088
diff --git a/virt-top/virt_top_utils.mli b/src/utils.mli
985088
similarity index 100%
985088
rename from virt-top/virt_top_utils.mli
985088
rename to src/utils.mli
985088
diff --git a/virt-top/virt_top_version.ml.in b/src/version.ml.in
985088
similarity index 100%
985088
rename from virt-top/virt_top_version.ml.in
985088
rename to src/version.ml.in
985088
diff --git a/virt-top/virt-top.pod b/src/virt-top.pod
985088
similarity index 100%
985088
rename from virt-top/virt-top.pod
985088
rename to src/virt-top.pod
985088
diff --git a/virt-top/.depend b/virt-top/.depend
985088
deleted file mode 100644
985088
index 46099b7..0000000
985088
--- a/virt-top/.depend
985088
+++ /dev/null
985088
@@ -1,20 +0,0 @@
985088
-virt_top_calendar1.cmo: virt_top_gettext.cmo virt_top.cmi
985088
-virt_top_calendar1.cmx: virt_top_gettext.cmx virt_top.cmx
985088
-virt_top_calendar2.cmo: virt_top_gettext.cmo virt_top.cmi
985088
-virt_top_calendar2.cmx: virt_top_gettext.cmx virt_top.cmx
985088
-virt_top.cmi:
985088
-virt_top.cmo: virt_top_version.cmo virt_top_utils.cmi virt_top_gettext.cmo virt_top.cmi
985088
-virt_top.cmx: virt_top_version.cmx virt_top_utils.cmx virt_top_gettext.cmx virt_top.cmi
985088
-virt_top_csv.cmo: virt_top_gettext.cmo virt_top.cmi
985088
-virt_top_csv.cmx: virt_top_gettext.cmx virt_top.cmx
985088
-virt_top_gettext.cmo:
985088
-virt_top_gettext.cmx:
985088
-virt_top_main.cmo: virt_top_gettext.cmo virt_top.cmi
985088
-virt_top_main.cmx: virt_top_gettext.cmx virt_top.cmx
985088
-virt_top_utils.cmi:
985088
-virt_top_utils.cmo: virt_top_gettext.cmo virt_top_utils.cmi
985088
-virt_top_utils.cmx: virt_top_gettext.cmx virt_top_utils.cmi
985088
-virt_top_version.cmo:
985088
-virt_top_version.cmx:
985088
-virt_top_xml.cmo: virt_top_gettext.cmo virt_top.cmi
985088
-virt_top_xml.cmx: virt_top_gettext.cmx virt_top.cmx
985088
-- 
985088
2.9.3
985088