Please see CHANGES for a detailed description

This commit is contained in:
michael 1997-02-27 15:43:39 +00:00
parent 48c43085a1
commit 5285a869b0
14 changed files with 445 additions and 158 deletions

View File

@ -1,53 +1,71 @@
# $Id: CHANGES,v 1.4 1997/02/26 20:33:41 michael Exp $
# $Id: CHANGES,v 1.5 1997/02/27 15:43:39 michael Exp $
#
# To describe the news & fixes better (my english is not the best :-) the
# changelog is only available in german.
27-Feb-97
=========
o [Neu] Funktion modem_raw_read() komplett überarbeitet. Die Routine liest
intern immern einen großen Buffer ein (wenn soviele Daten da sind)
und gibt diese dann bei Anfrage weiter. Somit können alle weiteren
Modem-Funktionen Byte-Weise lesen ohne großen Overhead! Wenn
Probleme mit dieser neuen Funktion auftreden bitte in modem.c den
#define USE_NEW_MODEM_READER löschen.
o [Neu] Option '--with-tcllib' in 'configure.in' eingebaut, damit man
angeben kann, welche tcl Library man benutzen möchte. Voreingestellt
wird jetzt nach den Libraries tcl8.0, dann tcl7.6 und zum Schluß
nach tcl gesucht (Andreas Jaeger <aj@arthur.pfalz.de>).
o [Fix] Einige Änderungen an den Sourcen gemacht, damit vbox mit der neuen
glibc 2.0.x compiliert (Andreas Jaeger <aj@arthur.pfalz.de>).
26-Feb-97
=========
o [neu] Abspielen von voice Samples funktioniert jetzt wieder.
o [Neu] Abspielen von voice Samples funktioniert jetzt wieder.
o [neu] Voreinstellung für das Log-Verzeichnis ist jetzt '/var/log/vbox' und
o [Neu] Voreinstellung für das Log-Verzeichnis ist jetzt '/var/log/vbox' und
nicht mehr '/var/log'.
o [neu] Programm vboxctrl hinzugefügt, mit dem Kontrolldateien erzeugt
o [Neu] Programm vboxctrl hinzugefügt, mit dem Kontrolldateien erzeugt
und/oder gelöscht werden können.
o [neu] Die Kontrolldateien 'vboxctrl-answernow' und 'vboxctrl-reject'
o [Neu] Die Kontrolldateien 'vboxctrl-answernow' und 'vboxctrl-reject'
werden beim starten des Programms gelöscht.
25-Feb-97
=========
o [neu] Sourcen in CVS eingebunden.
o [Neu] Sourcen in CVS eingebunden.
o [neu] Beim ersten erscheinen der CALLER NUMBER wird im S-Register 20
o [Neu] Beim ersten erscheinen der CALLER NUMBER wird im S-Register 20
geprüft ob der Wert 1 (Voice) ist. Anrufe werden nur noch beant-
wortet, wenn das S-Register ausgelesen werden konnte!
o [neu] Wenn bei einem Anruf die Kontrolldatei 'vboxctrl-reject' exist-
o [Neu] Wenn bei einem Anruf die Kontrolldatei 'vboxctrl-reject' exist-
iert, wird der Anruf nicht angenommen - egal was in den Konfig-
urationen eingestellt wurde. Die Datei wird dann von vboxgetty
gelöscht.
o [neu] Wenn bei einem Anruf die Kontrolldatei 'vboxctrl-answerall' oder
o [Neu] Wenn bei einem Anruf die Kontrolldatei 'vboxctrl-answerall' oder
'vboxctrl-answernow' existiert, wird der Anruf - ohne rücksicht-
name auf die eingestellten Rings - sofort beantwortet. Die Datei
'vboxctrl-answernow' wird von vboxgetty zuvor gelöscht!
o [neu] Flags TOLLRINGS und TOLLCHECK eingebaut. Bei neuen Nachrichten kann
o [Neu] Flags TOLLRINGS und TOLLCHECK eingebaut. Bei neuen Nachrichten kann
damit eine neue Anzahl Rings festgelegt werden.
o [neu] Support-Funktionen in einer Library zusammengefasst. Diese kann ohne
o [Neu] Support-Funktionen in einer Library zusammengefasst. Diese kann ohne
Zusatz von anderen Programmen verwendet werden.
o [neu] Beim "Alive-Check" und bei einem eingehenden Anruf wird geprüft ob
o [Neu] Beim "Alive-Check" und bei einem eingehenden Anruf wird geprüft ob
sich die Datei 'vboxctrl-stop' im Spoolverzeichnis befindet. Wenn ja
killt sich der vboxgetty selbst!
o [neu] Wenn sich beim Starten die Datei 'vboxctrl-stop' im Spoolverzeichnis
o [Neu] Wenn sich beim Starten die Datei 'vboxctrl-stop' im Spoolverzeichnis
befindet, wartet vboxgetty solange, bis diese wieder gelöscht ist.
Der Modemport wird *nicht* geöffnet, somit kann an Tk-Anlagen der
Anrufschutz benutzt werden. Es wird alle 5 Sekunden geprüft ob die
@ -57,59 +75,59 @@ o [neu] Wenn sich beim Starten die Datei 'vboxctrl-stop' im Spoolverzeichnis
24-Feb-97
=========
o [neu] Skripte vboxmail und vboxplay an den eigenen Konverter angepasst.
o [Neu] Skripte vboxmail und vboxplay an den eigenen Konverter angepasst.
o [neu] Beim locken werden jetzt die Rechte der Locks auf die des Benutzers
o [Neu] Beim locken werden jetzt die Rechte der Locks auf die des Benutzers
gesetzt, damit diese beim beenden wieder entfernt werden können.
o [neu] Die Dokumentation und die Skripts werden jetzt von einem SED-Sktipt
o [Neu] Die Dokumentation und die Skripts werden jetzt von einem SED-Sktipt
bearbeitet um die eingestellten Pfade zu ersetzen.
o [neu] Globale Variable I4LCONFDIR in configure.in eingebaut. Die Environ-
o [Neu] Globale Variable I4LCONFDIR in configure.in eingebaut. Die Environ-
ment wird als Voreinstellung genommen, wenn diese nicht gesetzt ist
/etc/isdn.
o [neu] Programm vboxconvert fertiggestellt. Konvertierung ist jetzt von
o [Neu] Programm vboxconvert fertiggestellt. Konvertierung ist jetzt von
au nach vbox und von vbox nach au möglich.
o [neu] Einige kleine Änderungen in den Makefile's gemacht.
o [Neu] Einige kleine Änderungen in den Makefile's gemacht.
16-Feb-97
=========
o [neu] Unterstützung für die Modemgeschwindigkeit entfernt. Es wird jetzt
o [Neu] Unterstützung für die Modemgeschwindigkeit entfernt. Es wird jetzt
immer mit 57600 gearbeitet.
o [neu] Unterstützung für das Hangup-Kommando entfernt. Es wird jetzt immer
o [Neu] Unterstützung für das Hangup-Kommando entfernt. Es wird jetzt immer
'drop data terminal line' benutzt.
o [neu] Unterstützung für Flow-Control entfernt. Es wird jetzt immer mit
o [Neu] Unterstützung für Flow-Control entfernt. Es wird jetzt immer mit
CTS/RTS gearbeitet.
o [neu] Angabe einer umask eingebaut und die Funktionen zum setzten der
o [Neu] Angabe einer umask eingebaut und die Funktionen zum setzten der
Rechte angepasst.
12-Feb-97
=========
o [neu] Das Programm läuft jetzt unter den Rechten des jeweiligen Benutzers.
o [Neu] Das Programm läuft jetzt unter den Rechten des jeweiligen Benutzers.
Die Einschränkungen, Nachrichten nur aus dem Spoolverzeichnis zu
spielen oder zu speichern bestehen jetzt nicht mehr.
o [neu] Locking komplett geändert. Der Lock für das ttyI-Device bleibt jetzt
o [Neu] Locking komplett geändert. Der Lock für das ttyI-Device bleibt jetzt
*immer* bestehen!
o [neu] In bestimmten Fällen ist es *normal*, daß vboxgetty sich beendet;
o [Neu] In bestimmten Fällen ist es *normal*, daß vboxgetty sich beendet;
nämlich dann, wenn z.B. der Port nicht mehr initialisiert werden
konnte. Der getty sollte daher immer von einem Skript oder aus der
/etc/inittab gestartet werden!
o [neu] Beim initialisieren wird geprüft, ob die Datei 'vboxrc' existiert.
o [Neu] Beim initialisieren wird geprüft, ob die Datei 'vboxrc' existiert.
Die Datei kann leer, muß aber vorhanden sein. Das Programm beendet
sich, wenn die Datei nicht existiert.
o [neu] Tcl Skriptunterstützung eingebaut. Es wird *immer* ein Skript ge-
o [Neu] Tcl Skriptunterstützung eingebaut. Es wird *immer* ein Skript ge-
braucht, auch wenn nur Anrufe aufgezeichnet werden sollen!

