summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2001-04-11 08:14:39 +0200
committerRalf Baechle <ralf@linux-mips.org>2001-04-11 08:14:39 +0200
commit59cfcb1d81825cc4816fc1ffddd0193f0ebec4ae (patch)
treee98dece1216a3b31d7170ae0bf0e122de1feac96
parent2964aba637fede36e89a3b6c4330767438a3b619 (diff)
Import ax25-tools 0.0.6 from tarballax25-tools-0.0.6
-rw-r--r--ChangeLog9
-rw-r--r--Makefile.in2
-rw-r--r--aclocal.m413
-rw-r--r--ax25/Makefile.in6
-rw-r--r--config.h.in3
-rwxr-xr-xconfigure1369
-rw-r--r--configure.in14
-rw-r--r--dmascc/Makefile.in6
-rw-r--r--hdlcutil/Makefile.am35
-rw-r--r--hdlcutil/Makefile.in215
-rw-r--r--hdlcutil/fl/Makefile.am13
-rw-r--r--hdlcutil/fl/Makefile.in334
-rw-r--r--hdlcutil/fl/xfhdlcchpar.cxx73
-rw-r--r--hdlcutil/fl/xfhdlcchpar.h25
-rw-r--r--hdlcutil/fl/xfhdlcchpar_main.cxx136
-rw-r--r--hdlcutil/fl/xfhdlcst.cxx160
-rw-r--r--hdlcutil/fl/xfhdlcst.h31
-rw-r--r--hdlcutil/fl/xfhdlcst_main.cxx177
-rw-r--r--hdlcutil/fl/xfsmdiag.cxx124
-rw-r--r--hdlcutil/fl/xfsmdiag.h32
-rw-r--r--hdlcutil/fl/xfsmdiag_main.cxx412
-rw-r--r--hdlcutil/fl/xfsmdiag_main.h70
-rw-r--r--hdlcutil/fl/xfsmmixer.cxx437
-rw-r--r--hdlcutil/fl/xfsmmixer.h79
-rw-r--r--hdlcutil/fl/xfsmmixer_main.cxx462
-rw-r--r--hdlcutil/hdrvcomm.c146
-rw-r--r--hdlcutil/hdrvcomm.h9
-rw-r--r--hdlcutil/setcrystal.c140
-rw-r--r--hdlcutil/sethdlc.c13
-rw-r--r--hdlcutil/smdiag.878
-rw-r--r--hdlcutil/smdiag.c431
-rw-r--r--hdlcutil/smmixer.c10
-rw-r--r--kiss/Makefile.in6
-rw-r--r--netrom/Makefile.in6
-rw-r--r--netrom/nrparms.c7
-rw-r--r--rose/Makefile.in6
-rw-r--r--tcpip/Makefile.am4
-rw-r--r--tcpip/Makefile.in10
-rw-r--r--tcpip/rip98d.84
-rw-r--r--tcpip/rip98d.conf (renamed from tcpip/rip98.conf)0
-rw-r--r--tcpip/rip98d.conf.5 (renamed from tcpip/rip98.conf.5)6
-rw-r--r--tcpip/ttylinkd.85
-rw-r--r--tcpip/ttylinkd.README4
-rw-r--r--tcpip/ttylinkd.c3
-rw-r--r--tcpip/ttylinkd.conf.52
-rw-r--r--user_call/Makefile.in6
-rw-r--r--user_call/user_io.c33
-rw-r--r--yamdrv/Makefile.in6
48 files changed, 4690 insertions, 482 deletions
diff --git a/ChangeLog b/ChangeLog
index eb1a422..4daef34 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+ax25-tools (0.0.6)
+ * Added the new fltk smdiag and friends and put the old non-X based
+ ones back in.
+ * Changed all references of rip98.conf to rip98d.conf
+ * Attempted to hunt down and change all my email addresses
+ * Another Tomi's patch for nrparms and user_call
+
+ -- Craig Small <csmall@small.dropbear.id.au> Tue Jan 4 15:13:15 EST 2000
+
ax25-tools (0.0.5)
* Added Tomi's patch to correctly detect broken headers
diff --git a/Makefile.in b/Makefile.in
index d4a5bae..c1af1b4 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -61,7 +61,9 @@ AWK = @AWK@
AX25IO_LIB = @AX25IO_LIB@
AX25_LIB = @AX25_LIB@
CC = @CC@
+CXX = @CXX@
DMASCC = @DMASCC@
+FLTK_LIB = @FLTK_LIB@
MAKEINFO = @MAKEINFO@
NCURSES_LIB = @NCURSES_LIB@
PACKAGE = @PACKAGE@
diff --git a/aclocal.m4 b/aclocal.m4
index f23ba29..f54277a 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -125,3 +125,16 @@ for am_file in <<$1>>; do
done<<>>dnl>>)
changequote([,]))])
+# Define a conditional.
+
+AC_DEFUN(AM_CONDITIONAL,
+[AC_SUBST($1_TRUE)
+AC_SUBST($1_FALSE)
+if $2; then
+ $1_TRUE=
+ $1_FALSE='#'
+else
+ $1_TRUE='#'
+ $1_FALSE=
+fi])
+
diff --git a/ax25/Makefile.in b/ax25/Makefile.in
index 2330236..dfe3501 100644
--- a/ax25/Makefile.in
+++ b/ax25/Makefile.in
@@ -61,7 +61,9 @@ AWK = @AWK@
AX25IO_LIB = @AX25IO_LIB@
AX25_LIB = @AX25_LIB@
CC = @CC@
+CXX = @CXX@
DMASCC = @DMASCC@
+FLTK_LIB = @FLTK_LIB@
MAKEINFO = @MAKEINFO@
NCURSES_LIB = @NCURSES_LIB@
PACKAGE = @PACKAGE@
@@ -109,6 +111,10 @@ DEFS = @DEFS@ -I. -I$(srcdir) -I..
CPPFLAGS = @CPPFLAGS@
LDFLAGS = @LDFLAGS@
LIBS = @LIBS@
+X_CFLAGS = @X_CFLAGS@
+X_LIBS = @X_LIBS@
+X_EXTRA_LIBS = @X_EXTRA_LIBS@
+X_PRE_LIBS = @X_PRE_LIBS@
mheard_OBJECTS = mheard.o
mheard_LDADD = $(LDADD)
mheard_DEPENDENCIES =
diff --git a/config.h.in b/config.h.in
index d340fdf..a703f10 100644
--- a/config.h.in
+++ b/config.h.in
@@ -36,6 +36,9 @@
/* Define to `int' if <sys/types.h> doesn't define. */
#undef uid_t
+/* Define if the X Window System is missing or not being used. */
+#undef X_DISPLAY_MISSING
+
/* Define if you have a proper netax25/ax25.h header file. */
#undef HAVE_NETAX25_AX25_H
diff --git a/configure b/configure
index 7831278..7bd1de7 100755
--- a/configure
+++ b/configure
@@ -11,6 +11,8 @@
ac_help=
ac_default_prefix=/usr/local
# Any additions from configure.in:
+ac_help="$ac_help
+ --with-x use the X Window System"
# Initialize some variables set by options.
# The variables have the same names as the options, with
@@ -522,7 +524,7 @@ fi
-VERSION=0.0.5
+VERSION=0.0.6
PACKAGE=ax25-tools
ac_aux_dir=
for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
@@ -555,7 +557,7 @@ ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
# 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:559: checking for a BSD compatible install" >&5
+echo "configure:561: 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
@@ -608,7 +610,7 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
-echo "configure:612: checking whether build environment is sane" >&5
+echo "configure:614: checking whether build environment is sane" >&5
# Just in case
sleep 1
echo timestamp > conftestfile
@@ -665,7 +667,7 @@ test "$program_suffix" != NONE &&
test "$program_transform_name" = "" && program_transform_name="s,x,x,"
echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
-echo "configure:669: checking whether ${MAKE-make} sets \${MAKE}" >&5
+echo "configure:671: checking whether ${MAKE-make} sets \${MAKE}" >&5
set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -711,7 +713,7 @@ EOF
missing_dir=`cd $ac_aux_dir && pwd`
echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
-echo "configure:715: checking for working aclocal" >&5
+echo "configure:717: checking for working aclocal" >&5
# Run test in a subshell; some versions of sh will print an error if
# an executable is not found, even if stderr is redirected.
# Redirect stdin to placate older versions of autoconf. Sigh.
@@ -724,7 +726,7 @@ else
fi
echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
-echo "configure:728: checking for working autoconf" >&5
+echo "configure:730: checking for working autoconf" >&5
# Run test in a subshell; some versions of sh will print an error if
# an executable is not found, even if stderr is redirected.
# Redirect stdin to placate older versions of autoconf. Sigh.
@@ -737,7 +739,7 @@ else
fi
echo $ac_n "checking for working automake""... $ac_c" 1>&6
-echo "configure:741: checking for working automake" >&5
+echo "configure:743: checking for working automake" >&5
# Run test in a subshell; some versions of sh will print an error if
# an executable is not found, even if stderr is redirected.
# Redirect stdin to placate older versions of autoconf. Sigh.
@@ -750,7 +752,7 @@ else
fi
echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
-echo "configure:754: checking for working autoheader" >&5
+echo "configure:756: checking for working autoheader" >&5
# Run test in a subshell; some versions of sh will print an error if
# an executable is not found, even if stderr is redirected.
# Redirect stdin to placate older versions of autoconf. Sigh.
@@ -763,7 +765,7 @@ else
fi
echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
-echo "configure:767: checking for working makeinfo" >&5
+echo "configure:769: checking for working makeinfo" >&5
# Run test in a subshell; some versions of sh will print an error if
# an executable is not found, even if stderr is redirected.
# Redirect stdin to placate older versions of autoconf. Sigh.
@@ -788,7 +790,7 @@ do
# 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:792: checking for $ac_word" >&5
+echo "configure:794: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -820,7 +822,7 @@ done
# 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:824: checking for $ac_word" >&5
+echo "configure:826: 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
@@ -850,7 +852,7 @@ if test -z "$CC"; then
# 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:854: checking for $ac_word" >&5
+echo "configure:856: 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
@@ -901,7 +903,7 @@ fi
# 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:905: checking for $ac_word" >&5
+echo "configure:907: 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
@@ -933,7 +935,7 @@ fi
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:937: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+echo "configure:939: 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.
@@ -944,12 +946,12 @@ cross_compiling=$ac_cv_prog_cc_cross
cat > conftest.$ac_ext << EOF
-#line 948 "configure"
+#line 950 "configure"
#include "confdefs.h"
main(){return(0);}
EOF
-if { (eval echo configure:953: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:955: \"$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
@@ -975,12 +977,12 @@ if test $ac_cv_prog_cc_works = no; then
{ 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:979: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:981: 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:984: checking whether we are using GNU C" >&5
+echo "configure:986: 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
@@ -989,7 +991,7 @@ else
yes;
#endif
EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:993: \"$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:995: \"$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
@@ -1008,7 +1010,7 @@ ac_test_CFLAGS="${CFLAGS+set}"
ac_save_CFLAGS="$CFLAGS"
CFLAGS=
echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:1012: checking whether ${CC-cc} accepts -g" >&5
+echo "configure:1014: 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
@@ -1039,6 +1041,149 @@ else
fi
fi
+for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
+do
+# 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:1050: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test -n "$CXX"; then
+ ac_cv_prog_CXX="$CXX" # Let the user override the test.
+else
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_prog_CXX="$ac_prog"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+fi
+fi
+CXX="$ac_cv_prog_CXX"
+if test -n "$CXX"; then
+ echo "$ac_t""$CXX" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+test -n "$CXX" && break
+done
+test -n "$CXX" || CXX="gcc"
+
+
+echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6
+echo "configure:1082: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
+
+ac_ext=C
+# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cxx_cross
+
+cat > conftest.$ac_ext << EOF
+
+#line 1093 "configure"
+#include "confdefs.h"
+
+int main(){return(0);}
+EOF
+if { (eval echo configure:1098: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ ac_cv_prog_cxx_works=yes
+ # If we can't run a trivial program, we are probably using a cross compiler.
+ if (./conftest; exit) 2>/dev/null; then
+ ac_cv_prog_cxx_cross=no
+ else
+ ac_cv_prog_cxx_cross=yes
+ fi
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ ac_cv_prog_cxx_works=no
+fi
+rm -fr conftest*
+ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+echo "$ac_t""$ac_cv_prog_cxx_works" 1>&6
+if test $ac_cv_prog_cxx_works = no; then
+ { 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 ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
+echo "configure:1124: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6
+cross_compiling=$ac_cv_prog_cxx_cross
+
+echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6
+echo "configure:1129: checking whether we are using GNU C++" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.C <<EOF
+#ifdef __GNUC__
+ yes;
+#endif
+EOF
+if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:1138: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+ ac_cv_prog_gxx=yes
+else
+ ac_cv_prog_gxx=no
+fi
+fi
+
+echo "$ac_t""$ac_cv_prog_gxx" 1>&6
+
+if test $ac_cv_prog_gxx = yes; then
+ GXX=yes
+else
+ GXX=
+fi
+
+ac_test_CXXFLAGS="${CXXFLAGS+set}"
+ac_save_CXXFLAGS="$CXXFLAGS"
+CXXFLAGS=
+echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6
+echo "configure:1157: checking whether ${CXX-g++} accepts -g" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ echo 'void f(){}' > conftest.cc
+if test -z "`${CXX-g++} -g -c conftest.cc 2>&1`"; then
+ ac_cv_prog_cxx_g=yes
+else
+ ac_cv_prog_cxx_g=no
+fi
+rm -f conftest*
+
+fi
+
+echo "$ac_t""$ac_cv_prog_cxx_g" 1>&6
+if test "$ac_test_CXXFLAGS" = set; then
+ CXXFLAGS="$ac_save_CXXFLAGS"
+elif test $ac_cv_prog_cxx_g = yes; then
+ if test "$GXX" = yes; then
+ CXXFLAGS="-g -O2"
+ else
+ CXXFLAGS="-g"
+ fi
+else
+ if test "$GXX" = yes; then
+ CXXFLAGS="-O2"
+ else
+ CXXFLAGS=
+ fi
+fi
+
# Find a good install program. We prefer a C program (faster),
# so one script is as good as another. But avoid the broken or
# incompatible versions:
@@ -1051,7 +1196,7 @@ fi
# 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:1055: checking for a BSD compatible install" >&5
+echo "configure:1200: 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
@@ -1104,13 +1249,938 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
+echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
+echo "configure:1254: checking how to run the C preprocessor" >&5
+# On Suns, sometimes $CPP names a directory.
+if test -n "$CPP" && test -d "$CPP"; then
+ CPP=
+fi
+if test -z "$CPP"; then
+if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ # This must be in double quotes, not single quotes, because CPP may get
+ # substituted into the Makefile and "${CC-cc}" will confuse make.
+ CPP="${CC-cc} -E"
+ # On the NeXT, cc -E runs the code through the compiler's parser,
+ # not just through cpp.
+ cat > conftest.$ac_ext <<EOF
+#line 1269 "configure"
+#include "confdefs.h"
+#include <assert.h>
+Syntax Error
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:1275: \"$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
+ :
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ CPP="${CC-cc} -E -traditional-cpp"
+ cat > conftest.$ac_ext <<EOF
+#line 1286 "configure"
+#include "confdefs.h"
+#include <assert.h>
+Syntax Error
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:1292: \"$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
+ :
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ CPP="${CC-cc} -nologo -E"
+ cat > conftest.$ac_ext <<EOF
+#line 1303 "configure"
+#include "confdefs.h"
+#include <assert.h>
+Syntax Error
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:1309: \"$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
+ :
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ CPP=/lib/cpp
+fi
+rm -f conftest*
+fi
+rm -f conftest*
+fi
+rm -f conftest*
+ ac_cv_prog_CPP="$CPP"
+fi
+ CPP="$ac_cv_prog_CPP"
+else
+ ac_cv_prog_CPP="$CPP"
+fi
+echo "$ac_t""$CPP" 1>&6
+
+# If we find X, set shell vars x_includes and x_libraries to the
+# paths, otherwise set no_x=yes.
+# Uses ac_ vars as temps to allow command line to override cache and checks.
+# --without-x overrides everything else, but does not touch the cache.
+echo $ac_n "checking for X""... $ac_c" 1>&6
+echo "configure:1338: checking for X" >&5
+
+# Check whether --with-x or --without-x was given.
+if test "${with_x+set}" = set; then
+ withval="$with_x"
+ :
+fi
+
+# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
+if test "x$with_x" = xno; then
+ # The user explicitly disabled X.
+ have_x=disabled
+else
+ if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
+ # Both variables are already set.
+ have_x=yes
+ else
+if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ # One or both of the vars are not set, and there is no cached value.
+ac_x_includes=NO ac_x_libraries=NO
+rm -fr conftestdir
+if mkdir conftestdir; then
+ cd conftestdir
+ # Make sure to not put "make" in the Imakefile rules, since we grep it out.
+ cat > Imakefile <<'EOF'
+acfindx:
+ @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
+EOF
+ if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
+ # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
+ eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
+ # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
+ for ac_extension in a so sl; do
+ if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
+ test -f $ac_im_libdir/libX11.$ac_extension; then
+ ac_im_usrlibdir=$ac_im_libdir; break
+ fi
+ done
+ # Screen out bogus values from the imake configuration. They are
+ # bogus both because they are the default anyway, and because
+ # using them would break gcc on systems where it needs fixed includes.
+ case "$ac_im_incroot" in
+ /usr/include) ;;
+ *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
+ esac
+ case "$ac_im_usrlibdir" in
+ /usr/lib | /lib) ;;
+ *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
+ esac
+ fi
+ cd ..
+ rm -fr conftestdir
+fi
+
+if test "$ac_x_includes" = NO; then
+ # Guess where to find include files, by looking for this one X11 .h file.
+ test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
+
+ # First, try using that file with no special directory specified.
+cat > conftest.$ac_ext <<EOF
+#line 1400 "configure"
+#include "confdefs.h"
+#include <$x_direct_test_include>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:1405: \"$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*
+ # We can compile using X headers with no special include directory.
+ac_x_includes=
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ # Look for the header file in a standard set of common directories.
+# Check X11 before X11Rn because it is often a symlink to the current release.
+ for ac_dir in \
+ /usr/X11/include \
+ /usr/X11R6/include \
+ /usr/X11R5/include \
+ /usr/X11R4/include \
+ \
+ /usr/include/X11 \
+ /usr/include/X11R6 \
+ /usr/include/X11R5 \
+ /usr/include/X11R4 \
+ \
+ /usr/local/X11/include \
+ /usr/local/X11R6/include \
+ /usr/local/X11R5/include \
+ /usr/local/X11R4/include \
+ \
+ /usr/local/include/X11 \
+ /usr/local/include/X11R6 \
+ /usr/local/include/X11R5 \
+ /usr/local/include/X11R4 \
+ \
+ /usr/X386/include \
+ /usr/x386/include \
+ /usr/XFree86/include/X11 \
+ \
+ /usr/include \
+ /usr/local/include \
+ /usr/unsupported/include \
+ /usr/athena/include \
+ /usr/local/x11r5/include \
+ /usr/lpp/Xamples/include \
+ \
+ /usr/openwin/include \
+ /usr/openwin/share/include \
+ ; \
+ do
+ if test -r "$ac_dir/$x_direct_test_include"; then
+ ac_x_includes=$ac_dir
+ break
+ fi
+ done
+fi
+rm -f conftest*
+fi # $ac_x_includes = NO
+
+if test "$ac_x_libraries" = NO; then
+ # Check for the libraries.
+
+ test -z "$x_direct_test_library" && x_direct_test_library=Xt
+ test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
+
+ # See if we find them without any special options.
+ # Don't add to $LIBS permanently.
+ ac_save_LIBS="$LIBS"
+ LIBS="-l$x_direct_test_library $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 1474 "configure"
+#include "confdefs.h"
+
+int main() {
+${x_direct_test_function}()
+; return 0; }
+EOF
+if { (eval echo configure:1481: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ LIBS="$ac_save_LIBS"
+# We can link X programs with no special library path.
+ac_x_libraries=
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ LIBS="$ac_save_LIBS"
+# First see if replacing the include by lib works.
+# Check X11 before X11Rn because it is often a symlink to the current release.
+for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
+ /usr/X11/lib \
+ /usr/X11R6/lib \
+ /usr/X11R5/lib \
+ /usr/X11R4/lib \
+ \
+ /usr/lib/X11 \
+ /usr/lib/X11R6 \
+ /usr/lib/X11R5 \
+ /usr/lib/X11R4 \
+ \
+ /usr/local/X11/lib \
+ /usr/local/X11R6/lib \
+ /usr/local/X11R5/lib \
+ /usr/local/X11R4/lib \
+ \
+ /usr/local/lib/X11 \
+ /usr/local/lib/X11R6 \
+ /usr/local/lib/X11R5 \
+ /usr/local/lib/X11R4 \
+ \
+ /usr/X386/lib \
+ /usr/x386/lib \
+ /usr/XFree86/lib/X11 \
+ \
+ /usr/lib \
+ /usr/local/lib \
+ /usr/unsupported/lib \
+ /usr/athena/lib \
+ /usr/local/x11r5/lib \
+ /usr/lpp/Xamples/lib \
+ /lib/usr/lib/X11 \
+ \
+ /usr/openwin/lib \
+ /usr/openwin/share/lib \
+ ; \
+do
+ for ac_extension in a so sl; do
+ if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
+ ac_x_libraries=$ac_dir
+ break 2
+ fi
+ done
+done
+fi
+rm -f conftest*
+fi # $ac_x_libraries = NO
+
+if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
+ # Didn't find X anywhere. Cache the known absence of X.
+ ac_cv_have_x="have_x=no"
+else
+ # Record where we found X for the cache.
+ ac_cv_have_x="have_x=yes \
+ ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
+fi
+fi
+ fi
+ eval "$ac_cv_have_x"
+fi # $with_x != no
+
+if test "$have_x" != yes; then
+ echo "$ac_t""$have_x" 1>&6
+ no_x=yes
+else
+ # If each of the values was on the command line, it overrides each guess.
+ test "x$x_includes" = xNONE && x_includes=$ac_x_includes
+ test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
+ # Update the cache value to reflect the command line values.
+ ac_cv_have_x="have_x=yes \
+ ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
+ echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
+fi
+
+if test "$no_x" = yes; then
+ # Not all programs may use this symbol, but it does not hurt to define it.
+ cat >> confdefs.h <<\EOF
+#define X_DISPLAY_MISSING 1
+EOF
+
+ X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
+else
+ if test -n "$x_includes"; then
+ X_CFLAGS="$X_CFLAGS -I$x_includes"
+ fi
+
+ # It would also be nice to do this for all -L options, not just this one.
+ if test -n "$x_libraries"; then
+ X_LIBS="$X_LIBS -L$x_libraries"
+ # For Solaris; some versions of Sun CC require a space after -R and
+ # others require no space. Words are not sufficient . . . .
+ case "`(uname -sr) 2>/dev/null`" in
+ "SunOS 5"*)
+ echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6
+echo "configure:1587: checking whether -R must be followed by a space" >&5
+ ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries"
+ cat > conftest.$ac_ext <<EOF
+#line 1590 "configure"
+#include "confdefs.h"
+
+int main() {
+
+; return 0; }
+EOF
+if { (eval echo configure:1597: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ ac_R_nospace=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ ac_R_nospace=no
+fi
+rm -f conftest*
+ if test $ac_R_nospace = yes; then
+ echo "$ac_t""no" 1>&6
+ X_LIBS="$X_LIBS -R$x_libraries"
+ else
+ LIBS="$ac_xsave_LIBS -R $x_libraries"
+ cat > conftest.$ac_ext <<EOF
+#line 1613 "configure"
+#include "confdefs.h"
+
+int main() {
+
+; return 0; }
+EOF
+if { (eval echo configure:1620: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ ac_R_space=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ ac_R_space=no
+fi
+rm -f conftest*
+ if test $ac_R_space = yes; then
+ echo "$ac_t""yes" 1>&6
+ X_LIBS="$X_LIBS -R $x_libraries"
+ else
+ echo "$ac_t""neither works" 1>&6
+ fi
+ fi
+ LIBS="$ac_xsave_LIBS"
+ esac
+ fi
+
+ # Check for system-dependent libraries X programs must link with.
+ # Do this before checking for the system-independent R6 libraries
+ # (-lICE), since we may need -lsocket or whatever for X linking.
+
+ if test "$ISC" = yes; then
+ X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
+ else
+ # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X
+ # libraries were built with DECnet support. And karl@cs.umb.edu says
+ # the Alpha needs dnet_stub (dnet does not exist).
+ echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
+echo "configure:1652: checking for dnet_ntoa in -ldnet" >&5
+ac_lib_var=`echo dnet'_'dnet_ntoa | 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="-ldnet $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 1660 "configure"
+#include "confdefs.h"
+/* 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 dnet_ntoa();
+
+int main() {
+dnet_ntoa()
+; return 0; }
+EOF
+if { (eval echo configure:1671: \"$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
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
+
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+ if test $ac_cv_lib_dnet_dnet_ntoa = no; then
+ echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6
+echo "configure:1693: checking for dnet_ntoa in -ldnet_stub" >&5
+ac_lib_var=`echo dnet_stub'_'dnet_ntoa | 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="-ldnet_stub $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 1701 "configure"
+#include "confdefs.h"
+/* 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 dnet_ntoa();
+
+int main() {
+dnet_ntoa()
+; return 0; }
+EOF
+if { (eval echo configure:1712: \"$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
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
+
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+ fi
+
+ # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
+ # to get the SysV transport functions.
+ # chad@anasazi.com says the Pyramis MIS-ES running DC/OSx (SVR4)
+ # needs -lnsl.
+ # The nsl library prevents programs from opening the X display
+ # on Irix 5.2, according to dickey@clark.net.
+ echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
+echo "configure:1741: checking for gethostbyname" >&5
+if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 1746 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char gethostbyname(); below. */
+#include <assert.h>
+/* 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 gethostbyname();
+
+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_gethostbyname) || defined (__stub___gethostbyname)
+choke me
+#else
+gethostbyname();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:1769: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ eval "ac_cv_func_gethostbyname=yes"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_func_gethostbyname=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ :
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+ if test $ac_cv_func_gethostbyname = no; then
+ echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
+echo "configure:1790: checking for gethostbyname in -lnsl" >&5
+ac_lib_var=`echo nsl'_'gethostbyname | 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="-lnsl $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 1798 "configure"
+#include "confdefs.h"
+/* 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 gethostbyname();
+
+int main() {
+gethostbyname()
+; return 0; }
+EOF
+if { (eval echo configure:1809: \"$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
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
+
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+ fi
+
+ # lieder@skyler.mavd.honeywell.com says without -lsocket,
+ # socket/setsockopt and other routines are undefined under SCO ODT
+ # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary
+ # on later versions), says simon@lia.di.epfl.ch: it contains
+ # gethostby* variants that don't use the nameserver (or something).
+ # -lsocket must be given before -lnsl if both are needed.
+ # We assume that if connect needs -lnsl, so does gethostbyname.
+ echo $ac_n "checking for connect""... $ac_c" 1>&6
+echo "configure:1839: checking for connect" >&5
+if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 1844 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char connect(); below. */
+#include <assert.h>
+/* 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 connect();
+
+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_connect) || defined (__stub___connect)
+choke me
+#else
+connect();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:1867: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ eval "ac_cv_func_connect=yes"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_func_connect=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ :
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+ if test $ac_cv_func_connect = no; then
+ echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
+echo "configure:1888: checking for connect in -lsocket" >&5
+ac_lib_var=`echo socket'_'connect | 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="-lsocket $X_EXTRA_LIBS $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 1896 "configure"
+#include "confdefs.h"
+/* 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 connect();
+
+int main() {
+connect()
+; return 0; }
+EOF
+if { (eval echo configure:1907: \"$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
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
+
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+ fi
+
+ # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX.
+ echo $ac_n "checking for remove""... $ac_c" 1>&6
+echo "configure:1931: checking for remove" >&5
+if eval "test \"`echo '$''{'ac_cv_func_remove'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 1936 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char remove(); below. */
+#include <assert.h>
+/* 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 remove();
+
+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_remove) || defined (__stub___remove)
+choke me
+#else
+remove();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:1959: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ eval "ac_cv_func_remove=yes"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_func_remove=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'remove`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ :
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+ if test $ac_cv_func_remove = no; then
+ echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
+echo "configure:1980: checking for remove in -lposix" >&5
+ac_lib_var=`echo posix'_'remove | 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="-lposix $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 1988 "configure"
+#include "confdefs.h"
+/* 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 remove();
+
+int main() {
+remove()
+; return 0; }
+EOF
+if { (eval echo configure:1999: \"$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
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
+
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+ fi
+
+ # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
+ echo $ac_n "checking for shmat""... $ac_c" 1>&6
+echo "configure:2023: checking for shmat" >&5
+if eval "test \"`echo '$''{'ac_cv_func_shmat'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 2028 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char shmat(); below. */
+#include <assert.h>
+/* 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 shmat();
+
+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_shmat) || defined (__stub___shmat)
+choke me
+#else
+shmat();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:2051: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ eval "ac_cv_func_shmat=yes"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_func_shmat=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'shmat`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ :
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+ if test $ac_cv_func_shmat = no; then
+ echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
+echo "configure:2072: checking for shmat in -lipc" >&5
+ac_lib_var=`echo ipc'_'shmat | 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="-lipc $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 2080 "configure"
+#include "confdefs.h"
+/* 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 shmat();
+
+int main() {
+shmat()
+; return 0; }
+EOF
+if { (eval echo configure:2091: \"$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
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
+
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+ fi
+ fi
+
+ # Check for libraries that X11R6 Xt/Xaw programs need.
+ ac_save_LDFLAGS="$LDFLAGS"
+ test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
+ # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
+ # check for ICE first), but we must link in the order -lSM -lICE or
+ # we get undefined symbols. So assume we have SM if we have ICE.
+ # These have to be linked with before -lX11, unlike the other
+ # libraries we check for below, so use a different variable.
+ # --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
+ echo $ac_n "checking for IceConnectionNumber in -lICE""... $ac_c" 1>&6
+echo "configure:2124: checking for IceConnectionNumber in -lICE" >&5
+ac_lib_var=`echo ICE'_'IceConnectionNumber | 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="-lICE $X_EXTRA_LIBS $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 2132 "configure"
+#include "confdefs.h"
+/* 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 IceConnectionNumber();
+
+int main() {
+IceConnectionNumber()
+; return 0; }
+EOF
+if { (eval echo configure:2143: \"$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
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
+
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+ LDFLAGS="$ac_save_LDFLAGS"
+
+fi
+
+
+
+if test -z "$no_x"; then
+ HAVE_X_TRUE=
+ HAVE_X_FALSE='#'
+else
+ HAVE_X_TRUE='#'
+ HAVE_X_FALSE=
+fi
+
+
echo $ac_n "checking for zlibVersion in -lz""... $ac_c" 1>&6
-echo "configure:1114: checking for zlibVersion in -lz" >&5
+echo "configure:2184: checking for zlibVersion in -lz" >&5
ac_lib_var=`echo z'_'zlibVersion | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -1118,7 +2188,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lz $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 1122 "configure"
+#line 2192 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -1129,7 +2199,7 @@ int main() {
zlibVersion()
; return 0; }
EOF
-if { (eval echo configure:1133: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2203: \"$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
@@ -1151,7 +2221,7 @@ Z_LIB=
fi
echo $ac_n "checking for ax25_config_load_ports in -lax25""... $ac_c" 1>&6
-echo "configure:1155: checking for ax25_config_load_ports in -lax25" >&5
+echo "configure:2225: checking for ax25_config_load_ports in -lax25" >&5
ac_lib_var=`echo ax25'_'ax25_config_load_ports | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -1159,7 +2229,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lax25 $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 1163 "configure"
+#line 2233 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -1170,7 +2240,7 @@ int main() {
ax25_config_load_ports()
; return 0; }
EOF
-if { (eval echo configure:1174: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2244: \"$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
@@ -1192,7 +2262,7 @@ else
fi
echo $ac_n "checking for initscr in -lncurses""... $ac_c" 1>&6
-echo "configure:1196: checking for initscr in -lncurses" >&5
+echo "configure:2266: checking for initscr in -lncurses" >&5
ac_lib_var=`echo ncurses'_'initscr | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -1200,7 +2270,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lncurses $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 1204 "configure"
+#line 2274 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -1211,7 +2281,7 @@ int main() {
initscr()
; return 0; }
EOF
-if { (eval echo configure:1215: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2285: \"$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
@@ -1233,7 +2303,7 @@ NCURSES_LIB=
fi
echo $ac_n "checking for openpty in -lutil""... $ac_c" 1>&6
-echo "configure:1237: checking for openpty in -lutil" >&5
+echo "configure:2307: checking for openpty in -lutil" >&5
ac_lib_var=`echo util'_'openpty | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -1241,7 +2311,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lutil $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 1245 "configure"
+#line 2315 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -1252,7 +2322,7 @@ int main() {
openpty()
; return 0; }
EOF
-if { (eval echo configure:1256: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2326: \"$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
@@ -1273,95 +2343,62 @@ else
UTIL_LIB=
fi
-
-
-echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:1280: checking how to run the C preprocessor" >&5
-# On Suns, sometimes $CPP names a directory.
-if test -n "$CPP" && test -d "$CPP"; then
- CPP=
-fi
-if test -z "$CPP"; then
-if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
+echo $ac_n "checking for main in -lfltk""... $ac_c" 1>&6
+echo "configure:2348: checking for main in -lfltk" >&5
+ac_lib_var=`echo fltk'_'main | 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
- # This must be in double quotes, not single quotes, because CPP may get
- # substituted into the Makefile and "${CC-cc}" will confuse make.
- CPP="${CC-cc} -E"
- # On the NeXT, cc -E runs the code through the compiler's parser,
- # not just through cpp.
- cat > conftest.$ac_ext <<EOF
-#line 1295 "configure"
-#include "confdefs.h"
-#include <assert.h>
-Syntax Error
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1301: \"$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
- :
-else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- CPP="${CC-cc} -E -traditional-cpp"
- cat > conftest.$ac_ext <<EOF
-#line 1312 "configure"
+ ac_save_LIBS="$LIBS"
+LIBS="-lfltk ${X_LIBS} -lX11 -lXext -lMesaGL $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 2356 "configure"
#include "confdefs.h"
-#include <assert.h>
-Syntax Error
+
+int main() {
+main()
+; return 0; }
EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1318: \"$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
- :
-else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
+if { (eval echo configure:2363: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
- CPP="${CC-cc} -nologo -E"
- cat > conftest.$ac_ext <<EOF
-#line 1329 "configure"
-#include "confdefs.h"
-#include <assert.h>
-Syntax Error
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1335: \"$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
- :
+ eval "ac_cv_lib_$ac_lib_var=yes"
else
- echo "$ac_err" >&5
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
- CPP=/lib/cpp
-fi
-rm -f conftest*
+ eval "ac_cv_lib_$ac_lib_var=no"
fi
rm -f conftest*
+LIBS="$ac_save_LIBS"
+
fi
-rm -f conftest*
- ac_cv_prog_CPP="$CPP"
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ FLTK_LIB="-lfltk -lMesaGL"
+else
+ echo "$ac_t""no" 1>&6
+FLTK_LIB=
fi
- CPP="$ac_cv_prog_CPP"
+
+
+
+
+if test -n "$FLTK_LIB" ; then
+ HAVE_FLTK_TRUE=
+ HAVE_FLTK_FALSE='#'
else
- ac_cv_prog_CPP="$CPP"
+ HAVE_FLTK_TRUE='#'
+ HAVE_FLTK_FALSE=
fi
-echo "$ac_t""$CPP" 1>&6
+
echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
-echo "configure:1360: checking for ANSI C header files" >&5
+echo "configure:2397: 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 <<EOF
-#line 1365 "configure"
+#line 2402 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <stdarg.h>
@@ -1369,7 +2406,7 @@ else
#include <float.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1373: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2410: \"$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*
@@ -1386,7 +2423,7 @@ rm -f conftest*
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
-#line 1390 "configure"
+#line 2427 "configure"
#include "confdefs.h"
#include <string.h>
EOF
@@ -1404,7 +2441,7 @@ fi
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
-#line 1408 "configure"
+#line 2445 "configure"
#include "confdefs.h"
#include <stdlib.h>
EOF
@@ -1425,7 +2462,7 @@ if test "$cross_compiling" = yes; then
:
else
cat > conftest.$ac_ext <<EOF
-#line 1429 "configure"
+#line 2466 "configure"
#include "confdefs.h"
#include <ctype.h>
#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
@@ -1436,7 +2473,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
exit (0); }
EOF
-if { (eval echo configure:1440: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:2477: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
:
else
@@ -1460,12 +2497,12 @@ EOF
fi
echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
-echo "configure:1464: checking for sys/wait.h that is POSIX.1 compatible" >&5
+echo "configure:2501: 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 <<EOF
-#line 1469 "configure"
+#line 2506 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/wait.h>
@@ -1481,7 +2518,7 @@ wait (&s);
s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
; return 0; }
EOF
-if { (eval echo configure:1485: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2522: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_header_sys_wait_h=yes
else
@@ -1505,17 +2542,17 @@ for ac_hdr in fcntl.h limits.h paths.h strings.h sys/file.h sys/ioctl.h sys/time
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:1509: checking for $ac_hdr" >&5
+echo "configure:2546: 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
-#line 1514 "configure"
+#line 2551 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1519: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2556: \"$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*
@@ -1546,17 +2583,17 @@ for ac_hdr in linux/dmascc.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:1550: checking for $ac_hdr" >&5
+echo "configure:2587: 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
-#line 1555 "configure"
+#line 2592 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1560: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2597: \"$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*
@@ -1585,9 +2622,9 @@ done
echo $ac_n "checking for working netax25/ax25.h header file""... $ac_c" 1>&6
-echo "configure:1589: checking for working netax25/ax25.h header file" >&5
+echo "configure:2626: checking for working netax25/ax25.h header file" >&5
cat > conftest.$ac_ext <<EOF
-#line 1591 "configure"
+#line 2628 "configure"
#include "confdefs.h"
#include <netax25/ax25.h>
EOF
@@ -1605,9 +2642,9 @@ fi
rm -f conftest*
echo $ac_n "checking for working netrom/netrom.h header file""... $ac_c" 1>&6
-echo "configure:1609: checking for working netrom/netrom.h header file" >&5
+echo "configure:2646: checking for working netrom/netrom.h header file" >&5
cat > conftest.$ac_ext <<EOF
-#line 1611 "configure"
+#line 2648 "configure"
#include "confdefs.h"
#include <netrom/netrom.h>
EOF
@@ -1625,9 +2662,9 @@ fi
rm -f conftest*
echo $ac_n "checking for working netrose/rose.h header file""... $ac_c" 1>&6
-echo "configure:1629: checking for working netrose/rose.h header file" >&5
+echo "configure:2666: checking for working netrose/rose.h header file" >&5
cat > conftest.$ac_ext <<EOF
-#line 1631 "configure"
+#line 2668 "configure"
#include "confdefs.h"
#include <netrose/rose.h>
EOF
@@ -1646,12 +2683,12 @@ rm -f conftest*
echo $ac_n "checking for working const""... $ac_c" 1>&6
-echo "configure:1650: checking for working const" >&5
+echo "configure:2687: 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 <<EOF
-#line 1655 "configure"
+#line 2692 "configure"
#include "confdefs.h"
int main() {
@@ -1700,7 +2737,7 @@ ccp = (char const *const *) p;
; return 0; }
EOF
-if { (eval echo configure:1704: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2741: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_const=yes
else
@@ -1721,12 +2758,12 @@ EOF
fi
echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
-echo "configure:1725: checking for uid_t in sys/types.h" >&5
+echo "configure:2762: checking for uid_t in sys/types.h" >&5
if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1730 "configure"
+#line 2767 "configure"
#include "confdefs.h"
#include <sys/types.h>
EOF
@@ -1755,12 +2792,12 @@ EOF
fi
echo $ac_n "checking for pid_t""... $ac_c" 1>&6
-echo "configure:1759: checking for pid_t" >&5
+echo "configure:2796: checking for pid_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1764 "configure"
+#line 2801 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
@@ -1788,12 +2825,12 @@ EOF
fi
echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
-echo "configure:1792: checking whether time.h and sys/time.h may both be included" >&5
+echo "configure:2829: 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 <<EOF
-#line 1797 "configure"
+#line 2834 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/time.h>
@@ -1802,7 +2839,7 @@ int main() {
struct tm *tp;
; return 0; }
EOF
-if { (eval echo configure:1806: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2843: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_header_time=yes
else
@@ -1823,12 +2860,12 @@ EOF
fi
echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
-echo "configure:1827: checking whether struct tm is in sys/time.h or time.h" >&5
+echo "configure:2864: checking whether struct tm is in sys/time.h or time.h" >&5
if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1832 "configure"
+#line 2869 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <time.h>
@@ -1836,7 +2873,7 @@ int main() {
struct tm *tp; tp->tm_sec;
; return 0; }
EOF
-if { (eval echo configure:1840: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2877: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_struct_tm=time.h
else
@@ -1859,13 +2896,13 @@ fi
if test $ac_cv_prog_gcc = yes; then
echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6
-echo "configure:1863: checking whether ${CC-cc} needs -traditional" >&5
+echo "configure:2900: checking whether ${CC-cc} needs -traditional" >&5
if eval "test \"`echo '$''{'ac_cv_prog_gcc_traditional'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_pattern="Autoconf.*'x'"
cat > conftest.$ac_ext <<EOF
-#line 1869 "configure"
+#line 2906 "configure"
#include "confdefs.h"
#include <sgtty.h>
Autoconf TIOCGETP
@@ -1883,7 +2920,7 @@ rm -f conftest*
if test $ac_cv_prog_gcc_traditional = no; then
cat > conftest.$ac_ext <<EOF
-#line 1887 "configure"
+#line 2924 "configure"
#include "confdefs.h"
#include <termio.h>
Autoconf TCGETA
@@ -1905,7 +2942,7 @@ echo "$ac_t""$ac_cv_prog_gcc_traditional" 1>&6
fi
echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
-echo "configure:1909: checking for 8-bit clean memcmp" >&5
+echo "configure:2946: 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
@@ -1913,7 +2950,7 @@ else
ac_cv_func_memcmp_clean=no
else
cat > conftest.$ac_ext <<EOF
-#line 1917 "configure"
+#line 2954 "configure"
#include "confdefs.h"
main()
@@ -1923,7 +2960,7 @@ main()
}
EOF
-if { (eval echo configure:1927: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:2964: \"$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
@@ -1941,7 +2978,7 @@ echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
echo $ac_n "checking whether setpgrp takes no argument""... $ac_c" 1>&6
-echo "configure:1945: checking whether setpgrp takes no argument" >&5
+echo "configure:2982: checking whether setpgrp takes no argument" >&5
if eval "test \"`echo '$''{'ac_cv_func_setpgrp_void'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1949,7 +2986,7 @@ else
{ echo "configure: error: cannot check setpgrp if cross compiling" 1>&2; exit 1; }
else
cat > conftest.$ac_ext <<EOF
-#line 1953 "configure"
+#line 2990 "configure"
#include "confdefs.h"
#ifdef HAVE_UNISTD_H
@@ -1969,7 +3006,7 @@ main()
}
EOF
-if { (eval echo configure:1973: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:3010: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_func_setpgrp_void=no
else
@@ -1993,12 +3030,12 @@ EOF
fi
echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
-echo "configure:1997: checking return type of signal handlers" >&5
+echo "configure:3034: 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 <<EOF
-#line 2002 "configure"
+#line 3039 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <signal.h>
@@ -2015,7 +3052,7 @@ int main() {
int i;
; return 0; }
EOF
-if { (eval echo configure:2019: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3056: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_type_signal=void
else
@@ -2034,12 +3071,12 @@ EOF
echo $ac_n "checking for strftime""... $ac_c" 1>&6
-echo "configure:2038: checking for strftime" >&5
+echo "configure:3075: checking for strftime" >&5
if eval "test \"`echo '$''{'ac_cv_func_strftime'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2043 "configure"
+#line 3080 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char strftime(); below. */
@@ -2062,7 +3099,7 @@ strftime();
; return 0; }
EOF
-if { (eval echo configure:2066: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3103: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_strftime=yes"
else
@@ -2084,7 +3121,7 @@ else
echo "$ac_t""no" 1>&6
# strftime is in -lintl on SCO UNIX.
echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
-echo "configure:2088: checking for strftime in -lintl" >&5
+echo "configure:3125: checking for strftime in -lintl" >&5
ac_lib_var=`echo intl'_'strftime | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -2092,7 +3129,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lintl $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 2096 "configure"
+#line 3133 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -2103,7 +3140,7 @@ int main() {
strftime()
; return 0; }
EOF
-if { (eval echo configure:2107: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3144: \"$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
@@ -2130,7 +3167,7 @@ fi
fi
echo $ac_n "checking for wait3 that fills in rusage""... $ac_c" 1>&6
-echo "configure:2134: checking for wait3 that fills in rusage" >&5
+echo "configure:3171: checking for wait3 that fills in rusage" >&5
if eval "test \"`echo '$''{'ac_cv_func_wait3_rusage'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2138,7 +3175,7 @@ else
ac_cv_func_wait3_rusage=no
else
cat > conftest.$ac_ext <<EOF
-#line 2142 "configure"
+#line 3179 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/time.h>
@@ -2169,7 +3206,7 @@ main() {
}
}
EOF
-if { (eval echo configure:2173: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:3210: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_func_wait3_rusage=yes
else
@@ -2194,12 +3231,12 @@ fi
for ac_func in gethostname gettimeofday mkdir select socket strdup strerror strspn strstr strtol strtoul uname
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2198: checking for $ac_func" >&5
+echo "configure:3235: 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 <<EOF
-#line 2203 "configure"
+#line 3240 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -2222,7 +3259,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:2226: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3263: \"$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
@@ -2354,7 +3391,7 @@ done
ac_given_srcdir=$srcdir
ac_given_INSTALL="$INSTALL"
-trap 'rm -fr `echo "netrom/Makefile tcpip/Makefile ax25/Makefile Makefile rose/Makefile user_call/Makefile kiss/Makefile hdlcutil/Makefile yamdrv/Makefile dmascc/Makefile config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
+trap 'rm -fr `echo "netrom/Makefile tcpip/Makefile ax25/Makefile Makefile rose/Makefile user_call/Makefile kiss/Makefile hdlcutil/Makefile hdlcutil/fl/Makefile yamdrv/Makefile dmascc/Makefile config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
EOF
cat >> $CONFIG_STATUS <<EOF
@@ -2399,12 +3436,22 @@ s%@MAKEINFO@%$MAKEINFO%g
s%@SET_MAKE@%$SET_MAKE%g
s%@AWK@%$AWK%g
s%@CC@%$CC%g
+s%@CXX@%$CXX%g
+s%@CPP@%$CPP%g
+s%@X_CFLAGS@%$X_CFLAGS%g
+s%@X_PRE_LIBS@%$X_PRE_LIBS%g
+s%@X_LIBS@%$X_LIBS%g
+s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g
+s%@HAVE_X_TRUE@%$HAVE_X_TRUE%g
+s%@HAVE_X_FALSE@%$HAVE_X_FALSE%g
s%@Z_LIB@%$Z_LIB%g
s%@AX25_LIB@%$AX25_LIB%g
s%@AX25IO_LIB@%$AX25IO_LIB%g
s%@NCURSES_LIB@%$NCURSES_LIB%g
s%@UTIL_LIB@%$UTIL_LIB%g
-s%@CPP@%$CPP%g
+s%@FLTK_LIB@%$FLTK_LIB%g
+s%@HAVE_FLTK_TRUE@%$HAVE_FLTK_TRUE%g
+s%@HAVE_FLTK_FALSE@%$HAVE_FLTK_FALSE%g
s%@DMASCC@%$DMASCC%g
s%@LIBOBJS@%$LIBOBJS%g
@@ -2448,7 +3495,7 @@ EOF
cat >> $CONFIG_STATUS <<EOF
-CONFIG_FILES=\${CONFIG_FILES-"netrom/Makefile tcpip/Makefile ax25/Makefile Makefile rose/Makefile user_call/Makefile kiss/Makefile hdlcutil/Makefile yamdrv/Makefile dmascc/Makefile"}
+CONFIG_FILES=\${CONFIG_FILES-"netrom/Makefile tcpip/Makefile ax25/Makefile Makefile rose/Makefile user_call/Makefile kiss/Makefile hdlcutil/Makefile hdlcutil/fl/Makefile yamdrv/Makefile dmascc/Makefile"}
EOF
cat >> $CONFIG_STATUS <<\EOF
for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
diff --git a/configure.in b/configure.in
index f6946f7..a0330ef 100644
--- a/configure.in
+++ b/configure.in
@@ -2,7 +2,7 @@ dnl Process this file with autoconf to produce a configure script.
AC_INIT(ax25/ax25d.c)
dnl For automake
-VERSION=0.0.5
+VERSION=0.0.6
PACKAGE=ax25-tools
AM_INIT_AUTOMAKE($PACKAGE,$VERSION)
@@ -13,20 +13,28 @@ AM_CONFIG_HEADER(config.h)
dnl Checks for programs.
AC_PROG_AWK
AC_PROG_CC
+AC_PROG_CXX
AC_PROG_INSTALL
+dnl Check for X and set a conditional
+AC_PATH_XTRA
+AM_CONDITIONAL(HAVE_X, test -z "$no_x")
+
dnl Checks for libraries.
AC_SUBST(Z_LIB)
AC_SUBST(AX25_LIB)
AC_SUBST(AX25IO_LIB)
AC_SUBST(NCURSES_LIB)
AC_SUBST(UTIL_LIB)
+AC_SUBST(FLTK_LIB)
AC_CHECK_LIB(z, zlibVersion,Z_LIB="-lz",Z_LIB=)
AC_CHECK_LIB(ax25, ax25_config_load_ports, AX25_LIB="-lax25", AC_MSG_ERROR(Could not find the libax25 libraries; aborting))
AC_CHECK_LIB(ncurses, initscr,NCURSES_LIB="-lncurses",NCURSES_LIB=)
AC_CHECK_LIB(util, openpty, UTIL_LIB="-lutil",UTIL_LIB=)
+AC_CHECK_LIB(fltk, main, FLTK_LIB="-lfltk -lMesaGL", FLTK_LIB=,${X_LIBS} -lX11 -lXext -lMesaGL)
+
+AM_CONDITIONAL(HAVE_FLTK, test -n "$FLTK_LIB" )
-dnl AC_PATH_XTRA
dnl Checks for header files.
dnl AC_PATH_X
@@ -67,4 +75,4 @@ if test "x$GCC" = "xyes"; then
fi
fi
-AC_OUTPUT(netrom/Makefile tcpip/Makefile ax25/Makefile Makefile rose/Makefile user_call/Makefile kiss/Makefile hdlcutil/Makefile yamdrv/Makefile dmascc/Makefile)
+AC_OUTPUT(netrom/Makefile tcpip/Makefile ax25/Makefile Makefile rose/Makefile user_call/Makefile kiss/Makefile hdlcutil/Makefile hdlcutil/fl/Makefile yamdrv/Makefile dmascc/Makefile)
diff --git a/dmascc/Makefile.in b/dmascc/Makefile.in
index 86403b0..e131e4a 100644
--- a/dmascc/Makefile.in
+++ b/dmascc/Makefile.in
@@ -61,7 +61,9 @@ AWK = @AWK@
AX25IO_LIB = @AX25IO_LIB@
AX25_LIB = @AX25_LIB@
CC = @CC@
+CXX = @CXX@
DMASCC = @DMASCC@
+FLTK_LIB = @FLTK_LIB@
MAKEINFO = @MAKEINFO@
NCURSES_LIB = @NCURSES_LIB@
PACKAGE = @PACKAGE@
@@ -89,6 +91,10 @@ DEFS = @DEFS@ -I. -I$(srcdir) -I..
CPPFLAGS = @CPPFLAGS@
LDFLAGS = @LDFLAGS@
LIBS = @LIBS@
+X_CFLAGS = @X_CFLAGS@
+X_LIBS = @X_LIBS@
+X_EXTRA_LIBS = @X_EXTRA_LIBS@
+X_PRE_LIBS = @X_PRE_LIBS@
dmascc_cfg_SOURCES = dmascc_cfg.c
dmascc_cfg_OBJECTS = dmascc_cfg.o
dmascc_cfg_LDADD = $(LDADD)
diff --git a/hdlcutil/Makefile.am b/hdlcutil/Makefile.am
index 3584a38..19e06b5 100644
--- a/hdlcutil/Makefile.am
+++ b/hdlcutil/Makefile.am
@@ -1,24 +1,27 @@
-installconf:
+if HAVE_X
+X11_bin_programs = smdiag
+endif
-sbin_PROGRAMS = setcrystal sethdlc smmixer
+if HAVE_FLTK
+SUBDIRS = fl
+endif
-man_MANS = sethdlc.8 smmixer.8 baycom.9 hdlcdrv.9 soundmodem.9
+bin_PROGRAMS = sethdlc smmixer $(X11_bin_programs)
-EXTRA_DIST = $(man_MANS)
+sethdlc_SOURCES = sethdlc.c hdrvcomm.c hdrvcomm.h usersmdiag.h
+smmixer_SOURCES = smmixer.c hdrvcomm.c hdrvcomm.h usersmdiag.h
+smdiag_SOURCES = smdiag.c hdrvcomm.c hdrvcomm.h usersmdiag.h
-setcrystal_SOURCES = \
- setcrystal.c
+smdiag_LDADD = $(X_LIBS) -lX11 $(X_EXTRA_LIBS)
-sethdlc_SOURCES = \
- sethdlc.c \
- hdrvcomm.c \
- hdrvcomm.h \
- usersmdiag.h
+INCLUDES = -DAX25_SYSCONFDIR=\""$(AX25_SYSCONFDIR)"\" \
+ -DAX25_LOCALSTATEDIR=\""$(AX25_LOCALSTATEDIR)"\"
-smmixer_SOURCES = \
- smmixer.c \
- hdrvcomm.c \
- hdrvcomm.h \
- usersmdiag.h
+AX25_SYSCONFDIR=$(sysconfdir)/ax25/
+AX25_LOCALSTATEDIR=$(localstatedir)/ax25/
+
+man_MANS = sethdlc.8 smmixer.8 baycom.9 hdlcdrv.9 soundmodem.9 smdiag.8
+
+EXTRA_DIST = $(man_MANS)
diff --git a/hdlcutil/Makefile.in b/hdlcutil/Makefile.in
index 555b55b..1949033 100644
--- a/hdlcutil/Makefile.in
+++ b/hdlcutil/Makefile.in
@@ -61,7 +61,9 @@ AWK = @AWK@
AX25IO_LIB = @AX25IO_LIB@
AX25_LIB = @AX25_LIB@
CC = @CC@
+CXX = @CXX@
DMASCC = @DMASCC@
+FLTK_LIB = @FLTK_LIB@
MAKEINFO = @MAKEINFO@
NCURSES_LIB = @NCURSES_LIB@
PACKAGE = @PACKAGE@
@@ -69,34 +71,41 @@ UTIL_LIB = @UTIL_LIB@
VERSION = @VERSION@
Z_LIB = @Z_LIB@
-sbin_PROGRAMS = setcrystal sethdlc smmixer
+@HAVE_X_TRUE@X11_bin_programs = smdiag
-man_MANS = sethdlc.8 smmixer.8 baycom.9 hdlcdrv.9 soundmodem.9
+@HAVE_FLTK_TRUE@SUBDIRS = fl
-EXTRA_DIST = $(man_MANS)
+bin_PROGRAMS = sethdlc smmixer $(X11_bin_programs)
-setcrystal_SOURCES = setcrystal.c
+sethdlc_SOURCES = sethdlc.c hdrvcomm.c hdrvcomm.h usersmdiag.h
+smmixer_SOURCES = smmixer.c hdrvcomm.c hdrvcomm.h usersmdiag.h
+smdiag_SOURCES = smdiag.c hdrvcomm.c hdrvcomm.h usersmdiag.h
+smdiag_LDADD = $(X_LIBS) -lX11 $(X_EXTRA_LIBS)
-sethdlc_SOURCES = sethdlc.c hdrvcomm.c hdrvcomm.h usersmdiag.h
+INCLUDES = -DAX25_SYSCONFDIR=\""$(AX25_SYSCONFDIR)"\" -DAX25_LOCALSTATEDIR=\""$(AX25_LOCALSTATEDIR)"\"
-smmixer_SOURCES = smmixer.c hdrvcomm.c hdrvcomm.h usersmdiag.h
+AX25_SYSCONFDIR = $(sysconfdir)/ax25/
+AX25_LOCALSTATEDIR = $(localstatedir)/ax25/
+man_MANS = sethdlc.8 smmixer.8 baycom.9 hdlcdrv.9 soundmodem.9 smdiag.8
+
+EXTRA_DIST = $(man_MANS)
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = ../config.h
CONFIG_CLEAN_FILES =
-PROGRAMS = $(sbin_PROGRAMS)
+PROGRAMS = $(bin_PROGRAMS)
DEFS = @DEFS@ -I. -I$(srcdir) -I..
CPPFLAGS = @CPPFLAGS@
LDFLAGS = @LDFLAGS@
LIBS = @LIBS@
-setcrystal_OBJECTS = setcrystal.o
-setcrystal_LDADD = $(LDADD)
-setcrystal_DEPENDENCIES =
-setcrystal_LDFLAGS =
+X_CFLAGS = @X_CFLAGS@
+X_LIBS = @X_LIBS@
+X_EXTRA_LIBS = @X_EXTRA_LIBS@
+X_PRE_LIBS = @X_PRE_LIBS@
sethdlc_OBJECTS = sethdlc.o hdrvcomm.o
sethdlc_LDADD = $(LDADD)
sethdlc_DEPENDENCIES =
@@ -105,6 +114,9 @@ smmixer_OBJECTS = smmixer.o hdrvcomm.o
smmixer_LDADD = $(LDADD)
smmixer_DEPENDENCIES =
smmixer_LDFLAGS =
+smdiag_OBJECTS = smdiag.o hdrvcomm.o
+smdiag_DEPENDENCIES =
+smdiag_LDFLAGS =
CFLAGS = @CFLAGS@
COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
CCLD = $(CC)
@@ -121,8 +133,9 @@ DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
TAR = tar
GZIP_ENV = --best
-SOURCES = $(setcrystal_SOURCES) $(sethdlc_SOURCES) $(smmixer_SOURCES)
-OBJECTS = $(setcrystal_OBJECTS) $(sethdlc_OBJECTS) $(smmixer_OBJECTS)
+DIST_SUBDIRS = fl
+SOURCES = $(sethdlc_SOURCES) $(smmixer_SOURCES) $(smdiag_SOURCES)
+OBJECTS = $(sethdlc_OBJECTS) $(smmixer_OBJECTS) $(smdiag_OBJECTS)
all: all-redirect
.SUFFIXES:
@@ -135,29 +148,29 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
&& CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
-mostlyclean-sbinPROGRAMS:
+mostlyclean-binPROGRAMS:
-clean-sbinPROGRAMS:
- -test -z "$(sbin_PROGRAMS)" || rm -f $(sbin_PROGRAMS)
+clean-binPROGRAMS:
+ -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS)
-distclean-sbinPROGRAMS:
+distclean-binPROGRAMS:
-maintainer-clean-sbinPROGRAMS:
+maintainer-clean-binPROGRAMS:
-install-sbinPROGRAMS: $(sbin_PROGRAMS)
+install-binPROGRAMS: $(bin_PROGRAMS)
@$(NORMAL_INSTALL)
- $(mkinstalldirs) $(DESTDIR)$(sbindir)
- @list='$(sbin_PROGRAMS)'; for p in $$list; do \
+ $(mkinstalldirs) $(DESTDIR)$(bindir)
+ @list='$(bin_PROGRAMS)'; for p in $$list; do \
if test -f $$p; then \
- echo " $(INSTALL_PROGRAM) $$p $(DESTDIR)$(sbindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`"; \
- $(INSTALL_PROGRAM) $$p $(DESTDIR)$(sbindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \
+ echo " $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`"; \
+ $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \
else :; fi; \
done
-uninstall-sbinPROGRAMS:
+uninstall-binPROGRAMS:
@$(NORMAL_UNINSTALL)
- list='$(sbin_PROGRAMS)'; for p in $$list; do \
- rm -f $(DESTDIR)$(sbindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \
+ list='$(bin_PROGRAMS)'; for p in $$list; do \
+ rm -f $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \
done
.c.o:
@@ -179,10 +192,6 @@ distclean-compile:
maintainer-clean-compile:
-setcrystal: $(setcrystal_OBJECTS) $(setcrystal_DEPENDENCIES)
- @rm -f setcrystal
- $(LINK) $(setcrystal_LDFLAGS) $(setcrystal_OBJECTS) $(setcrystal_LDADD) $(LIBS)
-
sethdlc: $(sethdlc_OBJECTS) $(sethdlc_DEPENDENCIES)
@rm -f sethdlc
$(LINK) $(sethdlc_LDFLAGS) $(sethdlc_OBJECTS) $(sethdlc_LDADD) $(LIBS)
@@ -191,6 +200,10 @@ smmixer: $(smmixer_OBJECTS) $(smmixer_DEPENDENCIES)
@rm -f smmixer
$(LINK) $(smmixer_LDFLAGS) $(smmixer_OBJECTS) $(smmixer_LDADD) $(LIBS)
+smdiag: $(smdiag_OBJECTS) $(smdiag_DEPENDENCIES)
+ @rm -f smdiag
+ $(LINK) $(smdiag_LDFLAGS) $(smdiag_OBJECTS) $(smdiag_LDADD) $(LIBS)
+
install-man8:
$(mkinstalldirs) $(DESTDIR)$(man8dir)
@list='$(man8_MANS)'; \
@@ -263,6 +276,61 @@ uninstall-man:
@$(NORMAL_UNINSTALL)
$(MAKE) $(AM_MAKEFLAGS) uninstall-man8 uninstall-man9
+# This directory's subdirectories are mostly independent; you can cd
+# into them and run `make' without going through this Makefile.
+# To change the values of `make' variables: instead of editing Makefiles,
+# (1) if the variable is set in `config.status', edit `config.status'
+# (which will cause the Makefiles to be regenerated when you run `make');
+# (2) otherwise, pass the desired values on the `make' command line.
+
+@SET_MAKE@
+
+all-recursive install-data-recursive install-exec-recursive \
+installdirs-recursive install-recursive uninstall-recursive \
+check-recursive installcheck-recursive info-recursive dvi-recursive:
+ @set fnord $(MAKEFLAGS); amf=$$2; \
+ dot_seen=no; \
+ target=`echo $@ | sed s/-recursive//`; \
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ echo "Making $$target in $$subdir"; \
+ if test "$$subdir" = "."; then \
+ dot_seen=yes; \
+ local_target="$$target-am"; \
+ else \
+ local_target="$$target"; \
+ fi; \
+ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+ || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
+ done; \
+ if test "$$dot_seen" = "no"; then \
+ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
+ fi; test -z "$$fail"
+
+mostlyclean-recursive clean-recursive distclean-recursive \
+maintainer-clean-recursive:
+ @set fnord $(MAKEFLAGS); amf=$$2; \
+ dot_seen=no; \
+ rev=''; list='$(SUBDIRS)'; for subdir in $$list; do \
+ rev="$$subdir $$rev"; \
+ test "$$subdir" = "." && dot_seen=yes; \
+ done; \
+ test "$$dot_seen" = "no" && rev=". $$rev"; \
+ target=`echo $@ | sed s/-recursive//`; \
+ for subdir in $$rev; do \
+ echo "Making $$target in $$subdir"; \
+ if test "$$subdir" = "."; then \
+ local_target="$$target-am"; \
+ else \
+ local_target="$$target"; \
+ fi; \
+ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+ || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
+ done && test -z "$$fail"
+tags-recursive:
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
+ done
+
tags: TAGS
ID: $(HEADERS) $(SOURCES) $(LISP)
@@ -273,9 +341,14 @@ ID: $(HEADERS) $(SOURCES) $(LISP)
here=`pwd` && cd $(srcdir) \
&& mkid -f$$here/ID $$unique $(LISP)
-TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP)
+TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP)
tags=; \
here=`pwd`; \
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ test -f $$subdir/TAGS && tags="$$tags -i $$here/$$subdir/TAGS"; \
+ fi; \
+ done; \
list='$(SOURCES) $(HEADERS)'; \
unique=`for i in $$list; do echo $$i; done | \
awk ' { files[$$0] = 1; } \
@@ -307,32 +380,43 @@ distdir: $(DISTFILES)
|| cp -p $$d/$$file $(distdir)/$$file || :; \
fi; \
done
+ for subdir in $(DIST_SUBDIRS); do \
+ if test "$$subdir" = .; then :; else \
+ test -d $(distdir)/$$subdir \
+ || mkdir $(distdir)/$$subdir \
+ || exit 1; \
+ chmod 777 $(distdir)/$$subdir; \
+ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir=../$(top_distdir) distdir=../$(distdir)/$$subdir distdir) \
+ || exit 1; \
+ fi; \
+ done
info-am:
-info: info-am
+info: info-recursive
dvi-am:
-dvi: dvi-am
+dvi: dvi-recursive
check-am: all-am
-check: check-am
+check: check-recursive
installcheck-am:
-installcheck: installcheck-am
-install-exec-am: install-sbinPROGRAMS
-install-exec: install-exec-am
+installcheck: installcheck-recursive
+install-exec-am: install-binPROGRAMS
+install-exec: install-exec-recursive
install-data-am: install-man
-install-data: install-data-am
+install-data: install-data-recursive
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-install: install-am
-uninstall-am: uninstall-sbinPROGRAMS uninstall-man
-uninstall: uninstall-am
+install: install-recursive
+uninstall-am: uninstall-binPROGRAMS uninstall-man
+uninstall: uninstall-recursive
all-am: Makefile $(PROGRAMS) $(MANS)
-all-redirect: all-am
+all-redirect: all-recursive
install-strip:
$(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
-installdirs:
- $(mkinstalldirs) $(DESTDIR)$(sbindir) $(DESTDIR)$(mandir)/man8 \
+installdirs: installdirs-recursive
+installdirs-am:
+ $(mkinstalldirs) $(DESTDIR)$(bindir) $(DESTDIR)$(mandir)/man8 \
$(DESTDIR)$(mandir)/man9
@@ -345,44 +429,47 @@ distclean-generic:
-rm -f config.cache config.log stamp-h stamp-h[0-9]*
maintainer-clean-generic:
-mostlyclean-am: mostlyclean-sbinPROGRAMS mostlyclean-compile \
+mostlyclean-am: mostlyclean-binPROGRAMS mostlyclean-compile \
mostlyclean-tags mostlyclean-generic
-mostlyclean: mostlyclean-am
+mostlyclean: mostlyclean-recursive
-clean-am: clean-sbinPROGRAMS clean-compile clean-tags clean-generic \
+clean-am: clean-binPROGRAMS clean-compile clean-tags clean-generic \
mostlyclean-am
-clean: clean-am
+clean: clean-recursive
-distclean-am: distclean-sbinPROGRAMS distclean-compile distclean-tags \
+distclean-am: distclean-binPROGRAMS distclean-compile distclean-tags \
distclean-generic clean-am
-distclean: distclean-am
+distclean: distclean-recursive
-maintainer-clean-am: maintainer-clean-sbinPROGRAMS \
+maintainer-clean-am: maintainer-clean-binPROGRAMS \
maintainer-clean-compile maintainer-clean-tags \
maintainer-clean-generic distclean-am
@echo "This command is intended for maintainers to use;"
@echo "it deletes files that may require special tools to rebuild."
-maintainer-clean: maintainer-clean-am
-
-.PHONY: mostlyclean-sbinPROGRAMS distclean-sbinPROGRAMS \
-clean-sbinPROGRAMS maintainer-clean-sbinPROGRAMS uninstall-sbinPROGRAMS \
-install-sbinPROGRAMS mostlyclean-compile distclean-compile \
-clean-compile maintainer-clean-compile install-man8 uninstall-man8 \
-install-man9 uninstall-man9 install-man uninstall-man tags \
-mostlyclean-tags distclean-tags clean-tags maintainer-clean-tags \
-distdir info-am info dvi-am dvi check check-am installcheck-am \
-installcheck install-exec-am install-exec install-data-am install-data \
-install-am install uninstall-am uninstall all-redirect all-am all \
+maintainer-clean: maintainer-clean-recursive
+
+.PHONY: mostlyclean-binPROGRAMS distclean-binPROGRAMS clean-binPROGRAMS \
+maintainer-clean-binPROGRAMS uninstall-binPROGRAMS install-binPROGRAMS \
+mostlyclean-compile distclean-compile clean-compile \
+maintainer-clean-compile install-man8 uninstall-man8 install-man9 \
+uninstall-man9 install-man uninstall-man install-data-recursive \
+uninstall-data-recursive install-exec-recursive \
+uninstall-exec-recursive installdirs-recursive uninstalldirs-recursive \
+all-recursive check-recursive installcheck-recursive info-recursive \
+dvi-recursive mostlyclean-recursive distclean-recursive clean-recursive \
+maintainer-clean-recursive tags tags-recursive mostlyclean-tags \
+distclean-tags clean-tags maintainer-clean-tags distdir info-am info \
+dvi-am dvi check check-am installcheck-am installcheck install-exec-am \
+install-exec install-data-am install-data install-am install \
+uninstall-am uninstall all-redirect all-am all installdirs-am \
installdirs mostlyclean-generic distclean-generic clean-generic \
maintainer-clean-generic clean mostlyclean distclean maintainer-clean
-installconf:
-
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
diff --git a/hdlcutil/fl/Makefile.am b/hdlcutil/fl/Makefile.am
new file mode 100644
index 0000000..401ef67
--- /dev/null
+++ b/hdlcutil/fl/Makefile.am
@@ -0,0 +1,13 @@
+
+sbin_PROGRAMS = xfsmmixer xfhdlcchpar xfhdlcst xfsmdiag
+
+INCLUDES = $(X_CFLAGS) -I..
+LDFLAGS = $(X_LIBS) -lX11 $(FLTK_LIB)
+LDADD = hdrvcomm.o
+
+xfsmmixer_SOURCES = xfsmmixer.cxx xfsmmixer_main.cxx xfsmmixer.h
+xfhdlcchpar_SOURCES = xfhdlcchpar.cxx xfhdlcchpar_main.cxx xfhdlcchpar.h
+xfhdlcst_SOURCES = xfhdlcst.cxx xfhdlcst_main.cxx xfhdlcst.h
+xfsmdiag_SOURCES = xfsmdiag.cxx xfsmdiag_main.cxx xfsmdiag.h xfsmdiag_main.h
+
+hdrvcomm.o: ../hdrvcomm.o
diff --git a/hdlcutil/fl/Makefile.in b/hdlcutil/fl/Makefile.in
new file mode 100644
index 0000000..109e736
--- /dev/null
+++ b/hdlcutil/fl/Makefile.in
@@ -0,0 +1,334 @@
+# Makefile.in generated automatically by automake 1.4 from Makefile.am
+
+# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+
+SHELL = @SHELL@
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+
+bindir = @bindir@
+sbindir = @sbindir@
+libexecdir = @libexecdir@
+datadir = @datadir@
+sysconfdir = @sysconfdir@
+sharedstatedir = @sharedstatedir@
+localstatedir = @localstatedir@
+libdir = @libdir@
+infodir = @infodir@
+mandir = @mandir@
+includedir = @includedir@
+oldincludedir = /usr/include
+
+DESTDIR =
+
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+
+top_builddir = ../..
+
+ACLOCAL = @ACLOCAL@
+AUTOCONF = @AUTOCONF@
+AUTOMAKE = @AUTOMAKE@
+AUTOHEADER = @AUTOHEADER@
+
+INSTALL = @INSTALL@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+transform = @program_transform_name@
+
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+AWK = @AWK@
+AX25IO_LIB = @AX25IO_LIB@
+AX25_LIB = @AX25_LIB@
+CC = @CC@
+CXX = @CXX@
+DMASCC = @DMASCC@
+FLTK_LIB = @FLTK_LIB@
+MAKEINFO = @MAKEINFO@
+NCURSES_LIB = @NCURSES_LIB@
+PACKAGE = @PACKAGE@
+UTIL_LIB = @UTIL_LIB@
+VERSION = @VERSION@
+Z_LIB = @Z_LIB@
+
+sbin_PROGRAMS = xfsmmixer xfhdlcchpar xfhdlcst xfsmdiag
+
+INCLUDES = $(X_CFLAGS) -I..
+LDFLAGS = $(X_LIBS) -lX11 $(FLTK_LIB)
+LDADD = hdrvcomm.o
+
+xfsmmixer_SOURCES = xfsmmixer.cxx xfsmmixer_main.cxx xfsmmixer.h
+xfhdlcchpar_SOURCES = xfhdlcchpar.cxx xfhdlcchpar_main.cxx xfhdlcchpar.h
+xfhdlcst_SOURCES = xfhdlcst.cxx xfhdlcst_main.cxx xfhdlcst.h
+xfsmdiag_SOURCES = xfsmdiag.cxx xfsmdiag_main.cxx xfsmdiag.h xfsmdiag_main.h
+mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+CONFIG_HEADER = ../../config.h
+CONFIG_CLEAN_FILES =
+PROGRAMS = $(sbin_PROGRAMS)
+
+
+DEFS = @DEFS@ -I. -I$(srcdir) -I../..
+CPPFLAGS = @CPPFLAGS@
+LIBS = @LIBS@
+X_CFLAGS = @X_CFLAGS@
+X_LIBS = @X_LIBS@
+X_EXTRA_LIBS = @X_EXTRA_LIBS@
+X_PRE_LIBS = @X_PRE_LIBS@
+xfsmmixer_OBJECTS = xfsmmixer.o xfsmmixer_main.o
+xfsmmixer_LDADD = $(LDADD)
+xfsmmixer_DEPENDENCIES = hdrvcomm.o
+xfsmmixer_LDFLAGS =
+xfhdlcchpar_OBJECTS = xfhdlcchpar.o xfhdlcchpar_main.o
+xfhdlcchpar_LDADD = $(LDADD)
+xfhdlcchpar_DEPENDENCIES = hdrvcomm.o
+xfhdlcchpar_LDFLAGS =
+xfhdlcst_OBJECTS = xfhdlcst.o xfhdlcst_main.o
+xfhdlcst_LDADD = $(LDADD)
+xfhdlcst_DEPENDENCIES = hdrvcomm.o
+xfhdlcst_LDFLAGS =
+xfsmdiag_OBJECTS = xfsmdiag.o xfsmdiag_main.o
+xfsmdiag_LDADD = $(LDADD)
+xfsmdiag_DEPENDENCIES = hdrvcomm.o
+xfsmdiag_LDFLAGS =
+CXXFLAGS = @CXXFLAGS@
+CXXCOMPILE = $(CXX) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+CXXLD = $(CXX)
+CXXLINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(LDFLAGS) -o $@
+CFLAGS = @CFLAGS@
+COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
+DIST_COMMON = Makefile.am Makefile.in
+
+
+DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
+
+TAR = tar
+GZIP_ENV = --best
+SOURCES = $(xfsmmixer_SOURCES) $(xfhdlcchpar_SOURCES) $(xfhdlcst_SOURCES) $(xfsmdiag_SOURCES)
+OBJECTS = $(xfsmmixer_OBJECTS) $(xfhdlcchpar_OBJECTS) $(xfhdlcst_OBJECTS) $(xfsmdiag_OBJECTS)
+
+all: all-redirect
+.SUFFIXES:
+.SUFFIXES: .S .c .cxx .o .s
+$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
+ cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps hdlcutil/fl/Makefile
+
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ cd $(top_builddir) \
+ && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
+
+
+mostlyclean-sbinPROGRAMS:
+
+clean-sbinPROGRAMS:
+ -test -z "$(sbin_PROGRAMS)" || rm -f $(sbin_PROGRAMS)
+
+distclean-sbinPROGRAMS:
+
+maintainer-clean-sbinPROGRAMS:
+
+install-sbinPROGRAMS: $(sbin_PROGRAMS)
+ @$(NORMAL_INSTALL)
+ $(mkinstalldirs) $(DESTDIR)$(sbindir)
+ @list='$(sbin_PROGRAMS)'; for p in $$list; do \
+ if test -f $$p; then \
+ echo " $(INSTALL_PROGRAM) $$p $(DESTDIR)$(sbindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`"; \
+ $(INSTALL_PROGRAM) $$p $(DESTDIR)$(sbindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \
+ else :; fi; \
+ done
+
+uninstall-sbinPROGRAMS:
+ @$(NORMAL_UNINSTALL)
+ list='$(sbin_PROGRAMS)'; for p in $$list; do \
+ rm -f $(DESTDIR)$(sbindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \
+ done
+
+.c.o:
+ $(COMPILE) -c $<
+
+.s.o:
+ $(COMPILE) -c $<
+
+.S.o:
+ $(COMPILE) -c $<
+
+mostlyclean-compile:
+ -rm -f *.o core *.core
+
+clean-compile:
+
+distclean-compile:
+ -rm -f *.tab.c
+
+maintainer-clean-compile:
+
+xfsmmixer: $(xfsmmixer_OBJECTS) $(xfsmmixer_DEPENDENCIES)
+ @rm -f xfsmmixer
+ $(CXXLINK) $(xfsmmixer_LDFLAGS) $(xfsmmixer_OBJECTS) $(xfsmmixer_LDADD) $(LIBS)
+
+xfhdlcchpar: $(xfhdlcchpar_OBJECTS) $(xfhdlcchpar_DEPENDENCIES)
+ @rm -f xfhdlcchpar
+ $(CXXLINK) $(xfhdlcchpar_LDFLAGS) $(xfhdlcchpar_OBJECTS) $(xfhdlcchpar_LDADD) $(LIBS)
+
+xfhdlcst: $(xfhdlcst_OBJECTS) $(xfhdlcst_DEPENDENCIES)
+ @rm -f xfhdlcst
+ $(CXXLINK) $(xfhdlcst_LDFLAGS) $(xfhdlcst_OBJECTS) $(xfhdlcst_LDADD) $(LIBS)
+
+xfsmdiag: $(xfsmdiag_OBJECTS) $(xfsmdiag_DEPENDENCIES)
+ @rm -f xfsmdiag
+ $(CXXLINK) $(xfsmdiag_LDFLAGS) $(xfsmdiag_OBJECTS) $(xfsmdiag_LDADD) $(LIBS)
+.cxx.o:
+ $(CXXCOMPILE) -c $<
+
+tags: TAGS
+
+ID: $(HEADERS) $(SOURCES) $(LISP)
+ list='$(SOURCES) $(HEADERS)'; \
+ unique=`for i in $$list; do echo $$i; done | \
+ awk ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ here=`pwd` && cd $(srcdir) \
+ && mkid -f$$here/ID $$unique $(LISP)
+
+TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP)
+ tags=; \
+ here=`pwd`; \
+ list='$(SOURCES) $(HEADERS)'; \
+ unique=`for i in $$list; do echo $$i; done | \
+ awk ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
+ || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags $$unique $(LISP) -o $$here/TAGS)
+
+mostlyclean-tags:
+
+clean-tags:
+
+distclean-tags:
+ -rm -f TAGS ID
+
+maintainer-clean-tags:
+
+distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
+
+subdir = hdlcutil/fl
+
+distdir: $(DISTFILES)
+ @for file in $(DISTFILES); do \
+ d=$(srcdir); \
+ if test -d $$d/$$file; then \
+ cp -pr $$/$$file $(distdir)/$$file; \
+ else \
+ test -f $(distdir)/$$file \
+ || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
+ || cp -p $$d/$$file $(distdir)/$$file || :; \
+ fi; \
+ done
+hdrvcomm.o: ../hdrvcomm.c ../hdrvcomm.h ../usersmdiag.h
+xfhdlcchpar.o: xfhdlcchpar.cxx xfhdlcchpar.h
+xfhdlcchpar_main.o: xfhdlcchpar_main.cxx ../hdrvcomm.h xfhdlcchpar.h
+xfhdlcst.o: xfhdlcst.cxx xfhdlcst.h
+xfhdlcst_main.o: xfhdlcst_main.cxx ../hdrvcomm.h xfhdlcst.h
+xfsmdiag.o: xfsmdiag.cxx xfsmdiag.h xfsmdiag_main.h
+xfsmdiag_main.o: xfsmdiag_main.cxx ../hdrvcomm.h xfsmdiag.h \
+ xfsmdiag_main.h
+xfsmmixer.o: xfsmmixer.cxx xfsmmixer.h
+xfsmmixer_main.o: xfsmmixer_main.cxx ../hdrvcomm.h xfsmmixer.h
+
+info-am:
+info: info-am
+dvi-am:
+dvi: dvi-am
+check-am: all-am
+check: check-am
+installcheck-am:
+installcheck: installcheck-am
+install-exec-am: install-sbinPROGRAMS
+install-exec: install-exec-am
+
+install-data-am:
+install-data: install-data-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+install: install-am
+uninstall-am: uninstall-sbinPROGRAMS
+uninstall: uninstall-am
+all-am: Makefile $(PROGRAMS)
+all-redirect: all-am
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
+installdirs:
+ $(mkinstalldirs) $(DESTDIR)$(sbindir)
+
+
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -rm -f Makefile $(CONFIG_CLEAN_FILES)
+ -rm -f config.cache config.log stamp-h stamp-h[0-9]*
+
+maintainer-clean-generic:
+mostlyclean-am: mostlyclean-sbinPROGRAMS mostlyclean-compile \
+ mostlyclean-tags mostlyclean-generic
+
+mostlyclean: mostlyclean-am
+
+clean-am: clean-sbinPROGRAMS clean-compile clean-tags clean-generic \
+ mostlyclean-am
+
+clean: clean-am
+
+distclean-am: distclean-sbinPROGRAMS distclean-compile distclean-tags \
+ distclean-generic clean-am
+
+distclean: distclean-am
+
+maintainer-clean-am: maintainer-clean-sbinPROGRAMS \
+ maintainer-clean-compile maintainer-clean-tags \
+ maintainer-clean-generic distclean-am
+ @echo "This command is intended for maintainers to use;"
+ @echo "it deletes files that may require special tools to rebuild."
+
+maintainer-clean: maintainer-clean-am
+
+.PHONY: mostlyclean-sbinPROGRAMS distclean-sbinPROGRAMS \
+clean-sbinPROGRAMS maintainer-clean-sbinPROGRAMS uninstall-sbinPROGRAMS \
+install-sbinPROGRAMS mostlyclean-compile distclean-compile \
+clean-compile maintainer-clean-compile tags mostlyclean-tags \
+distclean-tags clean-tags maintainer-clean-tags distdir info-am info \
+dvi-am dvi check check-am installcheck-am installcheck install-exec-am \
+install-exec install-data-am install-data install-am install \
+uninstall-am uninstall all-redirect all-am all installdirs \
+mostlyclean-generic distclean-generic clean-generic \
+maintainer-clean-generic clean mostlyclean distclean maintainer-clean
+
+
+hdrvcomm.o: ../hdrvcomm.o
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/hdlcutil/fl/xfhdlcchpar.cxx b/hdlcutil/fl/xfhdlcchpar.cxx
new file mode 100644
index 0000000..ad2b6b1
--- /dev/null
+++ b/hdlcutil/fl/xfhdlcchpar.cxx
@@ -0,0 +1,73 @@
+// generated by Fast Light User Interface Designer (fluid) version 1.00
+
+#include "xfhdlcchpar.h"
+
+Fl_Window *chpar=(Fl_Window *)0;
+
+Fl_Value_Slider *txdelay=(Fl_Value_Slider *)0;
+
+Fl_Value_Slider *txtail=(Fl_Value_Slider *)0;
+
+Fl_Value_Slider *slottime=(Fl_Value_Slider *)0;
+
+Fl_Value_Slider *ppersist=(Fl_Value_Slider *)0;
+
+Fl_Check_Button *fulldup=(Fl_Check_Button *)0;
+
+Fl_Button *quit=(Fl_Button *)0;
+
+Fl_Output *ifname=(Fl_Output *)0;
+
+Fl_Window* create_the_forms() {
+ Fl_Window* w;
+ { Fl_Window* o = chpar = new Fl_Window(390, 260, "HDLC channel parameters");
+ w = o;
+ o->box(FL_NO_BOX);
+ o->labeltype(FL_NORMAL_LABEL);
+ { Fl_Box* o = new Fl_Box(0, 0, 390, 260);
+ o->box(FL_UP_BOX);
+ }
+ { Fl_Box* o = new Fl_Box(10, 10, 370, 240);
+ o->box(FL_DOWN_BOX);
+ }
+ { Fl_Value_Slider* o = txdelay = new Fl_Value_Slider(24, 30, 341, 30, "Tx Delay (ms)");
+ o->type(3);
+ o->labelsize(8);
+ o->callback((Fl_Callback*)cb_update);
+ }
+ { Fl_Value_Slider* o = txtail = new Fl_Value_Slider(24, 80, 341, 30, "Tx Tail (ms)");
+ o->type(3);
+ o->labelsize(8);
+ o->callback((Fl_Callback*)cb_update);
+ }
+ { Fl_Value_Slider* o = slottime = new Fl_Value_Slider(24, 130, 341, 30, "Slottime (ms)");
+ o->type(3);
+ o->labelsize(8);
+ o->callback((Fl_Callback*)cb_update);
+ }
+ { Fl_Value_Slider* o = ppersist = new Fl_Value_Slider(24, 180, 341, 30, "P-Persistence");
+ o->type(3);
+ o->labelsize(8);
+ o->callback((Fl_Callback*)cb_update);
+ }
+ { Fl_Check_Button* o = fulldup = new Fl_Check_Button(20, 220, 90, 20, "Full Duplex");
+ o->down_box(FL_DIAMOND_DOWN_BOX);
+ o->selection_color(3);
+ o->callback((Fl_Callback*)cb_update);
+ }
+ { Fl_Button* o = quit = new Fl_Button(290, 220, 70, 20, "Quit");
+ o->callback((Fl_Callback*)cb_quit, (void*)(0));
+ }
+ { Fl_Box* o = new Fl_Box(150, 220, 60, 20, "Interface");
+ o->box(FL_FLAT_BOX);
+ o->align(FL_ALIGN_LEFT|FL_ALIGN_INSIDE);
+ }
+ { Fl_Output* o = ifname = new Fl_Output(220, 220, 60, 20);
+ o->box(FL_EMBOSSED_BOX);
+ o->selection_color(49);
+ o->align(FL_ALIGN_LEFT|FL_ALIGN_INSIDE);
+ }
+ o->end();
+ }
+ return w;
+}
diff --git a/hdlcutil/fl/xfhdlcchpar.h b/hdlcutil/fl/xfhdlcchpar.h
new file mode 100644
index 0000000..57109a3
--- /dev/null
+++ b/hdlcutil/fl/xfhdlcchpar.h
@@ -0,0 +1,25 @@
+// generated by Fast Light User Interface Designer (fluid) version 1.00
+
+#ifndef xfhdlcchpar_h
+#define xfhdlcchpar_h
+#include <FL/Fl.H>
+#include <FL/Fl_Window.H>
+extern Fl_Window *chpar;
+#include <FL/Fl_Box.H>
+#include <FL/Fl_Value_Slider.H>
+extern void cb_update(Fl_Widget*, void*);
+extern void cb_update(Fl_Value_Slider*, void*);
+extern Fl_Value_Slider *txdelay;
+extern Fl_Value_Slider *txtail;
+extern Fl_Value_Slider *slottime;
+extern Fl_Value_Slider *ppersist;
+#include <FL/Fl_Check_Button.H>
+extern void cb_update(Fl_Check_Button*, void*);
+extern Fl_Check_Button *fulldup;
+#include <FL/Fl_Button.H>
+extern void cb_quit(Fl_Button*, long);
+extern Fl_Button *quit;
+#include <FL/Fl_Output.H>
+extern Fl_Output *ifname;
+Fl_Window* create_the_forms();
+#endif
diff --git a/hdlcutil/fl/xfhdlcchpar_main.cxx b/hdlcutil/fl/xfhdlcchpar_main.cxx
new file mode 100644
index 0000000..443d1f3
--- /dev/null
+++ b/hdlcutil/fl/xfhdlcchpar_main.cxx
@@ -0,0 +1,136 @@
+/*****************************************************************************/
+
+/*
+ * xfhdlcchpar_main.C -- kernel hdlc radio modem driver channel parameter setting utility.
+ *
+ * Copyright (C) 1996,1997,2000 Thomas Sailer (sailer@ife.ee.ethz.ch)
+ *
+ * This program 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.
+ *
+ * This program 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 this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * Please note that the GPL allows you to use the driver, NOT the radio.
+ * In order to use the radio, you need a license from the communications
+ * authority of your country.
+ *
+ *
+ * History:
+ * 0.1 14.12.1996 Started
+ * 0.2 11.05.1997 introduced hdrvcomm.h
+ * 0.3 05.01.2000 upgraded to fltk 1.0.7
+ */
+
+/*****************************************************************************/
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <unistd.h>
+#include <string.h>
+#include <sys/types.h>
+#include <net/if.h>
+#include "hdrvcomm.h"
+#include "xfhdlcchpar.h"
+
+/* ---------------------------------------------------------------------- */
+
+static char *progname;
+
+/* ---------------------------------------------------------------------- */
+
+void cb_update(Fl_Widget *widget, void *udata)
+{
+ int ret;
+ struct hdrvc_channel_params cp;
+
+ cp.tx_delay = (int)(0.1*txdelay->value());
+ cp.tx_tail = (int)(0.1*txtail->value());
+ cp.slottime = (int)(0.1*slottime->value());
+ cp.ppersist = (int)(ppersist->value());
+ cp.fulldup = !!fulldup->value();
+ ret = hdrvc_set_channel_access_param(cp);
+ if (ret < 0)
+ perror("hdrvc_set_channel_access_param");
+}
+
+/* ---------------------------------------------------------------------- */
+
+void cb_quit(Fl_Button *, long)
+{
+ exit(0);
+}
+
+/* ---------------------------------------------------------------------- */
+
+static const char *usage_str =
+"[-i smif]\n"
+" -i: specify the name of the baycom kernel driver interface\n\n";
+
+/* ---------------------------------------------------------------------- */
+
+int main(int argc, char *argv[])
+{
+ int c, i;
+ int ret;
+ struct hdrvc_channel_params cp;
+
+ progname = *argv;
+ printf("%s: Version 0.3; (C) 1996,1997,2000 by Thomas Sailer HB9JNX/AE4WA\n", progname);
+ hdrvc_args(&argc, argv, "bc0");
+ for (i = 1; i < argc; ) {
+ c = i;
+ Fl::arg(argc, argv, c);
+ if (c <= 0) {
+ i++;
+ continue;
+ }
+ memmove(&argv[i], &argv[i+c], (argc-i) * sizeof(char *));
+ argc -= c;
+ }
+#if 0
+ while ((ret = getopt(argc, argv, "")) != -1) {
+ switch (ret) {
+ default:
+ printf("usage: %s %s", progname, usage_str);
+ exit(-1);
+ }
+ }
+#endif
+ hdrvc_init();
+
+ create_the_forms();
+ ifname->value(hdrvc_ifname());
+ /*
+ * set channel params
+ */
+ ret = hdrvc_get_channel_access_param(&cp);
+ if (ret < 0) {
+ perror("hdrvc_get_channel_access_param");
+ exit(1);
+ }
+ txdelay->step(10);
+ txdelay->bounds(0, 2550);
+ txdelay->value(cp.tx_delay*10);
+ txtail->step(10);
+ txtail->bounds(0, 2550);
+ txtail->value(cp.tx_tail*10);
+ slottime->step(10);
+ slottime->bounds(0, 2550);
+ slottime->value(cp.slottime*10);
+ ppersist->step(1);
+ ppersist->bounds(0, 255);
+ ppersist->value(cp.ppersist);
+ fulldup->value(!!cp.fulldup);
+ chpar->show();
+ Fl::run();
+ exit(0);
+}
diff --git a/hdlcutil/fl/xfhdlcst.cxx b/hdlcutil/fl/xfhdlcst.cxx
new file mode 100644
index 0000000..0548bf3
--- /dev/null
+++ b/hdlcutil/fl/xfhdlcst.cxx
@@ -0,0 +1,160 @@
+// generated by Fast Light User Interface Designer (fluid) version 1.00
+
+#include "xfhdlcst.h"
+
+Fl_Window *hdlcst=(Fl_Window *)0;
+
+Fl_Round_Button *dcd=(Fl_Round_Button *)0;
+
+Fl_Round_Button *ptt=(Fl_Round_Button *)0;
+
+Fl_Output *txpacket=(Fl_Output *)0;
+
+Fl_Output *txerror=(Fl_Output *)0;
+
+Fl_Output *rxpacket=(Fl_Output *)0;
+
+Fl_Output *rxerror=(Fl_Output *)0;
+
+Fl_Output *modcyc=(Fl_Output *)0;
+
+Fl_Output *demodcyc=(Fl_Output *)0;
+
+Fl_Output *intfreq=(Fl_Output *)0;
+
+Fl_Output *dmares=(Fl_Output *)0;
+
+Fl_Box *tmodcyc=(Fl_Box *)0;
+
+Fl_Box *tdemodcyc=(Fl_Box *)0;
+
+Fl_Box *tintfreq=(Fl_Box *)0;
+
+Fl_Box *tdmares=(Fl_Box *)0;
+
+Fl_Output *modename=(Fl_Output *)0;
+
+Fl_Output *drivername=(Fl_Output *)0;
+
+Fl_Button *quit=(Fl_Button *)0;
+
+Fl_Window* create_the_forms() {
+ Fl_Window* w;
+ { Fl_Window* o = hdlcst = new Fl_Window(250, 300, "HDLC driver state");
+ w = o;
+ o->box(FL_NO_BOX);
+ { Fl_Box* o = new Fl_Box(0, 0, 250, 300);
+ o->box(FL_UP_BOX);
+ }
+ { Fl_Box* o = new Fl_Box(10, 230, 230, 60);
+ o->box(FL_DOWN_BOX);
+ }
+ { Fl_Box* o = new Fl_Box(10, 10, 230, 220);
+ o->box(FL_DOWN_BOX);
+ }
+ { Fl_Round_Button* o = dcd = new Fl_Round_Button(160, 20, 20, 20);
+ o->down_box(FL_ROUND_DOWN_BOX);
+ o->selection_color(3);
+ o->align(FL_ALIGN_CENTER);
+ }
+ { Fl_Round_Button* o = ptt = new Fl_Round_Button(160, 40, 20, 20);
+ o->down_box(FL_ROUND_DOWN_BOX);
+ o->align(FL_ALIGN_CENTER);
+ }
+ { Fl_Output* o = txpacket = new Fl_Output(160, 60, 70, 20);
+ o->box(FL_EMBOSSED_BOX);
+ o->selection_color(49);
+ o->align(FL_ALIGN_LEFT|FL_ALIGN_INSIDE);
+ }
+ { Fl_Output* o = txerror = new Fl_Output(160, 80, 70, 20);
+ o->box(FL_EMBOSSED_BOX);
+ o->selection_color(49);
+ o->align(FL_ALIGN_LEFT|FL_ALIGN_INSIDE);
+ }
+ { Fl_Output* o = rxpacket = new Fl_Output(160, 100, 70, 20);
+ o->box(FL_EMBOSSED_BOX);
+ o->selection_color(49);
+ o->align(FL_ALIGN_LEFT|FL_ALIGN_INSIDE);
+ }
+ { Fl_Output* o = rxerror = new Fl_Output(160, 120, 70, 20);
+ o->box(FL_EMBOSSED_BOX);
+ o->selection_color(49);
+ o->align(FL_ALIGN_LEFT|FL_ALIGN_INSIDE);
+ }
+ { Fl_Output* o = modcyc = new Fl_Output(160, 140, 70, 20);
+ o->box(FL_EMBOSSED_BOX);
+ o->selection_color(49);
+ o->align(FL_ALIGN_LEFT|FL_ALIGN_INSIDE);
+ }
+ { Fl_Output* o = demodcyc = new Fl_Output(160, 160, 70, 20);
+ o->box(FL_EMBOSSED_BOX);
+ o->selection_color(49);
+ o->align(FL_ALIGN_LEFT|FL_ALIGN_INSIDE);
+ }
+ { Fl_Output* o = intfreq = new Fl_Output(160, 180, 70, 20);
+ o->box(FL_EMBOSSED_BOX);
+ o->selection_color(49);
+ o->align(FL_ALIGN_LEFT|FL_ALIGN_INSIDE);
+ }
+ { Fl_Output* o = dmares = new Fl_Output(160, 200, 70, 20);
+ o->box(FL_EMBOSSED_BOX);
+ o->selection_color(49);
+ o->align(FL_ALIGN_LEFT|FL_ALIGN_INSIDE);
+ }
+ { Fl_Box* o = new Fl_Box(20, 60, 110, 20, "Transmit Packets");
+ o->box(FL_FLAT_BOX);
+ o->align(FL_ALIGN_LEFT|FL_ALIGN_INSIDE);
+ }
+ { Fl_Box* o = new Fl_Box(20, 80, 110, 20, "Transmit Errors");
+ o->box(FL_FLAT_BOX);
+ o->align(FL_ALIGN_LEFT|FL_ALIGN_INSIDE);
+ }
+ { Fl_Box* o = new Fl_Box(20, 100, 110, 20, "Receive Packets");
+ o->box(FL_FLAT_BOX);
+ o->align(FL_ALIGN_LEFT|FL_ALIGN_INSIDE);
+ }
+ { Fl_Box* o = new Fl_Box(20, 120, 110, 20, "Receive Errors");
+ o->box(FL_FLAT_BOX);
+ o->align(FL_ALIGN_LEFT|FL_ALIGN_INSIDE);
+ }
+ { Fl_Box* o = new Fl_Box(20, 40, 110, 20, "PTT");
+ o->box(FL_FLAT_BOX);
+ o->align(FL_ALIGN_LEFT|FL_ALIGN_INSIDE);
+ }
+ { Fl_Box* o = new Fl_Box(20, 20, 110, 20, "DCD");
+ o->box(FL_FLAT_BOX);
+ o->align(FL_ALIGN_LEFT|FL_ALIGN_INSIDE);
+ }
+ { Fl_Box* o = tmodcyc = new Fl_Box(20, 140, 110, 20, "Modulator Cycles");
+ o->box(FL_FLAT_BOX);
+ o->align(FL_ALIGN_LEFT|FL_ALIGN_INSIDE);
+ }
+ { Fl_Box* o = tdemodcyc = new Fl_Box(20, 160, 110, 20, "Demodulator Cycles");
+ o->box(FL_FLAT_BOX);
+ o->align(FL_ALIGN_LEFT|FL_ALIGN_INSIDE);
+ }
+ { Fl_Box* o = tintfreq = new Fl_Box(20, 180, 110, 20, "Interrupt Frequency");
+ o->box(FL_FLAT_BOX);
+ o->align(FL_ALIGN_LEFT|FL_ALIGN_INSIDE);
+ }
+ { Fl_Box* o = tdmares = new Fl_Box(20, 200, 110, 20, "DMA residue");
+ o->box(FL_FLAT_BOX);
+ o->align(FL_ALIGN_LEFT|FL_ALIGN_INSIDE);
+ }
+ { Fl_Output* o = modename = new Fl_Output(20, 240, 210, 20);
+ o->box(FL_EMBOSSED_BOX);
+ o->selection_color(49);
+ o->align(FL_ALIGN_CENTER|FL_ALIGN_INSIDE);
+ }
+ { Fl_Output* o = drivername = new Fl_Output(20, 260, 210, 20);
+ o->box(FL_EMBOSSED_BOX);
+ o->selection_color(49);
+ o->align(FL_ALIGN_CENTER|FL_ALIGN_INSIDE);
+ }
+ { Fl_Button* o = quit = new Fl_Button(190, 20, 40, 30, "Quit");
+ o->callback((Fl_Callback*)cb_quit, (void*)(0));
+ }
+ o->end();
+ }
+ return w;
+}
diff --git a/hdlcutil/fl/xfhdlcst.h b/hdlcutil/fl/xfhdlcst.h
new file mode 100644
index 0000000..0d70e48
--- /dev/null
+++ b/hdlcutil/fl/xfhdlcst.h
@@ -0,0 +1,31 @@
+// generated by Fast Light User Interface Designer (fluid) version 1.00
+
+#ifndef xfhdlcst_h
+#define xfhdlcst_h
+#include <FL/Fl.H>
+#include <FL/Fl_Window.H>
+extern Fl_Window *hdlcst;
+#include <FL/Fl_Box.H>
+#include <FL/Fl_Round_Button.H>
+extern Fl_Round_Button *dcd;
+extern Fl_Round_Button *ptt;
+#include <FL/Fl_Output.H>
+extern Fl_Output *txpacket;
+extern Fl_Output *txerror;
+extern Fl_Output *rxpacket;
+extern Fl_Output *rxerror;
+extern Fl_Output *modcyc;
+extern Fl_Output *demodcyc;
+extern Fl_Output *intfreq;
+extern Fl_Output *dmares;
+extern Fl_Box *tmodcyc;
+extern Fl_Box *tdemodcyc;
+extern Fl_Box *tintfreq;
+extern Fl_Box *tdmares;
+extern Fl_Output *modename;
+extern Fl_Output *drivername;
+#include <FL/Fl_Button.H>
+extern void cb_quit(Fl_Button*, long);
+extern Fl_Button *quit;
+Fl_Window* create_the_forms();
+#endif
diff --git a/hdlcutil/fl/xfhdlcst_main.cxx b/hdlcutil/fl/xfhdlcst_main.cxx
new file mode 100644
index 0000000..bf54292
--- /dev/null
+++ b/hdlcutil/fl/xfhdlcst_main.cxx
@@ -0,0 +1,177 @@
+/*****************************************************************************/
+
+/*
+ * xfhdlcst_main.C -- kernel hdlc radio modem driver status display utility.
+ *
+ * Copyright (C) 1996,1997,2000 Thomas Sailer (sailer@ife.ee.ethz.ch)
+ *
+ * This program 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.
+ *
+ * This program 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 this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * Please note that the GPL allows you to use the driver, NOT the radio.
+ * In order to use the radio, you need a license from the communications
+ * authority of your country.
+ *
+ *
+ * History:
+ * 0.1 14.12.1996 Started
+ * 0.2 11.05.1997 introduced hdrvcomm.h
+ * 0.3 05.01.2000 upgraded to fltk 1.0.7
+ */
+
+/*****************************************************************************/
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <unistd.h>
+#include <string.h>
+#include <sys/types.h>
+#include <net/if.h>
+#include "hdrvcomm.h"
+#include "xfhdlcst.h"
+
+/* ---------------------------------------------------------------------- */
+
+static char *progname;
+static bool update = true;
+
+/* ---------------------------------------------------------------------- */
+
+void cb_quit(Fl_Button *, long)
+{
+ exit(0);
+}
+
+/* ---------------------------------------------------------------------- */
+
+void cb_timer(void *)
+{
+ update = true;
+}
+
+/* ---------------------------------------------------------------------- */
+
+static const char *usage_str =
+"[-i smif]\n"
+" -i: specify the name of the baycom kernel driver interface\n\n";
+
+/* ---------------------------------------------------------------------- */
+
+int main(int argc, char *argv[])
+{
+ int c, i;
+ int ret;
+ struct hdrvc_channel_state cs;
+#ifdef HDRVC_KERNEL
+ struct sm_ioctl smi;
+#endif /* HDRVC_KERNEL */
+ char buf[32];
+ char name[64];
+
+ progname = *argv;
+ printf("%s: Version 0.3; (C) 1996,1997,2000 by Thomas Sailer HB9JNX/AE4WA\n", *argv);
+ hdrvc_args(&argc, argv, "bc0");
+ for (i = 1; i < argc; ) {
+ c = i;
+ Fl::arg(argc, argv, c);
+ if (c <= 0) {
+ i++;
+ continue;
+ }
+ memmove(&argv[i], &argv[i+c], (argc-i) * sizeof(char *));
+ argc -= c;
+ }
+#if 0
+ while ((ret = getopt(argc, argv, "")) != -1) {
+ switch (ret) {
+ default:
+ printf("usage: %s %s", *argv, usage_str);
+ exit(-1);
+ }
+ }
+#endif
+ hdrvc_init();
+
+ create_the_forms();
+ Fl::add_timeout(0.1, cb_timer);
+ /*
+ * set driver and modem name
+ */
+ ret = hdrvc_get_mode_name(name, sizeof(name));
+ if (ret < 0) {
+ perror("hdrvc_get_mode_name");
+ modename->hide();
+ } else
+ modename->value(name);
+ ret = hdrvc_get_driver_name(name, sizeof(name));
+ if (ret < 0) {
+ perror("hdrvc_get_driver_name");
+ drivername->hide();
+ } else
+ drivername->value(name);
+ /*
+ * check for soundmodem driver
+ */
+#ifdef HDRVC_KERNEL
+ ret = hdrvc_sm_ioctl(SMCTL_GETDEBUG, &smi);
+ if (ret < 0) {
+#endif /* HDRVC_KERNEL */
+ tdemodcyc->hide();
+ tmodcyc->hide();
+ tintfreq->hide();
+ tdmares->hide();
+ demodcyc->hide();
+ modcyc->hide();
+ intfreq->hide();
+ dmares->hide();
+#ifdef HDRVC_KERNEL
+ }
+#endif /* HDRVC_KERNEL */
+ hdlcst->show();
+ for (;;) {
+ Fl::wait();
+ if (!update)
+ continue;
+ update = false;
+ Fl::add_timeout(0.5, cb_timer);
+ /*
+ * display state
+ */
+ ret = hdrvc_get_channel_state(&cs);
+ if (ret >= 0) {
+ ptt->value(cs.ptt);
+ dcd->value(cs.dcd);
+ sprintf(buf, "%ld", cs.tx_packets);
+ txpacket->value(buf);
+ sprintf(buf, "%ld", cs.tx_errors);
+ txerror->value(buf);
+ sprintf(buf, "%ld", cs.rx_packets);
+ rxpacket->value(buf);
+ sprintf(buf, "%ld", cs.rx_errors);
+ rxerror->value(buf);
+ }
+ ret = hdrvc_sm_ioctl(SMCTL_GETDEBUG, &smi);
+ if (ret >= 0) {
+ sprintf(buf, "%d", smi.data.dbg.int_rate);
+ intfreq->value(buf);
+ sprintf(buf, "%d", smi.data.dbg.mod_cycles);
+ modcyc->value(buf);
+ sprintf(buf, "%d", smi.data.dbg.demod_cycles);
+ demodcyc->value(buf);
+ sprintf(buf, "%d", smi.data.dbg.dma_residue);
+ dmares->value(buf);
+ }
+ }
+ exit (0);
+}
diff --git a/hdlcutil/fl/xfsmdiag.cxx b/hdlcutil/fl/xfsmdiag.cxx
new file mode 100644
index 0000000..84c4bac
--- /dev/null
+++ b/hdlcutil/fl/xfsmdiag.cxx
@@ -0,0 +1,124 @@
+// generated by Fast Light User Interface Designer (fluid) version 1.00
+
+#include "xfsmdiag.h"
+
+Fl_Window *scopewindow=(Fl_Window *)0;
+
+scope *scdisp=(scope *)0;
+
+Fl_Button *cleargr=(Fl_Button *)0;
+
+Fl_Group *scopemode=(Fl_Group *)0;
+
+Fl_Check_Button *sm_off=(Fl_Check_Button *)0;
+
+Fl_Check_Button *sm_input=(Fl_Check_Button *)0;
+
+Fl_Check_Button *sm_demod=(Fl_Check_Button *)0;
+
+Fl_Check_Button *sm_constell=(Fl_Check_Button *)0;
+
+Fl_Check_Button *sm_dcd=(Fl_Check_Button *)0;
+
+Fl_Button *quit=(Fl_Button *)0;
+
+Fl_Round_Button *st_dcd=(Fl_Round_Button *)0;
+
+Fl_Round_Button *st_ptt=(Fl_Round_Button *)0;
+
+Fl_Output *modename=(Fl_Output *)0;
+
+Fl_Output *drivername=(Fl_Output *)0;
+
+Fl_Window* create_the_forms() {
+ Fl_Window* w;
+ { Fl_Window* o = scopewindow = new Fl_Window(700, 550, "SoundCard Modem Driver Diagnose Tool");
+ w = o;
+ o->box(FL_NO_BOX);
+ { Fl_Box* o = new Fl_Box(0, 0, 700, 550);
+ o->box(FL_UP_BOX);
+ }
+ { scope* o = scdisp = new scope(10, 10, 530, 530);
+ o->box(FL_DOWN_BOX);
+ }
+ { Fl_Button* o = cleargr = new Fl_Button(640, 150, 50, 60, "Clear\nGraph");
+ o->callback((Fl_Callback*)cb_cleargr, (void*)(0));
+ }
+ { Fl_Box* o = new Fl_Box(550, 310, 140, 70, "(C) 1996 by\nTom Sailer\nHB9JNX/AE4WA");
+ o->box(FL_EMBOSSED_BOX);
+ o->labelsize(18);
+ o->align(FL_ALIGN_LEFT|FL_ALIGN_INSIDE);
+ }
+ { Fl_Group* o = scopemode = new Fl_Group(550, 10, 140, 130);
+ o->align(FL_ALIGN_CENTER);
+ { Fl_Box* o = new Fl_Box(550, 10, 140, 130);
+ o->box(FL_DOWN_BOX);
+ }
+ { Fl_Check_Button* o = sm_off = new Fl_Check_Button(560, 20, 120, 20, "Off");
+ o->type(102);
+ o->down_box(FL_DIAMOND_DOWN_BOX);
+ o->selection_color(3);
+ o->callback((Fl_Callback*)cb_mode, (void*)(0));
+ }
+ { Fl_Check_Button* o = sm_input = new Fl_Check_Button(560, 40, 120, 20, "Input");
+ o->type(102);
+ o->down_box(FL_DIAMOND_DOWN_BOX);
+ o->selection_color(3);
+ o->callback((Fl_Callback*)cb_mode, (void*)(1));
+ }
+ { Fl_Check_Button* o = sm_demod = new Fl_Check_Button(560, 60, 120, 20, "Demodulator");
+ o->type(102);
+ o->down_box(FL_DIAMOND_DOWN_BOX);
+ o->selection_color(3);
+ o->callback((Fl_Callback*)cb_mode, (void*)(2));
+ }
+ { Fl_Check_Button* o = sm_constell = new Fl_Check_Button(560, 80, 120, 20, "Constellation");
+ o->type(102);
+ o->down_box(FL_DIAMOND_DOWN_BOX);
+ o->selection_color(3);
+ o->callback((Fl_Callback*)cb_mode, (void*)(3));
+ }
+ { Fl_Check_Button* o = sm_dcd = new Fl_Check_Button(560, 110, 120, 20, "Gated with DCD");
+ o->down_box(FL_DIAMOND_DOWN_BOX);
+ o->selection_color(3);
+ o->callback((Fl_Callback*)cb_mode, (void*)(256));
+ }
+ o->end();
+ }
+ { Fl_Button* o = quit = new Fl_Button(550, 270, 140, 30, "Quit");
+ o->callback((Fl_Callback*)cb_quit, (void*)(0));
+ }
+ { Fl_Box* o = new Fl_Box(550, 150, 80, 60);
+ o->box(FL_DOWN_BOX);
+ }
+ { Fl_Round_Button* o = st_dcd = new Fl_Round_Button(600, 160, 20, 20);
+ o->down_box(FL_ROUND_DOWN_BOX);
+ o->selection_color(3);
+ o->align(FL_ALIGN_CENTER);
+ }
+ { Fl_Round_Button* o = st_ptt = new Fl_Round_Button(600, 180, 20, 20);
+ o->down_box(FL_ROUND_DOWN_BOX);
+ o->align(FL_ALIGN_CENTER);
+ }
+ { Fl_Box* o = new Fl_Box(560, 180, 40, 20, "PTT");
+ o->box(FL_FLAT_BOX);
+ o->align(FL_ALIGN_LEFT|FL_ALIGN_INSIDE);
+ }
+ { Fl_Box* o = new Fl_Box(560, 160, 40, 20, "DCD");
+ o->box(FL_FLAT_BOX);
+ o->align(FL_ALIGN_LEFT|FL_ALIGN_INSIDE);
+ }
+ { Fl_Output* o = modename = new Fl_Output(550, 220, 140, 20);
+ o->box(FL_EMBOSSED_BOX);
+ o->selection_color(49);
+ o->align(FL_ALIGN_LEFT|FL_ALIGN_INSIDE);
+ }
+ { Fl_Output* o = drivername = new Fl_Output(550, 240, 140, 20);
+ o->box(FL_EMBOSSED_BOX);
+ o->selection_color(49);
+ o->align(FL_ALIGN_LEFT|FL_ALIGN_INSIDE);
+ }
+ o->end();
+ }
+ return w;
+}
diff --git a/hdlcutil/fl/xfsmdiag.h b/hdlcutil/fl/xfsmdiag.h
new file mode 100644
index 0000000..20fcf18
--- /dev/null
+++ b/hdlcutil/fl/xfsmdiag.h
@@ -0,0 +1,32 @@
+// generated by Fast Light User Interface Designer (fluid) version 1.00
+
+#ifndef xfsmdiag_h
+#define xfsmdiag_h
+#include <FL/Fl.H>
+#include <FL/Fl_Window.H>
+extern Fl_Window *scopewindow;
+#include <FL/Fl_Box.H>
+#include "xfsmdiag_main.h"
+extern scope *scdisp;
+#include <FL/Fl_Button.H>
+extern void cb_cleargr(Fl_Button*, long);
+extern Fl_Button *cleargr;
+#include <FL/Fl_Group.H>
+extern Fl_Group *scopemode;
+#include <FL/Fl_Check_Button.H>
+extern void cb_mode(Fl_Check_Button*, long);
+extern Fl_Check_Button *sm_off;
+extern Fl_Check_Button *sm_input;
+extern Fl_Check_Button *sm_demod;
+extern Fl_Check_Button *sm_constell;
+extern Fl_Check_Button *sm_dcd;
+extern void cb_quit(Fl_Button*, long);
+extern Fl_Button *quit;
+#include <FL/Fl_Round_Button.H>
+extern Fl_Round_Button *st_dcd;
+extern Fl_Round_Button *st_ptt;
+#include <FL/Fl_Output.H>
+extern Fl_Output *modename;
+extern Fl_Output *drivername;
+Fl_Window* create_the_forms();
+#endif
diff --git a/hdlcutil/fl/xfsmdiag_main.cxx b/hdlcutil/fl/xfsmdiag_main.cxx
new file mode 100644
index 0000000..34a801d
--- /dev/null
+++ b/hdlcutil/fl/xfsmdiag_main.cxx
@@ -0,0 +1,412 @@
+/*****************************************************************************/
+
+/*
+ * xfsmdiag.c -- kernel soundcard radio modem driver diagnostics utility.
+ *
+ * Copyright (C) 1996,1997,2000 Thomas Sailer (sailer@ife.ee.ethz.ch)
+ *
+ * This program 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.
+ *
+ * This program 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 this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * Please note that the GPL allows you to use the driver, NOT the radio.
+ * In order to use the radio, you need a license from the communications
+ * authority of your country.
+ *
+ *
+ * History:
+ * 0.1 14.12.1996 Started
+ * 0.2 11.05.1997 introduced hdrvcomm.h
+ * 0.3 05.01.2000 upgraded to fltk 1.0.7
+ */
+
+/*****************************************************************************/
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <sys/time.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <unistd.h>
+#include <string.h>
+#include <sys/types.h>
+#include <limits.h>
+#include <net/if.h>
+#include <X11/X.h>
+#include <X11/Xlib.h>
+#include <X11/Xutil.h>
+#include "hdrvcomm.h"
+#include "xfsmdiag.h"
+#include <FL/x.H>
+#include <FL/fl_draw.H>
+
+/* ---------------------------------------------------------------------- */
+
+static char *progname;
+static unsigned int drawflags = 0;
+
+/* ---------------------------------------------------------------------- */
+
+scope::scope(int x, int y, int w, int h, const char *l)
+ : Fl_Box(x, y, w, h, l)
+{
+ box(FL_DOWN_FRAME);
+ X = x+3;
+ Y = y+4;
+ W = w-6;
+ H = h-8;
+ drawmode = HDRVC_DIAGMODE_OFF;
+ pixmalloc = false;
+ hide();
+}
+
+scope::~scope()
+{
+ if (pixmalloc) {
+ XFreePixmap(fl_display, pixmap);
+ pixmalloc = false;
+ }
+}
+
+void scope::resize(int xx, int yy, int ww, int hh)
+{
+ if (pixmalloc && (ww != w() || hh != h())) {
+ XFreePixmap(fl_display, pixmap);
+ pixmalloc = false;
+ }
+ X = xx+3;
+ Y = yy+4;
+ W = ww-6;
+ H = hh-8;
+ Fl_Box::resize(xx, yy, ww, hh);
+}
+
+void scope::draw()
+{
+ GC gc;
+ XGCValues gcv;
+
+ /* cannot use draw_box(); as it clears the whole window -> flicker */
+ /* from fl_boxtype.C, fl_down_frame */
+ if (W > 0 && H > 0) {
+ fl_color(FL_DARK1); fl_xyline(X-3, Y-4, X+W+1);
+ fl_color(FL_DARK2); fl_yxline(X-3, Y+H+3, Y-3, X+W+1);
+ fl_color(FL_DARK3); fl_yxline(X-2, Y+H+2, Y-2, X+W);
+ fl_color(FL_LIGHT3); fl_xyline(X-1, Y+H+1, X+W+1, Y-2);
+ fl_color(FL_LIGHT2); fl_xyline(X-2, Y+H+2, X+W+2, Y-4);
+ fl_color(FL_LIGHT1); fl_xyline(X-3, Y+H+3, X+W+2);
+ }
+ draw_label();
+ if (pixmalloc)
+ XCopyArea(fl_display, pixmap, fl_window, fl_gc, 0, 0, W, H, X, Y);
+ else {
+ gcv.line_width = 1;
+ gcv.line_style = LineSolid;
+ gcv.fill_style = FillSolid;
+ gc = XCreateGC(fl_display, pixmap, GCLineWidth | GCLineStyle | GCFillStyle, &gcv);
+ XSetState(fl_display, gc, col_background, col_background, GXcopy, AllPlanes);
+ XFillRectangle(fl_display, fl_window, gc, X, Y, W, H);
+ XFreeGC(fl_display, gc);
+ }
+ XSync(fl_display, 0);
+}
+
+/* ---------------------------------------------------------------------- */
+
+int scope::mode(void)
+{
+ mode(drawmode);
+ return drawmode;
+}
+
+void scope::mode(int dmode)
+{
+ Fl_Window *wnd;
+
+ if (dmode != drawmode) {
+ if (pixmalloc) {
+ XFreePixmap(fl_display, pixmap);
+ pixmalloc = false;
+ }
+ drawmode = dmode;
+ switch (drawmode) {
+ case HDRVC_DIAGMODE_OFF:
+ default:
+ hide();
+ break;
+
+ case HDRVC_DIAGMODE_INPUT:
+ case HDRVC_DIAGMODE_DEMOD:
+ size(512+6, 256+8);
+ show();
+ break;
+
+ case HDRVC_DIAGMODE_CONSTELLATION:
+ size(512+6, 512+8);
+ show();
+ break;
+ }
+ }
+ if (pixmalloc || !visible() || W < 2 || H < 2)
+ return;
+ if (!(wnd = window()))
+ return;
+ wnd->make_current();
+ if (!(pixmap = XCreatePixmap(fl_display, fl_window, W, H, fl_visual->depth))) {
+ fprintf(stderr, "unable to open offscreen pixmap\n");
+ exit(1);
+ }
+ pixmalloc = true;
+ col_zeroline = fl_xpixel(FL_RED);
+ col_background = fl_xpixel(FL_WHITE);
+ col_trace = fl_xpixel(FL_BLACK);
+ clear();
+}
+
+/* ---------------------------------------------------------------------- */
+
+void scope::clear(void)
+{
+ GC gc;
+ XGCValues gcv;
+
+ if (!pixmalloc)
+ return;
+ gcv.line_width = 1;
+ gcv.line_style = LineSolid;
+ gcv.fill_style = FillSolid;
+ gc = XCreateGC(fl_display, pixmap, GCLineWidth | GCLineStyle | GCFillStyle, &gcv);
+ XSetState(fl_display, gc, col_background, col_background, GXcopy, AllPlanes);
+ XFillRectangle(fl_display, pixmap, gc, 0, 0, W, H);
+ XFreeGC(fl_display, gc);
+ redraw();
+}
+
+/* ---------------------------------------------------------------------- */
+
+#define WIDTH 512
+
+/* ---------------------------------------------------------------------- */
+
+void scope::drawdata(short data[], int len, int xm)
+{
+ int cnt;
+ GC gc;
+ XGCValues gcv;
+
+ mode();
+ if (!pixmalloc || (drawmode != HDRVC_DIAGMODE_CONSTELLATION &&
+ drawmode != HDRVC_DIAGMODE_INPUT &&
+ drawmode != HDRVC_DIAGMODE_DEMOD))
+ return;
+ gcv.line_width = 1;
+ gcv.line_style = LineSolid;
+ gc = XCreateGC(fl_display, pixmap, GCLineWidth | GCLineStyle, &gcv);
+ if (drawmode == HDRVC_DIAGMODE_CONSTELLATION) {
+#define XCOORD(x) ((SHRT_MAX - (int)(x)) * W / USHRT_MAX)
+#define YCOORD(y) ((SHRT_MAX - (int)(y)) * H / USHRT_MAX)
+ XSetState(fl_display, gc, col_background, col_background, GXcopy, AllPlanes);
+ XSetForeground(fl_display, gc, col_trace);
+ for (cnt = 0; cnt < len-1; cnt += 2)
+ XDrawPoint(fl_display, pixmap, gc, XCOORD(data[cnt]), YCOORD(data[cnt+1]));
+ XSetForeground(fl_display, gc, col_zeroline);
+ XDrawLine(fl_display, pixmap, gc, 0, YCOORD(0), W, YCOORD(0));
+ XDrawLine(fl_display, pixmap, gc, XCOORD(0), 0, XCOORD(0), H);
+#undef XCOORD
+#undef YCOORD
+ } else {
+#define XCOORD(x) ((x) * xm)
+#define YCOORD(y) ((SHRT_MAX - (int)(y)) * H / USHRT_MAX)
+ XSetState(fl_display, gc, col_background, col_background, GXcopy, AllPlanes);
+ if (drawmode == HDRVC_DIAGMODE_INPUT) {
+ XFillRectangle(fl_display, pixmap, gc, 0, 0, W, H);
+ xm = 5;
+ }
+ XSetForeground(fl_display, gc, col_trace);
+ for (cnt = 0; cnt < len-1; cnt++)
+ XDrawLine(fl_display, pixmap, gc, XCOORD(cnt), YCOORD(data[cnt]),
+ XCOORD(cnt+1), YCOORD(data[cnt+1]));
+ XSetForeground(fl_display, gc, col_zeroline);
+ XDrawLine(fl_display, pixmap, gc, 0, YCOORD(0), W, YCOORD(0));
+#undef XCOORD
+#undef YCOORD
+ }
+ XFreeGC(fl_display, gc);
+ redraw();
+}
+
+/* ---------------------------------------------------------------------- */
+
+void cb_cleargr(Fl_Button *, long)
+{
+ scdisp->clear();
+}
+
+/* ---------------------------------------------------------------------- */
+
+void cb_mode(Fl_Check_Button *, long which)
+{
+ struct sm_diag_data diag;
+ short data;
+
+ diag.mode = HDRVC_DIAGMODE_OFF;
+ diag.flags = 0;
+ diag.datalen = 1;
+ diag.data = &data;
+ hdrvc_diag(&diag);
+ switch (which) {
+ case 256:
+ drawflags ^= HDRVC_DIAGFLAG_DCDGATE;
+ break;
+
+ case 0:
+ scdisp->mode(HDRVC_DIAGMODE_OFF);
+ drawflags = 0;
+ break;
+
+ case 1:
+ scdisp->mode(HDRVC_DIAGMODE_INPUT);
+ drawflags = 0;
+ break;
+
+ case 2:
+ scdisp->mode(HDRVC_DIAGMODE_DEMOD);
+ drawflags = HDRVC_DIAGFLAG_DCDGATE;
+ break;
+
+ case 3:
+ scdisp->mode(HDRVC_DIAGMODE_CONSTELLATION);
+ drawflags = HDRVC_DIAGFLAG_DCDGATE;
+ break;
+ }
+ sm_dcd->value(!!(drawflags & HDRVC_DIAGFLAG_DCDGATE));
+}
+
+/* ---------------------------------------------------------------------- */
+
+void cb_quit(Fl_Button *, long)
+{
+ struct sm_diag_data diag;
+ short data;
+
+ diag.mode = HDRVC_DIAGMODE_OFF;
+ diag.flags = 0;
+ diag.datalen = 1;
+ diag.data = &data;
+ hdrvc_diag(&diag);
+ exit(0);
+}
+
+/* ---------------------------------------------------------------------- */
+
+void cb_timer(void *)
+{
+ struct hdrvc_channel_state cs;
+ int ret;
+ short data[256];
+ unsigned int samplesperbit;
+
+ Fl::add_timeout(0.2, cb_timer);
+ /*
+ * display state
+ */
+ ret = hdrvc_get_channel_state(&cs);
+ if (ret < 0) {
+ perror("hdrvc_get_channel_state");
+ } else {
+ st_ptt->value(cs.ptt);
+ st_dcd->value(cs.dcd);
+ }
+ /*
+ * draw scope
+ */
+ if ((ret = hdrvc_diag2(scdisp->mode(), drawflags, data, sizeof(data) / sizeof(short),
+ &samplesperbit)) < 0) {
+ perror("hdrvc_diag2");
+ exit(1);
+ }
+ if (ret > 0)
+ scdisp->drawdata(data, ret, WIDTH / (2*(samplesperbit > 0 ? samplesperbit : 1)));
+}
+
+/* ---------------------------------------------------------------------- */
+
+static const char *usage_str =
+"[-i smif]\n"
+" -i: specify the name of the baycom kernel driver interface\n\n";
+
+/* ---------------------------------------------------------------------- */
+
+int main(int argc, char *argv[])
+{
+ int c, i;
+ int ret;
+ unsigned int ifflags;
+ char name[64];
+
+ progname = *argv;
+ printf("%s: Version 0.3; (C) 1996,1997,2000 by Thomas Sailer HB9JNX/AE4WA\n", *argv);
+
+ hdrvc_args(&argc, argv, "sm0");
+ for (i = 1; i < argc; ) {
+ c = i;
+ Fl::arg(argc, argv, c);
+ if (c <= 0) {
+ i++;
+ continue;
+ }
+ memmove(&argv[i], &argv[i+c], (argc-i) * sizeof(char *));
+ argc -= c;
+ }
+#if 0
+ while ((ret = getopt(argc, argv, "")) != -1) {
+ switch (ret) {
+ default:
+ printf("usage: %s %s", *argv, usage_str);
+ exit(-1);
+ }
+ }
+#endif
+ hdrvc_init();
+ ifflags = hdrvc_get_ifflags();
+ if (!(ifflags & IFF_UP)) {
+ fprintf(stderr, "interface %s down\n", hdrvc_ifname());
+ exit(1);
+ }
+ if (!(ifflags & IFF_RUNNING)) {
+ fprintf(stderr, "interface %s not running\n", hdrvc_ifname());
+ exit(1);
+ }
+ create_the_forms();
+ scdisp->hide();
+ /*
+ * set driver and modem name
+ */
+ ret = hdrvc_get_mode_name(name, sizeof(name));
+ if (ret < 0) {
+ perror("hdrvc_get_mode_name");
+ modename->hide();
+ } else
+ modename->value(name);
+ ret = hdrvc_get_driver_name(name, sizeof(name));
+ if (ret < 0) {
+ perror("hdrvc_get_driver_name");
+ drivername->hide();
+ } else
+ drivername->value(name);
+ Fl::add_timeout(0.1, cb_timer);
+ scopewindow->show();
+ Fl::run();
+ cb_quit(quit, 0);
+ exit(0);
+}
diff --git a/hdlcutil/fl/xfsmdiag_main.h b/hdlcutil/fl/xfsmdiag_main.h
new file mode 100644
index 0000000..38469c4
--- /dev/null
+++ b/hdlcutil/fl/xfsmdiag_main.h
@@ -0,0 +1,70 @@
+/*****************************************************************************/
+
+/*
+ * xfsmdiag_main.h -- kernel soundcard radio modem driver diagnostics utility.
+ *
+ * Copyright (C) 1996,1997,2000 Thomas Sailer (sailer@ife.ee.ethz.ch)
+ *
+ * This program 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.
+ *
+ * This program 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 this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * Please note that the GPL allows you to use the driver, NOT the radio.
+ * In order to use the radio, you need a license from the communications
+ * authority of your country.
+ *
+ *
+ * History:
+ * 0.1 14.12.1996 Started
+ * 0.2 11.05.1997 introduced hdrvcomm.h
+ * 0.3 05.01.2000 upgraded to fltk 1.0.7
+ */
+
+/*****************************************************************************/
+
+#ifndef _XFSMDIAG_MAIN_H
+#define _XFSMDIAG_MAIN_H
+
+/* ---------------------------------------------------------------------- */
+
+#include <FL/Fl.H>
+#include <FL/Fl_Box.H>
+#include <FL/x.H>
+
+/* ---------------------------------------------------------------------- */
+
+class scope : public Fl_Box {
+ Pixmap pixmap;
+ bool pixmalloc;
+ int X, Y, W, H;
+ unsigned long col_zeroline;
+ unsigned long col_background;
+ unsigned long col_trace;
+ int drawmode;
+
+protected:
+ void draw();
+ void resize(int, int, int, int);
+
+public:
+ scope(int, int, int, int, const char * = 0);
+ ~scope();
+
+ void drawdata(short data[], int len, int xm);
+ void mode(int dmode);
+ int mode(void);
+ void clear(void);
+};
+
+/* ---------------------------------------------------------------------- */
+#endif /* _XFSMDIAG_MAIN_H */
diff --git a/hdlcutil/fl/xfsmmixer.cxx b/hdlcutil/fl/xfsmmixer.cxx
new file mode 100644
index 0000000..57b5306
--- /dev/null
+++ b/hdlcutil/fl/xfsmmixer.cxx
@@ -0,0 +1,437 @@
+// generated by Fast Light User Interface Designer (fluid) version 1.00
+
+#include "xfsmmixer.h"
+
+Fl_Window *mixer_ad1848=(Fl_Window *)0;
+
+Fl_Value_Slider *ad1848_inl=(Fl_Value_Slider *)0;
+
+Fl_Value_Slider *ad1848_inr=(Fl_Value_Slider *)0;
+
+Fl_Value_Slider *ad1848_outl=(Fl_Value_Slider *)0;
+
+Fl_Value_Slider *ad1848_outr=(Fl_Value_Slider *)0;
+
+Fl_Button *ad1848_quit=(Fl_Button *)0;
+
+Fl_Group *ad1848_srcr=(Fl_Group *)0;
+
+Fl_Check_Button *ad1848_srcr_line=(Fl_Check_Button *)0;
+
+Fl_Check_Button *ad1848_srcr_aux1=(Fl_Check_Button *)0;
+
+Fl_Check_Button *ad1848_srcr_mic=(Fl_Check_Button *)0;
+
+Fl_Check_Button *ad1848_srcr_dac=(Fl_Check_Button *)0;
+
+Fl_Group *ad1848_srcl=(Fl_Group *)0;
+
+Fl_Check_Button *ad1848_srcl_line=(Fl_Check_Button *)0;
+
+Fl_Check_Button *ad1848_srcl_aux1=(Fl_Check_Button *)0;
+
+Fl_Check_Button *ad1848_srcl_mic=(Fl_Check_Button *)0;
+
+Fl_Check_Button *ad1848_srcl_dac=(Fl_Check_Button *)0;
+
+Fl_Window* create_form_ad1848() {
+ Fl_Window* w;
+ { Fl_Window* o = mixer_ad1848 = new Fl_Window(300, 330, "SoundModem Mixer");
+ w = o;
+ o->box(FL_NO_BOX);
+ { Fl_Box* o = new Fl_Box(0, 0, 300, 330);
+ o->box(FL_UP_BOX);
+ }
+ { Fl_Box* o = new Fl_Box(10, 10, 280, 310);
+ o->box(FL_DOWN_BOX);
+ }
+ { Fl_Value_Slider* o = ad1848_inl = new Fl_Value_Slider(20, 20, 30, 270, "Input\nleft");
+ o->type(2);
+ o->labelsize(8);
+ o->callback((Fl_Callback*)update_ad1848);
+ }
+ { Fl_Value_Slider* o = ad1848_inr = new Fl_Value_Slider(60, 20, 30, 270, "Input\nright");
+ o->type(2);
+ o->labelsize(8);
+ o->callback((Fl_Callback*)update_ad1848);
+ }
+ { Fl_Value_Slider* o = ad1848_outl = new Fl_Value_Slider(100, 20, 30, 270, "Output\nleft");
+ o->type(2);
+ o->labelsize(8);
+ o->callback((Fl_Callback*)update_ad1848);
+ }
+ { Fl_Value_Slider* o = ad1848_outr = new Fl_Value_Slider(140, 20, 30, 270, "Output\nright");
+ o->type(2);
+ o->labelsize(8);
+ o->callback((Fl_Callback*)update_ad1848);
+ }
+ { Fl_Button* o = ad1848_quit = new Fl_Button(180, 280, 100, 30, "Quit");
+ o->callback((Fl_Callback*)cb_quit, (void*)(0));
+ }
+ { Fl_Group* o = ad1848_srcr = new Fl_Group(180, 150, 100, 120);
+ o->align(FL_ALIGN_CENTER);
+ { Fl_Box* o = new Fl_Box(180, 150, 100, 120);
+ o->box(FL_DOWN_BOX);
+ }
+ { Fl_Check_Button* o = ad1848_srcr_line = new Fl_Check_Button(190, 180, 60, 20, "Line");
+ o->type(102);
+ o->down_box(FL_DIAMOND_DOWN_BOX);
+ o->selection_color(3);
+ o->callback((Fl_Callback*)update_ad1848);
+ }
+ { Fl_Check_Button* o = ad1848_srcr_aux1 = new Fl_Check_Button(190, 200, 60, 20, "Aux1");
+ o->type(102);
+ o->down_box(FL_DIAMOND_DOWN_BOX);
+ o->selection_color(3);
+ o->callback((Fl_Callback*)update_ad1848);
+ }
+ { Fl_Check_Button* o = ad1848_srcr_mic = new Fl_Check_Button(190, 220, 60, 20, "Mic");
+ o->type(102);
+ o->down_box(FL_DIAMOND_DOWN_BOX);
+ o->selection_color(3);
+ o->callback((Fl_Callback*)update_ad1848);
+ }
+ { Fl_Check_Button* o = ad1848_srcr_dac = new Fl_Check_Button(190, 240, 60, 20, "DAC");
+ o->type(102);
+ o->down_box(FL_DIAMOND_DOWN_BOX);
+ o->selection_color(3);
+ o->callback((Fl_Callback*)update_ad1848);
+ }
+ { Fl_Box* o = new Fl_Box(190, 160, 60, 20, "Right source");
+ o->box(FL_FLAT_BOX);
+ o->align(FL_ALIGN_LEFT|FL_ALIGN_INSIDE);
+ }
+ o->end();
+ }
+ { Fl_Group* o = ad1848_srcl = new Fl_Group(180, 20, 100, 120);
+ o->align(FL_ALIGN_CENTER);
+ { Fl_Box* o = new Fl_Box(180, 20, 100, 120);
+ o->box(FL_DOWN_BOX);
+ }
+ { Fl_Box* o = new Fl_Box(190, 30, 60, 20, "Left source");
+ o->box(FL_FLAT_BOX);
+ o->align(FL_ALIGN_LEFT|FL_ALIGN_INSIDE);
+ }
+ { Fl_Check_Button* o = ad1848_srcl_line = new Fl_Check_Button(190, 50, 60, 20, "Line");
+ o->type(102);
+ o->down_box(FL_DIAMOND_DOWN_BOX);
+ o->selection_color(3);
+ o->callback((Fl_Callback*)update_ad1848);
+ }
+ { Fl_Check_Button* o = ad1848_srcl_aux1 = new Fl_Check_Button(190, 70, 60, 20, "Aux1");
+ o->type(102);
+ o->down_box(FL_DIAMOND_DOWN_BOX);
+ o->selection_color(3);
+ o->callback((Fl_Callback*)update_ad1848);
+ }
+ { Fl_Check_Button* o = ad1848_srcl_mic = new Fl_Check_Button(190, 90, 60, 20, "Mic");
+ o->type(102);
+ o->down_box(FL_DIAMOND_DOWN_BOX);
+ o->selection_color(3);
+ o->callback((Fl_Callback*)update_ad1848);
+ }
+ { Fl_Check_Button* o = ad1848_srcl_dac = new Fl_Check_Button(190, 110, 60, 20, "DAC");
+ o->type(102);
+ o->down_box(FL_DIAMOND_DOWN_BOX);
+ o->selection_color(3);
+ o->callback((Fl_Callback*)update_ad1848);
+ }
+ o->end();
+ }
+ o->end();
+ }
+ return w;
+}
+
+Fl_Window *mixer_ct1335=(Fl_Window *)0;
+
+Fl_Value_Slider *ct1335_out=(Fl_Value_Slider *)0;
+
+Fl_Button *ct1335_quit=(Fl_Button *)0;
+
+Fl_Window* create_form_ct1335() {
+ Fl_Window* w;
+ { Fl_Window* o = mixer_ct1335 = new Fl_Window(100, 360, "SoundModem Mixer");
+ w = o;
+ o->box(FL_NO_BOX);
+ { Fl_Box* o = new Fl_Box(0, 0, 100, 360);
+ o->box(FL_UP_BOX);
+ }
+ { Fl_Box* o = new Fl_Box(10, 10, 80, 340);
+ o->box(FL_DOWN_BOX);
+ }
+ { Fl_Value_Slider* o = ct1335_out = new Fl_Value_Slider(30, 20, 40, 270, "Output");
+ o->type(2);
+ o->labelsize(8);
+ o->callback((Fl_Callback*)update_ct1335);
+ }
+ { Fl_Button* o = ct1335_quit = new Fl_Button(20, 310, 60, 30, "Quit");
+ o->callback((Fl_Callback*)cb_quit, (void*)(0));
+ }
+ o->end();
+ }
+ return w;
+}
+
+Fl_Window *mixer_ct1345=(Fl_Window *)0;
+
+Fl_Value_Slider *ct1345_outl=(Fl_Value_Slider *)0;
+
+Fl_Value_Slider *ct1345_outr=(Fl_Value_Slider *)0;
+
+Fl_Button *ct1345_quit=(Fl_Button *)0;
+
+Fl_Group *ct1345_src=(Fl_Group *)0;
+
+Fl_Check_Button *ct1345_src_mic=(Fl_Check_Button *)0;
+
+Fl_Check_Button *ct1345_src_cd=(Fl_Check_Button *)0;
+
+Fl_Check_Button *ct1345_src_line=(Fl_Check_Button *)0;
+
+Fl_Window* create_form_ct1345() {
+ Fl_Window* w;
+ { Fl_Window* o = mixer_ct1345 = new Fl_Window(190, 330, "SoundModem Mixer");
+ w = o;
+ o->box(FL_NO_BOX);
+ { Fl_Box* o = new Fl_Box(0, 0, 190, 330);
+ o->box(FL_UP_BOX);
+ }
+ { Fl_Box* o = new Fl_Box(10, 10, 170, 310);
+ o->box(FL_DOWN_BOX);
+ }
+ { Fl_Value_Slider* o = ct1345_outl = new Fl_Value_Slider(20, 20, 30, 270, "Output\nleft");
+ o->type(2);
+ o->labelsize(8);
+ o->callback((Fl_Callback*)update_ct1345);
+ }
+ { Fl_Value_Slider* o = ct1345_outr = new Fl_Value_Slider(60, 20, 30, 270, "Output\nright");
+ o->type(2);
+ o->labelsize(8);
+ o->callback((Fl_Callback*)update_ct1345);
+ }
+ { Fl_Button* o = ct1345_quit = new Fl_Button(100, 280, 70, 30, "Quit");
+ o->callback((Fl_Callback*)cb_quit, (void*)(0));
+ }
+ { Fl_Group* o = ct1345_src = new Fl_Group(100, 20, 70, 100);
+ o->align(FL_ALIGN_CENTER);
+ { Fl_Box* o = new Fl_Box(100, 20, 70, 100);
+ o->box(FL_DOWN_BOX);
+ }
+ { Fl_Check_Button* o = ct1345_src_mic = new Fl_Check_Button(110, 50, 50, 20, "Mic");
+ o->type(102);
+ o->down_box(FL_DIAMOND_DOWN_BOX);
+ o->selection_color(3);
+ o->callback((Fl_Callback*)update_ct1345);
+ }
+ { Fl_Check_Button* o = ct1345_src_cd = new Fl_Check_Button(110, 70, 50, 20, "CD");
+ o->type(102);
+ o->down_box(FL_DIAMOND_DOWN_BOX);
+ o->selection_color(3);
+ o->callback((Fl_Callback*)update_ct1345);
+ }
+ { Fl_Check_Button* o = ct1345_src_line = new Fl_Check_Button(110, 90, 50, 20, "Line");
+ o->type(102);
+ o->down_box(FL_DIAMOND_DOWN_BOX);
+ o->selection_color(3);
+ o->callback((Fl_Callback*)update_ct1345);
+ }
+ { Fl_Box* o = new Fl_Box(110, 30, 50, 20, "Source");
+ o->box(FL_FLAT_BOX);
+ o->align(FL_ALIGN_LEFT|FL_ALIGN_INSIDE);
+ }
+ o->end();
+ }
+ o->end();
+ }
+ return w;
+}
+
+Fl_Window *mixer_ct1745=(Fl_Window *)0;
+
+Fl_Value_Slider *ct1745_inl=(Fl_Value_Slider *)0;
+
+Fl_Value_Slider *ct1745_inr=(Fl_Value_Slider *)0;
+
+Fl_Value_Slider *ct1745_outl=(Fl_Value_Slider *)0;
+
+Fl_Value_Slider *ct1745_outr=(Fl_Value_Slider *)0;
+
+Fl_Button *ct1745_quit=(Fl_Button *)0;
+
+Fl_Value_Slider *ct1745_treble=(Fl_Value_Slider *)0;
+
+Fl_Value_Slider *ct1745_bass=(Fl_Value_Slider *)0;
+
+Fl_Group *ct1745_srcl=(Fl_Group *)0;
+
+Fl_Check_Button *ct1745_srcl_mic=(Fl_Check_Button *)0;
+
+Fl_Check_Button *ct1745_srcl_cdl=(Fl_Check_Button *)0;
+
+Fl_Check_Button *ct1745_srcl_cdr=(Fl_Check_Button *)0;
+
+Fl_Check_Button *ct1745_srcl_linel=(Fl_Check_Button *)0;
+
+Fl_Check_Button *ct1745_srcl_midil=(Fl_Check_Button *)0;
+
+Fl_Check_Button *ct1745_srcl_midir=(Fl_Check_Button *)0;
+
+Fl_Check_Button *ct1745_srcl_liner=(Fl_Check_Button *)0;
+
+Fl_Group *ct1745_srcr=(Fl_Group *)0;
+
+Fl_Check_Button *ct1745_srcr_mic=(Fl_Check_Button *)0;
+
+Fl_Check_Button *ct1745_srcr_cdl=(Fl_Check_Button *)0;
+
+Fl_Check_Button *ct1745_srcr_cdr=(Fl_Check_Button *)0;
+
+Fl_Check_Button *ct1745_srcr_linel=(Fl_Check_Button *)0;
+
+Fl_Check_Button *ct1745_srcr_midil=(Fl_Check_Button *)0;
+
+Fl_Check_Button *ct1745_srcr_midir=(Fl_Check_Button *)0;
+
+Fl_Check_Button *ct1745_srcr_liner=(Fl_Check_Button *)0;
+
+Fl_Window* create_form_ct1745() {
+ Fl_Window* w;
+ { Fl_Window* o = mixer_ct1745 = new Fl_Window(430, 330, "SoundModem Mixer");
+ w = o;
+ o->box(FL_NO_BOX);
+ { Fl_Box* o = new Fl_Box(0, 0, 430, 330);
+ o->box(FL_UP_BOX);
+ }
+ { Fl_Box* o = new Fl_Box(10, 10, 410, 310);
+ o->box(FL_DOWN_BOX);
+ }
+ { Fl_Value_Slider* o = ct1745_inl = new Fl_Value_Slider(20, 20, 30, 270, "Input\nleft");
+ o->type(2);
+ o->labelsize(8);
+ o->callback((Fl_Callback*)update_ct1745);
+ }
+ { Fl_Value_Slider* o = ct1745_inr = new Fl_Value_Slider(60, 20, 30, 270, "Input\nright");
+ o->type(2);
+ o->labelsize(8);
+ o->callback((Fl_Callback*)update_ct1745);
+ }
+ { Fl_Value_Slider* o = ct1745_outl = new Fl_Value_Slider(100, 20, 30, 270, "Output\nleft");
+ o->type(2);
+ o->labelsize(8);
+ o->callback((Fl_Callback*)update_ct1745);
+ }
+ { Fl_Value_Slider* o = ct1745_outr = new Fl_Value_Slider(140, 20, 30, 270, "Output\nright");
+ o->type(2);
+ o->labelsize(8);
+ o->callback((Fl_Callback*)update_ct1745);
+ }
+ { Fl_Button* o = ct1745_quit = new Fl_Button(180, 280, 230, 30, "Quit");
+ o->callback((Fl_Callback*)cb_quit, (void*)(0));
+ }
+ { Fl_Value_Slider* o = ct1745_treble = new Fl_Value_Slider(180, 210, 230, 20, "Treble");
+ o->type(3);
+ o->labelsize(8);
+ o->callback((Fl_Callback*)update_ct1745);
+ }
+ { Fl_Value_Slider* o = ct1745_bass = new Fl_Value_Slider(180, 250, 230, 20, "Bass");
+ o->type(3);
+ o->labelsize(8);
+ o->callback((Fl_Callback*)update_ct1745);
+ }
+ { Fl_Group* o = ct1745_srcl = new Fl_Group(180, 20, 110, 180);
+ o->align(FL_ALIGN_CENTER);
+ { Fl_Box* o = new Fl_Box(180, 20, 110, 180);
+ o->box(FL_DOWN_BOX);
+ }
+ { Fl_Box* o = new Fl_Box(191, 29, 89, 18, "Left source");
+ o->box(FL_FLAT_BOX);
+ o->align(FL_ALIGN_LEFT|FL_ALIGN_INSIDE);
+ }
+ { Fl_Check_Button* o = ct1745_srcl_mic = new Fl_Check_Button(190, 50, 90, 20, "Mic");
+ o->down_box(FL_DIAMOND_DOWN_BOX);
+ o->selection_color(3);
+ o->callback((Fl_Callback*)update_ct1745);
+ }
+ { Fl_Check_Button* o = ct1745_srcl_cdl = new Fl_Check_Button(190, 70, 90, 20, "CD left");
+ o->down_box(FL_DIAMOND_DOWN_BOX);
+ o->selection_color(3);
+ o->callback((Fl_Callback*)update_ct1745);
+ }
+ { Fl_Check_Button* o = ct1745_srcl_cdr = new Fl_Check_Button(190, 90, 90, 20, "CD right");
+ o->down_box(FL_DIAMOND_DOWN_BOX);
+ o->selection_color(3);
+ o->callback((Fl_Callback*)update_ct1745);
+ }
+ { Fl_Check_Button* o = ct1745_srcl_linel = new Fl_Check_Button(190, 110, 90, 20, "Line left");
+ o->down_box(FL_DIAMOND_DOWN_BOX);
+ o->selection_color(3);
+ o->callback((Fl_Callback*)update_ct1745);
+ }
+ { Fl_Check_Button* o = ct1745_srcl_midil = new Fl_Check_Button(190, 150, 90, 20, "MIDI left");
+ o->down_box(FL_DIAMOND_DOWN_BOX);
+ o->selection_color(3);
+ o->callback((Fl_Callback*)update_ct1745);
+ }
+ { Fl_Check_Button* o = ct1745_srcl_midir = new Fl_Check_Button(190, 170, 90, 20, "MIDI right");
+ o->down_box(FL_DIAMOND_DOWN_BOX);
+ o->selection_color(3);
+ o->callback((Fl_Callback*)update_ct1745);
+ }
+ { Fl_Check_Button* o = ct1745_srcl_liner = new Fl_Check_Button(190, 130, 90, 20, "Line right");
+ o->down_box(FL_DIAMOND_DOWN_BOX);
+ o->selection_color(3);
+ o->callback((Fl_Callback*)update_ct1745);
+ }
+ o->end();
+ }
+ { Fl_Group* o = ct1745_srcr = new Fl_Group(300, 20, 110, 180);
+ o->align(FL_ALIGN_CENTER);
+ { Fl_Box* o = new Fl_Box(300, 20, 110, 180);
+ o->box(FL_DOWN_BOX);
+ }
+ { Fl_Box* o = new Fl_Box(311, 29, 89, 18, "Right source");
+ o->box(FL_FLAT_BOX);
+ o->align(FL_ALIGN_LEFT|FL_ALIGN_INSIDE);
+ }
+ { Fl_Check_Button* o = ct1745_srcr_mic = new Fl_Check_Button(310, 50, 90, 20, "Mic");
+ o->down_box(FL_DIAMOND_DOWN_BOX);
+ o->selection_color(3);
+ o->callback((Fl_Callback*)update_ct1745);
+ }
+ { Fl_Check_Button* o = ct1745_srcr_cdl = new Fl_Check_Button(310, 70, 90, 20, "CD left");
+ o->down_box(FL_DIAMOND_DOWN_BOX);
+ o->selection_color(3);
+ o->callback((Fl_Callback*)update_ct1745);
+ }
+ { Fl_Check_Button* o = ct1745_srcr_cdr = new Fl_Check_Button(310, 90, 90, 20, "CD right");
+ o->down_box(FL_DIAMOND_DOWN_BOX);
+ o->selection_color(3);
+ o->callback((Fl_Callback*)update_ct1745);
+ }
+ { Fl_Check_Button* o = ct1745_srcr_linel = new Fl_Check_Button(310, 110, 90, 20, "Line left");
+ o->down_box(FL_DIAMOND_DOWN_BOX);
+ o->selection_color(3);
+ o->callback((Fl_Callback*)update_ct1745);
+ }
+ { Fl_Check_Button* o = ct1745_srcr_midil = new Fl_Check_Button(310, 150, 90, 20, "MIDI left");
+ o->down_box(FL_DIAMOND_DOWN_BOX);
+ o->selection_color(3);
+ o->callback((Fl_Callback*)update_ct1745);
+ }
+ { Fl_Check_Button* o = ct1745_srcr_midir = new Fl_Check_Button(310, 170, 90, 20, "MIDI right");
+ o->down_box(FL_DIAMOND_DOWN_BOX);
+ o->selection_color(3);
+ o->callback((Fl_Callback*)update_ct1745);
+ }
+ { Fl_Check_Button* o = ct1745_srcr_liner = new Fl_Check_Button(310, 130, 90, 20, "Line right");
+ o->down_box(FL_DIAMOND_DOWN_BOX);
+ o->selection_color(3);
+ o->callback((Fl_Callback*)update_ct1745);
+ }
+ o->end();
+ }
+ o->end();
+ }
+ return w;
+}
diff --git a/hdlcutil/fl/xfsmmixer.h b/hdlcutil/fl/xfsmmixer.h
new file mode 100644
index 0000000..5a59e8f
--- /dev/null
+++ b/hdlcutil/fl/xfsmmixer.h
@@ -0,0 +1,79 @@
+// generated by Fast Light User Interface Designer (fluid) version 1.00
+
+#ifndef xfsmmixer_h
+#define xfsmmixer_h
+#include <FL/Fl.H>
+#include <FL/Fl_Window.H>
+extern Fl_Window *mixer_ad1848;
+#include <FL/Fl_Box.H>
+#include <FL/Fl_Value_Slider.H>
+extern void update_ad1848(Fl_Widget*, void*);
+extern void update_ad1848(Fl_Value_Slider*, void*);
+extern Fl_Value_Slider *ad1848_inl;
+extern Fl_Value_Slider *ad1848_inr;
+extern Fl_Value_Slider *ad1848_outl;
+extern Fl_Value_Slider *ad1848_outr;
+#include <FL/Fl_Button.H>
+extern void cb_quit(Fl_Button*, long);
+extern Fl_Button *ad1848_quit;
+#include <FL/Fl_Group.H>
+extern Fl_Group *ad1848_srcr;
+#include <FL/Fl_Check_Button.H>
+extern void update_ad1848(Fl_Check_Button*, void*);
+extern Fl_Check_Button *ad1848_srcr_line;
+extern Fl_Check_Button *ad1848_srcr_aux1;
+extern Fl_Check_Button *ad1848_srcr_mic;
+extern Fl_Check_Button *ad1848_srcr_dac;
+extern Fl_Group *ad1848_srcl;
+extern Fl_Check_Button *ad1848_srcl_line;
+extern Fl_Check_Button *ad1848_srcl_aux1;
+extern Fl_Check_Button *ad1848_srcl_mic;
+extern Fl_Check_Button *ad1848_srcl_dac;
+Fl_Window* create_form_ad1848();
+extern Fl_Window *mixer_ct1335;
+extern void update_ct1335(Fl_Widget*, void*);
+extern void update_ct1335(Fl_Value_Slider*, void*);
+extern Fl_Value_Slider *ct1335_out;
+extern Fl_Button *ct1335_quit;
+Fl_Window* create_form_ct1335();
+extern Fl_Window *mixer_ct1345;
+extern void update_ct1345(Fl_Widget*, void*);
+extern void update_ct1345(Fl_Value_Slider*, void*);
+extern Fl_Value_Slider *ct1345_outl;
+extern Fl_Value_Slider *ct1345_outr;
+extern Fl_Button *ct1345_quit;
+extern Fl_Group *ct1345_src;
+extern void update_ct1345(Fl_Check_Button*, void*);
+extern Fl_Check_Button *ct1345_src_mic;
+extern Fl_Check_Button *ct1345_src_cd;
+extern Fl_Check_Button *ct1345_src_line;
+Fl_Window* create_form_ct1345();
+extern Fl_Window *mixer_ct1745;
+extern void update_ct1745(Fl_Widget*, void*);
+extern void update_ct1745(Fl_Value_Slider*, void*);
+extern Fl_Value_Slider *ct1745_inl;
+extern Fl_Value_Slider *ct1745_inr;
+extern Fl_Value_Slider *ct1745_outl;
+extern Fl_Value_Slider *ct1745_outr;
+extern Fl_Button *ct1745_quit;
+extern Fl_Value_Slider *ct1745_treble;
+extern Fl_Value_Slider *ct1745_bass;
+extern Fl_Group *ct1745_srcl;
+extern void update_ct1745(Fl_Check_Button*, void*);
+extern Fl_Check_Button *ct1745_srcl_mic;
+extern Fl_Check_Button *ct1745_srcl_cdl;
+extern Fl_Check_Button *ct1745_srcl_cdr;
+extern Fl_Check_Button *ct1745_srcl_linel;
+extern Fl_Check_Button *ct1745_srcl_midil;
+extern Fl_Check_Button *ct1745_srcl_midir;
+extern Fl_Check_Button *ct1745_srcl_liner;
+extern Fl_Group *ct1745_srcr;
+extern Fl_Check_Button *ct1745_srcr_mic;
+extern Fl_Check_Button *ct1745_srcr_cdl;
+extern Fl_Check_Button *ct1745_srcr_cdr;
+extern Fl_Check_Button *ct1745_srcr_linel;
+extern Fl_Check_Button *ct1745_srcr_midil;
+extern Fl_Check_Button *ct1745_srcr_midir;
+extern Fl_Check_Button *ct1745_srcr_liner;
+Fl_Window* create_form_ct1745();
+#endif
diff --git a/hdlcutil/fl/xfsmmixer_main.cxx b/hdlcutil/fl/xfsmmixer_main.cxx
new file mode 100644
index 0000000..15c3e79
--- /dev/null
+++ b/hdlcutil/fl/xfsmmixer_main.cxx
@@ -0,0 +1,462 @@
+/*****************************************************************************/
+
+/*
+ * xfsmmixer_main.c -- kernel soundcard radio modem driver mixer utility.
+ *
+ * Copyright (C) 1996,1997,2000 Thomas Sailer (sailer@ife.ee.ethz.ch)
+ *
+ * This program 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.
+ *
+ * This program 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 this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * Please note that the GPL allows you to use the driver, NOT the radio.
+ * In order to use the radio, you need a license from the communications
+ * authority of your country.
+ *
+ *
+ * History:
+ * 0.1 14.12.1996 Started
+ * 0.2 11.05.1997 introduced hdrvcomm.h
+ * 0.3 05.01.2000 upgraded to fltk 1.0.7
+ */
+
+/*****************************************************************************/
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <unistd.h>
+#include <string.h>
+#include <net/if.h>
+//#include <forms.h>
+#include "hdrvcomm.h"
+#include "xfsmmixer.h"
+
+/* ---------------------------------------------------------------------- */
+
+static char *progname;
+static unsigned int mixdevice;
+
+/* ---------------------------------------------------------------------- */
+
+static int do_mix_ioctl(int cmd, struct sm_mixer_data *mixdat)
+{
+ struct sm_ioctl par;
+ int i;
+
+ par.cmd = cmd;
+ par.data.mix = *mixdat;
+ i = hdrvc_sm_ioctl(cmd, &par);
+ *mixdat = par.data.mix;
+ return i;
+}
+
+/* ---------------------------------------------------------------------- */
+
+static unsigned char get_mixer_reg(unsigned char addr)
+{
+ int i;
+ struct sm_mixer_data mixdat;
+
+ mixdat.reg = addr;
+ if ((i = do_mix_ioctl(SMCTL_GETMIXER, &mixdat)) < 0) {
+ perror("do_mix_ioctl: SMCTL_GETMIXER");
+ exit(1);
+ }
+ if (!i)
+ fprintf(stderr, "warning: mixer device %u register %u not "
+ "accessible for reading!\n", mixdat.mixer_type,
+ addr);
+ if (mixdat.mixer_type != mixdevice) {
+ fprintf(stderr, "error: mixer type changed !?\n");
+ exit(2);
+ }
+ return mixdat.data;
+}
+
+/* ---------------------------------------------------------------------- */
+
+static void set_mixer_reg(unsigned char addr, unsigned char data)
+{
+ struct sm_mixer_data mixdat;
+
+ mixdat.reg = addr;
+ mixdat.data = data;
+ mixdat.mixer_type = mixdevice;
+ if (do_mix_ioctl(SMCTL_SETMIXER, &mixdat) < 0) {
+ perror("do_mix_ioctl: SMCTL_SETMIXER");
+ exit(1);
+ }
+}
+
+/* ---------------------------------------------------------------------- */
+
+void update_ad1848(Fl_Widget *widget, void *udata)
+{
+ unsigned char mdata;
+ float mval;
+
+ mdata = 0;
+ if (ad1848_srcl_line->value())
+ mdata = 0x00;
+ else if (ad1848_srcl_aux1->value())
+ mdata = 0x40;
+ else if (ad1848_srcl_mic->value())
+ mdata = 0x80;
+ else if (ad1848_srcl_dac->value())
+ mdata = 0xc0;
+ mval = ad1848_inl->value();
+ if (mdata == 0x80 && mval >= 20) {
+ mval -= 20;
+ mdata |= 0x20;
+ }
+ mval *= 0.666666;
+ if (mval > 15)
+ mval = 15;
+ mdata |= (int)mval;
+ set_mixer_reg(0x00, mdata);
+ mdata = 0;
+ if (ad1848_srcr_line->value())
+ mdata = 0x00;
+ else if (ad1848_srcr_aux1->value())
+ mdata = 0x40;
+ else if (ad1848_srcr_mic->value())
+ mdata = 0x80;
+ else if (ad1848_srcr_dac->value())
+ mdata = 0xc0;
+ mval = ad1848_inr->value();
+ if (mdata == 0x80 && mval >= 20) {
+ mval -= 20;
+ mdata |= 0x20;
+ }
+ mval *= 0.666666;
+ if (mval > 15)
+ mval = 15;
+ mdata |= (int)mval;
+ set_mixer_reg(0x01, mdata);
+ set_mixer_reg(0x02, 0x80);
+ set_mixer_reg(0x03, 0x80);
+ set_mixer_reg(0x04, 0x80);
+ set_mixer_reg(0x05, 0x80);
+ mval = ad1848_outl->value();
+ if (mval < -95)
+ set_mixer_reg(0x06, 0x80);
+ else
+ set_mixer_reg(0x06, (unsigned char)(mval * (-0.66666666)));
+ mval = ad1848_outr->value();
+ if (mval < -95)
+ set_mixer_reg(0x07, 0x80);
+ else
+ set_mixer_reg(0x07, (unsigned char)(mval * (-0.66666666)));
+ set_mixer_reg(0x0d, 0x00);
+}
+
+/* ---------------------------------------------------------------------- */
+
+void update_ct1335(Fl_Widget *widget, void *udata)
+{
+ float mval;
+
+ mval = ct1335_out->value() * (7.0 / 46.0);
+ set_mixer_reg(0x02, ((((int)(mval)) + 7) << 1));
+ set_mixer_reg(0x06, 0x00);
+ set_mixer_reg(0x08, 0x00);
+ set_mixer_reg(0x0a, 0x06);
+}
+
+/* ---------------------------------------------------------------------- */
+
+void update_ct1345(Fl_Widget *widget, void *udata)
+{
+ unsigned char mdata;
+ double mval;
+
+ set_mixer_reg(0x04, 0xee);
+ set_mixer_reg(0x0a, 0x00);
+ mdata = 0x20;
+ if (ct1345_src_mic->value())
+ mdata = 0x20;
+ else if (ct1345_src_cd->value())
+ mdata = 0x22;
+ else if (ct1345_src_line->value())
+ mdata = 0x26;
+ set_mixer_reg(0x0c, mdata);
+ set_mixer_reg(0x0e, 0x20);
+ mval = ct1345_outl->value() * (7.0 / 46.0);
+ mdata = (((int)(mval))+7) << 5;
+ mval = ct1345_outr->value() * (7.0 / 46.0);
+ mdata |= (((int)(mval))+7) << 1;
+ set_mixer_reg(0x22, mdata);
+ set_mixer_reg(0x26, 0x00);
+ set_mixer_reg(0x28, 0x00);
+ set_mixer_reg(0x2e, 0x00);
+}
+
+/* ---------------------------------------------------------------------- */
+
+void update_ct1745(Fl_Widget *widget, void *udata)
+{
+ unsigned char mdata;
+ float mval;
+
+ set_mixer_reg(0x3c, 0); /* output src: only voice and pcspk */
+ mval = ct1745_treble->value();
+ set_mixer_reg(0x44, ((int)mval)<<4); /* treble.l */
+ set_mixer_reg(0x45, ((int)mval)<<4); /* treble.r */
+ mval = ct1745_bass->value();
+ set_mixer_reg(0x46, ((int)mval)<<4); /* bass.l */
+ set_mixer_reg(0x47, ((int)mval)<<4); /* bass.r */
+ set_mixer_reg(0x3b, 0); /* PC speaker vol -18dB */
+ set_mixer_reg(0x43, 1); /* mic: agc off, fixed 20dB gain */
+ mval = ct1745_outl->value();
+ mdata = 0;
+ while (mval > 0) {
+ mval -= 6;
+ mdata += 0x40;
+ }
+ set_mixer_reg(0x41, mdata); /* output gain */
+ set_mixer_reg(0x30, 0xf8); /* master vol */
+ set_mixer_reg(0x32, ((int)(mval * 0.5) + 31) << 3); /* voice vol */
+ mval = ct1745_outr->value();
+ mdata = 0;
+ while (mval > 0) {
+ mval -= 6;
+ mdata += 0x40;
+ }
+ set_mixer_reg(0x42, mdata); /* output gain */
+ set_mixer_reg(0x31, 0xf8); /* master vol */
+ set_mixer_reg(0x33, ((int)(mval * 0.5) + 31) << 3); /* voice vol */
+ mval = ct1745_inl->value();
+ mdata = 0;
+ while (mval > 0) {
+ mval -= 6;
+ mdata += 0x40;
+ }
+ set_mixer_reg(0x3f, mdata); /* input gain */
+ mdata = ((int)(mval * 0.5) + 31) << 3;
+ set_mixer_reg(0x34, mdata); /* midi vol */
+ set_mixer_reg(0x36, mdata); /* cd vol */
+ set_mixer_reg(0x38, mdata); /* line vol */
+ set_mixer_reg(0x3a, mdata); /* mic vol */
+ mval = ct1745_inr->value();
+ mdata = 0;
+ while (mval > 0) {
+ mval -= 6;
+ mdata += 0x40;
+ }
+ set_mixer_reg(0x40, mdata); /* input gain */
+ mdata = ((int)(mval * 0.5) + 31) << 3;
+ set_mixer_reg(0x35, mdata); /* midi vol */
+ set_mixer_reg(0x37, mdata); /* cd vol */
+ set_mixer_reg(0x39, mdata); /* line vol */
+ mdata = 0;
+ if (ct1745_srcl_mic->value())
+ mdata |= 0x01;
+ if (ct1745_srcl_cdl->value())
+ mdata |= 0x04;
+ if (ct1745_srcl_cdr->value())
+ mdata |= 0x02;
+ if (ct1745_srcl_linel->value())
+ mdata |= 0x10;
+ if (ct1745_srcl_liner->value())
+ mdata |= 0x08;
+ if (ct1745_srcl_midil->value())
+ mdata |= 0x40;
+ if (ct1745_srcl_midir->value())
+ mdata |= 0x20;
+ set_mixer_reg(0x3d, mdata); /* input sources left */
+ mdata = 0;
+ if (ct1745_srcr_mic->value())
+ mdata |= 0x01;
+ if (ct1745_srcr_cdl->value())
+ mdata |= 0x04;
+ if (ct1745_srcr_cdr->value())
+ mdata |= 0x02;
+ if (ct1745_srcr_linel->value())
+ mdata |= 0x10;
+ if (ct1745_srcr_liner->value())
+ mdata |= 0x08;
+ if (ct1745_srcr_midil->value())
+ mdata |= 0x40;
+ if (ct1745_srcr_midir->value())
+ mdata |= 0x20;
+ set_mixer_reg(0x3e, mdata); /* input sources right*/
+}
+
+/* ---------------------------------------------------------------------- */
+
+void cb_quit(Fl_Button *, long)
+{
+ exit (0);
+}
+
+/* ---------------------------------------------------------------------- */
+
+static const char *usage_str =
+"[-i smif]\n"
+" -i: specify the name of the soundmodem kernel driver interface\n\n";
+
+/* ---------------------------------------------------------------------- */
+
+int main(int argc, char *argv[])
+{
+ int c, i;
+ struct sm_mixer_data mixdat;
+ unsigned char mdata;
+
+ progname = *argv;
+ printf("%s: Version 0.3; (C) 1996,1997,2000 by Thomas Sailer HB9JNX/AE4WA\n", progname);
+ hdrvc_args(&argc, argv, "sm0");
+ for (i = 1; i < argc; ) {
+ c = i;
+ Fl::arg(argc, argv, c);
+ if (c <= 0) {
+ i++;
+ continue;
+ }
+ memmove(&argv[i], &argv[i+c], (argc-i) * sizeof(char *));
+ argc -= c;
+ }
+#if 0
+ while ((ret = getopt(argc, argv, "")) != -1) {
+ switch (ret) {
+ default:
+ printf("usage: %s %s", progname, usage_str);
+ exit(-1);
+ }
+ }
+#endif
+ hdrvc_init();
+ /*
+ * set mixer
+ */
+ mixdat.reg = 0;
+ if (do_mix_ioctl(SMCTL_GETMIXER, &mixdat) < 0) {
+ perror("do_mix_ioctl: SMCTL_GETMIXER");
+ mixdevice = SM_MIXER_INVALID;
+ } else
+ mixdevice = mixdat.mixer_type;
+ switch (mixdevice) {
+ case SM_MIXER_INVALID:
+ printf("invalid mixer device\n");
+ exit(1);
+
+ case SM_MIXER_AD1848:
+ case SM_MIXER_CRYSTAL:
+ printf("Mixer device: %s\n", mixdevice == SM_MIXER_CRYSTAL ?
+ "CS423x" : "AD1848");
+ create_form_ad1848();
+ mdata = get_mixer_reg(0);
+ ad1848_inl->step(1.5);
+ ad1848_inl->bounds(42.5, 0);
+ ad1848_inl->value((((mdata & 0xe0) == 0xa0) ? 20 : 0) + (mdata & 0xf) * 1.5);
+ ad1848_srcl_line->value((mdata & 0xc0) == 0x00);
+ ad1848_srcl_aux1->value((mdata & 0xc0) == 0x40);
+ ad1848_srcl_mic->value((mdata & 0xc0) == 0x80);
+ ad1848_srcl_dac->value((mdata & 0xc0) == 0xc0);
+ mdata = get_mixer_reg(1);
+ ad1848_inr->step(1.5);
+ ad1848_inr->bounds(42.5, 0);
+ ad1848_inr->value((((mdata & 0xe0) == 0xa0) ? 20 : 0) + (mdata & 0xf) * 1.5);
+ ad1848_srcr_line->value((mdata & 0xc0) == 0x00);
+ ad1848_srcr_aux1->value((mdata & 0xc0) == 0x40);
+ ad1848_srcr_mic->value((mdata & 0xc0) == 0x80);
+ ad1848_srcr_dac->value((mdata & 0xc0) == 0xc0);
+ mdata = get_mixer_reg(6);
+ ad1848_outl->step(1.5);
+ ad1848_outl->bounds(0, -100);
+ ad1848_outl->value((mdata & 0x80) ? -100 : (mdata & 0x3f) * -1.5);
+ mdata = get_mixer_reg(7);
+ ad1848_outr->step(1.5);
+ ad1848_outr->bounds(0, -100);
+ ad1848_outr->value((mdata & 0x80) ? -100 : (mdata & 0x3f) * -1.5);
+ mixer_ad1848->show();
+ break;
+
+ case SM_MIXER_CT1335:
+ printf("Mixer device: CT1335\n");
+ create_form_ct1335();
+ mdata = get_mixer_reg(0x2);
+ ct1335_out->step(46.0/7.0);
+ ct1335_out->bounds(0, -46);
+ ct1335_out->value((((int)((mdata >> 1) & 7)) - 7) * (46.0/7.0));
+ mixer_ct1335->show();
+ break;
+
+ case SM_MIXER_CT1345:
+ printf("Mixer device: CT1345\n");
+ create_form_ct1345();
+ mdata = get_mixer_reg(0x22);
+ ct1345_outl->step(46.0/7.0);
+ ct1345_outl->bounds(0, -46);
+ ct1345_outl->value((((int)((mdata >> 5) & 7)) - 7) * (46.0/7.0));
+ ct1345_outr->step(46.0/7.0);
+ ct1345_outr->bounds(0, -46);
+ ct1345_outr->value((((int)((mdata >> 1) & 7)) - 7) * (46.0/7.0));
+ mdata = get_mixer_reg(0xc);
+ ct1345_src_mic->value((mdata & 6) == 0 || (mdata & 6) == 4);
+ ct1345_src_cd->value((mdata & 6) == 2);
+ ct1345_src_line->value((mdata & 6) == 6);
+ mixer_ct1345->show();
+ break;
+
+ case SM_MIXER_CT1745:
+ printf("Mixer device: CT1745\n");
+ create_form_ct1745();
+ ct1745_outl->step(2);
+ ct1745_outl->bounds(0, -62);
+ ct1745_outl->value(((int)((get_mixer_reg(0x32) >> 3) & 0x1f) - 31) * 2 +
+ ((get_mixer_reg(0x41) >> 6) & 0x3) * 6);
+ ct1745_outr->step(2);
+ ct1745_outr->bounds(0, -62);
+ ct1745_outr->value(((int)((get_mixer_reg(0x33) >> 3) & 0x1f) - 31) * 2 +
+ ((get_mixer_reg(0x42) >> 6) & 0x3) * 6);
+ ct1745_inl->step(2);
+ ct1745_inl->bounds(0, -62);
+ ct1745_inl->value(((int)((get_mixer_reg(0x38) >> 3) & 0x1f) - 31) * 2 +
+ ((get_mixer_reg(0x3f) >> 6) & 0x3) * 6);
+ ct1745_inr->step(2);
+ ct1745_inr->bounds(0, -62);
+ ct1745_inr->value(((int)((get_mixer_reg(0x39) >> 3) & 0x1f) - 31) * 2 +
+ ((get_mixer_reg(0x40) >> 6) & 0x3) * 6);
+ mdata = get_mixer_reg(0x3d);
+ ct1745_srcl_mic->value(!!(mdata & 1));
+ ct1745_srcl_cdl->value(!!(mdata & 4));
+ ct1745_srcl_cdr->value(!!(mdata & 2));
+ ct1745_srcl_linel->value(!!(mdata & 0x10));
+ ct1745_srcl_liner->value(!!(mdata & 8));
+ ct1745_srcl_midil->value(!!(mdata & 0x40));
+ ct1745_srcl_midir->value(!!(mdata & 0x20));
+ mdata = get_mixer_reg(0x3e);
+ ct1745_srcr_mic->value(!!(mdata & 1));
+ ct1745_srcr_cdl->value(!!(mdata & 4));
+ ct1745_srcr_cdr->value(!!(mdata & 2));
+ ct1745_srcr_linel->value(!!(mdata & 0x10));
+ ct1745_srcr_liner->value(!!(mdata & 8));
+ ct1745_srcr_midil->value(!!(mdata & 0x40));
+ ct1745_srcr_midir->value(!!(mdata & 0x20));
+ ct1745_treble->step(1);
+ ct1745_treble->bounds(7, -8);
+ ct1745_treble->value((get_mixer_reg(0x44) >> 4) & 0xf);
+ ct1745_bass->step(1);
+ ct1745_bass->bounds(7, -8);
+ ct1745_bass->value((get_mixer_reg(0x46) >> 4) & 0xf);
+ mixer_ct1745->show();
+ break;
+
+ default:
+ printf("unknown mixer device %d\n", mixdevice);
+ exit(1);
+ }
+ Fl::run();
+ exit(0);
+}
diff --git a/hdlcutil/hdrvcomm.c b/hdlcutil/hdrvcomm.c
index 05259e5..2c7560e 100644
--- a/hdlcutil/hdrvcomm.c
+++ b/hdlcutil/hdrvcomm.c
@@ -3,7 +3,7 @@
/*
* hdrvcomm.c -- HDLC driver communications.
*
- * Copyright (C) 1996 Thomas Sailer (sailer@ife.ee.ethz.ch)
+ * Copyright (C) 1996-1998 Thomas Sailer (sailer@ife.ee.ethz.ch)
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -25,7 +25,8 @@
*
*
* History:
- * 0.1 10.5.97 Started
+ * 0.1 10.05.97 Started
+ * 0.2 14.04.98 Tried to implement AF_PACKET
*/
/*****************************************************************************/
@@ -36,33 +37,34 @@
#include <errno.h>
#include <sys/ioctl.h>
#include <sys/types.h>
-#include <sys/socket.h>
+/*#include <sys/socket.h>*/
#include <sys/ipc.h>
#include <sys/msg.h>
#include <asm/byteorder.h>
#include <fcntl.h>
#include <unistd.h>
#include <stdlib.h>
-#ifdef __GLIBC__
-#include <netinet/if_ether.h>
-#else
-#include <linux/if_ether.h>
-#endif
#include <net/if.h>
#include "hdrvcomm.h"
#include "usersmdiag.h"
+#include <net/if_arp.h>
+#include <linux/if_ether.h>
+#include <linux/if_packet.h>
+#ifndef SOL_PACKET
+#define SOL_PACKET 263
+#endif
-#include <linux/hdlcdrv.h>
/* ---------------------------------------------------------------------- */
#ifdef HDRVC_KERNEL
static int kernel_mode = 1;
#endif /* HDRVC_KERNEL */
-static char *if_name = "bc0";
+static char *if_name = "bcsf0";
static char *prg_name;
static int fd = -1;
static struct ifreq ifr_h;
static int promisc = 0;
+static int afpacket = 1;
static int msqid = -1;
/* ---------------------------------------------------------------------- */
@@ -93,39 +95,62 @@ static void terminate_sig(int signal)
int hdrvc_recvpacket(char *pkt, int maxlen)
{
struct ifreq ifr_new;
- struct sockaddr from;
+ struct sockaddr_ll from;
int from_len = sizeof(from);
#ifdef HDRVC_KERNEL
if (kernel_mode) {
if (!promisc) {
- struct sockaddr sa;
+ if (afpacket) {
+ struct sockaddr_ll sll;
+ struct packet_mreq mr;
+
+ memset(&sll, 0, sizeof(sll));
+ sll.sll_family = AF_PACKET;
+ sll.sll_ifindex = ifr_h.ifr_ifindex;
+ sll.sll_protocol = htons(ETH_P_AX25);
+ if (bind(fd, (struct sockaddr *)&sll, sizeof(sll)) < 0) {
+ fprintf(stderr, "%s: Error %s (%i) bind failed\n",
+ prg_name, strerror(errno), errno);
+ exit(-2);
+ }
+ memset(&mr, 0, sizeof(mr));
+ mr.mr_ifindex = sll.sll_ifindex;
+ mr.mr_type = PACKET_MR_PROMISC;
+ if (setsockopt(fd, SOL_PACKET, PACKET_ADD_MEMBERSHIP, (char *)&mr, sizeof(mr)) < 0) {
+ fprintf(stderr, "%s: Error %s (%i) setsockopt SOL_PACKET, PACKET_ADD_MEMBERSHIP failed\n",
+ prg_name, strerror(errno), errno);
+ exit(-2);
+ }
+ } else {
+ struct sockaddr sa;
- strcpy(sa.sa_data, if_name);
- sa.sa_family = AF_INET;
- if (bind(fd, &sa, sizeof(struct sockaddr)) < 0) {
- fprintf(stderr, "%s: Error %s (%i) bind failed\n",
- prg_name, strerror(errno), errno);
- exit(-2);
- }
- ifr_new = ifr_h;
- ifr_new.ifr_flags |= IFF_PROMISC;
- if (ioctl(fd, SIOCSIFFLAGS, &ifr_new) < 0) {
- perror("ioctl (SIOCSIFFLAGS)");
- exit(1);
- }
- signal(SIGTERM, terminate_sig);
- signal(SIGQUIT, terminate_sig);
- if (atexit((void (*)(void))terminate)) {
- perror("atexit");
- terminate();
+ strcpy(sa.sa_data, if_name);
+ sa.sa_family = AF_INET;
+ if (bind(fd, &sa, sizeof(sa)) < 0) {
+ fprintf(stderr, "%s: Error %s (%i) bind failed\n",
+ prg_name, strerror(errno), errno);
+ exit(-2);
+ }
+ ifr_new = ifr_h;
+ ifr_new.ifr_flags |= IFF_PROMISC;
+ if (ioctl(fd, SIOCSIFFLAGS, &ifr_new) < 0) {
+ perror("ioctl (SIOCSIFFLAGS)");
+ exit(1);
+ }
+ signal(SIGTERM, terminate_sig);
+ signal(SIGQUIT, terminate_sig);
+ if (atexit((void (*)(void))terminate)) {
+ perror("atexit");
+ terminate();
+ }
}
promisc = 1;
fcntl(fd, F_SETFL, fcntl(fd, F_GETFL, 0) | O_NONBLOCK);
}
if (!pkt || maxlen < 2)
return 0;
- return recvfrom(fd, pkt, maxlen, 0, &from, &from_len);
+ return recvfrom(fd, pkt, maxlen, 0, (struct sockaddr *)&from, &from_len);
}
#endif /* HDRVC_KERNEL */
return -1;
@@ -185,34 +210,53 @@ void hdrvc_args(int *argc, char *argv[], char *def_if)
void hdrvc_init(void)
{
+ key_t k;
+ static struct ifreq ifr;
+
#ifdef HDRVC_KERNEL
if (kernel_mode) {
- if ((fd = socket(PF_INET, SOCK_PACKET, htons(ETH_P_AX25))) < 0) {
- fprintf(stderr, "%s: Error %s (%i), cannot open %s\n", prg_name,
- strerror(errno), errno, if_name);
- exit(-1);
- }
strcpy(ifr_h.ifr_name, if_name);
- if (ioctl(fd, SIOCGIFFLAGS, &ifr_h) < 0) {
- fprintf(stderr, "%s: Error %s (%i), cannot ioctl %s\n", prg_name,
- strerror(errno), errno, if_name);
- exit(-1);
+ /* first try to use AF_PACKET */
+ if ((fd = socket(PF_PACKET, SOCK_RAW, htons(ETH_P_AX25))) < 0
+ || ioctl(fd, SIOCGIFINDEX, &ifr_h) < 0) {
+ if (fd >= 0)
+ close(fd);
+ afpacket = 0;
+ if ((fd = socket(PF_INET, SOCK_PACKET, htons(ETH_P_AX25))) < 0) {
+ fprintf(stderr, "%s: Error %s (%i), cannot open %s\n", prg_name,
+ strerror(errno), errno, if_name);
+ exit(-1);
+ }
+ if (ioctl(fd, SIOCGIFFLAGS, &ifr_h) < 0) {
+ fprintf(stderr, "%s: Error %s (%i), cannot ioctl SIOCGIFFLAGS %s\n", prg_name,
+ strerror(errno), errno, if_name);
+ exit(-1);
+ }
}
- } else
-#endif /* HDRVC_KERNEL */
- {
- key_t k = ftok(if_name, USERSM_KEY_PROJ);
-
- if (k == (key_t)-1) {
- fprintf(stderr, "%s: Error %s (%i), cannot ftok on %s\n", prg_name,
+ strcpy(ifr.ifr_name, if_name);
+ if (ioctl(fd, SIOCGIFHWADDR, &ifr) < 0 ) {
+ fprintf(stderr, "%s: Error %s (%i), cannot ioctl SIOCGIFHWADDR %s\n", prg_name,
strerror(errno), errno, if_name);
exit(-1);
- }
- if ((msqid = msgget(k, 0700)) < 0) {
- fprintf(stderr, "%s: Error %s (%i), cannot msgget %d\n", prg_name,
- strerror(errno), errno, k);
+ }
+ if (ifr.ifr_hwaddr.sa_family != ARPHRD_AX25) {
+ fprintf(stderr, "%s: Error, interface %s not AX25 (%i)\n", prg_name,
+ if_name, ifr.ifr_hwaddr.sa_family);
exit(-1);
}
+ return;
+ }
+#endif /* HDRVC_KERNEL */
+ k = ftok(if_name, USERSM_KEY_PROJ);
+ if (k == (key_t)-1) {
+ fprintf(stderr, "%s: Error %s (%i), cannot ftok on %s\n", prg_name,
+ strerror(errno), errno, if_name);
+ exit(-1);
+ }
+ if ((msqid = msgget(k, 0700)) < 0) {
+ fprintf(stderr, "%s: Error %s (%i), cannot msgget %d\n", prg_name,
+ strerror(errno), errno, k);
+ exit(-1);
}
}
diff --git a/hdlcutil/hdrvcomm.h b/hdlcutil/hdrvcomm.h
index 3167b03..4778d6a 100644
--- a/hdlcutil/hdrvcomm.h
+++ b/hdlcutil/hdrvcomm.h
@@ -30,9 +30,13 @@
#ifndef _HDRVCOMM_H
#define _HDRVCOMM_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/* ---------------------------------------------------------------------- */
-#define HDRVC_KERNEL 1 //why was undef here ???
+#define HDRVC_KERNEL 1
/* ---------------------------------------------------------------------- */
@@ -106,4 +110,7 @@ extern int hdrvc_diag(struct sm_diag_data *diag);
#endif /* HDRVC_KERNEL */
/* ---------------------------------------------------------------------- */
+#ifdef __cplusplus
+ }
+#endif
#endif /* _HDRVCOMM_H */
diff --git a/hdlcutil/setcrystal.c b/hdlcutil/setcrystal.c
deleted file mode 100644
index 926eddd..0000000
--- a/hdlcutil/setcrystal.c
+++ /dev/null
@@ -1,140 +0,0 @@
-/*****************************************************************************/
-
-/*
- * setcrystal.c -- crystal soundcard configuration utility
- *
- * Copyright (C) 1996 Thomas Sailer (sailer@ife.ee.ethz.ch)
- *
- * This program 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.
- *
- * This program 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 this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
- * Please note that the GPL allows you to use the driver, NOT the radio.
- * In order to use the radio, you need a license from the communications
- * authority of your country.
- *
- */
-
-/* --------------------------------------------------------------------- */
-
-#include <stdio.h>
-#include <unistd.h>
-#include <stdlib.h>
-#ifdef __GLIBC__
-#include <sys/io.h>
-#else
-#include <asm/io.h>
-#endif
-
-/* --------------------------------------------------------------------- */
-
-static const unsigned char crystal_key[32] = {
- 0x96, 0x35, 0x9a, 0xcd, 0xe6, 0xf3, 0x79, 0xbc,
- 0x5e, 0xaf, 0x57, 0x2b, 0x15, 0x8a, 0xc5, 0xe2,
- 0xf1, 0xf8, 0x7c, 0x3e, 0x9f, 0x4f, 0x27, 0x13,
- 0x09, 0x84, 0x42, 0xa1, 0xd0, 0x68, 0x34, 0x1a
-};
-
-#define KEY_PORT 0x279
-#define CSN 1 /* card select number */
-
-/* --------------------------------------------------------------------- */
-
-int main(int argc, char *argv[])
-{
- int wssbase = 0x534;
- int synbase = 0x388;
- int sbbase = 0x220;
- int irq = 5;
- int dma = 1;
- int dma2 = 3;
-
- int i;
-
- printf("Crystal PnP Soundcard enabler\n"
- "(C) 1996 by Thomas Sailer, HB9JNX/AE4WA\n"
- "WARNING: This utility is incompatible with OS PnP support!\n"
- " Remove it as soon as Linux supports PnP!\n");
- while ((i = getopt(argc, argv, "i:d:c:s:w:f:h")) != EOF) {
- switch (i) {
- case 'i':
- irq = strtoul(optarg, NULL, 0);
- break;
- case 'd':
- dma = strtoul(optarg, NULL, 0);
- break;
- case 'c':
- dma2 = strtoul(optarg, NULL, 0);
- break;
- case 's':
- sbbase = strtoul(optarg, NULL, 0);
- break;
- case 'w':
- wssbase = strtoul(optarg, NULL, 0);
- break;
- case 'f':
- synbase = strtoul(optarg, NULL, 0);
- break;
-
- default:
- case ':':
- case '?':
- case 'h':
- fprintf(stderr, "usage: [-w wssio] [-s sbio] "
- "[-f synthio] [-i irq] [-d dma] [-c dma2]\n");
- exit(1);
- }
- }
-
- if ((i = ioperm(KEY_PORT, 1, 1))) {
- perror("ioperm");
- exit(1);
- }
- /*
- * send crystal key
- */
- for (i = 0; i < 32; i++)
- outb(crystal_key[i], KEY_PORT);
- /*
- * send config data
- */
- outb(0x6, KEY_PORT);
- outb(CSN, KEY_PORT);
- outb(0x15, KEY_PORT);
- outb(0x0, KEY_PORT); /* logical device 0 */
- outb(0x47, KEY_PORT);
- outb(wssbase >> 8, KEY_PORT);
- outb(wssbase & 0xff, KEY_PORT);
- outb(0x48, KEY_PORT);
- outb(synbase >> 8, KEY_PORT);
- outb(synbase & 0xff, KEY_PORT);
- outb(0x42, KEY_PORT);
- outb(sbbase >> 8, KEY_PORT);
- outb(sbbase & 0xff, KEY_PORT);
- outb(0x22, KEY_PORT);
- outb(irq, KEY_PORT);
- outb(0x2a, KEY_PORT);
- outb(dma, KEY_PORT);
- outb(0x25, KEY_PORT);
- outb(dma2, KEY_PORT);
- outb(0x33, KEY_PORT);
- outb(0x1, KEY_PORT); /* activate logical device */
- outb(0x79, KEY_PORT); /* activate part */
-
- printf("Crystal CS423[26] set to: WSS iobase 0x%x, Synth iobase 0x%x,"
- " SB iobase 0x%x,\n IRQ %u, DMA %u, DMA2 %u\n", wssbase,
- synbase, sbbase, irq, dma, dma2);
- exit(0);
-}
-
-/* --------------------------------------------------------------------- */
diff --git a/hdlcutil/sethdlc.c b/hdlcutil/sethdlc.c
index b07c0de..c42a807 100644
--- a/hdlcutil/sethdlc.c
+++ b/hdlcutil/sethdlc.c
@@ -3,7 +3,7 @@
/*
* sethdlc.c -- kernel HDLC radio modem driver setup utility.
*
- * Copyright (C) 1996 Thomas Sailer (sailer@ife.ee.ethz.ch)
+ * Copyright (C) 1996,1997,2000 Thomas Sailer (sailer@ife.ee.ethz.ch)
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -25,9 +25,10 @@
*
*
* History:
- * 0.1 16.10.96 Adapted from setbaycom.c and setsm.c
- * 0.2 20.11.96 New mode set/query code
- * 0.5 11.05.97 introduced hdrvcomm.h
+ * 0.1 16.10.1996 Adapted from setbaycom.c and setsm.c
+ * 0.2 20.11.1996 New mode set/query code
+ * 0.5 11.05.1997 introduced hdrvcomm.h
+ * 0.6 05.01.2000 glibc compile fixes
*/
/*****************************************************************************/
@@ -41,13 +42,9 @@
#include <fcntl.h>
#include <unistd.h>
#include <string.h>
-/*#include <linux/if.h>*/
#include <net/if.h>
#include "hdrvcomm.h"
-#include <linux/soundmodem.h>
-#include <linux/baycom.h>
-
/* ---------------------------------------------------------------------- */
static unsigned char trace_stat = 0;
diff --git a/hdlcutil/smdiag.8 b/hdlcutil/smdiag.8
new file mode 100644
index 0000000..276a1b7
--- /dev/null
+++ b/hdlcutil/smdiag.8
@@ -0,0 +1,78 @@
+.\" Copyright 1996 Thomas Sailer (sailer@ife.ee.ethz.ch)
+.\" May be distributed under the GNU General Public License
+.\" "
+.TH SMDIAG 8 "1 October 1996" "Smdiag 0.1" "Linux Programmer's Manual"
+.SH NAME
+smdiag \- Linux soundcard packet radio modem driver diagnostics utility
+.SH SYNOPSIS
+.B smdiag
+.B "[\-i device]"
+.B "[\-d display]"
+.B "[ \-ce ]"
+
+.SH DESCRIPTION
+.B smdiag
+may help to adjust the audio levels of the soundcard modem driver, as well
+as to control the quality of the radio link. It may either display an
+oscilloscope like view of the input signal, or display an eye diagram.
+The display may be gated with DCD, i.e. only updated if the modem detects
+a data carrier.
+
+.SH OPTIONS
+.B smdiag
+accepts the following options:
+
+.TP
+.B \-i
+The
+.I device
+argument specifies the soundcard modem device which should be configured or
+interrogated. It will usually have the following form:
+.I sm[0-3].
+.TP
+.B \-d
+sets the address of the X server to display the window.
+.TP
+.B \-h
+display an overview of the available command line parameters and exit.
+.TP
+.B \-c
+toggle the carrier gating of the display.
+.TP
+.B \-e
+display an eye diagram (overlay of the synchronized demodulator output)
+instead of an oscilloscope view of the input signal.
+
+.SH KEYS
+.TP
+.B C
+clears the window
+.TP
+.B D
+toggles the DCD gating.
+.TP
+.B E
+displays an eye diagram
+.TP
+.B I
+displays the input signal
+.TP
+.B Q
+quits
+.I smdiag
+
+.SH BUGS
+.B smdiag
+Reacts sluggishly to keypresses. The window size is fixed. For speed reasons,
+two square root operations per sample are not implemented in the AFSK 1200
+baud modes. The eye diagram for the AFSK 1200 baud mode is therefore
+distorted.
+
+.SH "SEE ALSO"
+.BR smmixer " (8), " sethdlc " (8),"
+linux/drivers/net/soundmodem.c
+
+.SH AUTHOR
+smdiag was written by Thomas Sailer (sailer@ife.ee.ethz.ch).
+
+
diff --git a/hdlcutil/smdiag.c b/hdlcutil/smdiag.c
new file mode 100644
index 0000000..6d279e7
--- /dev/null
+++ b/hdlcutil/smdiag.c
@@ -0,0 +1,431 @@
+/*****************************************************************************/
+
+/*
+ * smdiag.c -- kernel soundcard radio modem driver diagnostics utility.
+ *
+ * Copyright (C) 1996,1997,2000 Thomas Sailer (sailer@ife.ee.ethz.ch)
+ *
+ * This program 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.
+ *
+ * This program 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 this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * Please note that the GPL allows you to use the driver, NOT the radio.
+ * In order to use the radio, you need a license from the communications
+ * authority of your country.
+ *
+ *
+ * History:
+ * 0.1 26.06.1996 Started
+ * 0.2 11.05.1997 introduced hdrvcomm.h
+ * 0.3 05.01.2000 glibc compile fixes
+ */
+
+/*****************************************************************************/
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <errno.h>
+#include <sys/time.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <unistd.h>
+#include <string.h>
+#include <limits.h>
+#include <net/if.h>
+#include <X11/X.h>
+#include <X11/Xlib.h>
+#include <X11/Xutil.h>
+#include "hdrvcomm.h"
+
+/* ---------------------------------------------------------------------- */
+
+static char *progname;
+static Display *display = NULL;
+static Window window;
+static Pixmap pixmap;
+static unsigned long col_zeroline;
+static unsigned long col_background;
+static unsigned long col_trace;
+static GC gr_context;
+static int xmul;
+
+/* ---------------------------------------------------------------------- */
+
+static int x_error_handler(Display *disp, XErrorEvent *evt)
+{
+ char err_buf[256], mesg[256], number[256];
+ char *mtype = "XlibMessage";
+
+ XGetErrorText(disp, evt->error_code, err_buf, sizeof(err_buf));
+ fprintf(stderr, "X Error: %s\n", err_buf);
+ XGetErrorDatabaseText(disp, mtype, "MajorCode", "Request Major code %d",
+ mesg, sizeof(mesg));
+ fprintf(stderr, mesg, evt->request_code);
+ sprintf(number, "%d", evt->request_code);
+ XGetErrorDatabaseText(disp, "XRequest", number, "", err_buf,
+ sizeof(err_buf));
+ fprintf(stderr, " (%s)\n", err_buf);
+ abort();
+}
+
+/* ---------------------------------------------------------------------- */
+
+#define WIDTH 512
+#define HEIGHT (constell ? 512 : 256)
+
+static int openwindow(char *disp, int constell, int samplesperbit)
+{
+ XSetWindowAttributes attr;
+ XGCValues gr_values;
+ XColor color, dummy;
+ XSizeHints sizehints;
+
+ if (!(display = XOpenDisplay(NULL)))
+ return -1;
+ XSetErrorHandler(x_error_handler);
+ XAllocNamedColor(display, DefaultColormap(display, 0), "red",
+ &color, &dummy);
+ col_zeroline = color.pixel;
+ col_background = WhitePixel(display, 0);
+ col_trace = BlackPixel(display, 0);
+ attr.background_pixel = col_background;
+ if (!(window = XCreateWindow(display, XRootWindow(display, 0),
+ 200, 200, WIDTH, HEIGHT, 5,
+ DefaultDepth(display, 0),
+ InputOutput, DefaultVisual(display, 0),
+ CWBackPixel, &attr))) {
+ fprintf(stderr, "smdiag: unable to open X window\n");
+ exit(1);
+ }
+ if (!(pixmap = XCreatePixmap(display, window, WIDTH, HEIGHT,
+ DefaultDepth(display, 0)))) {
+ fprintf(stderr, "smdiag: unable to open offscreen pixmap\n");
+ exit(1);
+ }
+ xmul = WIDTH / (2*(samplesperbit > 0 ? samplesperbit : 1));
+ XSelectInput(display, window, KeyPressMask | StructureNotifyMask
+ | ExposureMask) ;
+ XAllocNamedColor(display, DefaultColormap(display, 0), "red",
+ &color, &dummy);
+ gr_values.foreground = col_trace;
+ gr_values.line_width = 1;
+ gr_values.line_style = LineSolid;
+ gr_context = XCreateGC(display, window, GCForeground | GCLineWidth |
+ GCLineStyle, &gr_values);
+ XStoreName(display, window, "diagnostics");
+ /*
+ * Do not allow the window to be resized
+ */
+ memset(&sizehints, 0, sizeof(sizehints));
+ sizehints.min_width = sizehints.max_width = WIDTH;
+ sizehints.min_height = sizehints.max_height = HEIGHT;
+ sizehints.flags = PMinSize | PMaxSize;
+ XSetWMNormalHints(display, window, &sizehints);
+ XMapWindow(display, window);
+ XSynchronize(display, 1);
+ return 0;
+}
+
+#undef WIDTH
+#undef HEIGHT
+
+/* ---------------------------------------------------------------------- */
+
+static void closewindow(void)
+{
+ if (!display)
+ return;
+ XDestroyWindow(display, window);
+ XCloseDisplay(display);
+ display = NULL;
+}
+
+/* ---------------------------------------------------------------------- */
+
+#define XCOORD(x) ((x) * xm)
+#define YCOORD(y) ((SHRT_MAX - (int)(y)) * winattrs.height / USHRT_MAX)
+
+static void drawdata(short *data, int len, int replace, int xm)
+{
+ int cnt;
+ GC gc;
+ XGCValues gcv;
+ XWindowAttributes winattrs;
+
+ if (!display || !pixmap)
+ return;
+ XGetWindowAttributes(display, window, &winattrs);
+ gcv.line_width = 1;
+ gcv.line_style = LineSolid;
+ gc = XCreateGC(display, pixmap, GCLineWidth | GCLineStyle, &gcv);
+ XSetState(display, gc, col_background, col_background, GXcopy,
+ AllPlanes);
+ if (replace)
+ XFillRectangle(display, pixmap, gc, 0, 0,
+ winattrs.width, winattrs.height);
+ else
+ XCopyArea(display, window, pixmap, gr_context, 0, 0,
+ winattrs.width, winattrs.height, 0, 0);
+ XSetForeground(display, gc, col_trace);
+ for (cnt = 0; cnt < len-1; cnt++)
+ XDrawLine(display, pixmap, gc, XCOORD(cnt), YCOORD(data[cnt]),
+ XCOORD(cnt+1), YCOORD(data[cnt+1]));
+ XSetForeground(display, gc, col_zeroline);
+ XDrawLine(display, pixmap, gc, 0, YCOORD(0), winattrs.width,
+ YCOORD(0));
+ XCopyArea(display, pixmap, window, gr_context, 0, 0, winattrs.width,
+ winattrs.height, 0, 0);
+ XFreeGC(display, gc);
+ XSync(display, 0);
+}
+
+#undef XCOORD
+#undef YCOORD
+
+/* ---------------------------------------------------------------------- */
+
+#define XCOORD(x) ((SHRT_MAX - (int)(x)) * winattrs.width / USHRT_MAX)
+#define YCOORD(y) ((SHRT_MAX - (int)(y)) * winattrs.height / USHRT_MAX)
+
+static void drawconstell(short *data, int len)
+{
+ int cnt;
+ GC gc;
+ XGCValues gcv;
+ XWindowAttributes winattrs;
+
+ if (!display || !pixmap)
+ return;
+ XGetWindowAttributes(display, window, &winattrs);
+ gcv.line_width = 1;
+ gcv.line_style = LineSolid;
+ gc = XCreateGC(display, pixmap, GCLineWidth | GCLineStyle, &gcv);
+ XSetState(display, gc, col_background, col_background, GXcopy,
+ AllPlanes);
+ XCopyArea(display, window, pixmap, gr_context, 0, 0,
+ winattrs.width, winattrs.height, 0, 0);
+ XSetForeground(display, gc, col_trace);
+ for (cnt = 0; cnt < len-1; cnt += 2)
+ XDrawPoint(display, pixmap, gc,
+ XCOORD(data[cnt]), YCOORD(data[cnt+1]));
+ XSetForeground(display, gc, col_zeroline);
+ XDrawLine(display, pixmap, gc, 0, YCOORD(0), winattrs.width, YCOORD(0));
+ XDrawLine(display, pixmap, gc, XCOORD(0), 0, XCOORD(0), winattrs.height);
+ XCopyArea(display, pixmap, window, gr_context, 0, 0, winattrs.width,
+ winattrs.height, 0, 0);
+ XFreeGC(display, gc);
+ XSync(display, 0);
+}
+
+#undef XCOORD
+#undef YCOORD
+
+/* ---------------------------------------------------------------------- */
+
+static void clearwindow(void)
+{
+ XWindowAttributes winattrs;
+ GC gc;
+ XGCValues gcv;
+
+ if (!display || !pixmap)
+ return;
+ XGetWindowAttributes(display, window, &winattrs);
+ gcv.line_width = 1;
+ gcv.line_style = LineSolid;
+ gc = XCreateGC(display, pixmap, GCLineWidth | GCLineStyle, &gcv);
+ XSetState(display, gc, col_background, col_background, GXcopy,
+ AllPlanes);
+ XFillRectangle(display, pixmap, gc, 0, 0,
+ winattrs.width, winattrs.height);
+ XSetForeground(display, gc, col_zeroline);
+ XClearArea(display, window, 0, 0, 0, 0, False);
+ XCopyArea(display, pixmap, window, gr_context, 0, 0, winattrs.width,
+ winattrs.height, 0, 0);
+ XFreeGC(display, gc);
+}
+
+/* ---------------------------------------------------------------------- */
+
+static Bool predicate(Display *display, XEvent *event, char *arg)
+{
+ return True;
+}
+
+/* ---------------------------------------------------------------------- */
+
+static char *getkey(void)
+{
+ XWindowAttributes winattrs;
+ XEvent evt;
+ static char kbuf[32];
+ int i;
+
+ if (!display)
+ return NULL;
+ XSync(display, 0);
+ while (XCheckIfEvent(display, &evt, predicate, NULL)) {
+ switch (evt.type) {
+ case KeyPress:
+ i = XLookupString((XKeyEvent *)&evt, kbuf, sizeof(kbuf)-1,
+ NULL, NULL);
+ if (!i)
+ return NULL;
+ kbuf[i] = 0;
+ return kbuf;
+ case DestroyNotify:
+ XCloseDisplay(display);
+ display = NULL;
+ return NULL;
+ case Expose:
+ XGetWindowAttributes(display, window, &winattrs);
+ XCopyArea(display, pixmap, window, gr_context, 0, 0,
+ winattrs.width, winattrs.height, 0, 0);
+ break;
+ default:
+ break;
+ }
+ }
+ return NULL;
+}
+
+/* ---------------------------------------------------------------------- */
+
+static void printmode(unsigned int mode, unsigned int trigger)
+{
+ printf("Source: %s%s\n", (mode == SM_DIAGMODE_DEMOD) ?
+ "demodulator (eye diagram)" : "input (oscilloscope)",
+ (trigger & SM_DIAGFLAG_DCDGATE) ? " gated with DCD" : "");
+}
+
+/* ---------------------------------------------------------------------- */
+
+static const char *usage_str =
+"[-d display] [-i smif] [-c] [-e]\n"
+" -d: display host\n"
+" -i: specify the name of the baycom kernel driver interface\n"
+" -c: toggle carrier trigger\n"
+" -e: eye diagram mode\n\n"
+" -p: constellation plot\n\n";
+
+int main(int argc, char *argv[])
+{
+ char *disp = NULL;
+ unsigned int mode = HDRVC_DIAGMODE_INPUT;
+ unsigned int trigger = 0;
+ unsigned int ifflags;
+ short data[256];
+ char *cp;
+ int ret;
+ unsigned int samplesperbit;
+
+ progname = *argv;
+ printf("%s: Version 0.2; (C) 1996-1997 by Thomas Sailer HB9JNX/AE4WA\n", *argv);
+ hdrvc_args(&argc, argv, "sm0");
+ while ((ret = getopt(argc, argv, "d:ecp")) != -1) {
+ switch (ret) {
+ case 'd':
+ disp = optarg;
+ break;
+ case 'e':
+ mode = HDRVC_DIAGMODE_DEMOD;
+ trigger = HDRVC_DIAGFLAG_DCDGATE;
+ break;
+ case 'c':
+ trigger ^= HDRVC_DIAGFLAG_DCDGATE;
+ break;
+ case 'p':
+ mode = HDRVC_DIAGMODE_CONSTELLATION;
+ break;
+ default:
+ printf("usage: %s %s", *argv, usage_str);
+ exit(-1);
+ }
+ }
+ hdrvc_init();
+ ifflags = hdrvc_get_ifflags();
+ if (!(ifflags & IFF_UP)) {
+ fprintf(stderr, "interface %s down\n", hdrvc_ifname());
+ exit(1);
+ }
+ if (!(ifflags & IFF_RUNNING)) {
+ fprintf(stderr, "interface %s not running\n", hdrvc_ifname());
+ exit(1);
+ }
+ printmode(mode, trigger);
+ for (;;) {
+ if ((ret = hdrvc_diag2(mode, trigger, data, sizeof(data) / sizeof(short),
+ &samplesperbit)) < 0) {
+ perror("hdrvc_diag2");
+ exit(1);
+ }
+ if (ret > 0) {
+ if (!display) {
+ openwindow(disp, mode == HDRVC_DIAGMODE_CONSTELLATION,
+ samplesperbit);
+ clearwindow();
+ }
+ if (mode == SM_DIAGMODE_CONSTELLATION)
+ drawconstell(data, ret);
+ else
+ drawdata(data, ret, mode == HDRVC_DIAGMODE_INPUT,
+ mode == HDRVC_DIAGMODE_INPUT ? 5:xmul);
+ } else
+ usleep(100000L);
+ if (display) {
+ if ((cp = getkey())) {
+ for (; *cp; cp++) {
+ printf("char pressed: '%c'\n", *cp);
+ switch (*cp) {
+ case 'c':
+ case 'C':
+ clearwindow();
+ printmode(mode, trigger);
+ break;
+ case 'q':
+ case 'Q':
+ closewindow();
+ break;
+ case 'i':
+ case 'I':
+ if (mode == HDRVC_DIAGMODE_CONSTELLATION)
+ break;
+ mode = HDRVC_DIAGMODE_INPUT;
+ clearwindow();
+ printmode(mode, trigger);
+ break;
+ case 'e':
+ case 'E':
+ if (mode == HDRVC_DIAGMODE_CONSTELLATION)
+ break;
+ mode = HDRVC_DIAGMODE_DEMOD;
+ clearwindow();
+ printmode(mode, trigger);
+ break;
+ case 'd':
+ case 'D':
+ trigger ^= HDRVC_DIAGFLAG_DCDGATE;
+ clearwindow();
+ printmode(mode, trigger);
+ break;
+ }
+ }
+ }
+ if (!display)
+ exit(0);
+ }
+ }
+}
+
+/* ---------------------------------------------------------------------- */
diff --git a/hdlcutil/smmixer.c b/hdlcutil/smmixer.c
index 3cfc7e7..fe68422 100644
--- a/hdlcutil/smmixer.c
+++ b/hdlcutil/smmixer.c
@@ -3,7 +3,7 @@
/*
* smmixer.c -- kernel soundcard radio modem driver mixer utility.
*
- * Copyright (C) 1996 Thomas Sailer (sailer@ife.ee.ethz.ch)
+ * Copyright (C) 1996,1997,2000 Thomas Sailer (sailer@ife.ee.ethz.ch)
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -25,8 +25,9 @@
*
*
* History:
- * 0.1 26.06.96 Started
- * 0.2 11.05.97 introduced hdrvcomm.h
+ * 0.1 26.06.1996 Started
+ * 0.2 11.05.1997 introduced hdrvcomm.h
+ * 0.3 05.01.2000 glibc compile fixes
*/
/*****************************************************************************/
@@ -41,7 +42,6 @@
#include <net/if.h>
#include "hdrvcomm.h"
-#include <linux/soundmodem.h>
/* ---------------------------------------------------------------------- */
static char *progname;
@@ -56,9 +56,7 @@ static int do_mix_ioctl(int cmd, struct sm_mixer_data *mixdat)
par.cmd = cmd;
par.data.mix = *mixdat;
-#ifdef HDRVC_KERNEL
i = hdrvc_sm_ioctl(cmd, &par);
-#endif
*mixdat = par.data.mix;
return i;
}
diff --git a/kiss/Makefile.in b/kiss/Makefile.in
index 1fcf531..3663908 100644
--- a/kiss/Makefile.in
+++ b/kiss/Makefile.in
@@ -61,7 +61,9 @@ AWK = @AWK@
AX25IO_LIB = @AX25IO_LIB@
AX25_LIB = @AX25_LIB@
CC = @CC@
+CXX = @CXX@
DMASCC = @DMASCC@
+FLTK_LIB = @FLTK_LIB@
MAKEINFO = @MAKEINFO@
NCURSES_LIB = @NCURSES_LIB@
PACKAGE = @PACKAGE@
@@ -92,6 +94,10 @@ DEFS = @DEFS@ -I. -I$(srcdir) -I..
CPPFLAGS = @CPPFLAGS@
LDFLAGS = @LDFLAGS@
LIBS = @LIBS@
+X_CFLAGS = @X_CFLAGS@
+X_LIBS = @X_LIBS@
+X_EXTRA_LIBS = @X_EXTRA_LIBS@
+X_PRE_LIBS = @X_PRE_LIBS@
kissattach_SOURCES = kissattach.c
kissattach_OBJECTS = kissattach.o
kissattach_LDADD = $(LDADD)
diff --git a/netrom/Makefile.in b/netrom/Makefile.in
index 4dc6975..f7249bf 100644
--- a/netrom/Makefile.in
+++ b/netrom/Makefile.in
@@ -61,7 +61,9 @@ AWK = @AWK@
AX25IO_LIB = @AX25IO_LIB@
AX25_LIB = @AX25_LIB@
CC = @CC@
+CXX = @CXX@
DMASCC = @DMASCC@
+FLTK_LIB = @FLTK_LIB@
MAKEINFO = @MAKEINFO@
NCURSES_LIB = @NCURSES_LIB@
PACKAGE = @PACKAGE@
@@ -98,6 +100,10 @@ DEFS = @DEFS@ -I. -I$(srcdir) -I..
CPPFLAGS = @CPPFLAGS@
LDFLAGS = @LDFLAGS@
LIBS = @LIBS@
+X_CFLAGS = @X_CFLAGS@
+X_LIBS = @X_LIBS@
+X_EXTRA_LIBS = @X_EXTRA_LIBS@
+X_PRE_LIBS = @X_PRE_LIBS@
netromd_OBJECTS = netromd.o netromr.o netromt.o
netromd_LDADD = $(LDADD)
netromd_DEPENDENCIES =
diff --git a/netrom/nrparms.c b/netrom/nrparms.c
index 48895b9..78a81f3 100644
--- a/netrom/nrparms.c
+++ b/netrom/nrparms.c
@@ -37,6 +37,7 @@ void nodes(int s, char *nodecall, char *op, char *ident, int quality, int count,
{
struct nr_route_struct nr_node;
char *p, *q, *dev;
+ int i;
if (ax25_config_load_ports() == 0) {
fprintf(stderr, "nrparms: nodes: no AX.25 ports configured\n");
@@ -44,7 +45,7 @@ void nodes(int s, char *nodecall, char *op, char *ident, int quality, int count,
}
nr_node.type = NETROM_NODE;
- /*nr_node.ndigis = 0;*/
+ nr_node.ndigis = 0;
if (op[0] != '+' && op[0] != '-') {
fprintf(stderr, "nrparms: nodes: invalid operation %s\n", op);
@@ -95,7 +96,7 @@ void nodes(int s, char *nodecall, char *op, char *ident, int quality, int count,
close(s);
exit(1);
}
- /*
+
for (i = 0; i < AX25_MAX_DIGIS && digis[i] != NULL; i++) {
if (ax25_aton_entry(digis[i], nr_node.digipeaters[i].ax25_call) != 0) {
fprintf(stderr, "nrparms: invalid callsign %s\n", digis[i]);
@@ -103,7 +104,7 @@ void nodes(int s, char *nodecall, char *op, char *ident, int quality, int count,
exit(1);
}
nr_node.ndigis++;
- } */
+ }
if ((dev = ax25_config_get_dev(port)) == NULL) {
fprintf(stderr, "nrparms: nodes: invalid port name - %s\n", port);
diff --git a/rose/Makefile.in b/rose/Makefile.in
index 6fa29b4..aa77743 100644
--- a/rose/Makefile.in
+++ b/rose/Makefile.in
@@ -61,7 +61,9 @@ AWK = @AWK@
AX25IO_LIB = @AX25IO_LIB@
AX25_LIB = @AX25_LIB@
CC = @CC@
+CXX = @CXX@
DMASCC = @DMASCC@
+FLTK_LIB = @FLTK_LIB@
MAKEINFO = @MAKEINFO@
NCURSES_LIB = @NCURSES_LIB@
PACKAGE = @PACKAGE@
@@ -96,6 +98,10 @@ DEFS = @DEFS@ -I. -I$(srcdir) -I..
CPPFLAGS = @CPPFLAGS@
LDFLAGS = @LDFLAGS@
LIBS = @LIBS@
+X_CFLAGS = @X_CFLAGS@
+X_LIBS = @X_LIBS@
+X_EXTRA_LIBS = @X_EXTRA_LIBS@
+X_PRE_LIBS = @X_PRE_LIBS@
rsattach_SOURCES = rsattach.c
rsattach_OBJECTS = rsattach.o
rsattach_LDADD = $(LDADD)
diff --git a/tcpip/Makefile.am b/tcpip/Makefile.am
index 88e07fd..e0835e3 100644
--- a/tcpip/Makefile.am
+++ b/tcpip/Makefile.am
@@ -1,5 +1,5 @@
-etcfiles = rip98.conf ttylinkd.conf
+etcfiles = rip98d.conf ttylinkd.conf
installconf:
$(mkinstalldirs) $(DESTDIR)$(AX25_SYSCONFDIR)
@@ -10,7 +10,7 @@ installconf:
sbin_PROGRAMS = rip98d ttylinkd
-man_MANS = rip98.conf.5 rip98d.8 ttylinkd.conf.5 ttylinkd.8
+man_MANS = rip98d.conf.5 rip98d.8 ttylinkd.conf.5 ttylinkd.8
docdir=${prefix}/doc/ax25-tools
doc_DATA= ttylinkd.README ttylinkd.INSTALL
diff --git a/tcpip/Makefile.in b/tcpip/Makefile.in
index e1f5cdb..8237541 100644
--- a/tcpip/Makefile.in
+++ b/tcpip/Makefile.in
@@ -61,7 +61,9 @@ AWK = @AWK@
AX25IO_LIB = @AX25IO_LIB@
AX25_LIB = @AX25_LIB@
CC = @CC@
+CXX = @CXX@
DMASCC = @DMASCC@
+FLTK_LIB = @FLTK_LIB@
MAKEINFO = @MAKEINFO@
NCURSES_LIB = @NCURSES_LIB@
PACKAGE = @PACKAGE@
@@ -69,11 +71,11 @@ UTIL_LIB = @UTIL_LIB@
VERSION = @VERSION@
Z_LIB = @Z_LIB@
-etcfiles = rip98.conf ttylinkd.conf
+etcfiles = rip98d.conf ttylinkd.conf
sbin_PROGRAMS = rip98d ttylinkd
-man_MANS = rip98.conf.5 rip98d.8 ttylinkd.conf.5 ttylinkd.8
+man_MANS = rip98d.conf.5 rip98d.8 ttylinkd.conf.5 ttylinkd.8
docdir = ${prefix}/doc/ax25-tools
doc_DATA = ttylinkd.README ttylinkd.INSTALL
@@ -100,6 +102,10 @@ DEFS = @DEFS@ -I. -I$(srcdir) -I..
CPPFLAGS = @CPPFLAGS@
LDFLAGS = @LDFLAGS@
LIBS = @LIBS@
+X_CFLAGS = @X_CFLAGS@
+X_LIBS = @X_LIBS@
+X_EXTRA_LIBS = @X_EXTRA_LIBS@
+X_PRE_LIBS = @X_PRE_LIBS@
rip98d_OBJECTS = rip98d.o rip98r.o rip98t.o
rip98d_DEPENDENCIES =
rip98d_LDFLAGS =
diff --git a/tcpip/rip98d.8 b/tcpip/rip98d.8
index 0ee12dc..9c67c58 100644
--- a/tcpip/rip98d.8
+++ b/tcpip/rip98d.8
@@ -16,7 +16,7 @@ In operation
that each neighbour that also uses RIP98 must be listed. RIP98 is not a
broadcast protocol and each neighbour is individually contacted. Any
incoming RIP98 message is also validated against this list. The list of
-neighbours is held in /etc/ax25/rip98.conf, and each line is
+neighbours is held in /etc/ax25/rip98d.conf, and each line is
either the name or the dotted decimal IP address of the neighbour.
.LP
The time interval between RIP98 transmissions is set to one hour by default
@@ -48,7 +48,7 @@ Display the version.
.nf
/proc/net/route
.br
-/etc/ax25/rip98.conf
+/etc/ax25/rip98d.conf
.fi
.SH "SEE ALSO"
.BR rip98.conf (5),
diff --git a/tcpip/rip98.conf b/tcpip/rip98d.conf
index 3574d56..3574d56 100644
--- a/tcpip/rip98.conf
+++ b/tcpip/rip98d.conf
diff --git a/tcpip/rip98.conf.5 b/tcpip/rip98d.conf.5
index 7e2d3a4..77d15e2 100644
--- a/tcpip/rip98.conf.5
+++ b/tcpip/rip98d.conf.5
@@ -1,9 +1,9 @@
.TH RIP98.CONF 5 "2 August 1996" Linux "Linux Programmer's Manual"
.SH NAME
-rip98.conf \- control RIP98 routing messages.
+rip98d.conf \- control RIP98 routing messages.
.SH DESCRIPTION
.LP
-.B Rip98.conf
+.B Rip98d.conf
controls the transmission of RIP98 routing messages. RIP98 is not a
broadcast protocol but instead is transmitted individually to each other
known RIP98 capable system. The list of these systems is kept in the RIP98
@@ -11,7 +11,7 @@ configuration file as a list of host names or IP numbers that are to be
transmitted to, and messages received from.
.SH FILES
.LP
-/etc/ax25/rip98.conf
+/etc/ax25/rip98d.conf
.SH "SEE ALSO"
.BR arp (8),
.BR ifconfig (8),
diff --git a/tcpip/ttylinkd.8 b/tcpip/ttylinkd.8
index 7b2379f..bd427b6 100644
--- a/tcpip/ttylinkd.8
+++ b/tcpip/ttylinkd.8
@@ -49,5 +49,8 @@ There is still some need for some checking of who is still logged on.
The daemon may hang if you disconnect from it strangely.
.LP
There is no real way of working out what is going on with talkd.
+.LP
+If you do not have a talk daemon going on the specified host then the program
+will tend to sit there and do nothing.
.SH AUTHOR
-Craig Small VK2XLZ <csmall@gonzo.triode.net.au>
+Craig Small VK2XLZ <csmall@small.dropbear.id.au>
diff --git a/tcpip/ttylinkd.README b/tcpip/ttylinkd.README
index 40d8003..eecdf0c 100644
--- a/tcpip/ttylinkd.README
+++ b/tcpip/ttylinkd.README
@@ -28,7 +28,7 @@ BUGS / TO DO
CREDITS
=======
This program and documentation Copyright (C) 1997 Craig Small VK2XLZ
-(csmall@gonzo.triode.net.au), (csmall@gonzo.vk2xlz.ampr.org).
+<csmall@small.dropbear.id.au>
Please read the file ttylinkd.c for full notice.
Thanks to Tomi Manninen OH2BNS for the AX.25 patches in 0.02
-Thanks to Tomi again for the short callsign fix in 0.03 \ No newline at end of file
+Thanks to Tomi again for the short callsign fix in 0.03
diff --git a/tcpip/ttylinkd.c b/tcpip/ttylinkd.c
index aeef59a..69642c5 100644
--- a/tcpip/ttylinkd.c
+++ b/tcpip/ttylinkd.c
@@ -1,6 +1,6 @@
/*
* ttylinkd: A ttylink daemon using the ntalkd protocol.
- * Copyright (C) 1996,1197 Craig Small (csmall@gonzo.triode.net.au)
+ * Copyright (C) 1996,1197,2000 Craig Small (csmall@small.dropbear.id.au)
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -24,6 +24,7 @@
* 04/03/97 cs Added config file, no more defines.
* 09/03/97 tjd Enhanced to allow specifying user@hostname.wherever.
* rather than be confined to localhost.
+ * 04/01/00 cs Minor stuff with email addresses
*/
#include <ctype.h>
#include <signal.h>
diff --git a/tcpip/ttylinkd.conf.5 b/tcpip/ttylinkd.conf.5
index ecba3a1..7af2dd8 100644
--- a/tcpip/ttylinkd.conf.5
+++ b/tcpip/ttylinkd.conf.5
@@ -18,5 +18,5 @@ launched. If you do not supply a hostname then the local host will be assumed.
.SH SEE ALSO
.BR ttylinkd (8).
.SH AUTHOR
-Craig Small VK2XLZ <csmall@gonzo.triode.net.au>
+Craig Small VK2XLZ <csmall@small.dropbear.id.au>
diff --git a/user_call/Makefile.in b/user_call/Makefile.in
index e8b890c..3787546 100644
--- a/user_call/Makefile.in
+++ b/user_call/Makefile.in
@@ -61,7 +61,9 @@ AWK = @AWK@
AX25IO_LIB = @AX25IO_LIB@
AX25_LIB = @AX25_LIB@
CC = @CC@
+CXX = @CXX@
DMASCC = @DMASCC@
+FLTK_LIB = @FLTK_LIB@
MAKEINFO = @MAKEINFO@
NCURSES_LIB = @NCURSES_LIB@
PACKAGE = @PACKAGE@
@@ -101,6 +103,10 @@ DEFS = @DEFS@ -I. -I$(srcdir) -I..
CPPFLAGS = @CPPFLAGS@
LDFLAGS = @LDFLAGS@
LIBS = @LIBS@
+X_CFLAGS = @X_CFLAGS@
+X_LIBS = @X_LIBS@
+X_EXTRA_LIBS = @X_EXTRA_LIBS@
+X_PRE_LIBS = @X_PRE_LIBS@
ax25_call_OBJECTS = ax25_call.o user_io.o
ax25_call_LDADD = $(LDADD)
ax25_call_DEPENDENCIES =
diff --git a/user_call/user_io.c b/user_call/user_io.c
index 2e594f6..d8f95a1 100644
--- a/user_call/user_io.c
+++ b/user_call/user_io.c
@@ -8,12 +8,14 @@
#include "config.h"
#include "user_io.h"
+#define BUFLEN 8192
+
int compression = 0;
int paclen_in = 256;
int paclen_out = 256;
/* This is for select_loop() */
-static unsigned char buf[8192];
+static unsigned char buf[BUFLEN];
#ifdef HAVE_ZLIB_H
#include <zlib.h>
@@ -22,8 +24,8 @@ static unsigned char buf[8192];
static int compression_error = 0;
/* These are for the (de)compressor */
-static unsigned char input_buffer[8192];
-static unsigned char output_buffer[8192];
+static unsigned char input_buffer[BUFLEN];
+static unsigned char output_buffer[BUFLEN];
static z_stream incoming_stream;
static z_stream outgoing_stream;
@@ -62,7 +64,8 @@ static int flush_output(int fd, const void *buf, size_t count)
int cnt = count;
while (cnt > 0) {
- write(fd, buf, min(paclen_out, cnt));
+ if (write(fd, buf, min(paclen_out, cnt)) < 0)
+ return -1;
buf += paclen_out;
cnt -= paclen_out;
}
@@ -99,7 +102,7 @@ int user_write(int fd, const void *buf, size_t count)
do {
/* Set up fixed-size output buffer. */
outgoing_stream.next_out = output_buffer;
- outgoing_stream.avail_out = sizeof(output_buffer);
+ outgoing_stream.avail_out = BUFLEN;
/* Compress as much data into the buffer as possible. */
status = deflate(&outgoing_stream, Z_PARTIAL_FLUSH);
@@ -111,8 +114,8 @@ int user_write(int fd, const void *buf, size_t count)
}
/* Now send the compressed data */
- flush_output(fd, output_buffer, sizeof(output_buffer) - outgoing_stream.avail_out);
-
+ if (flush_output(fd, output_buffer, BUFLEN - outgoing_stream.avail_out) < 0)
+ return -1;
} while (outgoing_stream.avail_out == 0);
return count;
@@ -158,8 +161,8 @@ int user_read(int fd, void *buf, size_t count)
incoming_stream.next_in = input_buffer;
incoming_stream.avail_in = 0;
- if ((len = read(fd, input_buffer, sizeof(input_buffer))) < 0)
- return -1;
+ if ((len = read(fd, input_buffer, BUFLEN)) <= 0)
+ return len;
incoming_stream.avail_in = len;
}
@@ -173,11 +176,11 @@ int select_loop(int s)
fd_set read_fd;
int n;
- if (fcntl(s, F_SETFL, O_NONBLOCK) == -1) {
+ if (fcntl(s, F_SETFL, O_NONBLOCK) < 0) {
close(s);
return -1;
}
- if (fcntl(STDIN_FILENO, F_SETFL, O_NONBLOCK) == -1) {
+ if (fcntl(STDIN_FILENO, F_SETFL, O_NONBLOCK) < 0) {
close(s);
return -1;
}
@@ -193,18 +196,18 @@ int select_loop(int s)
select(s + 1, &read_fd, NULL, NULL, NULL);
if (FD_ISSET(s, &read_fd)) {
- while ((n = user_read(s, buf, 8192)) > 0)
+ while ((n = user_read(s, buf, BUFLEN)) > 0)
user_write(STDOUT_FILENO, buf, n);
- if (n == 0 || errno != EAGAIN) {
+ if (n == 0 || (n < 0 && errno != EAGAIN)) {
close(s);
break;
}
}
if (FD_ISSET(STDIN_FILENO, &read_fd)) {
- while ((n = user_read(STDIN_FILENO, buf, 8192)) > 0)
+ while ((n = user_read(STDIN_FILENO, buf, BUFLEN)) > 0)
user_write(s, buf, n);
- if (n == 0 || errno != EAGAIN) {
+ if (n == 0 || (n < 0 && errno != EAGAIN)) {
close(s);
break;
}
diff --git a/yamdrv/Makefile.in b/yamdrv/Makefile.in
index 88b1b87..eea0fda 100644
--- a/yamdrv/Makefile.in
+++ b/yamdrv/Makefile.in
@@ -61,7 +61,9 @@ AWK = @AWK@
AX25IO_LIB = @AX25IO_LIB@
AX25_LIB = @AX25_LIB@
CC = @CC@
+CXX = @CXX@
DMASCC = @DMASCC@
+FLTK_LIB = @FLTK_LIB@
MAKEINFO = @MAKEINFO@
NCURSES_LIB = @NCURSES_LIB@
PACKAGE = @PACKAGE@
@@ -90,6 +92,10 @@ DEFS = @DEFS@ -I. -I$(srcdir) -I..
CPPFLAGS = @CPPFLAGS@
LDFLAGS = @LDFLAGS@
LIBS = @LIBS@
+X_CFLAGS = @X_CFLAGS@
+X_LIBS = @X_LIBS@
+X_EXTRA_LIBS = @X_EXTRA_LIBS@
+X_PRE_LIBS = @X_PRE_LIBS@
yamcfg_OBJECTS = yamcfg.o
yamcfg_LDADD = $(LDADD)
yamcfg_DEPENDENCIES =