paraslash.git
12 years agoMerge commit 'remotes/fml/v0.3' into v0.3
Andre Noll [Thu, 11 Oct 2007 16:59:36 +0000 (18:59 +0200)]
Merge commit 'remotes/fml/v0.3' into v0.3

12 years agoAdd --gc-sections to LDFLAGS.
Andre Noll [Thu, 11 Oct 2007 12:35:28 +0000 (14:35 +0200)]
Add --gc-sections to LDFLAGS.

This, together with -fdata-sections and -ffunction-sections brought
nice size reductions. Before:

-rwxr-xr-x 1 maan fml  29K Oct 11 14:32 para_audioc*
-rwxr-xr-x 1 maan fml  42K Oct 11 14:32 para_client*
-rwxr-xr-x 1 maan fml  33K Oct 11 14:32 para_fade*
-rwxr-xr-x 1 maan fml  38K Oct 11 14:32 para_filter*
-rwxr-xr-x 1 maan fml  54K Oct 11 14:32 para_fsck*
-rwxr-xr-x 1 maan fml  52K Oct 11 14:32 para_gui*
-rwxr-xr-x 1 maan fml  42K Oct 11 14:32 para_recv*
-rwxr-xr-x 1 maan fml 216K Oct 11 14:32 para_server*
-rwxr-xr-x 1 maan fml  38K Oct 11 14:32 para_write*

After:

-rwxr-xr-x 1 maan fml  21K Oct 11 14:31 para_audioc*
-rwxr-xr-x 1 maan fml  33K Oct 11 14:31 para_client*
-rwxr-xr-x 1 maan fml  29K Oct 11 14:31 para_fade*
-rwxr-xr-x 1 maan fml  29K Oct 11 14:31 para_filter*
-rwxr-xr-x 1 maan fml  45K Oct 11 14:31 para_fsck*
-rwxr-xr-x 1 maan fml  47K Oct 11 14:31 para_gui*
-rwxr-xr-x 1 maan fml  30K Oct 11 14:31 para_recv*
-rwxr-xr-x 1 maan fml 208K Oct 11 14:31 para_server*
-rwxr-xr-x 1 maan fml  29K Oct 11 14:31 para_write*

12 years agoGet rid of E_WAITPID.
Andre Noll [Wed, 10 Oct 2007 18:19:26 +0000 (20:19 +0200)]
Get rid of E_WAITPID.

12 years agoGet rid of E_SIGNAL_PIPE.
Andre Noll [Wed, 10 Oct 2007 18:04:03 +0000 (20:04 +0200)]
Get rid of E_SIGNAL_PIPE.

If creation of the signal pipe fails, we abort anyway. So print
the errno in the fatal log message instead of the fact that the create
failed.

12 years agofd.c: Cosmetics.
Andre Noll [Wed, 10 Oct 2007 17:55:04 +0000 (19:55 +0200)]
fd.c: Cosmetics.

12 years agoGet rid of E_FCHDIR.
Andre Noll [Wed, 10 Oct 2007 17:50:12 +0000 (19:50 +0200)]
Get rid of E_FCHDIR.

Return the system error code instead.

12 years agoGet rid of E_OPENDIR.
Andre Noll [Wed, 10 Oct 2007 17:45:45 +0000 (19:45 +0200)]
Get rid of E_OPENDIR.

Return the system error instead.

12 years agopara_select(): Return a proper error code on errors.
Andre Noll [Wed, 10 Oct 2007 17:38:41 +0000 (19:38 +0200)]
para_select(): Return a proper error code on errors.

12 years agoRemove some system errors from errno.h
Andre Noll [Tue, 9 Oct 2007 19:11:05 +0000 (21:11 +0200)]
Remove some system errors from errno.h

No need to have system errors duplicated in error.h. Just return
-ERRNO_TO_PARA_ERROR(errno) in these cases.

12 years agoGet rid of -E_F_GETFL and -E_F_SETFL.
Andre Noll [Tue, 9 Oct 2007 18:10:22 +0000 (20:10 +0200)]
Get rid of -E_F_GETFL and -E_F_SETFL.

Return the proper errno instead, using the new ERRNO_TO_PARA_ERROR macro..

12 years agoerror.h: Add more helper macros.
Andre Noll [Tue, 9 Oct 2007 18:05:16 +0000 (20:05 +0200)]
error.h: Add more helper macros.