View File

@ -1,5 +1,5 @@
#
# $Id: Makefile.in,v 1.4 1997/02/26 20:33:42 michael Exp $
# $Id: Makefile.in,v 1.5 1997/02/27 15:43:39 michael Exp $
#----------------------------------------------------------------------------#
# Things you can change to personalize the Makefile for your own site. #
@ -162,9 +162,7 @@ all: vbox sedconvert
vbox: createconfig
@$(ECHO) ""
@$(ECHO) " .+'''+. .+'''"
@$(ECHO) "Compiling vbox & utilities..."
@$(ECHO) "'+...+' '+...+' '"
@$(ECHO) ""
@$(MAKE) -C $(TOPDIR)/src all
@ -174,9 +172,7 @@ vbox: createconfig
sedconvert: ignore
@$(ECHO) ""
@$(ECHO) " .+'''+. .+'''+. "
@$(ECHO) "Creating utilities & documentations..."
@$(ECHO) "'+...+' '+...+' '+...+"
@$(ECHO) "Creating scripts & documentations..."
@$(ECHO) ""
@$(TOPDIR)/utils/mksed <$(TOPDIR)/utils/vboxmail.in >$(TOPDIR)/utils/vboxmail
@$(TOPDIR)/utils/mksed <$(TOPDIR)/utils/vboxplay.in >$(TOPDIR)/utils/vboxplay
@ -188,9 +184,7 @@ sedconvert: ignore
install: install-dirs
@$(ECHO) ""
@$(ECHO) " .+'''+. .+'''+. "
@$(ECHO) "Installing programs & configurations..."
@$(ECHO) "'+...+' '+...+' '+...+'"
@$(ECHO) ""
@$(ECHO) "Installing '$(sbindir)/vboxgetty'..."
@ -231,9 +225,7 @@ MAKETHISDIRS = $(prefix) $(exec_prefix) $(sbindir) $(bindir) \
install-dirs: ignore
@$(ECHO) ""
@$(ECHO) " .+'''+. "
@$(ECHO) "Creating directories..."
@$(ECHO) "'+...+' '+...+'"
@$(ECHO) ""
@set -e; for i in $(MAKETHISDIRS); do \
@ -266,23 +258,23 @@ createconfig: ignore
# misc #
#----------------------------------------------------------------------------#
distclean: clear
distclean: clean
@$(RM) -f $(TOPDIR)/Makefile
@$(RM) -f $(TOPDIR)/src/Makefile
@$(RM) -f $(TOPDIR)/src/configs.h
@$(RM) -f $(TOPDIR)/doc/Makefile
@$(RM) -f $(TOPDIR)/utils/vboxmail
@$(RM) -f $(TOPDIR)/utils/vboxplay
@$(RM) -f config.cache config.log config.status
clean: ignore
@$(ECHO) ""
@$(ECHO) "Cleaning source tree..."
@$(ECHO) ""
@$(RM) -f $(TOPDIR)/*~
@$(RM) -f $(TOPDIR)/src/*~
@$(RM) -f $(TOPDIR)/doc/*~
@$(RM) -f $(TOPDIR)/examples/*~
@$(RM) -f $(TOPDIR)/utils/*~
clear: clean
@$(RM) -f $(TOPDIR)/src/*.[oas]
@$(RM) -f $(TOPDIR)/src/vboxgetty
@$(RM) -f $(TOPDIR)/src/vbox

145
vbox/configure vendored
View File

@ -20,6 +20,8 @@ ac_help="$ac_help
--with-piddir=DIR pids are stored in DIR [/var/run]"
ac_help="$ac_help
--with-lockdir=DIR locks are made in DIR [/var/lock]"
ac_help="$ac_help
--with-tcllib=LIB use tcl library LIB [tcl]"
ac_help="$ac_help
--with-i4lconfdir=DIR global isdn configuration directory [\$I4LCONFDIR] "
@ -629,7 +631,7 @@ else
yes;
#endif
EOF
if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:633: \"$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:635: \"$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
@ -1128,6 +1130,22 @@ fi
echo "$ac_t""$VBOX_LOCKDIR" 1>&6
#--------------------------------------------------------------------------
# Test where vbox made the locks.
#--------------------------------------------------------------------------
VBOX_TCL=""
# Check whether --with-tcllib or --without-tcllib was given.
if test "${with_tcllib+set}" = set; then
withval="$with_tcllib"
VBOX_TCL=${withval}
fi
#--------------------------------------------------------------------------
# Test where the global isdn configuration is stored...
#--------------------------------------------------------------------------
@ -1167,7 +1185,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lncurses $LIBS"
cat > conftest.$ac_ext <<EOF
#line 1171 "configure"
#line 1189 "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
@ -1179,7 +1197,7 @@ int t() {
initscr()
; return 0; }
EOF
if { (eval echo configure:1183: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
if { (eval echo configure:1201: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@ -1199,9 +1217,9 @@ if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
else
ac_save_LIBS="$LIBS"
LIBS="-lpanel -lncurses
$LIBS"
$LIBS"
cat > conftest.$ac_ext <<EOF
#line 1205 "configure"
#line 1223 "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
@ -1213,7 +1231,7 @@ int t() {
update_panels()
; return 0; }
EOF
if { (eval echo configure:1217: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
if { (eval echo configure:1235: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@ -1244,6 +1262,17 @@ fi
# configure script if one is missing!
#--------------------------------------------------------------------------
if test "${VBOX_TCL}" = ""
then
TST1_TCL_LIB="tcl8.0"
TST2_TCL_LIB="tcl7.6"
TST3_TCL_LIB="tcl"
else
TST1_TCL_LIB="${VBOX_TCL}"
TST2_TCL_LIB="tcl8.0"
TST3_TCL_LIB="tcl7.6"
fi
echo $ac_n "checking for -lm""... $ac_c" 1>&6
ac_lib_var=`echo m'_'cos | tr './+\055' '__p_'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
@ -1252,7 +1281,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lm $LIBS"
cat > conftest.$ac_ext <<EOF
#line 1256 "configure"
#line 1285 "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
@ -1264,7 +1293,7 @@ int t() {
cos()
; return 0; }
EOF
if { (eval echo configure:1268: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
if { (eval echo configure:1297: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@ -1285,7 +1314,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-ldl $LIBS"
cat > conftest.$ac_ext <<EOF
#line 1289 "configure"
#line 1318 "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
@ -1297,7 +1326,7 @@ int t() {
dlerror()
; return 0; }
EOF
if { (eval echo configure:1301: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
if { (eval echo configure:1330: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@ -1310,16 +1339,16 @@ LIBS="$ac_save_LIBS"
fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
echo "$ac_t""yes" 1>&6
echo $ac_n "checking for -ltcl""... $ac_c" 1>&6
ac_lib_var=`echo tcl'_'Tcl_CreateInterp | tr './+\055' '__p_'`
echo $ac_n "checking for -l${TST1_TCL_LIB}""... $ac_c" 1>&6
ac_lib_var=`echo ${TST1_TCL_LIB}'_'Tcl_CreateInterp | tr './+\055' '__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="-ltcl -lm -ldl
$LIBS"
LIBS="-l${TST1_TCL_LIB} -lm -ldl
$LIBS"
cat > conftest.$ac_ext <<EOF
#line 1323 "configure"
#line 1352 "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
@ -1331,7 +1360,7 @@ int t() {
Tcl_CreateInterp()
; return 0; }
EOF
if { (eval echo configure:1335: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
if { (eval echo configure:1364: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@ -1344,16 +1373,94 @@ LIBS="$ac_save_LIBS"
fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
echo "$ac_t""yes" 1>&6
VBOX_GETTY_LIBS="-ltcl -lm -ldl"
VBOX_GETTY_LIBS="-l${TST1_TCL_LIB} -lm -ldl"
else
echo "$ac_t""no" 1>&6
{ echo "configure: error: vboxgetty needs the tcl package (7.6 or higher) to compile!" 1>&2; exit 1; }
echo $ac_n "checking for -l${TST2_TCL_LIB}""... $ac_c" 1>&6
ac_lib_var=`echo ${TST2_TCL_LIB}'_'Tcl_CreateInterp | tr './+\055' '__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="-l${TST2_TCL_LIB} -lm -ldl
$LIBS"
cat > conftest.$ac_ext <<EOF
#line 1389 "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 Tcl_CreateInterp();
int main() { return 0; }
int t() {
Tcl_CreateInterp()
; return 0; }
EOF
if { (eval echo configure:1401: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
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
VBOX_GETTY_LIBS="-l${TST2_TCL_LIB} -lm -ldl"
else
echo "$ac_t""no" 1>&6
echo $ac_n "checking for -l${TST3_TCL_LIB}""... $ac_c" 1>&6
ac_lib_var=`echo ${TST3_TCL_LIB}'_'Tcl_CreateInterp | tr './+\055' '__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="-l${TST3_TCL_LIB} -lm -ldl
$LIBS"
cat > conftest.$ac_ext <<EOF
#line 1426 "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 Tcl_CreateInterp();
int main() { return 0; }
int t() {
Tcl_CreateInterp()
; return 0; }
EOF
if { (eval echo configure:1438: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
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
VBOX_GETTY_LIBS="-l${TST3_TCL_LIB} -lm -ldl"
else
echo "$ac_t""no" 1>&6
{ echo "configure: error: vboxgetty needs the tcl package (7.6 or higher) to compile! Use --with-tcllib to specify your tcl library!" 1>&2; exit 1; }
fi
fi
fi
else
echo "$ac_t""no" 1>&6
{ echo "configure: error: vboxgetty needs the dynamic link library to compile!" 1>&2; exit 1; }
fi
else

View File

@ -113,6 +113,19 @@ AC_ARG_WITH(lockdir,
AC_MSG_RESULT($VBOX_LOCKDIR)
#--------------------------------------------------------------------------
# Test where vbox made the locks.
#--------------------------------------------------------------------------
VBOX_TCL=""
AC_ARG_WITH(tcllib,
[ --with-tcllib=LIB use tcl library LIB [tcl]],
VBOX_TCL=${withval}
)
#--------------------------------------------------------------------------
# Test where the global isdn configuration is stored...
#--------------------------------------------------------------------------
@ -142,12 +155,12 @@ AC_MSG_RESULT($ISDN_GLOBAL_CONFIG)
VBOX_LIB_NCURSES="n"
AC_CHECK_LIB(ncurses, initscr,
AC_CHECK_LIB(panel, update_panels,
VBOX_LIB_NCURSES="y",
[AC_MSG_WARN(vbox needs ncurses (1.9.9g or higher) to compile!)],
-lncurses
),
[AC_MSG_WARN(vbox needs ncurses (1.9.9g or higher) to compile!)]
AC_CHECK_LIB(panel, update_panels,
VBOX_LIB_NCURSES="y",
[AC_MSG_WARN(vbox needs ncurses (1.9.9g or higher) to compile!)],
-lncurses
),
[AC_MSG_WARN(vbox needs ncurses (1.9.9g or higher) to compile!)]
)
#--------------------------------------------------------------------------
@ -155,16 +168,35 @@ AC_CHECK_LIB(ncurses, initscr,
# configure script if one is missing!
#--------------------------------------------------------------------------
if test "${VBOX_TCL}" = ""
then
TST1_TCL_LIB="tcl8.0"
TST2_TCL_LIB="tcl7.6"
TST3_TCL_LIB="tcl"
else
TST1_TCL_LIB="${VBOX_TCL}"
TST2_TCL_LIB="tcl8.0"
TST3_TCL_LIB="tcl7.6"
fi
AC_CHECK_LIB(m, cos,
AC_CHECK_LIB(dl, dlerror,
AC_CHECK_LIB(tcl, Tcl_CreateInterp,
VBOX_GETTY_LIBS="-ltcl -lm -ldl",
[AC_MSG_ERROR(vboxgetty needs the tcl package (7.6 or higher) to compile!)],
-lm -ldl
),
[AC_MSG_ERROR(vboxgetty needs the dynamic link library to compile!)]
),
[AC_MSG_ERROR(vboxgetty needs the math library to compile!)]
AC_CHECK_LIB(dl, dlerror,
AC_CHECK_LIB(${TST1_TCL_LIB}, Tcl_CreateInterp,
VBOX_GETTY_LIBS="-l${TST1_TCL_LIB} -lm -ldl",
AC_CHECK_LIB(${TST2_TCL_LIB}, Tcl_CreateInterp,
VBOX_GETTY_LIBS="-l${TST2_TCL_LIB} -lm -ldl",
AC_CHECK_LIB(${TST3_TCL_LIB}, Tcl_CreateInterp,
VBOX_GETTY_LIBS="-l${TST3_TCL_LIB} -lm -ldl",
[AC_MSG_ERROR(vboxgetty needs the tcl package (7.6 or higher) to compile! Use --with-tcllib to specify your tcl library!)],
-lm -ldl
),
-lm -ldl
),
-lm -ldl
),
[AC_MSG_ERROR(vboxgetty needs the dynamic link library to compile!)]
),
[AC_MSG_ERROR(vboxgetty needs the math library to compile!)]
)
#--------------------------------------------------------------------------

View File

@ -1,5 +1,5 @@
/*
** $Id: init.c,v 1.3 1997/02/26 13:10:35 michael Exp $
** $Id: init.c,v 1.4 1997/02/27 15:43:46 michael Exp $
**
** Copyright (C) 1996, 1997 Michael 'Ghandi' Herold
*/
@ -198,7 +198,7 @@ void exit_program(int s)
{
block_all_signals();
log(L_INFO, "Exit program on \"%s\" (signal %d)...\n", strsignal(s), s);
log(L_INFO, "Exit program on signal %d...\n", s);
modem_close_port();
streamio_close(setup.vboxrc);

View File

@ -1,5 +1,5 @@
/*
** $Id: log.c,v 1.3 1997/02/26 13:10:42 michael Exp $
** $Id: log.c,v 1.4 1997/02/27 15:43:47 michael Exp $
**
** Copyright (C) 1996, 1997 Michael 'Ghandi' Herold
*/
@ -56,9 +56,9 @@ int log_init(void)
returnok();
}
else log(L_STDERR, "%s: Can't open log '%s'.\n", basename, setup.logname);
else log(L_STDERR, "%s: Can't open log '%s'.\n", vbasename, setup.logname);
}
else log(L_STDERR, "%s: Logname too long. Please set 'SETUP_MAX_LOGNAME' in 'setup.h' to a higher value!\n", basename);
else log(L_STDERR, "%s: Logname too long. Please set 'SETUP_MAX_LOGNAME' in 'setup.h' to a higher value!\n", vbasename);
returnerror();
}

