adu.git
4 years agoRemove some duplicate const specifiers. master
Andre Noll [Sat, 19 Jan 2019 10:42:45 +0000 (11:42 +0100)]
Remove some duplicate const specifiers.

Newer gcc complains about these, e.g.

interactive.c:149:13: warning: duplicate 'const' declaration specifier [-Wduplicate-decl-specifier]
  const char const *delim = "\t\n\f\r\v ";
     ^~~~~
With the patch applied, the tree compiles cleanly, at least with
gcc-7.4.0 and gcc-8.3.0.

5 years agoAdd link to author homepage.
Andre Noll [Sat, 19 Jan 2019 18:41:14 +0000 (19:41 +0100)]
Add link to author homepage.

To point interested people to related software.

5 years agoReword summary text.
Andre Noll [Sat, 19 Jan 2019 10:50:09 +0000 (11:50 +0100)]
Reword summary text.

The verb "allows" can never take an infinitive as its direct object.

7 years agoMerge branch 'refs/heads/t/doc-improvements'
Andre Noll [Sun, 26 Mar 2017 16:04:52 +0000 (18:04 +0200)]
Merge branch 'refs/heads/t/doc-improvements'

Another topic branch that was cooking for far too long.

* refs/heads/t/doc-improvements:
  Switch from grutatxt to markdown.
  INSTALL: Link to the gengetopt web page.
  manual: Fix a whitespace issue.
  manual: Add example for interactive mode.
  manual: Add two more examples.
  manual: Add example query for omitting a directory.
  manual: Add short option example.
  manual: Remove pointless "time" prefix.
  manual: Improve documentation of --output.

7 years agoMerge branch 'refs/heads/t/fchdir-warning-fix'
Andre Noll [Sun, 26 Mar 2017 16:03:28 +0000 (18:03 +0200)]
Merge branch 'refs/heads/t/fchdir-warning-fix'

Was cooking for nine months...

* refs/heads/t/fchdir-warning-fix:
  fd.c: Avoid gcc warning regarding fchdir().

7 years agoMerge branch 'refs/heads/t/dbdir-fix'
Andre Noll [Wed, 14 Sep 2016 11:16:27 +0000 (13:16 +0200)]
Merge branch 'refs/heads/t/dbdir-fix'

The topic branch started on 2016-06-02 and was cooking since
2016-06-24. It contains a single fix.

* refs/heads/t/dbdir-fix:
  Abort if neither --database-dir nor --base-dir is given.

7 years agocreate: Make the directory scan more robust.
Andre Noll [Thu, 1 Sep 2016 15:13:50 +0000 (17:13 +0200)]
create: Make the directory scan more robust.

The directory traversal of adu calls adu_opendir() of fd.c for every
subdirectory. If this call fails with EACCESS, a warning is printed
but the operation continues, ignoring the directory which could not
be accessed. Other errors are considered fatal, though, and adu aborts
in this case.

This patch continues to scan in this case. This is achieved by making
all errors from adu_opendir non-fatal. In the error case we print a
warning and ignore the directory, but no longer abort.

Thanks to Steffen Schmidt for pointing out this flaw.

7 years agoAbort if neither --database-dir nor --base-dir is given.
Andre Noll [Thu, 2 Jun 2016 15:37:26 +0000 (17:37 +0200)]
Abort if neither --database-dir nor --base-dir is given.

If --database-dir is not given, adu concatenates the database root
directory (which defaults to /var/lib/adu) with the value of the
--base-dir argument. However, if --base-dir is not given either,
base_dir_arg is NULL, and the concatenated string becomes the result
is /var/lib/adu(null), at least on glibc.

With this patch applied, adu handles this case more gracefully: it
prints an error message and aborts early.

7 years agoSwitch from grutatxt to markdown.
Andre Noll [Sat, 4 Jun 2016 14:36:14 +0000 (16:36 +0200)]
Switch from grutatxt to markdown.

