[gnumeric: 6/9] ssdiff: make actions a parameter to the diff function.
- From: Morten Welinder <mortenw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnumeric: 6/9] ssdiff: make actions a parameter to the diff function.
- Date: Mon, 24 Dec 2012 18:26:30 +0000 (UTC)
commit f659c2edb66a47175da9c9deee91acaf558959fd
Author: Morten Welinder <terra gnome org>
Date: Sat Dec 15 14:40:07 2012 -0500
ssdiff: make actions a parameter to the diff function.
src/ssdiff.c | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/src/ssdiff.c b/src/ssdiff.c
index 4da5bb8..ce783dc 100644
--- a/src/ssdiff.c
+++ b/src/ssdiff.c
@@ -221,7 +221,9 @@ diff_sheets (GnmDiffState *state, Sheet *old_sheet, Sheet *new_sheet)
}
static int
-diff (char const *oldfilename, char const *newfilename, GOIOContext *ioc)
+diff (char const *oldfilename, char const *newfilename,
+ GOIOContext *ioc,
+ GnmDiffActions const *actions)
{
GnmDiffState state;
int res = 0;
@@ -230,7 +232,7 @@ diff (char const *oldfilename, char const *newfilename, GOIOContext *ioc)
int last_index = -1;
memset (&state, 0, sizeof (state));
- state.actions = &default_actions;
+ state.actions = actions;
state.ioc = ioc;
state.old.url = go_shell_arg_to_uri (oldfilename);
@@ -341,7 +343,7 @@ main (int argc, char const **argv)
if (argc == 3) {
GOIOContext *ioc = go_io_context_new (cc);
- res = diff (argv[1], argv[2], ioc);
+ res = diff (argv[1], argv[2], ioc, &default_actions);
g_object_unref (ioc);
} else {
g_printerr (_("Usage: %s [OPTION...] %s\n"),
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]