View File

@ -1,5 +1,5 @@
/*
** $Id: modem.c,v 1.4 1997/02/26 20:33:53 michael Exp $
** $Id: modem.c,v 1.5 1997/02/27 15:43:48 michael Exp $
**
** Copyright (C) 1996, 1997 Michael 'Ghandi' Herold
*/
@ -13,20 +13,30 @@
#include <string.h>
#include <fcntl.h>
#include <signal.h>
#include <time.h>
#include "modem.h"
#include "log.h"
#include "voice.h"
#include "libvbox.h"
/** Defines **************************************************************/
#define USE_NEW_MODEM_READER /* Define to use new modem read command */
#define DBG_NEW_MODEM_READER /* Define to debug new modem read command */
#undef DBG_OLD_MODEM_READER /* Define to debug old modem read command */
/** Variables ************************************************************/
static int timeoutstatus = FALSE;
static int nocarrier = FALSE;
static int nocarrierpos = 0;
static char *nocarriertxt = "NO CARRIER";
static int timeoutstatus = FALSE;
static int nocarrier = FALSE;
static int nocarrierpos = 0;
static char *nocarriertxt = "NO CARRIER";
static int modem_input_pos = 0;
static int modem_input_len = 0;
static char modem_store_result[MODEM_BUFFER_LEN + 1];
static char modem_store_result[MODEM_BUFFER_LEN + 1];
static char modem_input[MODEM_INPUT_LEN + 1];
/** Prototypes ***********************************************************/
@ -40,6 +50,7 @@ static void modem_check_nocarrier(char);
static int modem_check_result(char *, char *);
static void modem_set_flowcontrol(TIO *);
static int modem_get_echo(char *);
static int modem_get_rawsequence(char *, int);
/*************************************************************************
** modem_open_port(): Opens the modem port. **
@ -424,15 +435,38 @@ size_t modem_raw_write(char *string, int len)
*************************************************************************/
static int modem_get_echo(char *echo)
{
return(modem_get_rawsequence(echo, TRUE));
}
/*************************************************************************
** modem_get_sequence(): Reads a specified sequence from the modem. **
*************************************************************************/
int modem_get_sequence(char *seq)
{
return(modem_get_rawsequence(seq, FALSE));
}
/*************************************************************************
** modem_get_rawsequence(): Reads a raw sequence from modem. This is **
** ab subroutine for modem_get_sequence() & **
** modem_get_echo(). **
*************************************************************************/
static int modem_get_rawsequence(char *line, int echo)
{
char c;
int i;
int timeout;
timeout = (echo ? setup.modem.timeout_echo : setup.modem.timeout_cmd);
log(L_JUNK, "Reading modem echo (%d secs timeout)...\n", setup.modem.timeout_echo);
log(L_JUNK, "Reading modem %s (%d secs timeout)...\n", (echo ? "echo" : "sequence"), timeout);
modem_set_timeout(setup.modem.timeout_echo);
modem_set_timeout(timeout);
for (i = 0; i < strlen(echo); i++)
for (i = 0; i < strlen(line); i++)
{
if ((modem_raw_read(&c, 1) != 1) || (modem_get_timeout()))
{
@ -440,23 +474,29 @@ static int modem_get_echo(char *echo)
returnerror();
}
if (echo[i] != c)
if (line[i] != c)
{
modem_set_timeout(0);
returnerror();
}
}
if ((modem_raw_read(&c, 1) != 1) || (modem_get_timeout()))
if (echo)
{
modem_set_timeout(0);
returnerror();
if ((modem_raw_read(&c, 1) != 1) || (modem_get_timeout()))
{
modem_set_timeout(0);
returnerror();
}
}
modem_set_timeout(0);
if (c != MODEM_COMMAND_SUFFIX) returnerror();
if (echo)
{
if (c != MODEM_COMMAND_SUFFIX) returnerror();
}
returnok();
}
@ -510,11 +550,101 @@ static int modem_read(char *line, int readtimeout)
}
/*************************************************************************
** modem_raw_read(): Reads a string from modem. **
** modem_raw_read(): Reads a raw string from modem. **
*************************************************************************/
int modem_raw_read(char *line, int len)
{
#ifdef USE_NEW_MODEM_READER
int use = 0;
int i;
#ifdef DBG_NEW_MODEM_READER
log(L_JUNK, "[READ] Function request %d byte(s) (now pos %d; len %d).\n", len, modem_input_pos, modem_input_len);
#endif
if (len > MODEM_INPUT_LEN)
{
log(L_FATAL, "Internal modem buffer overflow (size %d; request %d)!\n", MODEM_INPUT_LEN, len);
return(-1);
}
if (modem_input_len >= len)
{
memcpy(line, &modem_input[modem_input_pos], len);
modem_input_len -= len;
modem_input_pos += len;
#ifdef DBG_NEW_MODEM_READER
log(L_JUNK, "[READ] Return all %d bytes (now pos %d; len %d).\n", len, modem_input_pos, modem_input_len);
#endif
return(len);
}
if (modem_input_len > 0)
{
memcpy(line, &modem_input[modem_input_pos], modem_input_len);
#ifdef DBG_NEW_MODEM_READER
log(L_JUNK, "[READ] Store %d of %d bytes (now pos 0; len 0).\n", modem_input_len, len);
#endif
}
#ifdef DBG_NEW_MODEM_READER
else log(L_JUNK, "[READ] Store nothing (pos 0; len 0).\n");
#endif
len -= modem_input_len;
use += modem_input_len;
modem_input_pos = 0;
modem_input_len = 0;
if ((modem_input_len = read(setup.modem.fd, modem_input, MODEM_INPUT_LEN)) < 0)
{
modem_input_pos = 0;
modem_input_len = 0;
#ifdef DBG_NEW_MODEM_READER
log(L_JUNK, "[READ] Return only %d bytes (now pos %d; len %d).\n", use, modem_input_pos, modem_input_len);
#endif
return(use);
}
#ifdef DBG_NEW_MODEM_READER
log(L_JUNK, "[READ] Read %d bytes (now pos %d; len %d).\n", modem_input_len, modem_input_pos, modem_input_len);
#endif
for (i = 0; i < modem_input_len; i++)
{
#ifdef DBG_NEW_MODEM_READER
log_line(L_JUNK, "[READ] ");
log_char(L_JUNK, modem_input[i]);
log_text(L_JUNK, "\n");
#endif
modem_check_nocarrier(modem_input[i]);
}
if (modem_input_len < len) len = modem_input_len;
memcpy(&line[use], &modem_input[modem_input_pos], len);
modem_input_len -= len;
modem_input_pos += len;
#ifdef DBG_NEW_MODEM_READER
log(L_JUNK, "[READ] Return %d bytes (now pos %d; len %d.\n", use + len, modem_input_pos, modem_input_len);
#endif
return(use + len);
#else
int r;
int i;
@ -522,15 +652,19 @@ int modem_raw_read(char *line, int len)
{
for (i = 0; i < r; i++)
{
log_line(L_JUNK, "[rawread] ");
#ifdef DBG_OLD_MODEM_READER
log_line(L_JUNK, "[OLDREAD] ");
log_char(L_JUNK, line[i]);
log_text(L_JUNK, "\n");
#endif
modem_check_nocarrier(line[i]);
}
}
return(r);
#endif
}
/*************************************************************************

View File

@ -1,5 +1,5 @@
/*
** $Id: modem.h,v 1.3 1997/02/26 13:10:44 michael Exp $
** $Id: modem.h,v 1.4 1997/02/27 15:43:50 michael Exp $
**
** Copyright (C) 1996, 1997 Michael 'Ghandi' Herold
*/
@ -39,6 +39,7 @@
#define MODEM_COMMAND_SUFFIX '\r'
#define MODEM_BUFFER_LEN 256
#define MODEM_INPUT_LEN MODEM_BUFFER_LEN
typedef struct termios TIO;
@ -81,5 +82,6 @@ extern int modem_get_nocarrier_state(void);
extern int modem_check_input(void);
extern int modem_hangup(void);
extern char *modem_get_s_register(int);
extern int modem_get_sequence(char *);
#endif /* _VBOX_MODEM_H */