The grutatxt project is dead, so we need to switch to something else
eventually. Fortunately, it is very easy to convert the two files in
the tree from grutatxt to markdown format: only the three links need
to be adjusted.

7 years agoINSTALL: Link to the gengetopt web page.
Andre Noll [Sat, 4 Jun 2016 14:20:20 +0000 (16:20 +0200)]
INSTALL: Link to the gengetopt web page.

Most people prefer to install the distro package rather than
downloading the tarball from the FTP server. This also removes the
sentence about a recent version of gengetopt, since there has been
no gengetopt release for a while and all moderately recent distros
ship the newest version.

7 years agomanual: Fix a whitespace issue.
Andre Noll [Sat, 4 Jun 2016 14:05:44 +0000 (16:05 +0200)]
manual: Fix a whitespace issue.

7 years agomanual: Add example for interactive mode.
Andre Noll [Thu, 2 Jun 2016 12:58:29 +0000 (14:58 +0200)]
manual: Add example for interactive mode.

Interactive mode is treated only very briefly in the documentation
and the syntax of the set command is not explained at all.

This commit adds an adu script that can be fed to adu -I to produce
two different output files for the two users under consideration.

7 years agomanual: Add two more examples.
Andre Noll [Sat, 4 Jun 2016 13:43:01 +0000 (15:43 +0200)]
manual: Add two more examples.

Thomas Helle suggested to mention also the global summary and the
--list-sort feature of adu. This commit adds two more examples which
illustrate these features.

7 years agomanual: Add example query for omitting a directory.
Andre Noll [Thu, 2 Jun 2016 13:11:59 +0000 (15:11 +0200)]
manual: Add example query for omitting a directory.

The --pattern option to match paths against regular expressions can be
very useful, so let's add a simple example which prepends the pattern
by an exclamation mark to exclude a directory from the file list.

7 years agomanual: Add short option example.
Andre Noll [Thu, 2 Jun 2016 13:11:37 +0000 (15:11 +0200)]
manual: Add short option example.

While long options are nice for shell scripts, short options are easier
to type at the shell prompt, and look more concise in a man page.

This commit adds an example command which is equivalent to the previous
one but uses short options and combines two options to explain the
equivalence. Subsequent examples will only refer to short options.

7 years agomanual: Remove pointless "time" prefix.
Andre Noll [Thu, 2 Jun 2016 12:12:51 +0000 (14:12 +0200)]
manual: Remove pointless "time" prefix.

The stated example command works, but since this is the manual for adu,
let's focus on adu features here.

7 years agomanual: Improve documentation of --output.
Andre Noll [Thu, 2 Jun 2016 12:43:54 +0000 (14:43 +0200)]
manual: Improve documentation of --output.

The three redirection features of --output are useless for select
mode since these redirections can also be created by the shell.

This commit adds a paragraph which clarifies this. We use the
opportunity to reword the remaining text for the option slightly.

7 years agobuild: Don't remove adu.png on make clean.
Andre Noll [Mon, 6 Jun 2016 06:46:09 +0000 (08:46 +0200)]
build: Don't remove adu.png on make clean.

This was appropriate with the old logo which was generated from a
.sk source file. The new logo, however, only exists in png format,
so we should never remove it.

The adu.sk~ file can also be skipped from the list of files to be
removed by make clean.

7 years agofd.c: Avoid gcc warning regarding fchdir().
Andre Noll [Sat, 4 Jun 2016 14:43:43 +0000 (16:43 +0200)]
fd.c: Avoid gcc warning regarding fchdir().

gcc-4.8.4 on Ubuntu-14.04 complains about our use of fchdir():

fd.c:181:9: warning: ignoring return value of ‘fchdir’, declared with attribute warn_unused_result [-Wunused-result]
   fchdir(*cwd);

Silence the warning by introducing a dummy variable. The patch also
fixes the indentation of the comment which explains why we ignore
the return value here.

8 years agoadu-1.0.0. v1.0.0
Andre Noll [Wed, 20 Apr 2016 18:43:44 +0000 (20:43 +0200)]
adu-1.0.0.

