File fileschanged.diff of Package fam
Index: configure.ac
===================================================================
--- configure.ac.orig 2006-04-19 21:42:18.000000000 +0200
+++ configure.ac 2011-03-17 11:14:02.267321232 +0100
@@ -23,13 +23,13 @@ AC_PROG_CC
dnl Checks for libraries.
-AC_CHECK_LIB(fam,FAMOpen,,[echo "To build this software, you must install the FAM development package"; exit 1])
+dnl AC_CHECK_LIB(fam,FAMOpen,,[echo "To build this software, you must install the FAM development package"; exit 1])
AC_CHECK_LIB(fam,FAMNoExists,[AC_DEFINE(HAVE_FAMNOEXISTS, 1, [Define if you have gamin instead of fam])],)
dnl Checks for header files.
AC_HEADER_STDC
-AC_CHECK_HEADER(fam.h,,[echo "To build this software, you must install the FAM development package"; exit 1])
+dnl AC_CHECK_HEADER(fam.h,,[echo "To build this software, you must install the FAM development package"; exit 1])
AC_CHECK_HEADERS(unistd.h time.h string.h dirent.h argp.h)
PACKAGE_MAINTAINER="Ben Asselstine"
Index: info/fileschanged.texinfo
===================================================================
--- info/fileschanged.texinfo.orig 2006-04-19 21:42:18.000000000 +0200
+++ info/fileschanged.texinfo 2011-03-17 11:14:02.267321232 +0100
@@ -9,6 +9,10 @@
@include package.texinfo
+@dircategory FAM CLI documentation
+@direntry
+* fileschanged: (fileschanged). fileschanged manual
+@end direntry
@ifinfo
This file documents the @command{fileschanged} command which displays altered files
Index: src/Makefile.am
===================================================================
--- src/Makefile.am.orig 2006-04-19 21:42:28.000000000 +0200
+++ src/Makefile.am 2011-03-17 11:14:02.267321232 +0100
@@ -10,5 +10,8 @@ fileschanged_SOURCES= \
filelist.c filelist.h \
handlers.c handlers.h \
wl.c wl.h gettext.h
+
+fileschanged_LDADD = -lfam
+
localdir = $(datadir)/locale
AM_CFLAGS = -Wall -Werror -DLOCALEDIR=\"$(localdir)\"
Index: src/wl.h
===================================================================
--- src/wl.h.orig 2006-04-19 21:42:30.000000000 +0200
+++ src/wl.h 2011-03-17 11:14:02.268321359 +0100
@@ -3,5 +3,5 @@
void wl_init();
void wl_add_file(char *filename);
void wl_destroy();
-void wl_show_changed_files();
+void wl_show_changed_files(unsigned int filechangetimeout, void (*handler)(char *, struct stat *statbuf));
#endif
Index: src/monitor.c
===================================================================
--- src/monitor.c.orig 2006-04-19 21:42:29.000000000 +0200
+++ src/monitor.c 2011-03-17 11:20:08.077623538 +0100
@@ -70,7 +70,7 @@ monitor_close (FAMConnection *c)
int
monitor_begin (FAMConnection *c, void *list)
{
- int retval;
+ int retval = 0;
unsigned int i;
unsigned int count;
struct node_t *node;
@@ -94,7 +94,7 @@ monitor_begin (FAMConnection *c, void *l
}
monitor_handle_events (c, list, 0, 30);
}
- return 0;
+ return retval;
}
static int
Index: src/filelist.c
===================================================================
--- src/filelist.c.orig 2006-04-19 21:42:28.000000000 +0200
+++ src/filelist.c 2011-03-17 11:23:41.071582764 +0100
@@ -40,12 +40,12 @@ static int
on_the_command_line (int (*process_file)(void *list, char *filename), void *list)
{
unsigned int i;
- int retval;
+ int retval = 0;
for(i = 0; i < arguments.arraylen; i++)
{
retval = process_file (list, arguments.args[i]);
}
- return 0;
+ return retval;
}
static void
@@ -66,7 +66,7 @@ in_filelist_file (int (*process_file)(vo
char *filename;
char *line = NULL;
size_t n = 0;
- int retval;
+ int retval = 0;
filename = arguments.fileschanged.filelist_filename;
if (strcmp (filename, "-") == 0)
fileptr = stdin;
@@ -87,13 +87,13 @@ in_filelist_file (int (*process_file)(vo
if (fileptr != stdin)
fclose (fileptr);
- return 0;
+ return retval;
}
static int
add_it_to_the (void *list, char *filename)
{
- int retval;
+ int retval = 0;
struct node_t node;
retval = node_new (&node, filename);
if (retval == 0)
@@ -132,7 +132,7 @@ add_it_to_the (void *list, char *filenam
node_free (&node);
}
- return 0;
+ return retval;
}
static int