12 years ago.ico Version of the fancy new logo.
Andre Noll [Mon, 8 Oct 2007 16:22:30 +0000 (18:22 +0200)]
.ico Version of the fancy new logo.

12 years agoerror.h: Make PARA_STRERROR understand system errors.
Andre Noll [Sun, 7 Oct 2007 19:52:47 +0000 (21:52 +0200)]
error.h: Make PARA_STRERROR understand system errors.

12 years agoerror.h: Remove some unused errors.
Andre Noll [Sun, 7 Oct 2007 19:28:44 +0000 (21:28 +0200)]
error.h: Remove some unused errors.

12 years agoOnly declare error codes that are safe to use.
Andre Noll [Sun, 7 Oct 2007 19:03:54 +0000 (21:03 +0200)]
Only declare error codes that are safe to use.

The following type of bug occurred frequently since the introduction
of error.h: An error code was defined for some file a.c and was used
in another file b.c. This is all good if each executable that contains
b.o also contains a.o.

If this is not the case, i.e. if there is an executable that contains
b.o but _not_ a.o, the error texts of all errors defined for a.c are
not included in the executable. This results in a segmentation fault
at runtime if PARA_STRERROR() is used for such an error code.

Unfortunately, this was hard to spot because all error codes were
visible everywhere. This patch gets rid of this flaw by making
only those error codes visible for b.c which are safe to use.

According to the above, the set of error codes which are safe to use
in b.c can be defined as follows. Let E_1, ... E_n be the set of
executables that contain b.o and let, for j=1,...n,  S_j be the
set of files those files contained in E_j. Then, all errors defined
in the intersection

S_1 \cap S_2 \cap ... \cap S_n

are safe to use in b.c. The patch adds a function to configure.ac
That computes this intersection. Unfortunately, it is rather expensive.

The good news is that this simplifies error.h a bit and that it
already revealed a couple of bugs which are also fixed in the patch:

- afs.c used E_SIGNAL_CAUGHT which was only defined in audiod.
  Introduce E_AFS_SIGNAL and change afs.c accordingly.
- audiod uses E_RECV_SYNTAX, which belonged to recv which is
  not contained in audiod. Move it to recv_common instead.
  This bug is also present in v0.2.x and needs a similar fix.
- E_NOTDIR was used in fd.c, but was defined in osl.c. Not all
  executables that include fd.o also include osl.o. Move E_NOTDIR
  to the set of errors for fd.

12 years agoINSTALL: Update to v0.3.
Andre Noll [Sat, 6 Oct 2007 23:50:06 +0000 (01:50 +0200)]
INSTALL: Update to v0.3.

Still needs more work.

12 years agomood.c: Fix comment for the scoring function.
Andre Noll [Sat, 6 Oct 2007 22:05:22 +0000 (00:05 +0200)]
mood.c: Fix comment for the scoring function.

12 years agoAdd more documentation.
Andre Noll [Sat, 6 Oct 2007 17:00:24 +0000 (19:00 +0200)]
Add more documentation.

12 years agocommand_util.sh: Fix man page format.
Andre Noll [Sat, 6 Oct 2007 10:47:23 +0000 (12:47 +0200)]
command_util.sh: Fix man page format.

It really looked ugly as it were. Remove leading tabs in help texts.

12 years agoafs.cmd: Beautify help texts.
Andre Noll [Sat, 6 Oct 2007 10:46:19 +0000 (12:46 +0200)]
afs.cmd: Beautify help texts.

12 years agocom_add(): Write messages to the client rather than to the log.
Andre Noll [Sat, 6 Oct 2007 09:18:47 +0000 (11:18 +0200)]
com_add(): Write messages to the client rather than to the log.

12 years agoafs: Handle SIGHUP.
Andre Noll [Fri, 5 Oct 2007 20:16:43 +0000 (22:16 +0200)]
afs: Handle SIGHUP.

This required moving around some functions but was otherwise
straight forward.

12 years agocom_add(): Only accept absolute paths.
Andre Noll [Fri, 5 Oct 2007 19:50:51 +0000 (21:50 +0200)]
com_add(): Only accept absolute paths.

12 years agoosx_write.c: Add two missing headers.
Andre Noll [Fri, 5 Oct 2007 18:20:00 +0000 (20:20 +0200)]
osx_write.c: Add two missing headers.