This project is done. In fact it was done already five years ago
and has seen only a couple of minor fixes since then. With the new
version number it does not look like the project is dead.

8 years agoFix gitweb link.
Andre Noll [Tue, 19 Apr 2016 12:59:08 +0000 (14:59 +0200)]
Fix gitweb link.

Although on the gitweb server there is a link adu -> adu.git, the
link on the main page does not work without the .git suffix. This
used to work at some point...

9 years agofd.c: EAGAIN can not happen in __write().
Andre Noll [Sat, 3 Jan 2015 22:06:36 +0000 (22:06 +0000)]
fd.c: EAGAIN can not happen in __write().

The only caller does not specify O_NONBLOCK, so the check for EAGAIN
is unnecessary.

9 years agofd.c: Make __write() static.
Andre Noll [Sun, 15 Feb 2015 15:42:19 +0000 (16:42 +0100)]
fd.c: Make __write() static.

It's an internal function which is only used inside fd.c, as indicated
by the leading underscores. And it does not have a prototype in fd.h.

9 years agoSimplify and rename mmap_full_file().
Andre Noll [Sun, 15 Feb 2015 15:42:05 +0000 (16:42 +0100)]
Simplify and rename mmap_full_file().

There is only one caller which maps the file privately into read-only
memory. Moreover, this caller does not care about the file descriptor
from which the mapping was created.

This commit removes the argument from mmap_full_file() which control
the type of the map and the result pointer for the file descriptor,
thereby simplifying the function slightly. Rename it to mmap_file_ro()
to indicate that read-only private mappings are implied.

9 years agoMake fd.c and select.c include their own header file.
Andre Noll [Sat, 3 Jan 2015 21:36:17 +0000 (21:36 +0000)]
Make fd.c and select.c include their own header file.

This helps to spot bugs where declaration and implementation
differ. Fortunately, there is so such bug in adu, but it's a good thing
(TM) to let the compiler error out in this case.

9 years agoFix spelling of member of struct num_format.
Andre Noll [Sat, 3 Jan 2015 17:53:39 +0000 (17:53 +0000)]
Fix spelling of member of struct num_format.

9 years agoAssorted typo fixes in comments.
Andre Noll [Sat, 3 Jan 2015 17:51:03 +0000 (17:51 +0000)]
Assorted typo fixes in comments.

9 years agostring.c: Kill pointless initialization.
Andre Noll [Sat, 3 Jan 2015 17:39:39 +0000 (17:39 +0000)]
string.c: Kill pointless initialization.

Found by cppcheck.

9 years agointeractive.c: Kill pointless initialization.
Andre Noll [Sat, 3 Jan 2015 17:38:08 +0000 (17:38 +0000)]
interactive.c: Kill pointless initialization.

Found by cppcheck.

9 years agoRemove stale sentence about the logo.
Andre Noll [Fri, 5 Sep 2014 14:15:38 +0000 (16:15 +0200)]
Remove stale sentence about the logo.

The new logo was created with gimp, but this does not really matter,
so remove the sentence from INSTALL.

9 years agoReplace systemlinux.org URL and email address.
Andre Noll [Fri, 15 Aug 2014 13:36:03 +0000 (15:36 +0200)]
Replace systemlinux.org URL and email address.

Although the web page is still online at the old location, the new
location at tuebingen.mpg.de is now the "official" one.

This commit changes the URL in the INSTALL file and all email addresses
to the new domain.

9 years agoAdd new logo.
Andre Noll [Mon, 11 Aug 2014 16:15:00 +0000 (18:15 +0200)]
Add new logo.

To paraphrase a similar change in the ratpoison project: it was hard
to say good-bye to the old logo but sometimes we just have to let the
past be the past.

9 years agoMove adu_strerror() to adu.c.
Andre Noll [Sat, 18 Aug 2012 14:28:18 +0000 (16:28 +0200)]
Move adu_strerror() to adu.c.

