main: Use macro to reduce duplication among builtin prototypes

Just less code.
This commit is contained in:
Colin Walters 2013-08-19 09:00:02 -04:00
parent 326be41d12
commit 16c36fbc34

View File

@ -26,27 +26,31 @@
G_BEGIN_DECLS
gboolean ostree_builtin_admin (int argc, char **argv, GFile *repo_path, GCancellable *cancellable, GError **error);
gboolean ostree_builtin_cat (int argc, char **argv, GFile *repo_path, GCancellable *cancellable, GError **error);
gboolean ostree_builtin_config (int argc, char **argv, GFile *repo_path, GCancellable *cancellable, GError **error);
gboolean ostree_builtin_checkout (int argc, char **argv, GFile *repo_path, GCancellable *cancellable, GError **error);
gboolean ostree_builtin_checksum (int argc, char **argv, GFile *repo_path, GCancellable *cancellable, GError **error);
gboolean ostree_builtin_commit (int argc, char **argv, GFile *repo_path, GCancellable *cancellable, GError **error);
gboolean ostree_builtin_diff (int argc, char **argv, GFile *repo_path, GCancellable *cancellable, GError **error);
gboolean ostree_builtin_init (int argc, char **argv, GFile *repo_path, GCancellable *cancellable, GError **error);
gboolean ostree_builtin_log (int argc, char **argv, GFile *repo_path, GCancellable *cancellable, GError **error);
gboolean ostree_builtin_pull (int argc, char **argv, GFile *repo_path, GCancellable *cancellable, GError **error);
gboolean ostree_builtin_pull_local (int argc, char **argv, GFile *repo_path, GCancellable *cancellable, GError **error);
gboolean ostree_builtin_ls (int argc, char **argv, GFile *repo_path, GCancellable *cancellable, GError **error);
gboolean ostree_builtin_prune (int argc, char **argv, GFile *repo_path, GCancellable *cancellable, GError **error);
gboolean ostree_builtin_refs (int argc, char **argv, GFile *repo_path, GCancellable *cancellable, GError **error);
gboolean ostree_builtin_reset (int argc, char **argv, GFile *repo_path, GCancellable *cancellable, GError **error);
gboolean ostree_builtin_fsck (int argc, char **argv, GFile *repo_path, GCancellable *cancellable, GError **error);
gboolean ostree_builtin_show (int argc, char **argv, GFile *repo_path, GCancellable *cancellable, GError **error);
gboolean ostree_builtin_rev_parse (int argc, char **argv, GFile *repo_path, GCancellable *cancellable, GError **error);
gboolean ostree_builtin_remote (int argc, char **argv, GFile *repo_path, GCancellable *cancellable, GError **error);
gboolean ostree_builtin_write_refs (int argc, char **argv, GFile *repo_path, GCancellable *cancellable, GError **error);
gboolean ostree_builtin_trivial_httpd (int argc, char **argv, GFile *repo_path, GCancellable *cancellable, GError **error);
#define BUILTINPROTO(name) gboolean ostree_builtin_ ## name (int argc, char **argv, GFile *repo_path, GCancellable *cancellable, GError **error)
BUILTINPROTO(admin);
BUILTINPROTO(cat);
BUILTINPROTO(config);
BUILTINPROTO(checkout);
BUILTINPROTO(checksum);
BUILTINPROTO(commit);
BUILTINPROTO(diff);
BUILTINPROTO(init);
BUILTINPROTO(log);
BUILTINPROTO(pull);
BUILTINPROTO(pull_local);
BUILTINPROTO(ls);
BUILTINPROTO(prune);
BUILTINPROTO(refs);
BUILTINPROTO(reset);
BUILTINPROTO(fsck);
BUILTINPROTO(show);
BUILTINPROTO(rev_parse);
BUILTINPROTO(remote);
BUILTINPROTO(write_refs);
BUILTINPROTO(trivial_httpd);
#undef BUILTINPROTO
G_END_DECLS