12 years agoSwitch from inet_aton() to inet_pton().
Andre Noll [Fri, 5 Oct 2007 18:19:43 +0000 (20:19 +0200)]
Switch from inet_aton() to inet_pton().

Solaris doesn't have inet_aton().

12 years agoMake it compile on Solaris.
Andre Noll [Fri, 5 Oct 2007 18:18:22 +0000 (20:18 +0200)]
Make it compile on Solaris.

This required a bit of work as Solaris has  gethostbyname() and
socket-related functions not in libc but in libsocket and libnsl.
So add corresponding checks to configure.ac.

Moreover, make para_gui optional and add configure options for
specifying the directory containing the curses headers and curses
lib.

12 years agoREADME: Mention dependence on gnu make.
Andre Noll [Thu, 4 Oct 2007 21:37:59 +0000 (23:37 +0200)]
README: Mention dependence on gnu make.

Solaris make fails miserably.

12 years agoFEATURES: Update.
Andre Noll [Thu, 4 Oct 2007 21:37:20 +0000 (23:37 +0200)]
FEATURES: Update.

12 years agoaudioc: Get rid of the temporary socket file.
Andre Noll [Thu, 4 Oct 2007 18:48:35 +0000 (20:48 +0200)]
audioc: Get rid of the temporary socket file.

This allows to kill the --tmpdir option as well.

12 years agoafs.c: Remove some dead code.
Andre Noll [Thu, 4 Oct 2007 14:41:39 +0000 (16:41 +0200)]
afs.c: Remove some dead code.

12 years agoAdd command line options --mood and --playlist.
Andre Noll [Thu, 4 Oct 2007 14:41:05 +0000 (16:41 +0200)]
Add command line options --mood and --playlist.

And replace the temporary strings which were hardcoded
in afs.c.

12 years agoafs.c: Introduce client list for afs (fixes dosable bug).
Andre Noll [Thu, 4 Oct 2007 14:11:59 +0000 (16:11 +0200)]
afs.c: Introduce client list for afs (fixes dosable bug).

With the old code, a malicious local user could easily cause a DOS
by connecting to the local afs socket but never sending any data
through that socket. This caused afs to block on the read() from the
new client fd.

This patch fixes this flaw by introducing a doubly liked list of
connected clients.  Each entry in this list contains an open file
descriptor and the time the client connected.

In command_pre_select() we add each fd in the list to the set of
fds to be checked for readability. In command_post_select() we loop
through that list and check each fd again. Whenever the fd for a
client is readable we read from that fd and execute an afs command
if the client sent the valid magic cookie.

However, if the fd is not ready, we close the connection if more than
AFS_CLIENT_TIMEOUT seconds (default: 3) have passed since the client
connected. This hopefully avoids another possible DOS: A malicious
user could try to flood us with connections until the limit of open
fds is reached.

12 years agoMake it compile on FreeBSD.
Andre Noll [Tue, 2 Oct 2007 13:56:10 +0000 (15:56 +0200)]
Make it compile on FreeBSD.

This was easier than expected. Only two items needed fixing:

- signal.h has to be included for several files that use signals.
- The __used and __packed macros are already defined on FreeBSD which
  leads to an error at compile time. Fortunately paraslash doesn't use
  these macros at all, so we can simply remove them.

12 years agogcc-compat.h: Remove compatibility code for gcc-2.
Andre Noll [Tue, 2 Oct 2007 12:44:36 +0000 (14:44 +0200)]
gcc-compat.h: Remove compatibility code for gcc-2.

gcc-2 is not supported any longer.

12 years agofsck.c: Fix several bugs in dump mode.
Andre Noll [Tue, 2 Oct 2007 12:04:46 +0000 (14:04 +0200)]
fsck.c: Fix several bugs in dump mode.

- Don't abort if a  directory can't be created because it already exists.
- Use correct variable for the disk storage name column.
- If more than one table is to be dumped, use a directory for each table.
- Remove __a_unused for main()'s argc which _is_ being used.

12 years agoImplement com_cpsi().
Andre Noll [Tue, 2 Oct 2007 09:56:35 +0000 (11:56 +0200)]
Implement com_cpsi().

12 years agoMerge commit 'remotes/meins/v0.3' into v0.3
Andre Noll [Tue, 2 Oct 2007 08:20:45 +0000 (10:20 +0200)]
Merge commit 'remotes/meins/v0.3' into v0.3

