Hello community,
here is the log from the commit of package fam
checked in at Fri Sep 1 12:41:40 CEST 2006.
--------
--- fam/fam.changes 2006-03-27 09:46:08.000000000 +0200
+++ fam/fam.changes 2006-09-01 11:05:59.000000000 +0200
@@ -1,0 +2,7 @@
+Fri Sep 1 08:38:06 CEST 2006 - adrian@suse.de
+
+- update fileschanged to 0.6.5
+ * minor bug fixes
+- fix fileschanged info file syntax (#203178)
+
+-------------------------------------------------------------------
Old:
----
fileschanged-0.6.4.tar.bz2
New:
----
fileschanged-0.6.5.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ fam.spec ++++++
--- /var/tmp/diff_new_pack.iplJVE/_old 2006-09-01 12:28:02.000000000 +0200
+++ /var/tmp/diff_new_pack.iplJVE/_new 2006-09-01 12:28:02.000000000 +0200
@@ -18,8 +18,8 @@
Summary: File Alteration Monitoring Daemon
URL: http://oss.sgi.com/projects/fam/
Version: 2.7.0
-Release: 3
-%define fc_version 0.6.4
+Release: 11
+%define fc_version 0.6.5
Source0: fam-%{version}.tar.bz2
Source1: sysconfig.fam
Source2: init.fam
@@ -204,6 +204,10 @@
%config(noreplace) /etc/xinetd.d/fam
%changelog -n fam
+* Fri Sep 01 2006 - adrian@suse.de
+- update fileschanged to 0.6.5
+ * minor bug fixes
+- fix fileschanged info file syntax (#203178)
* Mon Mar 27 2006 - adrian@suse.de
- require portmap start before fam (#119187)
- add user line to xinetd conf (#119187)
++++++ fileschanged-0.6.4.tar.bz2 -> fileschanged-0.6.5.tar.bz2 ++++++
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/fileschanged-0.6.4/ChangeLog new/fileschanged-0.6.5/ChangeLog
--- old/fileschanged-0.6.4/ChangeLog 2005-07-20 21:48:51.000000000 +0200
+++ new/fileschanged-0.6.5/ChangeLog 2006-05-06 17:20:14.000000000 +0200
@@ -1,4 +1,23 @@
+* Sat May 6 2006 Ben Asselstine
+- build system now allows out-of-tree builds.
+- fixed bug #1483008. now shows newly created directories when in -r mode.
+ Thanks to James Vanns for identifying this bug and supplying a patch.
+
+* Wed Jul 21 2005 Ben Asselstine
+- removed some unneeded headers
+- added asprintf failure handling
+- removed some needless strdup'ing
+- added strdup failure handling
+- more code beautification
+- fixed bug where "executed" would show "execute".
+
+* Wed Jul 20 2005 Ben Asselstine
+- fixed bug #1241987. now complains when monitoring nothing.
+- more code beautification
+- added in-line documentation
+
* Wed Jul 20 2005 Ben Asselstine
+- version 0.6.4
- closed ancient bug #725725, can't reproduce it.
- added documentation for -L and -x options.
- added new option -L --dereference (symlinks). bug #1241792
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/fileschanged-0.6.4/README new/fileschanged-0.6.5/README
--- old/fileschanged-0.6.4/README 2005-06-01 17:31:26.000000000 +0200
+++ new/fileschanged-0.6.5/README 2006-05-09 00:26:12.000000000 +0200
@@ -20,7 +20,7 @@
notes to my future self on how to build packages:
to build a debian package:
- make sure you have cdbs installed.
+ make sure you have cdbs, devscripts installed.
make dist
cp fileschanged-{version}.tar.gz /tmp
cd /tmp
@@ -33,6 +33,7 @@
make dist
mkdir ~/play/rpmbuild/SOURCES/fileschanged-{version}
cp fileschanged-{version}.tar.gz ~/play/rpmbuild/SOURCES/fileschanged-{version}
+ tar -zxvf fileschanged-{version}
cd into the top level source directory
./configure
rpmbuild -ba --sign redhat/fileschanged.spec
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/fileschanged-0.6.4/TODO new/fileschanged-0.6.5/TODO
--- old/fileschanged-0.6.4/TODO 2005-07-20 21:48:10.000000000 +0200
+++ new/fileschanged-0.6.5/TODO 2006-04-19 21:42:18.000000000 +0200
@@ -14,9 +14,3 @@
need a way to detect very frequently changing files and then cancel monitoring of them. eg) so frequently that the program can't operate.
**this problem seems to have just "gone away"***
---------------------
-
-calmly handle binary filelists.
-keep track of number of files attempted to be monitored
-versuses number of files monitored.
-when this rate is high enough, show a warning.
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/fileschanged-0.6.4/configure new/fileschanged-0.6.5/configure
--- old/fileschanged-0.6.4/configure 2005-07-20 21:16:43.000000000 +0200
+++ new/fileschanged-0.6.5/configure 2006-05-06 17:17:37.000000000 +0200
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.59 for fileschanged 0.6.4.
+# Generated by GNU Autoconf 2.59 for fileschanged 0.6.5.
#
# Report bugs to .
#
@@ -269,8 +269,8 @@
# Identity of this package.
PACKAGE_NAME='fileschanged'
PACKAGE_TARNAME='fileschanged'
-PACKAGE_VERSION='0.6.4'
-PACKAGE_STRING='fileschanged 0.6.4'
+PACKAGE_VERSION='0.6.5'
+PACKAGE_STRING='fileschanged 0.6.5'
PACKAGE_BUGREPORT='benasselstine@users.sf.net'
ac_unique_file="src/fileschanged.c"
@@ -780,7 +780,7 @@
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures fileschanged 0.6.4 to adapt to many kinds of systems.
+\`configure' configures fileschanged 0.6.5 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -846,7 +846,7 @@
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of fileschanged 0.6.4:";;
+ short | recursive ) echo "Configuration of fileschanged 0.6.5:";;
esac
cat <<\_ACEOF
@@ -975,7 +975,7 @@
test -n "$ac_init_help" && exit 0
if $ac_init_version; then
cat <<\_ACEOF
-fileschanged configure 0.6.4
+fileschanged configure 0.6.5
generated by GNU Autoconf 2.59
Copyright (C) 2003 Free Software Foundation, Inc.
@@ -989,7 +989,7 @@
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by fileschanged $as_me 0.6.4, which was
+It was created by fileschanged $as_me 0.6.5, which was
generated by GNU Autoconf 2.59. Invocation command line was
$ $0 $@
@@ -1632,7 +1632,7 @@
# Define the identity of the package.
PACKAGE='fileschanged'
- VERSION='0.6.4'
+ VERSION='0.6.5'
cat >>confdefs.h <<_ACEOF
@@ -6879,7 +6879,7 @@
} >&5
cat >&5 <<_CSEOF
-This file was extended by fileschanged $as_me 0.6.4, which was
+This file was extended by fileschanged $as_me 0.6.5, which was
generated by GNU Autoconf 2.59. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -6942,7 +6942,7 @@
cat >>$CONFIG_STATUS <<_ACEOF
ac_cs_version="\\
-fileschanged config.status 0.6.4
+fileschanged config.status 0.6.5
configured by $0, generated by GNU Autoconf 2.59,
with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/fileschanged-0.6.4/configure.ac new/fileschanged-0.6.5/configure.ac
--- old/fileschanged-0.6.4/configure.ac 2005-07-20 21:16:31.000000000 +0200
+++ new/fileschanged-0.6.5/configure.ac 2006-04-19 21:42:18.000000000 +0200
@@ -4,7 +4,7 @@
AC_SUBST(PACKAGE_TEX_BUGREPORT)
AUTOMAKE_OPTIONS=no-dependencies
-AC_INIT(fileschanged, 0.6.4, benasselstine@users.sf.net)
+AC_INIT(fileschanged, 0.6.5, benasselstine@users.sf.net)
AM_INIT_AUTOMAKE
AC_CONFIG_SRCDIR([src/fileschanged.c])
AM_CONFIG_HEADER([config.h])
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/fileschanged-0.6.4/debian/changelog new/fileschanged-0.6.5/debian/changelog
--- old/fileschanged-0.6.4/debian/changelog 2005-06-01 16:59:20.000000000 +0200
+++ new/fileschanged-0.6.5/debian/changelog 2006-05-09 00:35:53.000000000 +0200
@@ -1,3 +1,10 @@
+fileschanged (0.6.5-1) unstable; urgency=low
+
+ * updated to build dependency to automake1.9
+ * updated to dependencies to be gamin, and libgamin0
+
+ -- Ben Asselstine Mon, 8 May 2006 18:29:17 +0500
+
fileschanged (0.6.2-1) unstable; urgency=low
* control: changed dependency libf0c102 to libfam0c102.
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/fileschanged-0.6.4/debian/control new/fileschanged-0.6.5/debian/control
--- old/fileschanged-0.6.4/debian/control 2005-06-01 16:57:29.000000000 +0200
+++ new/fileschanged-0.6.5/debian/control 2006-05-09 00:35:31.000000000 +0200
@@ -2,13 +2,13 @@
Section: utils
Priority: optional
Maintainer: Ben Asselstine
-Build-Depends: debhelper (>= 4.1.16), cdbs, automake1.8, autoconf
+Build-Depends: debhelper (>= 4.1.16), cdbs, automake1.9, autoconf
Standards-Version: 3.6.1.0
Package: fileschanged
Architecture: i386
-Version: 0.6.2
-Depends: fam, libfam0c102
+Version: 0.6.5
+Depends: gamin, libgamin0
Installed-Size: 200
Description: This utility is a FAM (File Alteration Monitor) client. From
the command-line it monitors sets of files and shows you when they change.
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/fileschanged-0.6.4/info/Makefile.am new/fileschanged-0.6.5/info/Makefile.am
--- old/fileschanged-0.6.4/info/Makefile.am 2003-03-23 16:34:42.000000000 +0100
+++ new/fileschanged-0.6.5/info/Makefile.am 2006-05-06 17:18:31.000000000 +0200
@@ -1,7 +1,7 @@
info_TEXINFOS = fileschanged.texinfo
fileschanged_TEXINFOS = gpl.texinfo usage package.texinfo
usage:
- @${top_srcdir}/src/fileschanged --help > usage
+ @${top_builddir}/src/fileschanged --help > usage
#EXTRA_DIST=fileschanged.info
CLEANFILES=usage fileschanged.info
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/fileschanged-0.6.4/info/Makefile.in new/fileschanged-0.6.5/info/Makefile.in
--- old/fileschanged-0.6.4/info/Makefile.in 2005-07-20 21:16:42.000000000 +0200
+++ new/fileschanged-0.6.5/info/Makefile.in 2006-05-06 17:18:40.000000000 +0200
@@ -460,7 +460,7 @@
uninstall-info-am
usage:
- @${top_srcdir}/src/fileschanged --help > usage
+ @${top_builddir}/src/fileschanged --help > usage
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/fileschanged-0.6.4/info/fileschanged.info new/fileschanged-0.6.5/info/fileschanged.info
--- old/fileschanged-0.6.4/info/fileschanged.info 2005-07-20 21:26:50.000000000 +0200
+++ new/fileschanged-0.6.5/info/fileschanged.info 2006-05-09 00:24:01.000000000 +0200
@@ -1,5 +1,5 @@
-This is fileschanged.info, produced by makeinfo version 4.7 from
-fileschanged.texinfo.
+This is fileschanged.info, produced by makeinfo version 4.8 from
+../../fileschanged/info/fileschanged.texinfo.
This file documents the `fileschanged' command which displays
altered files
@@ -468,28 +468,6 @@
-Usage: fileschanged [OPTION...] [FILE]...
-Monitors FILEs for alterations. Display the filenames of FILEs that were
-created, changed, deleted, started execution or finished executing.
-
- -s, --show=EVENT[,...] Display created, changed, deleted, executing, or
- executed files (Default is "created,changed")
- -a, --show-all Display all file events and the associated action
- -f, --files-to-monitor (Default) Monitor the FILEs on the command line
- -l, --filelist=FILE Monitor the list of filenames inside FILE
- -L, --dereference Don't monitor symlinks, monitor what's pointed to
- -r, --recursive Monitor subdirectories of directories
- -t, --timeout=N Delay showing changed files for N seconds (Def=2)
- -p, --display-action Display action when showing altered files
- -x, --exec=PROG Run PROG when file is altered (PROG action
- filename)
- -?, --help Give this help list
- --usage Give a short usage message
- -V, --version Print program version
-
-FILEs must exist when monitoring begins, or they will not be monitored.
-
-Report bugs to .
`fileschanged' supports the following options:
@@ -638,13 +616,13 @@
Tag Table:
-Node: Top866
-Node: Instructions1447
-Node: Copying2133
-Node: Overview21300
-Node: Sample22309
-Node: Invoking fileschanged23134
-Node: Problems29329
-Node: Concept Index29991
+Node: Top890
+Node: Instructions1471
+Node: Copying2157
+Node: Overview21324
+Node: Sample22333
+Node: Invoking fileschanged23158
+Node: Problems28106
+Node: Concept Index28768
End Tag Table
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/fileschanged-0.6.4/info/package.texinfo new/fileschanged-0.6.5/info/package.texinfo
--- old/fileschanged-0.6.4/info/package.texinfo 2005-07-20 21:16:49.000000000 +0200
+++ new/fileschanged-0.6.5/info/package.texinfo 2006-05-09 00:23:22.000000000 +0200
@@ -1,5 +1,5 @@
@setfilename package.info
-@set VERSION 0.6.4
+@set VERSION 0.6.5
@set MAINTAINER Ben Asselstine
@set ADDRESS benasselstine@@users.sf.net
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/fileschanged-0.6.4/info/usage new/fileschanged-0.6.5/info/usage
--- old/fileschanged-0.6.4/info/usage 2005-07-20 20:20:38.000000000 +0200
+++ new/fileschanged-0.6.5/info/usage 2006-05-09 00:23:32.000000000 +0200
@@ -1,22 +0,0 @@
-Usage: fileschanged [OPTION...] [FILE]...
-Monitors FILEs for alterations. Display the filenames of FILEs that were
-created, changed, deleted, started execution or finished executing.
-
- -s, --show=EVENT[,...] Display created, changed, deleted, executing, or
- executed files (Default is "created,changed")
- -a, --show-all Display all file events and the associated action
- -f, --files-to-monitor (Default) Monitor the FILEs on the command line
- -l, --filelist=FILE Monitor the list of filenames inside FILE
- -L, --dereference Don't monitor symlinks, monitor what's pointed to
- -r, --recursive Monitor subdirectories of directories
- -t, --timeout=N Delay showing changed files for N seconds (Def=2)
- -p, --display-action Display action when showing altered files
- -x, --exec=PROG Run PROG when file is altered (PROG action
- filename)
- -?, --help Give this help list
- --usage Give a short usage message
- -V, --version Print program version
-
-FILEs must exist when monitoring begins, or they will not be monitored.
-
-Report bugs to .
Binary files old/fileschanged-0.6.4/po/ca.gmo and new/fileschanged-0.6.5/po/ca.gmo differ
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/fileschanged-0.6.4/po/ca.po new/fileschanged-0.6.5/po/ca.po
--- old/fileschanged-0.6.4/po/ca.po 2005-07-20 21:50:57.000000000 +0200
+++ new/fileschanged-0.6.5/po/ca.po 2006-05-09 00:24:05.000000000 +0200
@@ -6,7 +6,7 @@
msgstr ""
"Project-Id-Version: fileschanged 0.6.2\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2005-07-20 15:50-0400\n"
+"POT-Creation-Date: 2006-05-08 18:24-0400\n"
"PO-Revision-Date: 2005-02-12 05:15+0100\n"
"Last-Translator: Guillem Jover \n"
"Language-Team: Catalan \n"
@@ -14,11 +14,15 @@
"Content-Type: text/plain; charset=iso-8859-15\n"
"Content-Transfer-Encoding: 8bit\n"
-#: src/fileschanged.c:97
+#: src/fileschanged.c:95
msgid "Error: Couldn't connect to fam daemon."
msgstr "Error: No s'ha pogut connectar al dimoni «fam»"
-#: src/opts.c:12
+#: src/fileschanged.c:108
+msgid "Error: No files to monitor."
+msgstr ""
+
+#: src/opts.c:11
msgid ""
"Monitors FILEs for alterations. Display the filenames of FILEs that were "
"created, changed, deleted, started execution or finished executing.FILEs "
@@ -29,15 +33,15 @@
"executar o han finalitzat l'execució. Els FITXERS han d'existir quan el "
"monitoreig comença o no seran monitoritzats."
-#: src/opts.c:17
+#: src/opts.c:16
msgid "[FILE]..."
msgstr "[FITXER]..."
-#: src/opts.c:23
+#: src/opts.c:22
msgid "EVENT[,...]"
msgstr "ESDEVENIMENT[,...]"
-#: src/opts.c:24
+#: src/opts.c:23
msgid ""
"Display created, changed, deleted, executing, or executed files (Default is "
"\"created,changed\")"
@@ -45,98 +49,98 @@
"Mostra fitxers creats, modificats, esborrats, executant-se o executats "
"(Predeterminat «creats,modificats»)"
-#: src/opts.c:27
+#: src/opts.c:26
msgid "Display deleted files"
msgstr "Mostra fitxers esborrats"
-#: src/opts.c:29
+#: src/opts.c:28
msgid "(Default) Display changed files"
msgstr "(Predeterminada) Mostra fitxers modificats"
-#: src/opts.c:31
+#: src/opts.c:30
msgid "(Default) Display newly created files"
msgstr "(Predeterminada) Mostra fitxers creats de nou"
-#: src/opts.c:33
+#: src/opts.c:32
msgid "Display executing files"
msgstr "Mostra fitxers en execució"
-#: src/opts.c:35
+#: src/opts.c:34
msgid "Display files that have stopped executing"
msgstr "Mostra fitxers que s'han parat d'executar"
-#: src/opts.c:37
+#: src/opts.c:36
msgid "Display all file events and the associated action"
msgstr "Mostra tots els esdeveniments i les accions associades"
-#: src/opts.c:39
+#: src/opts.c:38
msgid "(Default) Monitor the FILEs on the command line"
msgstr "(Predeterminada) Mostra els FITXERS a la línia d'ordres"
-#: src/opts.c:40
+#: src/opts.c:39
msgid "FILE"
msgstr "FITXER"
-#: src/opts.c:41
+#: src/opts.c:40
msgid "Monitor the list of filenames inside FILE"
msgstr "Monitoritza la llista de fitxers de dins de FITXER"
-#: src/opts.c:43
+#: src/opts.c:42
msgid "Monitor subdirectories of directories"
msgstr "Monitoritza els subdirectoris dels directoris"
-#: src/opts.c:45
+#: src/opts.c:44
msgid "Don't monitor symlinks, monitor what's pointed to"
msgstr ""
-#: src/opts.c:47
+#: src/opts.c:46
msgid "Delay showing changed files for N seconds (Def=2)"
msgstr ""
"Retarda en N segons en mostrar els fitxers modificats (Predeterminat 2)"
-#: src/opts.c:49
+#: src/opts.c:48
msgid "Display action when showing altered files"
msgstr "Mostra l'acció quan s'ensenyin els fitxers alterats"
-#: src/opts.c:50
+#: src/opts.c:49
msgid "PROG"
msgstr "PROGRAMA"
-#: src/opts.c:51
+#: src/opts.c:50
msgid "Run PROG when file is altered (PROG action filename)"
msgstr ""
"Executa PROGRAMA quan s'alteri el fitxer (PROGRAMA acció nom-de-fitxer)"
-#: src/opts.c:76
+#: src/opts.c:72
msgid "created"
msgstr "creat"
-#: src/opts.c:78
+#: src/opts.c:74
msgid "changed"
msgstr "modificat"
-#: src/opts.c:80
+#: src/opts.c:76
msgid "deleted"
msgstr "esborrat"
-#: src/opts.c:82
+#: src/opts.c:78
msgid "executing"
msgstr "executant-se"
-#: src/opts.c:84
+#: src/opts.c:80
msgid "executed"
msgstr "executat"
-#: src/opts.c:86
+#: src/opts.c:82
msgid "all"
msgstr "tots"
-#: src/opts.c:89
+#: src/opts.c:85
#, c-format
msgid "Error! '%s' is an unrecognized EVENT."
msgstr "Error! «%s» és un ESDEVENIMENT desconegut."
-#: src/filelist.c:64
+#: src/filelist.c:77
#, c-format
msgid "Error: couldn't open '%s'\n"
msgstr "Error: no s'ha pogut obrir «%s»\n"
Binary files old/fileschanged-0.6.4/po/es.gmo and new/fileschanged-0.6.5/po/es.gmo differ
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/fileschanged-0.6.4/po/es.po new/fileschanged-0.6.5/po/es.po
--- old/fileschanged-0.6.4/po/es.po 2005-07-20 21:50:57.000000000 +0200
+++ new/fileschanged-0.6.5/po/es.po 2006-05-09 00:24:06.000000000 +0200
@@ -6,7 +6,7 @@
msgstr ""
"Project-Id-Version: fileschanged 0.6.2\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2005-07-20 15:50-0400\n"
+"POT-Creation-Date: 2006-05-08 18:24-0400\n"
"PO-Revision-Date: 2005-02-12 04:19+0100\n"
"Last-Translator: Guillem Jover \n"
"Language-Team: Spanish \n"
@@ -14,11 +14,15 @@
"Content-Type: text/plain; charset=iso-8859-15\n"
"Content-Transfer-Encoding: 8bit\n"
-#: src/fileschanged.c:97
+#: src/fileschanged.c:95
msgid "Error: Couldn't connect to fam daemon."
msgstr "Error: No se ha podido conectar al demonio «fam»."
-#: src/opts.c:12
+#: src/fileschanged.c:108
+msgid "Error: No files to monitor."
+msgstr ""
+
+#: src/opts.c:11
msgid ""
"Monitors FILEs for alterations. Display the filenames of FILEs that were "
"created, changed, deleted, started execution or finished executing.FILEs "
@@ -29,15 +33,15 @@
"terminado su ejecución. Los FICHEROS deben existir cuando la monitorización "
"empiece, o no serán monitorizados."
-#: src/opts.c:17
+#: src/opts.c:16
msgid "[FILE]..."
msgstr "[FICHERO]..."
-#: src/opts.c:23
+#: src/opts.c:22
msgid "EVENT[,...]"
msgstr "EVENTO[,...]"
-#: src/opts.c:24
+#: src/opts.c:23
msgid ""
"Display created, changed, deleted, executing, or executed files (Default is "
"\"created,changed\")"
@@ -45,99 +49,99 @@
"Muestra ficheros creados, modificados, borrados, ejecutándose o ejecutados "
"(Predeterminado a «creado,modificado»)"
-#: src/opts.c:27
+#: src/opts.c:26
msgid "Display deleted files"
msgstr "Muestra ficheros borrados"
-#: src/opts.c:29
+#: src/opts.c:28
msgid "(Default) Display changed files"
msgstr "(Predeterminada) Muestra ficheros modificados"
-#: src/opts.c:31
+#: src/opts.c:30
msgid "(Default) Display newly created files"
msgstr "(Predeterminada) Muestra ficheros creados de nuevo"
-#: src/opts.c:33
+#: src/opts.c:32
msgid "Display executing files"
msgstr "Muestra ficheros en ejecución"
-#: src/opts.c:35
+#: src/opts.c:34
msgid "Display files that have stopped executing"
msgstr "Mostrar ficheros que han parado su ejecución"
-#: src/opts.c:37
+#: src/opts.c:36
msgid "Display all file events and the associated action"
msgstr "Mostrar todos los eventos de los ficheros y las acciones asociadas"
-#: src/opts.c:39
+#: src/opts.c:38
msgid "(Default) Monitor the FILEs on the command line"
msgstr "(Predeterminada) Monitorizar los FICHEROS en la linea de comandos"
-#: src/opts.c:40
+#: src/opts.c:39
msgid "FILE"
msgstr "FICHERO"
-#: src/opts.c:41
+#: src/opts.c:40
msgid "Monitor the list of filenames inside FILE"
msgstr "Monitoriza la lista de nombres de ficheros de dentro de FICHERO"
-#: src/opts.c:43
+#: src/opts.c:42
msgid "Monitor subdirectories of directories"
msgstr "Monitoriza los subdirectorios de los directorios"
-#: src/opts.c:45
+#: src/opts.c:44
msgid "Don't monitor symlinks, monitor what's pointed to"
msgstr ""
-#: src/opts.c:47
+#: src/opts.c:46
msgid "Delay showing changed files for N seconds (Def=2)"
msgstr ""
"Retrasa en N segundos en mostrar los ficheros modificados (Predeterminado 2)"
-#: src/opts.c:49
+#: src/opts.c:48
msgid "Display action when showing altered files"
msgstr "Muestra la acción cuando se muestren los ficheros alterados"
-#: src/opts.c:50
+#: src/opts.c:49
msgid "PROG"
msgstr "PROGRAMA"
-#: src/opts.c:51
+#: src/opts.c:50
#, fuzzy
msgid "Run PROG when file is altered (PROG action filename)"
msgstr ""
"Ejecuta PROGRAMA cuando el fichero se altere (PROGRAMA acción nombre-fichero)"
-#: src/opts.c:76
+#: src/opts.c:72
msgid "created"
msgstr "creado"
-#: src/opts.c:78
+#: src/opts.c:74
msgid "changed"
msgstr "modificado"
-#: src/opts.c:80
+#: src/opts.c:76
msgid "deleted"
msgstr "borrado"
-#: src/opts.c:82
+#: src/opts.c:78
msgid "executing"
msgstr "ejecutándose"
-#: src/opts.c:84
+#: src/opts.c:80
msgid "executed"
msgstr "ejecutado"
-#: src/opts.c:86
+#: src/opts.c:82
msgid "all"
msgstr "todos"
-#: src/opts.c:89
+#: src/opts.c:85
#, fuzzy, c-format
msgid "Error! '%s' is an unrecognized EVENT."
msgstr "Error! «%s» es un EVENTO no reconocido."
-#: src/filelist.c:64
+#: src/filelist.c:77
#, c-format
msgid "Error: couldn't open '%s'\n"
msgstr "Error: no se ha podido abrir «%s»\n"
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/fileschanged-0.6.4/po/fileschanged.pot new/fileschanged-0.6.5/po/fileschanged.pot
--- old/fileschanged-0.6.4/po/fileschanged.pot 2005-07-20 21:50:57.000000000 +0200
+++ new/fileschanged-0.6.5/po/fileschanged.pot 2006-05-09 00:24:05.000000000 +0200
@@ -7,7 +7,7 @@
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2005-07-20 15:50-0400\n"
+"POT-Creation-Date: 2006-05-08 18:24-0400\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME \n"
"Language-Team: LANGUAGE \n"
@@ -15,121 +15,125 @@
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n"
-#: src/fileschanged.c:97
+#: src/fileschanged.c:95
msgid "Error: Couldn't connect to fam daemon."
msgstr ""
-#: src/opts.c:12
+#: src/fileschanged.c:108
+msgid "Error: No files to monitor."
+msgstr ""
+
+#: src/opts.c:11
msgid ""
"Monitors FILEs for alterations. Display the filenames of FILEs that were "
"created, changed, deleted, started execution or finished executing.FILEs "
"must exist when monitoring begins, or they will not be monitored."
msgstr ""
-#: src/opts.c:17
+#: src/opts.c:16
msgid "[FILE]..."
msgstr ""
-#: src/opts.c:23
+#: src/opts.c:22
msgid "EVENT[,...]"
msgstr ""
-#: src/opts.c:24
+#: src/opts.c:23
msgid ""
"Display created, changed, deleted, executing, or executed files (Default is "
"\"created,changed\")"
msgstr ""
-#: src/opts.c:27
+#: src/opts.c:26
msgid "Display deleted files"
msgstr ""
-#: src/opts.c:29
+#: src/opts.c:28
msgid "(Default) Display changed files"
msgstr ""
-#: src/opts.c:31
+#: src/opts.c:30
msgid "(Default) Display newly created files"
msgstr ""
-#: src/opts.c:33
+#: src/opts.c:32
msgid "Display executing files"
msgstr ""
-#: src/opts.c:35
+#: src/opts.c:34
msgid "Display files that have stopped executing"
msgstr ""
-#: src/opts.c:37
+#: src/opts.c:36
msgid "Display all file events and the associated action"
msgstr ""
-#: src/opts.c:39
+#: src/opts.c:38
msgid "(Default) Monitor the FILEs on the command line"
msgstr ""
-#: src/opts.c:40
+#: src/opts.c:39
msgid "FILE"
msgstr ""
-#: src/opts.c:41
+#: src/opts.c:40
msgid "Monitor the list of filenames inside FILE"
msgstr ""
-#: src/opts.c:43
+#: src/opts.c:42
msgid "Monitor subdirectories of directories"
msgstr ""
-#: src/opts.c:45
+#: src/opts.c:44
msgid "Don't monitor symlinks, monitor what's pointed to"
msgstr ""
-#: src/opts.c:47
+#: src/opts.c:46
msgid "Delay showing changed files for N seconds (Def=2)"
msgstr ""
-#: src/opts.c:49
+#: src/opts.c:48
msgid "Display action when showing altered files"
msgstr ""
-#: src/opts.c:50
+#: src/opts.c:49
msgid "PROG"
msgstr ""
-#: src/opts.c:51
+#: src/opts.c:50
msgid "Run PROG when file is altered (PROG action filename)"
msgstr ""
-#: src/opts.c:76
+#: src/opts.c:72
msgid "created"
msgstr ""
-#: src/opts.c:78
+#: src/opts.c:74
msgid "changed"
msgstr ""
-#: src/opts.c:80
+#: src/opts.c:76
msgid "deleted"
msgstr ""
-#: src/opts.c:82
+#: src/opts.c:78
msgid "executing"
msgstr ""
-#: src/opts.c:84
+#: src/opts.c:80
msgid "executed"
msgstr ""
-#: src/opts.c:86
+#: src/opts.c:82
msgid "all"
msgstr ""
-#: src/opts.c:89
+#: src/opts.c:85
#, c-format
msgid "Error! '%s' is an unrecognized EVENT."
msgstr ""
-#: src/filelist.c:64
+#: src/filelist.c:77
#, c-format
msgid "Error: couldn't open '%s'\n"
msgstr ""
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/fileschanged-0.6.4/redhat/fileschanged.spec.in new/fileschanged-0.6.5/redhat/fileschanged.spec.in
--- old/fileschanged-0.6.4/redhat/fileschanged.spec.in 2004-10-13 20:09:36.000000000 +0200
+++ new/fileschanged-0.6.5/redhat/fileschanged.spec.in 2006-05-09 00:42:56.000000000 +0200
@@ -2,7 +2,7 @@
Name: @PACKAGE_NAME@
Version: @PACKAGE_VERSION@
Release: 0
-Copyright: GPL
+License: GPL
Group: Utilities/File
Source: @PACKAGE_NAME@-@PACKAGE_VERSION@.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(id -un)
@@ -30,6 +30,9 @@
%{_mandir}/*/*
%{_infodir}/*.info*
%{_datadir}/%{name}
+/usr/share/locale/ca/LC_MESSAGES/fileschanged.mo
+/usr/share/locale/es/LC_MESSAGES/fileschanged.mo
+
%changelog
* Fri May 7 2004 Dick Marinus
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/fileschanged-0.6.4/src/filelist.c new/fileschanged-0.6.5/src/filelist.c
--- old/fileschanged-0.6.4/src/filelist.c 2005-07-20 21:18:13.000000000 +0200
+++ new/fileschanged-0.6.5/src/filelist.c 2006-04-19 21:42:28.000000000 +0200
@@ -16,6 +16,19 @@
#include "listdirs.h"
extern struct arguments_t arguments;
+/*
+ * filelist.c:
+ * int filelist_populate (void *list_of_files_to_monitor);
+ *
+ * Fill LIST_OF_FILES_TO_MONITOR which is an instantianted list from list.[ch],
+ * with entries that are node_t from node.[ch]. Each entry represents a file
+ * that we want to monitor. The source data for this list is either from
+ * files specified on the command-line, or from a filelist specified by the -l
+ * option.
+ *
+ * Returns 0 upon success, or non-zero upon error.
+ *
+ */
static int
for_every_filename (int (*for_every_file)(int (*)(void *, char *), void *list), int (*add_it_to_the)(void *list, char *filename), void *list)
{
@@ -39,7 +52,7 @@
chop (char *line)
{
char *tmp;
- tmp = strpbrk (line,"\r\n");
+ tmp = strpbrk (line, "\r\n");
if (tmp)
tmp[0] = '\0';
return;
@@ -55,11 +68,11 @@
size_t n = 0;
int retval;
filename = arguments.fileschanged.filelist_filename;
- if (strcmp (filename,"-") == 0)
+ if (strcmp (filename, "-") == 0)
fileptr = stdin;
else
{
- fileptr = fopen(filename, "r");
+ fileptr = fopen (filename, "r");
if (!fileptr)
error(1, 0, _("Error: couldn't open '%s'\n"), filename);
}
@@ -85,7 +98,8 @@
retval = node_new (&node, filename);
if (retval == 0)
{
- if ((S_ISDIR(node.statbuf.st_mode)) && (arguments.fileschanged.recursive))
+ if ((S_ISDIR (node.statbuf.st_mode)) &&
+ (arguments.fileschanged.recursive))
{
void *dirs = NULL;
struct node_t *dir = NULL;
@@ -95,16 +109,19 @@
list_init (&dirs);
retval = listdirs (&node, dirs);
+ if (retval != 0)
+ return -1;
list_count (dirs, &count);
for(i = 0; i < count; i++)
{
list_get_element (dirs, i, &dir);
- retval = list_add (list,dir);
+ retval = list_add (list, dir);
}
list_free(dirs);
}
- else if ((S_ISREG(node.statbuf.st_mode)) || (S_ISDIR(node.statbuf.st_mode)))
+ else if ((S_ISREG (node.statbuf.st_mode)) ||
+ (S_ISDIR (node.statbuf.st_mode)))
{
//add this file.
retval = list_add (list, &node);
@@ -118,7 +135,7 @@
return 0;
}
-static void
+static int
remove_duplicates (void *list)
{
unsigned int i;
@@ -129,9 +146,9 @@
for(i = 0; i < count; i++)
{
list_get_element (list, i, &node);
- if (S_ISDIR(node->statbuf.st_mode))
+ if (S_ISDIR (node->statbuf.st_mode))
lastdir = node;
- else if ((S_ISREG(node->statbuf.st_mode)) && (lastdir))
+ else if ((S_ISREG (node->statbuf.st_mode)) && (lastdir))
{
char *file;
file = strdup (node->filename);
@@ -146,6 +163,8 @@
free (file);
}
+ else
+ return -1;
}
}
@@ -157,7 +176,7 @@
list_remove_element (list, i);
}
}
- return;
+ return 0;
}
int
@@ -176,7 +195,8 @@
//now remove files for which there are directories.
list_sort (list_of_files_to_monitor);
- remove_duplicates (list_of_files_to_monitor);
+ if (remove_duplicates (list_of_files_to_monitor) != 0)
+ return -2;
return retval;
}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/fileschanged-0.6.4/src/fileschanged.c new/fileschanged-0.6.5/src/fileschanged.c
--- old/fileschanged-0.6.4/src/fileschanged.c 2005-07-20 21:39:15.000000000 +0200
+++ new/fileschanged-0.6.5/src/fileschanged.c 2006-04-19 21:42:28.000000000 +0200
@@ -1,17 +1,13 @@
#include
-#include
#include
-#include
#include
#include
#include
#include
-#include
#include "config.h"
#include "gettext.h"
#include "fileschanged.h"
#include "opts.h"
-#include "node.h"
#include "list.h"
#include "monitor.h"
#include "filelist.h"
@@ -38,7 +34,8 @@
while (1)
{
monitor_handle_events (c, list, 0, -1);
- if ((arguments.fileschanged.filechangetimeout > 0) && (arguments.fileschanged.showchanged))
+ if ((arguments.fileschanged.filechangetimeout > 0) &&
+ (arguments.fileschanged.showchanged))
{
wl_show_changed_files (arguments.fileschanged.filechangetimeout,
show_changed_file);
@@ -60,7 +57,7 @@
return;
}
-void
+static void
sigHandler (int sig)
{
if (( sig == SIGINT ) || (sig == SIGPIPE))
@@ -83,9 +80,10 @@
}
int
-main(int argc, char **argv)
+main (int argc, char **argv)
{
int retval;
+ unsigned int count = 0;
if (init_locales (PACKAGE_NAME))
error(1, 0, "Error: Couldn't set locale");
@@ -104,6 +102,11 @@
//either from file, stdin, or from command line.
filelist_populate (app.list_of_files_to_monitor);
+ //bail if there's nothing to do
+ list_count (app.list_of_files_to_monitor, &count);
+ if (count == 0)
+ error(1, 0, _("Error: No files to monitor."));
+
setlinebuf (stdout);
fileschanged_main (&app.c, app.list_of_files_to_monitor);
@@ -111,6 +114,5 @@
fileschanged_cleanup ();
- exit(0);
+ exit (0);
}
-
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/fileschanged-0.6.4/src/handlers.c new/fileschanged-0.6.5/src/handlers.c
--- old/fileschanged-0.6.4/src/handlers.c 2005-07-20 21:35:21.000000000 +0200
+++ new/fileschanged-0.6.5/src/handlers.c 2006-05-06 16:46:17.000000000 +0200
@@ -1,8 +1,8 @@
#define _GNU_SOURCE
#include
#include
-#include
#include
+#include
#include "handlers.h"
#include "list.h"
#include "node.h"
@@ -10,6 +10,37 @@
#include "wl.h"
extern struct arguments_t arguments;
+/*
+ * handlers.c
+ *
+ * Handle one file notification event from the FAM server. We need to decide
+ * what we're going to do with this event, and we do something different based
+ * on what the event is. Based on the event, we'll call one of the function
+ * pointers in `handlers', and each one of those eventually call `show_event'.
+ *
+ * handle_event needs to know your FAMConnection, the LIST of files that we're
+ * monitoring, E is the event from the FAM server, and TIME_OF_EVENT is just a
+ * timestamp.
+ *
+ * We need to pass down the LIST because we might have to add more files to
+ * it, depending on if a new directory was created in a directory we're
+ * already monitoring recursively.
+ *
+ * handle_event(FAMConnection *c, void *list, FAMEvent *e,
+ * time_t time_of_event);
+ *
+ * There's one case where we need to show events outside of handlers. It is
+ * when we're waiting for a bunch of created/changed events to pass before
+ * stating that the file has created/changed (see the -t option). That is why
+ * this function is exported. This call is in:
+ * fileschanged.c:fileschanged_main().
+ *
+ * show_event(enum handler_enum_t id, char *filename);
+ *
+ * Note: it's important to know how determine_handler() works and why. If
+ * there's a critical function to fileschanged, that is it.
+ *
+ */
//private prototypes
static int handle_created_file (FAMConnection *c, void *list, enum handler_enum_t id, char *filename);
static int handle_created_dir (FAMConnection *c, void *list, enum handler_enum_t id, char *filename);
@@ -19,6 +50,7 @@
static int handle_deleted_dir (FAMConnection *c, void *list, enum handler_enum_t id, char *filename);
static int handle_startexecuting_file (FAMConnection *c, void *list, enum handler_enum_t id, char *filename);
static int handle_stopexecuting_file (FAMConnection *c, void *list, enum handler_enum_t id, char *filename);
+
static struct handler_t handlers[FC_HANDLER_MAX]=
{
{ FC_CREATED_FILE, "A", handle_created_file },
@@ -27,10 +59,8 @@
{ FC_CHANGED_DIR, "M", handle_changed_dir },
{ FC_DELETED_FILE, "R", handle_deleted_file },
{ FC_DELETED_DIR, "R", handle_deleted_dir },
- { FC_STARTEXECUTING_FILE, "E",
- handle_startexecuting_file },
- { FC_STOPEXECUTING_FILE, "X",
- handle_stopexecuting_file },
+ { FC_STARTEXECUTING_FILE, "E", handle_startexecuting_file },
+ { FC_STOPEXECUTING_FILE, "X", handle_stopexecuting_file },
};
static void
@@ -74,14 +104,16 @@
*id = FC_HANDLER_MAX;
//lookup the node that the event corresponds to.
filenode = (struct node_t *)e->userdata;
- if (S_ISREG(filenode->statbuf.st_mode))
+ if (S_ISREG (filenode->statbuf.st_mode))
{
//the simple case.
//okay it's a file we were monitoring to get this event.
*filename = strdup (filenode->filename);
+ if (!*filename)
+ return -2;
set_id_for_file (e, id);
}
- else if (S_ISDIR(filenode->statbuf.st_mode))
+ else if (S_ISDIR (filenode->statbuf.st_mode))
{
//okay it's a directory we were monitoring to get this event.
//it could still be a file in the directory we are monitoring.
@@ -89,6 +121,8 @@
if (e->filename[0] == '/') //it's a directory
{
*filename = strdup (filenode->filename);
+ if (!*filename)
+ return -3;
set_id_for_dir (e, id);
}
else
@@ -102,12 +136,14 @@
char *newfilename = NULL;
struct node_t newnode;
int retval;
- asprintf (&newfilename, "%s/%s", filenode->filename, e->filename);
+ if (asprintf (&newfilename, "%s/%s", filenode->filename,
+ e->filename) == -1)
+ return -4;
retval = node_new (&newnode, newfilename);
free (newfilename); newfilename = NULL;
if (retval == 0)
{
- isdir = S_ISDIR(newnode.statbuf.st_mode);
+ isdir = S_ISDIR (newnode.statbuf.st_mode);
*filename = strdup (newnode.filename);
node_free (&newnode);
}
@@ -120,7 +156,9 @@
}
else
{
- asprintf (filename, "%s/%s", filenode->filename, e->filename);
+ if (asprintf (filename, "%s/%s", filenode->filename,
+ e->filename) == -1)
+ return -3;
//it's a deleted file or directory. how can we tell it's type? it's gone now.
//if it were a directory we were monitoring, and we were in recursive mode,
//then we would have received a notification for that directory with an absolute name.
@@ -224,7 +262,7 @@
//printf("Adding '%s'\n",filename);
list_add (list, &newdir);
list_count (list, &count);
- list_get_element (list,count - 1, &node);
+ list_get_element (list, count - 1, &node);
FAMMonitorDirectory (c, newdir.filename, &newdir.request,
(void*)node);
node_free (&newdir);
@@ -232,12 +270,10 @@
else if (retval < 0)
return -1;
}
- else
+
+ if (arguments.fileschanged.showcreated)
{
- if (arguments.fileschanged.showcreated)
- {
- show_event (id, filename);
- }
+ show_event (id, filename);
}
return 0;
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/fileschanged-0.6.4/src/list.c new/fileschanged-0.6.5/src/list.c
--- old/fileschanged-0.6.4/src/list.c 2005-07-20 21:03:01.000000000 +0200
+++ new/fileschanged-0.6.5/src/list.c 2006-04-19 21:42:29.000000000 +0200
@@ -7,17 +7,17 @@
list_init (void **list)
{
struct list_t *l;
- l = (struct list_t*)malloc (sizeof (struct list_t));
+ l = (struct list_t *) malloc (sizeof (struct list_t));
if (!l)
return -1;
l->count=0;
- l->list = (struct node_t *)malloc (1);
+ l->list = (struct node_t *) malloc (1);
if (!l->list)
{
free (l);
return -2;
}
- *list = (void*)l;
+ *list = (void*) l;
return 0;
}
@@ -47,8 +47,8 @@
if ((!l) || (!node))
return -1;
l->count++;
- l->list = (struct node_t *)realloc (l->list,
- l->count * sizeof(struct node_t));
+ l->list = (struct node_t *) realloc (l->list,
+ l->count * sizeof (struct node_t));
node_copy (&l->list[l->count - 1], node);
return 0;
}
@@ -62,7 +62,7 @@
return -1;
if (element > l->count)
return -2;
- *node = (struct node_t *)&l->list[element];
+ *node = (struct node_t *) &l->list[element];
return 0;
}
@@ -128,8 +128,8 @@
return;
if (l->count == 0)
return;
- return qsort (l->list, l->count, sizeof(struct node_t),
- (int (*)(const void*, const void*)) node_compare);
+ return qsort (l->list, l->count, sizeof (struct node_t),
+ (int (*) (const void *, const void *)) node_compare);
}
int
@@ -142,7 +142,7 @@
return -1;
l->count--;
node = &l->list[element];
- memmove (node, node + sizeof(struct node_t),
+ memmove (node, node + sizeof (struct node_t),
(l->count-element) * sizeof (struct node_t));
return 0;
}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/fileschanged-0.6.4/src/listdirs.c new/fileschanged-0.6.5/src/listdirs.c
--- old/fileschanged-0.6.4/src/listdirs.c 2005-07-20 21:04:41.000000000 +0200
+++ new/fileschanged-0.6.5/src/listdirs.c 2006-04-19 21:42:29.000000000 +0200
@@ -3,13 +3,10 @@
#include
#include
#include
-#include
-#include
#include
#include "listdirs.h"
#include "list.h"
#include "xrealpath.h"
-static int _listdirs (struct node_t *dir, void *dirs, void *ancestors);
static int
_listdirs (struct node_t *dir, void *dirs, void *ancestors)
@@ -34,12 +31,13 @@
continue;
if (strcmp (namelist[i]->d_name, "..") == 0)
continue;
- asprintf (&d, "%s/%s", dir->filename, namelist[i]->d_name);
+ if (asprintf (&d, "%s/%s", dir->filename, namelist[i]->d_name) == -1)
+ return -1;
retval = node_new (&newdir, d);
free (d); d = NULL;
if (retval == 0)
{
- if (S_ISDIR(newdir.statbuf.st_mode))
+ if (S_ISDIR (newdir.statbuf.st_mode))
retval = _listdirs (&newdir, dirs,ancestors);
node_free (&newdir);
}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/fileschanged-0.6.4/src/monitor.c new/fileschanged-0.6.5/src/monitor.c
--- old/fileschanged-0.6.4/src/monitor.c 2005-07-20 21:17:51.000000000 +0200
+++ new/fileschanged-0.6.5/src/monitor.c 2006-04-19 21:42:29.000000000 +0200
@@ -14,6 +14,47 @@
#include "opts.h"
#include "handlers.h"
+/*
+ * monitor.c:
+ *
+ * Basic operations are `open' and `close' on the FAMConnection.
+ *
+ * monitor_open (FAMConnection *c);
+ * monitor_close (FAMConnection *c);
+ *
+ * To do anything, you have to `open' the monitor first.
+ *
+ * While in an open state (eg, we are connected to the FAM server),
+ * we may `begin', `stop' or `pause' monitoring for certain files. These
+ * operations require a LIST of files that we want to begin, stop, or pause
+ * monitoring of, and the open FAMConnection.
+ *
+ * monitor_begin(FAMConnection *c, void *list);
+ * monitor_stop (FAMConnection *c, void *list);
+ * monitor_pause_toggle (FAMConnection *c, void *list);
+ *
+ * After files have begun to be monitored, the FAM server will be notifying
+ * us with events about the files that have somehow changed. The main loop
+ * of fileschanged is looped around the `handle_events' function. This
+ * function needs the open FAMConnection, and the LIST of files that we want
+ * to handle events for. It also needs a SECS_TO_WAIT_FOR_PENDING parameter.
+ * This is the maximum number of seconds to wait for a message to arrive from
+ * the FAM server. After that it needs the SECS_TO_HANDLE_PENDING parameter.
+ * This is the maximum number of seconds to process messages from the server
+ * before giving up. If this value is -1, then it never gives up.
+ *
+ * Note that `begin' also calls `handle_events'. This is because the server
+ * can get backlogged trying to send us notifications, when we're not ready
+ * for them.
+ * SECS_TO_HANDLE_PENDING is not -1 when it's called from monitor_begin --
+ * the idea being that we don't want to wait for the all of the messages from
+ * the server before beginning to monitor more files.
+ *
+ * monitor_handle_events (FAMConnection *c, void *list,
+ * int secs_to_wait_for_pending, int secs_to_handle_pending);
+ *
+ * This function connects to the handlers via handle_event().
+ */
int
monitor_open (FAMConnection *c)
{
@@ -27,7 +68,7 @@
}
int
-monitor_begin(FAMConnection *c, void *list)
+monitor_begin (FAMConnection *c, void *list)
{
int retval;
unsigned int i;
@@ -37,18 +78,18 @@
for(i = 0; i < count; i++)
{
list_get_element (list, i, &node);
- if (S_ISDIR(node->statbuf.st_mode))
+ if (S_ISDIR (node->statbuf.st_mode))
{
//printf ("%04d monitoring directory: '%s'\n", i, node->filename);
retval = FAMMonitorDirectory (c, node->filename, &node->request,
- (void*)node);
+ (void *) node);
//printf ("FAMMonitorDirectory returns %d (reqnum %d)\n", retval, node->request.reqnum);
}
- else if (S_ISREG(node->statbuf.st_mode))
+ else if (S_ISREG (node->statbuf.st_mode))
{
//printf ("%04d monitoring file: '%s'\n", i, node->filename);
retval = FAMMonitorFile (c, node->filename, &node->request,
- (void*)node);
+ (void *) node);
//printf ("FAMMonitorFile returns %d (reqnum %d)\n", retval, node->request.reqnum);
}
monitor_handle_events (c, list, 0, 30);
@@ -151,7 +192,7 @@
tv.tv_usec = 500; //always add a bit here.
tv_ptr = &tv;
FD_ZERO (&rfds);
- FD_SET (c->fd,&rfds);
+ FD_SET (c->fd, &rfds);
numfds = select (FD_SETSIZE, &rfds, NULL, NULL, tv_ptr);
if (numfds == 1)
{//if a fam event happened,
@@ -164,4 +205,3 @@
}
return 0;
}
-
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/fileschanged-0.6.4/src/monitor.h new/fileschanged-0.6.5/src/monitor.h
--- old/fileschanged-0.6.4/src/monitor.h 2004-02-23 01:17:30.000000000 +0100
+++ new/fileschanged-0.6.5/src/monitor.h 2006-04-19 21:42:29.000000000 +0200
@@ -9,5 +9,4 @@
int monitor_pause_toggle(FAMConnection *c, void *list);
int monitor_handle_events(FAMConnection *c, void *list, int secs_to_wait_for_pending, int secs_to_handle_pending);
-
#endif
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/fileschanged-0.6.4/src/node.c new/fileschanged-0.6.5/src/node.c
--- old/fileschanged-0.6.4/src/node.c 2005-07-20 21:31:44.000000000 +0200
+++ new/fileschanged-0.6.5/src/node.c 2006-04-19 21:42:29.000000000 +0200
@@ -1,4 +1,3 @@
-#include
#include
#include
#include "node.h"
@@ -17,7 +16,7 @@
int
node_copy(struct node_t *dst, struct node_t *src)
{
- memcpy (dst, src, sizeof(struct node_t));
+ memcpy (dst, src, sizeof (struct node_t));
dst->filename = strdup (src->filename);
if (!dst->filename)
return -1;
@@ -30,14 +29,14 @@
int retval;
if ((!node) || (!filename))
return -1;
- memset (node, 0, sizeof(struct node_t));
+ memset (node, 0, sizeof (struct node_t));
if (arguments.fileschanged.dereference_symlinks)
retval = stat (filename, &node->statbuf);
else
retval = lstat (filename, &node->statbuf);
if (retval != 0)
return -2;
- if (!S_ISLNK(node->statbuf.st_mode))
+ if (!S_ISLNK (node->statbuf.st_mode))
node->filename = xrealpath (filename);
else
node->filename = strdup (filename);
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/fileschanged-0.6.4/src/opts.c new/fileschanged-0.6.5/src/opts.c
--- old/fileschanged-0.6.4/src/opts.c 2005-07-20 21:12:33.000000000 +0200
+++ new/fileschanged-0.6.5/src/opts.c 2006-04-19 21:42:29.000000000 +0200
@@ -1,7 +1,6 @@
#include
#include
#include
-#include
#include "gettext.h"
#include "config.h"
#include "opts.h"
@@ -55,8 +54,6 @@
static void
free_arguments ()
{
- free (arguments.fileschanged.exec_cmd);
- free (arguments.fileschanged.filelist_filename);
if (arguments.args)
free (arguments.args);
}
@@ -70,8 +67,7 @@
case 's':
{
char *tmp;
- for(tmp = strtok(arg, ","); tmp!=NULL;
- tmp=strtok(NULL,","))
+ for(tmp = strtok(arg, ","); tmp != NULL; tmp = strtok (NULL, ","))
{
if (strcasecmp (tmp, _("created")) == 0)
parse_opt ('c', NULL, state);
@@ -82,7 +78,7 @@
else if (strcasecmp (tmp, _("executing")) == 0)
parse_opt ('e', NULL, state);
else if (strcasecmp (tmp, _("executed")) == 0)
- parse_opt ('e', NULL, state);
+ parse_opt ('E', NULL, state);
else if (strcasecmp (tmp, _("all")) == 0)
parse_opt ('a', NULL, state);
else
@@ -125,7 +121,7 @@
case 'l':
arguments->fileschanged.filelist = 1;
arguments->fileschanged.filestomonitor = 0;
- arguments->fileschanged.filelist_filename = strdup (arg);
+ arguments->fileschanged.filelist_filename = arg;
break;
case 'p':
arguments->fileschanged.showaction = 1;
@@ -136,21 +132,19 @@
arguments->fileschanged.filechangetimeout = -1;
break;
case 'x':
- if (arguments->fileschanged.exec_cmd)
- free (arguments->fileschanged.exec_cmd);
- arguments->fileschanged.exec_cmd = strdup (arg);
+ arguments->fileschanged.exec_cmd = arg;
break;
case 'L':
arguments->fileschanged.dereference_symlinks = 1;
break;
case ARGP_KEY_INIT:
free_arguments ();
- arguments->args = (char**) malloc (1 * sizeof (char**));
+ arguments->args = (char **) malloc (1 * sizeof (char **));
break;
case ARGP_KEY_ARG:
arguments->arraylen++;
- arguments->args = (char **)realloc (arguments->args,
- arguments->arraylen * sizeof (char*));
+ arguments->args = (char **) realloc (arguments->args,
+ arguments->arraylen * sizeof (char *));
arguments->args[state->arg_num] = arg;
break;
case ARGP_KEY_END:
@@ -165,10 +159,8 @@
set_default_arguments (struct fileschanged_arguments_t *fileschanged)
{
//set some default values if options not set
- if ((fileschanged->showcreated == 0) &&
- (fileschanged->showchanged == 0) &&
- (fileschanged->showdeleted == 0) &&
- (fileschanged->showexecuting == 0) &&
+ if ((fileschanged->showcreated == 0) && (fileschanged->showchanged == 0) &&
+ (fileschanged->showdeleted == 0) && (fileschanged->showexecuting == 0) &&
(fileschanged->showfinishedexecuting == 0))
{
fileschanged->showcreated = 1; // if not showing anything
@@ -178,8 +170,7 @@
if (fileschanged->filechangetimeout == 0)
fileschanged->filechangetimeout = 2;
- if ((fileschanged->filestomonitor == 0) &&
- (fileschanged->filelist == 0))
+ if ((fileschanged->filestomonitor == 0) && (fileschanged->filelist == 0))
fileschanged->filestomonitor = 1;
if (fileschanged->filechangetimeout > 0)
@@ -206,4 +197,3 @@
set_default_arguments (&arguments->fileschanged);
return;
}
-
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/fileschanged-0.6.4/src/opts.h new/fileschanged-0.6.5/src/opts.h
--- old/fileschanged-0.6.4/src/opts.h 2005-07-20 20:05:32.000000000 +0200
+++ new/fileschanged-0.6.5/src/opts.h 2006-04-19 21:42:30.000000000 +0200
@@ -1,8 +1,5 @@
#ifndef FILESCHANGED_OPTS_H
#define FILESCHANGED_OPTS_H
-#ifdef __cplusplus
-extern "C" {
-#endif
#define _(__str) gettext(__str)
#define N_(__str) gettext_noop(__str)
@@ -22,15 +19,13 @@
char *exec_cmd;
int dereference_symlinks;
};
-struct arguments_t {
+struct arguments_t
+{
char **args;
int arraylen; //for argument processing
struct fileschanged_arguments_t fileschanged;
};
-#ifdef __cplusplus
-}
-#endif
void parse_opts(int argc, char **argv, struct arguments_t *arguments);
#endif
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/fileschanged-0.6.4/src/wl.c new/fileschanged-0.6.5/src/wl.c
--- old/fileschanged-0.6.4/src/wl.c 2005-07-20 21:18:41.000000000 +0200
+++ new/fileschanged-0.6.5/src/wl.c 2006-04-19 21:42:30.000000000 +0200
@@ -12,7 +12,7 @@
size_t wl_max = 0;
void
-wl_init()
+wl_init ()
{
return;
}
++++++ fileschanged.diff ++++++
--- /var/tmp/diff_new_pack.iplJVE/_old 2006-09-01 12:28:03.000000000 +0200
+++ /var/tmp/diff_new_pack.iplJVE/_new 2006-09-01 12:28:03.000000000 +0200
@@ -1,5 +1,5 @@
---- configure.ac 2005-07-20 21:16:31.000000000 +0200
-+++ configure.ac 2006-03-20 19:22:00.000000000 +0100
+--- configure.ac
++++ configure.ac 2006/09/01 06:58:54
@@ -23,13 +23,13 @@
@@ -16,8 +16,21 @@
AC_CHECK_HEADERS(unistd.h time.h string.h dirent.h argp.h)
PACKAGE_MAINTAINER="Ben Asselstine"
---- src/Makefile.am 2005-06-01 16:51:29.000000000 +0200
-+++ src/Makefile.am 2006-03-20 19:42:59.000000000 +0100
+--- info/fileschanged.texinfo
++++ info/fileschanged.texinfo 2006/09/01 09:01:14
+@@ -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
+--- src/Makefile.am
++++ src/Makefile.am 2006/09/01 06:58:54
@@ -10,5 +10,8 @@
filelist.c filelist.h \
handlers.c handlers.h \
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org