From c6096967e3d8d98f24210d4c66e4d22509bdce5c Mon Sep 17 00:00:00 2001 From: "Dmitrij D. Czarkoff" Date: Mon, 28 Dec 2015 11:33:16 +0100 Subject: Use stat(2) to monitor file changes Makes file monitoring in imv completely POSIX. --- src/navigator.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/navigator.h') diff --git a/src/navigator.h b/src/navigator.h index 5b1d4a1..b23e41a 100644 --- a/src/navigator.h +++ b/src/navigator.h @@ -1,6 +1,8 @@ #ifndef IMV_NAVIGATOR_H #define IMV_NAVIGATOR_H +#include + /* Copyright (c) 2015 Harry Jeffery This program is free software; you can redistribute it and/or @@ -23,6 +25,7 @@ struct imv_navigator { int buf_size; int cur_path; char **paths; + time_t *mtimes; int last_move_direction; int changed; }; @@ -57,7 +60,8 @@ void imv_navigator_select_str(struct imv_navigator *nav, const int path); /* Return the index of the path given. Returns -1 if not found. */ int imv_navigator_find_path(struct imv_navigator *nav, const char *path); -/* Returns 1 if the currently selected path has changed since last called */ +/* Returns 1 if either the currently selected path or underlying file has + * changed since last called */ int imv_navigator_poll_changed(struct imv_navigator *nav); #endif -- cgit v1.2.3