12 years agocom_add(): Always check the return value of send_va_buffer().
Andre Noll [Mon, 1 Oct 2007 21:34:39 +0000 (23:34 +0200)]
com_add(): Always check the return value of send_va_buffer().

And abort on send errors.

12 years agofor_each_file_in_dir(): Ignore permission errors for subdirectories.
Andre Noll [Mon, 1 Oct 2007 21:33:03 +0000 (23:33 +0200)]
for_each_file_in_dir(): Ignore permission errors for subdirectories.

12 years agoerror.h: Add CHDIR_PERM error code.
Andre Noll [Mon, 1 Oct 2007 21:31:31 +0000 (23:31 +0200)]
error.h: Add CHDIR_PERM error code.

12 years agofd.h: Add declaration of para_chdir().
Andre Noll [Mon, 1 Oct 2007 21:31:00 +0000 (23:31 +0200)]
fd.h: Add declaration of para_chdir().

12 years agofd.c: Introduce para_chdir().
Andre Noll [Mon, 1 Oct 2007 21:30:33 +0000 (23:30 +0200)]
fd.c: Introduce para_chdir().

Also, fix a bug in para_open() which would return -1 instead of
a proper error code.

12 years agoImplement add -a (add all audio files).
Andre Noll [Mon, 1 Oct 2007 20:23:39 +0000 (22:23 +0200)]
Implement add -a (add all audio files).

12 years agomood.c: Remove debug log message.
Andre Noll [Mon, 1 Oct 2007 08:19:59 +0000 (10:19 +0200)]
mood.c: Remove debug log message.

12 years agoImplement mailbox output format for ls.
Andre Noll [Sun, 30 Sep 2007 23:24:54 +0000 (01:24 +0200)]
Implement mailbox output format for ls.

Alos, fix a bug in com_lsblob_callback() which caused incorrect
detection of the given options.

12 years agomood.c: Introduce DEFINE_MOOD_METHOD and DEFINE_MOOD_METHOD_WITH_CLEANUP.
Andre Noll [Sat, 29 Sep 2007 13:32:12 +0000 (15:32 +0200)]
mood.c: Introduce DEFINE_MOOD_METHOD and DEFINE_MOOD_METHOD_WITH_CLEANUP.

This simplifies the definition of the mood_methods array.

12 years agoattribute.c: Fix com_rmatt().
Andre Noll [Sat, 29 Sep 2007 13:31:35 +0000 (15:31 +0200)]
attribute.c: Fix com_rmatt().

We have to get the bit number _before_ we remove the row.

12 years agocom_ls: Don't use FNM_PATHNAME.
Andre Noll [Sat, 29 Sep 2007 13:30:06 +0000 (15:30 +0200)]
com_ls: Don't use FNM_PATHNAME.

It's just annoying.

12 years agoafs.cmd: Fix typo in setatt help.
Andre Noll [Sat, 29 Sep 2007 13:29:26 +0000 (15:29 +0200)]
afs.cmd: Fix typo in setatt help.

12 years agoattribute.c: Clear attribute bits already at remove time.
Andre Noll [Sat, 29 Sep 2007 12:00:14 +0000 (14:00 +0200)]
attribute.c: Clear attribute bits already at remove time.

If an attribute gets removed, the old code deferred clearing the
corresponding attribute bit in the afsi of all audio files until
that bit got reclaimed by add_att.  This is problematic because of
the new no_attribute_set mood method.

So clear the bit already in the rmatt callback.

12 years agomood.c: Add no_attributes_set mood method.
Andre Noll [Sat, 29 Sep 2007 11:39:34 +0000 (13:39 +0200)]
mood.c: Add no_attributes_set mood method.

Also fix a bug in mm_played_rarely_parser(): If no arg was
specified in the mood definition, a NULL pointer is passed to that
function, so it must not blindly dereference that pointer.

12 years agoSpeed up mood loading.
Andre Noll [Sat, 29 Sep 2007 11:13:50 +0000 (13:13 +0200)]
Speed up mood loading.

The old code passed a pointer to the row of the audio file table to the
mood scoring functions. The scoring functions had to obtain the afsi,
afhi, path from that row pointer. Thus, at mood load time, the afsi,
afhi, path was extracted N times for each audio file if there are N
mood lines that used this info.