This function is a bit too large to be inlined, and it depends on osl.

9 years agoRemove VSPRINTF.
Andre Noll [Sat, 18 Aug 2012 16:33:19 +0000 (18:33 +0200)]
Remove VSPRINTF.

This macro has only a single user in string.c, and it's kind of
pointless for this code to be a macro.

9 years agoMove adu_isspace() to interactive.c.
Andre Noll [Sat, 18 Aug 2012 16:28:26 +0000 (18:28 +0200)]
Move adu_isspace() to interactive.c.

This macro is only used there, so it need not be public.

9 years agoadu.ggo: Remove unused --config-file option.
Andre Noll [Wed, 15 Aug 2012 21:02:09 +0000 (23:02 +0200)]
adu.ggo: Remove unused --config-file option.

This never worked since we do not even call the generated config file
parser. Also remove --conf-parser from gengetopt options.

9 years agointeractive.c: Return proper error on icom_set() failure.
Andre Noll [Wed, 15 Aug 2012 20:44:19 +0000 (22:44 +0200)]
interactive.c: Return proper error on icom_set() failure.

If an interactive set command fails, we currently reset the
configuration to the default and return success. This is probably
not what the user expected.

Make the command fail instead.

10 years agoPrint directory name on create errors.
Andre Noll [Mon, 5 Aug 2013 10:46:39 +0000 (12:46 +0200)]
Print directory name on create errors.

In create mode, if the database directory already exists, adu prints
an error message of the form

main: directory exists.

This is a bit sparse, so let's add a log message which prints the
directory name. With the patch applied the output becomes

open_dir_table: could not create /ebio/maan/tmp/adu-lists/
main: directory exists

10 years agoFix user summary accounting if pattern is given.
Andre Noll [Sun, 9 Jun 2013 15:48:36 +0000 (17:48 +0200)]
Fix user summary accounting if pattern is given.

In user summary select mode we iterate over each row in the user
info table and get the directory name from the number stored in the
row. Next we match this name against the given pattern and only take
matching directories into account for the user summary.

Currently we call get_dir_name_of_row(), but this is wrong:
Since we iterate over the user info table, we must call
get_dir_name_of_user_row() instead as the former function expects a
pointer to a dir table row.

This bug caused wrong directory names to be matched against the
pattern, hence the results of the user summary were incorrect.

10 years agoAvoid gcc warning.
Andre Noll [Sun, 9 Jun 2013 16:31:55 +0000 (18:31 +0200)]
Avoid gcc warning.

Introduce a default case for the body of the switch statement in
print_statistics() to avoid the following gcc-4.8.1 warning:

