summaryrefslogtreecommitdiff
path: root/mbone
diff options
context:
space:
mode:
authorwiz <wiz>2013-12-31 17:08:08 +0000
committerwiz <wiz>2013-12-31 17:08:08 +0000
commita490babd46ca8b9ec8cc828c88fcc69371ceefd4 (patch)
tree1d7234635223506656155b47163d0edd07892ec4 /mbone
parentd7ba06678d5e4fa37f049299b65194c6e19f8533 (diff)
downloadpkgsrc-a490babd46ca8b9ec8cc828c88fcc69371ceefd4.tar.gz
Remove packages that were either BROKEN for more than a year or
BROKEN and explicitly scheduled to be removed after 2013Q4.
Diffstat (limited to 'mbone')
-rw-r--r--mbone/Makefile5
-rw-r--r--mbone/imm/DESCR8
-rw-r--r--mbone/imm/Makefile22
-rw-r--r--mbone/imm/PLIST5
-rw-r--r--mbone/imm/distinfo9
-rw-r--r--mbone/imm/patches/patch-aa13
-rw-r--r--mbone/imm/patches/patch-ab13
-rw-r--r--mbone/imm/patches/patch-ad38
-rw-r--r--mbone/imm/patches/patch-ae88
-rw-r--r--mbone/nte/DESCR16
-rw-r--r--mbone/nte/Makefile37
-rw-r--r--mbone/nte/PLIST2
-rw-r--r--mbone/nte/distinfo16
-rw-r--r--mbone/nte/patches/patch-aa16
-rw-r--r--mbone/nte/patches/patch-ab22
-rw-r--r--mbone/nte/patches/patch-ac1494
-rw-r--r--mbone/nte/patches/patch-ad20
-rw-r--r--mbone/nte/patches/patch-ae12
-rw-r--r--mbone/nte/patches/patch-af31
-rw-r--r--mbone/nte/patches/patch-ag12
-rw-r--r--mbone/nte/patches/patch-ah7
-rw-r--r--mbone/nte/patches/patch-ai7
-rw-r--r--mbone/nte/patches/patch-aj25
-rw-r--r--mbone/nte/patches/patch-ak12
-rw-r--r--mbone/sdr/DESCR4
-rw-r--r--mbone/sdr/Makefile60
-rw-r--r--mbone/sdr/PLIST2
-rw-r--r--mbone/sdr/distinfo11
-rw-r--r--mbone/sdr/files/Makefile.netbsd11
-rw-r--r--mbone/sdr/patches/patch-aa15
-rw-r--r--mbone/sdr/patches/patch-ab13
-rw-r--r--mbone/sdr/patches/patch-ac27
-rw-r--r--mbone/sdr/patches/patch-ad30
-rw-r--r--mbone/sdr/patches/patch-ae14
-rw-r--r--mbone/sdr/patches/patch-af13
35 files changed, 1 insertions, 2129 deletions
diff --git a/mbone/Makefile b/mbone/Makefile
index 07b7751deec..b59c1c22fa5 100644
--- a/mbone/Makefile
+++ b/mbone/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.23 2010/02/25 09:23:25 jnemeth Exp $
+# $NetBSD: Makefile,v 1.24 2013/12/31 17:08:08 wiz Exp $
#
COMMENT= Multi-cast backBone applications
@@ -6,14 +6,11 @@ COMMENT= Multi-cast backBone applications
SUBDIR+= beacon
SUBDIR+= common-mml
SUBDIR+= dbeacon
-#SUBDIR+= imm # broken
SUBDIR+= mdd
SUBDIR+= mdp
-#SUBDIR+= nte # broken
SUBDIR+= rat
SUBDIR+= rtptools
SUBDIR+= sapserver
-#SUBDIR+= sdr # broken
SUBDIR+= vat
SUBDIR+= vic
SUBDIR+= vic-devel
diff --git a/mbone/imm/DESCR b/mbone/imm/DESCR
deleted file mode 100644
index 15c4d5abf98..00000000000
--- a/mbone/imm/DESCR
+++ /dev/null
@@ -1,8 +0,0 @@
-IMM has been designed to efficiently replicate files/file directories
-using a reliable dissemination protocol framework and provide archiving
-and post processing features. The default mode of operation is for imm
-to receive and display compressed imagery files (e.g., jpg,gif) using
-xv or xloadimage as a post processor.
-
-The sdr plugin file from the earlier imm release has been integrated into
-the NetBSD sdr package.
diff --git a/mbone/imm/Makefile b/mbone/imm/Makefile
deleted file mode 100644
index c80b1098793..00000000000
--- a/mbone/imm/Makefile
+++ /dev/null
@@ -1,22 +0,0 @@
-# $NetBSD: Makefile,v 1.28 2010/08/21 09:07:17 seb Exp $
-
-DISTNAME= imm36a1
-PKGNAME= imm-3.6a1
-PKGREVISION= 1
-CATEGORIES= mbone tk
-MASTER_SITES= ftp://ftp.hawaii.edu/paccom/imm/
-EXTRACT_SUFX= .tar.Z
-
-MAINTAINER= is@NetBSD.org
-HOMEPAGE= http://tang.itd.nrl.navy.mil/5522/ntm/imm.html
-COMMENT= Internet Image(or other data) Multicaster (and receiver)
-
-BROKEN= Depends on TCL/TK 8.3
-
-DEPENDS+= xv>=3.10:../../graphics/xv
-
-WRKSRC= ${WRKDIR}/${DISTNAME}.src
-BUILD_TARGET= netbsd
-
-#.include "../../x11/tk83/buildlink3.mk"
-.include "../../mk/bsd.pkg.mk"
diff --git a/mbone/imm/PLIST b/mbone/imm/PLIST
deleted file mode 100644
index 05125fef3c6..00000000000
--- a/mbone/imm/PLIST
+++ /dev/null
@@ -1,5 +0,0 @@
-@comment $NetBSD: PLIST,v 1.2 2005/04/05 11:50:14 wiz Exp $
-bin/imm
-bin/immserv
-bin/mdpsniff
-bin/mnm
diff --git a/mbone/imm/distinfo b/mbone/imm/distinfo
deleted file mode 100644
index 8cae56434b1..00000000000
--- a/mbone/imm/distinfo
+++ /dev/null
@@ -1,9 +0,0 @@
-$NetBSD: distinfo,v 1.8 2007/10/05 23:08:10 joerg Exp $
-
-SHA1 (imm36a1.tar.Z) = a3c0bd042ebed930739f22ebfec2bf28080a88f6
-RMD160 (imm36a1.tar.Z) = d1a1de1cd7317278b5932b6cd1512ba5d66f6fca
-Size (imm36a1.tar.Z) = 87695 bytes
-SHA1 (patch-aa) = 17679dadc252d391e4f2c30ddccb7008531f1cba
-SHA1 (patch-ab) = 3d5d714d0513dc8cc0758dfc4a508ddec9dd7de3
-SHA1 (patch-ad) = dc9bc795bc177f5e0087b1bb2bcb2f5d654bdb66
-SHA1 (patch-ae) = b8133dd4ab0b25c9c6e5ae87ceca6ab7870a438b
diff --git a/mbone/imm/patches/patch-aa b/mbone/imm/patches/patch-aa
deleted file mode 100644
index bd650469511..00000000000
--- a/mbone/imm/patches/patch-aa
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD: patch-aa,v 1.5 2006/01/03 18:30:16 joerg Exp $
-
---- xlopen.c.orig 2006-01-03 18:28:04.000000000 +0000
-+++ xlopen.c
-@@ -37,7 +37,7 @@ extern char *optarg;
- extern int optind, opterr;
- extern int useimageloader;
- extern struct hosttype *hosts_tail;
--#ifndef __NetBSD__
-+#if !defined(__NetBSD__) && !defined(__DragonFly__) && !defined(__FreeBSD__)
- extern char *sys_errlist[];
- #endif
- extern int fullscrflag;
diff --git a/mbone/imm/patches/patch-ab b/mbone/imm/patches/patch-ab
deleted file mode 100644
index cf05bffa3e7..00000000000
--- a/mbone/imm/patches/patch-ab
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD: patch-ab,v 1.3 2007/10/05 23:08:10 joerg Exp $
-
---- mcl.c.orig 2007-10-05 22:16:39.000000000 +0000
-+++ mcl.c
-@@ -27,7 +27,7 @@
-
- #define MAIN
- #include "protocol.h"
--#include <malloc.h>
-+#include <stdlib.h>
- #include <fcntl.h>
- #include <sys/socket.h>
- #include <netinet/in.h>
diff --git a/mbone/imm/patches/patch-ad b/mbone/imm/patches/patch-ad
deleted file mode 100644
index 84ce303d971..00000000000
--- a/mbone/imm/patches/patch-ad
+++ /dev/null
@@ -1,38 +0,0 @@
-$NetBSD: patch-ad,v 1.7 2003/01/19 07:13:50 salo Exp $
---- Makefile.orig Mon Feb 10 08:56:48 1997
-+++ Makefile Sun Sep 13 07:56:03 1998
-@@ -1,9 +1,9 @@
- ##################################
- # Common Area
- SHELL = /bin/sh
--PREFIX = /usr/local
-+#PREFIX = /usr/pkg
- INCLUDE_DIR = -I$(PREFIX)/include
--BINDIR= /usr/local/bin
-+BINDIR= $(PREFIX)/bin
-
- noentry:
- @echo "type 'make clean' followed by 'make SYSTEM' "
-@@ -44,10 +44,10 @@
- netbsd:
- $(MAKE) \
- LIBS='-lm' \
-- TKLIBS='-L$(PREFIX)/lib -L/usr/X11/lib -ltk4.2 -ltcl7.6 -lX11' \
-- INCLUDES='-I. $(INCLUDE_DIR) -I/usr/X11/include' \
-+ TKLIBS='-Wl,-R${LOCALBASE}/lib -Wl,-R${X11BASE}/lib -L$(LOCALBASE)/lib -L${X11BASE}/lib -ltk83 -ltcl83 -lX11' \
-+ INCLUDES='-I. $(INCLUDE_DIR) -I${X11BASE}/include -I${LOCALBASE}/include -I${LOCALBASE}/include' \
- SYSDEFS='-g -DSIG_T=int -DMULTICAST -DERROR_TEST' \
-- CC=gcc \
-+ CC='cc -O2'\
- all
-
- linux:
-@@ -61,7 +61,7 @@
-
- ##############
- # common defines
--INSTALL=cp
-+INSTALL=${BSD_INSTALL_PROGRAM}
- VERSION=36a1
- EXECS=imm immserv mnm mdpsniff
-
diff --git a/mbone/imm/patches/patch-ae b/mbone/imm/patches/patch-ae
deleted file mode 100644
index 23f74a57020..00000000000
--- a/mbone/imm/patches/patch-ae
+++ /dev/null
@@ -1,88 +0,0 @@
-$NetBSD: patch-ae,v 1.2 2003/10/18 13:20:32 cjep Exp $
---- utils.c.orig 2003-10-08 16:18:08.000000000 +1000
-+++ utils.c 2003-10-08 16:18:18.000000000 +1000
-@@ -20,7 +20,7 @@
- * These notices must be retained in any copies of any part of this software.
- ******************************************************************************/
- #include <stdio.h>
--#include <varargs.h>
-+#include <stdarg.h>
- #include <stdlib.h>
- #include <string.h>
- #ifdef __NetBSD__
-@@ -40,14 +40,12 @@
-
- /*----------------------------------------------------------------------------*/
-
--void warn( va_alist )
--va_dcl
-+void
-+warn(const char *fmt, ...)
- {
- va_list args;
-- char *fmt;
-
-- va_start( args );
-- fmt = va_arg( args, char * );
-+ va_start(args, fmt);
- fprintf( stderr, "Warning: " );
- vfprintf( stderr, fmt, args );
- va_end( args );
-@@ -55,14 +53,12 @@
-
- /*----------------------------------------------------------------------------*/
-
--void die( va_alist )
--va_dcl
-+void
-+die(const char *fmt, ...)
- {
- va_list args;
-- char *fmt;
-
-- va_start( args );
-- fmt = va_arg( args, char * );
-+ va_start(args, fmt);
- fprintf( stderr, "Error: " );
- vfprintf( stderr, fmt, args );
- exit( 1 );
-@@ -70,14 +66,12 @@
-
- /*----------------------------------------------------------------------------*/
-
--void fatal( va_alist )
--va_dcl
-+void
-+fatal(const char *fmt, ...)
- {
- va_list args;
-- char *fmt;
-
-- va_start( args );
-- fmt = va_arg( args, char * );
-+ va_start(args, fmt);
- fprintf( stderr, "Internal Error: " );
- vfprintf( stderr, fmt, args );
- exit( 2 );
-@@ -142,18 +136,16 @@
-
- /*----------------------------------------------------------------------------*/
-
--void mailmessage( va_alist )
--va_dcl
-+void
-+mailmessage(const char *fmt, ...)
- {
- va_list args;
-- char *fmt;
- FILE *popen(), *fp;
- char cmdline[80];
- if (whome == NULL) whome = getlogin();
- sprintf(cmdline,"%s %s",mailprog,whome);
- fp = popen(cmdline,"w");
-- va_start( args );
-- fmt = va_arg( args, char * );
-+ va_start(args, fmt);
- fprintf( fp, "MNM Warning: " );
- vfprintf( fp, fmt, args );
- va_end( args );
diff --git a/mbone/nte/DESCR b/mbone/nte/DESCR
deleted file mode 100644
index 5ad644edc63..00000000000
--- a/mbone/nte/DESCR
+++ /dev/null
@@ -1,16 +0,0 @@
-NTE is a shared text editor designed for use on the Mbone. It is
-not a word processor and it is not a whiteboard - if you want a
-whiteboard, wb from LBL is a much better whiteboard.
-
-Using NTE can be very interactive - unless you lock a block of
-text, anyone else in your session can edit that text or delete it.
-This is intentional. Many people can (if they wish) edit the same
-document simultaneously. Many people can even edit the same block
-of text simultaneously, but if more than one person tries to edit
-the same line at one time, a conflict will occur, which results in
-only one of the changes being preserved.
-
-In general, it is up to you how you use NTE. You must develop
-human protocols to be able to collaborate, even in face-to-face
-meetings, and NTE is no exception. It will work well if you
-cooperate, and not if you don't.
diff --git a/mbone/nte/Makefile b/mbone/nte/Makefile
deleted file mode 100644
index a68e00b2c31..00000000000
--- a/mbone/nte/Makefile
+++ /dev/null
@@ -1,37 +0,0 @@
-# $NetBSD: Makefile,v 1.38 2010/08/21 10:17:10 seb Exp $
-#
-
-DISTNAME= nt.1.5a23
-PKGNAME= nte-1.5a23
-PKGREVISION= 1
-CATEGORIES= mbone tk
-MASTER_SITES= http://www-mice.cs.ucl.ac.uk/multimedia/software/nte/1.5a23/
-
-MAINTAINER= pkgsrc-users@NetBSD.org
-HOMEPAGE= http://www-mice.cs.ucl.ac.uk/multimedia/software/nte/
-COMMENT= Multicast Network Text Editor
-
-BROKEN= Depends on TCL/TK 8.3
-
-WRKSRC= ${WRKDIR}
-CRYPTO= yes
-USE_TOOLS+= gmake
-
-# Pass this on to our child
-do-configure:
- cd ${WRKSRC}/netbsd && ${SH} configure
-
-#.include "../../x11/tk83/buildlink3.mk"
-.include "../../mk/bsd.pkg.mk"
-
-#DISGUSTING HACK ALERT
-#Although nte includes an hsearch.c for those who don't have it in
-# libc, there's no way to get the default Makefile to build it.
-# So we build it here.
-#This is below the .include "../../mk/bsd.pkg.mk" since variable names in
-# targets or dependencies are evaluated when they are read so
-# bsd.pkg.mk must have defined ${WRKSRC} already.
-pre-build: ${WRKSRC}/netbsd/hsearch.o
-
-${WRKSRC}/netbsd/hsearch.o: ${WRKSRC}/src/hsearch.c
- ${CC} -I${WRKSRC}/src ${CFLAGS} -c -o $@ ${WRKSRC}/src/hsearch.c
diff --git a/mbone/nte/PLIST b/mbone/nte/PLIST
deleted file mode 100644
index fa364a8a81a..00000000000
--- a/mbone/nte/PLIST
+++ /dev/null
@@ -1,2 +0,0 @@
-@comment $NetBSD: PLIST,v 1.1 2001/10/31 21:35:06 zuntum Exp $
-bin/nt
diff --git a/mbone/nte/distinfo b/mbone/nte/distinfo
deleted file mode 100644
index 17e3b44fb7b..00000000000
--- a/mbone/nte/distinfo
+++ /dev/null
@@ -1,16 +0,0 @@
-$NetBSD: distinfo,v 1.6 2007/08/10 14:07:22 joerg Exp $
-
-SHA1 (nt.1.5a23.tar.gz) = d3ffa9d1fcb08cc0daeaba145108125ad0521483
-RMD160 (nt.1.5a23.tar.gz) = 05c3317837921e07a4f89fb86799c565c5d1314e
-Size (nt.1.5a23.tar.gz) = 261956 bytes
-SHA1 (patch-aa) = 30aa1e932d3000e0c9e52233519167b5e91989e0
-SHA1 (patch-ab) = 5a1fb9da5fed272fa2e5fcb1b5abee14e92d4f87
-SHA1 (patch-ac) = 614aeb5e6cde656c1e4471ef6a4bdb19331321f2
-SHA1 (patch-ad) = d21ed52b98d283e3d7cca202cf9a4b48672fbf8b
-SHA1 (patch-ae) = d7ef2e5964fb5f4deb202d98fbeb5e46db278c26
-SHA1 (patch-af) = de9d8194a9d7198cdb2d1c4442a7097335446058
-SHA1 (patch-ag) = bffb4805f2a1d039157cf70578f54bbbd2480d16
-SHA1 (patch-ah) = df6bf1d8c9e40e3f8dfd7a7d3d37059d656b13fe
-SHA1 (patch-ai) = 975c7a56b0a9c8ab9b3f8b074cfd293258edf2c9
-SHA1 (patch-aj) = bc1e84ff2c979537a70ac75dcfe6775fe753802f
-SHA1 (patch-ak) = 8dcc3ad7e7a0e97e557586d0e8edd3cd02680367
diff --git a/mbone/nte/patches/patch-aa b/mbone/nte/patches/patch-aa
deleted file mode 100644
index 04e89e613ed..00000000000
--- a/mbone/nte/patches/patch-aa
+++ /dev/null
@@ -1,16 +0,0 @@
-$NetBSD: patch-aa,v 1.2 1998/08/07 11:09:56 agc Exp $
-
---- src/search.h.orig Wed Sep 4 03:54:13 1996
-+++ src/search.h Thu Oct 31 14:19:33 1996
-@@ -14,11 +14,6 @@
- extern "C" {
- #endif
-
--#ifndef _SIZE_T
--#define _SIZE_T
--typedef unsigned size_t;
--#endif
--
- /* HSEARCH(3C) */
- typedef enum { FIND, ENTER } ACTION;
-
diff --git a/mbone/nte/patches/patch-ab b/mbone/nte/patches/patch-ab
deleted file mode 100644
index 5710863e63e..00000000000
--- a/mbone/nte/patches/patch-ab
+++ /dev/null
@@ -1,22 +0,0 @@
-$NetBSD: patch-ab,v 1.2 1998/08/07 11:09:56 agc Exp $
-
---- src/Makefile.template.orig Thu Oct 31 14:35:42 1996
-+++ src/Makefile.template Thu Oct 31 14:36:23 1996
-@@ -168,13 +168,13 @@
- $(CC) $(CFLAGS) -c libs.c
-
- ../src/help/blocks.ehtml: text2html ../src/help/blocks.html
-- text2html < ../src/help/blocks.html > ../src/help/blocks.ehtml
-+ ./text2html < ../src/help/blocks.html > ../src/help/blocks.ehtml
- ../src/help/bindings.ehtml: text2html ../src/help/bindings.html
-- text2html < ../src/help/bindings.html > ../src/help/bindings.ehtml
-+ ./text2html < ../src/help/bindings.html > ../src/help/bindings.ehtml
- ../src/help/menus.ehtml: text2html ../src/help/menus.html
-- text2html < ../src/help/menus.html > ../src/help/menus.ehtml
-+ ./text2html < ../src/help/menus.html > ../src/help/menus.ehtml
- ../src/help/xresources.ehtml: text2html ../src/help/xresources.html
-- text2html < ../src/help/xresources.html > ../src/help/xresources.ehtml
-+ ./text2html < ../src/help/xresources.html > ../src/help/xresources.ehtml
-
-
-
diff --git a/mbone/nte/patches/patch-ac b/mbone/nte/patches/patch-ac
deleted file mode 100644
index 5217a46c605..00000000000
--- a/mbone/nte/patches/patch-ac
+++ /dev/null
@@ -1,1494 +0,0 @@
-$NetBSD: patch-ac,v 1.3 1998/08/07 11:09:56 agc Exp $
-
-*** src/canvas_ext.c~ Wed Sep 4 06:54:02 1996
---- src/canvas_ext.c Thu Mar 5 19:30:28 1998
-***************
-*** 10,14 ****
- * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
- *
-! * SCCS: @(#) tkCanvText.c 1.56 96/02/17 17:45:17
- */
-
---- 10,14 ----
- * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
- *
-! * SCCS: @(#) tkCanvText.c 1.68 97/10/09 17:44:53
- */
-
-***************
-*** 17,47 ****
- #include "tkCanvas.h"
- #include "tkPort.h"
-!
-! /*
-! * One of the following structures is kept for each line of text
-! * in a text item. It contains geometry and display information
-! * for that line.
-! */
-!
-! typedef struct TextLine {
-! char *firstChar; /* Pointer to the first character in this
-! * line (in the "text" field of enclosing
-! * text item). */
-! int numChars; /* Number of characters displayed in this
-! * line. */
-! int totalChars; /* Total number of characters included as
-! * part of this line (may include an extra
-! * space character at the end that isn't
-! * displayed). */
-! int x, y; /* Origin at which to draw line on screen
-! * (in integer pixel units, but in canvas
-! * coordinates, not screen coordinates). */
-! int x1, y1; /* Upper-left pixel that is part of text
-! * line on screen (again, in integer canvas
-! * pixel units). */
-! int x2, y2; /* Lower-left pixel that is part of text
-! * line on screen (again, in integer canvas
-! * pixel units). */
-! } TextLine;
-
- /*
---- 17,21 ----
- #include "tkCanvas.h"
- #include "tkPort.h"
-! #include "default.h"
-
- /*
-***************
-*** 58,85 ****
- * by (and shared with) the generic canvas
- * code. */
-! char *text; /* Text for item (malloc-ed). */
-! int numChars; /* Number of non-NULL characters in text. */
- double x, y; /* Positioning point for text. */
- Tk_Anchor anchor; /* Where to anchor text relative to (x,y). */
- int width; /* Width of lines for word-wrap, pixels.
- * Zero means no word-wrap. */
-! Tk_Justify justify; /* Justification mode for text. */
- int rightEdge; /* Pixel just to right of right edge of
-! * area of text item. Used for selecting
-! * up to end of line. */
-! XFontStruct *fontPtr; /* Font for drawing text. */
-! XColor *color; /* Color for text. */
-! Pixmap stipple; /* Stipple bitmap for text, or None. */
- GC gc; /* Graphics context for drawing text. */
-! TextLine *linePtr; /* Pointer to array of structures describing
-! * individual lines of text item (malloc-ed). */
-! int numLines; /* Number of structs at *linePtr. */
-! int insertPos; /* Insertion cursor is displayed just to left
-! * of character with this index. */
- GC cursorOffGC; /* If not None, this gives a graphics context
- * to use to draw the insertion cursor when
-! * it's off. Usedif the selection and
- * insertion cursor colors are the same. */
-- GC selTextGC; /* Graphics context for selected text. */
- } TextItem;
-
---- 32,75 ----
- * by (and shared with) the generic canvas
- * code. */
-! /*
-! * Fields that are set by widget commands other than "configure".
-! */
-!
- double x, y; /* Positioning point for text. */
-+ int insertPos; /* Insertion cursor is displayed just to left
-+ * of character with this index. */
-+
-+ /*
-+ * Configuration settings that are updated by Tk_ConfigureWidget.
-+ */
-+
- Tk_Anchor anchor; /* Where to anchor text relative to (x,y). */
-+ XColor *color; /* Color for text. */
-+ Tk_Font tkfont; /* Font for drawing text. */
-+ Tk_Justify justify; /* Justification mode for text. */
-+ Pixmap stipple; /* Stipple bitmap for text, or None. */
-+ char *text; /* Text for item (malloc-ed). */
- int width; /* Width of lines for word-wrap, pixels.
- * Zero means no word-wrap. */
-!
-! /*
-! * Fields whose values are derived from the current values of the
-! * configuration settings above.
-! */
-!
-! int numChars; /* Number of non-NULL characters in text. */
-! Tk_TextLayout textLayout; /* Cached text layout information. */
-! int leftEdge; /* Pixel location of the left edge of the
-! * text item; where the left border of the
-! * text layout is drawn. */
- int rightEdge; /* Pixel just to right of right edge of
-! * area of text item. Used for selecting up
-! * to end of line. */
- GC gc; /* Graphics context for drawing text. */
-! GC selTextGC; /* Graphics context for selected text. */
- GC cursorOffGC; /* If not None, this gives a graphics context
- * to use to draw the insertion cursor when
-! * it's off. Used if the selection and
- * insertion cursor colors are the same. */
- } TextItem;
-
-***************
-*** 99,104 ****
- "black", Tk_Offset(TextItem, color), 0},
- {TK_CONFIG_FONT, "-font", (char *) NULL, (char *) NULL,
-! "-Adobe-Helvetica-Bold-R-Normal--*-120-*-*-*-*-*-*",
-! Tk_Offset(TextItem, fontPtr), 0},
- {TK_CONFIG_JUSTIFY, "-justify", (char *) NULL, (char *) NULL,
- "left", Tk_Offset(TextItem, justify),
---- 89,93 ----
- "black", Tk_Offset(TextItem, color), 0},
- {TK_CONFIG_FONT, "-font", (char *) NULL, (char *) NULL,
-! DEF_CANVTEXT_FONT, Tk_Offset(TextItem, tkfont), 0},
- {TK_CONFIG_JUSTIFY, "-justify", (char *) NULL, (char *) NULL,
- "left", Tk_Offset(TextItem, justify),
-***************
-*** 130,134 ****
- static void DeleteText _ANSI_ARGS_((Tk_Canvas canvas,
- Tk_Item *itemPtr, Display *display));
-! static void DisplayText _ANSI_ARGS_((Tk_Canvas canvas,
- Tk_Item *itemPtr, Display *display, Drawable dst,
- int x, int y, int width, int height));
---- 119,123 ----
- static void DeleteText _ANSI_ARGS_((Tk_Canvas canvas,
- Tk_Item *itemPtr, Display *display));
-! static void DisplayCanvText _ANSI_ARGS_((Tk_Canvas canvas,
- Tk_Item *itemPtr, Display *display, Drawable dst,
- int x, int y, int width, int height));
-***************
-*** 139,144 ****
- Tk_Canvas canvas, Tk_Item *itemPtr,
- char *indexString, int *indexPtr));
-- static void LineToPostscript _ANSI_ARGS_((Tcl_Interp *interp,
-- char *string, int numChars));
- static void ScaleText _ANSI_ARGS_((Tk_Canvas canvas,
- Tk_Item *itemPtr, double originX, double originY,
---- 128,131 ----
-***************
-*** 175,179 ****
- TextCoords, /* coordProc */
- DeleteText, /* deleteProc */
-! DisplayText, /* displayProc */
- 0, /* alwaysRedraw */
- TextToPoint, /* pointProc */
---- 162,166 ----
- TextCoords, /* coordProc */
- DeleteText, /* deleteProc */
-! DisplayCanvText, /* displayProc */
- 0, /* alwaysRedraw */
- TextToPoint, /* pointProc */
-***************
-*** 233,252 ****
- */
-
-- textPtr->text = NULL;
- textPtr->textInfoPtr = Tk_CanvasGetTextInfo(canvas);
-! textPtr->numChars = 0;
-! textPtr->anchor = TK_ANCHOR_CENTER;
-! textPtr->width = 0;
-! textPtr->justify = TK_JUSTIFY_LEFT;
-! textPtr->rightEdge = 0;
-! textPtr->fontPtr = NULL;
-! textPtr->color = NULL;
-! textPtr->stipple = None;
-! textPtr->gc = None;
-! textPtr->linePtr = NULL;
-! textPtr->numLines = 0;
-! textPtr->insertPos = 0;
- textPtr->cursorOffGC = None;
-- textPtr->selTextGC = None;
-
- /*
---- 220,242 ----
- */
-
- textPtr->textInfoPtr = Tk_CanvasGetTextInfo(canvas);
-!
-! textPtr->insertPos = 0;
-!
-! textPtr->anchor = TK_ANCHOR_CENTER;
-! textPtr->color = NULL;
-! textPtr->tkfont = NULL;
-! textPtr->justify = TK_JUSTIFY_LEFT;
-! textPtr->stipple = None;
-! textPtr->text = NULL;
-! textPtr->width = 0;
-!
-! textPtr->numChars = 0;
-! textPtr->textLayout = NULL;
-! textPtr->leftEdge = 0;
-! textPtr->rightEdge = 0;
-! textPtr->gc = None;
-! textPtr->selTextGC = None;
- textPtr->cursorOffGC = None;
-
- /*
-***************
-*** 365,373 ****
- */
-
-- textPtr->numChars = strlen(textPtr->text);
- newGC = newSelGC = None;
-! if ((textPtr->color != NULL) && (textPtr->fontPtr != NULL)) {
- gcValues.foreground = textPtr->color->pixel;
-! gcValues.font = textPtr->fontPtr->fid;
- mask = GCForeground|GCFont;
- if (textPtr->stipple != None) {
---- 355,362 ----
- */
-
- newGC = newSelGC = None;
-! if ((textPtr->color != NULL) && (textPtr->tkfont != NULL)) {
- gcValues.foreground = textPtr->color->pixel;
-! gcValues.font = Tk_FontId(textPtr->tkfont);
- mask = GCForeground|GCFont;
- if (textPtr->stipple != None) {
-***************
-*** 406,409 ****
---- 395,399 ----
- textPtr->cursorOffGC = newGC;
-
-+
- /*
- * If the text was changed, move the selection and insertion indices
-***************
-*** 411,414 ****
---- 401,405 ----
- */
-
-+ textPtr->numChars = strlen(textPtr->text);
- if (textInfoPtr->selItemPtr == itemPtr) {
- if (textInfoPtr->selectFirst >= textPtr->numChars) {
-***************
-*** 458,485 ****
- TextItem *textPtr = (TextItem *) itemPtr;
-
-- if (textPtr->text != NULL) {
-- ckfree(textPtr->text);
-- }
-- if (textPtr->fontPtr != NULL) {
-- Tk_FreeFontStruct(textPtr->fontPtr);
-- }
- if (textPtr->color != NULL) {
- Tk_FreeColor(textPtr->color);
- }
- if (textPtr->stipple != None) {
- Tk_FreeBitmap(display, textPtr->stipple);
- }
- if (textPtr->gc != None) {
- Tk_FreeGC(display, textPtr->gc);
- }
-! if (textPtr->linePtr != NULL) {
-! ckfree((char *) textPtr->linePtr);
- }
- if (textPtr->cursorOffGC != None) {
- Tk_FreeGC(display, textPtr->cursorOffGC);
- }
-- if (textPtr->selTextGC != None) {
-- Tk_FreeGC(display, textPtr->selTextGC);
-- }
- }
-
---- 449,473 ----
- TextItem *textPtr = (TextItem *) itemPtr;
-
- if (textPtr->color != NULL) {
- Tk_FreeColor(textPtr->color);
- }
-+ Tk_FreeFont(textPtr->tkfont);
- if (textPtr->stipple != None) {
- Tk_FreeBitmap(display, textPtr->stipple);
- }
-+ if (textPtr->text != NULL) {
-+ ckfree(textPtr->text);
-+ }
-+
-+ Tk_FreeTextLayout(textPtr->textLayout);
- if (textPtr->gc != None) {
- Tk_FreeGC(display, textPtr->gc);
- }
-! if (textPtr->selTextGC != None) {
-! Tk_FreeGC(display, textPtr->selTextGC);
- }
- if (textPtr->cursorOffGC != None) {
- Tk_FreeGC(display, textPtr->cursorOffGC);
- }
- }
-
-***************
-*** 511,578 ****
- * recomputed. */
- {
-! TextLine *linePtr;
-! #define MAX_LINES 10000
-! char *lineStart[MAX_LINES];
-! int lineChars[MAX_LINES];
-! int linePixels[MAX_LINES];
-! int numLines, wrapPixels, maxLinePixels, leftX, topY, y;
-! int lineHeight, i, fudge;
-! char *p;
-! XCharStruct *maxBoundsPtr = &textPtr->fontPtr->max_bounds;
-! Tk_CanvasTextInfo *textInfoPtr = textPtr->textInfoPtr;
-!
-! if (textPtr->linePtr != NULL) {
-! ckfree((char *) textPtr->linePtr);
-! textPtr->linePtr = NULL;
-! }
-!
-! /*
-! * Work through the text computing the starting point, number of
-! * characters, and number of pixels in each line.
-! */
-!
-! p = textPtr->text;
-! maxLinePixels = 0;
-! if (textPtr->width > 0) {
-! wrapPixels = textPtr->width;
-! } else {
-! wrapPixels = 10000000;
-! }
-! for (numLines = 0; (numLines < MAX_LINES); numLines++) {
-! int numChars, numPixels;
-! numChars = TkMeasureChars(textPtr->fontPtr, p,
-! (textPtr->text + textPtr->numChars) - p, 0,
-! wrapPixels, 0, TK_WHOLE_WORDS|TK_AT_LEAST_ONE, &numPixels);
-! if (numPixels > maxLinePixels) {
-! maxLinePixels = numPixels;
-! }
-! lineStart[numLines] = p;
-! lineChars[numLines] = numChars;
-! linePixels[numLines] = numPixels;
-! p += numChars;
-!
-! /*
-! * Skip space character that terminates a line, if there is one.
-! * In the case of multiple spaces, all but one will be displayed.
-! * This is important to make sure the insertion cursor gets
-! * displayed when it is in the middle of a multi-space.
-! */
-!
-! if (isspace(UCHAR(*p))) {
-! p++;
-! } else if (*p == 0) {
-! /*
-! * The code below is tricky. Putting the loop termination
-! * here guarantees that there's a TextLine for the last
-! * line of text, even if the line is empty (this can
-! * also happen if the entire text item is empty). This is
-! * needed so that we can display the insertion cursor on a
-! * line even when it is empty.
-! */
-
-! numLines++;
-! break;
-! }
-! }
-
- /*
---- 499,509 ----
- * recomputed. */
- {
-! Tk_CanvasTextInfo *textInfoPtr;
-! int leftX, topY, width, height, fudge;
-
-! Tk_FreeTextLayout(textPtr->textLayout);
-! textPtr->textLayout = Tk_ComputeTextLayout(textPtr->tkfont,
-! textPtr->text, textPtr->numChars, textPtr->width,
-! textPtr->justify, 0, &width, &height);
-
- /*
-***************
-*** 581,587 ****
- */
-
-! leftX = textPtr->x + 0.5;
-! topY = textPtr->y + 0.5;
-! lineHeight = textPtr->fontPtr->ascent + textPtr->fontPtr->descent;
- switch (textPtr->anchor) {
- case TK_ANCHOR_NW:
---- 512,517 ----
- */
-
-! leftX = (int) (textPtr->x + 0.5);
-! topY = (int) (textPtr->y + 0.5);
- switch (textPtr->anchor) {
- case TK_ANCHOR_NW:
-***************
-*** 593,597 ****
- case TK_ANCHOR_CENTER:
- case TK_ANCHOR_E:
-! topY -= (lineHeight * numLines)/2;
- break;
-
---- 523,527 ----
- case TK_ANCHOR_CENTER:
- case TK_ANCHOR_E:
-! topY -= height / 2;
- break;
-
-***************
-*** 599,603 ****
- case TK_ANCHOR_S:
- case TK_ANCHOR_SE:
-! topY -= lineHeight * numLines;
- break;
- }
---- 529,533 ----
- case TK_ANCHOR_S:
- case TK_ANCHOR_SE:
-! topY -= height;
- break;
- }
-***************
-*** 611,615 ****
- case TK_ANCHOR_CENTER:
- case TK_ANCHOR_S:
-! leftX -= maxLinePixels/2;
- break;
-
---- 541,545 ----
- case TK_ANCHOR_CENTER:
- case TK_ANCHOR_S:
-! leftX -= width / 2;
- break;
-
-***************
-*** 617,663 ****
- case TK_ANCHOR_E:
- case TK_ANCHOR_SE:
-! leftX -= maxLinePixels;
- break;
- }
-- textPtr->rightEdge = leftX + maxLinePixels;
-
-! /*
-! * Create the new TextLine array and fill it in using the geometry
-! * information gathered already.
-! */
-!
-! if (numLines > 0) {
-! textPtr->linePtr = (TextLine *) ckalloc((unsigned)
-! (numLines * sizeof(TextLine)));
-! } else {
-! textPtr->linePtr = NULL;
-! }
-! textPtr->numLines = numLines;
-! for (i = 0, linePtr = textPtr->linePtr, y = topY;
-! i < numLines; i++, linePtr++, y += lineHeight) {
-! linePtr->firstChar = lineStart[i];
-! linePtr->numChars = lineChars[i];
-! if (i == (numLines-1)) {
-! linePtr->totalChars = linePtr->numChars;
-! } else {
-! linePtr->totalChars = lineStart[i+1] - lineStart[i];
-! }
-! switch (textPtr->justify) {
-! case TK_JUSTIFY_LEFT:
-! linePtr->x = leftX;
-! break;
-! case TK_JUSTIFY_CENTER:
-! linePtr->x = leftX + maxLinePixels/2 - linePixels[i]/2;
-! break;
-! case TK_JUSTIFY_RIGHT:
-! linePtr->x = leftX + maxLinePixels - linePixels[i];
-! break;
-! }
-! linePtr->y = y + textPtr->fontPtr->ascent;
-! linePtr->x1 = linePtr->x + maxBoundsPtr->lbearing;
-! linePtr->y1 = y;
-! linePtr->x2 = linePtr->x + linePixels[i];
-! linePtr->y2 = linePtr->y + textPtr->fontPtr->descent - 1;
-! }
-
- /*
---- 547,556 ----
- case TK_ANCHOR_E:
- case TK_ANCHOR_SE:
-! leftX -= width;
- break;
- }
-
-! textPtr->leftEdge = leftX;
-! textPtr->rightEdge = leftX + width;
-
- /*
-***************
-*** 668,691 ****
- */
-
-! linePtr = textPtr->linePtr;
-! textPtr->header.x1 = textPtr->header.x2 = leftX;
-! textPtr->header.y1 = topY;
-! textPtr->header.y2 = topY + numLines*lineHeight;
-! for (linePtr = textPtr->linePtr, i = textPtr->numLines; i > 0;
-! i--, linePtr++) {
-! if (linePtr->x1 < textPtr->header.x1) {
-! textPtr->header.x1 = linePtr->x1;
-! }
-! if (linePtr->x2 >= textPtr->header.x2) {
-! textPtr->header.x2 = linePtr->x2 + 1;
-! }
-! }
-!
-! fudge = (textInfoPtr->insertWidth+1)/2;
- if (textInfoPtr->selBorderWidth > fudge) {
- fudge = textInfoPtr->selBorderWidth;
- }
-! textPtr->header.x1 -= fudge;
-! textPtr->header.x2 += fudge;
- }
-
---- 561,573 ----
- */
-
-! textInfoPtr = textPtr->textInfoPtr;
-! fudge = (textInfoPtr->insertWidth + 1) / 2;
- if (textInfoPtr->selBorderWidth > fudge) {
- fudge = textInfoPtr->selBorderWidth;
- }
-! textPtr->header.x1 = leftX - fudge;
-! textPtr->header.y1 = topY;
-! textPtr->header.x2 = leftX + width + fudge;
-! textPtr->header.y2 = topY + height;
- }
-
-***************
-*** 693,697 ****
- *--------------------------------------------------------------
- *
-! * DisplayText --
- *
- * This procedure is invoked to draw a text item in a given
---- 575,579 ----
- *--------------------------------------------------------------
- *
-! * DisplayCanvText --
- *
- * This procedure is invoked to draw a text item in a given
-***************
-*** 709,713 ****
-
- static void
-! DisplayText(canvas, itemPtr, display, drawable, x, y, width, height)
- Tk_Canvas canvas; /* Canvas that contains item. */
- Tk_Item *itemPtr; /* Item to be displayed. */
---- 591,595 ----
-
- static void
-! DisplayCanvText(canvas, itemPtr, display, drawable, x, y, width, height)
- Tk_Canvas canvas; /* Canvas that contains item. */
- Tk_Item *itemPtr; /* Item to be displayed. */
-***************
-*** 718,728 ****
- * must be redisplayed (not used). */
- {
-! TextItem *textPtr = (TextItem *) itemPtr;
-! TextLine *linePtr;
-! int i, focusHere, insertX, insertIndex, lineIndex, tabOrigin;
-! int beforeSelect, inSelect, afterSelect, selStartX, selEndX;
- short drawableX, drawableY;
-! Tk_CanvasTextInfo *textInfoPtr = textPtr->textInfoPtr;
-! Tk_Window tkwin = Tk_CanvasTkwin(canvas);
-
- if (textPtr->gc == None) {
---- 600,610 ----
- * must be redisplayed (not used). */
- {
-! TextItem *textPtr;
-! Tk_CanvasTextInfo *textInfoPtr;
-! int selFirst, selLast;
- short drawableX, drawableY;
-!
-! textPtr = (TextItem *) itemPtr;
-! textInfoPtr = textPtr->textInfoPtr;
-
- if (textPtr->gc == None) {
-***************
-*** 740,879 ****
- }
-
-! focusHere = (textInfoPtr->focusItemPtr == itemPtr) &&
-! (textInfoPtr->gotFocus);
-! for (linePtr = textPtr->linePtr, i = textPtr->numLines;
-! i > 0; linePtr++, i--) {
-
-! /*
-! * If part or all of this line is selected, then draw a special
-! * background under the selected part of the line.
-! */
-
-! lineIndex = linePtr->firstChar - textPtr->text;
-! if ((textInfoPtr->selItemPtr != itemPtr)
-! || (textInfoPtr->selectLast < lineIndex)
-! || (textInfoPtr->selectFirst >= (lineIndex
-! + linePtr->totalChars))) {
-! beforeSelect = linePtr->numChars;
-! inSelect = 0;
-! } else {
-! beforeSelect = textInfoPtr->selectFirst - lineIndex;
-! if (beforeSelect <= 0) {
-! beforeSelect = 0;
-! selStartX = linePtr->x;
-! } else {
-! (void) TkMeasureChars(textPtr->fontPtr,
-! linePtr->firstChar, beforeSelect, 0,
-! (int) 1000000, 0, TK_PARTIAL_OK, &selStartX);
-! selStartX += linePtr->x;
-! }
-! inSelect = textInfoPtr->selectLast + 1 - (lineIndex + beforeSelect);
-
- /*
- * If the selection spans the end of this line, then display
- * selection background all the way to the end of the line.
-! * However, for the last line we only want to display up to
-! * the last character, not the end of the line, hence the
-! * "i != 1" check.
- */
-
-! if (inSelect >= (linePtr->totalChars - beforeSelect)) {
-! inSelect = linePtr->numChars - beforeSelect;
-! if (i != 1) {
-! selEndX = textPtr->rightEdge;
-! goto fillSelectBackground;
- }
- }
-- (void) TkMeasureChars(textPtr->fontPtr,
-- linePtr->firstChar + beforeSelect, inSelect,
-- selStartX-linePtr->x, (int) 1000000, 0, TK_PARTIAL_OK,
-- &selEndX);
-- selEndX += linePtr->x;
-- fillSelectBackground:
-- Tk_CanvasDrawableCoords(canvas,
-- (double) (selStartX - textInfoPtr->selBorderWidth),
-- (double) (linePtr->y - textPtr->fontPtr->ascent),
-- &drawableX, &drawableY);
-- Tk_Fill3DRectangle(tkwin, drawable, textInfoPtr->selBorder,
-- drawableX, drawableY,
-- selEndX - selStartX + 2*textInfoPtr->selBorderWidth,
-- textPtr->fontPtr->ascent + textPtr->fontPtr->descent,
-- textInfoPtr->selBorderWidth, TK_RELIEF_RAISED);
- }
-
-! /*
-! * If the insertion cursor is in this line, then draw a special
-! * background for the cursor before drawing the text. Note:
-! * if we're the cursor item but the cursor is turned off, then
-! * redraw background over the area of the cursor. This guarantees
-! * that the selection won't make the cursor invisible on mono
-! * displays, where both are drawn in the same color.
-! */
-
-! if (focusHere) {
-! insertIndex = textPtr->insertPos
-! - (linePtr->firstChar - textPtr->text);
-! if ((insertIndex >= 0) && (insertIndex <= linePtr->numChars)) {
-! (void) TkMeasureChars(textPtr->fontPtr, linePtr->firstChar,
-! insertIndex, 0, (int) 1000000, 0, TK_PARTIAL_OK, &insertX);
-! Tk_CanvasDrawableCoords(canvas,
-! (double) (linePtr->x + insertX
-! - (textInfoPtr->insertWidth)/2),
-! (double) (linePtr->y - textPtr->fontPtr->ascent),
-! &drawableX, &drawableY);
-! if (textInfoPtr->cursorOn) {
-! Tk_Fill3DRectangle(tkwin, drawable,
-! textInfoPtr->insertBorder, drawableX, drawableY,
-! textInfoPtr->insertWidth,
-! textPtr->fontPtr->ascent
-! + textPtr->fontPtr->descent,
-! textInfoPtr->insertBorderWidth, TK_RELIEF_RAISED);
-! } else if (textPtr->cursorOffGC != None) {
-! /* Redraw the background over the area of the cursor,
-! * even though the cursor is turned off. This guarantees
-! * that the selection won't make the cursor invisible on
-! * mono displays, where both may be drawn in the same
-! * color.
-! */
-!
-! XFillRectangle(display, drawable, textPtr->cursorOffGC,
-! drawableX, drawableY,
-! (unsigned) textInfoPtr->insertWidth,
-! (unsigned) (textPtr->fontPtr->ascent
-! + textPtr->fontPtr->descent));
-! }
- }
- }
-
-- /*
-- * Display the text in three pieces: the part before the
-- * selection, the selected part (which needs a different graphics
-- * context), and the part after the selection.
-- */
-
-! Tk_CanvasDrawableCoords(canvas, (double) linePtr->x,
-! (double) linePtr->y, &drawableX, &drawableY);
-! tabOrigin = drawableX;
-! if (beforeSelect != 0) {
-! TkDisplayChars(display, drawable, textPtr->gc, textPtr->fontPtr,
-! linePtr->firstChar, beforeSelect, drawableX,
-! drawableY, tabOrigin, 0);
-! }
-! if (inSelect != 0) {
-! Tk_CanvasDrawableCoords(canvas, (double) selStartX,
-! (double) linePtr->y, &drawableX, &drawableY);
-! TkDisplayChars(display, drawable, textPtr->selTextGC,
-! textPtr->fontPtr, linePtr->firstChar + beforeSelect,
-! inSelect, drawableX, drawableY, tabOrigin, 0);
-! }
-! afterSelect = linePtr->numChars - beforeSelect - inSelect;
-! if (afterSelect > 0) {
-! Tk_CanvasDrawableCoords(canvas, (double) selEndX,
-! (double) linePtr->y, &drawableX, &drawableY);
-! TkDisplayChars(display, drawable, textPtr->gc, textPtr->fontPtr,
-! linePtr->firstChar + beforeSelect + inSelect,
-! afterSelect, drawableX, drawableY, tabOrigin, 0);
-! }
- }
- if (textPtr->stipple != None) {
- XSetTSOrigin(display, textPtr->gc, 0, 0);
---- 622,734 ----
- }
-
-! selFirst = -1;
-! selLast = 0; /* lint. */
-! if (textInfoPtr->selItemPtr == itemPtr) {
-! selFirst = textInfoPtr->selectFirst;
-! selLast = textInfoPtr->selectLast;
-! if (selLast >= textPtr->numChars) {
-! selLast = textPtr->numChars - 1;
-! }
-! if ((selFirst >= 0) && (selFirst <= selLast)) {
-! /*
-! * Draw a special background under the selection.
-! */
-
-! int xFirst, yFirst, hFirst;
-! int xLast, yLast, wLast;
-
-! Tk_CharBbox(textPtr->textLayout, selFirst,
-! &xFirst, &yFirst, NULL, &hFirst);
-! Tk_CharBbox(textPtr->textLayout, selLast,
-! &xLast, &yLast, &wLast, NULL);
-
- /*
- * If the selection spans the end of this line, then display
- * selection background all the way to the end of the line.
-! * However, for the last line we only want to display up to the
-! * last character, not the end of the line.
- */
-
-! x = xFirst;
-! height = hFirst;
-! for (y = yFirst ; y <= yLast; y += height) {
-! if (y == yLast) {
-! width = (xLast + wLast) - x;
-! } else {
-! width = textPtr->rightEdge - textPtr->leftEdge - x;
- }
-+ Tk_CanvasDrawableCoords(canvas,
-+ (double) (textPtr->leftEdge + x
-+ - textInfoPtr->selBorderWidth),
-+ (double) (textPtr->header.y1 + y),
-+ &drawableX, &drawableY);
-+ Tk_Fill3DRectangle(Tk_CanvasTkwin(canvas), drawable,
-+ textInfoPtr->selBorder, drawableX, drawableY,
-+ width + 2 * textInfoPtr->selBorderWidth,
-+ height, textInfoPtr->selBorderWidth, TK_RELIEF_RAISED);
-+ x = 0;
- }
- }
-+ }
-
-! /*
-! * If the insertion point should be displayed, then draw a special
-! * background for the cursor before drawing the text. Note: if
-! * we're the cursor item but the cursor is turned off, then redraw
-! * background over the area of the cursor. This guarantees that
-! * the selection won't make the cursor invisible on mono displays,
-! * where both are drawn in the same color.
-! */
-
-! if ((textInfoPtr->focusItemPtr == itemPtr) && (textInfoPtr->gotFocus)) {
-! if (Tk_CharBbox(textPtr->textLayout, textPtr->insertPos,
-! &x, &y, NULL, &height)) {
-! Tk_CanvasDrawableCoords(canvas,
-! (double) (textPtr->leftEdge + x
-! - (textInfoPtr->insertWidth / 2)),
-! (double) (textPtr->header.y1 + y),
-! &drawableX, &drawableY);
-! if (textInfoPtr->cursorOn) {
-! Tk_Fill3DRectangle(Tk_CanvasTkwin(canvas), drawable,
-! textInfoPtr->insertBorder,
-! drawableX, drawableY,
-! textInfoPtr->insertWidth, height,
-! textInfoPtr->insertBorderWidth, TK_RELIEF_RAISED);
-! } else if (textPtr->cursorOffGC != None) {
-! /*
-! * Redraw the background over the area of the cursor,
-! * even though the cursor is turned off. This
-! * guarantees that the selection won't make the cursor
-! * invisible on mono displays, where both may be drawn
-! * in the same color.
-! */
-!
-! XFillRectangle(display, drawable, textPtr->cursorOffGC,
-! drawableX, drawableY,
-! (unsigned) textInfoPtr->insertWidth,
-! (unsigned) height);
- }
- }
-+ }
-
-
-! /*
-! * Display the text in two pieces: draw the entire text item, then
-! * draw the selected text on top of it. The selected text then
-! * will only need to be drawn if it has different attributes (such
-! * as foreground color) than regular text.
-! */
-!
-! Tk_CanvasDrawableCoords(canvas, (double) textPtr->leftEdge,
-! (double) textPtr->header.y1, &drawableX, &drawableY);
-! Tk_DrawTextLayout(display, drawable, textPtr->gc, textPtr->textLayout,
-! drawableX, drawableY, 0, -1);
-!
-! if ((selFirst >= 0) && (textPtr->selTextGC != textPtr->gc)) {
-! Tk_DrawTextLayout(display, drawable, textPtr->selTextGC,
-! textPtr->textLayout, drawableX, drawableY, selFirst,
-! selLast + 1);
- }
-+
- if (textPtr->stipple != None) {
- XSetTSOrigin(display, textPtr->gc, 0, 0);
-***************
-*** 1051,1057 ****
- * Results:
- * The return value is 0 if the point whose x and y coordinates
-! * are pointPtr[0] and pointPtr[1] is inside the arc. If the
-! * point isn't inside the arc then the return value is the
-! * distance from the point to the arc.
- *
- * Side effects:
---- 906,912 ----
- * Results:
- * The return value is 0 if the point whose x and y coordinates
-! * are pointPtr[0] and pointPtr[1] is inside the text item. If
-! * the point isn't inside the text item then the return value
-! * is the distance from the point to the text item.
- *
- * Side effects:
-***************
-*** 1067,1125 ****
- double *pointPtr; /* Pointer to x and y coordinates. */
- {
-! TextItem *textPtr = (TextItem *) itemPtr;
-! TextLine *linePtr;
-! int i;
-! double xDiff, yDiff, dist, minDist;
-!
-! /*
-! * Treat each line in the text item as a rectangle, compute the
-! * distance to that rectangle, and take the minimum of these
-! * distances. Perform most of the calculations in integer pixel
-! * units, since that's how the dimensions of the text are defined.
-! */
-
-! minDist = -1.0;
-! for (linePtr = textPtr->linePtr, i = textPtr->numLines;
-! i > 0; linePtr++, i--) {
-!
-! /*
-! * If the point is inside the line's rectangle, then can
-! * return immediately.
-! */
-!
-! if ((pointPtr[0] >= linePtr->x1)
-! && (pointPtr[0] <= linePtr->x2)
-! && (pointPtr[1] >= linePtr->y1)
-! && (pointPtr[1] <= linePtr->y2)) {
-! return 0.0;
-! }
-!
-! /*
-! * Point is outside line's rectangle; compute distance to nearest
-! * side.
-! */
-!
-! if (pointPtr[0] < linePtr->x1) {
-! xDiff = linePtr->x1 - pointPtr[0];
-! } else if (pointPtr[0] > linePtr->x2) {
-! xDiff = pointPtr[0] - linePtr->x2;
-! } else {
-! xDiff = 0;
-! }
-!
-! if (pointPtr[1] < linePtr->y1) {
-! yDiff = linePtr->y1 - pointPtr[1];
-! } else if (pointPtr[1] > linePtr->y2) {
-! yDiff = pointPtr[1] - linePtr->y2;
-! } else {
-! yDiff = 0;
-! }
-!
-! dist = hypot(xDiff, yDiff);
-! if ((dist < minDist) || (minDist < 0.0)) {
-! minDist = dist;
-! }
-! }
-! return minDist;
- }
-
---- 922,931 ----
- double *pointPtr; /* Pointer to x and y coordinates. */
- {
-! TextItem *textPtr;
-
-! textPtr = (TextItem *) itemPtr;
-! return (double) Tk_DistanceToTextLayout(textPtr->textLayout,
-! (int) pointPtr[0] - textPtr->leftEdge,
-! (int) pointPtr[1] - textPtr->header.y1);
- }
-
-***************
-*** 1152,1188 ****
- * area. */
- {
-! TextItem *textPtr = (TextItem *) itemPtr;
-! TextLine *linePtr;
-! int i, result;
-!
-! /*
-! * Scan the lines one at a time, seeing whether each line is
-! * entirely in, entirely out, or overlapping the rectangle. If
-! * an overlap is detected, return immediately; otherwise wait
-! * until all lines have been processed and see if they were all
-! * inside or all outside.
-! */
-
-! result = 0;
-! for (linePtr = textPtr->linePtr, i = textPtr->numLines;
-! i > 0; linePtr++, i--) {
-! if ((rectPtr[2] < linePtr->x1) || (rectPtr[0] > linePtr->x2)
-! || (rectPtr[3] < linePtr->y1) || (rectPtr[1] > linePtr->y2)) {
-! if (result == 1) {
-! return 0;
-! }
-! result = -1;
-! continue;
-! }
-! if ((linePtr->x1 < rectPtr[0]) || (linePtr->x2 > rectPtr[2])
-! || (linePtr->y1 < rectPtr[1]) || (linePtr->y2 > rectPtr[3])) {
-! return 0;
-! }
-! if (result == -1) {
-! return 0;
-! }
-! result = 1;
-! }
-! return result;
- }
-
---- 958,969 ----
- * area. */
- {
-! TextItem *textPtr;
-
-! textPtr = (TextItem *) itemPtr;
-! return Tk_IntersectTextLayout(textPtr->textLayout,
-! (int) (rectPtr[0] + 0.5) - textPtr->leftEdge,
-! (int) (rectPtr[1] + 0.5) - textPtr->header.y1,
-! (int) (rectPtr[2] - rectPtr[0] + 0.5),
-! (int) (rectPtr[3] - rectPtr[1] + 0.5));
- }
-
-***************
-*** 1286,1395 ****
- TextItem *textPtr = (TextItem *) itemPtr;
- size_t length;
- Tk_CanvasTextInfo *textInfoPtr = textPtr->textInfoPtr;
-
- length = strlen(string);
-
-! if (string[0] == 'e') {
-! if (strncmp(string, "end", length) == 0) {
-! *indexPtr = textPtr->numChars;
-! } else {
-! badIndex:
-!
-! /*
-! * Some of the paths here leave messages in interp->result,
-! * so we have to clear it out before storing our own message.
-! */
-!
-! Tcl_SetResult(interp, (char *) NULL, TCL_STATIC);
-! Tcl_AppendResult(interp, "bad index \"", string, "\"",
-! (char *) NULL);
-! return TCL_ERROR;
- }
-! } else if (string[0] == 'i') {
-! if (strncmp(string, "insert", length) == 0) {
-! *indexPtr = textPtr->insertPos;
-! } else {
-! goto badIndex;
- }
-! } else if (string[0] == 'l') {
-! if (strncmp(string, "linestart", length) == 0) {
-! int i=0;
-! int ctr=0;
-! TextLine *lptr=textPtr->linePtr;
-! while((i<textPtr->numLines-1)&&
-! (ctr+lptr->numChars <textPtr->insertPos))
-! {
-! ctr+=lptr->numChars+1;
-! lptr++;
-! i++;
-! }
-! *indexPtr = ctr;
-! } else if (strncmp(string, "lineend", length) == 0) {
-! int i=0;
-! int ctr=0;
-! TextLine *lptr=textPtr->linePtr;
-! while((i<textPtr->numLines-1)&&
-! (ctr+lptr->numChars <textPtr->insertPos))
-! {
-! ctr+=lptr->numChars+1;
-! lptr++;
-! i++;
-! }
-! *indexPtr = ctr+lptr->numChars-1;
-! } else {
-! goto badIndex;
-! }
-! } else if (string[0] == 'x') {
-! if (strncmp(string, "xinsert", length) == 0) {
-! int i=0;
-! int ctr=0;
-! TextLine *lptr=textPtr->linePtr;
-! while((i<textPtr->numLines-1)&&
-! (ctr+lptr->numChars <textPtr->insertPos))
-! {
-! ctr+=lptr->numChars+1;
-! lptr++;
-! i++;
-! }
-! *indexPtr = textPtr->insertPos-ctr;
-! } else {
-! goto badIndex;
-! }
-! } else if (string[0] == 'y') {
-! if (strncmp(string, "yinsert", length) == 0) {
-! int i=0;
-! int ctr=0;
-! TextLine *lptr=textPtr->linePtr;
-! while((i<textPtr->numLines-1)&&
-! (ctr+lptr->numChars <textPtr->insertPos))
-! {
-! ctr+=lptr->numChars+1;
-! lptr++;
-! i++;
-! }
-! *indexPtr = i;
-! } else {
-! goto badIndex;
-! }
-! } else if (string[0] == 's') {
- if (textInfoPtr->selItemPtr != itemPtr) {
- interp->result = "selection isn't in item";
- return TCL_ERROR;
- }
-! if (length < 5) {
-! goto badIndex;
-! }
-! if (strncmp(string, "sel.first", length) == 0) {
-! *indexPtr = textInfoPtr->selectFirst;
-! } else if (strncmp(string, "sel.last", length) == 0) {
-! *indexPtr = textInfoPtr->selectLast;
-! } else {
-! goto badIndex;
- }
-! } else if (string[0] == '@') {
-! int x, y, dummy, i;
- double tmp;
- char *end, *p;
-- TextLine *linePtr;
-
- p = string+1;
---- 1067,1137 ----
- TextItem *textPtr = (TextItem *) itemPtr;
- size_t length;
-+ int c;
-+ TkCanvas *canvasPtr = (TkCanvas *) canvas;
- Tk_CanvasTextInfo *textInfoPtr = textPtr->textInfoPtr;
-
-+ c = string[0];
- length = strlen(string);
-
-! if ((c == 'e') && (strncmp(string, "end", length) == 0)) {
-! *indexPtr = textPtr->numChars;
-! } else if ((c == 'i') && (strncmp(string, "insert", length) == 0)) {
-! *indexPtr = textPtr->insertPos;
-! } else if ((c == 'l') && (strncmp(string, "linestart", length) == 0)
-! && (length >= 5)) {
-! int lineNum, pos, numChars;
-! for (lineNum = 0, pos = 0; *textPtr->text;
-! lineNum++, pos += numChars + 1) {
-! numChars = strcspn(textPtr->text + pos, "\n\r");
-! if (pos + numChars >= textPtr->insertPos)
-! break;
- }
-! *indexPtr = pos;
-! } else if ((c == 'l') && (strncmp(string, "lineend", length) == 0)
-! && (length >= 5)) {
-! int lineNum, pos, numChars;
-! for (lineNum = 0, pos = 0; *textPtr->text;
-! lineNum++, pos += numChars + 1) {
-! numChars = strcspn(textPtr->text + pos, "\n\r");
-! if (pos + numChars >= textPtr->insertPos)
-! break;
- }
-! *indexPtr = pos + numChars;
-! } else if ((c == 'x') && (strncmp(string, "xinsert", length) == 0)) {
-! int lineNum, pos, numChars;
-! for (lineNum = 0, pos = 0; *textPtr->text;
-! lineNum++, pos += numChars + 1) {
-! numChars = strcspn(textPtr->text + pos, "\n\r");
-! if (pos + numChars >= textPtr->insertPos)
-! break;
-! }
-! *indexPtr = textPtr->insertPos - pos;
-! } else if ((c == 'y') && (strncmp(string, "yinsert", length) == 0)) {
-! int lineNum, pos, numChars;
-! for (lineNum = 0, pos = 0; *textPtr->text;
-! lineNum++, pos += numChars + 1) {
-! numChars = strcspn(textPtr->text + pos, "\n\r");
-! if (pos + numChars >= textPtr->insertPos)
-! break;
-! }
-! *indexPtr = lineNum;
-! } else if ((c == 's') && (strncmp(string, "sel.first", length) == 0)
-! && (length >= 5)) {
- if (textInfoPtr->selItemPtr != itemPtr) {
- interp->result = "selection isn't in item";
- return TCL_ERROR;
- }
-! *indexPtr = textInfoPtr->selectFirst;
-! } else if ((c == 's') && (strncmp(string, "sel.last", length) == 0)
-! && (length >= 5)) {
-! if (textInfoPtr->selItemPtr != itemPtr) {
-! interp->result = "selection isn't in item";
-! return TCL_ERROR;
- }
-! *indexPtr = textInfoPtr->selectLast;
-! } else if (c == '@') {
-! int x, y;
- double tmp;
- char *end, *p;
-
- p = string+1;
-***************
-*** 1398,1402 ****
- goto badIndex;
- }
-! x = (tmp < 0) ? tmp - 0.5 : tmp + 0.5;
- p = end+1;
- tmp = strtod(p, &end);
---- 1140,1144 ----
- goto badIndex;
- }
-! x = (int) ((tmp < 0) ? tmp - 0.5 : tmp + 0.5);
- p = end+1;
- tmp = strtod(p, &end);
-***************
-*** 1404,1428 ****
- goto badIndex;
- }
-! y = (tmp < 0) ? tmp - 0.5 : tmp + 0.5;
-! if ((textPtr->numChars == 0) || (y < textPtr->linePtr[0].y1)) {
-! *indexPtr = 0;
-! return TCL_OK;
-! }
-! for (i = 0, linePtr = textPtr->linePtr; ; i++, linePtr++) {
-! if (i >= textPtr->numLines) {
-! *indexPtr = textPtr->numChars;
-! return TCL_OK;
-! }
-! if (y <= linePtr->y2) {
-! break;
-! }
-! }
-! *indexPtr = TkMeasureChars(textPtr->fontPtr, linePtr->firstChar,
-! linePtr->numChars, linePtr->x, x, linePtr->x, 0, &dummy);
-! *indexPtr += linePtr->firstChar - textPtr->text;
-! } else {
-! if (Tcl_GetInt(interp, string, indexPtr) != TCL_OK) {
-! goto badIndex;
-! }
- if (*indexPtr < 0){
- *indexPtr = 0;
---- 1146,1154 ----
- goto badIndex;
- }
-! y = (int) ((tmp < 0) ? tmp - 0.5 : tmp + 0.5);
-! *indexPtr = Tk_PointToChar(textPtr->textLayout,
-! x + canvasPtr->scrollX1 - textPtr->leftEdge,
-! y + canvasPtr->scrollY1 - textPtr->header.y1);
-! } else if (Tcl_GetInt(interp, string, indexPtr) == TCL_OK) {
- if (*indexPtr < 0){
- *indexPtr = 0;
-***************
-*** 1430,1433 ****
---- 1156,1170 ----
- *indexPtr = textPtr->numChars;
- }
-+ } else {
-+ /*
-+ * Some of the paths here leave messages in interp->result,
-+ * so we have to clear it out before storing our own message.
-+ */
-+
-+ badIndex:
-+ Tcl_SetResult(interp, (char *) NULL, TCL_STATIC);
-+ Tcl_AppendResult(interp, "bad index \"", string, "\"",
-+ (char *) NULL);
-+ return TCL_ERROR;
- }
- return TCL_OK;
-***************
-*** 1556,1564 ****
- {
- TextItem *textPtr = (TextItem *) itemPtr;
-! TextLine *linePtr;
-! int i;
-! char *xoffset = NULL, *yoffset = NULL; /* Initializations needed */
-! char *justify = NULL; /* only to stop compiler
-! * warnings. */
- char buffer[500];
-
---- 1293,1299 ----
- {
- TextItem *textPtr = (TextItem *) itemPtr;
-! int x, y;
-! Tk_FontMetrics fm;
-! char *justify;
- char buffer[500];
-
-***************
-*** 1567,1573 ****
- }
-
-! if (Tk_CanvasPsFont(interp, canvas, textPtr->fontPtr) != TCL_OK) {
- return TCL_ERROR;
- }
- if (Tk_CanvasPsColor(interp, canvas, textPtr->color) != TCL_OK) {
- return TCL_ERROR;
---- 1302,1311 ----
- }
-
-! if (Tk_CanvasPsFont(interp, canvas, textPtr->tkfont) != TCL_OK) {
- return TCL_ERROR;
- }
-+ if (prepass != 0) {
-+ return TCL_OK;
-+ }
- if (Tk_CanvasPsColor(interp, canvas, textPtr->color) != TCL_OK) {
- return TCL_ERROR;
-***************
-*** 1579,1671 ****
- Tcl_AppendResult(interp, "} bind def\n", (char *) NULL);
- }
- sprintf(buffer, "%.15g %.15g [\n", textPtr->x,
- Tk_CanvasPsY(canvas, textPtr->y));
- Tcl_AppendResult(interp, buffer, (char *) NULL);
-! for (i = textPtr->numLines, linePtr = textPtr->linePtr;
-! i > 0; i--, linePtr++) {
-! Tcl_AppendResult(interp, " ", (char *) NULL);
-! LineToPostscript(interp, linePtr->firstChar,
-! linePtr->numChars);
-! Tcl_AppendResult(interp, "\n", (char *) NULL);
-! }
- switch (textPtr->anchor) {
-! case TK_ANCHOR_NW: xoffset = "0"; yoffset = "0"; break;
-! case TK_ANCHOR_N: xoffset = "-0.5"; yoffset = "0"; break;
-! case TK_ANCHOR_NE: xoffset = "-1"; yoffset = "0"; break;
-! case TK_ANCHOR_E: xoffset = "-1"; yoffset = "0.5"; break;
-! case TK_ANCHOR_SE: xoffset = "-1"; yoffset = "1"; break;
-! case TK_ANCHOR_S: xoffset = "-0.5"; yoffset = "1"; break;
-! case TK_ANCHOR_SW: xoffset = "0"; yoffset = "1"; break;
-! case TK_ANCHOR_W: xoffset = "0"; yoffset = "0.5"; break;
-! case TK_ANCHOR_CENTER: xoffset = "-0.5"; yoffset = "0.5"; break;
- }
- switch (textPtr->justify) {
-! case TK_JUSTIFY_LEFT: justify = "0"; break;
-! case TK_JUSTIFY_CENTER: justify = "0.5"; break;
-! case TK_JUSTIFY_RIGHT: justify = "1"; break;
-! }
-! sprintf(buffer, "] %d %s %s %s %s DrawText\n",
-! textPtr->fontPtr->ascent + textPtr->fontPtr->descent,
-! xoffset, yoffset, justify,
-! (textPtr->stipple == None) ? "false" : "true");
-! Tcl_AppendResult(interp, buffer, (char *) NULL);
-! return TCL_OK;
-! }
-!
-! /*
-! *--------------------------------------------------------------
-! *
-! * LineToPostscript --
-! *
-! * This procedure generates a parenthesized Postscript string
-! * describing one line of text from a text item.
-! *
-! * Results:
-! * None. The parenthesized string is appended to
-! * interp->result. It generates proper backslash notation so
-! * that Postscript can interpret the string correctly.
-! *
-! * Side effects:
-! * None.
-! *
-! *--------------------------------------------------------------
-! */
-!
-! static void
-! LineToPostscript(interp, string, numChars)
-! Tcl_Interp *interp; /* Interp whose result is to be appended to. */
-! char *string; /* String to Postscript-ify. */
-! int numChars; /* Number of characters in the string. */
-! {
-! #define BUFFER_SIZE 100
-! char buffer[BUFFER_SIZE+5];
-! int used, c;
-!
-! buffer[0] = '(';
-! used = 1;
-! for ( ; numChars > 0; string++, numChars--) {
-! c = (*string) & 0xff;
-! if ((c == '(') || (c == ')') || (c == '\\') || (c < 0x20)
-! || (c >= 0x7f)) {
-! /*
-! * Tricky point: the "03" is necessary in the sprintf below,
-! * so that a full three digits of octal are always generated.
-! * Without the "03", a number following this sequence could
-! * be interpreted by Postscript as part of this sequence.
-! */
-! sprintf(buffer+used, "\\%03o", c);
-! used += strlen(buffer+used);
-! } else {
-! buffer[used] = c;
-! used++;
-! }
-! if (used >= BUFFER_SIZE) {
-! buffer[used] = 0;
-! Tcl_AppendResult(interp, buffer, (char *) NULL);
-! used = 0;
-! }
- }
-! buffer[used] = ')';
-! buffer[used+1] = 0;
- Tcl_AppendResult(interp, buffer, (char *) NULL);
- }
---- 1317,1351 ----
- Tcl_AppendResult(interp, "} bind def\n", (char *) NULL);
- }
-+
- sprintf(buffer, "%.15g %.15g [\n", textPtr->x,
- Tk_CanvasPsY(canvas, textPtr->y));
- Tcl_AppendResult(interp, buffer, (char *) NULL);
-!
-! Tk_TextLayoutToPostscript(interp, textPtr->textLayout);
-!
-! x = 0; y = 0; justify = NULL; /* lint. */
- switch (textPtr->anchor) {
-! case TK_ANCHOR_NW: x = 0; y = 0; break;
-! case TK_ANCHOR_N: x = 1; y = 0; break;
-! case TK_ANCHOR_NE: x = 2; y = 0; break;
-! case TK_ANCHOR_E: x = 2; y = 1; break;
-! case TK_ANCHOR_SE: x = 2; y = 2; break;
-! case TK_ANCHOR_S: x = 1; y = 2; break;
-! case TK_ANCHOR_SW: x = 0; y = 2; break;
-! case TK_ANCHOR_W: x = 0; y = 1; break;
-! case TK_ANCHOR_CENTER: x = 1; y = 1; break;
- }
- switch (textPtr->justify) {
-! case TK_JUSTIFY_LEFT: justify = "0"; break;
-! case TK_JUSTIFY_CENTER: justify = "0.5";break;
-! case TK_JUSTIFY_RIGHT: justify = "1"; break;
- }
-!
-! Tk_GetFontMetrics(textPtr->tkfont, &fm);
-! sprintf(buffer, "] %d %g %g %s %s DrawText\n",
-! fm.linespace, x / -2.0, y / 2.0, justify,
-! ((textPtr->stipple == None) ? "false" : "true"));
- Tcl_AppendResult(interp, buffer, (char *) NULL);
-+
-+ return TCL_OK;
- }
-*** src/iohandler.c~ Wed Sep 4 06:54:03 1996
---- src/iohandler.c Thu Mar 5 18:03:39 1998
-***************
-*** 135,140 ****
- sockproc[fd] = callback;
- #else
-! Tcl_CreateFileHandler(Tcl_GetFile((ClientData)fd, TCL_UNIX_FD),
-! mask, callback, (ClientData)fd);
- #endif
- }
---- 135,139 ----
- sockproc[fd] = callback;
- #else
-! Tcl_CreateFileHandler(fd, mask, callback, (ClientData)fd);
- #endif
- }
-***************
-*** 148,152 ****
- }
- #else
-! Tcl_DeleteFileHandler(Tcl_GetFile((ClientData)fd, TCL_UNIX_FD));
- #endif
- }
---- 147,151 ----
- }
- #else
-! Tcl_DeleteFileHandler(fd);
- #endif
- }
-*** src/ui_init.c~ Thu Oct 17 12:20:23 1996
---- src/ui_init.c Thu Mar 5 18:03:16 1998
-***************
-*** 421,425 ****
- */
- #ifdef NOTDEF
-! Tcl_CreateFileHandler(Tcl_GetFile((ClientData)rx_fd, TCL_UNIX_FD), TK_READABLE, (Tk_FileProc *)xsockrecv, (ClientData) 0);
- #endif
- linksocket(rx_fd, TK_READABLE, xsockrecv);
---- 421,425 ----
- */
- #ifdef NOTDEF
-! Tcl_CreateFileHandler(rx_fd, TK_READABLE, (Tk_FileProc *)xsockrecv, (ClientData) 0);
- #endif
- linksocket(rx_fd, TK_READABLE, xsockrecv);
-*** src/libs.tcl~ Wed May 22 10:17:22 1996
---- src/libs.tcl Thu Mar 5 19:43:10 1998
-***************
-*** 540,549 ****
-
- scan [info tclversion] "%d.%d" a b
-! if {$a != 7} {
-! error "wrong version of Tcl loaded ([info tclversion]): need 7.x"
- }
- scan $tk_version "%d.%d" a b
-! if {($a != 4) || ($b < 0)} {
-! error "wrong version of Tk loaded ($tk_version): need 4.x"
- }
- unset a b
---- 540,549 ----
-
- scan [info tclversion] "%d.%d" a b
-! if {$a != 8} {
-! error "wrong version of Tcl loaded ([info tclversion]): need 8.x"
- }
- scan $tk_version "%d.%d" a b
-! if {($a != 8) || ($b < 0)} {
-! error "wrong version of Tk loaded ($tk_version): need 8.x"
- }
- unset a b
diff --git a/mbone/nte/patches/patch-ad b/mbone/nte/patches/patch-ad
deleted file mode 100644
index 2cb5a859d6c..00000000000
--- a/mbone/nte/patches/patch-ad
+++ /dev/null
@@ -1,20 +0,0 @@
-$NetBSD: patch-ad,v 1.8 2005/01/08 18:50:35 minskim Exp $
-
---- netbsd/Makefile.netbsd.orig 2005-01-08 12:39:02.000000000 -0600
-+++ netbsd/Makefile.netbsd
-@@ -0,0 +1,15 @@
-+CC=cc
-+INCLUDES=-I${LOCALBASE}/include -I${LOCALBASE}/include -I${X11BASE}/include -I${LOCALBASE}/include/tk/generic -I${LOCALBASE}/include/tk/unix -I${LOCALBASE}/include/tcl/generic -I${LOCALBASE}/include/tcl/unix
-+LIB_DIR=${LOCALBASE}/lib
-+LIBS=-Wl,-R${LIB_DIR} -L${LIB_DIR} -ltk83 -ltcl83 -lm -Wl,-R${X11BASE}/lib -L${X11BASE}/lib -lX11
-+CFLAGS+=$(INCLUDES) -DFREEBSD -DPROTOTYPES -DHAVE_NO_VALUES_H -DHAVE_LIMITS_H -DHAVE_UNISTD_H -DMAXINT=INT_MAX -DDEFINED_ERRLIST
-+# for search.h
-+CFLAGS+=-I../src
-+
-+OBJS+=hsearch.o
-+
-+install: all
-+ install -c -s -m 755 -o bin -g bin nt ${PREFIX}/bin
-+
-+clean:
-+ rm *.o *.tcl *.ehtml tcl2c
diff --git a/mbone/nte/patches/patch-ae b/mbone/nte/patches/patch-ae
deleted file mode 100644
index 7c23c8cc83d..00000000000
--- a/mbone/nte/patches/patch-ae
+++ /dev/null
@@ -1,12 +0,0 @@
-$NetBSD: patch-ae,v 1.3 2006/01/03 18:40:16 joerg Exp $
-
-*** src/ui_fns.c~ Thu Oct 31 10:33:03 1996
---- src/ui_fns.c Thu Mar 5 20:38:49 1998
-***************
-*** 215,218 ****
---- 215,219 ----
- user_copy(&me, &(cur_line->modifier));
- cur_line->no_of_chars = strlen(argv[3]);
-+ cur_line->status = NORMAL;
- strncpy(cur_line->line_data, argv[3], MAX_LINE_LEN);
- queue_packet_for_sending(tx_fd, cur_line, cur_line->lineid, &sendq, LINEMSG);
diff --git a/mbone/nte/patches/patch-af b/mbone/nte/patches/patch-af
deleted file mode 100644
index daedad93c0a..00000000000
--- a/mbone/nte/patches/patch-af
+++ /dev/null
@@ -1,31 +0,0 @@
-$NetBSD: patch-af,v 1.2 2007/08/10 14:07:22 joerg Exp $
-
---- src/hsearch.c.orig 1996-09-04 10:54:03.000000000 +0000
-+++ src/hsearch.c
-@@ -19,7 +19,7 @@ not, write to the Free Software Foundati
- Cambridge, MA 02139, USA. */
-
- #include "ansidecl.h"
--#include <malloc.h>
-+#include <stdlib.h>
- #include <string.h>
-
- #include "search.h"
-@@ -55,7 +55,7 @@ static unsigned filled;
- */
-
- static int
--DEFUN(isprime, (number), unsigned number)
-+DEFUN(isprime, (number), size_t number)
- {
- /* no even number will be passed */
- unsigned div = 3;
-@@ -76,7 +76,7 @@ DEFUN(isprime, (number), unsigned number
- */
-
- int
--DEFUN(hcreate, (nel), unsigned nel)
-+DEFUN(hcreate, (nel), size_t nel)
- {
- /* There is still a table active. Return with error. */
- if (htable != NULL)
diff --git a/mbone/nte/patches/patch-ag b/mbone/nte/patches/patch-ag
deleted file mode 100644
index 4ae2811a2de..00000000000
--- a/mbone/nte/patches/patch-ag
+++ /dev/null
@@ -1,12 +0,0 @@
-$NetBSD: patch-ag,v 1.1 2000/12/03 06:17:37 mycroft Exp $
-
---- src/network_write.c.orig Thu Oct 31 15:29:41 1996
-+++ src/network_write.c Sun Dec 3 06:12:40 2000
-@@ -33,6 +33,7 @@
-
- #include "prototypes.h"
- #include <sys/types.h>
-+#include "crypt/crypt.h"
- /*Rate in *bytes* per second we are allowed to send*/
- extern int data_rate;
-
diff --git a/mbone/nte/patches/patch-ah b/mbone/nte/patches/patch-ah
deleted file mode 100644
index 5c0cfe0baa6..00000000000
--- a/mbone/nte/patches/patch-ah
+++ /dev/null
@@ -1,7 +0,0 @@
-$NetBSD: patch-ah,v 1.1 2005/01/08 18:50:35 minskim Exp $
-
---- netbsd/configure.orig 2005-01-08 12:39:02.000000000 -0600
-+++ netbsd/configure
-@@ -0,0 +1,2 @@
-+#!/bin/sh
-+cat ../src/Makefile.template Makefile.netbsd > Makefile
diff --git a/mbone/nte/patches/patch-ai b/mbone/nte/patches/patch-ai
deleted file mode 100644
index f32d9758cf2..00000000000
--- a/mbone/nte/patches/patch-ai
+++ /dev/null
@@ -1,7 +0,0 @@
-$NetBSD: patch-ai,v 1.1 2005/01/08 18:50:35 minskim Exp $
-
---- Makefile.orig 2005-01-08 12:46:09.000000000 -0600
-+++ Makefile
-@@ -0,0 +1,2 @@
-+all install clean:
-+ cd netbsd && make $@
diff --git a/mbone/nte/patches/patch-aj b/mbone/nte/patches/patch-aj
deleted file mode 100644
index 782388651b3..00000000000
--- a/mbone/nte/patches/patch-aj
+++ /dev/null
@@ -1,25 +0,0 @@
-$NetBSD: patch-aj,v 1.2 2007/08/10 14:07:22 joerg Exp $
-
---- src/qfdes/qfDES-memory.c.orig 1996-09-04 13:16:14.000000000 +0000
-+++ src/qfdes/qfDES-memory.c
-@@ -10,9 +10,10 @@ February 1993
- #if !defined(_qfDES_memory_c_)
- #define _qfDES_memory_c_
-
-+#include <errno.h>
- #include <stdio.h>
- #include <memory.h>
--#include <malloc.h>
-+#include <stdlib.h>
- #include <ctype.h>
- #include "qfDES.h"
-
-@@ -20,8 +21,6 @@ February 1993
- extern int sys_nerr;
- extern char *sys_errlist[];
- #endif
--extern int errno;
--
-
- #if defined(DEBUG)
- #define ERROR(s_) \
diff --git a/mbone/nte/patches/patch-ak b/mbone/nte/patches/patch-ak
deleted file mode 100644
index fc913f837d5..00000000000
--- a/mbone/nte/patches/patch-ak
+++ /dev/null
@@ -1,12 +0,0 @@
-$NetBSD: patch-ak,v 1.1 2007/08/10 14:07:22 joerg Exp $
-
---- src/www_fns.c.orig 2007-08-10 13:11:03.000000000 +0000
-+++ src/www_fns.c
-@@ -42,7 +42,6 @@
- #include "ui_fns.h"
- #include <tcl.h>
- #include <tk.h>
--#include <malloc.h>
- #include <string.h>
- #include <fcntl.h>
- #include <errno.h>
diff --git a/mbone/sdr/DESCR b/mbone/sdr/DESCR
deleted file mode 100644
index fd77f78b054..00000000000
--- a/mbone/sdr/DESCR
+++ /dev/null
@@ -1,4 +0,0 @@
-Sdr is a session directory tool designed to allow the advertisement
-and joining of multicast conferences on the Mbone. It was originally
-based on sd written by Van Jacobson at LBNL, but implements a later
-version of the session description protocol than sd does.
diff --git a/mbone/sdr/Makefile b/mbone/sdr/Makefile
deleted file mode 100644
index f4151248950..00000000000
--- a/mbone/sdr/Makefile
+++ /dev/null
@@ -1,60 +0,0 @@
-# $NetBSD: Makefile,v 1.54 2012/10/08 09:25:50 asau Exp $
-
-DISTNAME= sdr-3.0
-PKGREVISION= 2
-CATEGORIES= mbone tk
-MASTER_SITES= http://www-mice.cs.ucl.ac.uk/multimedia/software/sdr/3.0/
-
-MAINTAINER= is@NetBSD.org
-HOMEPAGE= http://www-mice.cs.ucl.ac.uk/multimedia/software/sdr/
-COMMENT= MBone Session Directory
-
-BROKEN= Depends on TCL/TK 8.3
-
-WRKSRC= ${WRKDIR}/sdr/${SYSDIR}
-CRYPTO= yes
-USE_TOOLS+= gmake
-HAS_CONFIGURE= yes
-
-PKG_OPTIONS_VAR= PKG_OPTIONS.sdr
-PKG_SUPPORTED_OPTIONS= inet6
-PKG_SUGGESTED_OPTIONS= inet6
-
-.include "../../mk/bsd.options.mk"
-
-.if !empty(PKG_OPTIONS:Minet6)
-CONFIGURE_ARGS+= --enable-ipv6
-.endif
-
-.if exists(/usr/include/sys/inttypes.h)
-EXTRA_FLAGS+= -DHAVE_SYS_INTTYPES_H
-MAKE_FLAGS+= EXTRA_FLAGS=${EXTRA_FLAGS:Q}
-.endif
-
-.if ${OPSYS} == "SunOS"
-SYSDIR= solaris
-.else
-SYSDIR= freebsd
-.endif
-
-INSTALLATION_DIRS= bin
-
-post-patch:
- ${MV} ${WRKSRC}/../src/sdr.tcl ${WRKSRC}/../src/sdr.tcl.in && \
- ${SED} -e 's|@PREFIX@|${PREFIX}|' ${WRKSRC}/../src/sdr.tcl.in > \
- ${WRKSRC}/../src/sdr.tcl
-
-.if ${OPSYS} == "SunOS"
-post-configure:
- # Untested for sdr 3.0 !!!
- ${CAT} ${WRKSRC}/sdr/solaris/Makefile.solaris \
- ${WRKSRC}/sdr/src/Makefile.template \
- > ${WRKSRC}/sdr/solaris/Makefile
-.endif
-
-do-install:
- ${INSTALL_PROGRAM} ${WRKSRC}/sdr ${DESTDIR}${PREFIX}/bin/sdr
-
-.include "../../mbone/common-mml/buildlink3.mk"
-#.include "../../x11/tk83/buildlink3.mk"
-.include "../../mk/bsd.pkg.mk"
diff --git a/mbone/sdr/PLIST b/mbone/sdr/PLIST
deleted file mode 100644
index 6ab47b80f3c..00000000000
--- a/mbone/sdr/PLIST
+++ /dev/null
@@ -1,2 +0,0 @@
-@comment $NetBSD: PLIST,v 1.1 2001/10/31 21:35:09 zuntum Exp $
-bin/sdr
diff --git a/mbone/sdr/distinfo b/mbone/sdr/distinfo
deleted file mode 100644
index 38e073c0fd9..00000000000
--- a/mbone/sdr/distinfo
+++ /dev/null
@@ -1,11 +0,0 @@
-$NetBSD: distinfo,v 1.6 2009/12/02 08:19:02 snj Exp $
-
-SHA1 (sdr-3.0.tar.gz) = b411aa168ce35348af898f54a2588b62810a1d83
-RMD160 (sdr-3.0.tar.gz) = ee5663a303c850063a807ad60647d7cbc06ababa
-Size (sdr-3.0.tar.gz) = 304691 bytes
-SHA1 (patch-aa) = 13be7ff0bffb042654e82ea6a02ab826c82f3c64
-SHA1 (patch-ab) = b96c341745f8b6f060c39326d3f3853079be6bda
-SHA1 (patch-ac) = a8b18c0c548284f417c07d12e64957225bc455a6
-SHA1 (patch-ad) = be6bdb0a757746befe22dfda684f8e03464b411d
-SHA1 (patch-ae) = 092a76dbbd92bdaef07c2ee8994d191654087642
-SHA1 (patch-af) = 4a288e3a7fd9e395b9264f05c97bcb4d5465ede5
diff --git a/mbone/sdr/files/Makefile.netbsd b/mbone/sdr/files/Makefile.netbsd
deleted file mode 100644
index 4b17ca6cfdc..00000000000
--- a/mbone/sdr/files/Makefile.netbsd
+++ /dev/null
@@ -1,11 +0,0 @@
-# $NetBSD: Makefile.netbsd,v 1.8 2000/09/08 18:58:06 jwise Exp $
-
-CC = gcc -g -O
-INCLUDES = -I${X11BASE}/include -I${LOCALBASE}/include/tk/generic -I${LOCALBASE}/include/tcl/generic -I../../common
-LIBS = -L${LOCALBASE}/lib -ltk83 -ltcl83 ../../common/libcommon.a \
- -lm -L${X11BASE}/lib -lX11 -lz \
- -Wl,-R${LOCALBASE}/lib -Wl,-R${X11BASE}/lib
-CFLAGS = $(INCLUDES) -DDIFF_BYTE_ORDER -DNORANDPROTO -DDEFINED_ERRLIST \
- -Wall -DAUTH -DHAVE_ZLIB
-
-all:: sdr
diff --git a/mbone/sdr/patches/patch-aa b/mbone/sdr/patches/patch-aa
deleted file mode 100644
index 821ff099c0f..00000000000
--- a/mbone/sdr/patches/patch-aa
+++ /dev/null
@@ -1,15 +0,0 @@
-$NetBSD: patch-aa,v 1.9 2000/12/17 09:39:53 hubertf Exp $
-
---- Makefile.freebsd.orig Mon Sep 4 18:30:29 2000
-+++ Makefile.freebsd
-@@ -1,7 +1,7 @@
- CC = gcc -g -O
--INCLUDES = -I/usr/X11R6/include -I../../tk-8.0/generic -I../../tcl-8.0/generic -I../../common
--LIBS = ../../tk-8.0/unix/libtk80.a ../../tcl-8.0/unix/libtcl80.a ../../common/libuclmmbase.a -lm -L/usr/X11R6/lib -lX11 -lz $(ILIBS)
--CFLAGS = $(INCLUDES) -DDIFF_BYTE_ORDER -DFREEBSD -DNORANDPROTO -DDEFINED_ERRLIST -Wall -DAUTH -DHAVE_ZLIB -DFreeBSD -DHAVE_CONFIG_H $(IFLAGS)
-+INCLUDES = -I${X11BASE}/include -I${LOCALBASE}/include/tk/generic -I${LOCALBASE}/include/tcl/generic -I${LOCALBASE}/include/common-mml
-+LIBS = -L${LOCALBASE}/lib -Wl,-R${LOCALBASE}/lib -ltk83 -ltcl83 -luclmmbase -lm -L${X11BASE}/lib -Wl,-R${X11BASE}/lib -lX11 -lz $(ILIBS)
-+CFLAGS = $(INCLUDES) -DDIFF_BYTE_ORDER -DFREEBSD -DNORANDPROTO -DDEFINED_ERRLIST -Wall -DAUTH -DHAVE_ZLIB -DFreeBSD -DHAVE_CONFIG_H $(IFLAGS) -DTcl_Eval=sdr_Tcl_Eval
-
- all:: sdr
- install:
diff --git a/mbone/sdr/patches/patch-ab b/mbone/sdr/patches/patch-ab
deleted file mode 100644
index c1ab00f7d86..00000000000
--- a/mbone/sdr/patches/patch-ab
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD: patch-ab,v 1.9 2000/12/17 09:39:53 hubertf Exp $
-
---- ../src/Makefile.template.orig Sat Dec 16 09:15:29 2000
-+++ ../src/Makefile.template
-@@ -88,7 +88,7 @@
- $(SDR_UI_FILES): tcl2c
-
- parsed_plugins.tcl: ../src/plugin2tcl.tcl
-- tclsh8.0 ../src/plugin2tcl.tcl
-+ tclsh ../src/plugin2tcl.tcl
-
- uweb: $(WWWOBJS)
- $(CC) -ggdb -o uweb $(WWWOBJS) $(LIBS)
diff --git a/mbone/sdr/patches/patch-ac b/mbone/sdr/patches/patch-ac
deleted file mode 100644
index fba1331e116..00000000000
--- a/mbone/sdr/patches/patch-ac
+++ /dev/null
@@ -1,27 +0,0 @@
-$NetBSD: patch-ac,v 1.8 2000/12/17 09:39:53 hubertf Exp $
-
---- ../src/tkUnixInit.c.orig Mon Sep 4 18:30:41 2000
-+++ ../src/tkUnixInit.c
-@@ -11,3 +11,22 @@
- #endif
- return (TCL_OK);
- }
-+
-+#ifdef __NetBSD__
-+int
-+sdr_Tcl_Eval (Tcl_Interp *interp, char *script)
-+{
-+ char *copy = strdup (script);
-+ int ret;
-+#ifdef __NetBSD__
-+#ifdef Tcl_Eval
-+#undef Tcl_Eval
-+ int Tcl_Eval (Tcl_Interp *interp, char *script);
-+#endif
-+#endif
-+ if (copy == NULL) abort();
-+ ret = Tcl_Eval (interp, copy);
-+ free (copy);
-+ return ret;
-+}
-+#endif /* __NetBSD__ */
diff --git a/mbone/sdr/patches/patch-ad b/mbone/sdr/patches/patch-ad
deleted file mode 100644
index d7548c1e9b9..00000000000
--- a/mbone/sdr/patches/patch-ad
+++ /dev/null
@@ -1,30 +0,0 @@
-$NetBSD: patch-ad,v 1.11 2003/07/03 14:40:49 agc Exp $
-
---- ../src/sdr.tcl.orig Mon Sep 4 18:30:39 2000
-+++ ../src/sdr.tcl
-@@ -4457,7 +4457,7 @@
-
- # find where we are installed
- set app_name $argv0
--while {[file type $app_name] == "link"} {
-+while {([file isfile $app_name]) && ([file type $app_name] == "link")} {
- # don't worry about recursion since we know app must exist.
- set app_name [file readlink $app_name]
- }
-@@ -4470,6 +4470,7 @@
- $app_home/sdr/plugins \
- $app_home/plugins \
- $app_home/../plugins \
-+ @PREFIX@/etc/sdr/plugins \
- /usr/local/etc/sdr/plugins \
- [resource sdrHome]/plugins \
- ]
-@@ -4538,7 +4539,7 @@
-
- # find where we are installed
- set app_name $argv0
--while {[file type $app_name] == "link"} {
-+while {([file isfile $app_name]) && ([file type $app_name] == "link")} {
- # don't worry about recursion since we know app must exist.
- set app_name [file readlink $app_name]
- }
diff --git a/mbone/sdr/patches/patch-ae b/mbone/sdr/patches/patch-ae
deleted file mode 100644
index 640cfe4d77a..00000000000
--- a/mbone/sdr/patches/patch-ae
+++ /dev/null
@@ -1,14 +0,0 @@
-$NetBSD: patch-ae,v 1.7 2000/12/28 13:30:21 hubertf Exp $
-
---- ../src/ui_fns.c.orig Mon Sep 4 18:30:43 2000
-+++ ../src/ui_fns.c
-@@ -274,7 +274,8 @@
- u_int base;
- char buf[128];
-
-- Tcl_Eval(interp, "clock format [clock seconds] -format %w");
-+ sprintf(buf, "clock format [clock seconds] -format %w");
-+ Tcl_Eval(interp, buf);
- base = atoi(interp->result);
- for(i=0;i<7;i++)
- {
diff --git a/mbone/sdr/patches/patch-af b/mbone/sdr/patches/patch-af
deleted file mode 100644
index b9ce5f78a6a..00000000000
--- a/mbone/sdr/patches/patch-af
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD: patch-af,v 1.6 2009/12/02 08:19:02 snj Exp $
-
---- ../freebsd/configure.orig 2009-12-02 00:06:42.000000000 -0800
-+++ ../freebsd/configure 2009-12-02 00:06:38.000000000 -0800
-@@ -1,7 +1,7 @@
- #!/bin/sh
- if test "$1" = "--enable-ipv6"
- then
-- (echo "IFLAGS=-DHAVE_IPV6"; echo "ILIBS=-L/usr/local/v6/lib -linet6"; cat Makefile.freebsd ../src/Makefile.template) > Makefile
-+ (echo "IFLAGS=-DHAVE_IPV6"; cat Makefile.freebsd ../src/Makefile.template) > Makefile
- else
- cat Makefile.freebsd ../src/Makefile.template > Makefile
- fi