Shorten copyright notice. The GPLv2 line does not add any additional information, so drop it. This leaves a single line of legalese text for most files, which is about the amount of screen real estate it deserves. This patch was created with the following script (plus some manual fixups): awk '{ if (NR <= 5) { gs = gensub(/.*Copyright.* ([0-9]+).*Andre Noll.*/, "\\1", "g") if (gs != $0) year = gs next } if (NR == 6 && year != "") printf("/* Copyright (C) %s Andre Noll <maan@tuebingen.mpg.de>, see file COPYING. */\n", year) print }'
Simplify mixer setup. The ->init method of the two mixer implementations initialize the members of the mixer structure. This structure contains only function pointers. Their values, once set, never change. Hence we may initialize the structure at compile time and make it constant.
Convert para_fade to subcommands, rename it to para_mixer. para_fade operates in one of several modes, but the command line options are shared. So most of the options are ignored for any particular mode. With lopsub we can do better and define one subcommand per mode so that options which are only relevant to one subcommand can be made local to that subcommand. With subcommands the syntax of the command changes, which breaks existing scripts. So it seems to be prudent to rename the executable from para_fade to para_mixer. The old name was a bit misleading anyway since the command can do much more than just fade the volume.
Update year in copyright headers. Done with files=$(git grep -l 'Copyright (C) [0-9]\{4\}\(-2014\)* Andre Noll') sed --in-place= -e 's/Copyright (C) \([0-9]\{4\}\)-2014 Andre Noll/Copyright (C) \1 Andre Noll/1' $files In previous years we ran a similar script to set the second year in the range to the current year. This is kind of silly, so let's get rid of this useless information. This commit replaces "Copyright (C) A-B" by "Copyright (C) A" in all file headers, i.e. only the first year (A) is left in. Accurate information including time stamps for each change can be obtained from the git history.
Assorted typo fixes in comments. Quite a few..
doc: Change email address to maan@tuebingen.mpg.de The mail server on systemlinux.org was down for more than a week lately, so let's use an alternative official address. This commit changes all maan@systemlinux.org addresses to maan@tuebingen.mpg.de. Most .c and .h files contain the email address in the copyright header, so they must all be patched. Three other files contain the address for a different reason: * README lists email and git, gitweb and home page URLs * configure.ac needs it for configure -h * version.c contains it for the -V option of all commands
Change copyright year to 2014. This year, we're really on time. The changes in this patch were created by the following silly script: files=$(git grep -l 'Copyright (C) [0-9]\{4\}\(-2013\)* Andre Noll') sed --in-place= -e 's/Copyright (C) \([0-9]\{4\}\)-2013 Andre Noll/Copyright (C) \1-2014 Andre Noll/1' $files sed --in-place= -e 's/Copyright (C) 2013 Andre Noll/Copyright (C) 2013-2014 Andre Noll/1' $files
Add two missing Copyright headers and file annotations.
fade: Switch to modular mixer API. Although only the oss mixer is supported ATM, this commit paves the way for supporting more than one mixer API. It moves the oss-specific part of para_fade to the new oss_mix.c file added by the previous commit. Different mixer APIs will support different sets of mixer channels, so handling of the various mixer channels is changed from a ggo enum config option to a string option which allows to specify arbitrary strings. The mixer implementations must check the given strings themselves and are supposed to define a ->get_channels method which returns the available channels. This function is called from fade.c if an invalid channel is given. The default mixer device, currently hardcoded in the ggo file to "/dev/mixer", is fine for OSS. The ALSA mixer will need another default however. Therefore this patch removes the default setting from the ggo file so that the corresponding ggo config variable will be NULL if no mixer device was given. The mixer implementations are supposed to check this variable and fall back to their individual defaults if it is NULL.