select.c: In function 'print_statistics':
select.c:806:2: warning: enumeration value 'select_mode__NULL' not handled in switch [-Wswitch]
  switch (select_conf.select_mode_arg) {
  ^

11 years agoformat.c: Remove an unused variable.
Andre Noll [Mon, 25 Jun 2012 19:07:22 +0000 (21:07 +0200)]
format.c: Remove an unused variable.

In format_items(), "unit" is set but unused. gcc is right to complain
here. This variable is pointless and can go away.

11 years agosplit_args(): Do not insist on checking the return value.
Andre Noll [Mon, 25 Jun 2012 18:59:17 +0000 (20:59 +0200)]
split_args(): Do not insist on checking the return value.

Currently, split_args() of string.c has the __must_check attribute
which instructs gcc to warn whenever the return value of this function
is ignored by the caller.

However, since the returned array is NULL terminated anyway, there
are situations the return value my safely be ignored, for example if
the returned array is passed to execvp(), which does not receive a
length argument.

This patch removes the __must_check attribute and fixes a "set but
not used" warning on newer gcc versions.

11 years agoFix check for return value of catch_signal().
Andre Noll [Mon, 25 Jun 2012 18:48:53 +0000 (20:48 +0200)]
Fix check for return value of catch_signal().

Commit 2d7a4d61 made adu's signal handling portable by switching from
signal() to sigaction() for installing signal handlers.  This commit
added the new function catch_signal() which returns the return value
of the underlying call to sigaction(), i.e. zero on success, and -1
on errors.

However, embarrassingly enough, one caller of catch_signal() still
checked this return value against SIG_ERR, which is the value that
is returned from signal() on errors.

Fix this bug by testing the return value against zero.

11 years agoMakefile: Honor CPPFLAGS also when creating dependencies.
Andre Noll [Mon, 25 Jun 2012 16:23:15 +0000 (18:23 +0200)]
Makefile: Honor CPPFLAGS also when creating dependencies.

Makefile.deps is created using a cc -MM -MG command which might need
the CPPFLAGS provided by the user, just as the ordinary cc commands
for creating an object file.

For example, the user might have passed -I$HOME/include, since
libosl was installed in $HOME. In this case we need to pass
this to the cc command that creates the Makefile as well.

11 years agofd.c: Make __chdir() static.
Andre Noll [Mon, 25 Jun 2012 16:16:58 +0000 (18:16 +0200)]
fd.c: Make __chdir() static.

This function is only used in fd.c.

12 years agoFix signal handling.
Andre Noll [Thu, 2 Feb 2012 16:07:35 +0000 (17:07 +0100)]
Fix signal handling.

Using signal() to set the disposition of a signal is always a bad idea
as POSIX does not specify whether a system call which was interrupted
should be restarted or not.

For interactive sessions, the Linux behaviour is to automatically
restart slow system calls, specifically read(2) in case nothing had
been read before the interrupt arrived. This is rather unfortunate
as adu calls fgets(3) (hence read(2)) in an endless loop to read the
user input. Therefore automatically restarted read() calls result
in interactive sessions that can not be terminated easily, as was
noticed by Sebastian Stark.

This patch makes the signal initialization code call sigaction()
instead of signal() to set up the handlers. This buys us well-defined
semantics across all operating systems, namely to *not* restart slow
system calls. As a side effect of this change, interactive sessions
can now be terminated by sending SIGINT (e.g., by pressing CTRL+C).

13 years agoMinor help text improvements.
Andre Noll [Sat, 22 Jan 2011 11:49:55 +0000 (12:49 +0100)]
Minor help text improvements.

13 years agoFix typo in comment.
Andre Noll [Sat, 22 Jan 2011 11:50:26 +0000 (12:50 +0100)]
Fix typo in comment.

13 years agoadu-0.1.0. maint v0.1.0
Andre Noll [Fri, 21 Jan 2011 16:23:42 +0000 (17:23 +0100)]
adu-0.1.0.

No bug reports and no commits for more than one year. This can only mean
that adu is ready for production use now ;)

13 years agoMakefile: Remove -lcrypto.
Andre Noll [Fri, 13 Aug 2010 08:47:04 +0000 (10:47 +0200)]
Makefile: Remove -lcrypto.

As libosl.0.1.1 does not depend on libssl any more, linking against libcrypto
is no longer necessary.

14 years agoRevert "Use ?:= as the assignement operator for PREFIX."
Andre Noll [Thu, 5 Nov 2009 10:28:37 +0000 (11:28 +0100)]
Revert "Use ?:= as the assignement operator for PREFIX."

This reverts commit 59af25aafd51b706ed67784aa84332965c31bb26 as
it does not work with all versions of (gnu) make.

14 years agoUse ?:= as the assignement operator for PREFIX.
Andre Noll [Mon, 2 Nov 2009 13:45:15 +0000 (14:45 +0100)]
Use ?:= as the assignement operator for PREFIX.

This creates a simply expanded variable which is more suitable for
the PREFIX variable.

14 years agoSet CC to gcc by default.
Andre Noll [Mon, 2 Nov 2009 13:43:51 +0000 (14:43 +0100)]
Set CC to gcc by default.

On systems where cc != gcc, compilation likely fails because we are
using quite some gccisms in adu. So default to gcc but let the user
override the default by setting CC manually.