This patch changes the mood scoring functions so that they take
three pointers to afsi, afhi, path instead of the row pointer.
add_item_score(), the single caller of the mood scoring functions,
provides these pointers, i.e. they get extracted from the row pointer
only once per audio file.

This is still not optimal as most scoring functions use only one of
the three pointers. But let's not over-engineer the thing.

12 years agomood.c: Switch to fnmatch() in mood method name_like.
Andre Noll [Sat, 29 Sep 2007 10:22:52 +0000 (12:22 +0200)]
mood.c: Switch to fnmatch() in mood method name_like.

Also, change doxygen documentation to the new style.

12 years agograb_client.c: Change doxygen comments to the new style.
Andre Noll [Fri, 28 Sep 2007 22:07:29 +0000 (00:07 +0200)]
grab_client.c: Change doxygen comments to the new style.

12 years agoEven more typo fixes.
Andre Noll [Fri, 28 Sep 2007 21:54:59 +0000 (23:54 +0200)]
Even more typo fixes.

12 years agoStill more typo fixes.
Andre Noll [Fri, 28 Sep 2007 21:46:36 +0000 (23:46 +0200)]
Still more typo fixes.

12 years agoFEATURES, INSTALL: Fix some more typos.
Andre Noll [Fri, 28 Sep 2007 21:46:24 +0000 (23:46 +0200)]
FEATURES, INSTALL: Fix some more typos.

12 years agoREADME,INSTALL: Fix some spelling errors.
Andre Noll [Fri, 28 Sep 2007 21:31:21 +0000 (23:31 +0200)]
README,INSTALL: Fix some spelling errors.

12 years agoMake com_lsblob() and com_lsatt() more similar to each other.
Andre Noll [Fri, 28 Sep 2007 19:54:23 +0000 (21:54 +0200)]
Make com_lsblob() and com_lsatt() more similar to each other.

12 years agoafs.cmd: Update help output.
Andre Noll [Fri, 28 Sep 2007 19:53:01 +0000 (21:53 +0200)]
afs.cmd: Update help output.

12 years agoImplement pattern matching for com_lsatt().
Andre Noll [Fri, 28 Sep 2007 17:55:17 +0000 (19:55 +0200)]
Implement pattern matching for com_lsatt().

12 years agoattribute.c: Implement pattern matching for com_rmatt().
Andre Noll [Fri, 28 Sep 2007 17:14:43 +0000 (19:14 +0200)]
attribute.c: Implement pattern matching for com_rmatt().

A straight forward task with the infrastructure already in place.

12 years agoImplement pattern matching for com_touch().
Andre Noll [Thu, 27 Sep 2007 15:47:46 +0000 (17:47 +0200)]
Implement pattern matching for com_touch().

Also, add -p and -v options and fix converting the last played
time which is a 64 bit intger, so strtol() will fail do it on 32
bit machines after 2039 ;)

To fix this, introduce para_atoi64() which calls strtoll() which
is 64 bit even on 32 bit machines and define para_atoi32() which
calls para_atoi64() and checks the boundaries.

12 years agocom_afs_rm(): Implement pattern matching and add -v, -p, -f flags.
Andre Noll [Thu, 27 Sep 2007 13:22:39 +0000 (15:22 +0200)]
com_afs_rm(): Implement pattern matching and add -v, -p, -f flags.

The -r flag is still to be implemented though..

12 years agoGerneralize for_each_matching_blob().
Andre Noll [Thu, 27 Sep 2007 10:25:05 +0000 (12:25 +0200)]
Gerneralize for_each_matching_blob().

It's not only useful for blobs. For instance the rm and the touch
commands might also want to use something similar. So move it to
afs.c and call it for_each_matching_row().

12 years agosha1.h: Typo.
Andre Noll [Thu, 27 Sep 2007 07:29:51 +0000 (09:29 +0200)]
sha1.h: Typo.

12 years agoattribute.c: Add doxygen file comment.
Andre Noll [Thu, 27 Sep 2007 07:29:33 +0000 (09:29 +0200)]
attribute.c: Add doxygen file comment.

12 years agoMove enum ls_sorting_method from afs.h to aft.c and add documentation.
Andre Noll [Wed, 26 Sep 2007 15:13:55 +0000 (17:13 +0200)]
Move enum ls_sorting_method from afs.h to aft.c and add documentation.

