]> git.tuebingen.mpg.de Git - paraslash.git/commitdiff
Merge branch 't/crypt_cleanups'
authorAndre Noll <maan@systemlinux.org>
Sat, 23 Apr 2011 13:54:59 +0000 (15:54 +0200)
committerAndre Noll <maan@systemlinux.org>
Sat, 23 Apr 2011 13:58:22 +0000 (15:58 +0200)
Conflicts:
Makefile.in

31 files changed:
.gitignore
GIT-VERSION-GEN
Makefile.in
NEWS
afh.c
audioc.c
audiod.c
autogen.sh
client_common.c
command.c
configure.ac
error.h
fade.c
fec.c
filter.c
ggo/audiod.m4
grab_client.c
gui.c
gui_theme.c
imdct.c
mm.c
para.h
recv.c
server.c
version.h [new file with mode: 0644]
versions/paraslash-0.4.6.tar.bz2 [new file with mode: 0644]
versions/paraslash-0.4.6.tar.bz2.asc [new file with mode: 0644]
web/index.in.html
web/manual.m4
wmadec_filter.c
write.c

index d3a1fc5e94aa4cba84113021557b0a1b882a4f93..91c6f8589b600c26b00e845fa4413b85ba038944 100644 (file)
@@ -30,4 +30,4 @@ web_sync
 confdefs.h
 conftest
 conftest.c
-GIT-VERSION-FILE
+git-version.h
index a64d79612ef3fbde0eadf35d657a5ed67825abce..15c387942fad6748244a530728bf58edc69c83ff 100755 (executable)
@@ -1,22 +1,17 @@
-#!/bin/sh
-
-if test $# -ne 1; then
-       echo >&2 "usage: $0 <version file>"
-       exit 1
-fi
+#!/usr/bin/env bash
 