The straight-forward CC ?= gcc does not work with gnu make as make
assigns CC the default value "cc".

Thanks to Steffen Schmidt for pointing out this shortcoming.

14 years agoReplace hard-coded gcc by $(CC) in Makefile.deps target.
Andre Noll [Mon, 2 Nov 2009 13:42:42 +0000 (14:42 +0100)]
Replace hard-coded gcc by $(CC) in Makefile.deps target.

If the user chooses alternative compiler, she will likely also generate
the dependency file by using that compiler.

14 years agoAdd wrapper for isspace() which is needed for NetBSD.
Andre Noll [Mon, 24 Aug 2009 15:52:31 +0000 (17:52 +0200)]
Add wrapper for isspace() which is needed for NetBSD.

14 years agoTransform the database_dir/database_root arg into an absolute path.
Andre Noll [Fri, 21 Aug 2009 11:25:04 +0000 (13:25 +0200)]
Transform the database_dir/database_root arg into an absolute path.

adu --create failed badly if called with --database_dir or
--database_root being relative path. This patch fixes the bug.

Unfortunately, it's not completely trivial to obtain the cwd
in a portable and secure manner. The method used in the
new absolute_path() function, while still not bullet-proof, is
the best what one can do if portability is an issue.

14 years agoINSTALL: Link to the new osl web page rather than to the gitweb page.
Andre Noll [Fri, 21 Aug 2009 09:29:30 +0000 (11:29 +0200)]
INSTALL: Link to the new osl web page rather than to the gitweb page.

14 years agoFix typo.
Christina Wassermann [Wed, 5 Aug 2009 13:49:14 +0000 (15:49 +0200)]
Fix typo.

Fix typo in the README file.

14 years agoDocumenatation improvements.
Andre Noll [Mon, 15 Jun 2009 18:14:30 +0000 (20:14 +0200)]
Documenatation improvements.

This patch adds an illustration of the user-list mode to README and an
examples section to the man page. Thanks to Klaus Kopec who suggested
this improvement.

14 years agoIncrease width of uid column to 6.
Andre Noll [Mon, 8 Jun 2009 07:31:15 +0000 (09:31 +0200)]
Increase width of uid column to 6.

This makes the user summary output look nicer if there are uids > 10000.

14 years agoAdd an example to README.
Andre Noll [Fri, 8 May 2009 11:20:30 +0000 (13:20 +0200)]
Add an example to README.

Suggested by Sebastian Stark.

14 years agoINSTALL: Add a link to the public git repo.
Andre Noll [Fri, 8 May 2009 08:47:48 +0000 (10:47 +0200)]
INSTALL: Add a link to the public git repo.

14 years agoMerge commit 'athcx/bloom'
Andre Noll [Fri, 24 Apr 2009 09:37:08 +0000 (11:37 +0200)]
Merge commit 'athcx/bloom'

Conflicts:

create.c

15 years agoFix another typo.
Andre Noll [Sun, 19 Apr 2009 13:31:13 +0000 (15:31 +0200)]
Fix another typo.

Two typos in the same log message..

15 years agoFix typo.
Andre Noll [Fri, 10 Apr 2009 00:05:01 +0000 (02:05 +0200)]
Fix typo.

15 years agoImplement --trailer select option.
Andre Noll [Wed, 11 Feb 2009 09:57:56 +0000 (10:57 +0100)]
Implement --trailer select option.

It works just like the --header option.

15 years agoMerge commit 'fml/master'
Andre Noll [Tue, 10 Feb 2009 22:08:20 +0000 (23:08 +0100)]
Merge commit 'fml/master'

Conflicts:
adu.ggo
user.c

15 years agoremove paraslash relict in comment
Sebastian Stark [Sun, 1 Feb 2009 22:51:59 +0000 (23:51 +0100)]
remove paraslash relict in comment

15 years agoflush output after each command in interactive mode.
Sebastian Stark [Mon, 2 Feb 2009 09:32:12 +0000 (10:32 +0100)]
flush output after each command in interactive mode.