12 years agoAdd documentation of enum blob_table_columns.
Andre Noll [Wed, 26 Sep 2007 14:51:29 +0000 (16:51 +0200)]
Add documentation of enum blob_table_columns.

12 years agoFix table init.
Andre Noll [Wed, 26 Sep 2007 14:37:00 +0000 (16:37 +0200)]
Fix table init.

The previous patch introduced two instances of a bug which weren't noticed by
the compiler because attribute_table and score_table were declared as void *
pointers. Change that to struct osl_table *, and add the missing '&' operator.

void * pointers a evil.

12 years agoGet rid of the "table" member in struct table_info.
Andre Noll [Wed, 26 Sep 2007 14:31:00 +0000 (16:31 +0200)]
Get rid of the "table" member in struct table_info.

afs.c has no busyness in dealing with the table, so do not
expose it to afs.c.

12 years agoaddblob: Overwrite existing blobs.
Andre Noll [Wed, 26 Sep 2007 09:29:07 +0000 (11:29 +0200)]
addblob: Overwrite existing blobs.

Previously, an attempt to add a blob with a name of an already
existing blob failed (siltenly). Just replace the existing blob
with the new contents instead.

12 years agoafs ls -lv: Also print the tag info.
Andre Noll [Tue, 25 Sep 2007 19:37:31 +0000 (21:37 +0200)]
afs ls -lv: Also print the tag info.

12 years agocom_check(): Implement mood checking.
Andre Noll [Tue, 25 Sep 2007 12:57:09 +0000 (14:57 +0200)]
com_check(): Implement mood checking.

12 years agomake get_playlist_data() generic.
Andre Noll [Tue, 25 Sep 2007 12:16:14 +0000 (14:16 +0200)]
make get_playlist_data() generic.

Other blob types might use an analogous function as well, so introduce
blob_get_name_and_def_by_row() in blob.c, and use some preprocessor
magic to define such a function for each blob type.

Change all users of get_playlist_data() to use the new
pl_blob_get_name_and_def_by_row() and remove get_playlist_data().

12 years agomood.c: Rename mood_loop() to load_mood_loop_func().
Andre Noll [Tue, 25 Sep 2007 11:02:26 +0000 (13:02 +0200)]
mood.c: Rename mood_loop() to load_mood_loop_func().

And add a comment that describes why this function returns negative on success,
and positive on errors.

12 years agoUpdate Doxyfile to doxygen-1.5.3.
Andre Noll [Tue, 25 Sep 2007 10:51:38 +0000 (12:51 +0200)]
Update Doxyfile to doxygen-1.5.3.

Automatic update, done with doxygen -u.

12 years agoafs: Move some ls-related stuff from afs.h to aft.c.
Andre Noll [Tue, 25 Sep 2007 09:53:58 +0000 (11:53 +0200)]
afs: Move some ls-related stuff from afs.h to aft.c.

Also, add GPL header and documentation of struct afs_info to afs.h.

12 years agoMore mood cleanups.
Andre Noll [Tue, 25 Sep 2007 09:39:23 +0000 (11:39 +0200)]
More mood cleanups.

- Avoid use of global current_mood pointer where possible.
- Change name of non-static functions that use the current mood pointer:
mood_open() -> change_current_mood()
mood_close() -> close_current_mood()
mood_reload() -> reload_current_mood()

12 years agocompute_mood_score(): Add additional mood * parameter.
Andre Noll [Tue, 25 Sep 2007 08:59:56 +0000 (10:59 +0200)]
compute_mood_score(): Add additional mood * parameter.

Thid reduces the use of the global current_mood pointer.

12 years agocompute_mood_score(): Rename "row" parameter to "aft_row".
Andre Noll [Tue, 25 Sep 2007 08:53:52 +0000 (10:53 +0200)]
compute_mood_score(): Rename "row" parameter to "aft_row".

12 years agomood.c: Use current_mood as data pointer for parse_mood_line().
Andre Noll [Tue, 25 Sep 2007 08:47:38 +0000 (10:47 +0200)]
mood.c: Use current_mood as data pointer for parse_mood_line().

12 years agomood.c: Add GPL header.
Andre Noll [Tue, 25 Sep 2007 08:46:00 +0000 (10:46 +0200)]
mood.c: Add GPL header.

