summaryrefslogtreecommitdiff
path: root/gui
diff options
context:
space:
mode:
authorWerner Almesberger <werner@almesberger.net>2016-08-28 23:27:09 -0300
committerWerner Almesberger <werner@almesberger.net>2016-08-28 23:27:09 -0300
commit4f60abb2d01037f98e00ee365026e7d1b720fe35 (patch)
tree3ef9a18db785f8315baa7168099bc0e5ea277d2a /gui
parentd05810c8d4c88eb73cb0350df1ab5c896c04c3c4 (diff)
downloadeeshow-4f60abb2d01037f98e00ee365026e7d1b720fe35.tar.gz
eeshow-4f60abb2d01037f98e00ee365026e7d1b720fe35.tar.bz2
eeshow-4f60abb2d01037f98e00ee365026e7d1b720fe35.zip
file/git-hist.c (hist_iterate): pass "next" pointer as well
This way, the callback don't need to search the list to figure it out on its own.
Diffstat (limited to 'gui')
-rw-r--r--gui/gui.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/gui/gui.c b/gui/gui.c
index 0e35e92..48f36d7 100644
--- a/gui/gui.c
+++ b/gui/gui.c
@@ -349,7 +349,8 @@ struct add_hist_ctx {
};
-static void add_hist(void *user, struct vcs_hist *h)
+static void add_hist(void *user, struct vcs_hist *h,
+ const struct vcs_hist *next)
{
struct add_hist_ctx *ahc = user;
struct gui *gui = ahc->gui;
@@ -399,14 +400,15 @@ static void get_revisions(struct gui *gui, const struct file_names *fn,
if (gui->vcs_history)
hist_iterate(gui->vcs_history, add_hist, &add_hist_ctx);
else
- add_hist(&add_hist_ctx, NULL);
+ add_hist(&add_hist_ctx, NULL, NULL);
}
/* ----- Retrieve and count history ---------------------------------------- */
-static void count_history(void *user, struct vcs_hist *h)
+static void count_history(void *user, struct vcs_hist *h,
+ const struct vcs_hist *next)
{
struct gui *gui = user;