Otherwise "clients" that are not terminals have difficulties
seeing adu's output.

15 years agoadd simple install target for adu and adu.1
Sebastian Stark [Mon, 2 Feb 2009 10:03:49 +0000 (11:03 +0100)]
add simple install target for adu and adu.1

15 years agonew option database-root
Sebastian Stark [Wed, 4 Feb 2009 10:16:01 +0000 (11:16 +0100)]
new option database-root

If database-root is given, the database dir is computed by
appending the base dir to it. Obviously this works only if
base dir is given, even for select mode.
The needed directory structure is created below database-root
by the new function mkpath(), which recursively creates any
directory needed to copy the structure of base dir. This
has the side-effect that the database dir is always created
for the user (if permissions allow) which wasn't the case
before.

database_dir is now a global variable just like conf and should
be used whenever conf.database_dir_arg was used before.

15 years agoMerge branch 'master' into bloom
Andre Noll [Thu, 25 Dec 2008 11:23:10 +0000 (12:23 +0100)]
Merge branch 'master' into bloom

Conflicts:
create.c

15 years agoMake user.c independent of command line options.
Andre Noll [Thu, 25 Dec 2008 11:19:56 +0000 (12:19 +0100)]
Make user.c independent of command line options.

15 years agoMerge branch 'master' into bloom
Andre Noll [Thu, 25 Dec 2008 10:54:46 +0000 (11:54 +0100)]
Merge branch 'master' into bloom

15 years agoRemove unused option --config-file.
Andre Noll [Thu, 25 Dec 2008 10:54:26 +0000 (11:54 +0100)]
Remove unused option --config-file.

15 years agobloom.c: Remove some unneccessary includes.
Andre Noll [Thu, 25 Dec 2008 10:48:53 +0000 (11:48 +0100)]
bloom.c: Remove some unneccessary includes.

15 years agoAdd source code documentation for bloom_insert().
Andre Noll [Thu, 25 Dec 2008 10:46:41 +0000 (11:46 +0100)]
Add source code documentation for bloom_insert().

15 years agoRename bloom_test_and_insert() to bloom_insert().
Andre Noll [Wed, 24 Dec 2008 13:02:50 +0000 (14:02 +0100)]
Rename bloom_test_and_insert() to bloom_insert().

In order to keep statistics up to date, we always need to do the test.

15 years agoRename bloom_init() to bloom_new().
Andre Noll [Wed, 24 Dec 2008 12:59:14 +0000 (13:59 +0100)]
Rename bloom_init() to bloom_new().

15 years agobloom: Add some source documentation.
Andre Noll [Wed, 24 Dec 2008 12:51:29 +0000 (13:51 +0100)]
bloom: Add some source documentation.

15 years agoMerge branch 'master' into bloom
Andre Noll [Wed, 24 Dec 2008 12:14:11 +0000 (13:14 +0100)]
Merge branch 'master' into bloom

15 years agoDocument the stat64 compatibility fix.
Andre Noll [Wed, 24 Dec 2008 12:13:52 +0000 (13:13 +0100)]
Document the stat64 compatibility fix.

15 years agoMerge branch 'master' into bloom
Andre Noll [Tue, 23 Dec 2008 16:27:06 +0000 (17:27 +0100)]
Merge branch 'master' into bloom

15 years agoMake it compile on FreeBSD and NetBSD.
Andre Noll [Tue, 23 Dec 2008 16:26:52 +0000 (17:26 +0100)]
Make it compile on FreeBSD and NetBSD.

off_t on BSD is 64 bit even on 32bit machines, so there are no
special tricks needed to get large file support. In fact, getconf
has no options for large file support and struct stat64 and lstat64()
do not exist on BSD systems. This caused the compilation to fail on
those systems.

Fix this problem by checking for BSD via uname -s in the Makefile. If
uname indicates we're on BSD, then do not use getconf and #define
stat64 and lstat64() to stat and lstat() respectively.