12 years agomood.c: Change type of rows from "void *" to "struct osl_row *".
Andre Noll [Tue, 25 Sep 2007 08:41:01 +0000 (10:41 +0200)]
mood.c: Change type of rows from "void *" to "struct osl_row *".

12 years agoscore.c: Remove an unused function declaration.
Andre Noll [Tue, 25 Sep 2007 08:40:23 +0000 (10:40 +0200)]
score.c: Remove an unused function declaration.

12 years agoafs.cmd: Add documentation of the remaining commands.
Andre Noll [Mon, 24 Sep 2007 19:26:17 +0000 (21:26 +0200)]
afs.cmd: Add documentation of the remaining commands.

And improve the formating of command options.

12 years agoblob.c: Implement pattern matching.
Andre Noll [Mon, 24 Sep 2007 16:10:36 +0000 (18:10 +0200)]
blob.c: Implement pattern matching.

Most of the blob functions now take a pattern list as arguments,
and the function does the job for all blobs that match any given
pattern in the list.

The only exceptions are addblob and mvblob where a pattern list
does not make sense.

12 years agoMake rbtree_loop() and rbtree_loop_reverse() safe against removal of an entry.
Andre Noll [Mon, 24 Sep 2007 16:08:13 +0000 (18:08 +0200)]
Make rbtree_loop() and rbtree_loop_reverse() safe against removal of an entry.

Also, fix the documentation of osl_rbtree_loop() which claimed that an
osl_rbtree_loop_func takes two void pointers which is not true any more.

12 years agoaft.c: Add GPL header.
Andre Noll [Mon, 24 Sep 2007 06:54:16 +0000 (08:54 +0200)]
aft.c: Add GPL header.

12 years agoafs.c: Avoid noisy log message.
Andre Noll [Sun, 23 Sep 2007 20:38:54 +0000 (22:38 +0200)]
afs.c: Avoid noisy log message.

para_server regularly sends SIGUSR1 to all of its children. afs
just ignores that signal, so only print a log message if a signal
different from SIGUSR1 was caught.

12 years agoafs.cmd: Add documentation of all blob commands.
Andre Noll [Sun, 23 Sep 2007 20:20:54 +0000 (22:20 +0200)]
afs.cmd: Add documentation of all blob commands.

12 years agocommand_util.sh: Fix man output for templates.
Andre Noll [Sun, 23 Sep 2007 20:20:24 +0000 (22:20 +0200)]
command_util.sh: Fix man output for templates.

12 years agoafs.c: Fix documentation of stdin_command().
Andre Noll [Sun, 23 Sep 2007 18:42:31 +0000 (20:42 +0200)]
afs.c: Fix documentation of stdin_command().

It doesn't read from stdin but from the given fd.

12 years agostdin.h, stdout.h: Trivial documentation cleanup.
Andre Noll [Sun, 23 Sep 2007 18:35:26 +0000 (20:35 +0200)]
stdin.h, stdout.h: Trivial documentation cleanup.

12 years agostdout.[ch]: Make two functions static.
Andre Noll [Sun, 23 Sep 2007 18:29:56 +0000 (20:29 +0200)]
stdout.[ch]: Make two functions static.

12 years agostdin.[ch]: Make two functions static.
Andre Noll [Sun, 23 Sep 2007 18:28:25 +0000 (20:28 +0200)]
stdin.[ch]: Make two functions static.

12 years agostdin.c: Fix a typo in documentation.
Andre Noll [Sun, 23 Sep 2007 18:25:54 +0000 (20:25 +0200)]
stdin.c: Fix a typo in documentation.

12 years agoImplement check for invalid playlist entries.
Andre Noll [Sun, 23 Sep 2007 17:34:17 +0000 (19:34 +0200)]
Implement check for invalid playlist entries.

Also some minor improvements for the audio file table checks.

12 years agoplaylist.c: Cleanups.
Andre Noll [Sun, 23 Sep 2007 15:56:39 +0000 (17:56 +0200)]
playlist.c: Cleanups.

Avoid using the global playlist variable where possible. Change the name of the
global static playlist struct to current_playlist.

12 years agoImplement check command.
Andre Noll [Sun, 23 Sep 2007 15:17:45 +0000 (17:17 +0200)]
Implement check command.

Currently it only checks the audio file table. Checking moods
and playlists will be implemented in a subsequent patch.