[Pkg-libvirt-commits] [libguestfs] 223/233: generator: Sort most output.
Hilko Bengen
bengen at moszumanska.debian.org
Wed Feb 19 21:12:30 UTC 2014
This is an automated email from the git hooks/post-receive script.
bengen pushed a commit to branch experimental
in repository libguestfs.
commit 6cc521dc4533d10659214cc660f31239de9e28e7
Author: Richard W.M. Jones <rjones at redhat.com>
Date: Sat Feb 15 20:27:12 2014 +0000
generator: Sort most output.
Look for use of external_functions and fish_functions and replace with
use of external_functions_sorted and fish_functions_sorted where
possible. This ensures that the output of the generator is sorted as
far as possible.
I also checked for uses of internal_functions and documented_functions
but those are not used. The *_sorted versions are always used
instead.
---
generator/fish.ml | 6 +-
generator/gobject.ml | 6 +-
generator/haskell.ml | 4 +-
generator/java.ml | 4 +-
generator/main.ml | 2 +-
generator/perl.ml | 2 +-
generator/python.ml | 6 +-
generator/ruby.ml | 4 +-
gobject/Makefile.inc | 152 +++++++++++++++++++++++++--------------------------
9 files changed, 93 insertions(+), 93 deletions(-)
diff --git a/generator/fish.ml b/generator/fish.ml
index 477fb29..fb3d0f6 100644
--- a/generator/fish.ml
+++ b/generator/fish.ml
@@ -80,7 +80,7 @@ let generate_fish_cmds () =
fun { name = name } ->
pr "static int run_%s (const char *cmd, size_t argc, char *argv[]);\n"
name
- ) fish_functions;
+ ) fish_functions_sorted;
pr "\n";
@@ -170,7 +170,7 @@ Guestfish will prompt for these separately."
pr " .run = run_%s\n" name;
pr "};\n";
pr "\n";
- ) fish_functions;
+ ) fish_functions_sorted;
(* list_commands function, which implements guestfish -h *)
pr "void\n";
@@ -657,7 +657,7 @@ Guestfish will prompt for these separately."
pr " return ret;\n";
pr "}\n";
pr "\n"
- ) fish_functions;
+ ) fish_functions_sorted;
(* run_action function *)
pr "int\n";
diff --git a/generator/gobject.ml b/generator/gobject.ml
index 8080cbf..499837a 100644
--- a/generator/gobject.ml
+++ b/generator/gobject.ml
@@ -116,7 +116,7 @@ let filenames =
function
| { style = _, _, (_::_) } -> true
| { style = _, _, [] } -> false
- ) external_functions
+ ) external_functions_sorted
)
let header_start filename =
@@ -706,7 +706,7 @@ gboolean guestfs_session_close (GuestfsSession *session, GError **err);
fun ({ name = name; style = style } as f) ->
generate_gobject_proto name style f;
pr ";\n";
- ) external_functions;
+ ) external_functions_sorted;
header_end filename
@@ -1293,4 +1293,4 @@ guestfs_session_close (GuestfsSession *session, GError **err)
);
pr "}\n";
- ) external_functions
+ ) external_functions_sorted
diff --git a/generator/haskell.ml b/generator/haskell.ml
index ca2a1ce..efffa1e 100644
--- a/generator/haskell.ml
+++ b/generator/haskell.ml
@@ -60,7 +60,7 @@ module Guestfs (
List.iter (
fun { name = name; style = style } ->
if can_generate style then pr ",\n %s" name
- ) external_functions;
+ ) external_functions_sorted;
pr "
) where
@@ -208,7 +208,7 @@ assocListOfHashtable (a:b:rest) = (a,b) : assocListOfHashtable rest
);
pr "\n";
)
- ) external_functions
+ ) external_functions_sorted
and generate_haskell_prototype ~handle ?(hs = false) (ret, args, optargs) =
pr "%s -> " handle;
diff --git a/generator/java.ml b/generator/java.ml
index 2e54483..2477e35 100644
--- a/generator/java.ml
+++ b/generator/java.ml
@@ -389,7 +389,7 @@ public class GuestFS {
generate_java_prototype ~privat:true ~native:true f.name f.style;
pr "\n";
pr "\n";
- ) external_functions;
+ ) external_functions_sorted;
pr "}\n"
@@ -1114,7 +1114,7 @@ get_all_event_callbacks (guestfs_h *g, size_t *len_rtn)
pr "}\n";
pr "\n"
- ) external_functions
+ ) external_functions_sorted
and generate_java_struct_return typ jtyp cols =
pr " cl = (*env)->FindClass (env, \"com/redhat/et/libguestfs/%s\");\n" jtyp;
diff --git a/generator/main.ml b/generator/main.ml
index f3e043e..d1fa4d2 100644
--- a/generator/main.ml
+++ b/generator/main.ml
@@ -196,7 +196,7 @@ Run it from the top source directory using the command
output_to filename
(generate_gobject_optargs_source short name optargs f)
| { style = _, _, [] } -> ()
- ) external_functions;
+ ) external_functions_sorted;
delete_except_generated "gobject/include/guestfs-gobject/optargs-*.h";
delete_except_generated "gobject/src/optargs-*.c";
diff --git a/generator/perl.ml b/generator/perl.ml
index 9d368a2..3da45fd 100644
--- a/generator/perl.ml
+++ b/generator/perl.ml
@@ -577,7 +577,7 @@ PREINIT:
);
pr "\n"
- ) external_functions
+ ) external_functions_sorted
and generate_perl_struct_list_code typ cols name style n =
pr " if (r == NULL)\n";
diff --git a/generator/python.ml b/generator/python.ml
index 607ca88..72bc8a0 100644
--- a/generator/python.ml
+++ b/generator/python.ml
@@ -518,7 +518,7 @@ put_table (char * const * const argv)
pr " return py_r;\n";
pr "}\n";
pr "\n"
- ) external_functions;
+ ) external_functions_sorted;
(* Table of functions. *)
pr "static PyMethodDef methods[] = {\n";
@@ -534,7 +534,7 @@ put_table (char * const * const argv)
fun { name = name } ->
pr " { (char *) \"%s\", py_guestfs_%s, METH_VARARGS, NULL },\n"
name name
- ) external_functions;
+ ) external_functions_sorted;
pr " { NULL, NULL, 0, NULL }\n";
pr "};\n";
pr "\n";
@@ -823,4 +823,4 @@ class GuestFS(object):
fun alias ->
pr " %s = %s\n\n" alias f.name
) f.non_c_aliases
- ) external_functions
+ ) external_functions_sorted
diff --git a/generator/ruby.ml b/generator/ruby.ml
index f2d700e..1111993 100644
--- a/generator/ruby.ml
+++ b/generator/ruby.ml
@@ -743,7 +743,7 @@ get_all_event_callbacks (guestfs_h *g, size_t *len_rtn)
pr "}\n";
pr "\n"
- ) external_functions;
+ ) external_functions_sorted;
pr "\
extern void Init__guestfs (void); /* keep GCC warnings happy */
@@ -804,7 +804,7 @@ Init__guestfs (void)
pr " rb_define_method (c_guestfs, \"%s\",\n" alias;
pr " ruby_guestfs_%s, %d);\n" name nr_args
) non_c_aliases
- ) external_functions;
+ ) external_functions_sorted;
pr "}\n"
diff --git a/gobject/Makefile.inc b/gobject/Makefile.inc
index 7a8493a..cfb6ed3 100644
--- a/gobject/Makefile.inc
+++ b/gobject/Makefile.inc
@@ -43,58 +43,58 @@ guestfs_gobject_headers= \
include/guestfs-gobject/struct-utsname.h \
include/guestfs-gobject/struct-hivex_node.h \
include/guestfs-gobject/struct-hivex_value.h \
- include/guestfs-gobject/optargs-internal_test.h \
- include/guestfs-gobject/optargs-internal_test_only_optargs.h \
- include/guestfs-gobject/optargs-internal_test_63_optargs.h \
- include/guestfs-gobject/optargs-add_drive.h \
include/guestfs-gobject/optargs-add_domain.h \
- include/guestfs-gobject/optargs-inspect_get_icon.h \
- include/guestfs-gobject/optargs-mount_local.h \
- include/guestfs-gobject/optargs-umount_local.h \
+ include/guestfs-gobject/optargs-add_drive.h \
include/guestfs-gobject/optargs-add_drive_scratch.h \
- include/guestfs-gobject/optargs-disk_create.h \
- include/guestfs-gobject/optargs-is_file.h \
- include/guestfs-gobject/optargs-is_dir.h \
- include/guestfs-gobject/optargs-umount.h \
- include/guestfs-gobject/optargs-tar_in.h \
- include/guestfs-gobject/optargs-tar_out.h \
- include/guestfs-gobject/optargs-mkswap.h \
- include/guestfs-gobject/optargs-grep.h \
- include/guestfs-gobject/optargs-is_chardev.h \
- include/guestfs-gobject/optargs-is_blockdev.h \
- include/guestfs-gobject/optargs-is_fifo.h \
- include/guestfs-gobject/optargs-is_socket.h \
- include/guestfs-gobject/optargs-mkfs.h \
- include/guestfs-gobject/optargs-mount_9p.h \
- include/guestfs-gobject/optargs-ntfsresize.h \
include/guestfs-gobject/optargs-btrfs_filesystem_resize.h \
- include/guestfs-gobject/optargs-compress_out.h \
+ include/guestfs-gobject/optargs-btrfs_fsck.h \
include/guestfs-gobject/optargs-compress_device_out.h \
+ include/guestfs-gobject/optargs-compress_out.h \
+ include/guestfs-gobject/optargs-copy_attributes.h \
include/guestfs-gobject/optargs-copy_device_to_device.h \
include/guestfs-gobject/optargs-copy_device_to_file.h \
include/guestfs-gobject/optargs-copy_file_to_device.h \
include/guestfs-gobject/optargs-copy_file_to_file.h \
- include/guestfs-gobject/optargs-tune2fs.h \
- include/guestfs-gobject/optargs-md_create.h \
+ include/guestfs-gobject/optargs-disk_create.h \
include/guestfs-gobject/optargs-e2fsck.h \
- include/guestfs-gobject/optargs-ntfsfix.h \
- include/guestfs-gobject/optargs-ntfsclone_out.h \
- include/guestfs-gobject/optargs-mkfs_btrfs.h \
- include/guestfs-gobject/optargs-set_e2attrs.h \
- include/guestfs-gobject/optargs-btrfs_fsck.h \
include/guestfs-gobject/optargs-fstrim.h \
- include/guestfs-gobject/optargs-xfs_growfs.h \
- include/guestfs-gobject/optargs-rsync.h \
- include/guestfs-gobject/optargs-rsync_in.h \
- include/guestfs-gobject/optargs-rsync_out.h \
- include/guestfs-gobject/optargs-xfs_admin.h \
+ include/guestfs-gobject/optargs-grep.h \
include/guestfs-gobject/optargs-hivex_open.h \
- include/guestfs-gobject/optargs-xfs_repair.h \
+ include/guestfs-gobject/optargs-inspect_get_icon.h \
+ include/guestfs-gobject/optargs-internal_test.h \
+ include/guestfs-gobject/optargs-internal_test_63_optargs.h \
+ include/guestfs-gobject/optargs-internal_test_only_optargs.h \
+ include/guestfs-gobject/optargs-is_blockdev.h \
+ include/guestfs-gobject/optargs-is_chardev.h \
+ include/guestfs-gobject/optargs-is_dir.h \
+ include/guestfs-gobject/optargs-is_fifo.h \
+ include/guestfs-gobject/optargs-is_file.h \
+ include/guestfs-gobject/optargs-is_socket.h \
+ include/guestfs-gobject/optargs-md_create.h \
include/guestfs-gobject/optargs-mke2fs.h \
+ include/guestfs-gobject/optargs-mkfs.h \
+ include/guestfs-gobject/optargs-mkfs_btrfs.h \
+ include/guestfs-gobject/optargs-mkswap.h \
include/guestfs-gobject/optargs-mktemp.h \
- include/guestfs-gobject/optargs-syslinux.h \
+ include/guestfs-gobject/optargs-mount_9p.h \
+ include/guestfs-gobject/optargs-mount_local.h \
+ include/guestfs-gobject/optargs-ntfsclone_out.h \
+ include/guestfs-gobject/optargs-ntfsfix.h \
+ include/guestfs-gobject/optargs-ntfsresize.h \
include/guestfs-gobject/optargs-remount.h \
- include/guestfs-gobject/optargs-copy_attributes.h
+ include/guestfs-gobject/optargs-rsync.h \
+ include/guestfs-gobject/optargs-rsync_in.h \
+ include/guestfs-gobject/optargs-rsync_out.h \
+ include/guestfs-gobject/optargs-set_e2attrs.h \
+ include/guestfs-gobject/optargs-syslinux.h \
+ include/guestfs-gobject/optargs-tar_in.h \
+ include/guestfs-gobject/optargs-tar_out.h \
+ include/guestfs-gobject/optargs-tune2fs.h \
+ include/guestfs-gobject/optargs-umount.h \
+ include/guestfs-gobject/optargs-umount_local.h \
+ include/guestfs-gobject/optargs-xfs_admin.h \
+ include/guestfs-gobject/optargs-xfs_growfs.h \
+ include/guestfs-gobject/optargs-xfs_repair.h
guestfs_gobject_sources= \
src/session.c \
@@ -119,55 +119,55 @@ guestfs_gobject_sources= \
src/struct-utsname.c \
src/struct-hivex_node.c \
src/struct-hivex_value.c \
- src/optargs-internal_test.c \
- src/optargs-internal_test_only_optargs.c \
- src/optargs-internal_test_63_optargs.c \
- src/optargs-add_drive.c \
src/optargs-add_domain.c \
- src/optargs-inspect_get_icon.c \
- src/optargs-mount_local.c \
- src/optargs-umount_local.c \
+ src/optargs-add_drive.c \
src/optargs-add_drive_scratch.c \
- src/optargs-disk_create.c \
- src/optargs-is_file.c \
- src/optargs-is_dir.c \
- src/optargs-umount.c \
- src/optargs-tar_in.c \
- src/optargs-tar_out.c \
- src/optargs-mkswap.c \
- src/optargs-grep.c \
- src/optargs-is_chardev.c \
- src/optargs-is_blockdev.c \
- src/optargs-is_fifo.c \
- src/optargs-is_socket.c \
- src/optargs-mkfs.c \
- src/optargs-mount_9p.c \
- src/optargs-ntfsresize.c \
src/optargs-btrfs_filesystem_resize.c \
- src/optargs-compress_out.c \
+ src/optargs-btrfs_fsck.c \
src/optargs-compress_device_out.c \
+ src/optargs-compress_out.c \
+ src/optargs-copy_attributes.c \
src/optargs-copy_device_to_device.c \
src/optargs-copy_device_to_file.c \
src/optargs-copy_file_to_device.c \
src/optargs-copy_file_to_file.c \
- src/optargs-tune2fs.c \
- src/optargs-md_create.c \
+ src/optargs-disk_create.c \
src/optargs-e2fsck.c \
- src/optargs-ntfsfix.c \
- src/optargs-ntfsclone_out.c \
- src/optargs-mkfs_btrfs.c \
- src/optargs-set_e2attrs.c \
- src/optargs-btrfs_fsck.c \
src/optargs-fstrim.c \
- src/optargs-xfs_growfs.c \
- src/optargs-rsync.c \
- src/optargs-rsync_in.c \
- src/optargs-rsync_out.c \
- src/optargs-xfs_admin.c \
+ src/optargs-grep.c \
src/optargs-hivex_open.c \
- src/optargs-xfs_repair.c \
+ src/optargs-inspect_get_icon.c \
+ src/optargs-internal_test.c \
+ src/optargs-internal_test_63_optargs.c \
+ src/optargs-internal_test_only_optargs.c \
+ src/optargs-is_blockdev.c \
+ src/optargs-is_chardev.c \
+ src/optargs-is_dir.c \
+ src/optargs-is_fifo.c \
+ src/optargs-is_file.c \
+ src/optargs-is_socket.c \
+ src/optargs-md_create.c \
src/optargs-mke2fs.c \
+ src/optargs-mkfs.c \
+ src/optargs-mkfs_btrfs.c \
+ src/optargs-mkswap.c \
src/optargs-mktemp.c \
- src/optargs-syslinux.c \
+ src/optargs-mount_9p.c \
+ src/optargs-mount_local.c \
+ src/optargs-ntfsclone_out.c \
+ src/optargs-ntfsfix.c \
+ src/optargs-ntfsresize.c \
src/optargs-remount.c \
- src/optargs-copy_attributes.c
+ src/optargs-rsync.c \
+ src/optargs-rsync_in.c \
+ src/optargs-rsync_out.c \
+ src/optargs-set_e2attrs.c \
+ src/optargs-syslinux.c \
+ src/optargs-tar_in.c \
+ src/optargs-tar_out.c \
+ src/optargs-tune2fs.c \
+ src/optargs-umount.c \
+ src/optargs-umount_local.c \
+ src/optargs-xfs_admin.c \
+ src/optargs-xfs_growfs.c \
+ src/optargs-xfs_repair.c
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-libvirt/libguestfs.git
More information about the Pkg-libvirt-commits
mailing list