aboutsummaryrefslogtreecommitdiff
path: root/audio/vat/files
diff options
context:
space:
mode:
Diffstat (limited to 'audio/vat/files')
-rw-r--r--audio/vat/files/patch-aa249
-rw-r--r--audio/vat/files/patch-ab136
-rw-r--r--audio/vat/files/patch-ac11
-rw-r--r--audio/vat/files/patch-ad70
-rw-r--r--audio/vat/files/patch-ae79
-rw-r--r--audio/vat/files/patch-af128
-rw-r--r--audio/vat/files/patch-ag45
-rw-r--r--audio/vat/files/patch-ah577
-rw-r--r--audio/vat/files/patch-ai20
-rw-r--r--audio/vat/files/patch-aj11
-rw-r--r--audio/vat/files/patch-ak21
-rw-r--r--audio/vat/files/patch-al10
-rw-r--r--audio/vat/files/patch-am22
-rw-r--r--audio/vat/files/patch-an45
-rw-r--r--audio/vat/files/patch-ao10
-rw-r--r--audio/vat/files/patch-ap11
16 files changed, 0 insertions, 1445 deletions
diff --git a/audio/vat/files/patch-aa b/audio/vat/files/patch-aa
deleted file mode 100644
index 574759971107..000000000000
--- a/audio/vat/files/patch-aa
+++ /dev/null
@@ -1,249 +0,0 @@
---- configure.in.tk.orig Thu May 16 01:06:05 1996
-+++ configure.in.tk Tue Sep 9 11:35:45 1997
-@@ -2,6 +2,7 @@
- dnl $Header: /home/ncvs/ports/mbone/vat/patches/patch-aa,v 1.3 1998/06/26 19:05:34 fenner Exp $ (LBL)
-
- AC_ARG_WITH(tcl, --with-tcl=path specify a pathname for tcl, d=$withval, d="")
-+tclposs="tcl8.3 tcl83 tcl"
- if test "$d" != "" ; then
- if test ! -d $d ; then
- echo "'$d' is not a directory"
-@@ -12,22 +13,22 @@
- echo "can't find tcl.h in $d/include"
- exit 1
- fi
-- places="$d/lib/libtcl7.5.so \
-- $d/lib/libtcl7.5.a \
-- $d/lib/libtcl.so \
-- $d/lib/libtcl.a"
- V_LIB_TCL=FAIL
-- for dir in $places; do
-- if test -r $dir ; then
-- V_LIB_TCL=$dir
-+ for p in $tclposs; do
-+ if test "`echo $d/lib/lib$p.so*`" != "$d/lib/lib$p.so*" ; then
-+ V_LIB_TCL="-L$d/lib -l$p"
-+ break
-+ fi
-+ if test -r $d/lib/lib$p.a ; then
-+ V_LIB_TCL="-L$d/lib -l$p"
- break
- fi
- done
-- if test $V_LIB_TCL = FAIL ; then
-+ if test "$V_LIB_TCL" = FAIL ; then
- echo "can't find libtcl.a in $d/lib"
- exit 1
- fi
-- places="$d/lib/tcl7.5 \
-+ places="$d/lib/tcl8.3 \
- $d/lib/tcl"
- V_LIBRARY_TCL=FAIL
- for dir in $places; do
-@@ -44,13 +45,14 @@
- AC_TEST_CPP([#include <tcl.h>], V_INCLUDE_TCL="", V_INCLUDE_TCL=FAIL)
- if test "$V_INCLUDE_TCL" = FAIL; then
- echo "checking for tcl.h"
-- places="$PWD/../tcl7.5 \
-- /usr/src/local/tcl7.5 \
-- /import/tcl/include/tcl7.5 \
-+ places="$PWD/../tcl8.3 \
-+ /usr/src/local/tcl8.3 \
-+ /import/tcl/include/tcl8.3 \
- $prefix/include \
- $x_includes/tk \
- $x_includes \
- /usr/local/include \
-+ /usr/local/include/tcl8.3 \
- /usr/contrib/include \
- /usr/include"
- for dir in $places; do
-@@ -64,7 +66,7 @@
- exit 1
- fi
- fi
-- AC_CHECK_LIB(tcl7.5, main, V_LIB_TCL="-ltcl7.5", V_LIB_TCL="FAIL")
-+ AC_CHECK_LIB(tcl8.3, main, V_LIB_TCL="-ltcl8.3", V_LIB_TCL="FAIL")
- if test "$V_LIB_TCL" = FAIL; then
- echo "checking for libtcl.a"
- places="\
-@@ -73,17 +75,22 @@
- /usr/contrib/lib \
- /usr/local/lib \
- /usr/lib \
-- $PWD/../tcl7.5 \
-- /usr/src/local/tcl7.5 \
-- /import/tcl/lib/tcl7.5 \
-+ $PWD/../tcl8.3 \
-+ /usr/src/local/tcl8.3 \
-+ /import/tcl/lib/tcl8.3 \
- "
- for dir in $places; do
-- if test -r $dir/libtcl7.5.so -o -r $dir/libtcl7.5.a; then
-- V_LIB_TCL="-L$dir -ltcl7.5"
-- break
-- fi
-- if test -r $dir/libtcl.so -o -r $dir/libtcl.a; then
-- V_LIB_TCL="-L$dir -ltcl"
-+ for p in $tclposs; do
-+ if test "`echo $dir/lib$p.so*`" != "$dir/lib$p.so*" ; then
-+ V_LIB_TCL="-L$dir -l$p"
-+ break
-+ fi
-+ if test -r $dir/lib$p.a ; then
-+ V_LIB_TCL="-L$dir -l$p"
-+ break
-+ fi
-+ done
-+ if test "$V_LIB_TCL" != FAIL; then
- break
- fi
- done
-@@ -98,15 +105,16 @@
- fi
- echo "checking for tcl/init.tcl"
- V_LIBRARY_TCL=FAIL
-- places="/usr/local/lib/tcl7.5 \
-- /usr/contrib/lib/tcl7.5 \
-- /usr/lib/tcl7.5 \
-- /usr/lib/tk/tcl7.5 \
-- /import/tcl/lib/tcl7.5 \
-- $prefix/lib/tcl7.5 \
-- $x_libraries/tcl7.5 \
-+ places="/usr/local/lib/tcl8.3 \
-+ /usr/contrib/lib/tcl8.3 \
-+ /usr/lib/tcl8.3 \
-+ /usr/lib/tk/tcl8.3 \
-+ /import/tcl/lib/tcl8.3 \
-+ $prefix/lib/tcl8.3 \
-+ $x_libraries/tcl8.3 \
- /usr/local/lib/tcl \
- /usr/lib/tcl \
-+ /usr/libdata/tcl \
- /usr/lib/tk/tcl \
- /import/tcl/lib/tcl \
- $prefix/lib/tcl \
-@@ -128,6 +136,7 @@
- AC_SUBST(V_LIBRARY_TCL)
-
- AC_ARG_WITH(tk, --with-tk=path specify a pathname for tk, d=$withval, d="")
-+tkposs="tk8.3 tk83 tk"
- if test "$d" != "" ; then
- if test ! -d $d ; then
- echo "'$d' is not a directory"
-@@ -138,22 +147,22 @@
- echo "can't find tk.h in $d/include"
- exit 1
- fi
-- places="$d/lib/libtk4.1.so \
-- $d/lib/libtk4.1.a \
-- $d/lib/libtk.so \
-- $d/lib/libtk.a"
- V_LIB_TK=FAIL
-- for dir in $places; do
-- if test -r $dir ; then
-- V_LIB_TK=$dir
-+ for p in $tkposs; do
-+ if test "`echo $d/lib/lib$p.so*`" != "$d/lib/lib$p.so*" ; then
-+ V_LIB_TK="-L$d/lib -l$p"
-+ break
-+ fi
-+ if test -r $d/lib/lib$p.a ; then
-+ V_LIB_TK="-L$d/lib -l$p"
- break
- fi
- done
-- if test $V_LIB_TK = FAIL ; then
-+ if test "$V_LIB_TK" = FAIL ; then
- echo "can't find libtk.a in $d/lib"
- exit 1
- fi
-- places="$d/lib/tk4.1 \
-+ places="$d/lib/tk8.3 \
- $d/lib/tk"
- V_LIBRARY_TK=FAIL
- for dir in $places; do
-@@ -174,14 +183,15 @@
- places="\
- $prefix/include \
- /usr/local/include \
-+ /usr/local/include/tk8.3 \
- /usr/contrib/include \
- /usr/include/tcl \
- /usr/include\
- $x_includes/tk \
- $x_includes \
-- $PWD/../tk4.1 \
-- /usr/src/local/tk4.1 \
-- /import/tcl/include/tk4.1 \
-+ $PWD/../tk8.3 \
-+ /usr/src/local/tk8.3 \
-+ /import/tcl/include/tk8.3 \
- "
- for dir in $places; do
- if test -r $dir/tk.h ; then
-@@ -194,7 +204,7 @@
- exit 1
- fi
- fi
-- AC_CHECK_LIB(tk4.1, main, V_LIB_TK="-ltk4.1", V_LIB_TK="FAIL")
-+ AC_CHECK_LIB(tk8.3, main, V_LIB_TK="-ltk8.3", V_LIB_TK="FAIL")
- if test "$V_LIB_TK" = FAIL; then
- echo "checking for libtk.a"
- places="/usr/local/lib \
-@@ -202,17 +212,22 @@
- /usr/lib \
- /usr/lib/tk \
- /import/tcl/lib \
-- $PWD/../tk4.1 \
-- /usr/src/local/tk4.1 \
-+ $PWD/../tk8.3 \
-+ /usr/src/local/tk8.3 \
- $prefix/lib \
- $x_libraries"
- for dir in $places; do
-- if test -r $dir/libtk4.1.so -o -r $dir/libtk4.1.a; then
-- V_LIB_TK="-L$dir -ltk4.1"
-- break
-- fi
-- if test -r $dir/libtk.so -o -r $dir/libtk.a; then
-- V_LIB_TK="-L$dir -ltk"
-+ for p in $tkposs; do
-+ if test "`echo $dir/lib$p.so*`" != "$dir/lib$p.so*" ; then
-+ V_LIB_TK="-L$dir -l$p"
-+ break
-+ fi
-+ if test -r $dir/lib$p.a ; then
-+ V_LIB_TK="-L$dir -l$p"
-+ break
-+ fi
-+ done
-+ if test "$V_LIB_TK" != FAIL; then
- break
- fi
- done
-@@ -227,15 +242,15 @@
- fi
- echo "checking for tk/tk.tcl"
- V_LIBRARY_TK=FAIL
-- places="/usr/local/lib/tk4.1 \
-- /usr/contrib/lib/tk4.1 \
-- /usr/lib/tk4.1 \
-- /usr/lib/tk/tk4.1 \
-- /import/tcl/lib/tk4.1 \
-- $prefix/lib/tk4.1 \
-- $x_libraries/tk4.1 \
-- $PWD/../tk4.1/library \
-- /usr/src/local/tk4.1/library \
-+ places="/usr/local/lib/tk8.3 \
-+ /usr/contrib/lib/tk8.3 \
-+ /usr/lib/tk8.3 \
-+ /usr/lib/tk/tk8.3 \
-+ /import/tcl/lib/tk8.3 \
-+ $prefix/lib/tk8.3 \
-+ $x_libraries/tk8.3 \
-+ $PWD/../tk8.3/library \
-+ /usr/src/local/tk8.3/library \
- /usr/local/lib/tk \
- /usr/lib/tk \
- /usr/lib/tk/tk \
diff --git a/audio/vat/files/patch-ab b/audio/vat/files/patch-ab
deleted file mode 100644
index 8424b66fc784..000000000000
--- a/audio/vat/files/patch-ab
+++ /dev/null
@@ -1,136 +0,0 @@
---- tkStripchart.c.orig Tue Sep 9 11:00:42 1997
-+++ tkStripchart.c Tue Sep 9 10:52:30 1997
-@@ -148,7 +148,7 @@
- int scrollrequired;
- int guarantee_draw;
- int grow_up;
-- XFontStruct *fontPtr; /* Information about text font, or NULL. */
-+ Tk_Font tkfont; /* Information about text font, or NULL. */
- XColor *textColorPtr; /* Color for drawing text. */
- GC textGC; /* GC for drawing text. */
- XColor *tickColorPtr; /* Color for drawing ticks. */
-@@ -257,7 +257,7 @@
- {TK_CONFIG_SYNONYM, "-fg", "stripcolor", 0,
- 0, 0, 0},
- {TK_CONFIG_FONT, "-font", "font", "Font",
-- DEF_STRIPCHART_FONT, Tk_Offset(Stripchart, fontPtr),
-+ DEF_STRIPCHART_FONT, Tk_Offset(Stripchart, tkfont),
- 0},
- {TK_CONFIG_BOOLEAN, "-guaranteedrawing", "guaranteedrawing",
- "Guaranteedrawing", DEF_GUARANTEE_DRAW,
-@@ -570,8 +570,8 @@
- if (StripchartPtr->value != NULL)
- free(StripchartPtr->value);
-
-- if (StripchartPtr->fontPtr != NULL)
-- Tk_FreeFontStruct(StripchartPtr->fontPtr);
-+ if (StripchartPtr->tkfont != NULL)
-+ Tk_FreeFont(StripchartPtr->tkfont);
-
- if (StripchartPtr->textColorPtr != NULL)
- Tk_FreeColor(StripchartPtr->textColorPtr);
-@@ -631,7 +631,7 @@
-
- Tk_SetBackgroundFromBorder(StripchartPtr->tkwin, StripchartPtr->border);
-
-- gcValues.font = StripchartPtr->fontPtr->fid;
-+ gcValues.font = Tk_FontId(StripchartPtr->tkfont);
- gcValues.foreground = StripchartPtr->textColorPtr->pixel;
- newGC = Tk_GetGC(StripchartPtr->tkwin, GCForeground|GCFont, &gcValues);
- if (StripchartPtr->textGC != None && StripchartPtr->tkwin) {
-@@ -692,8 +692,11 @@
- {
- int tt = hasatitle(StripchartPtr);
- int bd = StripchartPtr->borderWidth;
-- int lineHeight = StripchartPtr->fontPtr->ascent +
-- StripchartPtr->fontPtr->descent;
-+ Tk_FontMetrics fm;
-+ int lineHeight;
-+
-+ Tk_GetFontMetrics(StripchartPtr->tkfont, &fm);
-+ lineHeight = fm.ascent + fm.descent;
-
- Tk_GeometryRequest(StripchartPtr->tkwin,
- 2 * (bd + PADDING) + StripchartPtr->num_strips *
-@@ -726,11 +729,13 @@
- /*
- * Variable declarations used in the title drawing routines
- */
-- XFontStruct *fp = StripchartPtr->fontPtr;
-- XCharStruct bbox;
-- int x, dummy;
-- int lineHeight = StripchartPtr->fontPtr->ascent +
-- StripchartPtr->fontPtr->descent;
-+ Tk_Font tkf = StripchartPtr->tkfont;
-+ int x;
-+ Tk_FontMetrics fm;
-+ int lineHeight;
-+
-+ Tk_GetFontMetrics(tkf, &fm);
-+ lineHeight = fm.ascent + fm.descent;
-
- StripchartPtr->displaybits &= ~REDRAW_PENDING;
- if ((StripchartPtr->tkwin == NULL) || !Tk_IsMapped(tkwin))
-@@ -747,18 +752,17 @@
- * space. Otherwise left justified and clipped on the right.
- */
- if (tt && StripchartPtr->displaybits & DISPLAY_TITLE) {
-- XTextExtents(fp, StripchartPtr->title,
-- strlen(StripchartPtr->title),
-- &dummy, &dummy, &dummy, &bbox);
-- if (bbox.lbearing + bbox.rbearing < Tk_Width(tkwin) - 2 * bd)
-- x = (Tk_Width(tkwin) - bbox.lbearing - bbox.rbearing)/2;
-+ int width = Tk_TextWidth(tkf, StripchartPtr->title,
-+ strlen(StripchartPtr->title));
-+ if (width < Tk_Width(tkwin) - 2 * bd)
-+ x = (Tk_Width(tkwin) - width)/2;
- else
- x = bd + PADDING;
-
- XClearArea(Tk_Display(tkwin), Tk_WindowId(tkwin), bd, bd,
- Tk_Width(tkwin) - 2 * bd, lineHeight + PADDING, False);
- XDrawString(Tk_Display(tkwin), Tk_WindowId(tkwin),
-- StripchartPtr->textGC, x, fp->max_bounds.ascent + bd,
-+ StripchartPtr->textGC, x, fm.ascent + bd, /*XXX no max_bounds */
- StripchartPtr->title, strlen(StripchartPtr->title));
- }
- /*
-@@ -1057,7 +1061,8 @@
- DrawStripi(Stripchart* SPtr, int i)
- {
- Tk_Window tkwin = SPtr->tkwin;
-- int lineHeight = SPtr->fontPtr->ascent + SPtr->fontPtr->descent;
-+ Tk_FontMetrics fm;
-+ int lineHeight;
- int x = SPtr->borderWidth + PADDING + (i - 1) * SPtr->strip_width;
- int y = SPtr->borderWidth + PADDING +
- hasatitle(SPtr) * (lineHeight + PADDING);
-@@ -1066,6 +1071,9 @@
- double maxv = SPtr->max_value;
- double minv = SPtr->min_value;
-
-+ Tk_GetFontMetrics(SPtr->tkfont, &fm);
-+ lineHeight = fm.ascent + fm.descent;
-+
- if (i < 1 || i > SPtr->num_strips)
- return;
-
-@@ -1136,7 +1144,8 @@
- ScrollStrips(Stripchart* SPtr)
- {
- Tk_Window tkwin = SPtr->tkwin;
-- int lineHeight = SPtr->fontPtr->ascent + SPtr->fontPtr->descent;
-+ Tk_FontMetrics fm;
-+ int lineHeight;
- int src_x = SPtr->borderWidth + PADDING + SPtr->strip_width;
- int src_y = SPtr->borderWidth + PADDING +
- hasatitle(SPtr) * (lineHeight + PADDING);
-@@ -1144,6 +1153,8 @@
- int dest_y = src_y;
- int w = (SPtr->num_strips - 1) * SPtr->strip_width;
- int h = SPtr->max_height;
-+
-+ Tk_GetFontMetrics(SPtr->tkfont, &fm);
-
- XCopyArea(Tk_Display(tkwin), Tk_WindowId(tkwin), Tk_WindowId(tkwin),
- Tk_GetGC(tkwin, 0, NULL), src_x, src_y, w, h, dest_x, dest_y);
diff --git a/audio/vat/files/patch-ac b/audio/vat/files/patch-ac
deleted file mode 100644
index 42144397d299..000000000000
--- a/audio/vat/files/patch-ac
+++ /dev/null
@@ -1,11 +0,0 @@
---- main.cc.orig Tue Sep 9 11:17:10 1997
-+++ main.cc Tue Sep 9 11:17:31 1997
-@@ -162,7 +162,7 @@
- else {
- Tk_Window tk = t.tkmain();
- Tk_Uid uid = Tk_GetUid((char*)argv[1]);
-- XFontStruct* p = Tk_GetFontStruct(t.interp(), tk, uid);
-+ Tk_Font p = Tk_GetFont(t.interp(), tk, uid);
- t.result(p != 0 ? "1" : "0");
- }
- return (TCL_OK);
diff --git a/audio/vat/files/patch-ad b/audio/vat/files/patch-ad
deleted file mode 100644
index 8577e53a9883..000000000000
--- a/audio/vat/files/patch-ad
+++ /dev/null
@@ -1,70 +0,0 @@
---- sitebox.cc.orig Tue Sep 9 11:24:41 1997
-+++ sitebox.cc Tue Sep 9 11:24:43 1997
-@@ -112,7 +112,7 @@
- static Drawable pixmap_;
- static int pixw_;
- static int pixh_;
-- static XFontStruct* fs_; /* font metrics */
-+ static Tk_Font fs_; /* font metrics */
- };
-
- class SiteBox : public TkWidget, public IdleCallback {
-@@ -160,7 +160,7 @@
- GC Site::copy_gc_;
- GC Site::fg_[4];
- GC Site::bg_[4];
--XFontStruct* Site::fs_;
-+Tk_Font Site::fs_;
- XColor* Site::fc_;
- XColor* Site::bc_;
- XColor* Site::ac_;
-@@ -190,15 +190,16 @@
- sitebox_(sb)
- {
- Tcl& tcl = Tcl::instance();
-+ Tk_FontMetrics fm;
- if (fs_ == 0) {
- const char* font = tcl.attr("siteFont");
-- fs_ = Tk_GetFontStruct(tcl.interp(), tk_, (char*)font);
-+ fs_ = Tk_GetFont(tcl.interp(), tk_, (char*)font);
- if (fs_ == 0) {
- fprintf(stderr,
- "vat: couldn't find font: %s\n", font);
-- fs_ = Tk_GetFontStruct(tcl.interp(), tk_, "screen");
-+ fs_ = Tk_GetFont(tcl.interp(), tk_, "screen");
- if (fs_ == 0)
-- fs_ = Tk_GetFontStruct(tcl.interp(), tk_,
-+ fs_ = Tk_GetFont(tcl.interp(), tk_,
- "fixed");
- if (fs_ == 0) {
- fprintf(stderr,
-@@ -220,8 +221,9 @@
-
- copy_gc_ = sitebox_.lookup_gc(0, 0, 0);
- }
-- descent_ = fs_->descent;
-- ascent_ = fs_->ascent;
-+ Tk_GetFontMetrics(fs_, &fm);
-+ descent_ = fm.descent;
-+ ascent_ = fm.ascent;
- major_ = ascent_;
- minor_ = major_ / 2;
- }
-@@ -292,7 +294,7 @@
- */
- inline int Site::textwidth(const char* s)
- {
-- return (XTextWidth(fs_, s, strlen(s)));
-+ return (Tk_TextWidth(fs_, s, strlen(s)));
- }
-
- inline void Site::square(Display* dpy, Drawable window, GC gc,
-@@ -450,7 +452,7 @@
- free_gc(bg_[0]);
- free_gc(bg_[1]);
- }
-- Font fid = fs_->fid;
-+ Font fid = Tk_FontId(fs_);
- fg_[0] = raw_gc(fid, fc_, bc_, pixmap_);
- fg_[2] = raw_gc(fid, dc_, bc_, pixmap_);
- bg_[0] = raw_gc(fid, bc_, bc_, pixmap_);
diff --git a/audio/vat/files/patch-ae b/audio/vat/files/patch-ae
deleted file mode 100644
index 6ac2e51801f1..000000000000
--- a/audio/vat/files/patch-ae
+++ /dev/null
@@ -1,79 +0,0 @@
---- Tcl.h.orig Sat Mar 16 13:14:34 1996
-+++ Tcl.h Tue Dec 17 14:39:45 1996
-@@ -53,7 +53,8 @@
- inline int dark() const { return (tcl_ == 0); }
- inline Tcl_Interp* interp() const { return (tcl_); }
- inline char* result() const { return (tcl_->result); }
-- inline void result(const char* p) { tcl_->result = (char*)p; }
-+ inline void result(const char* p, Tcl_FreeProc* freeProc = TCL_STATIC)
-+ { Tcl_SetResult(tcl_, (char *)p, freeProc); }
- void resultf(const char* fmt, ...);
- inline void CreateCommand(const char* cmd, Tcl_CmdProc* cproc,
- ClientData cd = 0,
---- source.cc.orig Thu Apr 4 07:05:45 1996
-+++ source.cc Tue Dec 17 14:38:44 1996
-@@ -251,8 +251,7 @@
- return (TCL_OK);
- }
- if (strcmp(argv[1], "addr") == 0) {
-- strcpy(wrk, InetNtoa(addr_));
-- tcl.result(wrk);
-+ tcl.result(InetNtoa(addr_), TCL_DYNAMIC);
- return (TCL_OK);
- }
- if (strcmp(argv[1], "srcid") == 0) {
---- Tcl.cc.orig Tue Apr 2 20:53:27 1996
-+++ Tcl.cc Tue Dec 17 15:45:30 1996
-@@ -65,6 +65,7 @@
- {
- instance_.tcl_ = tcl;
- instance_.application_ = application;
-+ Tcl_Init(tcl);
- }
-
- void Tcl::evalc(const char* s)
-@@ -162,6 +163,8 @@
- Tcl& tcl = Tcl::instance();
- if (!tcl.dark())
- tcl.DeleteCommand(name_);
-+ if (name_ != 0)
-+ delete name_;
- TclObject** p;
- for (p = &all_; *p != this; p = &(*p)->next_)
- ;
-@@ -197,8 +200,9 @@
- void TclObject::setproc(const char* s)
- {
- Tcl& tcl = Tcl::instance();
-- if (name_ != 0 && !tcl.dark()) {
-- tcl.DeleteCommand(name_);
-+ if (name_ != 0) {
-+ if (!tcl.dark())
-+ tcl.DeleteCommand(name_);
- delete name_;
- }
- int n = strlen(s);
---- sitebox.cc.orig 1997/01/07 22:48:27
-+++ sitebox.cc 1997/01/07 23:27:35
-@@ -230,6 +230,10 @@
-
- Site::~Site()
- {
-+ if (text_)
-+ delete text_;
-+ if (tag_)
-+ delete tag_;
- }
-
- int Site::command(int argc, const char*const* argv)
-@@ -638,8 +642,8 @@
- need_sort_ = 0;
-
- Tcl& tcl = Tcl::instance();
-- Tk_Uid fg = mono()? "black" : (char*)tcl.attr("foreground");
-- Tk_Uid bg = mono()? "white" : (char*)tcl.attr("background");
-+ Tk_Uid fg = mono()? (char*)"black" : (char*)tcl.attr("foreground");
-+ Tk_Uid bg = mono()? (char*)"white" : (char*)tcl.attr("background");
- fg_ = lookup_gc(0, fg, bg);
- bg_ = lookup_gc(0, bg, bg);
- }
diff --git a/audio/vat/files/patch-af b/audio/vat/files/patch-af
deleted file mode 100644
index 85e74ea80447..000000000000
--- a/audio/vat/files/patch-af
+++ /dev/null
@@ -1,128 +0,0 @@
---- net.cc.orig Thu Mar 21 03:49:18 1996
-+++ net.cc Sun Dec 3 19:04:01 2006
-@@ -163,46 +163,49 @@
- {
- int cc = ::send(fd, (char*)buf, len, 0);
- if (cc < 0) {
-- switch (errno) {
-+ /*
-+ * Due to a bug in kern/uipc_socket.c, on several
-+ * systems, datagram sockets incorrectly persist
-+ * in an error state on receipt of any ICMP
-+ * error. This causes unicast connection
-+ * rendezvous problems, and worse, multicast
-+ * transmission problems because several systems
-+ * incorrectly send port unreachables for
-+ * multicast destinations. Our work around
-+ * is to call getsockopt(..., SO_ERROR, ...)
-+ * which resets so->so_error.
-+ *
-+ * This bug originated at CSRG in Berkeley
-+ * and was present in the BSD Reno networking
-+ * code release. It has since been fixed
-+ * in OSF-3.x. It is know to remain
-+ * in 4.4BSD and AIX-4.1.3.
-+ *
-+ * A fix is to change the following lines from
-+ * kern/uipc_socket.c:
-+ *
-+ * if (so_serror)
-+ * snderr(so->so_error);
-+ *
-+ * to:
-+ *
-+ * if (so->so_error) {
-+ * error = so->so_error;
-+ * so->so_error = 0;
-+ * splx(s);
-+ * goto release;
-+ * }
-+ *
-+ */
-+ int err, savederrno;
-+ socklen_t errlen = sizeof(err);
-+
-+ savederrno = errno;
-+ getsockopt(fd, SOL_SOCKET, SO_ERROR, &err,
-+ &errlen);
-+ switch (savederrno) {
- case ECONNREFUSED:
- /* no one listening at some site - ignore */
--#if defined(__osf__) || defined(_AIX)
-- /*
-- * Due to a bug in kern/uipc_socket.c, on several
-- * systems, datagram sockets incorrectly persist
-- * in an error state on receipt of an ICMP
-- * port-unreachable. This causes unicast connection
-- * rendezvous problems, and worse, multicast
-- * transmission problems because several systems
-- * incorrectly send port unreachables for
-- * multicast destinations. Our work around
-- * is to simply close and reopen the socket
-- * (by calling reset() below).
-- *
-- * This bug originated at CSRG in Berkeley
-- * and was present in the BSD Reno networking
-- * code release. It has since been fixed
-- * in 4.4BSD and OSF-3.x. It is know to remain
-- * in AIX-4.1.3.
-- *
-- * A fix is to change the following lines from
-- * kern/uipc_socket.c:
-- *
-- * if (so_serror)
-- * snderr(so->so_error);
-- *
-- * to:
-- *
-- * if (so->so_error) {
-- * error = so->so_error;
-- * so->so_error = 0;
-- * splx(s);
-- * goto release;
-- * }
-- *
-- */
-- reset();
--#endif
- break;
-
- case ENETUNREACH:
-@@ -217,7 +220,7 @@
- * icmp unreachable, so we should be able to
- * send now.
- */
-- (void)::send(ssock_, (char*)buf, len, 0);
-+ (void)::send(fd, (char*)buf, len, 0);
- break;
-
- default:
-@@ -264,12 +267,15 @@
- }
- int cc = ::sendmsg(ssock_, (msghdr*)&mh, 0);
- if (cc < 0) {
-- switch (errno) {
-+ int err, savederrno;
-+ socklen_t errlen = sizeof(err);
-+
-+ savederrno = errno;
-+ getsockopt(ssock_, SOL_SOCKET, SO_ERROR, &err,
-+ &errlen);
-+ switch (savederrno) {
- case ECONNREFUSED:
- /* no one listening at some site - ignore */
--#if defined(__osf__) || defined(_AIX)
-- reset();
--#endif
- break;
-
- case ENETUNREACH:
-@@ -297,7 +303,7 @@
- int Network::dorecv(u_char* buf, int len, u_int32_t& from, int fd)
- {
- sockaddr_in sfrom;
-- int fromlen = sizeof(sfrom);
-+ socklen_t fromlen = sizeof(sfrom);
- int cc = ::recvfrom(fd, (char*)buf, len, 0,
- (sockaddr*)&sfrom, &fromlen);
- if (cc < 0) {
diff --git a/audio/vat/files/patch-ag b/audio/vat/files/patch-ag
deleted file mode 100644
index c4735e351557..000000000000
--- a/audio/vat/files/patch-ag
+++ /dev/null
@@ -1,45 +0,0 @@
---- ui-resource.tcl.orig Tue Mar 12 07:32:56 1996
-+++ ui-resource.tcl Thu Feb 19 10:48:04 1998
-@@ -111,32 +111,24 @@
- #
- option add *tearOff 0
-
-- #
-- # Make the color scheme a little darker than the default gray.
-- # Go through all the palette resources and raise the option data
-- # base priority from widgetDefault to 61 so that user's X resources
-- # won't override these.
-- #
-- tk_setPalette gray80
-- foreach option [array names tkPalette] {
-- option add *$option $tkPalette($option) 61
-- }
--
- option add *highlightThickness 0
-
- option add *Radiobutton.relief flat startupFile
- option add *Checkbutton.anchor w startupFile
- option add *Radiobutton.anchor w startupFile
- option add *Radiobutton.relief flat startupFile
-- option add *Scale.sliderForeground gray66 startupFile
-- option add *Scale.activeForeground gray80 startupFile
-- option add *Scale.background gray70 startupFile
-
-- # vat widgets
-- option add Vat.disabledColor gray50 startupFile
-- option add Vat.highlightColor gray95 startupFile
-+ # add color defaults for vat widgets - where possible, use
-+ # the platform specific values compiled into tk widgets
-+ scale .junk
-+ option add *foreground [.junk cget -foreground] widgetDefault
-+ option add *background [.junk cget -background] widgetDefault
-+ option add *activeBackground [.junk cget -activebackground] widgetDefault
-+ destroy .junk
-+
-+ option add *highlightColor white widgetDefault
- option add Vat.infoHighlightColor LightYellow2 startupFile
-- option add *VatVU.foreground black startupFile
-+ option add Vat.disabledColor gray50 startupFile
- option add *VatVU.peak gray50 startupFile
- option add *VatVU.hot firebrick1 startupFile
- option add *VatVU.hotLevel 90 startupFile
diff --git a/audio/vat/files/patch-ah b/audio/vat/files/patch-ah
deleted file mode 100644
index 596513307334..000000000000
--- a/audio/vat/files/patch-ah
+++ /dev/null
@@ -1,577 +0,0 @@
---- audio-voxware.cc.orig Fri Apr 26 05:22:37 1996
-+++ audio-voxware.cc Sat May 10 00:15:51 2003
-@@ -1,4 +1,6 @@
- /*
-+ * Modifications (C) 1997-1998 by Luigi Rizzo and others.
-+ *
- * Copyright (c) 1991-1993 Regents of the University of California.
- * All rights reserved.
- *
-@@ -33,31 +35,43 @@
- static const char rcsid[] =
- "@(#) $Header: audio-voxware.cc,v 1.10 96/04/26 05:22:05 van Exp $ (LBL)";
-
--#include <string.h>
--#include <sys/fcntl.h>
--#include <errno.h>
--#if defined(sco) || defined(__bsdi__)
--#include <sys/socket.h>
--#endif
--#if defined(__FreeBSD__)
--#include <sys/types.h>
--#include <sys/uio.h>
--#include <unistd.h>
--#include <machine/soundcard.h>
-+
-+/*
-+ * Full Duplex audio module for the new sound driver and full duplex
-+ * cards. Luigi Rizzo, from original sources supplied by Amancio Hasty.
-+ *
-+ * This includes some enhancements:
-+ * - the audio device to use can be in the AUDIODEV env. variable.
-+ * It can be either a unit number or a full pathname;
-+ * - use whatever format is available from the card (included split
-+ * format e.g. for the sb16);
-+ * - limit the maximum size of the playout queue to approx 4 frames;
-+ * this is necessary if the write channel is slower than expected;
-+ * the fix is based on two new ioctls, AIOGCAP and AIONWRITE,
-+ * but the code should compile with the old driver as well.
-+ */
-+
-+#if !defined(__FreeBSD__) || (__FreeBSD__ < 4)
-+#include <osfcn.h>
- #else
--#include <sys/soundcard.h>
-+#include <fcntl.h>
- #endif
-+#include <sys/soundcard.h>
- #include "audio.h"
-+#include "mulaw.h"
- #include "Tcl.h"
-
- #define ULAW_ZERO 0x7f
-+
-+/* for use in the Voxware driver */
- #define ABUFLOG2 8
--#define ABUFLEN (1 << ABUFLOG2)
- #define NFRAG 5
-
--class VoxWareAudio : public Audio {
-+extern const u_char lintomulawX[];
-+
-+class VoxWare : public Audio {
- public:
-- VoxWareAudio();
-+ VoxWare();
- virtual int FrameReady();
- virtual u_char* Read();
- virtual void Write(u_char *);
-@@ -66,163 +80,415 @@
- virtual void OutputPort(int);
- virtual void InputPort(int);
- virtual void Obtain();
-+ virtual void Release();
- virtual void RMute();
- virtual void RUnmute();
- virtual int HalfDuplex() const;
- protected:
-+ int ext_fd; /* source for external file */
-
-- u_char* readptr;
-- u_char* readbufend;
- u_char* readbuf;
-+ u_short *s16_buf;
-+
-+ int play_fmt ;
-+ int is_half_duplex ;
-+
-+ // new sound driver
-+ int rec_fmt ; /* the sb16 has split format... */
-+ snd_capabilities soundcaps;
-
-- u_char* ubufptr;
-- u_char* ubufend;
-- u_char* ubuf;
--
-- u_char* writeptr;
-- u_char* writebufend;
-- u_char* writebuf;
- };
-
--static class VoxWareAudioMatcher : public Matcher {
-+static class VoxWareMatcher : public Matcher {
- public:
-- VoxWareAudioMatcher() : Matcher("audio") {}
-+ VoxWareMatcher() : Matcher("audio") {}
- TclObject* match(const char* fmt) {
- if (strcmp(fmt, "voxware") == 0)
-- return (new VoxWareAudio);
-- else
-+ return (new VoxWare);
- return (0);
- }
--} voxware_audio_matcher;
-+} linux_audio_matcher;
-
--VoxWareAudio::VoxWareAudio()
-+VoxWare::VoxWare()
- {
-- readbuf = new u_char[ABUFLEN];
-- readptr = readbufend = readbuf + ABUFLEN;
-+ readbuf = new u_char[blksize];
-+ s16_buf = new u_short[blksize];
-
-- writeptr = writebuf = new u_char[ABUFLEN];
-- writebufend = writebuf + ABUFLEN;
-+ memset(readbuf, ULAW_ZERO, blksize);
-
-- ubufptr = ubuf = new u_char[blksize];
-- ubufend = ubuf + blksize;
-- memset(ubuf, ULAW_ZERO, blksize);
-+ ext_fd = -1 ; /* no external audio */
-+ iports = 4; /* number of input ports */
- }
-
--int VoxWareAudio::HalfDuplex() const
-+void
-+VoxWare::Obtain()
- {
-- /*XXX change this if full duplex audio device available*/
-- return 1;
--}
-+ char *thedev;
-+ char buf[64];
-+ int d = -1;
-
--void VoxWareAudio::Obtain()
--{
- if (HaveAudio())
- abort();
--
-- fd = open("/dev/audio", O_RDWR|O_NDELAY);
-+ is_half_duplex = 0 ;
-+ /*
-+ * variable AUDIODEV has the name of the audio device.
-+ * With the new audio driver, the main device can also control
-+ * the mixer, so there is no need to carry two descriptors around.
-+ */
-+ thedev=getenv("AUDIODEV");
-+ if (thedev==NULL)
-+ thedev="/dev/audio";
-+ else if ( thedev[0] >= '0' && thedev[0] <= '9' ) {
-+ d = atoi(thedev);
-+ sprintf(buf,"/dev/audio%d", d);
-+ thedev = buf ;
-+ }
-+ fd = open(thedev, O_RDWR );
- if (fd >= 0) {
-- int on = 1;
-- ioctl(fd, FIONBIO, &on);
-+ int i = -1 ;
-+ u_long fmt = 0 ;
-+ int rate = 8000 ;
-+
-+ snd_chan_param pa;
-+ struct snd_size sz;
-+ i = ioctl(fd, AIOGCAP, &soundcaps);
-+ fmt = soundcaps.formats ; /* can be invalid, check later */
-+
-+ play_fmt = AFMT_MU_LAW ;
-+ rec_fmt = AFMT_MU_LAW ;
-+
-+ if (i == -1 ) { /* setup code for old voxware driver */
-+ i = ioctl(fd, SNDCTL_DSP_GETFMTS, &fmt);
-+ fmt &= AFMT_MU_LAW ; /* only use mu-law */
-+ fmt |= AFMT_FULLDUPLEX ;
-+ if ( i < 0 ) { /* even voxware driver failed, try with pcaudio */
-+ fmt = AFMT_MU_LAW | AFMT_WEIRD ;
-+ }
-+ }
-+ switch (soundcaps.formats & (AFMT_FULLDUPLEX | AFMT_WEIRD)) {
-+ case AFMT_FULLDUPLEX :
-+ /*
-+ * this entry for cards with decent full duplex. Use s16
-+ * preferably (some are broken in ulaw) or ulaw or u8 otherwise.
-+ */
-+ if (fmt & AFMT_S16_LE)
-+ play_fmt = rec_fmt = AFMT_S16_LE ;
-+ else if (soundcaps.formats & AFMT_MU_LAW)
-+ play_fmt = rec_fmt = AFMT_MU_LAW ;
-+ else if (soundcaps.formats & AFMT_U8)
-+ play_fmt = rec_fmt = AFMT_U8 ;
-+ else {
-+ printf("sorry, no supported formats\n");
-+ close(fd);
-+ fd = -1 ;
-+ return;
-+ }
-+ break ;
-+ case AFMT_FULLDUPLEX | AFMT_WEIRD :
-+ /* this is the sb16... */
-+ if (fmt & AFMT_S16_LE) {
-+ play_fmt = AFMT_U8 ;
-+ rec_fmt = AFMT_S16_LE;
-+ } else {
-+ printf("sorry, no supported formats\n");
-+ close(fd);
-+ fd = -1 ;
-+ return;
-+ }
-+ break ;
-+ default :
-+ printf("sorry don't know how to deal with this card\n");
-+ close (fd);
-+ fd = -1;
-+ return;
-+ }
-
-- int frag = (NFRAG << 16) | ABUFLOG2;
-- ioctl(fd, SNDCTL_DSP_SETFRAGMENT, &frag);
--#ifdef fullduplex
-+ pa.play_format = play_fmt ;
-+ pa.rec_format = rec_fmt ;
-+ pa.play_rate = pa.rec_rate = rate ;
-+ ioctl(fd, AIOSFMT, &pa); /* if this fails, also AIOSSIZE will.. */
-+ sz.play_size = (play_fmt == AFMT_S16_LE) ? 2*blksize : blksize;
-+ sz.rec_size = (rec_fmt == AFMT_S16_LE) ? 2*blksize : blksize;
-+ i = ioctl(fd, AIOSSIZE, &sz);
-+
-+ /*
-+ * Set the line input level to 0 to avoid loopback if the mic
-+ * is connected to the line-in port (e.g. through an echo
-+ * canceller).
-+ */
-+ int v = 0;
-+ (void)ioctl(fd, MIXER_WRITE(SOUND_MIXER_LINE), &v);
-+ // restore hardware settings in case some other vat changed them
-+ InputPort(iport);
-+ SetRGain(rgain);
-+ SetPGain(pgain);
-+
-+ if ( i < 0 ) { // if AIOSSIZE fails, maybe this is a Voxware driver
-+ ioctl(fd, SNDCTL_DSP_SPEED, &rate);
-+ ioctl(fd, SNDCTL_DSP_SETFMT, &play_fmt); // same for play/rec
-+ d = (play_fmt == AFMT_S16_LE) ? 2*blksize : blksize;
-+ ioctl(fd, SNDCTL_DSP_SETBLKSIZE, &d);
-+ read(fd, &i, 1); /* dummy read to start read engine */
-+ }
- Audio::Obtain();
--#else
-- notify();
--#endif
-+ } else {
-+ fprintf(stderr, "failed to open rw...\n");
-+ fd = open(thedev, O_WRONLY );
-+ fprintf(stderr, "open wronly returns %d\n", fd);
-+ is_half_duplex = 1 ;
-+ play_fmt = rec_fmt = AFMT_MU_LAW ;
-+ notify(); /* XXX */
- }
- }
-
--void VoxWareAudio::Write(u_char *cp)
-+/*
-+ * note: HalfDuplex() uses a modified function of the new driver,
-+ * which will return AFMT_FULLDUPLEX set in SNDCTL_DSP_GETFMTS
-+ * for full-duplex devices. In the old driver this was 0 so
-+ * the default is to use half-duplex for them. Note also that I have
-+ * not tested half-duplex operation.
-+ */
-+int
-+VoxWare::HalfDuplex() const
- {
-- if (HaveAudio() && (rmute & 1) != 0) {
-- register u_char *cpend = cp + blksize;
-- register u_char *wbuf = writeptr;
-- register u_char *wend = writebufend;
-- for ( ; cp < cpend; cp += 4) {
-- wbuf[0] = cp[0];
-- wbuf[1] = cp[1];
-- wbuf[2] = cp[2];
-- wbuf[3] = cp[3];
-- wbuf += 4;
-- if (wbuf >= wend) {
-- wbuf = writebuf;
-- if (write(fd, (char*)wbuf, ABUFLEN) != ABUFLEN)
-- perror("aud write");
-- }
-- }
-- writeptr = wbuf;
-+ int i, probed_duplex = 0;
-+
-+ /* newpcm style */
-+#ifdef SNDCTL_DSP_GETCAPS
-+ ioctl(fd, SNDCTL_DSP_GETCAPS, &i);
-+ probed_duplex |= (i & DSP_CAP_DUPLEX);
-+#endif /* SNDCTL_DSP_GETCAPS */
-+
-+ /* pcm style */
-+#ifdef SNDCTL_DSP_GETFMTS
-+ ioctl(fd, SNDCTL_DSP_GETFMTS, &i);
-+ probed_duplex |= (i & AFMT_FULLDUPLEX);
-+#endif /* SNDCTL_DSP_GETFMTS */
-+
-+ if (is_half_duplex || (probed_duplex == 0)) {
-+ fprintf(stderr, "HalfDuplex returns 1\n");
-+ return 1 ;
- }
-+
-+ return 0;
- }
-
--int VoxWareAudio::FrameReady()
-+void VoxWare::Release()
- {
-- if ((rmute & 1) == 0) {
-- register u_char* cp = ubufptr;
-- register u_char* cpend = ubufend;
-- register u_char* rbuf = readptr;
-- register u_char* rend = readbufend;
--
-- for ( ; cp < cpend; cp += 4) {
-- if (rbuf >= rend) {
-- rbuf = readbuf;
-- int cc = read(fd, (char*)rbuf, ABUFLEN);
-- if (cc <= 0) {
-- ubufptr = cp;
-- readbufend = rbuf;
-- if (cc == -1 && errno != EAGAIN) {
-- Release();
-- Obtain();
-- }
-- return (0);
-+ if (HaveAudio()) {
-+ Audio::Release();
- }
-- readbufend = rend = rbuf + cc;
- }
-- cp[0] = rbuf[0];
-- cp[1] = rbuf[1];
-- cp[2] = rbuf[2];
-- cp[3] = rbuf[3];
-- rbuf += 4;
-+
-+void VoxWare::Write(u_char *cp)
-+{
-+ int i = blksize, l;
-+ if (play_fmt == AFMT_S16_LE) {
-+ for (i=0; i< blksize; i++)
-+ s16_buf[i] = mulawtolin[cp[i]] ;
-+ cp = (u_char *)s16_buf;
-+ i = 2 *blksize ;
-+ } else if (play_fmt == AFMT_S8) {
-+ for (i=0; i< blksize; i++) {
-+ int x = mulawtolin[cp[i]] ;
-+ x = (x >> 8 ) & 0xff;
-+ cp[i] = (u_char)x ;
-+ }
-+ i = blksize ;
-+ } else if (play_fmt == AFMT_U8) {
-+ for (i=0; i< blksize; i++) {
-+ int x = mulawtolin[cp[i]] ;
-+ /*
-+ * when translating to 8-bit formats, it would be useful to
-+ * implement AGC to avoid loss of resolution in the conversion.
-+ * This code is still incomplete...
-+ */
-+#if 0 /* AGC -- still not complete... */
-+ static int peak = 0;
-+ if (x < 0) x = -x ;
-+ if (x > peak) peak = ( peak*16 + x - peak ) / 16 ;
-+ else peak = ( peak*8192 + x - peak ) / 8192 ;
-+ if (peak < 128) peak = 128 ;
-+ /* at this point peak is in the range 128..32k
-+ * samples can be scaled and clipped consequently.
-+ */
-+ x = x * 32768/peak ;
-+ if (x > 32767) x = 32767;
-+ else if (x < -32768) x = -32768;
-+#endif
-+ x = (x >> 8 ) & 0xff;
-+ x = (x ^ 0x80) & 0xff ;
-+ cp[i] = (u_char)x ;
-+ }
-+ i = blksize ;
-+ }
-+#if 0
-+ // this code is meant to keep the queue short.
-+ int r, queued;
-+ r = ioctl(fd, AIONWRITE, &queued);
-+ queued = soundcaps.bufsize - queued ;
-+ if (play_fmt == AFMT_S16_LE) {
-+ if (queued > 8*blksize)
-+ i -= 8 ;
-+ } else {
-+ if (queued > 4*blksize)
-+ i -= 4 ;
- }
-- readptr = rbuf;
-+#endif
-+ for ( ; i > 0 ; i -= l) {
-+ l = write(fd, cp, i);
-+ cp += l;
- }
-- return (1);
- }
-
--u_char* VoxWareAudio::Read()
-+u_char* VoxWare::Read()
- {
-- u_char* cp = ubuf;
-- ubufptr = cp;
-- return (cp);
-+ u_char* cp;
-+ int l=0, l0 = blksize, i = blksize;
-+
-+ cp = readbuf;
-+
-+ if (rec_fmt == AFMT_S16_LE) {
-+ cp = (u_char *)s16_buf;
-+ l0 = i = 2 *blksize ;
-+ }
-+ for ( ; i > 0 ; i -= l ) {
-+ l = read(fd, cp, i);
-+ if (l<0) break;
-+ cp += l ;
-+ }
-+ if (rec_fmt == AFMT_S16_LE) {
-+ for (i=0; i< blksize; i++) {
-+#if 1 /* remove DC component... */
-+ static int smean = 0 ; /* smoothed mean to remove DC */
-+ int dif = ((short) s16_buf[i]) - (smean >> 13) ;
-+ smean += dif ;
-+ readbuf[i] = lintomulawX[ dif & 0x1ffff ] ;
-+#else
-+ readbuf[i] = lintomulaw[ s16_buf[i] ] ;
-+#endif
-+ }
-+ }
-+ else if (rec_fmt == AFMT_S8) {
-+ for (i=0; i< blksize; i++)
-+ readbuf[i] = lintomulaw[ readbuf[i]<<8 ] ;
-+ }
-+ else if (rec_fmt == AFMT_U8) {
-+ for (i=0; i< blksize; i++)
-+ readbuf[i] = lintomulaw[ (readbuf[i]<<8) ^ 0x8000 ] ;
-+ }
-+ if (iport == 3) {
-+ l = read(ext_fd, readbuf, blksize);
-+ if (l < blksize) {
-+ lseek(ext_fd, (off_t) 0, 0);
-+ read(ext_fd, readbuf+l, blksize - l);
-+ }
-+ }
-+ return readbuf;
- }
-
--void VoxWareAudio::SetRGain(int level)
-+/*
-+ * should check that I HaveAudio() before trying to set gain.
-+ *
-+ * In most mixer devices, there is only a master volume control on
-+ * the capture channel, so the following code does not really work
-+ * as expected. The only (partial) exception is the MIC line, where
-+ * there is generally a 20dB boost which can be enabled or not
-+ * depending on the type of device.
-+ */
-+void VoxWare::SetRGain(int level)
- {
-+ double x = level;
-+ level = (int) (x/2.56);
-+ int foo = (level<<8) | level;
-+ if (!HaveAudio())
-+ Obtain();
-+ switch (iport) {
-+ case 2:
-+ case 1:
-+ break;
-+ case 0:
-+ if (ioctl(fd, MIXER_WRITE(SOUND_MIXER_MIC), &foo) == -1)
-+ printf("failed to set mic volume \n");
-+ break;
-+ }
-+ /* IGAIN tends to be found on SB-like mixers, RECLEV on AC97 */
-+ if ((ioctl(fd, MIXER_WRITE(SOUND_MIXER_IGAIN), &foo) == -1) &&
-+ (ioctl(fd, MIXER_WRITE(SOUND_MIXER_RECLEV), &foo) == -1))
-+ printf("failed set input line volume \n");
- rgain = level;
- }
-
--void VoxWareAudio::SetPGain(int level)
-+void VoxWare::SetPGain(int level)
- {
-+ float x = level;
-+ level = (int) (x/2.56);
-+ int foo = (level<<8) | level;
-+ if (ioctl(fd, MIXER_WRITE(SOUND_MIXER_PCM), &foo) == -1) {
-+ printf("failed to output level %d \n", level);
-+ }
- pgain = level;
- }
-
--void VoxWareAudio::OutputPort(int p)
-+void VoxWare::OutputPort(int p)
- {
- oport = p;
- }
-
--void VoxWareAudio::InputPort(int p)
-+void VoxWare::InputPort(int p)
- {
-+ int src = 0;
-+
-+ if (ext_fd >= 0 && p != 3) {
-+ close(ext_fd);
-+ ext_fd = -1 ;
-+ }
-+
-+ switch(p) {
-+ case 3:
-+ if (ext_fd == -1)
-+ ext_fd = open(ext_fname, 0);
-+ if (ext_fd != -1)
-+ lseek(ext_fd, (off_t) 0, 0);
-+ break;
-+ case 2:
-+ src = 1 << SOUND_MIXER_LINE;
-+ break;
-+ case 1: /* cd ... */
-+ src = 1 << SOUND_MIXER_CD;
-+ break;
-+ case 0 :
-+ src = 1 << SOUND_MIXER_MIC;
-+ break;
-+ }
-+ if ( ioctl(fd, SOUND_MIXER_WRITE_RECSRC, &src) == -1 ) {
-+ printf("failed to select input \n");
-+ p = 0;
-+ }
- iport = p;
- }
-
--void VoxWareAudio::RMute()
-+void VoxWare::RMute()
- {
- rmute |= 1;
- }
-
--void VoxWareAudio::RUnmute()
-+void VoxWare::RUnmute()
- {
- rmute &=~ 1;
- }
-+
-+/*
-+ * FrameReady must return 0 every so often, or the system will keep
-+ * processing mike data and not other events.
-+ */
-+int VoxWare::FrameReady()
-+{
-+ int i, l = 0;
-+ int lim = blksize;
-+
-+ i = ioctl(fd, FIONREAD, &l );
-+ if (rec_fmt == AFMT_S16_LE) lim = 2*blksize;
-+ return (l >= lim) ? 1 : 0 ;
-+}
-+/*** end of file ***/
diff --git a/audio/vat/files/patch-ai b/audio/vat/files/patch-ai
deleted file mode 100644
index 15a8677d87c7..000000000000
--- a/audio/vat/files/patch-ai
+++ /dev/null
@@ -1,20 +0,0 @@
---- iohandler.cc.orig Sun Nov 28 18:49:59 1999
-+++ iohandler.cc Sun Nov 28 18:50:46 1999
-@@ -132,7 +132,7 @@
-
- }
- #else
-- Tk_CreateFileHandler((ClientData)fd, mask, callback, (ClientData)this);
-+ Tk_CreateFileHandler(fd, mask, callback, (ClientData)this);
- #endif
- }
-
-@@ -151,7 +151,7 @@
- }
- #else
- if (fd_ >= 0) {
-- Tk_DeleteFileHandler((ClientData)fd_);
-+ Tk_DeleteFileHandler(fd_);
- fd_ = -1;
- }
- #endif
diff --git a/audio/vat/files/patch-aj b/audio/vat/files/patch-aj
deleted file mode 100644
index 5ee097c986d3..000000000000
--- a/audio/vat/files/patch-aj
+++ /dev/null
@@ -1,11 +0,0 @@
---- Makefile.in.orig Thu Jan 27 18:55:52 2000
-+++ Makefile.in Thu Jan 27 18:56:07 2000
-@@ -39,7 +39,7 @@
- all: $(ALL)
-
- .cc.o:
-- rm -f $@; $(C++) -c $(CFLAGS) $*.cc
-+ rm -f $@; $(C++) -pedantic -c $(CFLAGS) $*.cc
-
- .c.o:
- rm -f $@; $(CC) -o $@ -c $(CFLAGS) $*.c
diff --git a/audio/vat/files/patch-ak b/audio/vat/files/patch-ak
deleted file mode 100644
index d45528e48bc6..000000000000
--- a/audio/vat/files/patch-ak
+++ /dev/null
@@ -1,21 +0,0 @@
---- old/audio.cc Fri May 3 13:27:20 1996
-+++ audio.cc Thu Apr 16 21:36:33 1998
-@@ -70,6 +70,7 @@
- filter(new Filter(this)),
- handler_(0)
- {
-+ ext_fname[0]='\0';
- for (u_int i = 0; i < sizeof(omode)/sizeof(omode[0]); ++i)
- omode[i] = mode_mikemutesnet;
- }
-@@ -479,6 +480,10 @@
- *cp++ = '\0';
- return (TCL_OK);
- }
-+ } else if (strcmp(argv[1], "filename") == 0) {
-+ strncpy(ext_fname, argv[2], sizeof(ext_fname));
-+ InputPort(input_line3);
-+ return (TCL_OK);
- }
- } else if (argc == 4) {
- if (strcmp(argv[1], "input") == 0) {
diff --git a/audio/vat/files/patch-al b/audio/vat/files/patch-al
deleted file mode 100644
index 1ce8088f62c8..000000000000
--- a/audio/vat/files/patch-al
+++ /dev/null
@@ -1,10 +0,0 @@
---- old/audio.h Fri Apr 26 12:00:44 1996
-+++ audio.h Fri Feb 20 13:44:01 1998
-@@ -158,6 +158,7 @@
- int rgain, pgain;
- Filter *filter;
- AudioHandler* handler_;
-+ char ext_fname[256];
- };
-
- #endif
diff --git a/audio/vat/files/patch-am b/audio/vat/files/patch-am
deleted file mode 100644
index b3d22bbf4ed4..000000000000
--- a/audio/vat/files/patch-am
+++ /dev/null
@@ -1,22 +0,0 @@
---- old/bitmaps/linein3.xbm Fri May 3 12:18:11 1996
-+++ bitmaps/linein3.xbm Wed Oct 29 11:07:34 1997
-@@ -1,11 +1,11 @@
- #define linein3_width 30
- #define linein3_height 24
- static char linein3_bits[] = {
-- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x00,
-- 0x00, 0x80, 0xff, 0x00, 0x00, 0xe0, 0xc1, 0x03, 0x00, 0x70, 0x04, 0x07,
-- 0x00, 0x30, 0x0c, 0x06, 0x00, 0x18, 0x18, 0x0c, 0x00, 0x18, 0x30, 0x0c,
-- 0x00, 0x0c, 0x60, 0x18, 0xe0, 0xff, 0xff, 0x18, 0xe0, 0xff, 0xff, 0x19,
-- 0xe0, 0xff, 0xff, 0x18, 0x00, 0x0c, 0x60, 0x18, 0x00, 0x18, 0x30, 0x0c,
-- 0x18, 0x18, 0x18, 0x0c, 0x24, 0x30, 0x0c, 0x06, 0x20, 0x70, 0x04, 0x07,
-- 0x18, 0xe0, 0xc1, 0x03, 0x10, 0x80, 0xff, 0x00, 0x20, 0x00, 0x3e, 0x00,
-- 0x24, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
-+ 0x00, 0x00, 0x00, 0x00, 0x7c, 0x1b, 0x3e, 0x00, 0x0c, 0x1b, 0x06, 0x00,
-+ 0x0c, 0x1b, 0x06, 0x00, 0x3c, 0x1b, 0x1e, 0x00, 0x0c, 0x1b, 0x06, 0x00,
-+ 0x0c, 0x1b, 0x06, 0x00, 0x0c, 0xfb, 0x3e, 0x00, 0x00, 0x00, 0x00, 0x00,
-+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x70, 0x00, 0x80, 0x0f, 0xf8, 0x00,
-+ 0xc0, 0x18, 0x8c, 0x01, 0x60, 0x30, 0x06, 0x03, 0x60, 0x30, 0x06, 0x03,
-+ 0x60, 0x30, 0x06, 0x03, 0xc0, 0x18, 0x8c, 0x01, 0x80, 0xff, 0xff, 0x00,
-+ 0x00, 0xff, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
diff --git a/audio/vat/files/patch-an b/audio/vat/files/patch-an
deleted file mode 100644
index 108d0e8ac475..000000000000
--- a/audio/vat/files/patch-an
+++ /dev/null
@@ -1,45 +0,0 @@
---- old/ui-main.tcl Fri May 3 13:27:22 1996
-+++ ui-main.tcl Sat Feb 21 06:02:59 1998
-@@ -373,9 +373,9 @@
- }
- mk.obuttons $w.frame.buttons
- frame $w.frame.ssthresh
-- # mk.ssthresh $w.frame.ssthresh
-- #pack $w.frame.radios $w.frame.buttons $w.frame.ssthresh \
-- # -anchor c -pady 4
-+ mk.ssthresh $w.frame.ssthresh
-+ pack $w.frame.radios $w.frame.buttons $w.frame.ssthresh \
-+ -anchor c -pady 4
- pack $w.frame.radios $w.frame.buttons \
- -anchor c -pady 4
- pack $w.label $w.frame -expand 1 -fill x
-@@ -515,6 +515,12 @@
- return 0
- }
-
-+proc update_filename { w s } {
-+ set s [string trim $s]
-+ audio filename $s
-+ return 0
-+}
-+
- proc mk.entries { w } {
- global sessionKey confName
- set sessionKey [option get . sessionKey Vat]
-@@ -913,6 +919,16 @@
- set a .m.right
- frame $a.ab
- mk.ab $a.ab
-+
-+### XXX
-+ set f [ctrlfont]
-+ frame .m.file
-+ label .m.file.label -text "AU File: " -font $f
-+ mk.entry .m.file update_filename ""
-+ .m.file.entry configure -width 30
-+ pack .m.file.label -side left
-+ pack .m.file.entry -side left -expand 1 -fill x -pady 2
-+ pack .m.file -fill x
-
- bind . c purge_sources
- bind . C purge_sources
diff --git a/audio/vat/files/patch-ao b/audio/vat/files/patch-ao
deleted file mode 100644
index d249ce21269c..000000000000
--- a/audio/vat/files/patch-ao
+++ /dev/null
@@ -1,10 +0,0 @@
---- configure.in.orig Thu Jan 23 18:20:46 2003
-+++ configure.in Thu Jan 23 18:21:05 2003
-@@ -153,6 +153,7 @@
- ;;
- *-*-freebsd*)
- V_OBJ_AUDIO="$V_OBJ_AUDIO audio-voxware.o"
-+ V_DEFINE="$V_DEFINE -DSIGARGS=int"
- ;;
- *-*-sco*)
- V_DEFINE="$V_DEFINE -DSIGARGS=int -Dsco"
diff --git a/audio/vat/files/patch-ap b/audio/vat/files/patch-ap
deleted file mode 100644
index 178e46540170..000000000000
--- a/audio/vat/files/patch-ap
+++ /dev/null
@@ -1,11 +0,0 @@
---- net-ip.cc.orig Thu May 16 05:28:06 1996
-+++ net-ip.cc Sun Dec 3 19:04:50 2006
-@@ -203,7 +203,7 @@
- {
- memset((char *)p, 0, sizeof(*p));
- p->sin_family = AF_INET;
-- int len = sizeof(*p);
-+ socklen_t len = sizeof(*p);
- if (getsockname(ssock_, (struct sockaddr *)p, &len) < 0) {
- perror("getsockname");
- p->sin_addr.s_addr = 0;