View File

@ -1,5 +1,5 @@
/*
** $Id: perms.c,v 1.3 1997/02/26 13:10:45 michael Exp $
** $Id: perms.c,v 1.4 1997/02/27 15:43:51 michael Exp $
**
** Copyright (C) 1996, 1997 Michael 'Ghandi' Herold
*/
@ -9,6 +9,7 @@
#include <unistd.h>
#include <stdlib.h>
#include <errno.h>
#include <string.h>
#include "log.h"
#include "perms.h"

View File

@ -1,5 +1,5 @@
/*
** $Id: vboxconvert.c,v 1.3 1997/02/26 13:10:53 michael Exp $
** $Id: vboxconvert.c,v 1.4 1997/02/27 15:43:52 michael Exp $
**
** Copyright (C) 1996, 1997 Michael 'Ghandi' Herold
**
@ -131,7 +131,7 @@ static struct option args_autovbox[] =
{ NULL , 0 , NULL, 0 }
};
static char *basename;
static char *vbasename;
/** Prototypes ***********************************************************/
@ -180,16 +180,16 @@ int main(int argc, char **argv)
char *location;
int i;
if (!(basename = rindex(argv[0], '/')))
if (!(vbasename = rindex(argv[0], '/')))
{
basename = argv[0];
vbasename = argv[0];
}
else basename++;
else vbasename++;
/* Called as 'vboxtoau' converts a messages saved with vbox to */
/* sun's au format. */
if (strcasecmp(basename, "vboxtoau") == 0)
if (strcasecmp(vbasename, "vboxtoau") == 0)
{
rate = 8000;
mode = SND_FORMAT_LINEAR_16;
@ -231,7 +231,7 @@ int main(int argc, char **argv)
/* Called as 'autovbox' converts a sun au sample to any of the */
/* vbox message formats. */
if (strcasecmp(basename, "autovbox") == 0)
if (strcasecmp(vbasename, "autovbox") == 0)
{
name = "*** Unknown ***";
phone = "*** Unknown ***";
@ -306,7 +306,7 @@ int main(int argc, char **argv)
/* Called as 'vboxmode' displays information about the sample */
/* format. */
if (strcasecmp(basename, "vboxmode") == 0)
if (strcasecmp(vbasename, "vboxmode") == 0)
{
mode = FALSE;
name = "";
@ -366,14 +366,14 @@ static int start_vboxtoau(int samplemode, int samplerate)
if (!(tmpname = tempnam("/tmp", "vbox")))
{
fprintf(stderr, "%s: can't create a temporary file.\n", basename);
fprintf(stderr, "%s: can't create a temporary file.\n", vbasename);
return(255);
}
if (!(tmpfile = fopen(tmpname, "w+")))
{
fprintf(stderr, "%s: can't create \"%s\".\n", basename, tmpname);
fprintf(stderr, "%s: can't create \"%s\".\n", vbasename, tmpname);
free(tmpname);
@ -382,7 +382,7 @@ static int start_vboxtoau(int samplemode, int samplerate)
if (fread(&header, sizeof(vaheader_t), 1, stdin) != 1)
{
fprintf(stderr, "%s: can't read vbox voice header.\n", basename);
fprintf(stderr, "%s: can't read vbox voice header.\n", vbasename);
fclose(tmpfile);
unlink(tmpname);
@ -393,7 +393,7 @@ static int start_vboxtoau(int samplemode, int samplerate)
if (strncmp(header.magic, VAH_MAGIC, VAH_MAX_MAGIC) != 0)
{
fprintf(stderr, "%s: sample contains no vbox voice header.\n", basename);
fprintf(stderr, "%s: sample contains no vbox voice header.\n", vbasename);
fclose(tmpfile);
unlink(tmpname);
@ -419,7 +419,7 @@ static int start_vboxtoau(int samplemode, int samplerate)
break;
default:
fprintf(stderr, "%s: unknown/unsupported compression %d.\n", basename, compression);
fprintf(stderr, "%s: unknown/unsupported compression %d.\n", vbasename, compression);
break;
}
@ -442,7 +442,7 @@ static int start_vboxtoau(int samplemode, int samplerate)
static void usage_vboxtoau(void)
{
fprintf(stderr, "\n");
fprintf(stderr, "Usage: %s OPTION [ OPTION ] [ ... ] <INFILE >OUTFILE\n", basename);
fprintf(stderr, "Usage: %s OPTION [ OPTION ] [ ... ] <INFILE >OUTFILE\n", vbasename);
fprintf(stderr, "\n");
fprintf(stderr, "-r, --samplerate RATE Header sampling rate (default 8000).\n");
fprintf(stderr, "-u, --ulaw Use 8-bit uLaw output.\n");
@ -475,7 +475,7 @@ static int start_vboxmode(char *name, int quiet)
if (result == 255)
{
fprintf(stderr, "%s: sample contains no vbox or sun au header.\n", basename);
fprintf(stderr, "%s: sample contains no vbox or sun au header.\n", vbasename);
}
return(result);
@ -488,7 +488,7 @@ static int start_vboxmode(char *name, int quiet)
static void usage_vboxmode(void)
{
fprintf(stderr, "\n");
fprintf(stderr, "Usage: %s OPTION [ OPTION ] [ ... ] SAMPLENAME\n", basename);
fprintf(stderr, "Usage: %s OPTION [ OPTION ] [ ... ] SAMPLENAME\n", vbasename);
fprintf(stderr, "\n");
fprintf(stderr, "-q, --quiet Returns only the errorcode (no descriptions).\n");
fprintf(stderr, "-h, --help Prints this usage message.\n");
@ -518,14 +518,14 @@ static int start_autovbox(int compression, char *name, char *id, char *phone, ch
if (!(tmpname = tempnam("/tmp", "vbox")))
{
fprintf(stderr, "%s: can't create a temporary file.\n", basename);
fprintf(stderr, "%s: can't create a temporary file.\n", vbasename);
return(255);
}
if (!(tmpfile = fopen(tmpname, "w+")))
{
fprintf(stderr, "%s: can't create \"%s\".\n", basename, tmpname);
fprintf(stderr, "%s: can't create \"%s\".\n", vbasename, tmpname);
free(tmpname);
@ -543,7 +543,7 @@ static int start_autovbox(int compression, char *name, char *id, char *phone, ch
if (fwrite(&header, sizeof(vaheader_t), 1, stdout) != 1)
{
fprintf(stderr, "%s: can't write vbox audio header.\n", basename);
fprintf(stderr, "%s: can't write vbox audio header.\n", vbasename);
return(255);
}
@ -567,7 +567,7 @@ static int start_autovbox(int compression, char *name, char *id, char *phone, ch
break;
default:
fprintf(stderr, "%s: unsupported compression type.\n", basename);
fprintf(stderr, "%s: unsupported compression type.\n", vbasename);
break;
}
@ -587,7 +587,7 @@ static int start_autovbox(int compression, char *name, char *id, char *phone, ch
static void usage_autovbox(void)
{
fprintf(stderr, "\n");
fprintf(stderr, "Usage: %s OPTION [ OPTION ] [ ... ] <INFILE >OUTFILE\n", basename);
fprintf(stderr, "Usage: %s OPTION [ OPTION ] [ ... ] <INFILE >OUTFILE\n", vbasename);
fprintf(stderr, "\n");
fprintf(stderr, "-2, --adpcm-2 Converts sample to adpcm-2.\n");
fprintf(stderr, "-3, --adpcm-3 Converts sample to adpcm-3.\n");
@ -740,14 +740,14 @@ static int convert_au_to_pvf(FILE *in, FILE *out)
if (hdr.magic != SND_MAGIC)
{
fprintf(stderr, "%s: illegal magic number for an au file.\n", basename);
fprintf(stderr, "%s: illegal magic number for an au file.\n", vbasename);
return(255);
}
if (hdr.channelCount != 1)
{
fprintf(stderr, "%s: number of channels != 1 (only mono supported).\n", basename);
fprintf(stderr, "%s: number of channels != 1 (only mono supported).\n", vbasename);
return(255);
}
@ -756,7 +756,7 @@ static int convert_au_to_pvf(FILE *in, FILE *out)
{
if (getc(in) == EOF)
{
fprintf(stderr, "%s: unexpected EOF.\n", basename);
fprintf(stderr, "%s: unexpected EOF.\n", vbasename);
return(255);
}
@ -793,7 +793,7 @@ static int convert_au_to_pvf(FILE *in, FILE *out)
break;
default:
fprintf(stderr, "%s: unsupported or illegal sound encoding.\n", basename);
fprintf(stderr, "%s: unsupported or illegal sound encoding.\n", vbasename);
return(255);
}
@ -1110,7 +1110,7 @@ static int test_sample_is_vbox(char *name, int quiet)
close(fd);
}
else fprintf(stderr, "%s: can't open \"%s\" (vbox sample test).\n", basename, name);
else fprintf(stderr, "%s: can't open \"%s\" (vbox sample test).\n", vbasename, name);
return(compression);
}
@ -1127,7 +1127,7 @@ static int test_sample_is_au(char *name, int quiet)
if (!(in = fopen(name, "r")))
{
fprintf(stderr, "%s: can't open \"%s\" (au sample test).\n", basename, name);
fprintf(stderr, "%s: can't open \"%s\" (au sample test).\n", vbasename, name);
return(255);
}
@ -1175,7 +1175,7 @@ static int test_sample_is_au(char *name, int quiet)
static void version(void)
{
fprintf(stderr, "\n");
fprintf(stderr, "%s version %s (%s)\n", basename, VERSION, VERDATE);
fprintf(stderr, "%s version %s (%s)\n", vbasename, VERSION, VERDATE);
fprintf(stderr, "\n");
exit(255);
@ -1189,14 +1189,14 @@ static int check_io_error(FILE *in, FILE *out)
{
if (ferror(in) != 0)
{
fprintf(stderr, "%s: can't read input.\n", basename);
fprintf(stderr, "%s: can't read input.\n", vbasename);
return(255);
}
if (ferror(out) != 0)
{
fprintf(stderr, "%s: can't write output.\n", basename);
fprintf(stderr, "%s: can't write output.\n", vbasename);
return(255);
}

View File

@ -1,5 +1,5 @@
/*
** $Id: vboxctrl.c,v 1.2 1997/02/26 20:33:55 michael Exp $
** $Id: vboxctrl.c,v 1.3 1997/02/27 15:43:53 michael Exp $
**
** Copyright (C) 1996, 1997 Michael 'Ghandi' Herold
*/
@ -35,7 +35,7 @@ static struct option arguments[] =
/** Variables ************************************************************/
static char spooldir[PATH_MAX + 1];
static char *basename;
static char *vbasename;
static char *usespool;
/** Prototypes ***********************************************************/
@ -55,15 +55,15 @@ int main(int argc, char **argv)
int mode;
int opts;
if (!(basename = rindex(argv[0], '/')))
if (!(vbasename = rindex(argv[0], '/')))
{
basename = argv[0];
vbasename = argv[0];
}
else basename++;
else vbasename++;
if (!(passwd = getpwuid(getuid())))
{
fprintf(stderr, "%s: can't get passwd entry for uid %d.\n", basename, getuid());
fprintf(stderr, "%s: can't get passwd entry for uid %d.\n", vbasename, getuid());
exit(5);
}
@ -122,7 +122,7 @@ int main(int argc, char **argv)
if (!*todo)
{
fprintf(stderr, "%s: you must specify a control name to create/remove.\n", basename);
fprintf(stderr, "%s: you must specify a control name to create/remove.\n", vbasename);
exit(5);
}
@ -131,19 +131,19 @@ int main(int argc, char **argv)
{
if (ctrl_ishere(usespool, todo))
{
fprintf(stderr, "%s: control file '%s' allready exists.\n", basename, todo);
fprintf(stderr, "%s: control file '%s' allready exists.\n", vbasename, todo);
exit(5);
}
if (!ctrl_create(usespool, todo))
{
fprintf(stderr, "%s: can't create control file '%s'.\n", basename, todo);
fprintf(stderr, "%s: can't create control file '%s'.\n", vbasename, todo);
exit(5);
}
fprintf(stderr, "%s: control file '%s' created.\n", basename, todo);
fprintf(stderr, "%s: control file '%s' created.\n", vbasename, todo);
exit(0);
}
@ -152,24 +152,24 @@ int main(int argc, char **argv)
{
if (!ctrl_ishere(usespool, todo))
{
fprintf(stderr, "%s: control file '%s' doesn't exist.\n", basename, todo);
fprintf(stderr, "%s: control file '%s' doesn't exist.\n", vbasename, todo);
exit(5);
}
if (!ctrl_remove(usespool, todo))
{
fprintf(stderr, "%s: can't remove control file '%s'.\n", basename, todo);
fprintf(stderr, "%s: can't remove control file '%s'.\n", vbasename, todo);
exit(5);
}
fprintf(stderr, "%s: control file '%s' removed.\n", basename, todo);
fprintf(stderr, "%s: control file '%s' removed.\n", vbasename, todo);
exit(0);
}
fprintf(stderr, "%s: oops - don't know what I should do!\n", basename);
fprintf(stderr, "%s: oops - don't know what I should do!\n", vbasename);
exit(5);
}
@ -181,7 +181,7 @@ int main(int argc, char **argv)
static void version(void)
{
fprintf(stderr, "\n");
fprintf(stderr, "%s version %s (%s)\n", basename, VERSION, VERDATE);
fprintf(stderr, "%s version %s (%s)\n", vbasename, VERSION, VERDATE);
fprintf(stderr, "\n");
exit(1);
@ -194,7 +194,7 @@ static void version(void)
static void usage(void)
{
fprintf(stderr, "\n");
fprintf(stderr, "Usage: %s OPTION [ OPTION ] [ ... ]\n", basename);
fprintf(stderr, "Usage: %s OPTION [ OPTION ] [ ... ]\n", vbasename);
fprintf(stderr, "\n");
fprintf(stderr, "-c, --create Removes a control file (default).\n");
fprintf(stderr, "-r, --remove Creates a control file.\n");

View File

@ -1,5 +1,5 @@
/*
** $Id: vboxgetty.c,v 1.3 1997/02/26 13:10:55 michael Exp $
** $Id: vboxgetty.c,v 1.4 1997/02/27 15:43:53 michael Exp $
**
** Copyright (C) 1996, 1997 Michael 'Ghandi' Herold
*/
@ -32,7 +32,7 @@ static int check_spool_space(unsigned long);
/** Variables ************************************************************/
char *basename;
char *vbasename;
static int modemstate;
@ -57,11 +57,11 @@ void main(int argc, char **argv)
char *device;
int opts;
if (!(basename = rindex(argv[0], '/')))
if (!(vbasename = rindex(argv[0], '/')))
{
basename = argv[0];
vbasename = argv[0];
}
else basename++;
else vbasename++;
usevrc = GETTYRC;
device = "";
@ -91,21 +91,21 @@ void main(int argc, char **argv)
if (getuid() != 0)
{
log(L_STDERR, "%s: must be run by root!\n", basename);
log(L_STDERR, "%s: must be run by root!\n", vbasename);
exit(5);
}
if (access(device, W_OK|R_OK|F_OK) != 0)
{
log(L_STDERR, "%s: device \"%s\" is not accessable.\n", basename, device);
log(L_STDERR, "%s: device \"%s\" is not accessable.\n", vbasename, device);
exit(5);
}
if (access(usevrc, R_OK|F_OK) != 0)
{
log(L_STDERR, "%s: Setup \"%s\" doesn't exist.\n", basename, usevrc);
log(L_STDERR, "%s: Setup \"%s\" doesn't exist.\n", vbasename, usevrc);
exit(5);
}
@ -127,7 +127,7 @@ void main(int argc, char **argv)
static void version(void)
{
fprintf(stderr, "\n");
fprintf(stderr, "%s version %s (%s)\n", basename, VERSION, VERDATE);
fprintf(stderr, "%s version %s (%s)\n", vbasename, VERSION, VERDATE);
fprintf(stderr, "\n");
exit(1);
@ -140,7 +140,7 @@ static void version(void)
static void usage(void)
{
fprintf(stderr, "\n");
fprintf(stderr, "Usage: %s OPTION [ OPTION ] [ ... ]\n", basename);
fprintf(stderr, "Usage: %s OPTION [ OPTION ] [ ... ]\n", vbasename);
fprintf(stderr, "\n");
fprintf(stderr, "-f, --file FILE Overwrites \"%s\".\n", GETTYRC);
fprintf(stderr, "-d, --device TTY Use device TTY for modem operations [required].\n");

View File

@ -4,7 +4,7 @@
/** Variables ************************************************************/
extern char *basename;
extern char *vbasename;
/** Prototypes ***********************************************************/

View File

@ -267,7 +267,8 @@ int voice_put_message(char *message)
modem_command("", "NO CARRIER"); /* NO CARRIER */
modem_get_echo(linein); /* <DLE><DC4> */
/* modem_get_echo(linein);*/
/* <DLE><DC4> */
}
else
{