reverted: --- rplay-3.3.2/devrplay/rplaydsp +++ rplay-3.3.2.orig/devrplay/rplaydsp @@ -1,12 +0,0 @@ -#!/bin/sh - -if [ -z $LD_PRELOAD ]; then - LD_PRELOAD=/usr/lib/devrplay.so -else - LD_PRELOAD=/usr/lib/devrplay.so:$LD_PRELOAD -fi - -export LD_PRELOAD - -exec "$@" - reverted: --- rplay-3.3.2/devrplay/Makefile.in +++ rplay-3.3.2.orig/devrplay/Makefile.in @@ -24,7 +24,7 @@ #$(TARGET): $(OBJS) ../librplay/librplay.so # $(CC) -o $@ $(OBJS) ../librplay/rplay.lo ../librplay/rptp.lo $(LDFLAGS) +$(TARGET): $(OBJS) ../librplay/librplay.so -$(TARGET): $(OBJS) ../librplay/librplay.so.@RPLAY_VERSION@ $(CC) -o $@ $(OBJS) $(LDFLAGS) ../librplay/librplay.so: @@ -33,8 +33,6 @@ install: all $(MKINSTALLDIRS) $(libdir) $(INSTALL_DATA) $(TARGET) $(libdir) - $(MKINSTALLDIRS) $(bindir) - $(INSTALL_PROGRAM) rplaydsp $(bindir)/rplaydsp uninstall: $(RM) $(libdir)/$(TARGET) reverted: --- rplay-3.3.2/devrplay/devrplay.c +++ rplay-3.3.2.orig/devrplay/devrplay.c @@ -26,9 +26,6 @@ * Copyright (C) 1998, 1999 Manish Singh */ -#define _GNU_SOURCE -#define __USE_GNU - #ifdef HAVE_CONFIG_H #include "config.h" #endif @@ -37,7 +34,6 @@ #include #include #include -#include #include #include #include @@ -60,7 +56,6 @@ static int dsp_speed; static int dsp_blksize; static int streaming; -static int opened; static char * getsound() @@ -100,35 +95,12 @@ if (strcmp(pathname, "/dev/dsp") == 0) { - char response[RPTP_MAX_LINE]; - char *acc; - rplay_fd = rptp_open(rplay_default_host(), RPTP_PORT, response, sizeof(response)); if (rplay_fd < 0) { rptp_perror(rplay_default_host()); } - else - { - rptp_putline(rplay_fd, "access"); - rptp_getline(rplay_fd, response, sizeof(response)); - acc = rptp_parse(response, "access"); - - if (!acc || !strchr(acc, 'w')) - { - fprintf(stderr, - "RPLAY-ERROR: please add 'w' to rplay.hosts or man rplay.hosts\n"); - errno = EACCES; - close(rplay_fd); - rplay_fd = -1; - } - else - { - opened = 1; - } - } - return rplay_fd; } else @@ -186,7 +158,6 @@ break; } - /* if (spool_id == -1 && dsp_fmt && dsp_speed && dsp_channels) { char response[RPTP_MAX_LINE]; @@ -203,18 +174,11 @@ getsound()); rptp_getline(rplay_fd, response, sizeof(response)); - if (response[0] != RPTP_OK) - { - errno = EINVAL; - return -1; - } - spool_id = atoi(1 + rptp_parse(response, "id")); rptp_putline(rplay_fd, "put id=#%d size=0", spool_id); rptp_getline(rplay_fd, response, sizeof(response)); } - */ return 0; } @@ -250,7 +214,7 @@ if (!func) func = (int (*)(int, const void *, size_t)) dlsym(REAL_LIBC, "write"); + if (fd == rplay_fd && !streaming) - if (fd == rplay_fd && !streaming && opened) { char info[64]; char response[RPTP_MAX_LINE]; @@ -277,7 +241,7 @@ } /* otherwise let rplayd figure out the format using the sound header and/or name. */ + - streaming = 1; rptp_putline(rplay_fd, "play input=flow %s sound=\"%s\"", info, getsound()); @@ -305,7 +269,6 @@ rplay_fd = -1; spool_id = -1; streaming = 0; - opened = 0; dsp_fmt = dsp_speed = dsp_channels = dsp_speed = dsp_blksize = 0; } reverted: --- rplay-3.3.2/configure +++ rplay-3.3.2.orig/configure @@ -527,8 +527,6 @@ -BUILD_TARGETS="include lib adpcm" - export srcdir RPLAY_VERSION=`$srcdir/version` @@ -546,7 +544,7 @@ # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:548: checking for $ac_word" >&5 -echo "configure:550: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -576,7 +574,7 @@ # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:578: checking for $ac_word" >&5 -echo "configure:580: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -627,7 +625,7 @@ # Extract the first word of "cl", so it can be a program name with args. set dummy cl; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:629: checking for $ac_word" >&5 -echo "configure:631: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -659,7 +657,7 @@ fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 +echo "configure:661: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 -echo "configure:663: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. @@ -670,12 +668,12 @@ cat > conftest.$ac_ext << EOF +#line 672 "configure" -#line 674 "configure" #include "confdefs.h" main(){return(0);} EOF +if { (eval echo configure:677: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -if { (eval echo configure:679: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ac_cv_prog_cc_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then @@ -701,12 +699,12 @@ { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 +echo "configure:703: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 -echo "configure:705: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 cross_compiling=$ac_cv_prog_cc_cross echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 +echo "configure:708: checking whether we are using GNU C" >&5 -echo "configure:710: checking whether we are using GNU C" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -715,7 +713,7 @@ yes; #endif EOF +if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:717: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:719: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gcc=yes else ac_cv_prog_gcc=no @@ -734,7 +732,7 @@ ac_save_CFLAGS="$CFLAGS" CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 +echo "configure:736: checking whether ${CC-cc} accepts -g" >&5 -echo "configure:738: checking whether ${CC-cc} accepts -g" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -799,7 +797,7 @@ echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6 +echo "configure:801: checking for POSIXized ISC" >&5 -echo "configure:803: checking for POSIXized ISC" >&5 if test -d /etc/conf/kconfig.d && grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1 then @@ -820,7 +818,7 @@ fi echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 +echo "configure:822: checking how to run the C preprocessor" >&5 -echo "configure:824: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -835,13 +833,13 @@ # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:843: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -{ (eval echo configure:845: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -852,13 +850,13 @@ rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:860: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -{ (eval echo configure:862: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -869,13 +867,13 @@ rm -rf conftest* CPP="${CC-cc} -nologo -E" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:877: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -{ (eval echo configure:879: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -930,7 +928,7 @@ # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 +echo "configure:932: checking for a BSD compatible install" >&5 -echo "configure:934: checking for a BSD compatible install" >&5 if test -z "$INSTALL"; then if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -983,7 +981,7 @@ test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 +echo "configure:985: checking whether ln -s works" >&5 -echo "configure:987: checking whether ln -s works" >&5 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1006,7 +1004,7 @@ # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:1008: checking for $ac_word" >&5 -echo "configure:1010: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1038,7 +1036,7 @@ # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:1040: checking for $ac_word" >&5 -echo "configure:1042: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_ETAGS'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1073,7 +1071,7 @@ # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:1075: checking for $ac_word" >&5 -echo "configure:1077: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_MAKEDEPEND'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1108,7 +1106,7 @@ # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:1110: checking for $ac_word" >&5 -echo "configure:1112: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_MAKEINFO'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1143,7 +1141,7 @@ # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:1145: checking for $ac_word" >&5 -echo "configure:1147: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_TEXI2DVI'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1178,7 +1176,7 @@ # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:1180: checking for $ac_word" >&5 -echo "configure:1182: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_TEXI2HTML'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1213,7 +1211,7 @@ # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:1215: checking for $ac_word" >&5 -echo "configure:1217: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_DVIPS'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1249,12 +1247,12 @@ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6 +echo "configure:1251: checking for $ac_hdr that defines DIR" >&5 -echo "configure:1253: checking for $ac_hdr that defines DIR" >&5 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include <$ac_hdr> @@ -1262,7 +1260,7 @@ DIR *dirp = 0; ; return 0; } EOF +if { (eval echo configure:1264: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then -if { (eval echo configure:1266: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_header_dirent_$ac_safe=yes" else @@ -1287,7 +1285,7 @@ # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. if test $ac_header_dirent = dirent.h; then echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6 +echo "configure:1289: checking for opendir in -ldir" >&5 -echo "configure:1291: checking for opendir in -ldir" >&5 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1295,7 +1293,7 @@ ac_save_LIBS="$LIBS" LIBS="-ldir $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -if { (eval echo configure:1310: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1328,7 +1326,7 @@ else echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6 +echo "configure:1330: checking for opendir in -lx" >&5 -echo "configure:1332: checking for opendir in -lx" >&5 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1336,7 +1334,7 @@ ac_save_LIBS="$LIBS" LIBS="-lx $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -if { (eval echo configure:1351: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1370,12 +1368,12 @@ fi echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 +echo "configure:1372: checking for ANSI C header files" >&5 -echo "configure:1374: checking for ANSI C header files" >&5 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -1383,7 +1381,7 @@ #include EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:1385: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -{ (eval echo configure:1387: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -1400,7 +1398,7 @@ if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -1418,7 +1416,7 @@ if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -1439,7 +1437,7 @@ : else cat > conftest.$ac_ext < #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') @@ -1450,7 +1448,7 @@ exit (0); } EOF +if { (eval echo configure:1452: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -if { (eval echo configure:1454: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else @@ -1474,12 +1472,12 @@ fi echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 +echo "configure:1476: checking whether time.h and sys/time.h may both be included" >&5 -echo "configure:1478: checking whether time.h and sys/time.h may both be included" >&5 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -1488,7 +1486,7 @@ struct tm *tp; ; return 0; } EOF +if { (eval echo configure:1490: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then -if { (eval echo configure:1492: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_time=yes else @@ -1508,21 +1506,21 @@ fi +for ac_hdr in fcntl.h sys/file.h sys/ioctl.h sys/time.h stdlib.h unistd.h memory.h string.h strings.h utime.h limits.h gsm.h gsm/gsm.h rxposix.h rx/rxposix.h -for ac_hdr in fcntl.h sys/file.h sys/ioctl.h sys/time.h stdlib.h unistd.h memory.h string.h strings.h utime.h limits.h gsm.h gsm/gsm.h regex.h rxposix.h rx/rxposix.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:1514: checking for $ac_hdr" >&5 -echo "configure:1516: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:1524: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -{ (eval echo configure:1526: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -1549,12 +1547,12 @@ done echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6 +echo "configure:1551: checking for sys/wait.h that is POSIX.1 compatible" >&5 -echo "configure:1553: checking for sys/wait.h that is POSIX.1 compatible" >&5 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -1570,7 +1568,7 @@ s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; ; return 0; } EOF +if { (eval echo configure:1572: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then -if { (eval echo configure:1574: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_sys_wait_h=yes else @@ -1592,12 +1590,12 @@ echo $ac_n "checking for working const""... $ac_c" 1>&6 +echo "configure:1594: checking for working const" >&5 -echo "configure:1596: checking for working const" >&5 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then -if { (eval echo configure:1650: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else @@ -1667,12 +1665,12 @@ fi echo $ac_n "checking for size_t""... $ac_c" 1>&6 +echo "configure:1669: checking for size_t" >&5 -echo "configure:1671: checking for size_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -1704,17 +1702,17 @@ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:1706: checking for $ac_hdr" >&5 -echo "configure:1708: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:1716: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -{ (eval echo configure:1718: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -1743,12 +1741,12 @@ for ac_func in getpagesize do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:1745: checking for $ac_func" >&5 -echo "configure:1747: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -if { (eval echo configure:1775: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -1796,7 +1794,7 @@ done echo $ac_n "checking for working mmap""... $ac_c" 1>&6 +echo "configure:1798: checking for working mmap" >&5 -echo "configure:1800: checking for working mmap" >&5 if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1804,7 +1802,7 @@ ac_cv_func_mmap_fixed_mapped=no else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -if { (eval echo configure:1948: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_func_mmap_fixed_mapped=yes else @@ -1967,7 +1965,7 @@ fi echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6 +echo "configure:1969: checking for 8-bit clean memcmp" >&5 -echo "configure:1971: checking for 8-bit clean memcmp" >&5 if eval "test \"`echo '$''{'ac_cv_func_memcmp_clean'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1975,7 +1973,7 @@ ac_cv_func_memcmp_clean=no else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -if { (eval echo configure:1989: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_func_memcmp_clean=yes else @@ -2003,12 +2001,12 @@ test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}" echo $ac_n "checking for vprintf""... $ac_c" 1>&6 +echo "configure:2005: checking for vprintf" >&5 -echo "configure:2007: checking for vprintf" >&5 if eval "test \"`echo '$''{'ac_cv_func_vprintf'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -if { (eval echo configure:2035: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_vprintf=yes" else @@ -2055,12 +2053,12 @@ if test "$ac_cv_func_vprintf" != yes; then echo $ac_n "checking for _doprnt""... $ac_c" 1>&6 +echo "configure:2057: checking for _doprnt" >&5 -echo "configure:2059: checking for _doprnt" >&5 if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -if { (eval echo configure:2087: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func__doprnt=yes" else @@ -2108,12 +2106,12 @@ fi echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 +echo "configure:2110: checking return type of signal handlers" >&5 -echo "configure:2112: checking return type of signal handlers" >&5 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -2130,7 +2128,7 @@ int i; ; return 0; } EOF +if { (eval echo configure:2132: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then -if { (eval echo configure:2134: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_type_signal=void else @@ -2151,12 +2149,12 @@ for ac_func in getcwd gethostname mkdir re_comp regcomp select snprintf socket strdup strerror strstr fstat fchmod fchown utime utimes memmove sigset vsnprintf waitpid random srandom do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:2153: checking for $ac_func" >&5 -echo "configure:2155: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -if { (eval echo configure:2183: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -2204,7 +2202,7 @@ done echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6 +echo "configure:2206: checking for socket in -lsocket" >&5 -echo "configure:2208: checking for socket in -lsocket" >&5 ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2212,7 +2210,7 @@ ac_save_LIBS="$LIBS" LIBS="-lsocket $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -if { (eval echo configure:2227: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2244,7 +2242,7 @@ fi echo $ac_n "checking for t_accept in -lnsl""... $ac_c" 1>&6 +echo "configure:2246: checking for t_accept in -lnsl" >&5 -echo "configure:2248: checking for t_accept in -lnsl" >&5 ac_lib_var=`echo nsl'_'t_accept | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2252,7 +2250,7 @@ ac_save_LIBS="$LIBS" LIBS="-lnsl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -if { (eval echo configure:2267: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2285,7 +2283,7 @@ echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6 +echo "configure:2287: checking for readline in -lreadline" >&5 -echo "configure:2289: checking for readline in -lreadline" >&5 ac_lib_var=`echo readline'_'readline | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2293,7 +2291,7 @@ ac_save_LIBS="$LIBS" LIBS="-lreadline $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -if { (eval echo configure:2308: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2319,10 +2317,7 @@ fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 + RL_LIBS="-lreadline" - cat >> confdefs.h <<\EOF -#define HAVE_LIBREADLINE 1 -EOF - RL_LIBS="-lreadline" else echo "$ac_t""no" 1>&6 fi @@ -2330,7 +2325,7 @@ echo $ac_n "checking for gsm_decode in -lgsm""... $ac_c" 1>&6 +echo "configure:2329: checking for gsm_decode in -lgsm" >&5 -echo "configure:2334: checking for gsm_decode in -lgsm" >&5 ac_lib_var=`echo gsm'_'gsm_decode | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2338,7 +2333,7 @@ ac_save_LIBS="$LIBS" LIBS="-lgsm $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -if { (eval echo configure:2353: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2364,91 +2359,42 @@ fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 + HAVE_GSM="yes" - GSM_LIBS="-lgsm"; GSM_INCS="" else echo "$ac_t""no" 1>&6 - - GSM_LIBS="-L../gsm -lgsm"; GSM_INCS="-I\${srcdir}/../gsm" - BUILD_TARGETS="$BUILD_TARGETS gsm" - fi +if test "$HAVE_GSM" = "yes"; then + GSM_LIBS="-lgsm" + GSM_INCS="" - - - -for ac_func in regcomp -do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:2383: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 else + GSM_LIBS="-L../gsm -lgsm" + GSM_INCS="-I\${srcdir}/../gsm" +fi - cat > conftest.$ac_ext < -/* Override any gcc2 internal prototype to avoid an error. */ -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); -int main() { -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) -choke me -#else -$ac_func(); -#endif - -; return 0; } -EOF -if { (eval echo configure:2411: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* -fi +echo $ac_n "checking for regncomp in -lrx""... $ac_c" 1>&6 +echo "configure:2379: checking for regncomp in -lrx" >&5 +ac_lib_var=`echo rx'_'regncomp | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <&6 -echo $ac_n "checking for regcomp in -lrx""... $ac_c" 1>&6 -echo "configure:2433: checking for regcomp in -lrx" >&5 -ac_lib_var=`echo rx'_'regcomp | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" LIBS="-lrx $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -if { (eval echo configure:2452: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2463,22 +2409,18 @@ fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 + HAVE_RX="yes" - RX_LIBS="-lrx"; RX_INCS="" else echo "$ac_t""no" 1>&6 - - RX_LIBS="-L../rx -lrx"; RX_INCS="-I\${srcdir}/../rx" - BUILD_TARGETS="$BUILD_TARGETS rx" - subdirs="rx" -s%@subdirs@%$subdirs%g - - fi +if test "$HAVE_RX" = "yes"; then + RX_LIBS="-lrx" + RX_INCS="" +else + RX_LIBS="-L../rx -lrx" + RX_INCS="-I\${srcdir}/../rx" - fi -done - @@ -2492,9 +2434,9 @@ if test -z "$RPLAY_TARGET"; then echo $ac_n "checking for sun""... $ac_c" 1>&6 +echo "configure:2438: checking for sun" >&5 -echo "configure:2496: checking for sun" >&5 cat > conftest.$ac_ext <&6 +echo "configure:2464: checking for solaris" >&5 -echo "configure:2522: checking for solaris" >&5 if test ! -f /vmunix; then is_solaris=yes RPLAY_TARGET="solaris" @@ -2531,9 +2473,9 @@ if test -z "$RPLAY_TARGET"; then echo $ac_n "checking for linux""... $ac_c" 1>&6 +echo "configure:2477: checking for linux" >&5 -echo "configure:2535: checking for linux" >&5 cat > conftest.$ac_ext <&6 +echo "configure:2505: checking for hpux" >&5 -echo "configure:2563: checking for hpux" >&5 cat > conftest.$ac_ext <&6 +echo "configure:2533: checking for sgi" >&5 -echo "configure:2591: checking for sgi" >&5 cat > conftest.$ac_ext <&6 +echo "configure:2557: checking for multimedia development kit" >&5 -echo "configure:2615: checking for multimedia development kit" >&5 for ac_hdr in audio.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:2562: checking for $ac_hdr" >&5 -echo "configure:2620: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:2572: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -{ (eval echo configure:2630: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -2662,12 +2604,12 @@ if test -z "$RPLAY_TARGET"; then echo $ac_n "checking for FreeBSD""... $ac_c" 1>&6 +echo "configure:2608: checking for FreeBSD" >&5 -echo "configure:2666: checking for FreeBSD" >&5 cat > conftest.$ac_ext < -#else #ifdef HAVE_RX_RXPOSIX_H #include #else @@ -76,12 +73,6 @@ #include "rxposix.h" #endif #endif -#endif - -/* Make sure MAXPATHLEN is defined. */ -#ifndef MAXPATHLEN -#define MAXPATHLEN 4096 -#endif SOUND *sounds = NULL; int sound_count = 0; @@ -152,9 +143,9 @@ //memset ((char *) &bad_dirs, 0, sizeof (bad_dirs)); + if (regncomp(&bad_dirs, buf, strlen(buf), REG_ICASE | REG_NOSUB)) - if (regcomp(&bad_dirs, buf, REG_ICASE | REG_NOSUB)) { + report(REPORT_ERROR, "bad_dirs: regncomp failed\n"); - report(REPORT_ERROR, "bad_dirs: regcomp failed\n"); done(1); } @@ -171,7 +162,7 @@ #endif { /* return 1 if bad */ + return regnexec(&bad_dirs, dir, strlen(dir), 0, 0, 0) ? 0 : 1; - return regexec(&bad_dirs, dir, 0, 0, 0) ? 0 : 1; } #endif /* BAD_DIRS */ reverted: --- rplay-3.3.2/rplayd/sound.h +++ rplay-3.3.2.orig/rplayd/sound.h @@ -170,9 +170,9 @@ int gsm_bit_frame_bytes; /* Number of bytes in gsm_bit_frame */ int gsm_fixed_buffer_size; #endif /* HAVE_GSM */ +#ifdef HAVE_CDROM -#if defined(HAVE_CDROM) || defined(HAVE_HELPERS) int pid; +#endif /* HAVE_CDROM */ -#endif /* HAVE_CDROM || HAVE_HELPERS */ } SINDEX; reverted: --- rplay-3.3.2/rplayd/helper.h +++ rplay-3.3.2.orig/rplayd/helper.h @@ -26,9 +26,6 @@ #ifdef HAVE_HELPERS -#ifdef HAVE_REGEX_H -#include -#else #ifdef HAVE_RX_RXPOSIX_H #include #else @@ -38,7 +35,6 @@ #include "rxposix.h" #endif #endif -#endif typedef struct _helper { reverted: --- rplay-3.3.2/rplayd/rplayd.h +++ rplay-3.3.2.orig/rplayd/rplayd.h @@ -73,6 +73,7 @@ extern fd_set read_mask; extern fd_set write_mask; extern int debug; +extern int inetd; extern int rptp_timeout; extern char hostname[]; extern char *hostaddr; @@ -132,7 +133,7 @@ extern int monitor_count; extern BUFFER *monitor_buffers; +extern int errno; -#include #ifdef __STDC__ extern void usage (); reverted: --- rplay-3.3.2/rplayd/helper.c +++ rplay-3.3.2.orig/rplayd/helper.c @@ -43,11 +43,6 @@ #include "helper.h" #include "misc.h" -/* Make sure MAXPATHLEN is defined. */ -#ifndef MAXPATHLEN -#define MAXPATHLEN 4096 -#endif - HELPER *helpers = NULL; static time_t helper_read_time; @@ -115,7 +110,7 @@ done(1); } //memset ((char *) &hp->pattern, 0, sizeof (hp->pattern)); + error = regncomp(&hp->pattern, pat, strlen(pat), REG_ICASE | REG_NOSUB); - error = regcomp(&hp->pattern, pat, REG_ICASE | REG_NOSUB); if (error) { report(REPORT_ERROR, "helper_read: %d line %d\n", error, line); @@ -193,7 +188,7 @@ for (hp = helpers; hp; hp = hp->next) { + if (regnexec(&hp->pattern, sound, strlen(sound), 0, 0, 0) == 0) - if (regexec(&hp->pattern, sound, 0, 0, 0) == 0) { return hp; } reverted: --- rplay-3.3.2/rplayd/native.c +++ rplay-3.3.2.orig/rplayd/native.c @@ -22,7 +22,7 @@ */ + -#include #ifdef HAVE_CONFIG_H #include "config.h" #endif reverted: --- rplay-3.3.2/rplayd/rplayd.c +++ rplay-3.3.2.orig/rplayd/rplayd.c @@ -333,9 +333,6 @@ progname = argv[0]; - /* no need to keep stdin around */ - close(0); - servers_file = tilde_expand(RPLAY_SERVERS); #ifdef HAVE_HELPERS helpers_file = tilde_expand(RPLAY_HELPERS); @@ -1469,7 +1466,7 @@ char *buf = rplay_audio_buf; int size = rplay_audio_size; int n; + - while (size) { n = MIN(BUFFER_SIZE - monitor_buffers->offset, size); @@ -1486,7 +1483,7 @@ } } } + - rplay_audio_size = 0; /* Flush when the audio stream has ended. */ reverted: --- rplay-3.3.2/rplayd/audio/audio_FreeBSD.c +++ rplay-3.3.2.orig/rplayd/audio/audio_FreeBSD.c @@ -35,7 +35,7 @@ #include #include #include +#include -#include /* * for the poor folks who don't have a sound card, but use the pc speaker reverted: --- rplay-3.3.2/rplayd/audio/audio_gnu.h +++ rplay-3.3.2.orig/rplayd/audio/audio_gnu.h @@ -1,37 +0,0 @@ -/* $Id: audio_generic.h,v 1.3 1999/03/10 07:58:10 boyns Exp $ */ - -/* - * Copyright (C) 1993-99 Mark R. Boyns - * - * This file is part of rplay. - * - * rplay is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * rplay is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with rplay; see the file COPYING. If not, write to the - * Free Software Foundation, Inc., - * 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. - */ - - - -#ifndef _audio_generic_h -#define _audio_generic_h - -#include "rplay.h" - -#define RPLAY_AUDIO_DEVICE "/dev/audio" -#define RPLAY_AUDIO_TIMEOUT 5 -#define RPLAY_AUDIO_FLUSH_TIMEOUT -1 -#define RPLAY_AUDIO_RATE 10 -#define RPLAY_AUDIO_BYTE_ORDER RPLAY_BIG_ENDIAN - -#endif /* _audio_generic_h */ reverted: --- rplay-3.3.2/rplayd/audio/audio_gnu.c +++ rplay-3.3.2.orig/rplayd/audio/audio_gnu.c @@ -1,287 +0,0 @@ -/* $Id: audio_generic.c,v 1.5 1999/03/10 07:58:10 boyns Exp $ */ - -/* - * Copyright (C) 1993-99 Mark R. Boyns - * - * This file is part of rplay. - * - * rplay is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * rplay is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with rplay; see the file COPYING. If not, write to the - * Free Software Foundation, Inc., - * 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. - */ - - - -#include "rplayd.h" - -/* - * System audio include files: - */ -#include -#include -#include -#ifdef ultrix -#include -#else -#include -#endif -#include - -/* - * External variables: - */ -extern char *rplay_audio_device; -extern int rplay_audio_sample_rate; -extern int rplay_audio_channels; -extern int rplay_audio_precision; -extern int rplay_audio_format; -extern int rplay_audio_port; -extern int optional_sample_rate; -extern int optional_precision; -extern int optional_channels; -extern int optional_format; -extern int optional_port; - -/* - * Internal variables: - */ -static int rplay_audio_fd = -1; - -static RPLAY_AUDIO_TABLE generic_table[] = -{ - {8000, RPLAY_FORMAT_ULAW, 1, 1}, - {0, 0, 0, 0} -}; - -/* - * Initialize the audio device. - * This routine must set the following external variables: - * rplay_audio_sample_rate - * rplay_audio_precision - * rplay_audio_channels - * rplay_audio_format - * rplay_audio_port - * - * and may use the following optional parameters: - * optional_sample_rate - * optional_precision - * optional_channels - * optional_format - * optional_port - * - * optional_* variables with values of zero should be ignored. - * - * Return 0 on success and -1 on error. - */ -int -rplay_audio_init() -{ - if (rplay_audio_fd == -1) - { - rplay_audio_open(); - if (rplay_audio_fd == -1) - { - report(REPORT_ERROR, "rplay_audio_init: cannot open %s\n", - rplay_audio_device); - return -1; - } - } - - rplay_audio_sample_rate = 8000; - rplay_audio_precision = 8; - rplay_audio_channels = 1; - rplay_audio_format = RPLAY_FORMAT_ULAW; - rplay_audio_port = RPLAY_AUDIO_PORT_SPEAKER; - rplay_audio_table = generic_table; - - return 0; -} - -/* - * Open the audio device. - * - * Return 0 on success and -1 on error. - */ -int -rplay_audio_open() -{ - int flags; - - rplay_audio_fd = open(rplay_audio_device, O_WRONLY | O_NDELAY, 0); - if (rplay_audio_fd < 0) - { - return -1; - } - - if (fcntl(rplay_audio_fd, F_SETFD, 1) < 0) - { - report(REPORT_ERROR, - "rplay_audio_open: close-on-exec %d\n", - sys_err_str(errno)); - /* return -1; */ - } - - if (rplay_audio_init() < 0) - { - return -1; - } - - /* - * Make sure the audio device writes are non-blocking. - */ - flags = fcntl(rplay_audio_fd, F_GETFL, 0); - if (flags < 0) - { - return -1; - } - flags |= FNDELAY; - if (fcntl(rplay_audio_fd, F_SETFL, flags) < 0) - { - return -1; - } - - return 0; -} - -/* - * Is the audio device open? - * - * Return 1 for true and 0 for false. - */ -int -rplay_audio_isopen() -{ - return rplay_audio_fd != -1; -} - -/* - * Flush the audio device. - * - * Return 0 on success and -1 on error. - */ -int -rplay_audio_flush() -{ - return 0; -} - -/* - * Write nbytes from buf to the audio device. - * - * Return the number of bytes written on success and -1 on error. - */ -#ifdef __STDC__ -int -rplay_audio_write(char *buf, int nbytes) -#else -int -rplay_audio_write(buf, nbytes) - char *buf; - int nbytes; -#endif -{ - int n, nleft, nwritten; - char *p; - - nleft = nbytes; - nwritten = 0; - - for (p = buf; nleft > 0; nleft -= n, p += n) - { - n = write(rplay_audio_fd, p, nleft); - if (n < 0) - { - if (errno == EWOULDBLOCK) - { - return nwritten; - } - else if (errno != EINTR) - { - return -1; - } - n = 0; - } - else - { - nwritten += n; - } - } - - return nwritten; -} - -/* - * Close the audio device. - * - * Return 0 on success and -1 on error. - */ -int -rplay_audio_close() -{ - if (rplay_audio_fd != -1) - { - close(rplay_audio_fd); - } - - rplay_audio_fd = -1; - - return 0; -} - -/* - * Return the volume of the audio device. - * - * Return 0-255 or -1 on error. - */ -int -rplay_audio_get_volume() -{ -#ifdef FAKE_VOLUME - return rplay_audio_volume; -#else /* not FAKE_VOLUME */ - return -1; -#endif /* not FAKE_VOLUME */ -} - -/* - * Set the volume of the audio device. - * Input should be 0-255. - * - * Return the volume of the audio device 0-255 or -1. - */ -#ifdef __STDC__ -int -rplay_audio_set_volume(int volume) -#else -int -rplay_audio_set_volume(volume) - int volume; -#endif -{ -#ifdef FAKE_VOLUME - if (volume < RPLAY_MIN_VOLUME) - { - volume = RPLAY_MIN_VOLUME; - } - else if (volume > RPLAY_MAX_VOLUME) - { - volume = RPLAY_MAX_VOLUME; - } - rplay_audio_volume = volume; - - return rplay_audio_volume; -#else /* not FAKE_VOLUME */ - return -1; -#endif /* not FAKE_VOLUME */ -} reverted: --- rplay-3.3.2/rplayd/spool.c +++ rplay-3.3.2.orig/rplayd/spool.c @@ -43,11 +43,6 @@ #include "flange.h" #endif -/* Make sure MAXPATHLEN is defined. */ -#ifndef MAXPATHLEN -#define MAXPATHLEN 4096 -#endif - SPOOL *spool = NULL; /* List of spool entries. */ int spool_size = 0; /* Number of entries in the spool. */ int spool_nplaying = 0; /* Number of playing sounds. */ @@ -1132,8 +1127,8 @@ spool_flow_pause(sp); } } +#endif /* HAVE_CDROM */ } -#endif /* HAVE_CDROM */ } else { reverted: --- rplay-3.3.2/rplayd/xhash.c +++ rplay-3.3.2.orig/rplayd/xhash.c @@ -36,11 +36,6 @@ #include "hash.h" #include "rplayd.h" -/* Make sure MAXPATHLEN is defined. */ -#ifndef MAXPATHLEN -#define MAXPATHLEN 4096 -#endif - static struct hash_control *htable; #ifdef DEBUG reverted: --- rplay-3.3.2/rplayd/cache.c +++ rplay-3.3.2.orig/rplayd/cache.c @@ -47,11 +47,6 @@ #include "spool.h" #include "cache.h" -/* Make sure MAXPATHLEN is defined. */ -#ifndef MAXPATHLEN -#define MAXPATHLEN 4096 -#endif - static DIR *cache_dir; static char cache_path[MAXPATHLEN]; static char cache_directory[MAXPATHLEN]; reverted: --- rplay-3.3.2/rplayd/host.c +++ rplay-3.3.2.orig/rplayd/host.c @@ -33,9 +33,6 @@ #include "host.h" #include "buffer.h" #include "misc.h" -#ifdef HAVE_REGEX_H -#include -#else #ifdef HAVE_RX_RXPOSIX_H #include #else @@ -45,7 +42,6 @@ #include "rxposix.h" #endif #endif -#endif #ifdef AUTH @@ -201,31 +197,35 @@ } strcat(expr_monitor, "$"); + error = regncomp(&access_read, expr_read, strlen(expr_read), + REG_ICASE | REG_NOSUB); - error = regcomp(&access_read, expr_read, REG_ICASE | REG_NOSUB); if (error) { + report(REPORT_ERROR, "host_read: regncomp: %d\n", error); - report(REPORT_ERROR, "host_read: regcomp: %d\n", error); done(1); } + error = regncomp(&access_write, expr_write, strlen(expr_write), + REG_ICASE | REG_NOSUB); - error = regcomp(&access_write, expr_write, REG_ICASE | REG_NOSUB); if (error) { + report(REPORT_ERROR, "host_read: regncomp: %d\n", error); - report(REPORT_ERROR, "host_read: regcomp: %d\n", error); done(1); } + error = regncomp(&access_execute, expr_execute, strlen(expr_execute), + REG_ICASE | REG_NOSUB); - error = regcomp(&access_execute, expr_execute, REG_ICASE | REG_NOSUB); if (error) { + report(REPORT_ERROR, "host_read: regncomp: %d\n", error); - report(REPORT_ERROR, "host_read: regcomp: %d\n", error); done(1); } + error = regncomp(&access_monitor, expr_monitor, strlen(expr_monitor), + REG_ICASE | REG_NOSUB); - error = regcomp(&access_monitor, expr_monitor, REG_ICASE | REG_NOSUB); if (error) { + report(REPORT_ERROR, "host_read: regncomp: %d\n", error); - report(REPORT_ERROR, "host_read: regcomp: %d\n", error); done(1); } } @@ -432,7 +432,7 @@ done(1); } + n = regnexec(re, p, strlen(p), 0, 0, 0); - n = regexec(re, p, 0, 0, 0); return !n; } reverted: --- rplay-3.3.2/rplayd/timer.c +++ rplay-3.3.2.orig/rplayd/timer.c @@ -29,7 +29,6 @@ #include #include #include -#include #include "rplayd.h" #include "timer.h" reverted: --- rplay-3.3.2/rplayd/Makefile.in +++ rplay-3.3.2.orig/rplayd/Makefile.in @@ -25,7 +25,7 @@ $(CC) -c $(CPPFLAGS) $(CFLAGS) $< LDFLAGS= $(LD_OPTIONS) -L../librplay -lrplay -L../lib -lrp \ + -L../adpcm -ladpcm @GSM_LIBS@ -L../rx -lrx @LDFLAGS@ @LIBS@ -lm - -L../adpcm -ladpcm @GSM_LIBS@ @RX_LIBS@ @LDFLAGS@ @LIBS@ -lm TARGET= rplayd @@ -54,7 +54,7 @@ install: all $(MKINSTALLDIRS) $(sbindir) $(INSTALL_PROGRAM) $(TARGET) $(sbindir)/$(TARGET) + @test -x $(bindir)/$(TARGET) && echo "" && echo " Note: Consider removing $(bindir)/$(TARGET)" && echo "" - @(test -x $(bindir)/$(TARGET) && echo "" && echo " Note: Consider removing $(bindir)/$(TARGET)" && echo "") || true uninstall: $(RM) $(bindir)/$(TARGET) reverted: --- rplay-3.3.2/doc/librplay.info +++ rplay-3.3.2.orig/doc/librplay.info @@ -1,10 +1,5 @@ +This is Info file librplay.info, produced by Makeinfo-1.63 from the +input file librplay.texi. -This is librplay.info, produced by makeinfo version 4.1 from -librplay.texi. - -INFO-DIR-SECTION Development -START-INFO-DIR-ENTRY -* librplay: (librplay). The rplay library. -END-INFO-DIR-ENTRY This file documents librplay. @@ -663,52 +658,52 @@ * Menu: +* rplay: RPLAY Core Functions. +* rplay_close: RPLAY Core Functions. +* rplay_convert: RPLAY Miscellaneous Functions. +* rplay_create: RPLAY Core Functions. +* rplay_default: RPLAY Helper Functions. +* rplay_default_host: RPLAY Helper Functions. +* rplay_destroy: RPLAY Core Functions. +* rplay_display: RPLAY Helper Functions. +* rplay_get: RPLAY Core Functions. +* rplay_host: RPLAY Helper Functions. +* rplay_host_volume: RPLAY Helper Functions. +* rplay_local: RPLAY Helper Functions. +* rplay_open: RPLAY Core Functions. +* rplay_open_default: RPLAY Helper Functions. +* rplay_open_display: RPLAY Helper Functions. +* rplay_open_port: RPLAY Helper Functions. +* rplay_open_sockaddr_in: RPLAY Helper Functions. +* rplay_pack: RPLAY Miscellaneous Functions. +* rplay_perror: RPLAY Error Reporting. +* rplay_ping: RPLAY Helper Functions. +* rplay_ping_sockaddr_in: RPLAY Helper Functions. +* rplay_ping_sockfd: RPLAY Helper Functions. +* rplay_set: RPLAY Core Functions. +* rplay_sound: RPLAY Helper Functions. +* rplay_unpack: RPLAY Miscellaneous Functions. +* rptp_close: RPTP Core Functions. +* rptp_command: RPTP Helper Functions. +* rptp_getline: RPTP Helper Functions. +* rptp_open: RPTP Core Functions. +* rptp_parse: RPTP Helper Functions. +* rptp_perror: RPTP Error Reporting. +* rptp_putline: RPTP Helper Functions. +* rptp_read: RPTP Core Functions. +* rptp_write: RPTP Core Functions. -* rplay: RPLAY Core Functions. -* rplay_close: RPLAY Core Functions. -* rplay_convert: RPLAY Miscellaneous Functions. -* rplay_create: RPLAY Core Functions. -* rplay_default: RPLAY Helper Functions. -* rplay_default_host: RPLAY Helper Functions. -* rplay_destroy: RPLAY Core Functions. -* rplay_display: RPLAY Helper Functions. -* rplay_get: RPLAY Core Functions. -* rplay_host: RPLAY Helper Functions. -* rplay_host_volume: RPLAY Helper Functions. -* rplay_local: RPLAY Helper Functions. -* rplay_open: RPLAY Core Functions. -* rplay_open_default: RPLAY Helper Functions. -* rplay_open_display: RPLAY Helper Functions. -* rplay_open_port: RPLAY Helper Functions. -* rplay_open_sockaddr_in: RPLAY Helper Functions. -* rplay_pack: RPLAY Miscellaneous Functions. -* rplay_perror: RPLAY Error Reporting. -* rplay_ping: RPLAY Helper Functions. -* rplay_ping_sockaddr_in: RPLAY Helper Functions. -* rplay_ping_sockfd: RPLAY Helper Functions. -* rplay_set: RPLAY Core Functions. -* rplay_sound: RPLAY Helper Functions. -* rplay_unpack: RPLAY Miscellaneous Functions. -* rptp_close: RPTP Core Functions. -* rptp_command: RPTP Helper Functions. -* rptp_getline: RPTP Helper Functions. -* rptp_open: RPTP Core Functions. -* rptp_parse: RPTP Helper Functions. -* rptp_perror: RPTP Error Reporting. -* rptp_putline: RPTP Helper Functions. -* rptp_read: RPTP Core Functions. -* rptp_write: RPTP Core Functions.  Tag Table: +Node: Top734 +Node: RPLAY Core Functions1886 +Node: RPLAY Helper Functions7013 +Node: RPLAY Miscellaneous Functions12728 +Node: RPLAY Error Reporting13892 +Node: RPTP Core Functions14398 +Node: RPTP Helper Functions16308 +Node: RPTP Error Reporting19628 +Node: Function Index20113 -Node: Top835 -Node: RPLAY Core Functions1987 -Node: RPLAY Helper Functions7114 -Node: RPLAY Miscellaneous Functions12829 -Node: RPLAY Error Reporting13993 -Node: RPTP Core Functions14499 -Node: RPTP Helper Functions16409 -Node: RPTP Error Reporting19729 -Node: Function Index20214  End Tag Table reverted: --- rplay-3.3.2/doc/librplay.texi +++ rplay-3.3.2.orig/doc/librplay.texi @@ -10,11 +10,6 @@ @ifinfo -@dircategory Development -@direntry -* librplay: (librplay). The rplay library. -@end direntry - This file documents librplay. Copyright (C) 1995 Mark Boyns reverted: --- rplay-3.3.2/doc/rplay.texi +++ rplay-3.3.2.orig/doc/rplay.texi @@ -10,11 +10,6 @@ @ifinfo -@dircategory Development -@direntry -* rplay: (rplay). The rplay Network Audio System -@end direntry - This file documents the rplay Network Audio System. Copyright (C) 1993-97 Mark Boyns reverted: --- rplay-3.3.2/doc/rplay.hosts.5 +++ rplay-3.3.2.orig/doc/rplay.hosts.5 @@ -34,9 +34,6 @@ .B x the host can play, stop, pause, and continue sounds. This is normally called execute permission. -.TP 3 -.B m -the host can monitor the audio stream written by rplayd to the audio device. .RE .TP "rx" permissions are used when no permissions are specified. @@ -64,12 +61,6 @@ 130.190.*:rx 146.244.234.*:rx using.default.perms.edu - -# -# Hosts which can monitor the audio stream -# -nsa.sdsu.edu:m - .fi .ft R .LP reverted: --- rplay-3.3.2/doc/rplaydsp.1 +++ rplay-3.3.2.orig/doc/rplaydsp.1 @@ -1,34 +0,0 @@ -.TH RPLAYDSP 1 2000/05/02 -.SH NAME -rplaydsp \- intercept data bound for /dev/dsp and route it to rplayd -.SH SYNOPSIS -.B rplaydsp command [command arguments] -.SH DESCRIPTION -rplaydsp allows sound tools to interact with rplayd without having been -coded to do so. Any program that writes data to /dev/dsp should work with -rplaydsp. - -The following environment variables can be used to modify the default -behavior of rplaydsp. - -RPLAY_HOST: By default, rplaydsp talks to the local rplayd. If you need -the output to go somewhere else, then set RPLAY_HOST to the remote -hostname or ip address. - -DEVRPLAY_SOUND: Sounds can be named under rplayd, the default name used by -rplaydsp is 'devrplay'. Use this variable to control the name of the -sound. - -DEVRPLAY_INFO: If your sound isn't the "standard" wav format and speed, -you can set this variable so that rplayd grok the sound. An example value -for a .au file is: - input-info=ulinear8,8000,1,1,little-endian - -DEVRPLAY_OPTS: Set this variable to pass a generic set of RPTP options to -rplayd. - -.SH EXAMPLES -rplaydsp realplayer http://www.example.com/foo.ram -.SH SEE ALSO -.IR rplayd (8), -.IR rplay (1) reverted: --- rplay-3.3.2/doc/RPTP.info +++ rplay-3.3.2.orig/doc/RPTP.info @@ -1,9 +1,5 @@ +This is Info file RPTP.info, produced by Makeinfo-1.63 from the input +file RPTP.texi. -This is RPTP.info, produced by makeinfo version 4.1 from RPTP.texi. - -INFO-DIR-SECTION Development -START-INFO-DIR-ENTRY -* RPTP: (RPTP). The RPTP Protocol. -END-INFO-DIR-ENTRY This file documents RPTP protocol. @@ -574,7 +570,7 @@ info sound=bogus.au +sound=bogus.au size=9574 bits=8 sample-rate=8000 channels=1 + - Command: list [CONNECTIONS|HOSTS|SERVERS|SPOOL|SOUNDS] - - Command: list [connections|hosts|servers|spool|sounds] List the specified server information. `connections' @@ -651,29 +647,17 @@ The `sound' attribute can be preceded by any of the following attributes: `count' - `list-count' - `priority' - `random' - `sample-rate' - `volume' - `input' - `input-bits' - `input-byte-order' - `input-channels' - `input-format' - `input-offset' - `input-sample-rate' This command returns one line containing the `id' attribute. @@ -715,21 +699,15 @@ `message' attribute. The server will probably close the connect so the line may not be sent. + - Command: set NAME[=VALUE] ... - - Command: set name[=value] ... Get and set server attributes. The current set of supported server attributes is: `application' - `level-notify-rate' - `notify' - `notify-rate' - `position-notify-rate' - `priority-threshold' - `volume' This command returns one line containing the server's values for the specified attributes. If an attribute cannot be set, the @@ -874,55 +852,55 @@ * Menu: +* access: Attributes. +* application: Attributes. +* audio-bits: Attributes. +* audio-bufsize: Attributes. +* audio-byte-order: Attributes. +* audio-channels: Attributes. +* audio-device: Attributes. +* audio-format: Attributes. +* audio-offset: Attributes. +* audio-port: Attributes. +* audio-rate: Attributes. +* audio-sample-rate: Attributes. +* audio-volume: Attributes. +* bits: Attributes. +* channels: Attributes. +* count: Attributes. +* error: Attributes. +* event: Attributes. +* format: Attributes. +* host: Attributes. +* id: Attributes. +* idle: Attributes. +* input: Attributes. +* input-bits: Attributes. +* input-byte-order: Attributes. +* input-channels: Attributes. +* input-format: Attributes. +* input-offset: Attributes. +* input-sample-rate: Attributes. +* left: Attributes. +* list-count: Attributes. +* message: Attributes. +* notify: Attributes. +* pause: Attributes. +* play: Attributes. +* position: Attributes. +* priority: Attributes. +* random: Attributes. +* remain: Attributes. +* right: Attributes. +* sample: Attributes. +* sample-rate: Attributes. +* samples: Attributes. +* seconds: Attributes. +* size: Attributes. +* sound: Attributes. +* uptime: Attributes. +* version: Attributes. +* volume: Attributes. -* access: Attributes. -* application: Attributes. -* audio-bits: Attributes. -* audio-bufsize: Attributes. -* audio-byte-order: Attributes. -* audio-channels: Attributes. -* audio-device: Attributes. -* audio-format: Attributes. -* audio-offset: Attributes. -* audio-port: Attributes. -* audio-rate: Attributes. -* audio-sample-rate: Attributes. -* audio-volume: Attributes. -* bits: Attributes. -* channels: Attributes. -* count: Attributes. -* error: Attributes. -* event: Attributes. -* format: Attributes. -* host: Attributes. -* id: Attributes. -* idle: Attributes. -* input: Attributes. -* input-bits: Attributes. -* input-byte-order: Attributes. -* input-channels: Attributes. -* input-format: Attributes. -* input-offset: Attributes. -* input-sample-rate: Attributes. -* left: Attributes. -* list-count: Attributes. -* message: Attributes. -* notify: Attributes. -* pause: Attributes. -* play: Attributes. -* position: Attributes. -* priority: Attributes. -* random: Attributes. -* remain: Attributes. -* right: Attributes. -* sample: Attributes. -* sample-rate: Attributes. -* samples: Attributes. -* seconds: Attributes. -* size: Attributes. -* sound: Attributes. -* uptime: Attributes. -* version: Attributes. -* volume: Attributes.  File: RPTP.info, Node: Event Index, Next: Command Index, Prev: Attribute Index, Up: Top @@ -932,19 +910,19 @@ * Menu: +* all: Events. +* any: Events. +* continue: Events. +* done: Events. +* level: Events. +* none: Events. +* pause: Events. +* play: Events. +* position: Events. +* skip: Events. +* state: Events. +* stop: Events. +* volume: Events. -* all: Events. -* any: Events. -* continue: Events. -* done: Events. -* level: Events. -* none: Events. -* pause: Events. -* play: Events. -* position: Events. -* skip: Events. -* state: Events. -* stop: Events. -* volume: Events.  File: RPTP.info, Node: Command Index, Prev: Event Index, Up: Top @@ -954,41 +932,41 @@ * Menu: +* access: Commands. +* application: Commands. +* continue: Commands. +* done: Commands. +* find: Commands. +* get: Commands. +* help: Commands. +* info: Commands. +* list: Commands. +* pause: Commands. +* play: Commands. +* put: Commands. +* quit: Commands. +* reset: Commands. +* set: Commands. +* skip: Commands. +* status: Commands. +* stop: Commands. +* version: Commands. +* volume: Commands. +* wait: Commands. -* access: Commands. -* application: Commands. -* continue: Commands. -* done: Commands. -* find: Commands. -* get: Commands. -* help: Commands. -* info: Commands. -* list: Commands. -* pause: Commands. -* play: Commands. -* put: Commands. -* quit: Commands. -* reset: Commands. -* set: Commands. -* skip: Commands. -* status: Commands. -* stop: Commands. -* version: Commands. -* volume: Commands. -* wait: Commands.  Tag Table: +Node: Top731 +Node: Overview1170 +Node: Attributes3059 +Node: Events8728 +Node: Event Notification9612 +Node: Commands11672 +Node: Connecting21105 +Node: Timeouts22048 +Node: Attribute Index22548 +Node: Event Index25229 +Node: Command Index25983 -Node: Top824 -Node: Overview1263 -Node: Attributes3152 -Node: Events8821 -Node: Event Notification9705 -Node: Commands11765 -Node: Connecting21216 -Node: Timeouts22159 -Node: Attribute Index22659 -Node: Event Index25389 -Node: Command Index26156  End Tag Table reverted: --- rplay-3.3.2/doc/RPLAY.texi +++ rplay-3.3.2.orig/doc/RPLAY.texi @@ -10,11 +10,6 @@ @ifinfo -@dircategory Development -@direntry -* RPLAY: (RPLAY). The RPLAY Protocol. -@end direntry - This file documents RPLAY protocol. Copyright (C) 1995 Mark Boyns reverted: --- rplay-3.3.2/doc/RPLAY.info +++ rplay-3.3.2.orig/doc/RPLAY.info @@ -1,9 +1,5 @@ +This is Info file RPLAY.info, produced by Makeinfo-1.63 from the input +file RPLAY.texi. -This is RPLAY.info, produced by makeinfo version 4.1 from RPLAY.texi. - -INFO-DIR-SECTION Development -START-INFO-DIR-ENTRY -* RPLAY: (RPLAY). The RPLAY Protocol. -END-INFO-DIR-ENTRY This file documents RPLAY protocol. @@ -45,7 +41,7 @@ The `RPLAY' protocol uses simple binary UDP packets to control the audio server. Communication between the client and server is one-way - +packets are sent to the server and the server *never* replies. -packets are sent to the server and the server _never_ replies.  File: RPLAY.info, Node: Commands, Next: Attributes, Prev: Overview, Up: Top @@ -144,8 +140,8 @@ ****************** RPLAY packets always begin with a RPLAY_ID byte followed by a RPLAY +command. (*note Commands::.) The remaining contents is a list of +attributes (*note Attributes::.) and their corresponding values. The -command. (*note Commands::) The remaining contents is a list of -attributes (*note Attributes::) and their corresponding values. The packet is terminated with the RPLAY_NULL attribute. A packet will never contain an attribute that is set to a default @@ -165,10 +161,10 @@  Tag Table: +Node: Top734 +Node: Overview1124 +Node: Commands1425 +Node: Attributes2252 +Node: Packet description4129 -Node: Top830 -Node: Overview1220 -Node: Commands1521 -Node: Attributes2348 -Node: Packet description4225  End Tag Table reverted: --- rplay-3.3.2/doc/rplay.info +++ rplay-3.3.2.orig/doc/rplay.info @@ -1,9 +1,5 @@ +This is Info file rplay.info, produced by Makeinfo version 1.67 from +the input file rplay.texi. -This is rplay.info, produced by makeinfo version 4.1 from rplay.texi. - -INFO-DIR-SECTION Development -START-INFO-DIR-ENTRY -* rplay: (rplay). The rplay Network Audio System -END-INFO-DIR-ENTRY This file documents the rplay Network Audio System. @@ -160,11 +156,11 @@  Tag Table: +Node: Top761 +Node: Overview1247 +Node: rplayd2983 +Node: rplay4640 +Node: rptp5094 +Node: xrplay5413 -Node: Top860 -Node: Overview1346 -Node: rplayd3082 -Node: rplay4739 -Node: rptp5193 -Node: xrplay5512  End Tag Table reverted: --- rplay-3.3.2/doc/RPTP.texi +++ rplay-3.3.2.orig/doc/RPTP.texi @@ -11,11 +11,6 @@ @ifinfo -@dircategory Development -@direntry -* RPTP: (RPTP). The RPTP Protocol. -@end direntry - This file documents RPTP protocol. Copyright (C) 1995 Mark Boyns reverted: --- rplay-3.3.2/doc/Makefile.in +++ rplay-3.3.2.orig/doc/Makefile.in @@ -41,7 +41,6 @@ install: all -$(MKINSTALLDIRS) $(mandir)/man1 $(mandir)/man5 $(mandir)/man8 $(infodir) -$(INSTALL_DATA) rplay.1 $(mandir)/man1 - -$(INSTALL_DATA) rplaydsp.1 $(mandir)/man1 -$(INSTALL_DATA) rplayd.8 $(mandir)/man8 -$(INSTALL_DATA) rptp.1 $(mandir)/man1 -$(INSTALL_DATA) rplay.conf.5 $(mandir)/man5 reverted: --- rplay-3.3.2/configure.in +++ rplay-3.3.2.orig/configure.in @@ -6,8 +6,6 @@ AC_INIT(rplayd/rplayd.c) AC_CONFIG_HEADER(include/config.h) -BUILD_TARGETS="include lib adpcm" - dnl dnl Figure what version of rplay this is. dnl @@ -60,7 +58,7 @@ AC_HEADER_STDC AC_HEADER_TIME dnl AC_PATH_XTRA +AC_CHECK_HEADERS(fcntl.h sys/file.h sys/ioctl.h sys/time.h stdlib.h unistd.h memory.h string.h strings.h utime.h limits.h gsm.h gsm/gsm.h rxposix.h rx/rxposix.h) -AC_CHECK_HEADERS(fcntl.h sys/file.h sys/ioctl.h sys/time.h stdlib.h unistd.h memory.h string.h strings.h utime.h limits.h gsm.h gsm/gsm.h regex.h rxposix.h rx/rxposix.h) AC_HEADER_SYS_WAIT dnl Check for typedefs, structures, and compiler characteristics. @@ -76,31 +74,28 @@ AC_CHECK_LIB(socket, socket, [LIBS="$LIBS -lsocket"]) AC_CHECK_LIB(nsl, t_accept, [LIBS="$LIBS -lnsl"]) +AC_CHECK_LIB(readline, readline, [RL_LIBS="-lreadline"]) -AC_CHECK_LIB(readline, readline, - [AC_DEFINE(HAVE_LIBREADLINE) RL_LIBS="-lreadline"]) AC_SUBST(RL_LIBS) +AC_CHECK_LIB(gsm, gsm_decode, [HAVE_GSM="yes"]) +if test "$HAVE_GSM" = "yes"; then + GSM_LIBS="-lgsm" + GSM_INCS="" +else + GSM_LIBS="-L../gsm -lgsm" + GSM_INCS="-I\${srcdir}/../gsm" +fi -AC_CHECK_LIB(gsm, gsm_decode, - [GSM_LIBS="-lgsm"; GSM_INCS=""], - [ - GSM_LIBS="-L../gsm -lgsm"; GSM_INCS="-I\${srcdir}/../gsm" - BUILD_TARGETS="$BUILD_TARGETS gsm" - ]) AC_SUBST(GSM_LIBS) AC_SUBST(GSM_INCS) +AC_CHECK_LIB(rx, regncomp, [HAVE_RX="yes"]) +if test "$HAVE_RX" = "yes"; then + RX_LIBS="-lrx" + RX_INCS="" +else + RX_LIBS="-L../rx -lrx" + RX_INCS="-I\${srcdir}/../rx" +fi -dnl check for regcomp in libc, librx, or build rx -AC_CHECK_FUNCS(regcomp, - [], - [ - AC_CHECK_LIB(rx, regcomp, - [RX_LIBS="-lrx"; RX_INCS=""], - [ - RX_LIBS="-L../rx -lrx"; RX_INCS="-I\${srcdir}/../rx" - BUILD_TARGETS="$BUILD_TARGETS rx" - AC_CONFIG_SUBDIRS(rx) - ]) - ]) AC_SUBST(RX_LIBS) AC_SUBST(RX_INCS) @@ -207,7 +202,7 @@ AC_MSG_CHECKING(for FreeBSD) AC_EGREP_CPP(yes, [ +#ifdef __FreeBSD__ -#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) yes #endif ], is_freebsd=yes, is_freebsd=no) @@ -226,9 +221,12 @@ dnl if test -z "$RPLAY_TARGET"; then echo 'Sorry, I could not figure out what type of system you have.' + echo -n 'Would you like to try the generic configuration? ' + read ans + case "$ans" in + y|Y|yes|Yes|YES|sure|ok|okay) RPLAY_TARGET="generic" ;; + *) echo configuration aborted; exit 1; + esac - echo 'Will try the generic configuration.' - sleep 5 - RPLAY_TARGET="generic" fi echo "using $RPLAY_TARGET configuration" @@ -252,11 +250,20 @@ fi AC_SUBST(LIBS) +BUILD_TARGETS="include lib adpcm" +if test "$HAVE_RX" != "yes"; then + BUILD_TARGETS="$BUILD_TARGETS rx" + AC_CONFIG_SUBDIRS(rx) +fi +if test "$HAVE_GSM" != "yes"; then + BUILD_TARGETS="$BUILD_TARGETS gsm" +fi + BUILD_TARGETS="$BUILD_TARGETS librplay rplayd rplay rptp doc" +if test $RPLAY_TARGET = "oss"; then + BUILD_TARGETS="$BUILD_TARGETS devrplay" +fi -case "$RPLAY_TARGET" in - oss|FreeBSD|generic) BUILD_TARGETS="$BUILD_TARGETS devrplay";; -esac AC_SUBST(BUILD_TARGETS) reverted: --- rplay-3.3.2/rptp/rptp.c +++ rplay-3.3.2.orig/rptp/rptp.c @@ -532,8 +532,6 @@ printf("help Display help information.\n"); printf("info Display sound information.\n"); printf("list Display various server information.\n"); - printf("monitor Monitor the audio output of rplayd.\n"); - printf(" Requires \"m\" permission in rplay.hosts\n"); printf("open Connect to a server.\n"); printf("pause Pause sounds that are playing.\n"); printf("play Play sounds\n"); @@ -785,7 +783,7 @@ } fwrite(rptp_buf, 1, n, fp); size -= n; + - sprintf(line, "\r%s %d/%d %d%%", filename, total_size - size, total_size, (int)(((float)(total_size-size)/total_size)*100)); @@ -1020,7 +1018,7 @@ char line[80]; int n, size; int sample_rate, precision, channels, sample_size; + - if (!connected()) { return; diff -u rplay-3.3.2/debian/control rplay-3.3.2/debian/control --- rplay-3.3.2/debian/control +++ rplay-3.3.2/debian/control @@ -1,16 +1,17 @@ Source: rplay Section: sound Priority: optional -Maintainer: lantz moore -Standards-Version: 3.6.1.1 -Build-Depends: libgsm1-dev, libreadline5-dev, debhelper (>> 4.0.0) +Maintainer: Debian QA Group +Standards-Version: 3.8.0 +Build-Depends: libgsm1-dev, libreadline5-dev, debhelper (>> 4.0.0), dpatch +Homepage: http://rplay.doit.org/ Package: rplay-client Architecture: any Depends: ${shlibs:Depends} Conflicts: rplay (<< 3.3.2-9) Replaces: rplay (<< 3.3.2-9) -Description: The basic rplay clients +Description: rplay network audio system - basic clients This package contains the basic rplay clients (rplay, rptp). The clients are used to play sounds on the local host or remote systems. . @@ -28,7 +29,7 @@ Conflicts: rplay (<< 3.3.2-9) Replaces: rplay (<< 3.3.2-9) Suggests: mpg123, vorbis-tools -Description: The rplay network audio system server +Description: rplay network audio system - server This package contains the rplay server. The rplay server allows sounds to be played on the system. . @@ -46,7 +47,7 @@ Conflicts: rplay (<< 3.3.2-9) Replaces: rplay (<< 3.3.2-9) Section: libs -Description: Shared libraries for the rplay network audio system +Description: rplay network audio system - shared libraries Contains shared libraries for the rplay network audio system. . RPlay allows sounds to be played to and from local and remote Unix @@ -61,9 +62,9 @@ Architecture: any Conflicts: rplay (<< 3.3.2-9) Replaces: rplay (<< 3.3.2-9) -Depends: libc6-dev | libc-dev, librplay3 (= ${Source-Version}) -Section: devel -Description: Development libraries for the rplay network audio system +Depends: libc6-dev | libc-dev, librplay3 (= ${binary:Version}) +Section: libdevel +Description: rplay network audio system - development libraries Contains header files and development libraries for the rplay network audio system. . @@ -80,7 +81,7 @@ Depends: ${shlibs:Depends}, rplay-perl, ${perl:Depends} Conflicts: rplay (<< 3.3.2-9) Replaces: rplay (<< 3.3.2-9) -Description: Contributed binaries for the rplay network audio system +Description: rplay network audio system - contributed binaries Contains mailsounds and Mailsounds each of which can be used to play sounds on a system when new mail arrives. . @@ -97,7 +98,8 @@ Conflicts: rplay (<< 3.3.2-9) Replaces: rplay (<< 3.3.2-9) Depends: ${perl:Depends} -Description: Perl modules for the rplay network audio system +Section: perl +Description: rplay network audio system - perl modules Contains perl modules which aid in creating rplay-aware perl scripts. . RPlay allows sounds to be played to and from local and remote Unix diff -u rplay-3.3.2/debian/librplay3.docs rplay-3.3.2/debian/librplay3.docs --- rplay-3.3.2/debian/librplay3.docs +++ rplay-3.3.2/debian/librplay3.docs @@ -1,4 +1,3 @@ -changelog NEWS PORTING README diff -u rplay-3.3.2/debian/copyright rplay-3.3.2/debian/copyright --- rplay-3.3.2/debian/copyright +++ rplay-3.3.2/debian/copyright @@ -5,19 +5,17 @@ -RPlay was written by Mark Boyns . +Upstream Author: -Copyright (C) 1993-2000 Mark R. Boyns + Mark Boyns . -This program is free software; you may redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2, or (at your option) -any later version. - -This is distributed in the hope that it will be useful, but without -any warranty; without even the implied warranty of merchantability or -fitness for a particular purpose. See the GNU General Public License -for more details. - -A copy of the GNU General Public License is available as -/usr/share/common-licenses/GPL in the Debian GNU/Linux distribution or on the -World Wide Web at http://www.gnu.org/copyleft/gpl.html. You can also -obtain it by writing to the Free Software Foundation, Inc., 59 Temple -Place - Suite 330, Boston, MA 02111-1307, USA. +Copyright: + + Copyright (C) 1993-2000 Mark R. Boyns + +License: + + This program is free software; you may redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + +On a Debian system the complete text of the GNU General Public License +v2 can be found in the file `/usr/share/common-licenses/GPL-2' reverted: --- rplay-3.3.2/debian/rplay-contrib.postinst +++ rplay-3.3.2.orig/debian/rplay-contrib.postinst @@ -1,3 +0,0 @@ -#!/bin/sh -e - -#DEBHELPER# diff -u rplay-3.3.2/debian/rules rplay-3.3.2/debian/rules --- rplay-3.3.2/debian/rules +++ rplay-3.3.2/debian/rules @@ -2,29 +2,35 @@ # Made with the aid of debmake, by Christoph Lameter, # based on the sample debian/rules file for GNU hello by Ian Jackson. +include /usr/share/dpatch/dpatch.make + SHELL=/bin/bash i = $(shell pwd)/debian/tmp b = $(shell pwd)/debian/build build: build-stamp -build-stamp: +build-stamp: patch-stamp dh_testdir + ./configure --prefix=/usr --sysconfdir=/etc/rplay --without-x \ --enable-rplayd-user=nobody --enable-rplayd-group=audio - make CFLAGS="-O2 -D_REENTRANT" - (cd contrib/mailsound; make CFLAGS="-O2 -g") + + $(MAKE) CFLAGS="-O2 -D_REENTRANT" + + (cd contrib/mailsound; $(MAKE) CFLAGS="-O2 -g") touch build-stamp -clean: +clean: unpatch dh_testdir dh_testroot - -rm -f build-stamp - -[ ! -f Makefile ] || $(MAKE) distclean + rm -f build-stamp - -rm -f changelog contrib/mailsound/mailsound{,.o} \ + [ ! -f Makefile ] || $(MAKE) distclean + + rm -f contrib/mailsound/mailsound{,.o} \ gsm/Makefile rx/{config.*,Makefile} dh_clean @@ -35,10 +41,11 @@ dh_testroot dh_clean -k - make install prefix=$(i)/usr \ + $(MAKE) install prefix=$(i)/usr \ infodir=$(i)/usr/share/info \ mandir=$(i)/usr/share/man - install -s contrib/mailsound/mailsound $(i)/usr/bin + + install contrib/mailsound/mailsound $(i)/usr/bin mkdir -p $(i)/usr/share/perl5 install -m 664 perl/{RPlay.pm,rplay.ph,RPTP.pm} $(i)/usr/share/perl5 install perl/Mailsound $(i)/usr/bin @@ -47,10 +54,7 @@ install -d $(i)/etc/rplay install -m 644 etc/rplay.{conf,helpers,hosts,servers} $(i)/etc/rplay - cp ChangeLog changelog - dh_movefiles - dh_installinit -prplay-server --init-script=rplay -- defaults 99 10 binary: binary-indep binary-arch @@ -59,19 +63,13 @@ binary-arch: build install dh_testdir dh_testroot -# dh_installdebconf dh_installdocs dh_installexamples dh_installmenu -# dh_installlogrotate -# dh_installemacsen -# dh_installpam -# dh_installmime -# dh_installinit -# dh_installcron + dh_installinit -prplay-server --init-script=rplay -- defaults 99 10 dh_installman dh_installinfo - dh_installchangelogs + dh_installchangelogs ChangeLog dh_strip dh_link dh_compress diff -u rplay-3.3.2/debian/changelog rplay-3.3.2/debian/changelog --- rplay-3.3.2/debian/changelog +++ rplay-3.3.2/debian/changelog @@ -1,3 +1,48 @@ +rplay (3.3.2-12) unstable; urgency=low + + * QA upload. + * Acknowledging NMU: thanks to Peter Eisentraut who took care + * debian/control + - set QA group as maintainer + - bump Standards-Version to 3.8.0 + - added Homepage field + - added dpatch build-dep + - replaced ${Source-Version} with ${binary:Version} in librplay3-dev dep + - section fixed for librplay3-dev (libdevel) + - set section: perl for rplay-perl + - short descriptions re-worded + * debian/watch + - added + * debian/rules + - added dpatch stuff + - removed '-s' option from install call; thanks to Julien Danjou for the + report; Closes: #437921 + - removed '-' in front of clean target commands + - removed commented dh_* call + - installed upstream changelog directly (passing the filename to + dh_installchangelog) + - make call are now made with $(MAKE) + - init file installation moved from install to binary-arch target + * debian/patches/01_previous_changes.dpatch + - added to remove direct upstream code changes + * debian/copyright + - clearly separated copyright and license notices + - indented copyright, license and upstream author with 4 spaces + - reformat the location of a Debian system of GPLv2 license text + - left only the caption of GPLv2 license text + * debian/rplay-contrib.postinst + - removed since empty + * debian/rplay-client.postrm + - removed since empty + * debian/patches/10_fix_manpages.dpatch + - added to fix hyphen-used-as-minus-sign lintian warnings + * debian/rplay-server.rplay + - applied the patch from Christian Perrier; thanks to him; Closes: #389067 + * debian/librplay3.docs + - removed installation of changelog, we do it in debian/rules + + -- Sandro Tosi Sun, 17 Aug 2008 23:58:00 +0200 + rplay (3.3.2-11.1) unstable; urgency=low * Non-maintainer upload. reverted: --- rplay-3.3.2/debian/rplay-client.postrm +++ rplay-3.3.2.orig/debian/rplay-client.postrm @@ -1,4 +0,0 @@ -#!/bin/sh -e - -#DEBHELPER# - diff -u rplay-3.3.2/debian/rplay-server.rplay rplay-3.3.2/debian/rplay-server.rplay --- rplay-3.3.2/debian/rplay-server.rplay +++ rplay-3.3.2/debian/rplay-server.rplay @@ -13,21 +13,29 @@ test -x /usr/sbin/rplayd || exit 0 +. /lib/lsb/init-functions + if egrep "^rplay" /etc/inetd.conf > /dev/null; then - echo "RPlayd is currently started from inetd" + log_warning_msg "RPlayd is currently started from inetd" exit 0 fi case "$1" in -start) echo -n "Starting rplay server: rplayd" - start-stop-daemon --start --quiet \ - --exec /usr/sbin/rplayd > /dev/null 2>&1 - echo "." +start) log_begin_msg "Starting rplay server" "rplayd" + if start-stop-daemon --start --quiet \ + --exec /usr/sbin/rplayd > /dev/null 2>&1; then + log_end_msg 0 + else + log_end_msg 1 + fi ;; -stop) echo -n "Stopping rplay server: rplayd" - start-stop-daemon --stop --quiet --exec /usr/sbin/rplayd - echo "." +stop) log_begin_msg "Stopping rplay server" "rplayd" + if start-stop-daemon --stop --quiet --exec /usr/sbin/rplayd; then + log_end_msg 0 + else + log_end_msg 1 + fi ;; reload|force-reload) @@ -35,15 +43,18 @@ ;; restart) - echo -n "Restarting rplay server: rplayd" + log_begin_msg "Restarting rplay server" "rplayd" start-stop-daemon --stop --quiet --exec /usr/sbin/rplayd - start-stop-daemon --start --quiet \ - --exec /usr/sbin/rplayd > /dev/null 2>&1 - echo "." + if start-stop-daemon --start --quiet \ + --exec /usr/sbin/rplayd > /dev/null 2>&1; then + log_end_msg 0 + else + log_end_msg 1 + fi ;; *) - echo "Usage: /etc/init.d/rplay {start|stop|reload}" >&2 + log_failure_msg "Usage: /etc/init.d/rplay {start|stop|reload}" exit 1 ;; esac reverted: --- rplay-3.3.2/include/config.h.in +++ rplay-3.3.2.orig/include/config.h.in @@ -40,7 +40,7 @@ /* * Use host authentication. */ +#define AUTH -#define AUTH /* * Support rplay 2.0 packets. If you define this then you @@ -75,7 +75,7 @@ * 1 - System and rplayd errors. * 2 - + RPTP connections, get, put, find. * 3 - + play, stop, pause, continue, etc. + * 4 - + Debug messages. - * 4 - + Debug messages. * * Note that the logging level can also be specified with * rplayd command line options. This is only used if @@ -192,7 +192,6 @@ #undef HAVE_LIBREADLINE #undef HAVE_RANDOM #undef HAVE_SRANDOM -#undef HAVE_REGCOMP #undef HAVE_STDC_HEADERS #undef HAVE_MEMORY_H @@ -208,7 +207,6 @@ #undef HAVE_GSM_H #undef HAVE_GSM_GSM_H -#undef HAVE_REGEX_H #undef HAVE_RXPOSIX_H #undef HAVE_RX_RXPOSIX_H reverted: --- rplay-3.3.2/etc/rplay.hosts +++ rplay-3.3.2.orig/etc/rplay.hosts @@ -1,6 +1,5 @@ +# Sample rplay.hosts +# +# this file describes what machines can read from or write to this server +# *:rwx +# would allow anyone to read or write to this server. -# default rplay.hosts -# see the rplay.hosts(5) for details on the format and meaning of this -# file - -# give the localhost the default permissions -localhost reverted: --- rplay-3.3.2/etc/rplay.helpers +++ rplay-3.3.2.orig/etc/rplay.helpers @@ -3,6 +3,7 @@ # # ## MPEG +\.mp[1-3]$ linear16,44100,16,2,little-endian /usr/bin/mpg123 --stdout --quiet --rate 44100 --stereo - -\.mp[1-3]$ linear16,44100,16,2,little-endian /usr/bin/mpg123 --stdout --quiet --rate 44100 --stereo - +## MODS +#\.\(669\|alm\|amd\|far\|mod\|mtm\|okt\|ptm\|rad\|s3m\|stm\|wow\|xm\)$ linear16,44100,16,2,little-endian /usr/local/bin/xmp --stereo --little-endian -b 16 -f 44100 --stdout --nocmd /dev/fd/0 -\.ogg$ linear16,44100,16,2,little-endian /usr/bin/ogg123 -q -d raw -o byteorder:little -f - /dev/fd/0 reverted: --- rplay-3.3.2/perl/RPlay.pm +++ rplay-3.3.2.orig/perl/RPlay.pm @@ -44,8 +44,8 @@ my ($that_host, $that_port) = @_; my ($pat, $name, $aliases, $proto, $port, $udp); my (@bytes, $addrtype, $length, $old); + my ($that, $that_addr, $that_addr); + my ($this, $this_addr, $this_addr); - my ($that, $that_addr); - my ($this, $this_addr); $sockaddr = 'S n a4 x8'; reverted: --- rplay-3.3.2/librplay/Makefile.in +++ rplay-3.3.2.orig/librplay/Makefile.in @@ -9,7 +9,7 @@ MKINSTALLDIRS= @srcdir@/../mkinstalldirs CPPFLAGS= $(CC_OPTIONS) -I. -I../include -I@srcdir@/../include @DEFS@ +LDFLAGS= $(LD_OPTIONS) -shared @LDFLAGS@ -LDFLAGS= $(LD_OPTIONS) -shared -Xlinker -soname -Xlinker librplay.so.3 @LDFLAGS@ .c.o: $(CC) -c $(CPPFLAGS) $(CFLAGS) $< @@ -33,10 +33,7 @@ $(RANLIB) $@ librplay.so: $(SHAREDOBJS) + $(CC) -o $@ $(SHAREDOBJS) $(LDFLAGS) - $(CC) -o $@.@RPLAY_VERSION@ $(SHAREDOBJS) $(LDFLAGS) - ln -fs $@.@RPLAY_VERSION@ $@.3 - ln -fs $@.@RPLAY_VERSION@ $@ - # # For HP-UX comment above and uncomment below. @@ -53,16 +50,14 @@ install: all $(MKINSTALLDIRS) $(libdir) $(INSTALL_DATA) $(TARGET) $(libdir) + $(INSTALL_DATA) librplay.so $(libdir) - $(INSTALL_DATA) librplay.so.@RPLAY_VERSION@ $(libdir) - (cd $(libdir) && ln -s librplay.so.@RPLAY_VERSION@ librplay.so.3) - (cd $(libdir) && ln -s librplay.so.@RPLAY_VERSION@ librplay.so) uninstall: $(RM) $(libdir)/$(TARGET) $(RM) $(libdir)/librplay.so clean: + $(RM) $(OBJS) $(SHAREDOBJS) $(TARGET) librplay.so a.out core *~ *.bak *.orig TAGS - $(RM) $(OBJS) $(SHAREDOBJS) $(TARGET) librplay.so* a.out core *~ *.bak *.orig TAGS distclean: clean $(RM) Makefile only in patch2: unchanged: --- rplay-3.3.2.orig/debian/watch +++ rplay-3.3.2/debian/watch @@ -0,0 +1,2 @@ +version=3 +http://rplay.doit.org/dist/rplay-(.*)\.tar\.gz only in patch2: unchanged: --- rplay-3.3.2.orig/debian/patches/00list +++ rplay-3.3.2/debian/patches/00list @@ -0,0 +1,2 @@ +01_previous_changes +10_fix_manpages only in patch2: unchanged: --- rplay-3.3.2.orig/debian/patches/10_fix_manpages.dpatch +++ rplay-3.3.2/debian/patches/10_fix_manpages.dpatch @@ -0,0 +1,147 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 10_fix_manpages.dpatch by Sandro Tosi +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: Added to fix hyphen-used-as-minus-sign lintian warning + +@DPATCH@ +diff -urNad rplay-3.3.2~/contrib/mailsound/mailsound.1 rplay-3.3.2/contrib/mailsound/mailsound.1 +--- rplay-3.3.2~/contrib/mailsound/mailsound.1 2008-08-17 20:40:45.000000000 +0200 ++++ rplay-3.3.2/contrib/mailsound/mailsound.1 2008-08-17 20:40:48.177590534 +0200 +@@ -3,7 +3,7 @@ + mailsound \- play sounds when mail is received + .SH SYNOPSIS + .B mailsound +-[-hszZvrd] soundname \.\.\. ++[\-hszZvrd] soundname \.\.\. + .SH DESCRIPTION + mailsound allows a user to play sounds when new mail arrives. + It reads a mail message from stdin and uses Mark Boyns' +@@ -89,10 +89,10 @@ + Here is a sample $HOME/.mailsounds file: + .IP + .nf +-Andrew.* -r Passing_Train riot arrp flinstones ++Andrew.* \-r Passing_Train riot arrp flinstones + root.* out! +-daemon.* -v 220 sci_fi_fun +-MAILER.* -S 1000,10000 cuckoo pig Oomph ++daemon.* \-v 220 sci_fi_fun ++MAILER.* \-S 1000,10000 cuckoo pig Oomph + *. pigs + .fi + .SH FILES +diff -urNad rplay-3.3.2~/doc/rplay.1 rplay-3.3.2/doc/rplay.1 +--- rplay-3.3.2~/doc/rplay.1 2008-08-17 20:40:45.000000000 +0200 ++++ rplay-3.3.2/doc/rplay.1 2008-08-17 20:40:48.177590534 +0200 +@@ -43,8 +43,8 @@ + Examples: ulaw,8000,8,1,big-endian,0 + gsm,8000 + Shorthand info is provided for Sun's audio devices using the +-following options: --info-amd, --info-dbri, --info-cs4231. +-There's also: --info-ulaw and --info-gsm. ++following options: \-\-info\-amd, \-\-info\-dbri, \-\-info\-cs4231. ++There's also: \-\-info\-ulaw and \-\-info\-gsm. + .TP + .I "\-p, \-\-pause" + Pause sounds. +@@ -70,7 +70,7 @@ + .TP + .I "\-\-rptp, \-\-RPTP" + Force the use of the RPTP protocol. +-See `--rplay' for more information about protocols. ++See `\-\-rplay' for more information about protocols. + .TP + .I "\-R N, \-\-sample\-rate=N" + Play sounds at sample rate N, default = 0. +diff -urNad rplay-3.3.2~/doc/rplay.helpers.5 rplay-3.3.2/doc/rplay.helpers.5 +--- rplay-3.3.2~/doc/rplay.helpers.5 2008-08-17 20:40:45.000000000 +0200 ++++ rplay-3.3.2/doc/rplay.helpers.5 2008-08-17 20:40:48.177590534 +0200 +@@ -15,7 +15,7 @@ + .IP + + .SH EXAMPLE +- .*mp3$ linear16,44100,16,2,little-endian /usr/bin/mpg123 -s -q -r 44100 --stereo - ++ .*mp3$ linear16,44100,16,2,little\-endian /usr/bin/mpg123 \-s \-q \-r 44100 \-\-stereo \- + .SH FILES + .B /usr/local/etc/rplay.helpers + .SH "SEE ALSO" +diff -urNad rplay-3.3.2~/doc/rplayd.8 rplay-3.3.2/doc/rplayd.8 +--- rplay-3.3.2~/doc/rplayd.8 2008-08-17 20:40:45.000000000 +0200 ++++ rplay-3.3.2/doc/rplayd.8 2008-08-17 20:40:48.177590534 +0200 +@@ -68,9 +68,9 @@ + Close /dev/dsp after N idle seconds, disabled with 0 (5). + .TP + .I "\-F N, \-\-audio_flush=N" +-Flush /dev/dsp after N idle seconds, disabled with 0 (-1). +-N = -1 : flush when spool is empty. +-N = -2 : flush after each audio write. (not recommended) ++Flush /dev/dsp after N idle seconds, disabled with 0 (\-1). ++N = \-1 : flush when spool is empty. ++N = \-2 : flush after each audio write. (not recommended) + N should be <= to the audio close timeout. + .TP + .I "\-\-audio\-format=FORMAT" +@@ -88,13 +88,13 @@ + INFO is of the form: format,sample-rate,bits,channels + Examples: `ulaw,8000,8,1' and `linear-16,44100,16,2' + Also provided are: +- --audio-info-ulaw, --info-ulaw -> ulaw,8000,8,1 ++ \-\-audio\-info\-ulaw, \-\-info\-ulaw \-> ulaw,8000,8,1 + .TP + .I "\-\-audio\-match" + Attempt to match the sample rate of the audio device with + the sample rate of the current sound when no other sounds +-are playing. If the match fails, --audio-sample-rate is used. +-This option overrides --audio-bufsize. ++are playing. If the match fails, \-\-audio\-sample\-rate is used. ++This option overrides \-\-audio\-bufsize. + .TP + .I "\-\-audio\-port=PORT[,PORT...]" + Output audio to the specified audio port(s). +@@ -184,11 +184,11 @@ + .TP + .I "\-\-port=PORT, \-\-rplay\-port=PORT" + Use PORT as the RPLAY/UDP port. (5555) +-(--other-rplay-port may also be available) ++(\-\-other\-rplay\-port may also be available) + .TP + .I "\-\-rptp\-port=PORT" + Use PORT as the RPTP/TCP port. (5556) +-(--other-rptp-port may also be available) ++(\-\-other\-rptp\-port may also be available) + .TP + .I "\-S FILE, \-\-servers=FILE" + Use FILE for rplay.servers (/etc/rplay/rplay.servers). +diff -urNad rplay-3.3.2~/doc/rptp.1 rplay-3.3.2/doc/rptp.1 +--- rplay-3.3.2~/doc/rptp.1 1998-07-15 00:35:23.000000000 +0200 ++++ rplay-3.3.2/doc/rptp.1 2008-08-17 20:41:54.717382418 +0200 +@@ -9,7 +9,6 @@ + report its status. See the output of the + .B rptp help + command for a list of available commands. +-.OPTIONS + .SH SEE ALSO + .IR rplayd (8), + .IR rplay (1) +diff -urNad rplay-3.3.2~/perl/Mailsound.1 rplay-3.3.2/perl/Mailsound.1 +--- rplay-3.3.2~/perl/Mailsound.1 2008-08-17 20:40:45.000000000 +0200 ++++ rplay-3.3.2/perl/Mailsound.1 2008-08-17 20:40:48.177590534 +0200 +@@ -21,7 +21,7 @@ + file, use something like: + .nf + +- \\yourusername, |"/usr/local/bin/Mailsound -h soundhostname" ++ \\yourusername, |"/usr/local/bin/Mailsound \-h soundhostname" + + .fi + For +@@ -30,7 +30,7 @@ + .nf + + :0 ic +- | /usr/local/bin/Mailsound -h doctor:doit ++ | /usr/local/bin/Mailsound \-h doctor:doit + + .fi + .SH OPTIONS only in patch2: unchanged: --- rplay-3.3.2.orig/debian/patches/01_previous_changes.dpatch +++ rplay-3.3.2/debian/patches/01_previous_changes.dpatch @@ -0,0 +1,2817 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 01_previous_changes.dpatch by Sandro Tosi +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: New patch generated from rplay 3.3.2-12 diff.gz + +@DPATCH@ + +--- rplay-3.3.2.orig/configure ++++ rplay-3.3.2/configure +@@ -527,6 +527,8 @@ + + + ++BUILD_TARGETS="include lib adpcm" ++ + + export srcdir + RPLAY_VERSION=`$srcdir/version` +@@ -544,7 +546,7 @@ + # Extract the first word of "gcc", so it can be a program name with args. + set dummy gcc; ac_word=$2 + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +-echo "configure:548: checking for $ac_word" >&5 ++echo "configure:550: checking for $ac_word" >&5 + if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -574,7 +576,7 @@ + # Extract the first word of "cc", so it can be a program name with args. + set dummy cc; ac_word=$2 + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +-echo "configure:578: checking for $ac_word" >&5 ++echo "configure:580: checking for $ac_word" >&5 + if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -625,7 +627,7 @@ + # Extract the first word of "cl", so it can be a program name with args. + set dummy cl; ac_word=$2 + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +-echo "configure:629: checking for $ac_word" >&5 ++echo "configure:631: checking for $ac_word" >&5 + if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -657,7 +659,7 @@ + fi + + echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 +-echo "configure:661: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 ++echo "configure:663: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 + + ac_ext=c + # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. +@@ -668,12 +670,12 @@ + + cat > conftest.$ac_ext << EOF + +-#line 672 "configure" ++#line 674 "configure" + #include "confdefs.h" + + main(){return(0);} + EOF +-if { (eval echo configure:677: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:679: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + ac_cv_prog_cc_works=yes + # If we can't run a trivial program, we are probably using a cross compiler. + if (./conftest; exit) 2>/dev/null; then +@@ -699,12 +701,12 @@ + { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } + fi + echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 +-echo "configure:703: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 ++echo "configure:705: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 + echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 + cross_compiling=$ac_cv_prog_cc_cross + + echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 +-echo "configure:708: checking whether we are using GNU C" >&5 ++echo "configure:710: checking whether we are using GNU C" >&5 + if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -713,7 +715,7 @@ + yes; + #endif + EOF +-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:717: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ++if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:719: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then + ac_cv_prog_gcc=yes + else + ac_cv_prog_gcc=no +@@ -732,7 +734,7 @@ + ac_save_CFLAGS="$CFLAGS" + CFLAGS= + echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 +-echo "configure:736: checking whether ${CC-cc} accepts -g" >&5 ++echo "configure:738: checking whether ${CC-cc} accepts -g" >&5 + if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -797,7 +799,7 @@ + + + echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6 +-echo "configure:801: checking for POSIXized ISC" >&5 ++echo "configure:803: checking for POSIXized ISC" >&5 + if test -d /etc/conf/kconfig.d && + grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1 + then +@@ -818,7 +820,7 @@ + fi + + echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 +-echo "configure:822: checking how to run the C preprocessor" >&5 ++echo "configure:824: checking how to run the C preprocessor" >&5 + # On Suns, sometimes $CPP names a directory. + if test -n "$CPP" && test -d "$CPP"; then + CPP= +@@ -833,13 +835,13 @@ + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. + cat > conftest.$ac_ext < + Syntax Error + EOF + ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +-{ (eval echo configure:843: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ++{ (eval echo configure:845: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } + ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` + if test -z "$ac_err"; then + : +@@ -850,13 +852,13 @@ + rm -rf conftest* + CPP="${CC-cc} -E -traditional-cpp" + cat > conftest.$ac_ext < + Syntax Error + EOF + ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +-{ (eval echo configure:860: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ++{ (eval echo configure:862: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } + ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` + if test -z "$ac_err"; then + : +@@ -867,13 +869,13 @@ + rm -rf conftest* + CPP="${CC-cc} -nologo -E" + cat > conftest.$ac_ext < + Syntax Error + EOF + ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +-{ (eval echo configure:877: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ++{ (eval echo configure:879: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } + ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` + if test -z "$ac_err"; then + : +@@ -928,7 +930,7 @@ + # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" + # ./install, which can be erroneously created by make from ./install.sh. + echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 +-echo "configure:932: checking for a BSD compatible install" >&5 ++echo "configure:934: checking for a BSD compatible install" >&5 + if test -z "$INSTALL"; then + if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -981,7 +983,7 @@ + test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' + + echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 +-echo "configure:985: checking whether ln -s works" >&5 ++echo "configure:987: checking whether ln -s works" >&5 + if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -1004,7 +1006,7 @@ + # Extract the first word of "ranlib", so it can be a program name with args. + set dummy ranlib; ac_word=$2 + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +-echo "configure:1008: checking for $ac_word" >&5 ++echo "configure:1010: checking for $ac_word" >&5 + if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -1036,7 +1038,7 @@ + # Extract the first word of "$ac_prog", so it can be a program name with args. + set dummy $ac_prog; ac_word=$2 + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +-echo "configure:1040: checking for $ac_word" >&5 ++echo "configure:1042: checking for $ac_word" >&5 + if eval "test \"`echo '$''{'ac_cv_prog_ETAGS'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -1071,7 +1073,7 @@ + # Extract the first word of "$ac_prog", so it can be a program name with args. + set dummy $ac_prog; ac_word=$2 + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +-echo "configure:1075: checking for $ac_word" >&5 ++echo "configure:1077: checking for $ac_word" >&5 + if eval "test \"`echo '$''{'ac_cv_prog_MAKEDEPEND'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -1106,7 +1108,7 @@ + # Extract the first word of "$ac_prog", so it can be a program name with args. + set dummy $ac_prog; ac_word=$2 + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +-echo "configure:1110: checking for $ac_word" >&5 ++echo "configure:1112: checking for $ac_word" >&5 + if eval "test \"`echo '$''{'ac_cv_prog_MAKEINFO'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -1141,7 +1143,7 @@ + # Extract the first word of "$ac_prog", so it can be a program name with args. + set dummy $ac_prog; ac_word=$2 + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +-echo "configure:1145: checking for $ac_word" >&5 ++echo "configure:1147: checking for $ac_word" >&5 + if eval "test \"`echo '$''{'ac_cv_prog_TEXI2DVI'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -1176,7 +1178,7 @@ + # Extract the first word of "$ac_prog", so it can be a program name with args. + set dummy $ac_prog; ac_word=$2 + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +-echo "configure:1180: checking for $ac_word" >&5 ++echo "configure:1182: checking for $ac_word" >&5 + if eval "test \"`echo '$''{'ac_cv_prog_TEXI2HTML'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -1211,7 +1213,7 @@ + # Extract the first word of "$ac_prog", so it can be a program name with args. + set dummy $ac_prog; ac_word=$2 + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +-echo "configure:1215: checking for $ac_word" >&5 ++echo "configure:1217: checking for $ac_word" >&5 + if eval "test \"`echo '$''{'ac_cv_prog_DVIPS'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -1247,12 +1249,12 @@ + do + ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` + echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6 +-echo "configure:1251: checking for $ac_hdr that defines DIR" >&5 ++echo "configure:1253: checking for $ac_hdr that defines DIR" >&5 + if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < + #include <$ac_hdr> +@@ -1260,7 +1262,7 @@ + DIR *dirp = 0; + ; return 0; } + EOF +-if { (eval echo configure:1264: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:1266: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + eval "ac_cv_header_dirent_$ac_safe=yes" + else +@@ -1285,7 +1287,7 @@ + # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. + if test $ac_header_dirent = dirent.h; then + echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6 +-echo "configure:1289: checking for opendir in -ldir" >&5 ++echo "configure:1291: checking for opendir in -ldir" >&5 + ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -1293,7 +1295,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-ldir $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:1310: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -1326,7 +1328,7 @@ + + else + echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6 +-echo "configure:1330: checking for opendir in -lx" >&5 ++echo "configure:1332: checking for opendir in -lx" >&5 + ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -1334,7 +1336,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lx $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:1351: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -1368,12 +1370,12 @@ + fi + + echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 +-echo "configure:1372: checking for ANSI C header files" >&5 ++echo "configure:1374: checking for ANSI C header files" >&5 + if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < + #include +@@ -1381,7 +1383,7 @@ + #include + EOF + ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +-{ (eval echo configure:1385: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ++{ (eval echo configure:1387: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } + ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` + if test -z "$ac_err"; then + rm -rf conftest* +@@ -1398,7 +1400,7 @@ + if test $ac_cv_header_stdc = yes; then + # SunOS 4.x string.h does not declare mem*, contrary to ANSI. + cat > conftest.$ac_ext < + EOF +@@ -1416,7 +1418,7 @@ + if test $ac_cv_header_stdc = yes; then + # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. + cat > conftest.$ac_ext < + EOF +@@ -1437,7 +1439,7 @@ + : + else + cat > conftest.$ac_ext < + #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') +@@ -1448,7 +1450,7 @@ + exit (0); } + + EOF +-if { (eval echo configure:1452: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null ++if { (eval echo configure:1454: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null + then + : + else +@@ -1472,12 +1474,12 @@ + fi + + echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 +-echo "configure:1476: checking whether time.h and sys/time.h may both be included" >&5 ++echo "configure:1478: checking whether time.h and sys/time.h may both be included" >&5 + if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < + #include +@@ -1486,7 +1488,7 @@ + struct tm *tp; + ; return 0; } + EOF +-if { (eval echo configure:1490: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:1492: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_header_time=yes + else +@@ -1506,21 +1508,21 @@ + + fi + +-for ac_hdr in fcntl.h sys/file.h sys/ioctl.h sys/time.h stdlib.h unistd.h memory.h string.h strings.h utime.h limits.h gsm.h gsm/gsm.h rxposix.h rx/rxposix.h ++for ac_hdr in fcntl.h sys/file.h sys/ioctl.h sys/time.h stdlib.h unistd.h memory.h string.h strings.h utime.h limits.h gsm.h gsm/gsm.h regex.h rxposix.h rx/rxposix.h + do + ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` + echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +-echo "configure:1514: checking for $ac_hdr" >&5 ++echo "configure:1516: checking for $ac_hdr" >&5 + if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < + EOF + ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +-{ (eval echo configure:1524: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ++{ (eval echo configure:1526: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } + ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` + if test -z "$ac_err"; then + rm -rf conftest* +@@ -1547,12 +1549,12 @@ + done + + echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6 +-echo "configure:1551: checking for sys/wait.h that is POSIX.1 compatible" >&5 ++echo "configure:1553: checking for sys/wait.h that is POSIX.1 compatible" >&5 + if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < + #include +@@ -1568,7 +1570,7 @@ + s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; + ; return 0; } + EOF +-if { (eval echo configure:1572: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:1574: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_header_sys_wait_h=yes + else +@@ -1590,12 +1592,12 @@ + + + echo $ac_n "checking for working const""... $ac_c" 1>&6 +-echo "configure:1594: checking for working const" >&5 ++echo "configure:1596: checking for working const" >&5 + if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:1650: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_c_const=yes + else +@@ -1665,12 +1667,12 @@ + fi + + echo $ac_n "checking for size_t""... $ac_c" 1>&6 +-echo "configure:1669: checking for size_t" >&5 ++echo "configure:1671: checking for size_t" >&5 + if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < + #if STDC_HEADERS +@@ -1702,17 +1704,17 @@ + do + ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` + echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +-echo "configure:1706: checking for $ac_hdr" >&5 ++echo "configure:1708: checking for $ac_hdr" >&5 + if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < + EOF + ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +-{ (eval echo configure:1716: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ++{ (eval echo configure:1718: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } + ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` + if test -z "$ac_err"; then + rm -rf conftest* +@@ -1741,12 +1743,12 @@ + for ac_func in getpagesize + do + echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +-echo "configure:1745: checking for $ac_func" >&5 ++echo "configure:1747: checking for $ac_func" >&5 + if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:1775: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" + else +@@ -1794,7 +1796,7 @@ + done + + echo $ac_n "checking for working mmap""... $ac_c" 1>&6 +-echo "configure:1798: checking for working mmap" >&5 ++echo "configure:1800: checking for working mmap" >&5 + if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -1802,7 +1804,7 @@ + ac_cv_func_mmap_fixed_mapped=no + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null ++if { (eval echo configure:1948: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null + then + ac_cv_func_mmap_fixed_mapped=yes + else +@@ -1965,7 +1967,7 @@ + fi + + echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6 +-echo "configure:1969: checking for 8-bit clean memcmp" >&5 ++echo "configure:1971: checking for 8-bit clean memcmp" >&5 + if eval "test \"`echo '$''{'ac_cv_func_memcmp_clean'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else +@@ -1973,7 +1975,7 @@ + ac_cv_func_memcmp_clean=no + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null ++if { (eval echo configure:1989: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null + then + ac_cv_func_memcmp_clean=yes + else +@@ -2001,12 +2003,12 @@ + test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}" + + echo $ac_n "checking for vprintf""... $ac_c" 1>&6 +-echo "configure:2005: checking for vprintf" >&5 ++echo "configure:2007: checking for vprintf" >&5 + if eval "test \"`echo '$''{'ac_cv_func_vprintf'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:2035: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_vprintf=yes" + else +@@ -2053,12 +2055,12 @@ + + if test "$ac_cv_func_vprintf" != yes; then + echo $ac_n "checking for _doprnt""... $ac_c" 1>&6 +-echo "configure:2057: checking for _doprnt" >&5 ++echo "configure:2059: checking for _doprnt" >&5 + if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:2087: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func__doprnt=yes" + else +@@ -2106,12 +2108,12 @@ + fi + + echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 +-echo "configure:2110: checking return type of signal handlers" >&5 ++echo "configure:2112: checking return type of signal handlers" >&5 + if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < + #include +@@ -2128,7 +2130,7 @@ + int i; + ; return 0; } + EOF +-if { (eval echo configure:2132: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ++if { (eval echo configure:2134: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_type_signal=void + else +@@ -2149,12 +2151,12 @@ + for ac_func in getcwd gethostname mkdir re_comp regcomp select snprintf socket strdup strerror strstr fstat fchmod fchown utime utimes memmove sigset vsnprintf waitpid random srandom + do + echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +-echo "configure:2153: checking for $ac_func" >&5 ++echo "configure:2155: checking for $ac_func" >&5 + if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:2183: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" + else +@@ -2202,7 +2204,7 @@ + done + + echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6 +-echo "configure:2206: checking for socket in -lsocket" >&5 ++echo "configure:2208: checking for socket in -lsocket" >&5 + ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -2210,7 +2212,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lsocket $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:2227: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -2242,7 +2244,7 @@ + fi + + echo $ac_n "checking for t_accept in -lnsl""... $ac_c" 1>&6 +-echo "configure:2246: checking for t_accept in -lnsl" >&5 ++echo "configure:2248: checking for t_accept in -lnsl" >&5 + ac_lib_var=`echo nsl'_'t_accept | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -2250,7 +2252,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lnsl $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:2267: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -2283,7 +2285,7 @@ + + + echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6 +-echo "configure:2287: checking for readline in -lreadline" >&5 ++echo "configure:2289: checking for readline in -lreadline" >&5 + ac_lib_var=`echo readline'_'readline | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -2291,7 +2293,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lreadline $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:2308: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -2317,7 +2319,10 @@ + fi + if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 +- RL_LIBS="-lreadline" ++ cat >> confdefs.h <<\EOF ++#define HAVE_LIBREADLINE 1 ++EOF ++ RL_LIBS="-lreadline" + else + echo "$ac_t""no" 1>&6 + fi +@@ -2325,7 +2330,7 @@ + + + echo $ac_n "checking for gsm_decode in -lgsm""... $ac_c" 1>&6 +-echo "configure:2329: checking for gsm_decode in -lgsm" >&5 ++echo "configure:2334: checking for gsm_decode in -lgsm" >&5 + ac_lib_var=`echo gsm'_'gsm_decode | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -2333,7 +2338,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lgsm $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:2353: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -2359,42 +2364,91 @@ + fi + if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 +- HAVE_GSM="yes" ++ GSM_LIBS="-lgsm"; GSM_INCS="" + else + echo "$ac_t""no" 1>&6 ++ ++ GSM_LIBS="-L../gsm -lgsm"; GSM_INCS="-I\${srcdir}/../gsm" ++ BUILD_TARGETS="$BUILD_TARGETS gsm" ++ + fi + +-if test "$HAVE_GSM" = "yes"; then +- GSM_LIBS="-lgsm" +- GSM_INCS="" ++ ++ ++ ++for ac_func in regcomp ++do ++echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 ++echo "configure:2383: checking for $ac_func" >&5 ++if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 + else +- GSM_LIBS="-L../gsm -lgsm" +- GSM_INCS="-I\${srcdir}/../gsm" +-fi ++ cat > conftest.$ac_ext < ++/* Override any gcc2 internal prototype to avoid an error. */ ++/* We use char because int might match the return type of a gcc2 ++ builtin and then its argument prototype would still apply. */ ++char $ac_func(); + ++int main() { + ++/* The GNU C library defines this for functions which it implements ++ to always fail with ENOSYS. Some functions are actually named ++ something starting with __ and the normal name is an alias. */ ++#if defined (__stub_$ac_func) || defined (__stub___$ac_func) ++choke me ++#else ++$ac_func(); ++#endif ++ ++; return 0; } ++EOF ++if { (eval echo configure:2411: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++ rm -rf conftest* ++ eval "ac_cv_func_$ac_func=yes" ++else ++ echo "configure: failed program was:" >&5 ++ cat conftest.$ac_ext >&5 ++ rm -rf conftest* ++ eval "ac_cv_func_$ac_func=no" ++fi ++rm -f conftest* ++fi + +-echo $ac_n "checking for regncomp in -lrx""... $ac_c" 1>&6 +-echo "configure:2379: checking for regncomp in -lrx" >&5 +-ac_lib_var=`echo rx'_'regncomp | sed 'y%./+-%__p_%'` ++if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then ++ echo "$ac_t""yes" 1>&6 ++ ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` ++ cat >> confdefs.h <&6 ++echo $ac_n "checking for regcomp in -lrx""... $ac_c" 1>&6 ++echo "configure:2433: checking for regcomp in -lrx" >&5 ++ac_lib_var=`echo rx'_'regcomp | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + ac_save_LIBS="$LIBS" + LIBS="-lrx $LIBS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:2452: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -2409,18 +2463,22 @@ + fi + if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 +- HAVE_RX="yes" ++ RX_LIBS="-lrx"; RX_INCS="" + else + echo "$ac_t""no" 1>&6 ++ ++ RX_LIBS="-L../rx -lrx"; RX_INCS="-I\${srcdir}/../rx" ++ BUILD_TARGETS="$BUILD_TARGETS rx" ++ subdirs="rx" ++s%@subdirs@%$subdirs%g ++ ++ + fi + +-if test "$HAVE_RX" = "yes"; then +- RX_LIBS="-lrx" +- RX_INCS="" +-else +- RX_LIBS="-L../rx -lrx" +- RX_INCS="-I\${srcdir}/../rx" ++ + fi ++done ++ + + + +@@ -2434,9 +2492,9 @@ + + if test -z "$RPLAY_TARGET"; then + echo $ac_n "checking for sun""... $ac_c" 1>&6 +-echo "configure:2438: checking for sun" >&5 ++echo "configure:2496: checking for sun" >&5 + cat > conftest.$ac_ext <&6 +-echo "configure:2464: checking for solaris" >&5 ++echo "configure:2522: checking for solaris" >&5 + if test ! -f /vmunix; then + is_solaris=yes + RPLAY_TARGET="solaris" +@@ -2473,9 +2531,9 @@ + + if test -z "$RPLAY_TARGET"; then + echo $ac_n "checking for linux""... $ac_c" 1>&6 +-echo "configure:2477: checking for linux" >&5 ++echo "configure:2535: checking for linux" >&5 + cat > conftest.$ac_ext <&6 +-echo "configure:2505: checking for hpux" >&5 ++echo "configure:2563: checking for hpux" >&5 + cat > conftest.$ac_ext <&6 +-echo "configure:2533: checking for sgi" >&5 ++echo "configure:2591: checking for sgi" >&5 + cat > conftest.$ac_ext <&6 +-echo "configure:2557: checking for multimedia development kit" >&5 ++echo "configure:2615: checking for multimedia development kit" >&5 + for ac_hdr in audio.h + do + ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` + echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +-echo "configure:2562: checking for $ac_hdr" >&5 ++echo "configure:2620: checking for $ac_hdr" >&5 + if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext < + EOF + ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +-{ (eval echo configure:2572: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ++{ (eval echo configure:2630: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } + ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` + if test -z "$ac_err"; then + rm -rf conftest* +@@ -2604,12 +2662,12 @@ + + if test -z "$RPLAY_TARGET"; then + echo $ac_n "checking for FreeBSD""... $ac_c" 1>&6 +-echo "configure:2608: checking for FreeBSD" >&5 ++echo "configure:2666: checking for FreeBSD" >&5 + cat > conftest.$ac_ext < + */ + ++#define _GNU_SOURCE ++#define __USE_GNU ++ + #ifdef HAVE_CONFIG_H + #include "config.h" + #endif +@@ -34,6 +37,7 @@ + #include + #include + #include ++#include + #include + #include + #include +@@ -56,6 +60,7 @@ + static int dsp_speed; + static int dsp_blksize; + static int streaming; ++static int opened; + + static char * + getsound() +@@ -95,12 +100,35 @@ + + if (strcmp(pathname, "/dev/dsp") == 0) + { ++ char response[RPTP_MAX_LINE]; ++ char *acc; ++ + rplay_fd = rptp_open(rplay_default_host(), RPTP_PORT, response, + sizeof(response)); + if (rplay_fd < 0) + { + rptp_perror(rplay_default_host()); + } ++ else ++ { ++ rptp_putline(rplay_fd, "access"); ++ rptp_getline(rplay_fd, response, sizeof(response)); ++ acc = rptp_parse(response, "access"); ++ ++ if (!acc || !strchr(acc, 'w')) ++ { ++ fprintf(stderr, ++ "RPLAY-ERROR: please add 'w' to rplay.hosts or man rplay.hosts\n"); ++ errno = EACCES; ++ close(rplay_fd); ++ rplay_fd = -1; ++ } ++ else ++ { ++ opened = 1; ++ } ++ } ++ + return rplay_fd; + } + else +@@ -158,6 +186,7 @@ + break; + } + ++ /* + if (spool_id == -1 && dsp_fmt && dsp_speed && dsp_channels) + { + char response[RPTP_MAX_LINE]; +@@ -174,11 +203,18 @@ + getsound()); + rptp_getline(rplay_fd, response, sizeof(response)); + ++ if (response[0] != RPTP_OK) ++ { ++ errno = EINVAL; ++ return -1; ++ } ++ + spool_id = atoi(1 + rptp_parse(response, "id")); + + rptp_putline(rplay_fd, "put id=#%d size=0", spool_id); + rptp_getline(rplay_fd, response, sizeof(response)); + } ++ */ + + return 0; + } +@@ -214,7 +250,7 @@ + if (!func) + func = (int (*)(int, const void *, size_t)) dlsym(REAL_LIBC, "write"); + +- if (fd == rplay_fd && !streaming) ++ if (fd == rplay_fd && !streaming && opened) + { + char info[64]; + char response[RPTP_MAX_LINE]; +@@ -241,7 +277,7 @@ + } + /* otherwise let rplayd figure out the format using + the sound header and/or name. */ +- ++ + streaming = 1; + rptp_putline(rplay_fd, "play input=flow %s sound=\"%s\"", + info, getsound()); +@@ -269,6 +305,7 @@ + rplay_fd = -1; + spool_id = -1; + streaming = 0; ++ opened = 0; + dsp_fmt = dsp_speed = dsp_channels = dsp_speed = dsp_blksize = 0; + } + +--- rplay-3.3.2.orig/etc/rplay.hosts ++++ rplay-3.3.2/etc/rplay.hosts +@@ -1,5 +1,6 @@ +-# Sample rplay.hosts +-# +-# this file describes what machines can read from or write to this server +-# *:rwx +-# would allow anyone to read or write to this server. ++# default rplay.hosts ++# see the rplay.hosts(5) for details on the format and meaning of this ++# file ++ ++# give the localhost the default permissions ++localhost +--- rplay-3.3.2.orig/etc/rplay.helpers ++++ rplay-3.3.2/etc/rplay.helpers +@@ -3,7 +3,6 @@ + # + # + ## MPEG +-\.mp[1-3]$ linear16,44100,16,2,little-endian /usr/bin/mpg123 --stdout --quiet --rate 44100 --stereo - ++\.mp[1-3]$ linear16,44100,16,2,little-endian /usr/bin/mpg123 --stdout --quiet --rate 44100 --stereo - + +-## MODS +-#\.\(669\|alm\|amd\|far\|mod\|mtm\|okt\|ptm\|rad\|s3m\|stm\|wow\|xm\)$ linear16,44100,16,2,little-endian /usr/local/bin/xmp --stereo --little-endian -b 16 -f 44100 --stdout --nocmd /dev/fd/0 ++\.ogg$ linear16,44100,16,2,little-endian /usr/bin/ogg123 -q -d raw -o byteorder:little -f - /dev/fd/0 +--- rplay-3.3.2.orig/include/config.h.in ++++ rplay-3.3.2/include/config.h.in +@@ -40,7 +40,7 @@ + /* + * Use host authentication. + */ +-#define AUTH ++#define AUTH + + /* + * Support rplay 2.0 packets. If you define this then you +@@ -75,7 +75,7 @@ + * 1 - System and rplayd errors. + * 2 - + RPTP connections, get, put, find. + * 3 - + play, stop, pause, continue, etc. +- * 4 - + Debug messages. ++ * 4 - + Debug messages. + * + * Note that the logging level can also be specified with + * rplayd command line options. This is only used if +@@ -192,6 +192,7 @@ + #undef HAVE_LIBREADLINE + #undef HAVE_RANDOM + #undef HAVE_SRANDOM ++#undef HAVE_REGCOMP + + #undef HAVE_STDC_HEADERS + #undef HAVE_MEMORY_H +@@ -207,6 +208,7 @@ + + #undef HAVE_GSM_H + #undef HAVE_GSM_GSM_H ++#undef HAVE_REGEX_H + #undef HAVE_RXPOSIX_H + #undef HAVE_RX_RXPOSIX_H + +--- rplay-3.3.2.orig/librplay/Makefile.in ++++ rplay-3.3.2/librplay/Makefile.in +@@ -9,7 +9,7 @@ + MKINSTALLDIRS= @srcdir@/../mkinstalldirs + + CPPFLAGS= $(CC_OPTIONS) -I. -I../include -I@srcdir@/../include @DEFS@ +-LDFLAGS= $(LD_OPTIONS) -shared @LDFLAGS@ ++LDFLAGS= $(LD_OPTIONS) -shared -Xlinker -soname -Xlinker librplay.so.3 @LDFLAGS@ + + .c.o: + $(CC) -c $(CPPFLAGS) $(CFLAGS) $< +@@ -33,7 +33,10 @@ + $(RANLIB) $@ + + librplay.so: $(SHAREDOBJS) +- $(CC) -o $@ $(SHAREDOBJS) $(LDFLAGS) ++ $(CC) -o $@.@RPLAY_VERSION@ $(SHAREDOBJS) $(LDFLAGS) ++ ln -fs $@.@RPLAY_VERSION@ $@.3 ++ ln -fs $@.@RPLAY_VERSION@ $@ ++ + + # + # For HP-UX comment above and uncomment below. +@@ -50,14 +53,16 @@ + install: all + $(MKINSTALLDIRS) $(libdir) + $(INSTALL_DATA) $(TARGET) $(libdir) +- $(INSTALL_DATA) librplay.so $(libdir) ++ $(INSTALL_DATA) librplay.so.@RPLAY_VERSION@ $(libdir) ++ (cd $(libdir) && ln -s librplay.so.@RPLAY_VERSION@ librplay.so.3) ++ (cd $(libdir) && ln -s librplay.so.@RPLAY_VERSION@ librplay.so) + + uninstall: + $(RM) $(libdir)/$(TARGET) + $(RM) $(libdir)/librplay.so + + clean: +- $(RM) $(OBJS) $(SHAREDOBJS) $(TARGET) librplay.so a.out core *~ *.bak *.orig TAGS ++ $(RM) $(OBJS) $(SHAREDOBJS) $(TARGET) librplay.so* a.out core *~ *.bak *.orig TAGS + + distclean: clean + $(RM) Makefile +--- rplay-3.3.2.orig/perl/RPlay.pm ++++ rplay-3.3.2/perl/RPlay.pm +@@ -44,8 +44,8 @@ + my ($that_host, $that_port) = @_; + my ($pat, $name, $aliases, $proto, $port, $udp); + my (@bytes, $addrtype, $length, $old); +- my ($that, $that_addr, $that_addr); +- my ($this, $this_addr, $this_addr); ++ my ($that, $that_addr); ++ my ($this, $this_addr); + + $sockaddr = 'S n a4 x8'; + +--- rplay-3.3.2.orig/rplay/rplay.c ++++ rplay-3.3.2/rplay/rplay.c +@@ -42,6 +42,11 @@ + + #define OPTIONS "+spcN:P:h:rv:n:R:b:i:" + ++/* Make sure MAXPATHLEN is defined. */ ++#ifndef MAXPATHLEN ++#define MAXPATHLEN 4096 ++#endif ++ + struct option longopts[] = + { + {"continue", no_argument, NULL, 'c'}, +--- rplay-3.3.2.orig/rplayd/sound.c ++++ rplay-3.3.2/rplayd/sound.c +@@ -64,6 +64,9 @@ + #ifdef HAVE_HELPERS + #include "helper.h" + #endif /* HAVE_HELPERS */ ++#ifdef HAVE_REGEX_H ++#include ++#else + #ifdef HAVE_RX_RXPOSIX_H + #include + #else +@@ -73,6 +76,12 @@ + #include "rxposix.h" + #endif + #endif ++#endif ++ ++/* Make sure MAXPATHLEN is defined. */ ++#ifndef MAXPATHLEN ++#define MAXPATHLEN 4096 ++#endif + + SOUND *sounds = NULL; + int sound_count = 0; +@@ -143,9 +152,9 @@ + + //memset ((char *) &bad_dirs, 0, sizeof (bad_dirs)); + +- if (regncomp(&bad_dirs, buf, strlen(buf), REG_ICASE | REG_NOSUB)) ++ if (regcomp(&bad_dirs, buf, REG_ICASE | REG_NOSUB)) + { +- report(REPORT_ERROR, "bad_dirs: regncomp failed\n"); ++ report(REPORT_ERROR, "bad_dirs: regcomp failed\n"); + done(1); + } + +@@ -162,7 +171,7 @@ + #endif + { + /* return 1 if bad */ +- return regnexec(&bad_dirs, dir, strlen(dir), 0, 0, 0) ? 0 : 1; ++ return regexec(&bad_dirs, dir, 0, 0, 0) ? 0 : 1; + } + + #endif /* BAD_DIRS */ +--- rplay-3.3.2.orig/rplayd/sound.h ++++ rplay-3.3.2/rplayd/sound.h +@@ -170,9 +170,9 @@ + int gsm_bit_frame_bytes; /* Number of bytes in gsm_bit_frame */ + int gsm_fixed_buffer_size; + #endif /* HAVE_GSM */ +-#ifdef HAVE_CDROM ++#if defined(HAVE_CDROM) || defined(HAVE_HELPERS) + int pid; +-#endif /* HAVE_CDROM */ ++#endif /* HAVE_CDROM || HAVE_HELPERS */ + } + SINDEX; + +--- rplay-3.3.2.orig/rplayd/helper.h ++++ rplay-3.3.2/rplayd/helper.h +@@ -26,6 +26,9 @@ + + #ifdef HAVE_HELPERS + ++#ifdef HAVE_REGEX_H ++#include ++#else + #ifdef HAVE_RX_RXPOSIX_H + #include + #else +@@ -35,6 +38,7 @@ + #include "rxposix.h" + #endif + #endif ++#endif + + typedef struct _helper + { +--- rplay-3.3.2.orig/rplayd/rplayd.h ++++ rplay-3.3.2/rplayd/rplayd.h +@@ -73,7 +73,6 @@ + extern fd_set read_mask; + extern fd_set write_mask; + extern int debug; +-extern int inetd; + extern int rptp_timeout; + extern char hostname[]; + extern char *hostaddr; +@@ -133,7 +132,7 @@ + extern int monitor_count; + extern BUFFER *monitor_buffers; + +-extern int errno; ++#include + + #ifdef __STDC__ + extern void usage (); +--- rplay-3.3.2.orig/rplayd/helper.c ++++ rplay-3.3.2/rplayd/helper.c +@@ -43,6 +43,11 @@ + #include "helper.h" + #include "misc.h" + ++/* Make sure MAXPATHLEN is defined. */ ++#ifndef MAXPATHLEN ++#define MAXPATHLEN 4096 ++#endif ++ + HELPER *helpers = NULL; + static time_t helper_read_time; + +@@ -110,7 +115,7 @@ + done(1); + } + //memset ((char *) &hp->pattern, 0, sizeof (hp->pattern)); +- error = regncomp(&hp->pattern, pat, strlen(pat), REG_ICASE | REG_NOSUB); ++ error = regcomp(&hp->pattern, pat, REG_ICASE | REG_NOSUB); + if (error) + { + report(REPORT_ERROR, "helper_read: %d line %d\n", error, line); +@@ -188,7 +193,7 @@ + + for (hp = helpers; hp; hp = hp->next) + { +- if (regnexec(&hp->pattern, sound, strlen(sound), 0, 0, 0) == 0) ++ if (regexec(&hp->pattern, sound, 0, 0, 0) == 0) + { + return hp; + } +--- rplay-3.3.2.orig/rplayd/native.c ++++ rplay-3.3.2/rplayd/native.c +@@ -22,7 +22,7 @@ + */ + + +- ++#include + #ifdef HAVE_CONFIG_H + #include "config.h" + #endif +--- rplay-3.3.2.orig/rplayd/rplayd.c ++++ rplay-3.3.2/rplayd/rplayd.c +@@ -333,6 +333,9 @@ + + progname = argv[0]; + ++ /* no need to keep stdin around */ ++ close(0); ++ + servers_file = tilde_expand(RPLAY_SERVERS); + #ifdef HAVE_HELPERS + helpers_file = tilde_expand(RPLAY_HELPERS); +@@ -1466,7 +1469,7 @@ + char *buf = rplay_audio_buf; + int size = rplay_audio_size; + int n; +- ++ + while (size) + { + n = MIN(BUFFER_SIZE - monitor_buffers->offset, size); +@@ -1483,7 +1486,7 @@ + } + } + } +- ++ + rplay_audio_size = 0; + + /* Flush when the audio stream has ended. */ +--- rplay-3.3.2.orig/rplayd/spool.c ++++ rplay-3.3.2/rplayd/spool.c +@@ -43,6 +43,11 @@ + #include "flange.h" + #endif + ++/* Make sure MAXPATHLEN is defined. */ ++#ifndef MAXPATHLEN ++#define MAXPATHLEN 4096 ++#endif ++ + SPOOL *spool = NULL; /* List of spool entries. */ + int spool_size = 0; /* Number of entries in the spool. */ + int spool_nplaying = 0; /* Number of playing sounds. */ +@@ -1127,8 +1132,8 @@ + spool_flow_pause(sp); + } + } +-#endif /* HAVE_CDROM */ + } ++#endif /* HAVE_CDROM */ + } + else + { +--- rplay-3.3.2.orig/rplayd/xhash.c ++++ rplay-3.3.2/rplayd/xhash.c +@@ -36,6 +36,11 @@ + #include "hash.h" + #include "rplayd.h" + ++/* Make sure MAXPATHLEN is defined. */ ++#ifndef MAXPATHLEN ++#define MAXPATHLEN 4096 ++#endif ++ + static struct hash_control *htable; + + #ifdef DEBUG +--- rplay-3.3.2.orig/rplayd/cache.c ++++ rplay-3.3.2/rplayd/cache.c +@@ -47,6 +47,11 @@ + #include "spool.h" + #include "cache.h" + ++/* Make sure MAXPATHLEN is defined. */ ++#ifndef MAXPATHLEN ++#define MAXPATHLEN 4096 ++#endif ++ + static DIR *cache_dir; + static char cache_path[MAXPATHLEN]; + static char cache_directory[MAXPATHLEN]; +--- rplay-3.3.2.orig/rplayd/host.c ++++ rplay-3.3.2/rplayd/host.c +@@ -33,6 +33,9 @@ + #include "host.h" + #include "buffer.h" + #include "misc.h" ++#ifdef HAVE_REGEX_H ++#include ++#else + #ifdef HAVE_RX_RXPOSIX_H + #include + #else +@@ -42,6 +45,7 @@ + #include "rxposix.h" + #endif + #endif ++#endif + + #ifdef AUTH + +@@ -197,35 +201,31 @@ + } + strcat(expr_monitor, "$"); + +- error = regncomp(&access_read, expr_read, strlen(expr_read), +- REG_ICASE | REG_NOSUB); ++ error = regcomp(&access_read, expr_read, REG_ICASE | REG_NOSUB); + if (error) + { +- report(REPORT_ERROR, "host_read: regncomp: %d\n", error); ++ report(REPORT_ERROR, "host_read: regcomp: %d\n", error); + done(1); + } + +- error = regncomp(&access_write, expr_write, strlen(expr_write), +- REG_ICASE | REG_NOSUB); ++ error = regcomp(&access_write, expr_write, REG_ICASE | REG_NOSUB); + if (error) + { +- report(REPORT_ERROR, "host_read: regncomp: %d\n", error); ++ report(REPORT_ERROR, "host_read: regcomp: %d\n", error); + done(1); + } + +- error = regncomp(&access_execute, expr_execute, strlen(expr_execute), +- REG_ICASE | REG_NOSUB); ++ error = regcomp(&access_execute, expr_execute, REG_ICASE | REG_NOSUB); + if (error) + { +- report(REPORT_ERROR, "host_read: regncomp: %d\n", error); ++ report(REPORT_ERROR, "host_read: regcomp: %d\n", error); + done(1); + } + +- error = regncomp(&access_monitor, expr_monitor, strlen(expr_monitor), +- REG_ICASE | REG_NOSUB); ++ error = regcomp(&access_monitor, expr_monitor, REG_ICASE | REG_NOSUB); + if (error) + { +- report(REPORT_ERROR, "host_read: regncomp: %d\n", error); ++ report(REPORT_ERROR, "host_read: regcomp: %d\n", error); + done(1); + } + } +@@ -432,7 +432,7 @@ + done(1); + } + +- n = regnexec(re, p, strlen(p), 0, 0, 0); ++ n = regexec(re, p, 0, 0, 0); + + return !n; + } +--- rplay-3.3.2.orig/rplayd/timer.c ++++ rplay-3.3.2/rplayd/timer.c +@@ -29,6 +29,7 @@ + #include + #include + #include ++#include + #include "rplayd.h" + #include "timer.h" + +--- rplay-3.3.2.orig/rplayd/Makefile.in ++++ rplay-3.3.2/rplayd/Makefile.in +@@ -25,7 +25,7 @@ + $(CC) -c $(CPPFLAGS) $(CFLAGS) $< + + LDFLAGS= $(LD_OPTIONS) -L../librplay -lrplay -L../lib -lrp \ +- -L../adpcm -ladpcm @GSM_LIBS@ -L../rx -lrx @LDFLAGS@ @LIBS@ -lm ++ -L../adpcm -ladpcm @GSM_LIBS@ @RX_LIBS@ @LDFLAGS@ @LIBS@ -lm + + TARGET= rplayd + +@@ -54,7 +54,7 @@ + install: all + $(MKINSTALLDIRS) $(sbindir) + $(INSTALL_PROGRAM) $(TARGET) $(sbindir)/$(TARGET) +- @test -x $(bindir)/$(TARGET) && echo "" && echo " Note: Consider removing $(bindir)/$(TARGET)" && echo "" ++ @(test -x $(bindir)/$(TARGET) && echo "" && echo " Note: Consider removing $(bindir)/$(TARGET)" && echo "") || true + + uninstall: + $(RM) $(bindir)/$(TARGET) +--- rplay-3.3.2.orig/rplayd/audio/audio_FreeBSD.c ++++ rplay-3.3.2/rplayd/audio/audio_FreeBSD.c +@@ -35,7 +35,7 @@ + #include + #include + #include +-#include ++#include + + /* + * for the poor folks who don't have a sound card, but use the pc speaker +--- rplay-3.3.2.orig/rplayd/audio/audio_gnu.h ++++ rplay-3.3.2/rplayd/audio/audio_gnu.h +@@ -0,0 +1,37 @@ ++/* $Id: audio_generic.h,v 1.3 1999/03/10 07:58:10 boyns Exp $ */ ++ ++/* ++ * Copyright (C) 1993-99 Mark R. Boyns ++ * ++ * This file is part of rplay. ++ * ++ * rplay is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation; either version 2 of the License, or ++ * (at your option) any later version. ++ * ++ * rplay is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with rplay; see the file COPYING. If not, write to the ++ * Free Software Foundation, Inc., ++ * 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. ++ */ ++ ++ ++ ++#ifndef _audio_generic_h ++#define _audio_generic_h ++ ++#include "rplay.h" ++ ++#define RPLAY_AUDIO_DEVICE "/dev/audio" ++#define RPLAY_AUDIO_TIMEOUT 5 ++#define RPLAY_AUDIO_FLUSH_TIMEOUT -1 ++#define RPLAY_AUDIO_RATE 10 ++#define RPLAY_AUDIO_BYTE_ORDER RPLAY_BIG_ENDIAN ++ ++#endif /* _audio_generic_h */ +--- rplay-3.3.2.orig/rplayd/audio/audio_gnu.c ++++ rplay-3.3.2/rplayd/audio/audio_gnu.c +@@ -0,0 +1,287 @@ ++/* $Id: audio_generic.c,v 1.5 1999/03/10 07:58:10 boyns Exp $ */ ++ ++/* ++ * Copyright (C) 1993-99 Mark R. Boyns ++ * ++ * This file is part of rplay. ++ * ++ * rplay is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation; either version 2 of the License, or ++ * (at your option) any later version. ++ * ++ * rplay is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with rplay; see the file COPYING. If not, write to the ++ * Free Software Foundation, Inc., ++ * 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. ++ */ ++ ++ ++ ++#include "rplayd.h" ++ ++/* ++ * System audio include files: ++ */ ++#include ++#include ++#include ++#ifdef ultrix ++#include ++#else ++#include ++#endif ++#include ++ ++/* ++ * External variables: ++ */ ++extern char *rplay_audio_device; ++extern int rplay_audio_sample_rate; ++extern int rplay_audio_channels; ++extern int rplay_audio_precision; ++extern int rplay_audio_format; ++extern int rplay_audio_port; ++extern int optional_sample_rate; ++extern int optional_precision; ++extern int optional_channels; ++extern int optional_format; ++extern int optional_port; ++ ++/* ++ * Internal variables: ++ */ ++static int rplay_audio_fd = -1; ++ ++static RPLAY_AUDIO_TABLE generic_table[] = ++{ ++ {8000, RPLAY_FORMAT_ULAW, 1, 1}, ++ {0, 0, 0, 0} ++}; ++ ++/* ++ * Initialize the audio device. ++ * This routine must set the following external variables: ++ * rplay_audio_sample_rate ++ * rplay_audio_precision ++ * rplay_audio_channels ++ * rplay_audio_format ++ * rplay_audio_port ++ * ++ * and may use the following optional parameters: ++ * optional_sample_rate ++ * optional_precision ++ * optional_channels ++ * optional_format ++ * optional_port ++ * ++ * optional_* variables with values of zero should be ignored. ++ * ++ * Return 0 on success and -1 on error. ++ */ ++int ++rplay_audio_init() ++{ ++ if (rplay_audio_fd == -1) ++ { ++ rplay_audio_open(); ++ if (rplay_audio_fd == -1) ++ { ++ report(REPORT_ERROR, "rplay_audio_init: cannot open %s\n", ++ rplay_audio_device); ++ return -1; ++ } ++ } ++ ++ rplay_audio_sample_rate = 8000; ++ rplay_audio_precision = 8; ++ rplay_audio_channels = 1; ++ rplay_audio_format = RPLAY_FORMAT_ULAW; ++ rplay_audio_port = RPLAY_AUDIO_PORT_SPEAKER; ++ rplay_audio_table = generic_table; ++ ++ return 0; ++} ++ ++/* ++ * Open the audio device. ++ * ++ * Return 0 on success and -1 on error. ++ */ ++int ++rplay_audio_open() ++{ ++ int flags; ++ ++ rplay_audio_fd = open(rplay_audio_device, O_WRONLY | O_NDELAY, 0); ++ if (rplay_audio_fd < 0) ++ { ++ return -1; ++ } ++ ++ if (fcntl(rplay_audio_fd, F_SETFD, 1) < 0) ++ { ++ report(REPORT_ERROR, ++ "rplay_audio_open: close-on-exec %d\n", ++ sys_err_str(errno)); ++ /* return -1; */ ++ } ++ ++ if (rplay_audio_init() < 0) ++ { ++ return -1; ++ } ++ ++ /* ++ * Make sure the audio device writes are non-blocking. ++ */ ++ flags = fcntl(rplay_audio_fd, F_GETFL, 0); ++ if (flags < 0) ++ { ++ return -1; ++ } ++ flags |= FNDELAY; ++ if (fcntl(rplay_audio_fd, F_SETFL, flags) < 0) ++ { ++ return -1; ++ } ++ ++ return 0; ++} ++ ++/* ++ * Is the audio device open? ++ * ++ * Return 1 for true and 0 for false. ++ */ ++int ++rplay_audio_isopen() ++{ ++ return rplay_audio_fd != -1; ++} ++ ++/* ++ * Flush the audio device. ++ * ++ * Return 0 on success and -1 on error. ++ */ ++int ++rplay_audio_flush() ++{ ++ return 0; ++} ++ ++/* ++ * Write nbytes from buf to the audio device. ++ * ++ * Return the number of bytes written on success and -1 on error. ++ */ ++#ifdef __STDC__ ++int ++rplay_audio_write(char *buf, int nbytes) ++#else ++int ++rplay_audio_write(buf, nbytes) ++ char *buf; ++ int nbytes; ++#endif ++{ ++ int n, nleft, nwritten; ++ char *p; ++ ++ nleft = nbytes; ++ nwritten = 0; ++ ++ for (p = buf; nleft > 0; nleft -= n, p += n) ++ { ++ n = write(rplay_audio_fd, p, nleft); ++ if (n < 0) ++ { ++ if (errno == EWOULDBLOCK) ++ { ++ return nwritten; ++ } ++ else if (errno != EINTR) ++ { ++ return -1; ++ } ++ n = 0; ++ } ++ else ++ { ++ nwritten += n; ++ } ++ } ++ ++ return nwritten; ++} ++ ++/* ++ * Close the audio device. ++ * ++ * Return 0 on success and -1 on error. ++ */ ++int ++rplay_audio_close() ++{ ++ if (rplay_audio_fd != -1) ++ { ++ close(rplay_audio_fd); ++ } ++ ++ rplay_audio_fd = -1; ++ ++ return 0; ++} ++ ++/* ++ * Return the volume of the audio device. ++ * ++ * Return 0-255 or -1 on error. ++ */ ++int ++rplay_audio_get_volume() ++{ ++#ifdef FAKE_VOLUME ++ return rplay_audio_volume; ++#else /* not FAKE_VOLUME */ ++ return -1; ++#endif /* not FAKE_VOLUME */ ++} ++ ++/* ++ * Set the volume of the audio device. ++ * Input should be 0-255. ++ * ++ * Return the volume of the audio device 0-255 or -1. ++ */ ++#ifdef __STDC__ ++int ++rplay_audio_set_volume(int volume) ++#else ++int ++rplay_audio_set_volume(volume) ++ int volume; ++#endif ++{ ++#ifdef FAKE_VOLUME ++ if (volume < RPLAY_MIN_VOLUME) ++ { ++ volume = RPLAY_MIN_VOLUME; ++ } ++ else if (volume > RPLAY_MAX_VOLUME) ++ { ++ volume = RPLAY_MAX_VOLUME; ++ } ++ rplay_audio_volume = volume; ++ ++ return rplay_audio_volume; ++#else /* not FAKE_VOLUME */ ++ return -1; ++#endif /* not FAKE_VOLUME */ ++} +--- rplay-3.3.2.orig/rptp/rptp.c ++++ rplay-3.3.2/rptp/rptp.c +@@ -532,6 +532,8 @@ + printf("help Display help information.\n"); + printf("info Display sound information.\n"); + printf("list Display various server information.\n"); ++ printf("monitor Monitor the audio output of rplayd.\n"); ++ printf(" Requires \"m\" permission in rplay.hosts\n"); + printf("open Connect to a server.\n"); + printf("pause Pause sounds that are playing.\n"); + printf("play Play sounds\n"); +@@ -783,7 +785,7 @@ + } + fwrite(rptp_buf, 1, n, fp); + size -= n; +- ++ + sprintf(line, "\r%s %d/%d %d%%", filename, + total_size - size, total_size, + (int)(((float)(total_size-size)/total_size)*100)); +@@ -1018,7 +1020,7 @@ + char line[80]; + int n, size; + int sample_rate, precision, channels, sample_size; +- ++ + if (!connected()) + { + return;