15 years agoFirst draft of hard link detection via bloom filters.
Andre Noll [Sun, 21 Dec 2008 22:47:28 +0000 (23:47 +0100)]
First draft of hard link detection via bloom filters.

15 years agoFix a design bug concerning struct user_info.
Andre Noll [Wed, 17 Dec 2008 22:32:21 +0000 (23:32 +0100)]
Fix a design bug concerning struct user_info.

It was a bad idea to include the accounting data (#files, #dirs,
information about the user only.

So move the accounting data to user_summary_info. This allows
to get rid of the ugly uid_hash_table_sort_idx construct and of
sort_hash_table(). These were only needed because of the broken
design.  We now never sort the hash table but allocate an array of
user_summary_info structures on each query and sort that array instead.

This patch not only simplifies code but also fixes a real bug noted by
Sebastian Stark: If the user_summary was requested more than once in
interactive mode, the old code computed incorrect values because the
above mentioned accounting fields were only initialized once. The new
code gets this right automatically because a fresh array is created
on each query.

15 years agoprint_complete_help_and_die() does not return.
Andre Noll [Sat, 22 Nov 2008 22:40:18 +0000 (23:40 +0100)]
print_complete_help_and_die() does not return.

So change the return type to void.

15 years agoMerge commit 'fml/master'
Andre Noll [Sat, 22 Nov 2008 22:38:39 +0000 (23:38 +0100)]
Merge commit 'fml/master'

15 years agoSome more source code documentation.
Andre Noll [Wed, 12 Nov 2008 21:40:00 +0000 (22:40 +0100)]
Some more source code documentation.

15 years agoAdd documentation of parse_select_options().
Andre Noll [Wed, 12 Nov 2008 20:28:55 +0000 (21:28 +0100)]
Add documentation of parse_select_options().

15 years agoFix a compiler warning.
Andre Noll [Wed, 12 Nov 2008 17:12:40 +0000 (18:12 +0100)]
Fix a compiler warning.

It's kinda bogus, but anyway. It fixes

select.c:532: warning: 'comp' may be used uninitialized in this function

15 years agoAdd documentation of DEFINE_ERRLIST.
Andre Noll [Tue, 11 Nov 2008 22:39:50 +0000 (23:39 +0100)]
Add documentation of DEFINE_ERRLIST.

15 years agoStart writing the mainpage for the API reference.
Andre Noll [Tue, 11 Nov 2008 22:39:06 +0000 (23:39 +0100)]
Start writing the mainpage for the API reference.

This should also contain a general overview..

15 years agoAdd yet more source code documentation.
Andre Noll [Tue, 11 Nov 2008 22:08:43 +0000 (23:08 +0100)]
Add yet more source code documentation.

15 years agoAdd some more souce code documentation.
Andre Noll [Tue, 11 Nov 2008 21:09:00 +0000 (22:09 +0100)]
Add some more souce code documentation.

15 years agoMake close_all_tables() static.
Andre Noll [Tue, 11 Nov 2008 20:58:33 +0000 (21:58 +0100)]
Make close_all_tables() static.

It's only used in adu.c.

15 years agoMerge commit 'fml/master'
Andre Noll [Mon, 10 Nov 2008 21:32:24 +0000 (22:32 +0100)]
Merge commit 'fml/master'

15 years agostring.c: Replace "paralash" by "adu" in source code documentation.
Andre Noll [Mon, 10 Nov 2008 21:30:09 +0000 (22:30 +0100)]
string.c: Replace "paralash" by "adu" in source code documentation.

15 years agoAdd source code documentation for run_select_query() and com_select().
Andre Noll [Mon, 10 Nov 2008 21:29:17 +0000 (22:29 +0100)]
Add source code documentation for run_select_query() and com_select().

15 years agoAdd missing source code documentation of user.c.
Andre Noll [Mon, 10 Nov 2008 21:00:06 +0000 (22:00 +0100)]
Add missing source code documentation of user.c.

This completes the documentation of user.c.