+(($# > 1)) && { echo >&2 "usage: $0 [<version file>]"; exit 1; }
 GVF="$1"
-DEF_VER="unnamed_version"
 
+DEF_VER="unnamed_version"
 LF='
 '
 
 # First see if there is a version file (included in release tarballs),
 # then try git-describe, then default.
-if test -f VERSION
-then
+if [[ -f VERSION ]]; then
        VN=$(cat VERSION) || VN="$DEF_VER"
-elif test -d .git -o -f .git &&
+elif [[ -d .git || -f .git ]] &&
        VN=$(git describe --abbrev=4 HEAD 2>/dev/null) &&
        case "$VN" in
        *$LF*) (exit 1) ;;
@@ -32,14 +27,12 @@ else
 fi
 
 VN=$(expr "$VN" : v*'\(.*\)')
+echo "$VN"
 
-if test -r $GVF
-then
-       VC=$(sed -e 's/^GIT_VERSION = //' <$GVF)
-else
-       VC=unset
+[[ -z "$GVF" ]] && exit 0
+if [[ -r "$GVF" ]]; then
+       VC=$(sed -e 's/^#define GIT_VERSION "//; s/"$//' < "$GVF")
+       [[ "$VN" == "$VC" ]] && exit 0
 fi
-test "$VN" = "$VC" || {
-       echo >&2 "GIT_VERSION = $VN"
-       echo "GIT_VERSION = $VN" >$GVF
-}
+echo >&2 "new git version: $VN"
+echo "#define GIT_VERSION \"$VN\"" >$GVF
index d7640b6c3782cfb577b0067230b7b8cc9565021a..8ecc1b8f6d606497aff2e9291e9b962d698cd28e 100644 (file)
@@ -15,10 +15,15 @@ build_date := $(shell date)
 uname_s := $(shell uname -s 2>/dev/null || echo "UNKNOWN_OS")
 uname_rs := $(shell uname -rs)
 cc_version := $(shell $(CC) --version | head -n 1)
-codename := deterministic entropy
+codename := infinite rollback
+
+GIT_VERSION := $(shell ./GIT-VERSION-GEN git-version.h)
 
 DEBUG_CPPFLAGS += -Wno-sign-compare -g -Wunused -Wundef -W
 DEBUG_CPPFLAGS += -Wredundant-decls
+DEBUG_CPPFLAGS += -Wall
+DEBUG_CPPFLAGS += -Wformat-security
+DEBUG_CPPFLAGS += -Wmissing-format-attribute
 # produces false positives
 # DEBUG_CPPFLAGS += -Wunreachable-code
 # DEBUG_CPPFLAGS += -Wwrite-strings
@@ -38,28 +43,23 @@ ifeq ($(uname_s),Linux)
        CPPFLAGS += -Wshadow
 endif
 CPPFLAGS += -Os
-CPPFLAGS += -Wall
 CPPFLAGS += -Wuninitialized
 CPPFLAGS += -Wchar-subscripts
-CPPFLAGS += -Wformat-security
 CPPFLAGS += -DBINDIR='"$(BINDIR)"'
 CPPFLAGS += -DBUILD_DATE='"$(build_date)"'
 CPPFLAGS += -DUNAME_RS='"$(uname_rs)"'
 CPPFLAGS += -DCODENAME='"$(codename)"'
 CPPFLAGS += -DCC_VERSION='"$(cc_version)"'
 CPPFLAGS += -Werror-implicit-function-declaration
-CPPFLAGS += -Wmissing-format-attribute
 CPPFLAGS += -Wmissing-noreturn
 CPPFLAGS += -Wunused-macros
 CPPFLAGS += -Wbad-function-cast
 CPPFLAGS += -fno-strict-aliasing
 CPPFLAGS += -DMAIN_INPUT_FILE_IS_$(*F)
-CPPFLAGS += @ncurses_cppflags@
 CPPFLAGS += @arch_cppflags@
 CPPFLAGS += -I/usr/local/include
 CPPFLAGS += -I$(cmdline_dir)
 CPPFLAGS += @osl_cppflags@
-CPPFLAGS += -DGIT_VERSION='"$(GIT_VERSION)"'
 
 man_pages := $(patsubst %, man/man1/%.1, @executables@)
 man_pages_in := $(patsubst %, web/%.man.in.html, @executables@)
@@ -100,18 +100,12 @@ else
        Q =
 endif
 
-.PHONY: dep all clean distclean maintainer-clean install man tarball\
-       .FORCE-GIT-VERSION-FILE
+.PHONY: dep all clean distclean maintainer-clean install man tarball
 all: dep @executables@ $(man_pages)
 dep: $(deps)
 man: $(man_pages)
 tarball: $(tarball)
 
-GIT-VERSION-FILE: .FORCE-GIT-VERSION-FILE
-       @./GIT-VERSION-GEN GIT-VERSION-FILE
--include GIT-VERSION-FILE
-@executables@: GIT-VERSION-FILE
-
 -include $(ggo_dir)/makefile
 
 %_command_list.c: %.cmd
@@ -198,6 +192,10 @@ $(object_dir)/aac_afh.o: aac_afh.c | $(object_dir)
        @[ -z "$(Q)" ] || echo 'CC $<'
        $(Q) $(CC) -c -o $@ $(CPPFLAGS) $(DEBUG_CPPFLAGS) @faad_cppflags@ $<
 
+$(object_dir)/gui%.o: gui%.c | $(object_dir)
+       @[ -z "$(Q)" ] || echo 'CC $<'
+       $(Q) $(CC) -c -o $@ $(CPPFLAGS) $(DEBUG_CPPFLAGS) @curses_cppflags@ $<
+
 $(object_dir)/%.cmdline.o: $(cmdline_dir)/%.cmdline.c $(cmdline_dir)/%.cmdline.h | $(object_dir)
        @[ -z "$(Q)" ] || echo 'CC $<'
        $(Q) $(CC) -c $(CPPFLAGS) -Wno-unused-function -o $@ $<
@@ -214,6 +212,7 @@ $(object_dir)/%.d: %.c | $(object_dir)
        @[ -z "$(Q)" ] || echo 'DEP $<'
        $(Q) ./depend.sh $(object_dir) $(cmdline_dir) $(CPPFLAGS) $< > $@
 
+
 recv_objs := $(addprefix $(object_dir)/, @recv_objs@)
 filter_objs := $(addprefix $(object_dir)/, @filter_objs@)
 client_objs := $(addprefix $(object_dir)/, @client_objs@)
@@ -249,7 +248,7 @@ para_client: $(client_objs)
 
 para_gui: $(gui_objs)
        @[ -z "$(Q)" ] || echo 'LD $@'
-       $(Q) $(CC) $(LDFLAGS) -o $@ $(gui_objs) -lncurses
+       $(Q) $(CC) $(LDFLAGS) -o $@ $(gui_objs) -lcurses
 
 para_audiod: audiod_command_list.c audiod_command_list.h $(audiod_objs)
        @[ -z "$(Q)" ] || echo 'LD $@'
@@ -307,7 +306,7 @@ $(tarball): $(cmdline_generated)
        git archive --format=tar --prefix=$(tarball_pfx)/ HEAD \
                | tar --delete $(tarball_delete) > $(tarball_pfx).tar
        mkdir -p $(tarball_pfx)/$(cmdline_dir)
-       echo $(GIT_VERSION) > $(tarball_pfx)/VERSION
+       ./GIT-VERSION-GEN > $(tarball_pfx)/VERSION
        cp -r $(autocrap) $(tarball_pfx)
        cp -r $(cmdline_generated) $(tarball_pfx)/$(cmdline_dir)
        tar rf $(tarball_pfx).tar $(tarball_pfx)/*
diff --git a/NEWS b/NEWS
index 23691951d23846cf238eafe1878af92fdd722930..3295738632ef423ca4b36f68f3bcdc533d873e38 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,6 +1,16 @@
------------------------------------------------
-0.4.6 (to be announced) "deterministic entropy"
------------------------------------------------
+-------------------------------------------
+0.4.7 (to be announced) "infinite rollback"
+-------------------------------------------
+
+       - configure: improved options for ogg/vorbis/speex.
+       - The git version reported by --version always matches HEAD.
+       - The autogen script detects the number of processors and
+         runs a parallel make if possible.
+       - Major cleanup of the crypto API.
+
+------------------------------------------
+0.4.6 (2011-03-31) "deterministic entropy"
+------------------------------------------
 
 Lots of ogg/vorbis improvements, the new test suite, enhancements
 for para_gui and a fair amount of other bug fixes.
diff --git a/afh.c b/afh.c
index 53c721161378193c385f7706bca47dc8ad97d2f9..66c4d1ca0f41a9c0b09ff2f70bc3ce566007bca8 100644 (file)
--- a/afh.c
+++ b/afh.c
@@ -15,6 +15,7 @@
 #include "fd.h"
 #include "afh.h"
 #include "error.h"
+#include "version.h"
 
 static struct afh_args_info conf;
 /** The list of all status items */
index c05bd14e105da209a88ae60ab1a7b9e208df8aa8..8c46b46f7d19864dbbd0c0074d399cb12ea696f2 100644 (file)
--- a/audioc.c
+++ b/audioc.c
@@ -15,6 +15,7 @@
 #include "net.h"
 #include "string.h"
 #include "fd.h"
+#include "version.h"
 
 INIT_AUDIOC_ERRLISTS;
 
index 34a41620120dfb48887c0623a550799850b28019..9f664e178309c39e70a64d7ea55f6a29f0c5f6cf 100644 (file)
--- a/audiod.c
+++ b/audiod.c
@@ -31,6 +31,7 @@
 #include "write.h"
 #include "write_common.h"
 #include "signal.h"
+#include "version.h"
 
 /** define the array of error lists needed by para_audiod */
 INIT_AUDIOD_ERRLISTS;
index 76eaef2f38cad05ffd41d0bd7291f51601efcac7..e5000a6fd70cddc63b1f2a2dc21f54bc760641bc 100755 (executable)
@@ -1,13 +1,19 @@
 #!/bin/sh
-echo preparing...
+# check if we have multiple processors/cores
+n=$(nproc 2>/dev/null)
+if [ -z "$n" ]; then
+       n=$(grep ^processor /proc/cpuinfo 2>/dev/null | wc -l)
+       [ $n -eq 0 ] && n=1
+fi
+echo preparing, parallel=$n...
 if test -f Makefile; then
-       make maintainer-clean > /dev/null
+       make maintainer-clean > /dev/null 2>&1
 fi
-aclocal -I . &> /dev/null
+aclocal -I . > /dev/null 2>&1
 autoconf
 autoheader
 echo configuring...
 ./configure $@ > /dev/null
 echo compiling...
-make clean2 &> /dev/null
-make > /dev/null
+make clean2 > /dev/null 2>&1
+make -j $n > /dev/null
index 33ad19546d2a6e8f5d072152f75e11fefbd6fb18..d3a9ede1f0e1d5b7238a387f0f3aa03650deed55 100644 (file)
@@ -21,6 +21,7 @@
 #include "client.cmdline.h"
 #include "client.h"
 #include "buffer_tree.h"
+#include "version.h"
 
 /** The size of the receiving buffer. */
 #define CLIENT_BUFSIZE 4000
index 1a090e49d71bb3d1ff3545236265f4c052bf83fe..d82bd5d71ca3ed6bf2fa40777c5a5b1231fd897f 100644 (file)
--- a/command.c
+++ b/command.c
@@ -34,6 +34,7 @@
 #include "afs_command_list.h"
 #include "sched.h"
 #include "signal.h"
+#include "version.h"
 
 /** Commands including options must be shorter than this. */
 #define MAX_COMMAND_LEN 32768
index 0201896321405d7ea009dc21be0d76ff1f3fb061..32381c6b1ceec6dfd2586a1f73c0cdd4804ce855 100644 (file)
@@ -359,31 +359,31 @@ if test ${have_ucred} = yes; then
 fi
 
 ########################################################################### curses
-have_ncurses="yes"
+have_curses="yes"
 OLD_CPPFLAGS="$CPPFLAGS"
 OLD_LD_FLAGS="$LDFLAGS"
 OLD_LIBS="$LIBS"
-AC_ARG_WITH(ncurses_headers, [AC_HELP_STRING(--with-ncurses-headers=dir,
-       [look for ncurses.h also in dir])])
-if test -n "$with_ncurses_headers"; then
-       ncurses_cppflags="-I$with_ncurses_headers"
-       CPPFLAGS="$CPPFLAGS $ncurses_cppflags"
-fi
-AC_ARG_WITH(ncurses_libs, [AC_HELP_STRING(--with-ncurses-libs=dir,
-       [look for libncurses also in dir])])
-if test -n "$with_ncurses_libs"; then
-       ncurses_libs="-L$with_ncurses_libs"
-       LDFLAGS="$LDFLAGS $ncurses_libs"
+AC_ARG_WITH(curses_headers, [AC_HELP_STRING(--with-curses-headers=dir,
+       [look for curses.h also in dir])])
+if test -n "$with_curses_headers"; then
+       curses_cppflags="-I$with_curses_headers"
+       CPPFLAGS="$CPPFLAGS $curses_cppflags"
+fi
+AC_ARG_WITH(curses_libs, [AC_HELP_STRING(--with-curses-libs=dir,
+       [look for libcurses also in dir])])
+if test -n "$with_curses_libs"; then
+       curses_libs="-L$with_curses_libs"
+       LDFLAGS="$LDFLAGS $curses_libs"
 fi
 AC_CHECK_HEADER(curses.h, [], [
-       have_ncurses="no"
+       have_curses="no"
 ])
-AC_CHECK_LIB([ncurses], [initscr], [], [
-       have_ncurses="no"
+AC_CHECK_LIB([curses], [initscr], [], [
+       have_curses="no"
 ])
-if test "$have_ncurses" = "yes"; then
-       AC_SUBST(ncurses_cppflags)
-       AC_DEFINE(HAVE_NCURSES, 1, [define to 1 to turn on ncurses support])
+if test "$have_curses" = "yes"; then
+       AC_SUBST(curses_cppflags)
+       AC_DEFINE(HAVE_NCURSES, 1, [define to 1 to turn on curses support])
        extras="$extras gui"
        executables="$executables gui"
 else
@@ -436,86 +436,120 @@ if test ${have_core_audio} = yes; then
 fi
 ########################################################### ogg/vorbis/speex
 have_ogg="yes"
-have_vorbis="yes"
-have_speex="yes"
 OLD_CPPFLAGS="$CPPFLAGS"
 OLD_LD_FLAGS="$LDFLAGS"
 OLD_LIBS="$LIBS"
-AC_ARG_WITH(oggvorbis_headers, [AC_HELP_STRING(--with-oggvorbis-headers=dir,
-       [look for ogg/vorbis/speex headers also in dir])])
-if test -n "$with_oggvorbis_headers"; then
-       ogg_cppflags="-I$with_oggvorbis_headers"
+AC_ARG_WITH(ogg_headers, [AC_HELP_STRING(--with-ogg-headers=dir,
+       [look for ogg headers also in dir])])
+AC_ARG_WITH(ogg_libs, [AC_HELP_STRING(--with-ogg-libs=dir,
+       [look for ogg libs also in dir])])
+AC_ARG_WITH(vorbis_headers, [AC_HELP_STRING(--with-vorbis-headers=dir,
+       [look for vorbis headers also in dir])])
+AC_ARG_WITH(vorbis_libs, [AC_HELP_STRING(--with-vorbis-libs=dir,
+       [look for vorbis libs also in dir])])
+AC_ARG_WITH(speex_headers, [AC_HELP_STRING(--with-speex-headers=dir,
+       [look for speex headers also in dir])])
+AC_ARG_WITH(speex_libs, [AC_HELP_STRING(--with-speex-libs=dir,
+       [look for speex libs also in dir])])
+
+if test -n "$with_ogg_headers"; then
+       ogg_cppflags="-I$with_ogg_headers"
        CPPFLAGS="$CPPFLAGS $ogg_cppflags"
 fi
-AC_ARG_WITH(oggvorbis_libs, [AC_HELP_STRING(--with-oggvorbis-libs=dir,
-       [look for ogg/vorbis/speex libs also in dir])])
-if test -n "$with_oggvorbis_libs"; then
-       ogg_libs="-L$with_oggvorbis_libs"
+if test -n "$with_ogg_libs"; then
+       ogg_libs="-L$with_ogg_libs"
        LDFLAGS="$LDFLAGS $ogg_libs"
 fi
-
-AC_CHECK_LIB([ogg], [ogg_stream_init], [], [ have_ogg="no" ])
-AC_CHECK_LIB([vorbis], [vorbis_info_init], [], [ have_vorbis="no" ])
-AC_CHECK_LIB([speex], [speex_decoder_init], [], [ have_speex="no" ])
 AC_CHECK_HEADERS([ogg/ogg.h], [], [ have_ogg="no"; ])
-AC_CHECK_HEADERS([vorbis/codec.h], [], [ have_vorbis="no" ])
-AC_CHECK_HEADERS([speex/speex.h], [], [ have_speex="no" ])
+AC_CHECK_LIB([ogg], [ogg_stream_init], [], [ have_ogg="no" ])
+
+have_vorbis="yes"
+have_speex="yes"
+if test "$have_ogg" = "yes"; then
+       # vorbis
+       if test -n "$with_vorbis_headers"; then
+               vorbis_cppflags="-I$with_vorbis_headers"
+               CPPFLAGS="$CPPFLAGS $vorbis_cppflags"
+       fi
+       if test -n "$with_vorbis_libs"; then
+               vorbis_libs="-L$with_vorbis_libs"
+               LDFLAGS="$LDFLAGS $vorbis_libs"
+       fi
+       AC_CHECK_HEADERS([vorbis/codec.h], [], [ have_vorbis="no" ])
+       AC_CHECK_LIB([vorbis], [vorbis_info_init], [], [ have_vorbis="no" ])
+
+       # speex
+       if test -n "$with_speex_headers"; then
+               speex_cppflags="-I$with_speex_headers"
+               CPPFLAGS="$CPPFLAGS $speex_cppflags"
+       fi
+       if test -n "$with_speex_libs"; then
+               speex_libs="-L$with_speex_libs"
+               LDFLAGS="$LDFLAGS $speex_libs"
+       fi
+       AC_CHECK_LIB([speex], [speex_decoder_init], [], [ have_speex="no" ])
+       AC_CHECK_HEADERS([speex/speex.h], [], [ have_speex="no" ])
+else
+       have_vorbis="no"
+       have_speex="no"
+fi
+
 msg="support in para_server/para_filter/para_afh"
-if test "$have_ogg" = "yes" && { test "$have_vorbis" = "yes" || test "$have_speex" = "yes"; }; then
+if test "$have_vorbis" = "yes" || test "$have_speex" = "yes"; then
        AC_SUBST(ogg_cppflags)
        ogg_libs="$ogg_libs -logg"
        if test "$OSTYPE" = "Darwin"; then
-               ogg_libs="-Wl,-bind_at_load $ogg_libs $ogg_libs"
+               ogg_libs="-Wl,-bind_at_load $ogg_libs"
        fi
        server_ldflags="$server_ldflags $ogg_libs"
        filter_ldflags="$filter_ldflags $ogg_libs"
        audiod_ldflags="$audiod_ldflags $ogg_libs"
-       all_errlist_objs="$all_errlist_objs ogg_afh_common"
        afh_ldflags="$afh_ldflags $ogg_libs"
+       all_errlist_objs="$all_errlist_objs ogg_afh_common"
        afh_errlist_objs="$afh_errlist_objs ogg_afh_common"
        server_errlist_objs="$server_errlist_objs ogg_afh_common"
-       if test "$have_vorbis" = "yes"; then
-               all_errlist_objs="$all_errlist_objs oggdec_filter ogg_afh"
-               AC_DEFINE(HAVE_OGGVORBIS, 1, define to 1 to turn on ogg/vorbis support)
-               filters="$filters oggdec"
-               vorbis_libs="-lvorbis -lvorbisfile"
-               server_ldflags="$server_ldflags $vorbis_libs"
-               filter_ldflags="$filter_ldflags $vorbis_libs"
-               audiod_ldflags="$audiod_ldflags $vorbis_libs"
-               afh_ldflags="$afh_ldflags $vorbis_libs"
-
-               server_errlist_objs="$server_errlist_objs ogg_afh"
-               filter_errlist_objs="$filter_errlist_objs oggdec_filter"
-               audiod_errlist_objs="$audiod_errlist_objs oggdec_filter"
-               afh_errlist_objs="$afh_errlist_objs ogg_afh"
-
-               audiod_audio_formats="$audiod_audio_formats ogg"
-               server_audio_formats="$server_audio_formats ogg"
-       else
-               AC_MSG_WARN([no ogg/vorbis $msg])
-       fi
-       if test "$have_speex" = "yes"; then
-               all_errlist_objs="$all_errlist_objs spxdec_filter spx_afh spx_common"
-               AC_DEFINE(HAVE_SPEEX, 1, define to 1 to turn on ogg/speex support)
-               filters="$filters spxdec"
-               speex_libs="-lspeex"
-               server_ldflags="$server_ldflags $speex_libs"
-               filter_ldflags="$filter_ldflags $speex_libs"
-               audiod_ldflags="$audiod_ldflags $speex_libs"
-               afh_ldflags="$afh_ldflags $speex_libs"
-
-               server_errlist_objs="$server_errlist_objs spx_afh spx_common"
-               filter_errlist_objs="$filter_errlist_objs spxdec_filter spx_common"
-               audiod_errlist_objs="$audiod_errlist_objs spxdec_filter spx_common"
-               afh_errlist_objs="$afh_errlist_objs spx_afh spx_common"
-
-               audiod_audio_formats="$audiod_audio_formats spx"
-               server_audio_formats="$server_audio_formats spx"
-       else
-               AC_MSG_WARN([no ogg/speex $msg])
-       fi
 else
-       AC_MSG_WARN([no ogg/vorbis ogg/speex $msg])
+       AC_MSG_WARN([vorbis/speex require ogg])
+fi
+if test "$have_vorbis" = "yes"; then
+       all_errlist_objs="$all_errlist_objs oggdec_filter ogg_afh"
+       AC_DEFINE(HAVE_OGGVORBIS, 1, define to 1 to turn on ogg/vorbis support)
+       filters="$filters oggdec"
+       vorbis_libs="-lvorbis -lvorbisfile"
+       server_ldflags="$server_ldflags $vorbis_libs"
+       filter_ldflags="$filter_ldflags $vorbis_libs"
+       audiod_ldflags="$audiod_ldflags $vorbis_libs"
+       afh_ldflags="$afh_ldflags $vorbis_libs"
+
+       server_errlist_objs="$server_errlist_objs ogg_afh"
+       filter_errlist_objs="$filter_errlist_objs oggdec_filter"
+       audiod_errlist_objs="$audiod_errlist_objs oggdec_filter"
+       afh_errlist_objs="$afh_errlist_objs ogg_afh"
+
+       audiod_audio_formats="$audiod_audio_formats ogg"
+       server_audio_formats="$server_audio_formats ogg"
+else
+       AC_MSG_WARN([no ogg/vorbis $msg])
+fi
+if test "$have_speex" = "yes"; then
+       all_errlist_objs="$all_errlist_objs spxdec_filter spx_afh spx_common"
+       AC_DEFINE(HAVE_SPEEX, 1, define to 1 to turn on ogg/speex support)
+       filters="$filters spxdec"
+       speex_libs="-lspeex"
+       server_ldflags="$server_ldflags $speex_libs"
+       filter_ldflags="$filter_ldflags $speex_libs"
+       audiod_ldflags="$audiod_ldflags $speex_libs"
+       afh_ldflags="$afh_ldflags $speex_libs"
+
+       server_errlist_objs="$server_errlist_objs spx_afh spx_common"
+       filter_errlist_objs="$filter_errlist_objs spxdec_filter spx_common"
+       audiod_errlist_objs="$audiod_errlist_objs spxdec_filter spx_common"
+       afh_errlist_objs="$afh_errlist_objs spx_afh spx_common"
+
+       audiod_audio_formats="$audiod_audio_formats spx"
+       server_audio_formats="$server_audio_formats spx"
+else
+       AC_MSG_WARN([no ogg/speex $msg])
 fi
 CPPFLAGS="$OLD_CPPFLAGS"
 LDFLAGS="$OLD_LDFLAGS"
diff --git a/error.h b/error.h
index 564f1339dd9b51e4d0c4fc034c65d2aa6a7c6187..2e32c24044bd074cc9e311903adde6d85ac5a4c0 100644 (file)
--- a/error.h
+++ b/error.h
@@ -272,7 +272,6 @@ extern const char **para_errlist[];
 
 #define AUDIOD_COMMAND_ERRORS \
        PARA_ERROR(CLIENT_WRITE, "client write error"), \
-       PARA_ERROR(AUDIOD_SYNTAX, "syntax error"), \
        PARA_ERROR(UCRED_PERM, "permission denied"), \
        PARA_ERROR(INVALID_AUDIOD_CMD, "invalid command"), \
        PARA_ERROR(TOO_MANY_CLIENTS, "maximal number of stat clients exceeded"), \
@@ -392,7 +391,6 @@ extern const char **para_errlist[];
 
 #define WRITE_ERRORS \
        PARA_ERROR(WRITE_SYNTAX, "para_write syntax error"), \
-       PARA_ERROR(NO_WAV_HEADER, "wave header not found"), \
 
 
 #define ALSA_WRITE_ERRORS \
diff --git a/fade.c b/fade.c
index e0ab967c68e012a5e788390e52e6aa4015077e2b..04ca923770ec069bda49d3a069fac795fd461ac1 100644 (file)
--- a/fade.c
+++ b/fade.c
@@ -22,6 +22,7 @@
 #include "fd.h"
 #include "string.h"
 #include "error.h"
+#include "version.h"
 
 INIT_FADE_ERRLISTS;
 static struct fade_args_info conf;
diff --git a/fec.c b/fec.c
index dc6e75209473c3eb14c9d52324707f5329d398d0..233a87803ebcf06fe38d172473cfa15e23b17c96 100644 (file)
--- a/fec.c
+++ b/fec.c
@@ -179,14 +179,14 @@ static void generate_gf(void)
  * This is used often, so better optimize it! Currently the loop is unrolled 16
  * times. The case c=0 is also optimized, whereas c=1 is not.
  */
-static void addmul(unsigned char *dst1, const unsigned char const *src1,
+static void addmul(unsigned char *dst1, const unsigned char *src1,
        unsigned char c, int sz)
 {
        if (c == 0)
                return;
        unsigned char *dst = dst1, *lim = &dst[sz - UNROLL + 1],
                *col = gf_mul_table[c];
-       const unsigned char const *src = src1;
+       const unsigned char *src = src1;
 
        for (; dst < lim; dst += UNROLL, src += UNROLL) {
                dst[0] ^= col[src[0]];
index 1d938c45ac059a92ac59ac364be5abc73ebc2a13..0dfc94b1cc7213e024f6bc626c48be79cb09df75 100644 (file)
--- a/filter.c
+++ b/filter.c
@@ -20,6 +20,7 @@
 #include "stdin.h"
 #include "stdout.h"
 #include "error.h"
+#include "version.h"
 
 /** The list of all status items used by para_{server,audiod,gui}. */
 const char *status_item_list[] = {STATUS_ITEM_ARRAY};
index 2659b93af07006787b4e1731c4349d94d594d285..1b5008540af26a18166e38dfaec6b3eca839171d 100644 (file)
@@ -104,7 +104,7 @@ details="
        Check the clock difference between the host running para_server
        and the local host running para_audiod that many times before
        starting any stream I/0. Set this to non-zero for non-local
-       setups if the clocks of these two hosts are not syncronized
+       setups if the clocks of these two hosts are not synchronized
        by ntp or similar.
 "
 
index 0d3b6036a924674866dbead443a2daaf273751b9..9109c2f8f6c5f1978eddd356ff7f8e979d73dd8a 100644 (file)
@@ -61,9 +61,9 @@ struct grab_client {
 };
 
 /* Grab clients that are attached to a btr node. */
-INITIALIZED_LIST_HEAD(active_grab_client_list);
+static INITIALIZED_LIST_HEAD(active_grab_client_list);
 /* Grab clients that are not currently attached any btr node. */
-INITIALIZED_LIST_HEAD(inactive_grab_client_list);
+static INITIALIZED_LIST_HEAD(inactive_grab_client_list);
 
 static int gc_write(struct grab_client *gc, char *buf, size_t len)
 {
@@ -130,13 +130,12 @@ static void gc_activate(struct grab_client *gc)
        list_move(&gc->node, &active_grab_client_list);
        gc->btrn = btr_new_node(&(struct btr_node_description)
                EMBRACE(.name = name, .parent = parent));
-       if (!gc->task.pre_select) {
-               gc->task.pre_select = gc_pre_select;
-               gc->task.post_select = gc_post_select;
-               snprintf(gc->task.status, sizeof(gc->task.status) - 1, "%s", name);
-               gc->task.status[sizeof(gc->task.status) - 1] = '\0';
-               register_task(&gc->task);
-       }
+       gc->task.pre_select = gc_pre_select;
+       gc->task.post_select = gc_post_select;
+       snprintf(gc->task.status, sizeof(gc->task.status) - 1, "%s", name);
+       gc->task.status[sizeof(gc->task.status) - 1] = '\0';
+       gc->task.error = 0;
+       register_task(&gc->task);
 }
 
 /**
@@ -155,7 +154,7 @@ void activate_grab_clients(void)
        struct grab_client *gc, *tmp;
 
        list_for_each_entry_safe(gc, tmp, &inactive_grab_client_list, node) {
-               if (gc->task.error < 0) {
+               if (gc->fd < 0) {
                        list_del(&gc->node);
                        free(gc);
                        continue;
@@ -178,11 +177,11 @@ static int gc_close(struct grab_client *gc, int err)
                 * post_select().
                 */
                close(gc->fd);
+               gc->fd = -1;
                free(gc->parent);
                free(gc->name);
                return 1;
        }
-       gc_activate(gc);
        return 0;
 }
 
@@ -209,7 +208,8 @@ static void gc_post_select(__a_unused struct sched *s, struct task *t)
                btr_consume(btrn, ret);
        return;
 err:
-       t->error = gc_close(gc, ret)? ret : 0;
+       gc_close(gc, ret);
+       t->error = ret;
 }
 
 static int gc_check_args(int argc, char **argv, struct grab_client *gc)
diff --git a/gui.c b/gui.c
index 29089244c0439cfab0f779b217f672a3e24353c9..c8721565ae86502319be0ed2e6257454b876f841 100644 (file)
--- a/gui.c
+++ b/gui.c
@@ -21,6 +21,7 @@
 #include "list.h"
 #include "sched.h"
 #include "signal.h"
+#include "version.h"
 
 /** define the array of error lists needed by para_gui */
 INIT_GUI_ERRLISTS;
@@ -32,10 +33,10 @@ static int signal_pipe;
 
 static struct win_data {
        WINDOW *win;
-       NCURSES_SIZE_T begx;
-       NCURSES_SIZE_T begy;
-       NCURSES_SIZE_T cols;
-       NCURSES_SIZE_T lines;
+       size_t begx;
+       size_t begy;
+       size_t cols;
+       size_t lines;
 } top, bot, sb, in, sep;
 
 #define RINGBUFFER_SIZE 512
index ffa5d792ee199f16e5bb26c5e6557054520f8e5c..4abc45ec6e7a0cd60872d840a04d4f2659ca5119 100644 (file)
@@ -362,7 +362,7 @@ struct theme_description {
        void (*init)(struct gui_theme *t);
 };
 
-struct theme_description themes[] = {
+static struct theme_description themes[] = {
        {
                .name = "colorful blackness",
                .init = init_theme_colorful_blackness,
diff --git a/imdct.c b/imdct.c
index 5f48ba44c11b1186f6ebea4d5cec33b34e622bcc..e926499393bc1fadcd0bedc251cc74ce7d9585de 100644 (file)
--- a/imdct.c
+++ b/imdct.c
@@ -59,7 +59,7 @@ struct mdct_context {
 };
 
 /** cos(2 * pi * x / n) for 0 <= x <= n / 4, followed by its reverse */
-#define COSINE_TAB(n) fftsample_t cos_ ## n[n / 2] __a_aligned(16)
+#define COSINE_TAB(n) static fftsample_t cos_ ## n[n / 2] __a_aligned(16)
 
 COSINE_TAB(16);
 COSINE_TAB(32);
diff --git a/mm.c b/mm.c
index a9f4b9bd258f8f9e36733ea0fe295086ea0b3a49..af99a36f824ff533278ddbec219e10c6bff9a46b 100644 (file)
--- a/mm.c
+++ b/mm.c
@@ -32,7 +32,7 @@
 enum mood_comparator_id {MOOD_COMPARATORS NUM_MOOD_COMPARATORS};
 #undef MC
 #define MC(a, b) # b,
-static const char const *mood_comparators[] = {MOOD_COMPARATORS};
+static const char *mood_comparators[] = {MOOD_COMPARATORS};
 #undef MC
 
 static int parse_mood_comparator(const char *word)
diff --git a/para.h b/para.h
index 08eb0ee6c20ab1a7779cc3f10de2b5fca094f44b..7217486d7965c93dfa0361c54982e6225aa06875 100644 (file)
--- a/para.h
+++ b/para.h
                va_end(argp); \
        }
 
-/** Version text used by various commands if -V switch was given. */
-#define VERSION_TEXT(prefix) "para_" prefix " " PACKAGE_VERSION \
-       " (" GIT_VERSION ": " CODENAME ")" "\n" \
-       "Copyright (C) 2011 Andre Noll\n" \
-       "This is free software with ABSOLUTELY NO WARRANTY." \
-       " See COPYING for details.\n" \
-       "Written by Andre Noll.\n" \
-       "Report bugs to <maan@systemlinux.org>.\n"
-
-/** Print out \p VERSION_TEXT and exit if version flag was given. */
-#define HANDLE_VERSION_FLAG(_prefix, _args_info_struct) \
-       if (_args_info_struct.version_given) { \
-               printf("%s", VERSION_TEXT(_prefix)); \
-               exit(EXIT_SUCCESS); \
-       }
-
 /** Sent by para_client to initiate the authentication procedure. */
 #define AUTH_REQUEST_MSG "auth rsa "
 /** Sent by para_server for commands that expect a data file. */
diff --git a/recv.c b/recv.c
index 8e6d75b1c8b6fe3a1fa9d6865e9d3c71eb0e5843..52f457fc29b68e61ba017079511145f4e3120885 100644 (file)
--- a/recv.c
+++ b/recv.c
@@ -21,6 +21,7 @@
 #include "error.h"
 #include "stdout.h"
 #include "buffer_tree.h"
+#include "version.h"
 
 /** The gengetopt args info struct. */
 static struct recv_args_info conf;
index 0ae888fa8557357838df38b0be1c9c8ae40cfaad..e8dddf5bc27a80238436811b7d2b46680cddb3d7 100644 (file)
--- a/server.c
+++ b/server.c
@@ -88,6 +88,7 @@
 #include "signal.h"
 #include "user_list.h"
 #include "color.h"
+#include "version.h"
 
 /** Define the array of error lists needed by para_server. */
 INIT_SERVER_ERRLISTS;
diff --git a/version.h b/version.h
new file mode 100644 (file)
index 0000000..3b83966
--- /dev/null
+++ b/version.h
@@ -0,0 +1,17 @@
+#include "git-version.h"
+/** Version text used by various commands if -V switch was given. */
+#define VERSION_TEXT(prefix) "para_" prefix " " PACKAGE_VERSION \
+       " (" GIT_VERSION ": " CODENAME ")" "\n" \
+       "Copyright (C) 2011 Andre Noll\n" \
+       "This is free software with ABSOLUTELY NO WARRANTY." \
+       " See COPYING for details.\n" \
+       "Written by Andre Noll.\n" \
+       "Report bugs to <maan@systemlinux.org>.\n"
+
+/** Print out \p VERSION_TEXT and exit if version flag was given. */
+#define HANDLE_VERSION_FLAG(_prefix, _args_info_struct) \
+       if (_args_info_struct.version_given) { \
+               printf("%s", VERSION_TEXT(_prefix)); \
+               exit(EXIT_SUCCESS); \
+       }
+
diff --git a/versions/paraslash-0.4.6.tar.bz2 b/versions/paraslash-0.4.6.tar.bz2
new file mode 100644 (file)
index 0000000..de90cf1
Binary files /dev/null and b/versions/paraslash-0.4.6.tar.bz2 differ
diff --git a/versions/paraslash-0.4.6.tar.bz2.asc b/versions/paraslash-0.4.6.tar.bz2.asc
new file mode 100644 (file)
index 0000000..a5307b2
--- /dev/null
@@ -0,0 +1,7 @@
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v1.4.10 (GNU/Linux)
+
+iEYEABECAAYFAk2UZVsACgkQWto1QDEAkw/XxQCfZ3f3JFstN47qkV1lHLpNC0ij
+woYAmwQrwy6WwMx7fttfxdou6reIrsir
+=bZsC
+-----END PGP SIGNATURE-----
index 48f5bb516a10265d559c862e8815e4c1eee42bef..f9009e4f7dcf48af389280e0a14d2b997380bfc0 100644 (file)
@@ -1,6 +1,10 @@
 <h1>Events</h1>
 <hr>
 <ul>
+       <li>2011-03-31: <a href="versions/paraslash-0.4.6.tar.bz2">paraslash-0.4.6</a>
+               <a href="versions/paraslash-0.4.6.tar.bz2.asc">(sig)</a>
+               "deterministic entropy"
+       </li>
        <li>2010-12-17: <a href="versions/paraslash-0.4.5.tar.bz2">paraslash-0.4.5</a>
                <a href="versions/paraslash-0.4.5.tar.bz2.asc">(sig)</a>
                "symmetric randomization"
index 5926b55536c736c0bd8f031bd596d51e31587fbb..30fe922f63bd6fab3ffd86ca4f2653dc0423bf1c 100644 (file)
@@ -1504,9 +1504,9 @@ Forward error correction
 ~~~~~~~~~~~~~~~~~~~~~~~~
 
 As already mentioned REFERENCE(Streaming protocols, earlier),
-paraslash uses forward error correction (FEC) for the unreliable
-UDP transport. FEC is a technique which was invented already in
-1960 by Reed and Solomon and which is widely used for the parity
+paraslash uses forward error correction (FEC) for the unreliable UDP
+and DCCP transports. FEC is a technique which was invented already
+in 1960 by Reed and Solomon and which is widely used for the parity
 calculations of storage devices (RAID arrays). It is based on the
 algebraic concept of finite fields, today called Galois fields, in
 honour of the mathematician Galois (1811-1832). The FEC implementation
index bb534df528c5278198da5c116eb324bfe099da85..0b381c5d9f0baabb657d0b8d51adfb8683e1495b 100644 (file)
@@ -150,7 +150,7 @@ struct private_wmadec_data {
 #define VLCBITS 9
 #define VLCMAX DIV_ROUND_UP(22, VLCBITS)
 
-#define SINE_WINDOW(x) float sine_ ## x[x] __a_aligned(16)
+#define SINE_WINDOW(x) static float sine_ ## x[x] __a_aligned(16)
 
 SINE_WINDOW(128);
 SINE_WINDOW(256);
diff --git a/write.c b/write.c
index 8ddd51a9d4d8ef5b061159102f0b99390cc283d5..6b574414b6b13c227c98b008addd28f4b2302b33 100644 (file)
--- a/write.c
+++ b/write.c
@@ -22,6 +22,7 @@
 #include "write_common.h"
 #include "fd.h"
 #include "error.h"
+#include "version.h"
 
 INIT_WRITE_ERRLISTS;