confdefs.h
conftest
conftest.c
-GIT-VERSION-FILE
+git-version.h
-#!/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) ;;
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
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
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@)
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
@[ -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 $@ $<
@[ -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@)
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 $@'
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)/*
------------------------------------------------
-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.
#include "fd.h"
#include "afh.h"
#include "error.h"
+#include "version.h"
static struct afh_args_info conf;
/** The list of all status items */
#include "net.h"
#include "string.h"
#include "fd.h"
+#include "version.h"
INIT_AUDIOC_ERRLISTS;
#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;
#!/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
#include "client.cmdline.h"
#include "client.h"
#include "buffer_tree.h"
+#include "version.h"
/** The size of the receiving buffer. */
#define CLIENT_BUFSIZE 4000
#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
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
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"
#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"), \
#define WRITE_ERRORS \
PARA_ERROR(WRITE_SYNTAX, "para_write syntax error"), \
- PARA_ERROR(NO_WAV_HEADER, "wave header not found"), \
#define ALSA_WRITE_ERRORS \
#include "fd.h"
#include "string.h"
#include "error.h"
+#include "version.h"
INIT_FADE_ERRLISTS;
static struct fade_args_info conf;
* 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]];
#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};
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.
"
};
/* 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)
{
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);
}
/**
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;
* post_select().
*/
close(gc->fd);
+ gc->fd = -1;
free(gc->parent);
free(gc->name);
return 1;
}
- gc_activate(gc);
return 0;
}
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)
#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;
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
void (*init)(struct gui_theme *t);
};
-struct theme_description themes[] = {
+static struct theme_description themes[] = {
{
.name = "colorful blackness",
.init = init_theme_colorful_blackness,
};
/** 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);
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)
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. */
#include "error.h"
#include "stdout.h"
#include "buffer_tree.h"
+#include "version.h"
/** The gengetopt args info struct. */
static struct recv_args_info conf;
#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;
--- /dev/null
+#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); \
+ }
+
--- /dev/null
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v1.4.10 (GNU/Linux)
+
+iEYEABECAAYFAk2UZVsACgkQWto1QDEAkw/XxQCfZ3f3JFstN47qkV1lHLpNC0ij
+woYAmwQrwy6WwMx7fttfxdou6reIrsir
+=bZsC
+-----END PGP SIGNATURE-----
<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"
~~~~~~~~~~~~~~~~~~~~~~~~
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
#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);
#include "write_common.h"
#include "fd.h"
#include "error.h"
+#include "version.h"
INIT_WRITE_ERRLISTS;