Index: head/textproc/gdict/files/patch-aa =================================================================== --- head/textproc/gdict/files/patch-aa (revision 363335) +++ head/textproc/gdict/files/patch-aa (nonexistent) @@ -1,14 +0,0 @@ ---- Makefile Mon Mar 29 08:02:27 1999 -+++ Makefile~ Thu Jul 22 22:25:09 1999 -@@ -1,8 +1,8 @@ - # Makefile for gdict - --CC = gcc --CFLAGS = -O6 -Wall --CFL_GTK = $(CFLAGS) `gtk-config --cflags` `gtk-config --libs` -+CC ?= gcc -+CFLAGS ?= -O6 -Wall -+CFL_GTK = $(CFLAGS) `$(GTK_CONFIG) --cflags` `$(GTK_CONFIG) --libs` - CFL = $(CFLAGS) - OBJECTS_GDICT = gdict.c - OBJECTS_DICT = dict.c Property changes on: head/textproc/gdict/files/patch-aa ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/textproc/gdict/files/patch-ab =================================================================== --- head/textproc/gdict/files/patch-ab (revision 363335) +++ head/textproc/gdict/files/patch-ab (nonexistent) @@ -1,25 +0,0 @@ ---- dict.c Mon Mar 29 08:10:35 1999 -+++ dict.c~ Thu Jul 22 22:25:16 1999 -@@ -4,11 +4,12 @@ - * Thanks goes out to #linuxos also. :) - */ - -+#include - #include - #include - #include --#include - #include -+#include - #include - - int main (int argc, char *argv[]) { -@@ -40,7 +41,7 @@ - Sockaddr.sin_port = htons(2627); - Sockaddr.sin_addr.s_addr = inet_addr("128.52.39.7"); - -- err = connect (sd, &Sockaddr, sizeof(Sockaddr) ); -+ err = connect (sd, (struct sockaddr *) &Sockaddr, sizeof(Sockaddr) ); - - if (err != 0) { - printf("Could not connect to dictionary server!\n"); Property changes on: head/textproc/gdict/files/patch-ab ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/textproc/gdict/files/patch-ac =================================================================== --- head/textproc/gdict/files/patch-ac (revision 363335) +++ head/textproc/gdict/files/patch-ac (nonexistent) @@ -1,26 +0,0 @@ ---- gdict.c Mon Mar 29 17:35:54 1999 -+++ gdict.c~ Thu Jul 22 22:25:19 1999 -@@ -13,12 +13,13 @@ - * Window resizing and cleanup by Iain (Nodatadj, EFNet) 23-Mar-1999 - */ - -+#include - #include - #include - #include - #include --#include - #include -+#include - #include - - /* globals */ -@@ -154,7 +155,7 @@ - Sockaddr.sin_port = htons(2627); - Sockaddr.sin_addr.s_addr = inet_addr ("128.52.39.7"); - -- err = connect (sd, &Sockaddr, sizeof(Sockaddr)); -+ err = connect (sd, (struct sockaddr *) &Sockaddr, sizeof(Sockaddr)); - - if (err != 0) { - sprintf (buffer, "Could not connect to dictionary server!"); Property changes on: head/textproc/gdict/files/patch-ac ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/textproc/gdict/files/patch-Makefile =================================================================== --- head/textproc/gdict/files/patch-Makefile (nonexistent) +++ head/textproc/gdict/files/patch-Makefile (revision 363336) @@ -0,0 +1,14 @@ +--- Makefile Mon Mar 29 08:02:27 1999 ++++ Makefile~ Thu Jul 22 22:25:09 1999 +@@ -1,8 +1,8 @@ + # Makefile for gdict + +-CC = gcc +-CFLAGS = -O6 -Wall +-CFL_GTK = $(CFLAGS) `gtk-config --cflags` `gtk-config --libs` ++CC ?= gcc ++CFLAGS ?= -O6 -Wall ++CFL_GTK = $(CFLAGS) `$(GTK_CONFIG) --cflags` `$(GTK_CONFIG) --libs` + CFL = $(CFLAGS) + OBJECTS_GDICT = gdict.c + OBJECTS_DICT = dict.c Property changes on: head/textproc/gdict/files/patch-Makefile ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/textproc/gdict/files/patch-dict.c =================================================================== --- head/textproc/gdict/files/patch-dict.c (nonexistent) +++ head/textproc/gdict/files/patch-dict.c (revision 363336) @@ -0,0 +1,25 @@ +--- dict.c Mon Mar 29 08:10:35 1999 ++++ dict.c~ Thu Jul 22 22:25:16 1999 +@@ -4,11 +4,12 @@ + * Thanks goes out to #linuxos also. :) + */ + ++#include + #include + #include + #include +-#include + #include ++#include + #include + + int main (int argc, char *argv[]) { +@@ -40,7 +41,7 @@ + Sockaddr.sin_port = htons(2627); + Sockaddr.sin_addr.s_addr = inet_addr("128.52.39.7"); + +- err = connect (sd, &Sockaddr, sizeof(Sockaddr) ); ++ err = connect (sd, (struct sockaddr *) &Sockaddr, sizeof(Sockaddr) ); + + if (err != 0) { + printf("Could not connect to dictionary server!\n"); Property changes on: head/textproc/gdict/files/patch-dict.c ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/textproc/gdict/files/patch-gdict.c =================================================================== --- head/textproc/gdict/files/patch-gdict.c (nonexistent) +++ head/textproc/gdict/files/patch-gdict.c (revision 363336) @@ -0,0 +1,26 @@ +--- gdict.c Mon Mar 29 17:35:54 1999 ++++ gdict.c~ Thu Jul 22 22:25:19 1999 +@@ -13,12 +13,13 @@ + * Window resizing and cleanup by Iain (Nodatadj, EFNet) 23-Mar-1999 + */ + ++#include + #include + #include + #include + #include +-#include + #include ++#include + #include + + /* globals */ +@@ -154,7 +155,7 @@ + Sockaddr.sin_port = htons(2627); + Sockaddr.sin_addr.s_addr = inet_addr ("128.52.39.7"); + +- err = connect (sd, &Sockaddr, sizeof(Sockaddr)); ++ err = connect (sd, (struct sockaddr *) &Sockaddr, sizeof(Sockaddr)); + + if (err != 0) { + sprintf (buffer, "Could not connect to dictionary server!"); Property changes on: head/textproc/gdict/files/patch-gdict.c ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/textproc/jade/files/patch-ac =================================================================== --- head/textproc/jade/files/patch-ac (revision 363335) +++ head/textproc/jade/files/patch-ac (nonexistent) @@ -1,19 +0,0 @@ -*** lib/instmac.m4.orig Sun Jul 6 20:20:04 1997 ---- lib/instmac.m4 Sun Jul 6 20:20:54 1997 -*************** -*** 75,81 **** - __undefine(`undefine')__dnl - __undefine(`undivert')__dnl - __undefine(`unix')__dnl -! __dnl __changequote(,)__dnl disable quoting - - #ifdef SP_NAMESPACE - } ---- 75,81 ---- - __undefine(`undefine')__dnl - __undefine(`undivert')__dnl - __undefine(`unix')__dnl -! __dnl __changequote(,)__dnl - - #ifdef SP_NAMESPACE - } Property changes on: head/textproc/jade/files/patch-ac ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/textproc/jade/files/patch-lib__instmac.m4 =================================================================== --- head/textproc/jade/files/patch-lib__instmac.m4 (nonexistent) +++ head/textproc/jade/files/patch-lib__instmac.m4 (revision 363336) @@ -0,0 +1,19 @@ +*** lib/instmac.m4.orig Sun Jul 6 20:20:04 1997 +--- lib/instmac.m4 Sun Jul 6 20:20:54 1997 +*************** +*** 75,81 **** + __undefine(`undefine')__dnl + __undefine(`undivert')__dnl + __undefine(`unix')__dnl +! __dnl __changequote(,)__dnl disable quoting + + #ifdef SP_NAMESPACE + } +--- 75,81 ---- + __undefine(`undefine')__dnl + __undefine(`undivert')__dnl + __undefine(`unix')__dnl +! __dnl __changequote(,)__dnl + + #ifdef SP_NAMESPACE + } Property changes on: head/textproc/jade/files/patch-lib__instmac.m4 ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/textproc/libxslt/files/patch-aa =================================================================== --- head/textproc/libxslt/files/patch-aa (revision 363335) +++ head/textproc/libxslt/files/patch-aa (nonexistent) @@ -1,12 +0,0 @@ ---- Makefile.in.orig 2012-10-22 16:13:46.000000000 +0000 -+++ Makefile.in 2012-10-22 16:14:29.000000000 +0000 -@@ -327,8 +327,7 @@ - libexslt \ - xsltproc \ - doc \ -- $(PYTHON_SUBDIR) \ -- tests -+ $(PYTHON_SUBDIR) - - DIST_SUBDIRS = libxslt libexslt xsltproc python doc tests - confexecdir = $(libdir) Property changes on: head/textproc/libxslt/files/patch-aa ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/textproc/libxslt/files/patch-ab =================================================================== --- head/textproc/libxslt/files/patch-ab (revision 363335) +++ head/textproc/libxslt/files/patch-ab (nonexistent) @@ -1,8 +0,0 @@ ---- libxslt/xsltconfig.h.in.orig Mon Mar 26 20:55:08 2001 -+++ libxslt/xsltconfig.h.in Thu Apr 19 22:20:46 2001 -@@ -23,3 +23,5 @@ - #ifdef __GNUC__ -+#ifndef __FreeBSD__ - #include -+#endif - #ifndef ATTRIBUTE_UNUSED Property changes on: head/textproc/libxslt/files/patch-ab ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/textproc/libxslt/files/patch-Makefile.in =================================================================== --- head/textproc/libxslt/files/patch-Makefile.in (nonexistent) +++ head/textproc/libxslt/files/patch-Makefile.in (revision 363336) @@ -0,0 +1,12 @@ +--- Makefile.in.orig 2012-10-22 16:13:46.000000000 +0000 ++++ Makefile.in 2012-10-22 16:14:29.000000000 +0000 +@@ -327,8 +327,7 @@ + libexslt \ + xsltproc \ + doc \ +- $(PYTHON_SUBDIR) \ +- tests ++ $(PYTHON_SUBDIR) + + DIST_SUBDIRS = libxslt libexslt xsltproc python doc tests + confexecdir = $(libdir) Property changes on: head/textproc/libxslt/files/patch-Makefile.in ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/textproc/libxslt/files/patch-libxslt__xsltconfig.h.in =================================================================== --- head/textproc/libxslt/files/patch-libxslt__xsltconfig.h.in (nonexistent) +++ head/textproc/libxslt/files/patch-libxslt__xsltconfig.h.in (revision 363336) @@ -0,0 +1,8 @@ +--- libxslt/xsltconfig.h.in.orig Mon Mar 26 20:55:08 2001 ++++ libxslt/xsltconfig.h.in Thu Apr 19 22:20:46 2001 +@@ -23,3 +23,5 @@ + #ifdef __GNUC__ ++#ifndef __FreeBSD__ + #include ++#endif + #ifndef ATTRIBUTE_UNUSED Property changes on: head/textproc/libxslt/files/patch-libxslt__xsltconfig.h.in ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/textproc/man2html/files/patch-aa =================================================================== --- head/textproc/man2html/files/patch-aa (revision 363335) +++ head/textproc/man2html/files/patch-aa (nonexistent) @@ -1,67 +0,0 @@ ---- man.cgi.orig Wed Aug 13 01:19:18 1997 -+++ man.cgi Sat Sep 30 00:46:55 2000 -@@ -1,4 +1,4 @@ --#!/usr/local/bin/perl -+#!/usr/bin/perl5.00503 - ##---------------------------------------------------------------------------## - ## File: - ## @(#) man.cgi 1.2 97/08/12 12:58:26 @(#) -@@ -59,8 +59,8 @@ - ## systems. If using Tom Christiansen's Perl man program, than - ## define use "". - --#$SectOpt = ""; --$SectOpt = "-s"; -+$SectOpt = ""; -+#$SectOpt = "-s"; - - ## man2html program (needs to be a full pathname) - -@@ -77,15 +77,15 @@ - - #@ConvArgs = ("-compress"); - #@ConvArgs = ("-compress", "-leftm", "1", "-topm", "8"); --@ConvArgs = ("-compress", "-sun"); -+#@ConvArgs = ("-compress", "-sun"); - - ## Keyword search processing arguments for man2html. Normally, - ## '-k' is adequate. However, if on a Solaris system, the - ## '-solaris' option should be specified with '-k'. See - ## man2html documentation on information about the '-solaris' option. - --#@KeyWArgs = ("-k"); # Normal --@KeyWArgs = ("-k", "-solaris"); # For Solaris -+@KeyWArgs = ("-k"); # Normal -+#@KeyWArgs = ("-k", "-solaris"); # For Solaris - - ## Possible manual sections. This array is used to determine the - ## the choices available in an option menu. -@@ -124,9 +124,9 @@ - ## know about - - @ManPath = qw( -+ /usr/share/man - /usr/local/man -- /usr/openwin/man -- /usr/man -+ /usr/X11R6/man - ); - - ## PATH setting. Modify as see fit. Once useful modification -@@ -134,7 +134,6 @@ - ## be invoked over the systems nroff when man formats a manpage. - - @Path = qw( -- /opt/FSFgroff/bin - /bin - /usr/bin - ); -@@ -270,7 +269,7 @@ - - # Convert output from man to html - #-------------------------------- -- close(STDERR); -+ open(STDERR, ">&/dev/null"); - open(MANPRG, "-|") or exec($ManPrg, @manargs); - $Man2Html::InFH = \*MANPRG; # set input filehandle - require $ManConvPrg or Property changes on: head/textproc/man2html/files/patch-aa ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/textproc/man2html/files/patch-man.cgi =================================================================== --- head/textproc/man2html/files/patch-man.cgi (nonexistent) +++ head/textproc/man2html/files/patch-man.cgi (revision 363336) @@ -0,0 +1,67 @@ +--- man.cgi.orig Wed Aug 13 01:19:18 1997 ++++ man.cgi Sat Sep 30 00:46:55 2000 +@@ -1,4 +1,4 @@ +-#!/usr/local/bin/perl ++#!/usr/bin/perl5.00503 + ##---------------------------------------------------------------------------## + ## File: + ## @(#) man.cgi 1.2 97/08/12 12:58:26 @(#) +@@ -59,8 +59,8 @@ + ## systems. If using Tom Christiansen's Perl man program, than + ## define use "". + +-#$SectOpt = ""; +-$SectOpt = "-s"; ++$SectOpt = ""; ++#$SectOpt = "-s"; + + ## man2html program (needs to be a full pathname) + +@@ -77,15 +77,15 @@ + + #@ConvArgs = ("-compress"); + #@ConvArgs = ("-compress", "-leftm", "1", "-topm", "8"); +-@ConvArgs = ("-compress", "-sun"); ++#@ConvArgs = ("-compress", "-sun"); + + ## Keyword search processing arguments for man2html. Normally, + ## '-k' is adequate. However, if on a Solaris system, the + ## '-solaris' option should be specified with '-k'. See + ## man2html documentation on information about the '-solaris' option. + +-#@KeyWArgs = ("-k"); # Normal +-@KeyWArgs = ("-k", "-solaris"); # For Solaris ++@KeyWArgs = ("-k"); # Normal ++#@KeyWArgs = ("-k", "-solaris"); # For Solaris + + ## Possible manual sections. This array is used to determine the + ## the choices available in an option menu. +@@ -124,9 +124,9 @@ + ## know about + + @ManPath = qw( ++ /usr/share/man + /usr/local/man +- /usr/openwin/man +- /usr/man ++ /usr/X11R6/man + ); + + ## PATH setting. Modify as see fit. Once useful modification +@@ -134,7 +134,6 @@ + ## be invoked over the systems nroff when man formats a manpage. + + @Path = qw( +- /opt/FSFgroff/bin + /bin + /usr/bin + ); +@@ -270,7 +269,7 @@ + + # Convert output from man to html + #-------------------------------- +- close(STDERR); ++ open(STDERR, ">&/dev/null"); + open(MANPRG, "-|") or exec($ManPrg, @manargs); + $Man2Html::InFH = \*MANPRG; # set input filehandle + require $ManConvPrg or Property changes on: head/textproc/man2html/files/patch-man.cgi ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/textproc/mgdiff/Makefile =================================================================== --- head/textproc/mgdiff/Makefile (revision 363335) +++ head/textproc/mgdiff/Makefile (revision 363336) @@ -1,23 +1,23 @@ # Created by: andreas@marvin.robin.de # $FreeBSD$ PORTNAME= mgdiff PORTVERSION= 1.0 PORTREVISION= 3 CATEGORIES= textproc MASTER_SITES= ${MASTER_SITE_XCONTRIB} MASTER_SITE_SUBDIR= applications DISTNAME= ${PORTNAME} MAINTAINER= ports@FreeBSD.org COMMENT= Graphical front end to the Unix diff command USES= imake motif USE_XORG= ice sm x11 xext xmu xp xt SUB_FILES= pkg-message post-install: @${MKDIR} ${STAGEDIR}${PREFIX}/lib/X11/mgdiff - @${INSTALL_DATA} ${WRKSRC}/mgdiff.x[bp]m ${STAGEDIR}${PREFIX}/lib/X11/mgdiff + ${INSTALL_DATA} ${WRKSRC}/mgdiff.x[bp]m ${STAGEDIR}${PREFIX}/lib/X11/mgdiff .include Index: head/textproc/mgdiff/files/patch-aa =================================================================== --- head/textproc/mgdiff/files/patch-aa (revision 363335) +++ head/textproc/mgdiff/files/patch-aa (nonexistent) @@ -1,27 +0,0 @@ -*** Imakefile.orig Thu May 19 04:01:00 1994 ---- Imakefile Sat Nov 2 17:06:31 1996 -*************** -*** 5,14 **** - XCOMM Imakefile,v 2.0 1994/05/19 02:01:00 dan Exp - -! XMLIB = -lXm - XCOMM -! XCOMM for Dell SVR4 - XCOMM -! EXTRA_LIBRARIES = -lc -lucb - - SRCS = mgdiff.c rundiff.c misc.c files.c spawn.c manual.c modal.c legend.c - OBJS = mgdiff.o rundiff.o misc.o files.o spawn.o manual.o modal.o legend.o ---- 5,16 ---- - XCOMM Imakefile,v 2.0 1994/05/19 02:01:00 dan Exp - -! XMLIB = ${MOTIFLIB} -+ - XCOMM -! XCOMM The gnuregex library is needed for the Motif file selection box widget. - XCOMM -! XCOMM -! EXTRA_LIBRARIES = -lgnuregex - - SRCS = mgdiff.c rundiff.c misc.c files.c spawn.c manual.c modal.c legend.c - OBJS = mgdiff.o rundiff.o misc.o files.o spawn.o manual.o modal.o legend.o Property changes on: head/textproc/mgdiff/files/patch-aa ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/textproc/mgdiff/files/patach-Imakefile =================================================================== --- head/textproc/mgdiff/files/patach-Imakefile (nonexistent) +++ head/textproc/mgdiff/files/patach-Imakefile (revision 363336) @@ -0,0 +1,27 @@ +*** Imakefile.orig Thu May 19 04:01:00 1994 +--- Imakefile Sat Nov 2 17:06:31 1996 +*************** +*** 5,14 **** + XCOMM Imakefile,v 2.0 1994/05/19 02:01:00 dan Exp + +! XMLIB = -lXm + XCOMM +! XCOMM for Dell SVR4 + XCOMM +! EXTRA_LIBRARIES = -lc -lucb + + SRCS = mgdiff.c rundiff.c misc.c files.c spawn.c manual.c modal.c legend.c + OBJS = mgdiff.o rundiff.o misc.o files.o spawn.o manual.o modal.o legend.o +--- 5,16 ---- + XCOMM Imakefile,v 2.0 1994/05/19 02:01:00 dan Exp + +! XMLIB = ${MOTIFLIB} ++ + XCOMM +! XCOMM The gnuregex library is needed for the Motif file selection box widget. + XCOMM +! XCOMM +! EXTRA_LIBRARIES = -lgnuregex + + SRCS = mgdiff.c rundiff.c misc.c files.c spawn.c manual.c modal.c legend.c + OBJS = mgdiff.o rundiff.o misc.o files.o spawn.o manual.o modal.o legend.o Property changes on: head/textproc/mgdiff/files/patach-Imakefile ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/textproc/openjade/files/patch-ad =================================================================== --- head/textproc/openjade/files/patch-ad (revision 363335) +++ head/textproc/openjade/files/patch-ad (nonexistent) @@ -1,22 +0,0 @@ ---- Makefile.prog.in.orig Tue Jan 22 20:57:53 2002 -+++ Makefile.prog.in Sun Aug 22 05:48:16 2004 -@@ -12,7 +12,9 @@ - - ALL_LIBS = $(XLIBS) $(LIBS) - Makefile.lt: -- echo 'LT_LIBS='`echo $(ALL_LIBS)|sed 's/\.a/.la/g'` >Makefile.lt -+ echo 'LT_LIBS='`echo "$(ALL_LIBS)" | sed -e "s/\.a/.la/g" -e "s,[^ ]*libosp\.la[^ ]*,,"` "\\" >Makefile.lt -+ echo " " `echo "$(ALL_LIBS)" | awk '{print $$4}'` >> Makefile.lt -+# echo 'LT_LIBS='`echo $(ALL_LIBS)|sed 's/\.a/.la/g'` >Makefile.lt - - PROG:=$(shell echo "$(PROG)" | sed '@program_transform_name@') - -@@ -25,7 +27,7 @@ - -test -d $(DESTDIR)$(bindir) || \ - (mkdir $(DESTDIR)$(bindir); chmod 755 $(DESTDIR)$(bindir)) - -rm -f $(DESTDIR)$(bindir)/$(PROG) -- $(LIBTOOL) --mode=install $(INSTALL) $(PROG) $(DESTDIR)$(bindir) -+ $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $(PROG) $(DESTDIR)$(bindir) - - depend: depend_src - depend.temp: $(GENSRCS) Property changes on: head/textproc/openjade/files/patch-ad ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/textproc/openjade/files/patch-ae =================================================================== --- head/textproc/openjade/files/patch-ae (revision 363335) +++ head/textproc/openjade/files/patch-ae (nonexistent) @@ -1,23 +0,0 @@ - -$FreeBSD$ - ---- configure.orig Sun Dec 1 17:18:40 2002 -+++ configure Fri Feb 28 03:26:00 2003 -@@ -4899,6 +4899,8 @@ - - fi - -+if false; then # begin -disabling hack -+ - echo "$as_me:$LINENO: checking for towupper" >&5 - echo $ECHO_N "checking for towupper... $ECHO_C" >&6 - if test "${ac_cv_func_towupper+set}" = set; then -@@ -4970,6 +4972,8 @@ - - fi - -+fi # end -disabling hack -+ - echo "$as_me:$LINENO: checking for gettext" >&5 - echo $ECHO_N "checking for gettext... $ECHO_C" >&6 - if test "${ac_cv_func_gettext+set}" = set; then Property changes on: head/textproc/openjade/files/patch-ae ___________________________________________________________________ Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:keywords ## -1 +0,0 ## -FreeBSD=%H \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/textproc/openjade/files/patch-Makefile.prog.in =================================================================== --- head/textproc/openjade/files/patch-Makefile.prog.in (nonexistent) +++ head/textproc/openjade/files/patch-Makefile.prog.in (revision 363336) @@ -0,0 +1,22 @@ +--- Makefile.prog.in.orig Tue Jan 22 20:57:53 2002 ++++ Makefile.prog.in Sun Aug 22 05:48:16 2004 +@@ -12,7 +12,9 @@ + + ALL_LIBS = $(XLIBS) $(LIBS) + Makefile.lt: +- echo 'LT_LIBS='`echo $(ALL_LIBS)|sed 's/\.a/.la/g'` >Makefile.lt ++ echo 'LT_LIBS='`echo "$(ALL_LIBS)" | sed -e "s/\.a/.la/g" -e "s,[^ ]*libosp\.la[^ ]*,,"` "\\" >Makefile.lt ++ echo " " `echo "$(ALL_LIBS)" | awk '{print $$4}'` >> Makefile.lt ++# echo 'LT_LIBS='`echo $(ALL_LIBS)|sed 's/\.a/.la/g'` >Makefile.lt + + PROG:=$(shell echo "$(PROG)" | sed '@program_transform_name@') + +@@ -25,7 +27,7 @@ + -test -d $(DESTDIR)$(bindir) || \ + (mkdir $(DESTDIR)$(bindir); chmod 755 $(DESTDIR)$(bindir)) + -rm -f $(DESTDIR)$(bindir)/$(PROG) +- $(LIBTOOL) --mode=install $(INSTALL) $(PROG) $(DESTDIR)$(bindir) ++ $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $(PROG) $(DESTDIR)$(bindir) + + depend: depend_src + depend.temp: $(GENSRCS) Property changes on: head/textproc/openjade/files/patch-Makefile.prog.in ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/textproc/openjade/files/patch-configure =================================================================== --- head/textproc/openjade/files/patch-configure (nonexistent) +++ head/textproc/openjade/files/patch-configure (revision 363336) @@ -0,0 +1,23 @@ + +$FreeBSD$ + +--- configure.orig Sun Dec 1 17:18:40 2002 ++++ configure Fri Feb 28 03:26:00 2003 +@@ -4899,6 +4899,8 @@ + + fi + ++if false; then # begin -disabling hack ++ + echo "$as_me:$LINENO: checking for towupper" >&5 + echo $ECHO_N "checking for towupper... $ECHO_C" >&6 + if test "${ac_cv_func_towupper+set}" = set; then +@@ -4970,6 +4972,8 @@ + + fi + ++fi # end -disabling hack ++ + echo "$as_me:$LINENO: checking for gettext" >&5 + echo $ECHO_N "checking for gettext... $ECHO_C" >&6 + if test "${ac_cv_func_gettext+set}" = set; then Property changes on: head/textproc/openjade/files/patch-configure ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/textproc/opensched/files/patch-aa =================================================================== --- head/textproc/opensched/files/patch-aa (revision 363335) +++ head/textproc/opensched/files/patch-aa (nonexistent) @@ -1,79 +0,0 @@ -*** Makefile.orig Tue Nov 16 04:02:39 1999 ---- Makefile Wed Jan 31 14:51:57 2001 -*************** -*** 13,26 **** - - build: opensched manpage - -! all: opensched printman test sample - - BINDIR=/usr/local/bin - MANDIR=/usr/local/man/man1 - - install: opensched manpage -! install -o root -g root -m 755 opensched $(BINDIR) -! install -o root -g root -m 755 doc/opensched.1 $(MANDIR) - - browseman: manpage - groff -t -man -Tlatin1 doc/opensched.1 | less ---- 13,26 ---- - - build: opensched manpage - -! all: opensched printman test - - BINDIR=/usr/local/bin - MANDIR=/usr/local/man/man1 - - install: opensched manpage -! install -o root -g 0 -m 755 src/opensched $(BINDIR) -! install -o root -g 0 -m 755 doc/opensched.1 $(MANDIR) - - browseman: manpage - groff -t -man -Tlatin1 doc/opensched.1 | less -*************** -*** 33,42 **** - - opensched: dummy - # opensched: -! (cd src; make opensched) - - gcc-dos: dummy -! pushd src; make gcc-dos; popd - - backup: veryclean - /bin/rm -rf opensched-`cat VERSION` ---- 33,42 ---- - - opensched: dummy - # opensched: -! (cd src; ${MAKE} opensched) - - gcc-dos: dummy -! pushd src; ${MAKE} gcc-dos; popd - - backup: veryclean - /bin/rm -rf opensched-`cat VERSION` -*************** -*** 66,75 **** - /bin/chmod 755 `find . -type d -or -name '*.sh' -or -name opensched` - - test: opensched dummy -! (cd test; make test) - - sample: opensched dummy -! (cd sample; make sample) - - dummy: - ---- 66,75 ---- - /bin/chmod 755 `find . -type d -or -name '*.sh' -or -name opensched` - - test: opensched dummy -! (cd test; ${MAKE} test) - - sample: opensched dummy -! (cd sample; ${MAKE} sample) - - dummy: - Property changes on: head/textproc/opensched/files/patch-aa ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/textproc/opensched/files/patch-ab =================================================================== --- head/textproc/opensched/files/patch-ab (revision 363335) +++ head/textproc/opensched/files/patch-ab (nonexistent) @@ -1,13 +0,0 @@ -*** test/Makefile.org Wed Jan 31 14:21:51 2001 ---- test/Makefile Wed Jan 31 14:22:01 2001 -*************** -*** 14,17 **** - dvips test -o test.ps - - test_gantt_1.eps: test.sched -! ../opensched test.sched ---- 14,17 ---- - dvips test -o test.ps - - test_gantt_1.eps: test.sched -! ../src/opensched test.sched Property changes on: head/textproc/opensched/files/patch-ab ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/textproc/opensched/files/patch-ac =================================================================== --- head/textproc/opensched/files/patch-ac (revision 363335) +++ head/textproc/opensched/files/patch-ac (nonexistent) @@ -1,75 +0,0 @@ -*** src/print.c.org Wed Jan 31 14:29:34 2001 ---- src/print.c Wed Jan 31 14:30:44 2001 -*************** -*** 579,612 **** - - SortMilestones(); - -! fprintf(f, "\\subsection{Milestone List}\n\\label{milestones}\n\n"); -! -! fprintf(f, "\\begin{itemize}\n"); -! -! for ( i = 0; i < Nmilestones; ++i ) -! { - m = sorted_milestones[i].milestone; -! - fprintf(f, "\\item "); - if ( milestone_ids ) -! fprintf(f, "%s %s\\\\", -! TeXFix(buf1,m->id), -! TeXFix(buf2,m->name)); - else -! fprintf(f, "%s\\\\", -! TeXFix(buf2,m->name)); - fprintf(f, " \\emph{%s}\n\n", - days[m->day].s); - if ( m->bday != INVALIDDAYNO ) - { -! fprintf(f, "Baseline\\\\\emph{%s}\n", -! days[m->bday].s); - } - fprintf(f, "\n\n"); -! } -! -! fprintf(f, "\\end{itemize}\n\n"); - - fprintf(f,"\\subsection{Resources And Task Assignment}\n\n"); - - for( rl=reslist; rl!=NULL; rl=rl->next ) ---- 579,614 ---- - - SortMilestones(); - -! if (Nmilestones > 0) { -! fprintf(f, "\\subsection{Milestone List}\n\\label{milestones}\n\n"); -! -! fprintf(f, "\\begin{itemize}\n"); -! -! for ( i = 0; i < Nmilestones; ++i ) -! { - m = sorted_milestones[i].milestone; -! - fprintf(f, "\\item "); - if ( milestone_ids ) -! fprintf(f, "%s %s\\\\", -! TeXFix(buf1,m->id), -! TeXFix(buf2,m->name)); - else -! fprintf(f, "%s\\\\", -! TeXFix(buf2,m->name)); - fprintf(f, " \\emph{%s}\n\n", - days[m->day].s); - if ( m->bday != INVALIDDAYNO ) - { -! fprintf(f, "Baseline\\\\\emph{%s}\n", -! days[m->bday].s); - } - fprintf(f, "\n\n"); -! } - -+ fprintf(f, "\\end{itemize}\n\n"); -+ } -+ - fprintf(f,"\\subsection{Resources And Task Assignment}\n\n"); - - for( rl=reslist; rl!=NULL; rl=rl->next ) Property changes on: head/textproc/opensched/files/patch-ac ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/textproc/opensched/files/patch-ad =================================================================== --- head/textproc/opensched/files/patch-ad (revision 363335) +++ head/textproc/opensched/files/patch-ad (nonexistent) @@ -1,41 +0,0 @@ -*** test/test.tex.org Wed Jan 31 14:26:20 2001 ---- test/test.tex Wed Jan 31 14:34:28 2001 -*************** -*** 1,4 **** -! \documentstyle[rotate,times,12pt,epsf,supertabular]{article} - \textwidth=7.0in - \textheight=8.0in - \oddsidemargin=-0.25in ---- 1,9 ---- -! \documentclass[dvips,12pt]{article} -! \usepackage{epsfig} -! \usepackage{supertabular} -! \usepackage{rotate} -! \usepackage{float} -! - \textwidth=7.0in - \textheight=8.0in - \oddsidemargin=-0.25in -*************** -*** 36,44 **** - - \section{GANTT Charts} - -! \centerline{ -! \rotate[l]{\epsfxsize=0.95\textheight \epsfbox{test_gantt_1.eps}} -! } - - \end{document} - ---- 41,51 ---- - - \section{GANTT Charts} - -! \begin{figure}[H] -! \begin{center} -! \epsfig{figure=./test_gantt_1.eps,width=8in,angle=270} -! \end{center} -! \end{figure} - - \end{document} - Property changes on: head/textproc/opensched/files/patch-ad ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/textproc/opensched/files/patch-ae =================================================================== --- head/textproc/opensched/files/patch-ae (revision 363335) +++ head/textproc/opensched/files/patch-ae (nonexistent) @@ -1,58 +0,0 @@ -*** src/graph.c.org Wed Jan 31 15:15:27 2001 ---- src/graph.c Wed Jan 31 15:22:39 2001 -*************** -*** 66,71 **** ---- 66,95 ---- - fprintf(f," fill\n"); - fprintf(f," } def\n"); - -+ fprintf(f,"/REDBOX\n"); -+ fprintf(f," {\n"); -+ fprintf(f," /y2 exch def /y1 exch def /x2 exch def /x1 exch def\n"); -+ fprintf(f," x1 y1 moveto\n"); -+ fprintf(f," x2 y1 lineto\n"); -+ fprintf(f," x2 y2 lineto\n"); -+ fprintf(f," x1 y2 lineto\n"); -+ fprintf(f," closepath\n"); -+ fprintf(f," 1 %f %f setrgbcolor\n",tg_gray,tg_gray); -+ fprintf(f," fill\n"); -+ fprintf(f," } def\n"); -+ -+ fprintf(f,"/BLUEBOX\n"); -+ fprintf(f," {\n"); -+ fprintf(f," /y2 exch def /y1 exch def /x2 exch def /x1 exch def\n"); -+ fprintf(f," x1 y1 moveto\n"); -+ fprintf(f," x2 y1 lineto\n"); -+ fprintf(f," x2 y2 lineto\n"); -+ fprintf(f," x1 y2 lineto\n"); -+ fprintf(f," closepath\n"); -+ fprintf(f," %f %f 1 setrgbcolor\n",tg_gray,tg_gray); -+ fprintf(f," fill\n"); -+ fprintf(f," } def\n"); -+ - fprintf(f,"/OUTLINE\n"); - fprintf(f," {\n"); - fprintf(f," /y2 exch def /y1 exch def /x2 exch def /x1 exch def\n"); -*************** -*** 267,273 **** - for( i=tb->start; i<=tb->finish; ++i ) - { - tb_x1 = MapX( i, start, finish ); -! fprintf(f,"%d %d %d %d BOX\n", tb_x1, tb_x1+tg_width, tb_y1, tb_y2); - } - } - ---- 291,303 ---- - for( i=tb->start; i<=tb->finish; ++i ) - { - tb_x1 = MapX( i, start, finish ); -! if (t->children > 0) -! fprintf(f,"%d %d %d %d REDBOX\n", -! tb_x1, tb_x1+tg_width, tb_y1, tb_y2); -! else -! fprintf(f,"%d %d %d %d BLUEBOX\n", -! tb_x1, tb_x1+tg_width, tb_y1, tb_y2); -! - } - } - Property changes on: head/textproc/opensched/files/patch-ae ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/textproc/opensched/files/patch-af =================================================================== --- head/textproc/opensched/files/patch-af (revision 363335) +++ head/textproc/opensched/files/patch-af (nonexistent) @@ -1,11 +0,0 @@ ---- src/Makefile.orig Tue Oct 26 01:41:45 1999 -+++ src/Makefile Sat Oct 19 15:13:56 2002 -@@ -1,6 +1,6 @@ --CFLAGS=-Wall -g -+CFLAGS+=-Wall - LIBS=-lm --CC=gcc -+CC?=cc - CDEPEND = $(CC) -M - CDEPENDFLAGS = - Property changes on: head/textproc/opensched/files/patch-af ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/textproc/opensched/files/patch-ag =================================================================== --- head/textproc/opensched/files/patch-ag (revision 363335) +++ head/textproc/opensched/files/patch-ag (nonexistent) @@ -1,10 +0,0 @@ ---- src/loadfile.c.orig Sat Oct 19 15:29:13 2002 -+++ src/loadfile.c Sat Oct 19 15:28:40 2002 -@@ -268,6 +268,7 @@ - t = (TASK*)malloc(sizeof(TASK)); - if ( t == NULL ) - Error("Can't malloc task in AddTask()"); -+ memset(t, 0, sizeof(TASK)); - - t->id = strdup(id); - t->name = strdup(name); Property changes on: head/textproc/opensched/files/patch-ag ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/textproc/opensched/files/patch-Makefile =================================================================== --- head/textproc/opensched/files/patch-Makefile (nonexistent) +++ head/textproc/opensched/files/patch-Makefile (revision 363336) @@ -0,0 +1,79 @@ +*** Makefile.orig Tue Nov 16 04:02:39 1999 +--- Makefile Wed Jan 31 14:51:57 2001 +*************** +*** 13,26 **** + + build: opensched manpage + +! all: opensched printman test sample + + BINDIR=/usr/local/bin + MANDIR=/usr/local/man/man1 + + install: opensched manpage +! install -o root -g root -m 755 opensched $(BINDIR) +! install -o root -g root -m 755 doc/opensched.1 $(MANDIR) + + browseman: manpage + groff -t -man -Tlatin1 doc/opensched.1 | less +--- 13,26 ---- + + build: opensched manpage + +! all: opensched printman test + + BINDIR=/usr/local/bin + MANDIR=/usr/local/man/man1 + + install: opensched manpage +! install -o root -g 0 -m 755 src/opensched $(BINDIR) +! install -o root -g 0 -m 755 doc/opensched.1 $(MANDIR) + + browseman: manpage + groff -t -man -Tlatin1 doc/opensched.1 | less +*************** +*** 33,42 **** + + opensched: dummy + # opensched: +! (cd src; make opensched) + + gcc-dos: dummy +! pushd src; make gcc-dos; popd + + backup: veryclean + /bin/rm -rf opensched-`cat VERSION` +--- 33,42 ---- + + opensched: dummy + # opensched: +! (cd src; ${MAKE} opensched) + + gcc-dos: dummy +! pushd src; ${MAKE} gcc-dos; popd + + backup: veryclean + /bin/rm -rf opensched-`cat VERSION` +*************** +*** 66,75 **** + /bin/chmod 755 `find . -type d -or -name '*.sh' -or -name opensched` + + test: opensched dummy +! (cd test; make test) + + sample: opensched dummy +! (cd sample; make sample) + + dummy: + +--- 66,75 ---- + /bin/chmod 755 `find . -type d -or -name '*.sh' -or -name opensched` + + test: opensched dummy +! (cd test; ${MAKE} test) + + sample: opensched dummy +! (cd sample; ${MAKE} sample) + + dummy: + Property changes on: head/textproc/opensched/files/patch-Makefile ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/textproc/opensched/files/patch-src__Makefile =================================================================== --- head/textproc/opensched/files/patch-src__Makefile (nonexistent) +++ head/textproc/opensched/files/patch-src__Makefile (revision 363336) @@ -0,0 +1,11 @@ +--- src/Makefile.orig Tue Oct 26 01:41:45 1999 ++++ src/Makefile Sat Oct 19 15:13:56 2002 +@@ -1,6 +1,6 @@ +-CFLAGS=-Wall -g ++CFLAGS+=-Wall + LIBS=-lm +-CC=gcc ++CC?=cc + CDEPEND = $(CC) -M + CDEPENDFLAGS = + Property changes on: head/textproc/opensched/files/patch-src__Makefile ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/textproc/opensched/files/patch-src__graph.c =================================================================== --- head/textproc/opensched/files/patch-src__graph.c (nonexistent) +++ head/textproc/opensched/files/patch-src__graph.c (revision 363336) @@ -0,0 +1,58 @@ +*** src/graph.c.org Wed Jan 31 15:15:27 2001 +--- src/graph.c Wed Jan 31 15:22:39 2001 +*************** +*** 66,71 **** +--- 66,95 ---- + fprintf(f," fill\n"); + fprintf(f," } def\n"); + ++ fprintf(f,"/REDBOX\n"); ++ fprintf(f," {\n"); ++ fprintf(f," /y2 exch def /y1 exch def /x2 exch def /x1 exch def\n"); ++ fprintf(f," x1 y1 moveto\n"); ++ fprintf(f," x2 y1 lineto\n"); ++ fprintf(f," x2 y2 lineto\n"); ++ fprintf(f," x1 y2 lineto\n"); ++ fprintf(f," closepath\n"); ++ fprintf(f," 1 %f %f setrgbcolor\n",tg_gray,tg_gray); ++ fprintf(f," fill\n"); ++ fprintf(f," } def\n"); ++ ++ fprintf(f,"/BLUEBOX\n"); ++ fprintf(f," {\n"); ++ fprintf(f," /y2 exch def /y1 exch def /x2 exch def /x1 exch def\n"); ++ fprintf(f," x1 y1 moveto\n"); ++ fprintf(f," x2 y1 lineto\n"); ++ fprintf(f," x2 y2 lineto\n"); ++ fprintf(f," x1 y2 lineto\n"); ++ fprintf(f," closepath\n"); ++ fprintf(f," %f %f 1 setrgbcolor\n",tg_gray,tg_gray); ++ fprintf(f," fill\n"); ++ fprintf(f," } def\n"); ++ + fprintf(f,"/OUTLINE\n"); + fprintf(f," {\n"); + fprintf(f," /y2 exch def /y1 exch def /x2 exch def /x1 exch def\n"); +*************** +*** 267,273 **** + for( i=tb->start; i<=tb->finish; ++i ) + { + tb_x1 = MapX( i, start, finish ); +! fprintf(f,"%d %d %d %d BOX\n", tb_x1, tb_x1+tg_width, tb_y1, tb_y2); + } + } + +--- 291,303 ---- + for( i=tb->start; i<=tb->finish; ++i ) + { + tb_x1 = MapX( i, start, finish ); +! if (t->children > 0) +! fprintf(f,"%d %d %d %d REDBOX\n", +! tb_x1, tb_x1+tg_width, tb_y1, tb_y2); +! else +! fprintf(f,"%d %d %d %d BLUEBOX\n", +! tb_x1, tb_x1+tg_width, tb_y1, tb_y2); +! + } + } + Property changes on: head/textproc/opensched/files/patch-src__graph.c ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/textproc/opensched/files/patch-src__loadfile.c =================================================================== --- head/textproc/opensched/files/patch-src__loadfile.c (nonexistent) +++ head/textproc/opensched/files/patch-src__loadfile.c (revision 363336) @@ -0,0 +1,10 @@ +--- src/loadfile.c.orig Sat Oct 19 15:29:13 2002 ++++ src/loadfile.c Sat Oct 19 15:28:40 2002 +@@ -268,6 +268,7 @@ + t = (TASK*)malloc(sizeof(TASK)); + if ( t == NULL ) + Error("Can't malloc task in AddTask()"); ++ memset(t, 0, sizeof(TASK)); + + t->id = strdup(id); + t->name = strdup(name); Property changes on: head/textproc/opensched/files/patch-src__loadfile.c ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/textproc/opensched/files/patch-src__print.c =================================================================== --- head/textproc/opensched/files/patch-src__print.c (nonexistent) +++ head/textproc/opensched/files/patch-src__print.c (revision 363336) @@ -0,0 +1,75 @@ +*** src/print.c.org Wed Jan 31 14:29:34 2001 +--- src/print.c Wed Jan 31 14:30:44 2001 +*************** +*** 579,612 **** + + SortMilestones(); + +! fprintf(f, "\\subsection{Milestone List}\n\\label{milestones}\n\n"); +! +! fprintf(f, "\\begin{itemize}\n"); +! +! for ( i = 0; i < Nmilestones; ++i ) +! { + m = sorted_milestones[i].milestone; +! + fprintf(f, "\\item "); + if ( milestone_ids ) +! fprintf(f, "%s %s\\\\", +! TeXFix(buf1,m->id), +! TeXFix(buf2,m->name)); + else +! fprintf(f, "%s\\\\", +! TeXFix(buf2,m->name)); + fprintf(f, " \\emph{%s}\n\n", + days[m->day].s); + if ( m->bday != INVALIDDAYNO ) + { +! fprintf(f, "Baseline\\\\\emph{%s}\n", +! days[m->bday].s); + } + fprintf(f, "\n\n"); +! } +! +! fprintf(f, "\\end{itemize}\n\n"); + + fprintf(f,"\\subsection{Resources And Task Assignment}\n\n"); + + for( rl=reslist; rl!=NULL; rl=rl->next ) +--- 579,614 ---- + + SortMilestones(); + +! if (Nmilestones > 0) { +! fprintf(f, "\\subsection{Milestone List}\n\\label{milestones}\n\n"); +! +! fprintf(f, "\\begin{itemize}\n"); +! +! for ( i = 0; i < Nmilestones; ++i ) +! { + m = sorted_milestones[i].milestone; +! + fprintf(f, "\\item "); + if ( milestone_ids ) +! fprintf(f, "%s %s\\\\", +! TeXFix(buf1,m->id), +! TeXFix(buf2,m->name)); + else +! fprintf(f, "%s\\\\", +! TeXFix(buf2,m->name)); + fprintf(f, " \\emph{%s}\n\n", + days[m->day].s); + if ( m->bday != INVALIDDAYNO ) + { +! fprintf(f, "Baseline\\\\\emph{%s}\n", +! days[m->bday].s); + } + fprintf(f, "\n\n"); +! } + ++ fprintf(f, "\\end{itemize}\n\n"); ++ } ++ + fprintf(f,"\\subsection{Resources And Task Assignment}\n\n"); + + for( rl=reslist; rl!=NULL; rl=rl->next ) Property changes on: head/textproc/opensched/files/patch-src__print.c ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/textproc/opensched/files/patch-test__Makefile =================================================================== --- head/textproc/opensched/files/patch-test__Makefile (nonexistent) +++ head/textproc/opensched/files/patch-test__Makefile (revision 363336) @@ -0,0 +1,13 @@ +*** test/Makefile.org Wed Jan 31 14:21:51 2001 +--- test/Makefile Wed Jan 31 14:22:01 2001 +*************** +*** 14,17 **** + dvips test -o test.ps + + test_gantt_1.eps: test.sched +! ../opensched test.sched +--- 14,17 ---- + dvips test -o test.ps + + test_gantt_1.eps: test.sched +! ../src/opensched test.sched Property changes on: head/textproc/opensched/files/patch-test__Makefile ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/textproc/opensched/files/patch-test__test.tex =================================================================== --- head/textproc/opensched/files/patch-test__test.tex (nonexistent) +++ head/textproc/opensched/files/patch-test__test.tex (revision 363336) @@ -0,0 +1,41 @@ +*** test/test.tex.org Wed Jan 31 14:26:20 2001 +--- test/test.tex Wed Jan 31 14:34:28 2001 +*************** +*** 1,4 **** +! \documentstyle[rotate,times,12pt,epsf,supertabular]{article} + \textwidth=7.0in + \textheight=8.0in + \oddsidemargin=-0.25in +--- 1,9 ---- +! \documentclass[dvips,12pt]{article} +! \usepackage{epsfig} +! \usepackage{supertabular} +! \usepackage{rotate} +! \usepackage{float} +! + \textwidth=7.0in + \textheight=8.0in + \oddsidemargin=-0.25in +*************** +*** 36,44 **** + + \section{GANTT Charts} + +! \centerline{ +! \rotate[l]{\epsfxsize=0.95\textheight \epsfbox{test_gantt_1.eps}} +! } + + \end{document} + +--- 41,51 ---- + + \section{GANTT Charts} + +! \begin{figure}[H] +! \begin{center} +! \epsfig{figure=./test_gantt_1.eps,width=8in,angle=270} +! \end{center} +! \end{figure} + + \end{document} + Property changes on: head/textproc/opensched/files/patch-test__test.tex ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/textproc/ruby-xmlparser/files/patch-ab =================================================================== --- head/textproc/ruby-xmlparser/files/patch-ab (revision 363335) +++ head/textproc/ruby-xmlparser/files/patch-ab (nonexistent) @@ -1,35 +0,0 @@ ---- lib/wget.rb.orig Tue Mar 23 17:30:30 1999 -+++ lib/wget.rb Fri Aug 11 03:23:28 2000 -@@ -19,17 +19,18 @@ - if url =~ /^\/|^\./ || (url !~ /^http:|^ftp:/ && FileTest.exist?(url)) - File::open(url, *rest) - else -- ENV['http_proxy'] = PARAM['http_proxy'] if PARAM['http_proxy'] -- ENV['ftp_proxy'] = PARAM['ftp_proxy'] if PARAM['ftp_proxy'] -+ ENV['HTTP_PROXY'] = ENV['http_proxy'] = PARAM['http_proxy'] if PARAM['http_proxy'] -+ ENV['FTP_PROXY'] = ENV['ftp_proxy'] = PARAM['ftp_proxy'] if PARAM['ftp_proxy'] - IO::popen(PARAM['wget'] + ' ' + PARAM['opts'] + ' ' + url) - end - end - module_function :open - end - --[ '/usr/local/bin/wget', '/usr/bin/wget', -- '/usr/local/bin/lynx', '/usr/bin/lynx', -- '/usr/local/bin/lwp-request', '/usr/bin/lwp-request' ].each do |p| -+[ '%%PREFIX%%/bin/wget', -+ '%%PREFIX%%/bin/lynx', -+ '%%PREFIX%%/bin/lwp-request', -+ '/usr/bin/fetch' ].each do |p| - if FileTest.executable?(p) - WGET::PARAM['wget'] = p - case p -@@ -39,6 +40,8 @@ - WGET::PARAM['opts'] = '-source' - when /lwp-request$/ - WGET::PARAM['opts'] = '-m GET' -+ when /fetch$/ -+ WGET::PARAM['opts'] = '-o -' - end - break - end Property changes on: head/textproc/ruby-xmlparser/files/patch-ab ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/textproc/ruby-xmlparser/files/patch-lib__wget.rb =================================================================== --- head/textproc/ruby-xmlparser/files/patch-lib__wget.rb (nonexistent) +++ head/textproc/ruby-xmlparser/files/patch-lib__wget.rb (revision 363336) @@ -0,0 +1,35 @@ +--- lib/wget.rb.orig Tue Mar 23 17:30:30 1999 ++++ lib/wget.rb Fri Aug 11 03:23:28 2000 +@@ -19,17 +19,18 @@ + if url =~ /^\/|^\./ || (url !~ /^http:|^ftp:/ && FileTest.exist?(url)) + File::open(url, *rest) + else +- ENV['http_proxy'] = PARAM['http_proxy'] if PARAM['http_proxy'] +- ENV['ftp_proxy'] = PARAM['ftp_proxy'] if PARAM['ftp_proxy'] ++ ENV['HTTP_PROXY'] = ENV['http_proxy'] = PARAM['http_proxy'] if PARAM['http_proxy'] ++ ENV['FTP_PROXY'] = ENV['ftp_proxy'] = PARAM['ftp_proxy'] if PARAM['ftp_proxy'] + IO::popen(PARAM['wget'] + ' ' + PARAM['opts'] + ' ' + url) + end + end + module_function :open + end + +-[ '/usr/local/bin/wget', '/usr/bin/wget', +- '/usr/local/bin/lynx', '/usr/bin/lynx', +- '/usr/local/bin/lwp-request', '/usr/bin/lwp-request' ].each do |p| ++[ '%%PREFIX%%/bin/wget', ++ '%%PREFIX%%/bin/lynx', ++ '%%PREFIX%%/bin/lwp-request', ++ '/usr/bin/fetch' ].each do |p| + if FileTest.executable?(p) + WGET::PARAM['wget'] = p + case p +@@ -39,6 +40,8 @@ + WGET::PARAM['opts'] = '-source' + when /lwp-request$/ + WGET::PARAM['opts'] = '-m GET' ++ when /fetch$/ ++ WGET::PARAM['opts'] = '-o -' + end + break + end Property changes on: head/textproc/ruby-xmlparser/files/patch-lib__wget.rb ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/textproc/rxp/files/patch-aa =================================================================== --- head/textproc/rxp/files/patch-aa (revision 363335) +++ head/textproc/rxp/files/patch-aa (nonexistent) @@ -1,14 +0,0 @@ ---- Makefile.orig Fri Nov 23 22:27:59 2001 -+++ Makefile Sat Jun 29 11:29:34 2002 -@@ -3,9 +3,10 @@ - CHAR_SIZE=16 - - DEBUG= -g --CC= gcc -+CC?= gcc - GCCFLAGS= -Wall -ansi -pedantic - # HP-UX users may need to add -D_HPUX_SOURCE -+CFLAGS?= -O - CFLAGS= $(GCCFLAGS) $(DEBUG) -O -DCHAR_SIZE=$(CHAR_SIZE) - LDFLAGS= $(DEBUG) - Property changes on: head/textproc/rxp/files/patch-aa ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/textproc/rxp/files/patch-Makefile =================================================================== --- head/textproc/rxp/files/patch-Makefile (nonexistent) +++ head/textproc/rxp/files/patch-Makefile (revision 363336) @@ -0,0 +1,14 @@ +--- Makefile.orig Fri Nov 23 22:27:59 2001 ++++ Makefile Sat Jun 29 11:29:34 2002 +@@ -3,9 +3,10 @@ + CHAR_SIZE=16 + + DEBUG= -g +-CC= gcc ++CC?= gcc + GCCFLAGS= -Wall -ansi -pedantic + # HP-UX users may need to add -D_HPUX_SOURCE ++CFLAGS?= -O + CFLAGS= $(GCCFLAGS) $(DEBUG) -O -DCHAR_SIZE=$(CHAR_SIZE) + LDFLAGS= $(DEBUG) + Property changes on: head/textproc/rxp/files/patch-Makefile ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/textproc/sgmls/files/patch-aa =================================================================== --- head/textproc/sgmls/files/patch-aa (revision 363335) +++ head/textproc/sgmls/files/patch-aa (nonexistent) @@ -1,11 +0,0 @@ ---- configure.orig Fri Jun 2 19:18:37 2000 -+++ configure Fri Jun 2 19:18:50 2000 -@@ -605,7 +605,7 @@ - edit="$edit -e 's/^typedef .*VOID;/typedef $void_ret VOID;/'" - edit="$edit -e 's/^typedef .*UNIV;/typedef ${void_star}UNIV;/'" - --if test "X$(PREFIX)" != "X/usr/local" -+if test "X$PREFIX" != "X/usr/local" - then - edit="$edit -e '/DEFAULT_PATH/s;/usr/local;$PREFIX;g'" - fi Property changes on: head/textproc/sgmls/files/patch-aa ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/textproc/sgmls/files/patch-configure =================================================================== --- head/textproc/sgmls/files/patch-configure (nonexistent) +++ head/textproc/sgmls/files/patch-configure (revision 363336) @@ -0,0 +1,11 @@ +--- configure.orig Fri Jun 2 19:18:37 2000 ++++ configure Fri Jun 2 19:18:50 2000 +@@ -605,7 +605,7 @@ + edit="$edit -e 's/^typedef .*VOID;/typedef $void_ret VOID;/'" + edit="$edit -e 's/^typedef .*UNIV;/typedef ${void_star}UNIV;/'" + +-if test "X$(PREFIX)" != "X/usr/local" ++if test "X$PREFIX" != "X/usr/local" + then + edit="$edit -e '/DEFAULT_PATH/s;/usr/local;$PREFIX;g'" + fi Property changes on: head/textproc/sgmls/files/patch-configure ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/textproc/sgrep/files/patch-aa =================================================================== --- head/textproc/sgrep/files/patch-aa (revision 363335) +++ head/textproc/sgrep/files/patch-aa (nonexistent) @@ -1,39 +0,0 @@ ---- Makefile.orig 1996-05-02 19:58:24.000000000 +0800 -+++ Makefile 2011-09-07 09:33:07.000000000 +0800 -@@ -10,11 +10,11 @@ - # - - # This is where the executable goes --BINDIR = /usr/local/bin/ -+BINDIR = ${PREFIX}/bin - # Where sgrep library files are placed (sgreprc) --LIBDIR = /usr/local/lib -+LIBDIR = ${PREFIX}/share - # Where the manual page goes --MANFILE = /usr/local/man/man1/sgrep.1 -+MANFILE = ${PREFIX}/man/man1/sgrep.1 - # Where the sample rc file goes - RCFILE = $(LIBDIR)/sgreprc - # If you can't install as root you might wan't to use this as rc file -@@ -25,7 +25,7 @@ VERSION = 0.99 - CFLAGS = -O -DVERSION=\"$(VERSION)\" -DLIBDIR=\"$(LIBDIR)\" - LDFLAGS = - # if cc fails to you use gcc --CC = cc -+#CC = cc - CPPFLAGS = - LIBS = - -@@ -45,11 +45,7 @@ sgrep: $(OBJECTS) - clean: - -rm -f $(OBJECTS) - --install: sgrep -- cp sgrep $(BINDIR)/sgrep -- chmod 755 $(BINDIR)/sgrep -- cp sgrep.1 $(MANFILE) -- chmod 644 $(MANFILE) -+install: - - install.rc: sample.sgreprc - cp sample.sgreprc $(RCFILE) Property changes on: head/textproc/sgrep/files/patch-aa ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/textproc/sgrep/files/patch-ab =================================================================== --- head/textproc/sgrep/files/patch-ab (revision 363335) +++ head/textproc/sgrep/files/patch-ab (nonexistent) @@ -1,11 +0,0 @@ ---- sgrep.1-- Wed Apr 29 12:26:40 1998 -+++ sgrep.1 Wed Apr 29 12:26:49 1998 -@@ -91,7 +91,7 @@ - \fB$HOME/.sgreprc,\fP - or if it doesn't exist, - from file --\fB/usr/lib/sgreprc, \fP -+\fB/usr/local/share/sgreprc, \fP - and then from the command line. Different behavior - can be specified through command line options. - .Pp Property changes on: head/textproc/sgrep/files/patch-ab ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/textproc/sgrep/files/patch-Makefile =================================================================== --- head/textproc/sgrep/files/patch-Makefile (nonexistent) +++ head/textproc/sgrep/files/patch-Makefile (revision 363336) @@ -0,0 +1,39 @@ +--- Makefile.orig 1996-05-02 19:58:24.000000000 +0800 ++++ Makefile 2011-09-07 09:33:07.000000000 +0800 +@@ -10,11 +10,11 @@ + # + + # This is where the executable goes +-BINDIR = /usr/local/bin/ ++BINDIR = ${PREFIX}/bin + # Where sgrep library files are placed (sgreprc) +-LIBDIR = /usr/local/lib ++LIBDIR = ${PREFIX}/share + # Where the manual page goes +-MANFILE = /usr/local/man/man1/sgrep.1 ++MANFILE = ${PREFIX}/man/man1/sgrep.1 + # Where the sample rc file goes + RCFILE = $(LIBDIR)/sgreprc + # If you can't install as root you might wan't to use this as rc file +@@ -25,7 +25,7 @@ VERSION = 0.99 + CFLAGS = -O -DVERSION=\"$(VERSION)\" -DLIBDIR=\"$(LIBDIR)\" + LDFLAGS = + # if cc fails to you use gcc +-CC = cc ++#CC = cc + CPPFLAGS = + LIBS = + +@@ -45,11 +45,7 @@ sgrep: $(OBJECTS) + clean: + -rm -f $(OBJECTS) + +-install: sgrep +- cp sgrep $(BINDIR)/sgrep +- chmod 755 $(BINDIR)/sgrep +- cp sgrep.1 $(MANFILE) +- chmod 644 $(MANFILE) ++install: + + install.rc: sample.sgreprc + cp sample.sgreprc $(RCFILE) Property changes on: head/textproc/sgrep/files/patch-Makefile ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/textproc/sgrep/files/patch-sgrep.1 =================================================================== --- head/textproc/sgrep/files/patch-sgrep.1 (nonexistent) +++ head/textproc/sgrep/files/patch-sgrep.1 (revision 363336) @@ -0,0 +1,11 @@ +--- sgrep.1-- Wed Apr 29 12:26:40 1998 ++++ sgrep.1 Wed Apr 29 12:26:49 1998 +@@ -91,7 +91,7 @@ + \fB$HOME/.sgreprc,\fP + or if it doesn't exist, + from file +-\fB/usr/lib/sgreprc, \fP ++\fB/usr/local/share/sgreprc, \fP + and then from the command line. Different behavior + can be specified through command line options. + .Pp Property changes on: head/textproc/sgrep/files/patch-sgrep.1 ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/textproc/tclExpat/files/patch-aa =================================================================== --- head/textproc/tclExpat/files/patch-aa (revision 363335) +++ head/textproc/tclExpat/files/patch-aa (nonexistent) @@ -1,500 +0,0 @@ ---- tclexpat.c.orig 1998-08-22 09:35:44.000000000 +0200 -+++ tclexpat.c 2013-05-13 12:11:18.000000000 +0200 -@@ -18,8 +18,9 @@ - * - */ - -+#include - #include --#include "xmlparse.h" -+#include - - /* - * The structure below is used to refer to an expat parser object. -@@ -53,6 +54,8 @@ - * Prototypes for procedures defined later in this file: - */ - -+int Tclexpat_Init (Tcl_Interp *); -+static void TclExpatHandlerResult(TclExpatInfo *, int result); - static Tcl_ObjCmdProc TclExpatObjCmd; - static Tcl_ObjCmdProc TclExpatInstanceCmd; - static Tcl_CmdDeleteProc TclExpatDeleteCmd; -@@ -72,32 +75,32 @@ - int objc, - Tcl_Obj *CONST objv[])); - --static void * (TclExpatElementStartHandler) _ANSI_ARGS_((void *userdata, -+static void (TclExpatElementStartHandler) _ANSI_ARGS_((void *userdata, - const XML_Char *name, - const XML_Char **atts)); --static void * (TclExpatElementEndHandler) _ANSI_ARGS_((void *userData, -+static void (TclExpatElementEndHandler) _ANSI_ARGS_((void *userData, - const XML_Char *name)); --static void * (TclExpatCharacterDataHandler) _ANSI_ARGS_((void *userData, -+static void (TclExpatCharacterDataHandler) _ANSI_ARGS_((void *userData, - const XML_Char *s, - int len)); --static void * (TclExpatProcessingInstructionHandler) _ANSI_ARGS_((void *userData, -+static void (TclExpatProcessingInstructionHandler) _ANSI_ARGS_((void *userData, - const XML_Char *target, - const XML_Char *data)); --static void * (TclExpatExternalEntityRefHandler) _ANSI_ARGS_((XML_Parser parser, -+static int (TclExpatExternalEntityRefHandler) _ANSI_ARGS_((XML_Parser parser, - const XML_Char *openEntityNames, - const XML_Char *base, - const XML_Char *systemId, - const XML_Char *publicId)); --static void * (TclExpatDefaultHandler) _ANSI_ARGS_ ((void *userData, -+static void (TclExpatDefaultHandler) _ANSI_ARGS_ ((void *userData, - const XML_Char *s, - int len)); --static void * (TclExpatUnparsedDeclHandler) _ANSI_ARGS_ ((void *userData, -+static void (TclExpatUnparsedDeclHandler) _ANSI_ARGS_ ((void *userData, - const XML_Char *entityname, - const XML_Char *base, - const XML_Char *systemId, - const XML_Char *publicId, - const XML_Char *notationName)); --static void * (TclExpatNotationDeclHandler) _ANSI_ARGS_ ((void *userData, -+static void (TclExpatNotationDeclHandler) _ANSI_ARGS_ ((void *userData, - const XML_Char *notationName, - const XML_Char *base, - const XML_Char *systemId, -@@ -106,7 +109,7 @@ - const XML_Char *name, - XML_Encoding *info)); - --#if (TCL_MAJOR_VERSION == 8 && TCL_MINOR_VERSION == 0) -+#if (TCL_MAJOR_VERSION >= 8) && !defined(Tcl_GetString) - - /* - *---------------------------------------------------------------------------- -@@ -134,7 +137,7 @@ - s = Tcl_GetStringFromObj(obj, &i); - return s; - } --#endif /* TCL_MAJOR_VERSION == 8 && TCL_MINOR_VERSION == 0 */ -+#endif /* TCL_MAJOR_VERSION >= 8 */ - - /* - *---------------------------------------------------------------------------- -@@ -157,6 +160,10 @@ - Tcl_Interp *interp; /* Interpreter to initialise. */ - { - -+ if (Tcl_InitStubs(interp, TCL_VERSION, 0) == NULL) { -+ return TCL_ERROR; -+ } -+ - Tcl_PkgProvide(interp, "expat", "1.1"); - - Tcl_CreateObjCommand(interp, "expat", TclExpatObjCmd, NULL, NULL); -@@ -267,7 +274,6 @@ - Tcl_Interp *interp; - TclExpatInfo *expat; - { -- int len; - - if (!(expat->parser = XML_ParserCreate(NULL))) { - Tcl_SetResult(interp, "unable to create expat parser", NULL); -@@ -284,22 +290,22 @@ - */ - - XML_SetElementHandler(expat->parser, -- (XML_StartElementHandler) TclExpatElementStartHandler, -- (XML_EndElementHandler) TclExpatElementEndHandler); -+ TclExpatElementStartHandler, -+ TclExpatElementEndHandler); - XML_SetCharacterDataHandler(expat->parser, -- (XML_CharacterDataHandler) TclExpatCharacterDataHandler); -+ TclExpatCharacterDataHandler); - XML_SetProcessingInstructionHandler(expat->parser, -- (XML_ProcessingInstructionHandler) TclExpatProcessingInstructionHandler); -+ TclExpatProcessingInstructionHandler); - XML_SetDefaultHandler(expat->parser, -- (XML_DefaultHandler) TclExpatDefaultHandler); -+ TclExpatDefaultHandler); - XML_SetUnparsedEntityDeclHandler(expat->parser, -- (XML_UnparsedEntityDeclHandler) TclExpatUnparsedDeclHandler); -+ TclExpatUnparsedDeclHandler); - XML_SetNotationDeclHandler(expat->parser, -- (XML_NotationDeclHandler) TclExpatNotationDeclHandler); -+ TclExpatNotationDeclHandler); - XML_SetExternalEntityRefHandler(expat->parser, -- (XML_ExternalEntityRefHandler) TclExpatExternalEntityRefHandler); -+ TclExpatExternalEntityRefHandler); - XML_SetUnknownEncodingHandler(expat->parser, -- (XML_UnknownEncodingHandler) TclExpatUnknownEncodingHandler, -+ TclExpatUnknownEncodingHandler, - (void *) expat); - XML_SetUserData(expat->parser, - (void *) expat); -@@ -327,7 +333,6 @@ - TclExpatFreeParser(expat) - TclExpatInfo *expat; - { -- int len; - - XML_ParserFree(expat->parser); - expat->parser = NULL; -@@ -357,9 +362,9 @@ - Tcl_Obj *CONST objv[]; - { - TclExpatInfo *expat = (TclExpatInfo *) clientData; -- char *method, *data; -+ char *data; - int len, index, result = TCL_OK; -- static char *options[] = { -+ static CONST char * options[] = { - "configure", "cget", "parse", "reset", NULL - }; - enum options { -@@ -464,10 +469,10 @@ - - if (!result) { - Tcl_ResetResult(interp); -- sprintf(s, "%d", XML_GetCurrentLineNumber(expat->parser)); -+ sprintf(s, "%ld", (long)XML_GetCurrentLineNumber(expat->parser)); - Tcl_AppendResult(interp, "error \"", XML_ErrorString(XML_GetErrorCode(expat->parser)), - "\" at line ", s, " character ", NULL); -- sprintf(s, "%d", XML_GetCurrentColumnNumber(expat->parser)); -+ sprintf(s, "%ld", (long)XML_GetCurrentColumnNumber(expat->parser)); - Tcl_AppendResult(interp, s, NULL); - - return TCL_ERROR; -@@ -514,7 +519,7 @@ - int objc; - Tcl_Obj *CONST objv[]; - { -- static char *switches[] = { -+ static CONST char *switches[] = { - "-final", - "-baseurl", - "-elementstartcommand", -@@ -688,7 +693,7 @@ - } - - if (doParse) { -- return TclExpatParse(interp, expat->parser, "", 0); -+ return TclExpatParse(interp, expat, "", 0); - } else { - return TCL_OK; - } -@@ -739,7 +744,7 @@ - *---------------------------------------------------------------------------- - */ - --void -+static void - TclExpatHandlerResult(expat, result) - TclExpatInfo *expat; - int result; -@@ -795,7 +800,7 @@ - *---------------------------------------------------------------------------- - */ - --static void * -+static void - TclExpatElementStartHandler(userData, name, atts) - void *userData; - const char *name; -@@ -828,8 +833,8 @@ - - atList = Tcl_NewListObj(0, NULL); - for (atPtr = atts; atPtr[0] && atPtr[1]; atPtr += 2) { -- Tcl_ListObjAppendElement(expat->interp, atList, Tcl_NewStringObj((char *)atPtr[0], strlen(atPtr[0]))); -- Tcl_ListObjAppendElement(expat->interp, atList, Tcl_NewStringObj((char *)atPtr[1], strlen(atPtr[1]))); -+ Tcl_ListObjAppendElement(expat->interp, atList, Tcl_NewStringObj(atPtr[0], -1)); -+ Tcl_ListObjAppendElement(expat->interp, atList, Tcl_NewStringObj(atPtr[1], -1)); - } - - /* -@@ -840,14 +845,14 @@ - Tcl_IncrRefCount(cmdPtr); - Tcl_Preserve((ClientData) expat->interp); - -- Tcl_ListObjAppendElement(expat->interp, cmdPtr, Tcl_NewStringObj((char *)name, strlen(name))); -+ Tcl_ListObjAppendElement(expat->interp, cmdPtr, Tcl_NewStringObj(name, -1)); - Tcl_ListObjAppendElement(expat->interp, cmdPtr, atList); - - /* - * It would be desirable to be able to terminate parsing - * if the return result is TCL_ERROR or TCL_BREAK. - */ --#if (TCL_MAJOR_VERSION == 8 && TCL_MINOR_VERSION == 0) -+#if (TCL_MAJOR_VERSION >= 8) - result = Tcl_GlobalEvalObj(expat->interp, cmdPtr); - #else - result = Tcl_EvalObj(expat->interp, cmdPtr, TCL_EVAL_GLOBAL); -@@ -877,7 +882,7 @@ - *---------------------------------------------------------------------------- - */ - --static void * -+static void - TclExpatElementEndHandler(userData, name) - void *userData; - CONST char *name; -@@ -911,13 +916,13 @@ - Tcl_IncrRefCount(cmdPtr); - Tcl_Preserve((ClientData) expat->interp); - -- Tcl_ListObjAppendElement(expat->interp, cmdPtr, Tcl_NewStringObj((char *)name, strlen(name))); -+ Tcl_ListObjAppendElement(expat->interp, cmdPtr, Tcl_NewStringObj(name, -1)); - - /* - * It would be desirable to be able to terminate parsing - * if the return result is TCL_ERROR or TCL_BREAK. - */ --#if (TCL_MAJOR_VERSION == 8 && TCL_MINOR_VERSION == 0) -+#if (TCL_MAJOR_VERSION >= 8) - result = Tcl_GlobalEvalObj(expat->interp, cmdPtr); - #else - result = Tcl_EvalObj(expat->interp, cmdPtr, TCL_EVAL_GLOBAL); -@@ -947,7 +952,7 @@ - *---------------------------------------------------------------------------- - */ - --static void * -+static void - TclExpatCharacterDataHandler(userData, s, len) - void *userData; - CONST char *s; -@@ -970,13 +975,13 @@ - Tcl_IncrRefCount(cmdPtr); - Tcl_Preserve((ClientData) expat->interp); - -- Tcl_ListObjAppendElement(expat->interp, cmdPtr, Tcl_NewStringObj((char *)s, len)); -+ Tcl_ListObjAppendElement(expat->interp, cmdPtr, Tcl_NewStringObj(s, len)); - - /* - * It would be desirable to be able to terminate parsing - * if the return result is TCL_ERROR or TCL_BREAK. - */ --#if (TCL_MAJOR_VERSION == 8 && TCL_MINOR_VERSION == 0) -+#if (TCL_MAJOR_VERSION >= 8) - result = Tcl_GlobalEvalObj(expat->interp, cmdPtr); - #else - result = Tcl_EvalObj(expat->interp, cmdPtr, TCL_EVAL_GLOBAL); -@@ -1006,7 +1011,7 @@ - *---------------------------------------------------------------------------- - */ - --static void * -+static void - TclExpatProcessingInstructionHandler(userData, target, data) - void *userData; - CONST char *target; -@@ -1029,14 +1034,14 @@ - Tcl_IncrRefCount(cmdPtr); - Tcl_Preserve((ClientData) expat->interp); - -- Tcl_ListObjAppendElement(expat->interp, cmdPtr, Tcl_NewStringObj((char *)target, strlen(target))); -- Tcl_ListObjAppendElement(expat->interp, cmdPtr, Tcl_NewStringObj((char *)data, strlen(data))); -+ Tcl_ListObjAppendElement(expat->interp, cmdPtr, Tcl_NewStringObj(target, -1)); -+ Tcl_ListObjAppendElement(expat->interp, cmdPtr, Tcl_NewStringObj(data, -1)); - - /* - * It would be desirable to be able to terminate parsing - * if the return result is TCL_ERROR or TCL_BREAK. - */ --#if (TCL_MAJOR_VERSION == 8 && TCL_MINOR_VERSION == 0) -+#if (TCL_MAJOR_VERSION >= 8) - result = Tcl_GlobalEvalObj(expat->interp, cmdPtr); - #else - result = Tcl_EvalObj(expat->interp, cmdPtr, TCL_EVAL_GLOBAL); -@@ -1066,7 +1071,7 @@ - *---------------------------------------------------------------------------- - */ - --static void * -+static void - TclExpatDefaultHandler(userData, s, len) - void *userData; - CONST char *s; -@@ -1089,13 +1094,13 @@ - Tcl_IncrRefCount(cmdPtr); - Tcl_Preserve((ClientData) expat->interp); - -- Tcl_ListObjAppendElement(expat->interp, cmdPtr, Tcl_NewStringObj((char *)s, len)); -+ Tcl_ListObjAppendElement(expat->interp, cmdPtr, Tcl_NewStringObj(s, len)); - - /* - * It would be desirable to be able to terminate parsing - * if the return result is TCL_ERROR or TCL_BREAK. - */ --#if (TCL_MAJOR_VERSION == 8 && TCL_MINOR_VERSION == 0) -+#if (TCL_MAJOR_VERSION >= 8) - result = Tcl_GlobalEvalObj(expat->interp, cmdPtr); - #else - result = Tcl_EvalObj(expat->interp, cmdPtr, TCL_EVAL_GLOBAL); -@@ -1125,7 +1130,7 @@ - *---------------------------------------------------------------------------- - */ - --static void * -+static void - TclExpatUnparsedDeclHandler(userData, entityname, base, systemId, publicId, notationName) - void *userData; - CONST char *entityname; -@@ -1151,25 +1156,25 @@ - Tcl_IncrRefCount(cmdPtr); - Tcl_Preserve((ClientData) expat->interp); - -- Tcl_ListObjAppendElement(expat->interp, cmdPtr, Tcl_NewStringObj((char *)entityname, strlen(entityname))); -- Tcl_ListObjAppendElement(expat->interp, cmdPtr, Tcl_NewStringObj((char *)base, strlen(base))); -- Tcl_ListObjAppendElement(expat->interp, cmdPtr, Tcl_NewStringObj((char *)systemId, strlen(systemId))); -+ Tcl_ListObjAppendElement(expat->interp, cmdPtr, Tcl_NewStringObj(entityname, -1)); -+ Tcl_ListObjAppendElement(expat->interp, cmdPtr, Tcl_NewStringObj(base, -1)); -+ Tcl_ListObjAppendElement(expat->interp, cmdPtr, Tcl_NewStringObj(systemId, -1)); - if (publicId == NULL) { - Tcl_ListObjAppendElement(expat->interp, cmdPtr, Tcl_NewListObj(0, NULL)); - } else { -- Tcl_ListObjAppendElement(expat->interp, cmdPtr, Tcl_NewStringObj((char *)publicId, strlen(publicId))); -+ Tcl_ListObjAppendElement(expat->interp, cmdPtr, Tcl_NewStringObj(publicId, -1)); - } - if (notationName == NULL) { - Tcl_ListObjAppendElement(expat->interp, cmdPtr, Tcl_NewListObj(0, NULL)); - } else { -- Tcl_ListObjAppendElement(expat->interp, cmdPtr, Tcl_NewStringObj((char *)notationName, strlen(notationName))); -+ Tcl_ListObjAppendElement(expat->interp, cmdPtr, Tcl_NewStringObj(notationName, -1)); - } - - /* - * It would be desirable to be able to terminate parsing - * if the return result is TCL_ERROR or TCL_BREAK. - */ --#if (TCL_MAJOR_VERSION == 8 && TCL_MINOR_VERSION == 0) -+#if (TCL_MAJOR_VERSION >= 8) - result = Tcl_GlobalEvalObj(expat->interp, cmdPtr); - #else - result = Tcl_EvalObj(expat->interp, cmdPtr, TCL_EVAL_GLOBAL); -@@ -1199,7 +1204,7 @@ - *---------------------------------------------------------------------------- - */ - --static void * -+static void - TclExpatNotationDeclHandler(userData, notationName, base, systemId, publicId) - void *userData; - CONST char *notationName; -@@ -1224,24 +1229,24 @@ - Tcl_IncrRefCount(cmdPtr); - Tcl_Preserve((ClientData) expat->interp); - -- Tcl_ListObjAppendElement(expat->interp, cmdPtr, Tcl_NewStringObj((char *)notationName, strlen(notationName))); -- Tcl_ListObjAppendElement(expat->interp, cmdPtr, Tcl_NewStringObj((char *)base, strlen(base))); -+ Tcl_ListObjAppendElement(expat->interp, cmdPtr, Tcl_NewStringObj(notationName, -1)); -+ Tcl_ListObjAppendElement(expat->interp, cmdPtr, Tcl_NewStringObj(base, -1)); - if (systemId == NULL) { - Tcl_ListObjAppendElement(expat->interp, cmdPtr, Tcl_NewListObj(0, NULL)); - } else { -- Tcl_ListObjAppendElement(expat->interp, cmdPtr, Tcl_NewStringObj((char *)systemId, strlen(systemId))); -+ Tcl_ListObjAppendElement(expat->interp, cmdPtr, Tcl_NewStringObj(systemId, -1)); - } - if (publicId == NULL) { - Tcl_ListObjAppendElement(expat->interp, cmdPtr, Tcl_NewListObj(0, NULL)); - } else { -- Tcl_ListObjAppendElement(expat->interp, cmdPtr, Tcl_NewStringObj((char *)publicId, strlen(publicId))); -+ Tcl_ListObjAppendElement(expat->interp, cmdPtr, Tcl_NewStringObj(publicId, -1)); - } - - /* - * It would be desirable to be able to terminate parsing - * if the return result is TCL_ERROR or TCL_BREAK. - */ --#if (TCL_MAJOR_VERSION == 8 && TCL_MINOR_VERSION == 0) -+#if (TCL_MAJOR_VERSION >= 8) - result = Tcl_GlobalEvalObj(expat->interp, cmdPtr); - #else - result = Tcl_EvalObj(expat->interp, cmdPtr, TCL_EVAL_GLOBAL); -@@ -1279,15 +1284,18 @@ - XML_Encoding *info; - { - TclExpatInfo *expat = (TclExpatInfo *) encodingHandlerData; -+#if 0 - Tcl_Obj *cmdPtr; - int result; -+#endif - - Tcl_SetResult(expat->interp, "not implemented", NULL); -- return 0; -+ return 1; - -+#if 0 - if (expat->unknownencodingcommand == NULL || - expat->status != TCL_OK) { -- return; -+ return 1; - } - - /* -@@ -1306,7 +1314,7 @@ - * It would be desirable to be able to terminate parsing - * if the return result is TCL_ERROR or TCL_BREAK. - */ --#if (TCL_MAJOR_VERSION == 8 && TCL_MINOR_VERSION == 0) -+#if (TCL_MAJOR_VERSION >= 8) - result = Tcl_GlobalEvalObj(expat->interp, cmdPtr); - #else - result = Tcl_EvalObj(expat->interp, cmdPtr, TCL_EVAL_GLOBAL); -@@ -1317,7 +1325,8 @@ - - TclExpatHandlerResult(expat, result); - -- return; -+ return 0; -+#endif - } - - /* -@@ -1336,7 +1345,7 @@ - *---------------------------------------------------------------------------- - */ - --static void * -+static int - TclExpatExternalEntityRefHandler(parser, openEntityNames, base, systemId, publicId) - XML_Parser parser; - CONST char *openEntityNames; -@@ -1350,7 +1359,7 @@ - - if (expat->externalentitycommand == NULL || - expat->status != TCL_OK) { -- return; -+ return 0; - } - - /* -@@ -1361,16 +1370,16 @@ - Tcl_IncrRefCount(cmdPtr); - Tcl_Preserve((ClientData) expat->interp); - -- Tcl_ListObjAppendElement(expat->interp, cmdPtr, Tcl_NewStringObj((char *)openEntityNames, strlen(openEntityNames))); -- Tcl_ListObjAppendElement(expat->interp, cmdPtr, Tcl_NewStringObj((char *)base, strlen(base))); -- Tcl_ListObjAppendElement(expat->interp, cmdPtr, Tcl_NewStringObj((char *)systemId, strlen(systemId))); -- Tcl_ListObjAppendElement(expat->interp, cmdPtr, Tcl_NewStringObj((char *)publicId, strlen(publicId))); -+ Tcl_ListObjAppendElement(expat->interp, cmdPtr, Tcl_NewStringObj(openEntityNames, -1)); -+ Tcl_ListObjAppendElement(expat->interp, cmdPtr, Tcl_NewStringObj(base, -1)); -+ Tcl_ListObjAppendElement(expat->interp, cmdPtr, Tcl_NewStringObj(systemId, -1)); -+ Tcl_ListObjAppendElement(expat->interp, cmdPtr, Tcl_NewStringObj(publicId, -1)); - - /* - * It would be desirable to be able to terminate parsing - * if the return result is TCL_ERROR or TCL_BREAK. - */ --#if (TCL_MAJOR_VERSION == 8 && TCL_MINOR_VERSION == 0) -+#if (TCL_MAJOR_VERSION >= 8) - result = Tcl_GlobalEvalObj(expat->interp, cmdPtr); - #else - result = Tcl_EvalObj(expat->interp, cmdPtr, TCL_EVAL_GLOBAL); -@@ -1381,7 +1390,7 @@ - - TclExpatHandlerResult(expat, result); - -- return; -+ return 1; - } - - /* Property changes on: head/textproc/tclExpat/files/patch-aa ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/textproc/tclExpat/files/patch-tclexpat.c =================================================================== --- head/textproc/tclExpat/files/patch-tclexpat.c (nonexistent) +++ head/textproc/tclExpat/files/patch-tclexpat.c (revision 363336) @@ -0,0 +1,500 @@ +--- tclexpat.c.orig 1998-08-22 09:35:44.000000000 +0200 ++++ tclexpat.c 2013-05-13 12:11:18.000000000 +0200 +@@ -18,8 +18,9 @@ + * + */ + ++#include + #include +-#include "xmlparse.h" ++#include + + /* + * The structure below is used to refer to an expat parser object. +@@ -53,6 +54,8 @@ + * Prototypes for procedures defined later in this file: + */ + ++int Tclexpat_Init (Tcl_Interp *); ++static void TclExpatHandlerResult(TclExpatInfo *, int result); + static Tcl_ObjCmdProc TclExpatObjCmd; + static Tcl_ObjCmdProc TclExpatInstanceCmd; + static Tcl_CmdDeleteProc TclExpatDeleteCmd; +@@ -72,32 +75,32 @@ + int objc, + Tcl_Obj *CONST objv[])); + +-static void * (TclExpatElementStartHandler) _ANSI_ARGS_((void *userdata, ++static void (TclExpatElementStartHandler) _ANSI_ARGS_((void *userdata, + const XML_Char *name, + const XML_Char **atts)); +-static void * (TclExpatElementEndHandler) _ANSI_ARGS_((void *userData, ++static void (TclExpatElementEndHandler) _ANSI_ARGS_((void *userData, + const XML_Char *name)); +-static void * (TclExpatCharacterDataHandler) _ANSI_ARGS_((void *userData, ++static void (TclExpatCharacterDataHandler) _ANSI_ARGS_((void *userData, + const XML_Char *s, + int len)); +-static void * (TclExpatProcessingInstructionHandler) _ANSI_ARGS_((void *userData, ++static void (TclExpatProcessingInstructionHandler) _ANSI_ARGS_((void *userData, + const XML_Char *target, + const XML_Char *data)); +-static void * (TclExpatExternalEntityRefHandler) _ANSI_ARGS_((XML_Parser parser, ++static int (TclExpatExternalEntityRefHandler) _ANSI_ARGS_((XML_Parser parser, + const XML_Char *openEntityNames, + const XML_Char *base, + const XML_Char *systemId, + const XML_Char *publicId)); +-static void * (TclExpatDefaultHandler) _ANSI_ARGS_ ((void *userData, ++static void (TclExpatDefaultHandler) _ANSI_ARGS_ ((void *userData, + const XML_Char *s, + int len)); +-static void * (TclExpatUnparsedDeclHandler) _ANSI_ARGS_ ((void *userData, ++static void (TclExpatUnparsedDeclHandler) _ANSI_ARGS_ ((void *userData, + const XML_Char *entityname, + const XML_Char *base, + const XML_Char *systemId, + const XML_Char *publicId, + const XML_Char *notationName)); +-static void * (TclExpatNotationDeclHandler) _ANSI_ARGS_ ((void *userData, ++static void (TclExpatNotationDeclHandler) _ANSI_ARGS_ ((void *userData, + const XML_Char *notationName, + const XML_Char *base, + const XML_Char *systemId, +@@ -106,7 +109,7 @@ + const XML_Char *name, + XML_Encoding *info)); + +-#if (TCL_MAJOR_VERSION == 8 && TCL_MINOR_VERSION == 0) ++#if (TCL_MAJOR_VERSION >= 8) && !defined(Tcl_GetString) + + /* + *---------------------------------------------------------------------------- +@@ -134,7 +137,7 @@ + s = Tcl_GetStringFromObj(obj, &i); + return s; + } +-#endif /* TCL_MAJOR_VERSION == 8 && TCL_MINOR_VERSION == 0 */ ++#endif /* TCL_MAJOR_VERSION >= 8 */ + + /* + *---------------------------------------------------------------------------- +@@ -157,6 +160,10 @@ + Tcl_Interp *interp; /* Interpreter to initialise. */ + { + ++ if (Tcl_InitStubs(interp, TCL_VERSION, 0) == NULL) { ++ return TCL_ERROR; ++ } ++ + Tcl_PkgProvide(interp, "expat", "1.1"); + + Tcl_CreateObjCommand(interp, "expat", TclExpatObjCmd, NULL, NULL); +@@ -267,7 +274,6 @@ + Tcl_Interp *interp; + TclExpatInfo *expat; + { +- int len; + + if (!(expat->parser = XML_ParserCreate(NULL))) { + Tcl_SetResult(interp, "unable to create expat parser", NULL); +@@ -284,22 +290,22 @@ + */ + + XML_SetElementHandler(expat->parser, +- (XML_StartElementHandler) TclExpatElementStartHandler, +- (XML_EndElementHandler) TclExpatElementEndHandler); ++ TclExpatElementStartHandler, ++ TclExpatElementEndHandler); + XML_SetCharacterDataHandler(expat->parser, +- (XML_CharacterDataHandler) TclExpatCharacterDataHandler); ++ TclExpatCharacterDataHandler); + XML_SetProcessingInstructionHandler(expat->parser, +- (XML_ProcessingInstructionHandler) TclExpatProcessingInstructionHandler); ++ TclExpatProcessingInstructionHandler); + XML_SetDefaultHandler(expat->parser, +- (XML_DefaultHandler) TclExpatDefaultHandler); ++ TclExpatDefaultHandler); + XML_SetUnparsedEntityDeclHandler(expat->parser, +- (XML_UnparsedEntityDeclHandler) TclExpatUnparsedDeclHandler); ++ TclExpatUnparsedDeclHandler); + XML_SetNotationDeclHandler(expat->parser, +- (XML_NotationDeclHandler) TclExpatNotationDeclHandler); ++ TclExpatNotationDeclHandler); + XML_SetExternalEntityRefHandler(expat->parser, +- (XML_ExternalEntityRefHandler) TclExpatExternalEntityRefHandler); ++ TclExpatExternalEntityRefHandler); + XML_SetUnknownEncodingHandler(expat->parser, +- (XML_UnknownEncodingHandler) TclExpatUnknownEncodingHandler, ++ TclExpatUnknownEncodingHandler, + (void *) expat); + XML_SetUserData(expat->parser, + (void *) expat); +@@ -327,7 +333,6 @@ + TclExpatFreeParser(expat) + TclExpatInfo *expat; + { +- int len; + + XML_ParserFree(expat->parser); + expat->parser = NULL; +@@ -357,9 +362,9 @@ + Tcl_Obj *CONST objv[]; + { + TclExpatInfo *expat = (TclExpatInfo *) clientData; +- char *method, *data; ++ char *data; + int len, index, result = TCL_OK; +- static char *options[] = { ++ static CONST char * options[] = { + "configure", "cget", "parse", "reset", NULL + }; + enum options { +@@ -464,10 +469,10 @@ + + if (!result) { + Tcl_ResetResult(interp); +- sprintf(s, "%d", XML_GetCurrentLineNumber(expat->parser)); ++ sprintf(s, "%ld", (long)XML_GetCurrentLineNumber(expat->parser)); + Tcl_AppendResult(interp, "error \"", XML_ErrorString(XML_GetErrorCode(expat->parser)), + "\" at line ", s, " character ", NULL); +- sprintf(s, "%d", XML_GetCurrentColumnNumber(expat->parser)); ++ sprintf(s, "%ld", (long)XML_GetCurrentColumnNumber(expat->parser)); + Tcl_AppendResult(interp, s, NULL); + + return TCL_ERROR; +@@ -514,7 +519,7 @@ + int objc; + Tcl_Obj *CONST objv[]; + { +- static char *switches[] = { ++ static CONST char *switches[] = { + "-final", + "-baseurl", + "-elementstartcommand", +@@ -688,7 +693,7 @@ + } + + if (doParse) { +- return TclExpatParse(interp, expat->parser, "", 0); ++ return TclExpatParse(interp, expat, "", 0); + } else { + return TCL_OK; + } +@@ -739,7 +744,7 @@ + *---------------------------------------------------------------------------- + */ + +-void ++static void + TclExpatHandlerResult(expat, result) + TclExpatInfo *expat; + int result; +@@ -795,7 +800,7 @@ + *---------------------------------------------------------------------------- + */ + +-static void * ++static void + TclExpatElementStartHandler(userData, name, atts) + void *userData; + const char *name; +@@ -828,8 +833,8 @@ + + atList = Tcl_NewListObj(0, NULL); + for (atPtr = atts; atPtr[0] && atPtr[1]; atPtr += 2) { +- Tcl_ListObjAppendElement(expat->interp, atList, Tcl_NewStringObj((char *)atPtr[0], strlen(atPtr[0]))); +- Tcl_ListObjAppendElement(expat->interp, atList, Tcl_NewStringObj((char *)atPtr[1], strlen(atPtr[1]))); ++ Tcl_ListObjAppendElement(expat->interp, atList, Tcl_NewStringObj(atPtr[0], -1)); ++ Tcl_ListObjAppendElement(expat->interp, atList, Tcl_NewStringObj(atPtr[1], -1)); + } + + /* +@@ -840,14 +845,14 @@ + Tcl_IncrRefCount(cmdPtr); + Tcl_Preserve((ClientData) expat->interp); + +- Tcl_ListObjAppendElement(expat->interp, cmdPtr, Tcl_NewStringObj((char *)name, strlen(name))); ++ Tcl_ListObjAppendElement(expat->interp, cmdPtr, Tcl_NewStringObj(name, -1)); + Tcl_ListObjAppendElement(expat->interp, cmdPtr, atList); + + /* + * It would be desirable to be able to terminate parsing + * if the return result is TCL_ERROR or TCL_BREAK. + */ +-#if (TCL_MAJOR_VERSION == 8 && TCL_MINOR_VERSION == 0) ++#if (TCL_MAJOR_VERSION >= 8) + result = Tcl_GlobalEvalObj(expat->interp, cmdPtr); + #else + result = Tcl_EvalObj(expat->interp, cmdPtr, TCL_EVAL_GLOBAL); +@@ -877,7 +882,7 @@ + *---------------------------------------------------------------------------- + */ + +-static void * ++static void + TclExpatElementEndHandler(userData, name) + void *userData; + CONST char *name; +@@ -911,13 +916,13 @@ + Tcl_IncrRefCount(cmdPtr); + Tcl_Preserve((ClientData) expat->interp); + +- Tcl_ListObjAppendElement(expat->interp, cmdPtr, Tcl_NewStringObj((char *)name, strlen(name))); ++ Tcl_ListObjAppendElement(expat->interp, cmdPtr, Tcl_NewStringObj(name, -1)); + + /* + * It would be desirable to be able to terminate parsing + * if the return result is TCL_ERROR or TCL_BREAK. + */ +-#if (TCL_MAJOR_VERSION == 8 && TCL_MINOR_VERSION == 0) ++#if (TCL_MAJOR_VERSION >= 8) + result = Tcl_GlobalEvalObj(expat->interp, cmdPtr); + #else + result = Tcl_EvalObj(expat->interp, cmdPtr, TCL_EVAL_GLOBAL); +@@ -947,7 +952,7 @@ + *---------------------------------------------------------------------------- + */ + +-static void * ++static void + TclExpatCharacterDataHandler(userData, s, len) + void *userData; + CONST char *s; +@@ -970,13 +975,13 @@ + Tcl_IncrRefCount(cmdPtr); + Tcl_Preserve((ClientData) expat->interp); + +- Tcl_ListObjAppendElement(expat->interp, cmdPtr, Tcl_NewStringObj((char *)s, len)); ++ Tcl_ListObjAppendElement(expat->interp, cmdPtr, Tcl_NewStringObj(s, len)); + + /* + * It would be desirable to be able to terminate parsing + * if the return result is TCL_ERROR or TCL_BREAK. + */ +-#if (TCL_MAJOR_VERSION == 8 && TCL_MINOR_VERSION == 0) ++#if (TCL_MAJOR_VERSION >= 8) + result = Tcl_GlobalEvalObj(expat->interp, cmdPtr); + #else + result = Tcl_EvalObj(expat->interp, cmdPtr, TCL_EVAL_GLOBAL); +@@ -1006,7 +1011,7 @@ + *---------------------------------------------------------------------------- + */ + +-static void * ++static void + TclExpatProcessingInstructionHandler(userData, target, data) + void *userData; + CONST char *target; +@@ -1029,14 +1034,14 @@ + Tcl_IncrRefCount(cmdPtr); + Tcl_Preserve((ClientData) expat->interp); + +- Tcl_ListObjAppendElement(expat->interp, cmdPtr, Tcl_NewStringObj((char *)target, strlen(target))); +- Tcl_ListObjAppendElement(expat->interp, cmdPtr, Tcl_NewStringObj((char *)data, strlen(data))); ++ Tcl_ListObjAppendElement(expat->interp, cmdPtr, Tcl_NewStringObj(target, -1)); ++ Tcl_ListObjAppendElement(expat->interp, cmdPtr, Tcl_NewStringObj(data, -1)); + + /* + * It would be desirable to be able to terminate parsing + * if the return result is TCL_ERROR or TCL_BREAK. + */ +-#if (TCL_MAJOR_VERSION == 8 && TCL_MINOR_VERSION == 0) ++#if (TCL_MAJOR_VERSION >= 8) + result = Tcl_GlobalEvalObj(expat->interp, cmdPtr); + #else + result = Tcl_EvalObj(expat->interp, cmdPtr, TCL_EVAL_GLOBAL); +@@ -1066,7 +1071,7 @@ + *---------------------------------------------------------------------------- + */ + +-static void * ++static void + TclExpatDefaultHandler(userData, s, len) + void *userData; + CONST char *s; +@@ -1089,13 +1094,13 @@ + Tcl_IncrRefCount(cmdPtr); + Tcl_Preserve((ClientData) expat->interp); + +- Tcl_ListObjAppendElement(expat->interp, cmdPtr, Tcl_NewStringObj((char *)s, len)); ++ Tcl_ListObjAppendElement(expat->interp, cmdPtr, Tcl_NewStringObj(s, len)); + + /* + * It would be desirable to be able to terminate parsing + * if the return result is TCL_ERROR or TCL_BREAK. + */ +-#if (TCL_MAJOR_VERSION == 8 && TCL_MINOR_VERSION == 0) ++#if (TCL_MAJOR_VERSION >= 8) + result = Tcl_GlobalEvalObj(expat->interp, cmdPtr); + #else + result = Tcl_EvalObj(expat->interp, cmdPtr, TCL_EVAL_GLOBAL); +@@ -1125,7 +1130,7 @@ + *---------------------------------------------------------------------------- + */ + +-static void * ++static void + TclExpatUnparsedDeclHandler(userData, entityname, base, systemId, publicId, notationName) + void *userData; + CONST char *entityname; +@@ -1151,25 +1156,25 @@ + Tcl_IncrRefCount(cmdPtr); + Tcl_Preserve((ClientData) expat->interp); + +- Tcl_ListObjAppendElement(expat->interp, cmdPtr, Tcl_NewStringObj((char *)entityname, strlen(entityname))); +- Tcl_ListObjAppendElement(expat->interp, cmdPtr, Tcl_NewStringObj((char *)base, strlen(base))); +- Tcl_ListObjAppendElement(expat->interp, cmdPtr, Tcl_NewStringObj((char *)systemId, strlen(systemId))); ++ Tcl_ListObjAppendElement(expat->interp, cmdPtr, Tcl_NewStringObj(entityname, -1)); ++ Tcl_ListObjAppendElement(expat->interp, cmdPtr, Tcl_NewStringObj(base, -1)); ++ Tcl_ListObjAppendElement(expat->interp, cmdPtr, Tcl_NewStringObj(systemId, -1)); + if (publicId == NULL) { + Tcl_ListObjAppendElement(expat->interp, cmdPtr, Tcl_NewListObj(0, NULL)); + } else { +- Tcl_ListObjAppendElement(expat->interp, cmdPtr, Tcl_NewStringObj((char *)publicId, strlen(publicId))); ++ Tcl_ListObjAppendElement(expat->interp, cmdPtr, Tcl_NewStringObj(publicId, -1)); + } + if (notationName == NULL) { + Tcl_ListObjAppendElement(expat->interp, cmdPtr, Tcl_NewListObj(0, NULL)); + } else { +- Tcl_ListObjAppendElement(expat->interp, cmdPtr, Tcl_NewStringObj((char *)notationName, strlen(notationName))); ++ Tcl_ListObjAppendElement(expat->interp, cmdPtr, Tcl_NewStringObj(notationName, -1)); + } + + /* + * It would be desirable to be able to terminate parsing + * if the return result is TCL_ERROR or TCL_BREAK. + */ +-#if (TCL_MAJOR_VERSION == 8 && TCL_MINOR_VERSION == 0) ++#if (TCL_MAJOR_VERSION >= 8) + result = Tcl_GlobalEvalObj(expat->interp, cmdPtr); + #else + result = Tcl_EvalObj(expat->interp, cmdPtr, TCL_EVAL_GLOBAL); +@@ -1199,7 +1204,7 @@ + *---------------------------------------------------------------------------- + */ + +-static void * ++static void + TclExpatNotationDeclHandler(userData, notationName, base, systemId, publicId) + void *userData; + CONST char *notationName; +@@ -1224,24 +1229,24 @@ + Tcl_IncrRefCount(cmdPtr); + Tcl_Preserve((ClientData) expat->interp); + +- Tcl_ListObjAppendElement(expat->interp, cmdPtr, Tcl_NewStringObj((char *)notationName, strlen(notationName))); +- Tcl_ListObjAppendElement(expat->interp, cmdPtr, Tcl_NewStringObj((char *)base, strlen(base))); ++ Tcl_ListObjAppendElement(expat->interp, cmdPtr, Tcl_NewStringObj(notationName, -1)); ++ Tcl_ListObjAppendElement(expat->interp, cmdPtr, Tcl_NewStringObj(base, -1)); + if (systemId == NULL) { + Tcl_ListObjAppendElement(expat->interp, cmdPtr, Tcl_NewListObj(0, NULL)); + } else { +- Tcl_ListObjAppendElement(expat->interp, cmdPtr, Tcl_NewStringObj((char *)systemId, strlen(systemId))); ++ Tcl_ListObjAppendElement(expat->interp, cmdPtr, Tcl_NewStringObj(systemId, -1)); + } + if (publicId == NULL) { + Tcl_ListObjAppendElement(expat->interp, cmdPtr, Tcl_NewListObj(0, NULL)); + } else { +- Tcl_ListObjAppendElement(expat->interp, cmdPtr, Tcl_NewStringObj((char *)publicId, strlen(publicId))); ++ Tcl_ListObjAppendElement(expat->interp, cmdPtr, Tcl_NewStringObj(publicId, -1)); + } + + /* + * It would be desirable to be able to terminate parsing + * if the return result is TCL_ERROR or TCL_BREAK. + */ +-#if (TCL_MAJOR_VERSION == 8 && TCL_MINOR_VERSION == 0) ++#if (TCL_MAJOR_VERSION >= 8) + result = Tcl_GlobalEvalObj(expat->interp, cmdPtr); + #else + result = Tcl_EvalObj(expat->interp, cmdPtr, TCL_EVAL_GLOBAL); +@@ -1279,15 +1284,18 @@ + XML_Encoding *info; + { + TclExpatInfo *expat = (TclExpatInfo *) encodingHandlerData; ++#if 0 + Tcl_Obj *cmdPtr; + int result; ++#endif + + Tcl_SetResult(expat->interp, "not implemented", NULL); +- return 0; ++ return 1; + ++#if 0 + if (expat->unknownencodingcommand == NULL || + expat->status != TCL_OK) { +- return; ++ return 1; + } + + /* +@@ -1306,7 +1314,7 @@ + * It would be desirable to be able to terminate parsing + * if the return result is TCL_ERROR or TCL_BREAK. + */ +-#if (TCL_MAJOR_VERSION == 8 && TCL_MINOR_VERSION == 0) ++#if (TCL_MAJOR_VERSION >= 8) + result = Tcl_GlobalEvalObj(expat->interp, cmdPtr); + #else + result = Tcl_EvalObj(expat->interp, cmdPtr, TCL_EVAL_GLOBAL); +@@ -1317,7 +1325,8 @@ + + TclExpatHandlerResult(expat, result); + +- return; ++ return 0; ++#endif + } + + /* +@@ -1336,7 +1345,7 @@ + *---------------------------------------------------------------------------- + */ + +-static void * ++static int + TclExpatExternalEntityRefHandler(parser, openEntityNames, base, systemId, publicId) + XML_Parser parser; + CONST char *openEntityNames; +@@ -1350,7 +1359,7 @@ + + if (expat->externalentitycommand == NULL || + expat->status != TCL_OK) { +- return; ++ return 0; + } + + /* +@@ -1361,16 +1370,16 @@ + Tcl_IncrRefCount(cmdPtr); + Tcl_Preserve((ClientData) expat->interp); + +- Tcl_ListObjAppendElement(expat->interp, cmdPtr, Tcl_NewStringObj((char *)openEntityNames, strlen(openEntityNames))); +- Tcl_ListObjAppendElement(expat->interp, cmdPtr, Tcl_NewStringObj((char *)base, strlen(base))); +- Tcl_ListObjAppendElement(expat->interp, cmdPtr, Tcl_NewStringObj((char *)systemId, strlen(systemId))); +- Tcl_ListObjAppendElement(expat->interp, cmdPtr, Tcl_NewStringObj((char *)publicId, strlen(publicId))); ++ Tcl_ListObjAppendElement(expat->interp, cmdPtr, Tcl_NewStringObj(openEntityNames, -1)); ++ Tcl_ListObjAppendElement(expat->interp, cmdPtr, Tcl_NewStringObj(base, -1)); ++ Tcl_ListObjAppendElement(expat->interp, cmdPtr, Tcl_NewStringObj(systemId, -1)); ++ Tcl_ListObjAppendElement(expat->interp, cmdPtr, Tcl_NewStringObj(publicId, -1)); + + /* + * It would be desirable to be able to terminate parsing + * if the return result is TCL_ERROR or TCL_BREAK. + */ +-#if (TCL_MAJOR_VERSION == 8 && TCL_MINOR_VERSION == 0) ++#if (TCL_MAJOR_VERSION >= 8) + result = Tcl_GlobalEvalObj(expat->interp, cmdPtr); + #else + result = Tcl_EvalObj(expat->interp, cmdPtr, TCL_EVAL_GLOBAL); +@@ -1381,7 +1390,7 @@ + + TclExpatHandlerResult(expat, result); + +- return; ++ return 1; + } + + /* Property changes on: head/textproc/tclExpat/files/patch-tclexpat.c ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/textproc/wordnet/files/patch-ah =================================================================== --- head/textproc/wordnet/files/patch-ah (revision 363335) +++ head/textproc/wordnet/files/patch-ah (nonexistent) @@ -1,198 +0,0 @@ ---- lib/morph.c Fri May 6 13:17:39 2005 -+++ lib/morph.c Tue Dec 20 23:21:44 2005 -@@ -19,7 +19,7 @@ - #endif - --static char *Id = "$Id: morph.c,v 1.67 2006/11/14 21:00:23 wn Exp $"; -+__FBSDID("$Id: morph.c,v 1.67 2006/11/14 21:00:23 wn Exp $"); - --static char *sufx[] ={ -+static const char *sufx[] ={ - /* Noun suffixes */ - "s", "ses", "xes", "zes", "ches", "shes", "men", "ies", -@@ -30,5 +30,5 @@ - }; - --static char *addr[] ={ -+static const char *addr[] ={ - /* Noun endings */ - "", "s", "x", "z", "ch", "sh", "man", "y", -@@ -43,35 +43,36 @@ - static char msgbuf[256]; - --#define NUMPREPS 15 - - static struct { -- char *str; -+ const char *str; - int strlen; --} prepositions[NUMPREPS] = { -- "to", 2, -- "at", 2, -- "of", 2, -- "on", 2, -- "off", 3, -- "in", 2, -- "out", 3, -- "up", 2, -- "down", 4, -- "from", 4, -- "with", 4, -- "into", 4, -- "for", 3, -- "about", 5, -- "between", 7, -+} prepositions[] = { -+ { "to", 2 }, -+ { "at", 2 }, -+ { "of", 2 }, -+ { "on", 2 }, -+ { "off", 3 }, -+ { "in", 2 }, -+ { "out", 3 }, -+ { "up", 2 }, -+ { "down", 4 }, -+ { "from", 4 }, -+ { "with", 4 }, -+ { "into", 4 }, -+ { "for", 3 }, -+ { "about", 5 }, -+ { "between", 7 } - }; - -+#define NUMPREPS sizeof(prepositions)/sizeof(prepositions[0]) -+ - static FILE *exc_fps[NUMPARTS + 1]; - --static int do_init(); --static int strend(char *, char *); --static char *wordbase(char *, int); --static int hasprep(char *, int); --static char *exc_lookup(char *, int); --static char *morphprep(char *); -+static int do_init(void); -+static int strend(const char *, const char *); -+static const char *wordbase(const char *, int); -+static int hasprep(const char *, unsigned int); -+static const char *exc_lookup(const char *, int); -+static const char *morphprep(const char *); - - /* Open exception list files */ -@@ -167,13 +168,15 @@ - with NULL argument return additional baseforms for original string. */ - --char *morphstr(char *origstr, int pos) -+const char * -+morphstr(const char *origstr, int pos) - { - static char searchstr[WORDBUF], str[WORDBUF]; - static int svcnt, svprep; -- char word[WORDBUF], *tmp; -+ char word[WORDBUF]; -+ const char *tmp; - int cnt, st_idx = 0, end_idx; - int prep; -- char *end_idx1, *end_idx2; -- char *append; -+ const char *end_idx1, *end_idx2; -+ const char *append; - - if (pos == SATELLITE) -@@ -230,5 +233,6 @@ - strncpy(word, str + st_idx, end_idx - st_idx); - word[end_idx - st_idx] = '\0'; -- if(tmp = morphword(word, pos)) -+ tmp = morphword(word, pos); -+ if(tmp) - strcat(searchstr,tmp); - else -@@ -238,5 +242,6 @@ - } - -- if(tmp = morphword(strcpy(word, str + st_idx), pos)) -+ tmp = morphword(strcpy(word, str + st_idx), pos); -+ if(tmp) - strcat(searchstr,tmp); - else -@@ -264,13 +269,14 @@ - - /* Try to find baseform (lemma) of individual word in POS */ --char *morphword(char *word, int pos) -+const char * -+morphword(const char *word, int pos) - { - int offset, cnt; - int i; - static char retval[WORDBUF]; -- char *tmp, tmpbuf[WORDBUF], *end; -+ char tmpbuf[WORDBUF]; -+ const char *tmp, *end; - -- sprintf(retval,""); -- sprintf(tmpbuf, ""); -+ retval[0] = tmpbuf[0] = '\0'; - end = ""; - -@@ -315,7 +321,7 @@ - } - --static int strend(char *str1, char *str2) -+static int strend(const char *str1, const char *str2) - { -- char *pt1; -+ const char *pt1; - - if(strlen(str2) >= strlen(str1)) -@@ -329,5 +335,6 @@ - } - --static char *wordbase(char *word, int ender) -+static const char * -+wordbase(const char *word, int ender) - { - char *pt1; -@@ -344,10 +351,10 @@ - } - --static int hasprep(char *s, int wdcnt) -+static int hasprep(const char *s, unsigned int wdcnt) - { - /* Find a preposition in the verb string and return its - corresponding word number. */ - -- int i, wdnum; -+ unsigned int i, wdnum; - - for (wdnum = 2; wdnum <= wdcnt; wdnum++) { -@@ -362,9 +369,9 @@ - } - --static char *exc_lookup(char *word, int pos) -+static const char * -+exc_lookup(const char *word, int pos) - { - static char line[WORDBUF], *beglp, *endlp; -- char *excline; -- int found = 0; -+ const char *excline; - - if (exc_fps[pos] == NULL) -@@ -394,7 +401,8 @@ - } - --static char *morphprep(char *s) -+static const char * -+morphprep(const char *s) - { -- char *rest, *exc_word, *lastwd = NULL, *last; -+ const char *rest, *exc_word, *lastwd = NULL, *last; - int i, offset, cnt; - char word[WORDBUF], end[WORDBUF]; -@@ -408,5 +416,6 @@ - last = strrchr(s, '_'); - if (rest != last) { /* more than 2 words */ -- if (lastwd = morphword(last + 1, NOUN)) { -+ lastwd = morphword(last + 1, NOUN); -+ if (lastwd) { - strncpy(end, rest, last - rest + 1); - end[last-rest+1] = '\0'; Property changes on: head/textproc/wordnet/files/patch-ah ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/textproc/wordnet/files/patch-ae =================================================================== --- head/textproc/wordnet/files/patch-ae (revision 363335) +++ head/textproc/wordnet/files/patch-ae (nonexistent) @@ -1,1175 +0,0 @@ ---- lib/search.c 2006-11-29 16:02:21.000000000 -0500 -+++ lib/search.c 2014-04-01 14:50:06.000000000 -0400 -@@ -17,5 +17,5 @@ - #include "wn.h" - --static char *Id = "$Id: search.c,v 1.166 2006/11/14 20:52:45 wn Exp $"; -+__FBSDID("$Id: search.c,v 1.166 2006/11/14 20:52:45 wn Exp $"); - - /* For adjectives, indicates synset type */ -@@ -45,12 +45,12 @@ - /* Forward function declarations */ - --static void WNOverview(char *, int); -+static void WNOverview(const char *, int); - static void findverbgroups(IndexPtr); --static void add_relatives(int, IndexPtr, int, int); -+static void add_relatives(int, int); - static void free_rellist(void); --static void printsynset(char *, SynsetPtr, char *, int, int, int, int); --static void printantsynset(SynsetPtr, char *, int, int); --static char *printant(int, SynsetPtr, int, char *, char *); --static void printbuffer(char *); -+static void printsynset(const char *, SynsetPtr, const char *, int, int, int, int); -+static void printantsynset(SynsetPtr, const char *, int); -+static const char *printant(int, SynsetPtr, int, const char *, const char *); -+static void printbuffer(const char *); - static void printsns(SynsetPtr, int); - static void printsense(SynsetPtr, int); -@@ -62,6 +62,6 @@ - static int getsearchsense(SynsetPtr, int); - static int depthcheck(int, SynsetPtr); --static void interface_doevents(); --static void getexample(char *, char *); -+static void interface_doevents(void); -+static void getexample(const char *, const char *); - static int findexample(SynsetPtr); - -@@ -84,9 +84,10 @@ - Input word must be exact match of string in database. */ - --IndexPtr index_lookup(char *word, int dbase) -+IndexPtr -+index_lookup(const char *word, int dbase) - { - IndexPtr idx = NULL; - FILE *fp; -- char *line; -+ const char *line; - - if ((fp = indexfps[dbase]) == NULL) { -@@ -111,14 +112,16 @@ - */ - --IndexPtr parse_index(long offset, int dbase, char *line) { -+IndexPtr -+parse_index(long offset, int dbase, const char *line) { - - IndexPtr idx = NULL; - char *ptrtok; - int j; -+ int len; - - if ( !line ) - line = read_index( offset, indexfps[dbase] ); - -- idx = (IndexPtr)malloc(sizeof(Index)); -+ idx = malloc(sizeof(Index)); - assert(idx); - -@@ -126,61 +129,62 @@ - idx->idxoffset = offset; - -- idx->wd='\0'; -- idx->pos='\0'; -+ idx->wd=NULL; -+ idx->pos=NULL; - idx->off_cnt=0; - idx->tagged_cnt = 0; - idx->sense_cnt=0; -- idx->offset='\0'; -+ idx->offset=NULL; - idx->ptruse_cnt=0; -- idx->ptruse='\0'; -+ idx->ptruse=NULL; - - /* get the word */ -- ptrtok=strtok(line," \n"); -+ ptrtok = strpbrk(line, " \n"); -+ len = ptrtok - line; - -- idx->wd = malloc(strlen(ptrtok) + 1); -+ idx->wd = malloc(len + 1); - assert(idx->wd); -- strcpy(idx->wd, ptrtok); -+ memcpy(idx->wd, line, len); -+ idx->wd[len] = '\0'; -+ line = ptrtok + 1; - - /* get the part of speech */ -- ptrtok=strtok(NULL," \n"); -- idx->pos = malloc(strlen(ptrtok) + 1); -+ ptrtok = strpbrk(line, " \n"); -+ len = ptrtok - line; -+ -+ idx->pos = malloc(len + 1); - assert(idx->pos); -- strcpy(idx->pos, ptrtok); -+ memcpy(idx->pos, line, len); -+ idx->pos[len] = '\0'; -+ line = ptrtok + 1; - - /* get the collins count */ -- ptrtok=strtok(NULL," \n"); -- idx->sense_cnt = atoi(ptrtok); -- -+ idx->sense_cnt = strtoul(line, &ptrtok, 10); -+ - /* get the number of pointers types */ -- ptrtok=strtok(NULL," \n"); -- idx->ptruse_cnt = atoi(ptrtok); -- -+ idx->ptruse_cnt = strtoul(ptrtok + 1, &ptrtok, 10); -+ - if (idx->ptruse_cnt) { -- idx->ptruse = (int *) malloc(idx->ptruse_cnt * (sizeof(int))); -+ idx->ptruse = malloc(idx->ptruse_cnt * (sizeof(short))); - assert(idx->ptruse); - - /* get the pointers types */ - for(j=0;j < idx->ptruse_cnt; j++) { -- ptrtok=strtok(NULL," \n"); -- idx->ptruse[j] = getptrtype(ptrtok); -+ idx->ptruse[j] = getptrtype(ptrtok + 1, &ptrtok); - } - } - - /* get the number of offsets */ -- ptrtok=strtok(NULL," \n"); -- idx->off_cnt = atoi(ptrtok); -+ idx->off_cnt = strtoul(ptrtok + 1, &ptrtok, 10); - - /* get the number of senses that are tagged */ -- ptrtok=strtok(NULL," \n"); -- idx->tagged_cnt = atoi(ptrtok); -- -+ idx->tagged_cnt = strtoul(ptrtok + 1, &ptrtok, 10); -+ - /* make space for the offsets */ -- idx->offset = (long *) malloc(idx->off_cnt * (sizeof(long))); -+ idx->offset = malloc(idx->off_cnt * (sizeof(long))); - assert(idx->offset); - - /* get the offsets */ - for(j=0;joff_cnt;j++) { -- ptrtok=strtok(NULL," \n"); -- idx->offset[j] = atol(ptrtok); -+ idx->offset[j] = strtoul(ptrtok + 1, &ptrtok, 10); - } - return(idx); -@@ -191,5 +195,6 @@ - hyphens, strip hyphens and underscores, strip periods. */ - --IndexPtr getindex(char *searchstr, int dbase) -+IndexPtr -+getindex(const char *searchstr, int dbase) - { - int i, j, k; -@@ -207,6 +212,8 @@ - - offset = 0; -- strtolower(searchstr); -- for (i = 0; i < MAX_FORMS; i++) { -+ strtolower2(searchstr, strings[0]); -+ searchstr = strings[0]; -+ offsets[0] = 0; -+ for (i = 1; i < MAX_FORMS; i++) { - strcpy(strings[i], searchstr); - offsets[i] = 0; -@@ -230,9 +237,9 @@ - and get offsets of unique strings. */ - -- if (strings[0][0] != NULL) -+ if (strings[0][0] != '\0') - offsets[0] = index_lookup(strings[0], dbase); - - for (i = 1; i < MAX_FORMS; i++) -- if ((strings[i][0]) != NULL && (strcmp(strings[0], strings[i]))) -+ if ((strings[i][0]) != '\0' && (strcmp(strings[0], strings[i]))) - offsets[i] = index_lookup(strings[i], dbase); - } -@@ -251,5 +258,6 @@ - entry in data structure. */ - --SynsetPtr read_synset(int dbase, long boffset, char *word) -+SynsetPtr -+read_synset(int dbase, long boffset, const char *word) - { - FILE *fp; -@@ -270,19 +278,18 @@ - in data structure. */ - --SynsetPtr parse_synset(FILE *fp, int dbase, char *word) -+SynsetPtr -+parse_synset(FILE *fp, int dbase, const char *word) - { -- static char line[LINEBUF]; -- char tbuf[SMLINEBUF]; -+ char line[LINEBUF]; - char *ptrtok; -- char *tmpptr; - int foundpert = 0; - char wdnum[3]; -- int i; -+ int i, len; - SynsetPtr synptr; -- long loc; /* sanity check on file location */ -+ unsigned long loc; /* sanity check on file location */ - - loc = ftell(fp); - -- if ((tmpptr = fgets(line, LINEBUF, fp)) == NULL) -+ if (fgets(line, LINEBUF, fp) == NULL) - return(NULL); - -@@ -293,18 +300,18 @@ - synptr->sstype = DONT_KNOW; - synptr->fnum = 0; -- synptr->pos = '\0'; -+ synptr->pos = NULL; - synptr->wcount = 0; -- synptr->words = '\0'; -+ synptr->words = NULL; - synptr->whichword = 0; - synptr->ptrcount = 0; -- synptr->ptrtyp = '\0'; -- synptr->ptroff = '\0'; -- synptr->ppos = '\0'; -- synptr->pto = '\0'; -- synptr->pfrm = '\0'; -+ synptr->ptrtyp = NULL; -+ synptr->ptroff = NULL; -+ synptr->ppos = NULL; -+ synptr->pto = NULL; -+ synptr->pfrm = NULL; - synptr->fcount = 0; -- synptr->frmid = '\0'; -- synptr->frmto = '\0'; -- synptr->defn = '\0'; -+ synptr->frmid = NULL; -+ synptr->frmto = NULL; -+ synptr->defn = NULL; - synptr->key = 0; - synptr->nextss = NULL; -@@ -315,13 +322,10 @@ - synptr->headsense = 0; - -- ptrtok = line; -- - /* looking at offset */ -- ptrtok = strtok(line," \n"); -- synptr->hereiam = atol(ptrtok); -+ synptr->hereiam = strtol(line, &ptrtok, 10); - - /* sanity check - make sure starting file offset matches first field */ - if (synptr->hereiam != loc) { -- sprintf(msgbuf, "WordNet library error: no synset at location %d\n", -+ sprintf(msgbuf, "WordNet library error: no synset at location %lu\n", - loc); - display_message(msgbuf); -@@ -331,18 +335,20 @@ - - /* looking at FNUM */ -- ptrtok = strtok(NULL," \n"); -- synptr->fnum = atoi(ptrtok); -+ synptr->fnum = strtol(ptrtok + 1, &ptrtok, 10); - - /* looking at POS */ -- ptrtok = strtok(NULL, " \n"); -- synptr->pos = malloc(strlen(ptrtok) + 1); -+ ptrtok++; -+ len = strpbrk(ptrtok, " \n") - ptrtok; -+ synptr->pos = malloc(len + 1); - assert(synptr->pos); -- strcpy(synptr->pos, ptrtok); -+ memcpy(synptr->pos, ptrtok, len); -+ synptr->pos[len] = '\0'; -+ ptrtok += len; - if (getsstype(synptr->pos) == SATELLITE) - synptr->sstype = INDIRECT_ANT; - - /* looking at numwords */ -- ptrtok = strtok(NULL, " \n"); -- synptr->wcount = strtol(ptrtok, NULL, 16); -+ synptr->wcount = strtol(ptrtok, &ptrtok, 16); -+ ptrtok++; - - synptr->words = (char **)malloc(synptr->wcount * sizeof(char *)); -@@ -354,40 +360,42 @@ - - for (i = 0; i < synptr->wcount; i++) { -- ptrtok = strtok(NULL, " \n"); -- synptr->words[i] = malloc(strlen(ptrtok) + 1); -+ len = strpbrk(ptrtok, " \n") - ptrtok; -+ synptr->words[i] = malloc(len + 1); - assert(synptr->words[i]); -- strcpy(synptr->words[i], ptrtok); -+ memcpy(synptr->words[i], ptrtok, len); -+ synptr->words[i][len] = '\0'; - - /* is this the word we're looking for? */ - -- if (word && !strcmp(word,strtolower(ptrtok))) -+ if (word && !strcmp(word, synptr->words[i])) - synptr->whichword = i+1; - -- ptrtok = strtok(NULL, " \n"); -- sscanf(ptrtok, "%x", &synptr->lexid[i]); -+ ptrtok += len; -+ synptr->lexid[i] = strtol(ptrtok, &ptrtok, 16); -+ ptrtok++; - } - - /* get the pointer count */ -- ptrtok = strtok(NULL," \n"); -- synptr->ptrcount = atoi(ptrtok); -+ synptr->ptrcount = strtol(ptrtok, &ptrtok, 10); -+ ptrtok++; - - if (synptr->ptrcount) { - - /* alloc storage for the pointers */ -- synptr->ptrtyp = (int *)malloc(synptr->ptrcount * sizeof(int)); -+ synptr->ptrtyp = malloc(synptr->ptrcount * sizeof(int)); - assert(synptr->ptrtyp); -- synptr->ptroff = (long *)malloc(synptr->ptrcount * sizeof(long)); -+ synptr->ptroff = malloc(synptr->ptrcount * sizeof(unsigned long)); - assert(synptr->ptroff); -- synptr->ppos = (int *)malloc(synptr->ptrcount * sizeof(int)); -+ synptr->ppos = malloc(synptr->ptrcount * sizeof(int)); - assert(synptr->ppos); -- synptr->pto = (int *)malloc(synptr->ptrcount * sizeof(int)); -+ synptr->pto = malloc(synptr->ptrcount * sizeof(short)); - assert(synptr->pto); -- synptr->pfrm = (int *)malloc(synptr->ptrcount * sizeof(int)); -+ synptr->pfrm = malloc(synptr->ptrcount * sizeof(short)); - assert(synptr->pfrm); - - for(i = 0; i < synptr->ptrcount; i++) { - /* get the pointer type */ -- ptrtok = strtok(NULL," \n"); -- synptr->ptrtyp[i] = getptrtype(ptrtok); -+ synptr->ptrtyp[i] = getptrtype(ptrtok, &ptrtok); -+ ptrtok++; - /* For adjectives, set the synset type if it has a direct - antonym */ -@@ -400,23 +408,19 @@ - - /* get the pointer offset */ -- ptrtok = strtok(NULL," \n"); -- synptr->ptroff[i] = atol(ptrtok); -+ synptr->ptroff[i] = strtol(ptrtok, &ptrtok, 10); -+ ptrtok++; - - /* get the pointer part of speech */ -- ptrtok = strtok(NULL, " \n"); - synptr->ppos[i] = getpos(ptrtok); - - /* get the lexp to/from restrictions */ -- ptrtok = strtok(NULL," \n"); -- -- tmpptr = ptrtok; -- strncpy(wdnum, tmpptr, 2); -+ -+ ptrtok = strpbrk(ptrtok, " \n") + 1; -+ strncpy(wdnum, ptrtok, 2); - wdnum[2] = '\0'; -- synptr->pfrm[i] = strtol(wdnum, (char **)NULL, 16); -+ synptr->pfrm[i] = strtoul(wdnum, NULL, 16); - -- tmpptr += 2; -- strncpy(wdnum, tmpptr, 2); -- wdnum[2] = '\0'; -- synptr->pto[i] = strtol(wdnum, (char **)NULL, 16); -+ synptr->pto[i] = strtoul(ptrtok + 2, &ptrtok, 16); -+ ptrtok++; /* Something like ``0000 '' */ - } - } -@@ -429,23 +433,22 @@ - /* retireve optional information from verb synset */ - if(dbase == VERB) { -- ptrtok = strtok(NULL," \n"); -- synptr->fcount = atoi(ptrtok); -- -+ synptr->fcount = strtol(ptrtok, &ptrtok, 10); -+ ptrtok++; - /* allocate frame storage */ - -- synptr->frmid = (int *)malloc(synptr->fcount * sizeof(int)); -+ synptr->frmid = malloc(synptr->fcount * sizeof(int)); - assert(synptr->frmid); -- synptr->frmto = (int *)malloc(synptr->fcount * sizeof(int)); -+ synptr->frmto = malloc(synptr->fcount * sizeof(int)); - assert(synptr->frmto); - - for(i=0;ifcount;i++) { - /* skip the frame pointer (+) */ -- ptrtok = strtok(NULL," \n"); -+ ptrtok = strpbrk(ptrtok, " \n") + 1; - -- ptrtok = strtok(NULL," \n"); -- synptr->frmid[i] = atoi(ptrtok); -+ synptr->frmid[i] = strtol(ptrtok, &ptrtok, 10); -+ ptrtok++; - -- ptrtok = strtok(NULL," \n"); -- synptr->frmto[i] = strtol(ptrtok, NULL, 16); -+ synptr->frmto[i] = strtol(ptrtok, &ptrtok, 16); -+ ptrtok++; - } - } -@@ -453,22 +456,38 @@ - /* get the optional definition */ - -- ptrtok = strtok(NULL," \n"); -- if (ptrtok) { -- ptrtok = strtok(NULL," \n"); -- sprintf(tbuf, ""); -- while (ptrtok != NULL) { -- strcat(tbuf,ptrtok); -- ptrtok = strtok(NULL, " \n"); -- if(ptrtok) -- strcat(tbuf," "); -- } -- assert((1 + strlen(tbuf)) < sizeof(tbuf)); -- synptr->defn = malloc(strlen(tbuf) + 4); -+ ptrtok = strpbrk(ptrtok, " \n") + 1; -+ if (ptrtok && *ptrtok) { -+ char *defn; -+ len = strlen(ptrtok); -+ synptr->defn = malloc(len + 2); - assert(synptr->defn); -- sprintf(synptr->defn,"(%s)",tbuf); -+ synptr->defn[0] = '('; -+ for (defn = synptr->defn + 1; *ptrtok; ptrtok++) { -+ switch (*ptrtok) { -+ case '\n': -+ case ' ': -+ /* skip adjacent and initial blanks: */ -+ if (defn == synptr->defn + 1 || defn[-1] == ' ') -+ continue; -+ do -+ ptrtok++; -+ while (*ptrtok == '\n' || *ptrtok == ' '); -+ if (*ptrtok == '\0') -+ break; /* out of the loop */ -+ *defn++ = ' '; -+ /* FALLTHROUGH */; -+ default: -+ *defn++ = *ptrtok; -+ continue; -+ } -+ break; -+ } -+ *defn++ = ')'; -+ assert(defn - synptr->defn < len + 2); -+ *defn = '\0'; - } - - if (keyindexfp) { /* we have unique keys */ -- sprintf(tmpbuf, "%c:%8.8d", partchars[dbase], synptr->hereiam); -+ sprintf(tmpbuf, "%c:%8.8ld", partchars[dbase], synptr->hereiam); - synptr->key = GetKeyForOffset(tmpbuf); - } -@@ -547,5 +566,5 @@ - /* Recursive search algorithm to trace a pointer tree */ - --static void traceptrs(SynsetPtr synptr, int ptrtyp, int dbase, int depth) -+static void traceptrs(SynsetPtr synptr, int ptyp, int dbase, int depth) - { - int i; -@@ -559,15 +578,15 @@ - return; - -- if (ptrtyp < 0) { -- ptrtyp = -ptrtyp; -+ if (ptyp < 0) { -+ ptyp = -ptyp; - extraindent = 2; - } - - for (i = 0; i < synptr->ptrcount; i++) { -- if ((ptrtyp == HYPERPTR && (synptr->ptrtyp[i] == HYPERPTR || -+ if ((ptyp == HYPERPTR && (synptr->ptrtyp[i] == HYPERPTR || - synptr->ptrtyp[i] == INSTANCE)) || -- (ptrtyp == HYPOPTR && (synptr->ptrtyp[i] == HYPOPTR || -+ (ptyp == HYPOPTR && (synptr->ptrtyp[i] == HYPOPTR || - synptr->ptrtyp[i] == INSTANCES)) || -- ((synptr->ptrtyp[i] == ptrtyp) && -+ ((synptr->ptrtyp[i] == ptyp) && - ((synptr->pfrm[i] == 0) || - (synptr->pfrm[i] == synptr->whichword)))) { -@@ -634,5 +653,5 @@ - Otherwise, just print the synset pointed to. */ - -- if ((ptrtyp == PERTPTR || ptrtyp == PPLPTR) && -+ if ((ptyp == PERTPTR || ptyp == PPLPTR) && - synptr->pto[i] != 0) { - sprintf(tbuf, " (Sense %d)\n", -@@ -640,5 +659,5 @@ - printsynset(prefix, cursyn, tbuf, DEFOFF, synptr->pto[i], - SKIP_ANTS, PRINT_MARKER); -- if (ptrtyp == PPLPTR) { /* adjective pointing to verb */ -+ if (ptyp == PPLPTR) { /* adjective pointing to verb */ - printsynset(" =>", cursyn, "\n", - DEFON, ALLWORDS, PRINT_ANTS, PRINT_MARKER); -@@ -656,5 +675,5 @@ - traceptrs(cursyn, HYPERPTR, getpos(cursyn->pos), 0); - } -- } else if (ptrtyp == ANTPTR && dbase != ADJ && synptr->pto[i] != 0) { -+ } else if (ptyp == ANTPTR && dbase != ADJ && synptr->pto[i] != 0) { - sprintf(tbuf, " (Sense %d)\n", - cursyn->wnsns[synptr->pto[i] - 1]); -@@ -670,10 +689,10 @@ - printed in buffer so results can be truncated later. */ - -- if (ptrtyp >= ISMEMBERPTR && ptrtyp <= HASPARTPTR) -+ if (ptyp >= ISMEMBERPTR && ptyp <= HASPARTPTR) - lastholomero = strlen(searchbuffer); - - if(depth) { - depth = depthcheck(depth, cursyn); -- traceptrs(cursyn, ptrtyp, getpos(cursyn->pos), (depth+1)); -+ traceptrs(cursyn, ptyp, getpos(cursyn->pos), (depth+1)); - - free_synset(cursyn); -@@ -684,5 +703,6 @@ - } - --static void tracecoords(SynsetPtr synptr, int ptrtyp, int dbase, int depth) -+static void -+tracecoords(SynsetPtr synptr, int ptyp, int depth) - { - int i; -@@ -709,9 +729,9 @@ - SKIP_ANTS, PRINT_MARKER); - -- traceptrs(cursyn, ptrtyp, getpos(cursyn->pos), depth); -+ traceptrs(cursyn, ptyp, getpos(cursyn->pos), depth); - - if(depth) { - depth = depthcheck(depth, cursyn); -- tracecoords(cursyn, ptrtyp, getpos(cursyn->pos), (depth+1)); -+ tracecoords(cursyn, ptyp, (depth+1)); - free_synset(cursyn); - } else -@@ -721,9 +741,10 @@ - } - --static void traceclassif(SynsetPtr synptr, int dbase, int search) -+static void -+traceclassif(SynsetPtr synptr, int search) - { - int i, j, idx; - SynsetPtr cursyn; -- long int prlist[1024]; -+ unsigned int prlist[1024]; - char head[60]; - int svwnsnsflag; -@@ -789,9 +810,12 @@ - } - --static void tracenomins(SynsetPtr synptr, int dbase) -+static void -+tracenomins(SynsetPtr synptr) - { - int i, j, idx; - SynsetPtr cursyn; -+#ifdef FOOP - long int prlist[1024]; -+#endif - char prefix[40], tbuf[20]; - -@@ -823,16 +847,20 @@ - SKIP_ANTS, SKIP_MARKER); - -+#ifdef FOOP - /* only print synset once, even if more than one link */ - - for (j = 0; j < idx; j++) { --#ifdef FOOP - if (synptr->ptroff[i] == prlist[j]) { - break; - } --#endif - } -+#else -+ j = idx; -+#endif - - if (j == idx) { -+#ifdef FOOP - prlist[idx++] = synptr->ptroff[i]; -+#endif - printspaces(TRACEP, 2); - printsynset("=> ", cursyn, "\n", DEFON, ALLWORDS, -@@ -848,5 +876,6 @@ - and PART info. */ - --static void traceinherit(SynsetPtr synptr, int ptrbase, int dbase, int depth) -+static void -+traceinherit(SynsetPtr synptr, int ptrbase, int depth) - { - int i; -@@ -879,5 +908,5 @@ - if(depth) { - depth = depthcheck(depth, cursyn); -- traceinherit(cursyn, ptrbase, getpos(cursyn->pos), (depth+1)); -+ traceinherit(cursyn, ptrbase, depth + 1); - free_synset(cursyn); - } else -@@ -890,10 +919,10 @@ - } - --static void partsall(SynsetPtr synptr, int ptrtyp) -+static void partsall(SynsetPtr synptr, int ptyp) - { - int ptrbase; - int i, hasptr = 0; - -- ptrbase = (ptrtyp == HMERONYM) ? HASMEMBERPTR : ISMEMBERPTR; -+ ptrbase = (ptyp == HMERONYM) ? HASMEMBERPTR : ISMEMBERPTR; - - /* First, print out the MEMBER, STUFF, PART info for this synset */ -@@ -912,8 +941,8 @@ - HMERONYM search only */ - --/* if (hasptr && ptrtyp == HMERONYM) { */ -- if (ptrtyp == HMERONYM) { -+/* if (hasptr && ptyp == HMERONYM) { */ -+ if (ptyp == HMERONYM) { - lastholomero = strlen(searchbuffer); -- traceinherit(synptr, ptrbase, NOUN, 1); -+ traceinherit(synptr, ptrbase, 1); - } - } -@@ -971,5 +1000,5 @@ - } - } else -- printantsynset(antptr, "\n", anttype, DEFON); -+ printantsynset(antptr, "\n", DEFON); - - free_synset(antptr); -@@ -984,11 +1013,13 @@ - /* Fetch the given example sentence from the example file and print it out */ - --void getexample(char *offset, char *wd) -+static void -+getexample(const char *offset, const char *wd) - { -- char *line; -+ const char *line; - char sentbuf[512]; - - if (vsentfilefp != NULL) { -- if (line = bin_search(offset, vsentfilefp)) { -+ line = bin_search(offset, vsentfilefp); -+ if (line) { - while(*line != ' ') - line++; -@@ -1005,5 +1036,6 @@ - int findexample(SynsetPtr synptr) - { -- char tbuf[256], *temp, *offset; -+ char tbuf[256]; -+ const char *temp, *offset; - int wdnum; - int found = 0; -@@ -1103,17 +1135,17 @@ - } - --static void freq_word(IndexPtr index) -+static void freq_word(IndexPtr idx) - { - int familiar=0; - int cnt; -- static char *a_an[] = { -+ static const char *a_an[] = { - "", "a noun", "a verb", "an adjective", "an adverb" }; -- static char *freqcats[] = { -+ static const char *freqcats[] = { - "extremely rare","very rare","rare","uncommon","common", - "familiar","very familiar","extremely familiar" - }; - -- if(index) { -- cnt = index->sense_cnt; -+ if(idx) { -+ cnt = idx->sense_cnt; - if (cnt == 0) familiar = 0; - if (cnt == 1) familiar = 1; -@@ -1127,10 +1159,11 @@ - sprintf(tmpbuf, - "\n%s used as %s is %s (polysemy count = %d)\n", -- index->wd, a_an[getpos(index->pos)], freqcats[familiar], cnt); -+ idx->wd, a_an[getpos(idx->pos)], freqcats[familiar], cnt); - printbuffer(tmpbuf); - } - } - --void wngrep (char *word_passed, int pos) { -+static void -+wngrep(const char *word_passed, int pos) { - FILE *inputfile; - char word[256]; -@@ -1243,5 +1276,5 @@ - for (k = 0; k < idx->off_cnt; k++) { - if (synset->ptroff[j] == idx->offset[k]) { -- add_relatives(VERB, idx, i, k); -+ add_relatives(i, k); - break; - } -@@ -1253,8 +1286,9 @@ - } - --static void add_relatives(int pos, IndexPtr idx, int rel1, int rel2) -+static void -+add_relatives(int rel1, int rel2) - { - int i; -- struct relgrp *rel, *last, *r; -+ struct relgrp *rel, *last = NULL, *r; - - /* If either of the new relatives are already in a relative group, -@@ -1356,5 +1390,6 @@ - */ - --char *findtheinfo(char *searchstr, int dbase, int ptrtyp, int whichsense) -+const char * -+findtheinfo(const char *searchstr, int dbase, int ptyp, int whichsense) - { - SynsetPtr cursyn; -@@ -1364,5 +1399,5 @@ - char *bufstart; - unsigned long offsets[MAXSENSE]; -- int skipit; -+ int skipit = 0; - - /* Initializations - -@@ -1379,5 +1414,5 @@ - offsets[i] = 0; - -- switch (ptrtyp) { -+ switch (ptyp) { - case OVERVIEW: - WNOverview(searchstr, dbase); -@@ -1408,6 +1443,6 @@ - - /* If negative search type, set flag for recursive search */ -- if (ptrtyp < 0) { -- ptrtyp = -ptrtyp; -+ if (ptyp < 0) { -+ ptyp = -ptyp; - depth = 1; - } -@@ -1445,5 +1480,5 @@ - offsets[offsetcnt++] = idx->offset[sense]; - cursyn = read_synset(dbase, idx->offset[sense], idx->wd); -- switch(ptrtyp) { -+ switch(ptyp) { - case ANTPTR: - if(dbase == ADJ) -@@ -1454,5 +1489,5 @@ - - case COORDS: -- tracecoords(cursyn, HYPOPTR, dbase, depth); -+ tracecoords(cursyn, HYPOPTR, depth); - break; - -@@ -1487,5 +1522,5 @@ - #ifdef FOOP - case PPLPTR: -- traceptrs(cursyn, ptrtyp, dbase, depth); -+ traceptrs(cursyn, ptyp, dbase, depth); - traceptrs(cursyn, PPLPTR, dbase, depth); - break; -@@ -1498,5 +1533,5 @@ - prflag = 1; - -- traceptrs(cursyn, ptrtyp, dbase, depth); -+ traceptrs(cursyn, ptyp, dbase, depth); - - if (dbase == ADJ) { -@@ -1522,14 +1557,14 @@ - - case DERIVATION: -- tracenomins(cursyn, dbase); -+ tracenomins(cursyn); - break; - - case CLASSIFICATION: - case CLASS: -- traceclassif(cursyn, dbase, ptrtyp); -+ traceclassif(cursyn, ptyp); - break; - - default: -- traceptrs(cursyn, ptrtyp, dbase, depth); -+ traceptrs(cursyn, ptyp, dbase, depth); - break; - -@@ -1600,5 +1635,6 @@ - } - --SynsetPtr findtheinfo_ds(char *searchstr, int dbase, int ptrtyp, int whichsense) -+SynsetPtr -+findtheinfo_ds(char *searchstr, int dbase, int ptyp, int whichsense) - { - IndexPtr idx; -@@ -1616,6 +1652,6 @@ - newsense = 1; - -- if(ptrtyp < 0) { -- ptrtyp = -ptrtyp; -+ if(ptyp < 0) { -+ ptyp = -ptyp; - depth = 1; - } -@@ -1642,8 +1678,6 @@ - newsense = 0; - -- cursyn->searchtype = ptrtyp; -- cursyn->ptrlist = traceptrs_ds(cursyn, ptrtyp, -- getpos(cursyn->pos), -- depth); -+ cursyn->searchtype = ptyp; -+ cursyn->ptrlist = traceptrs_ds(cursyn, ptyp, depth); - - lastsyn = cursyn; -@@ -1656,5 +1690,5 @@ - wnresults.numforms++; - -- if (ptrtyp == COORDS) { /* clean up by removing hypernym */ -+ if (ptyp == COORDS) { /* clean up by removing hypernym */ - lastsyn = synlist->ptrlist; - synlist->ptrlist = lastsyn->ptrlist; -@@ -1669,5 +1703,6 @@ - in linked list of data structures. */ - --SynsetPtr traceptrs_ds(SynsetPtr synptr, int ptrtyp, int dbase, int depth) -+SynsetPtr -+traceptrs_ds(SynsetPtr synptr, int ptyp, int depth) - { - int i; -@@ -1693,9 +1728,9 @@ - } - -- if (ptrtyp == COORDS) { -+ if (ptyp == COORDS) { - tstptrtyp = HYPERPTR; - docoords = 1; - } else { -- tstptrtyp = ptrtyp; -+ tstptrtyp = ptyp; - docoords = 0; - } -@@ -1707,5 +1742,5 @@ - - cursyn=read_synset(synptr->ppos[i], synptr->ptroff[i], ""); -- cursyn->searchtype = ptrtyp; -+ cursyn->searchtype = ptyp; - - if (lastsyn) -@@ -1717,9 +1752,7 @@ - if(depth) { - depth = depthcheck(depth, cursyn); -- cursyn->ptrlist = traceptrs_ds(cursyn, ptrtyp, -- getpos(cursyn->pos), -- (depth+1)); -+ cursyn->ptrlist = traceptrs_ds(cursyn, ptyp, (depth+1)); - } else if (docoords) { -- cursyn->ptrlist = traceptrs_ds(cursyn, HYPOPTR, NOUN, 0); -+ cursyn->ptrlist = traceptrs_ds(cursyn, HYPOPTR, 0); - } - } -@@ -1728,10 +1761,12 @@ - } - --static void WNOverview(char *searchstr, int pos) -+static void -+WNOverview(const char *searchstr, int pos) - { - SynsetPtr cursyn; - IndexPtr idx = NULL; -- char *cpstring = searchstr, *bufstart; -- int sense, i, offsetcnt; -+ const char *cpstring; -+ char *bufstart; -+ int sense_, i, offsetcnt; - int svdflag, skipit; - unsigned long offsets[MAXSENSE]; -@@ -1755,19 +1790,19 @@ - synset with synset offset and/or lexical file information.*/ - -- for (sense = 0; sense < idx->off_cnt; sense++) { -+ for (sense_ = 0; sense_ < idx->off_cnt; sense_++) { - - for (i = 0, skipit = 0; i < offsetcnt && !skipit; i++) -- if (offsets[i] == idx->offset[sense]) -+ if (offsets[i] == idx->offset[sense_]) - skipit = 1; - - if (!skipit) { -- offsets[offsetcnt++] = idx->offset[sense]; -- cursyn = read_synset(pos, idx->offset[sense], idx->wd); -+ offsets[offsetcnt++] = idx->offset[sense_]; -+ cursyn = read_synset(pos, idx->offset[sense_], idx->wd); - if (idx->tagged_cnt != -1 && -- ((sense + 1) <= idx->tagged_cnt)) { -+ ((sense_ + 1) <= idx->tagged_cnt)) { - sprintf(tmpbuf, "%d. (%d) ", -- sense + 1, GetTagcnt(idx, sense + 1)); -+ sense_ + 1, GetTagcnt(idx, sense_ + 1)); - } else { -- sprintf(tmpbuf, "%d. ", sense + 1); -+ sprintf(tmpbuf, "%d. ", sense_ + 1); - } - -@@ -1814,8 +1849,9 @@ - /* Do requested search on synset passed, returning output in buffer. */ - --char *do_trace(SynsetPtr synptr, int ptrtyp, int dbase, int depth) -+const char * -+do_trace(SynsetPtr synptr, int ptyp, int dbase, int depth) - { - searchbuffer[0] = '\0'; /* clear output buffer */ -- traceptrs(synptr, ptrtyp, dbase, depth); -+ traceptrs(synptr, ptyp, dbase, depth); - return(searchbuffer); - } -@@ -1824,7 +1860,8 @@ - passed and return bit mask. */ - --unsigned int is_defined(char *searchstr, int dbase) -+unsigned int -+is_defined(const char *searchstr, int dbase) - { -- IndexPtr index; -+ IndexPtr idx; - int i; - unsigned long retval = 0; -@@ -1834,8 +1871,8 @@ - wnresults.searchds = NULL; - -- while ((index = getindex(searchstr, dbase)) != NULL) { -+ while ((idx = getindex(searchstr, dbase)) != NULL) { - searchstr = NULL; /* clear out for next getindex() call */ - -- wnresults.SenseCount[wnresults.numforms] = index->off_cnt; -+ wnresults.SenseCount[wnresults.numforms] = idx->off_cnt; - - /* set bits that must be true for all words */ -@@ -1846,36 +1883,36 @@ - /* go through list of pointer characters and set appropriate bits */ - -- for(i = 0; i < index->ptruse_cnt; i++) { -+ for(i = 0; i < idx->ptruse_cnt; i++) { - -- if (index->ptruse[i] <= LASTTYPE) { -- retval |= bit(index->ptruse[i]); -- } else if (index->ptruse[i] == INSTANCE) { -+ if (idx->ptruse[i] <= LASTTYPE) { -+ retval |= bit(idx->ptruse[i]); -+ } else if (idx->ptruse[i] == INSTANCE) { - retval |= bit(HYPERPTR); -- } else if (index->ptruse[i] == INSTANCES) { -+ } else if (idx->ptruse[i] == INSTANCES) { - retval |= bit(HYPOPTR); - } - -- if (index->ptruse[i] == SIMPTR) { -+ if (idx->ptruse[i] == SIMPTR) { - retval |= bit(ANTPTR); - } - #ifdef FOOP - -- if (index->ptruse[i] >= CLASSIF_START && -- index->ptruse[i] <= CLASSIF_END) { -+ if (idx->ptruse[i] >= CLASSIF_START && -+ idx->ptruse[i] <= CLASSIF_END) { - retval |= bit(CLASSIFICATION); - } - - -- if (index->ptruse[i] >= CLASS_START && -- index->ptruse[i] <= CLASS_END) { -+ if (idx->ptruse[i] >= CLASS_START && -+ idx->ptruse[i] <= CLASS_END) { - retval |= bit(CLASS); - } - #endif - -- if (index->ptruse[i] >= ISMEMBERPTR && -- index->ptruse[i] <= ISPARTPTR) -+ if (idx->ptruse[i] >= ISMEMBERPTR && -+ idx->ptruse[i] <= ISPARTPTR) - retval |= bit(HOLONYM); -- else if (index->ptruse[i] >= HASMEMBERPTR && -- index->ptruse[i] <= HASPARTPTR) -+ else if (idx->ptruse[i] >= HASMEMBERPTR && -+ idx->ptruse[i] <= HASPARTPTR) - retval |= bit(MERONYM); - -@@ -1886,7 +1923,7 @@ - /* check for inherited holonyms and meronyms */ - -- if (HasHoloMero(index, HMERONYM)) -+ if (HasHoloMero(idx, HMERONYM)) - retval |= bit(HMERONYM); -- if (HasHoloMero(index, HHOLONYM)) -+ if (HasHoloMero(idx, HHOLONYM)) - retval |= bit(HHOLONYM); - -@@ -1906,5 +1943,5 @@ - } - -- free_index(index); -+ free_index(idx); - wnresults.numforms++; - } -@@ -1915,5 +1952,6 @@ - meronyms or holonyms. */ - --static int HasHoloMero(IndexPtr index, int ptrtyp) -+static int -+HasHoloMero(IndexPtr idx, int ptyp) - { - int i, j; -@@ -1922,8 +1960,8 @@ - int ptrbase; - -- ptrbase = (ptrtyp == HMERONYM) ? HASMEMBERPTR : ISMEMBERPTR; -+ ptrbase = (ptyp == HMERONYM) ? HASMEMBERPTR : ISMEMBERPTR; - -- for(i = 0; i < index->off_cnt; i++) { -- synset = read_synset(NOUN, index->offset[i], ""); -+ for(i = 0; i < idx->off_cnt; i++) { -+ synset = read_synset(NOUN, idx->offset[i], ""); - for (j = 0; j < synset->ptrcount; j++) { - if (synset->ptrtyp[j] == HYPERPTR) { -@@ -1941,10 +1979,10 @@ - } - --static int HasPtr(SynsetPtr synptr, int ptrtyp) -+static int HasPtr(SynsetPtr synptr, int ptyp) - { - int i; - - for(i = 0; i < synptr->ptrcount; i++) { -- if(synptr->ptrtyp[i] == ptrtyp) { -+ if(synptr->ptrtyp[i] == ptyp) { - return(1); - } -@@ -1956,5 +1994,6 @@ - word is not in WordNet. */ - --unsigned int in_wn(char *word, int pos) -+unsigned int -+in_wn(const char *word, int pos) - { - int i; -@@ -1984,5 +2023,6 @@ - /* Strip off () enclosed comments from a word */ - --static char *deadjify(char *word) -+static char * -+deadjify(char *word) - { - char *y; -@@ -2014,5 +2054,6 @@ - strtolower(wdbuf); - -- if (idx = index_lookup(wdbuf, getpos(synptr->pos))) { -+ idx = index_lookup(wdbuf, getpos(synptr->pos)); -+ if (idx) { - for (i = 0; i < idx->off_cnt; i++) - if (idx->offset[i] == synptr->hereiam) { -@@ -2025,5 +2066,7 @@ - } - --static void printsynset(char *head, SynsetPtr synptr, char *tail, int definition, int wdnum, int antflag, int markerflag) -+static void -+printsynset(const char *head, SynsetPtr synptr, const char *tail, -+ int definition, int wdnum, int antflag, int markerflag) - { - int i, wdcnt; -@@ -2038,5 +2081,5 @@ - - if (offsetflag) /* print synset offset */ -- sprintf(tbuf + strlen(tbuf),"{%8.8d} ", synptr->hereiam); -+ sprintf(tbuf + strlen(tbuf),"{%8.8ld} ", synptr->hereiam); - if (fileinfoflag) { /* print lexicographer file information */ - sprintf(tbuf + strlen(tbuf), "<%s> ", lexfiles[synptr->fnum]); -@@ -2063,9 +2106,10 @@ - } - --static void printantsynset(SynsetPtr synptr, char *tail, int anttype, int definition) -+static void -+printantsynset(SynsetPtr synptr, const char *tail, int definition) - { - int i, wdcnt; - char tbuf[SMLINEBUF]; -- char *str; -+ const char *str; - int first = 1; - -@@ -2073,5 +2117,5 @@ - - if (offsetflag) -- sprintf(tbuf,"{%8.8d} ", synptr->hereiam); -+ sprintf(tbuf,"{%8.8ld} ", synptr->hereiam); - if (fileinfoflag) { - sprintf(tbuf + strlen(tbuf),"<%s> ", lexfiles[synptr->fnum]); -@@ -2113,6 +2157,6 @@ - static void catword(char *buf, SynsetPtr synptr, int wdnum, int adjmarker, int antflag) - { -- static char vs[] = " (vs. %s)"; -- static char *markers[] = { -+ static const char vs[] = " (vs. %s)"; -+ static const char *markers[] = { - "", /* UNKNOWN_MARKER */ - "(predicate)", /* PREDICATIVE */ -@@ -2146,5 +2190,7 @@ - } - --static char *printant(int dbase, SynsetPtr synptr, int wdnum, char *template, char *tail) -+static const char * -+printant(int dbase, SynsetPtr synptr, int wdnum, -+ const char *template, const char *tail) - { - int i, j, wdoff; -@@ -2200,5 +2246,6 @@ - } - --static void printbuffer(char *string) -+static void -+printbuffer(const char *string) - { - if (overflag) -@@ -2210,11 +2257,13 @@ - } - --static void printsns(SynsetPtr synptr, int sense) -+static void -+printsns(SynsetPtr synptr, int sense_) - { -- printsense(synptr, sense); -+ printsense(synptr, sense_); - printsynset("", synptr, "\n", DEFON, ALLWORDS, PRINT_ANTS, PRINT_MARKER); - } - --static void printsense(SynsetPtr synptr, int sense) -+static void -+printsense(SynsetPtr synptr, int sense_) - { - char tbuf[256]; -@@ -2224,7 +2273,7 @@ - if (fnflag) - sprintf(tbuf,"\nSense %d in file \"%s\"\n", -- sense, lexfiles[synptr->fnum]); -+ sense_, lexfiles[synptr->fnum]); - else -- sprintf(tbuf,"\nSense %d\n", sense); -+ sprintf(tbuf,"\nSense %d\n", sense_); - - printbuffer(tbuf); Property changes on: head/textproc/wordnet/files/patch-ae ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/textproc/wordnet/files/patch-ad =================================================================== --- head/textproc/wordnet/files/patch-ad (revision 363335) +++ head/textproc/wordnet/files/patch-ad (nonexistent) @@ -1,9 +0,0 @@ ---- src/wnb Sun Feb 22 12:49:56 1998 -+++ src/wnb Sat Feb 26 19:52:42 2000 -@@ -629,2 +626,6 @@ - -text "Based upon an earlier X Window version by\nBrian Gustafson."] \ -+ [label .aboutbox.top.right.textmi \ -+ -anchor w \ -+ -justify left \ -+ -text "Tuned for Tcl8.x and ported to FreeBSD by\nMikhail Teterin."] \ - [label .aboutbox.top.right.text5 \ Property changes on: head/textproc/wordnet/files/patch-ad ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/textproc/wordnet/files/patch-ac =================================================================== --- head/textproc/wordnet/files/patch-ac (revision 363335) +++ head/textproc/wordnet/files/patch-ac (nonexistent) @@ -1,316 +0,0 @@ ---- src/stubs.c.orig 2007-01-04 18:47:55.000000000 +0100 -+++ src/stubs.c 2013-05-22 17:34:59.000000000 +0200 -@@ -11,10 +11,9 @@ - #include - #include - #include --#include - #include - --static char *Id = "$Id: stubs.c,v 1.7 2005/04/29 19:01:57 wn Exp $"; -+__FBSDID("$Id: stubs.c,v 1.7 2005/04/29 19:01:57 wn Exp $"); - - static char resultbuf[SEARCHBUF]; - -@@ -33,26 +32,26 @@ - ** the search word's base form. - */ - --int wn_findvalidsearches (ClientData clientData, Tcl_Interp *interp, -- int argc, char *argv[]) { -+static int -+wn_findvalidsearches (ClientData clientData, Tcl_Interp *interp, -+ int argc, Tcl_Obj * const objv[]) { - unsigned int bitfield; -- static char bitfieldstr[32]; -- char *morph; -+ const char *morph; - int pos; - if (argc != 3) { -- interp -> result = -- "usage: findvalidsearches searchword partofspeechnum"; -+ Tcl_WrongNumArgs(interp, 1, objv, -+ "findvalidsearches searchword partofspeechnum"); - return TCL_ERROR; - } -- pos = atoi (argv[2]); -- bitfield = is_defined (argv[1], pos); -- if ((morph = morphstr (argv[1], pos)) != NULL) { -+ if (Tcl_GetIntFromObj(interp, objv[2], &pos) != TCL_OK) -+ return TCL_ERROR; -+ bitfield = is_defined (Tcl_GetString(objv[1]), pos); -+ if ((morph = morphstr (Tcl_GetString(objv[1]), pos)) != NULL) { - do { - bitfield |= is_defined (morph, pos); - } while ((morph = morphstr (NULL, pos)) != NULL); - } -- sprintf (bitfieldstr, "%u", bitfield); -- interp -> result = bitfieldstr; -+ Tcl_SetObjResult(interp, Tcl_NewIntObj(bitfield)); - return TCL_OK; - } - -@@ -63,19 +62,17 @@ - ** the results of findvalidsearches. Invoked from Tcl as "bit". - */ - --int wn_bit (ClientData clientData, Tcl_Interp *interp, -- int argc, char *argv[]) { -- unsigned int bitfield; -- static char bitfieldstr[32]; -+static int -+wn_bit (ClientData clientData, Tcl_Interp *interp, -+ int argc, Tcl_Obj * const objv[]) { - int whichbit; - if (argc != 2) { -- interp -> result = "usage: bit bitnum"; -+ Tcl_WrongNumArgs(interp, 1, objv, "bitnum"); - return TCL_ERROR; - } -- whichbit = atoi (argv[1]); -- bitfield = bit (whichbit); -- sprintf (bitfieldstr, "%u", bitfield); -- interp -> result = bitfieldstr; -+ if (Tcl_GetIntFromObj(interp, objv[1], &whichbit) != TCL_OK) -+ return TCL_ERROR; -+ Tcl_SetObjResult(interp, Tcl_NewIntObj(bit(whichbit))); - return TCL_OK; - } - -@@ -84,13 +81,13 @@ - ** It is invoked from Tcl simply as "search". - */ - --int wn_search (ClientData clientData, Tcl_Interp *interp, -- int argc, char *argv[]) { -+static int -+wn_search (ClientData clientData, Tcl_Interp *interp, -+ int argc, const char * argv[]) { - int pos, searchtype, sense; -- char *morph; -+ const char *morph; - if (argc != 5) { -- interp -> result = -- "usage: search searchword partofspeechnum searchtypenum sensenum"; -+ Tcl_SetObjResult(interp, Tcl_NewStringObj ("usage: search searchword partofspeechnum searchtypenum sensenum", -1)); - return TCL_ERROR; - } - pos = atoi (argv[2]); -@@ -102,7 +99,7 @@ - strcat (resultbuf, findtheinfo (morph, pos, searchtype, sense)); - } while ((morph = morphstr (NULL, pos)) != NULL); - } -- interp -> result = resultbuf; -+ Tcl_SetObjResult(interp, Tcl_NewStringObj(resultbuf, -1)); - return TCL_OK; - } - -@@ -111,10 +108,11 @@ - ** results. - */ - --int wn_glosses (ClientData clientData, Tcl_Interp *interp, -- int argc, char *argv[]) { -+static int -+wn_glosses (ClientData clientData, Tcl_Interp *interp, -+ int argc, const char *argv[]) { - if (argc != 2) { -- interp -> result = "usage: glosses [1 | 0]"; -+ Tcl_SetObjResult(interp, Tcl_NewStringObj("usage: glosses [1 | 0]", -1)); - return TCL_ERROR; - } - dflag = atoi (argv[1]); -@@ -126,10 +124,11 @@ - ** results. - */ - --int wn_fileinfo (ClientData clientData, Tcl_Interp *interp, -- int argc, char *argv[]) { -+static int -+wn_fileinfo (ClientData clientData, Tcl_Interp *interp, -+ int argc, const char *argv[]) { - if (argc != 2) { -- interp -> result = "usage: fileinfo [1 | 0]"; -+ Tcl_SetObjResult(interp, Tcl_NewStringObj("usage: fileinfo [1 | 0]", -1)); - return TCL_ERROR; - } - fileinfoflag = atoi (argv[1]); -@@ -141,10 +140,11 @@ - ** in the search results. - */ - --int wn_byteoffset (ClientData clientData, Tcl_Interp *interp, -- int argc, char *argv[]) { -+static int -+wn_byteoffset (ClientData clientData, Tcl_Interp *interp, -+ int argc, const char *argv[]) { - if (argc != 2) { -- interp -> result = "usage: byteoffset [1 | 0]"; -+ Tcl_SetObjResult(interp, Tcl_NewStringObj("usage: byteoffset [1 | 0]", -1)); - return TCL_ERROR; - } - offsetflag = atoi (argv[1]); -@@ -156,13 +156,17 @@ - ** returned. - */ - --int wn_senseflag (ClientData clientData, Tcl_Interp *interp, -- int argc, char *argv[]) { -+static int -+wn_senseflag (ClientData clientData, Tcl_Interp *interp, -+ int argc, Tcl_Obj * const objv[]) { - if (argc != 2) { -- interp -> result = "usage: senseflag [1 | 0]"; -+ Tcl_WrongNumArgs(interp, 0, objv, "?1|0?"); - return TCL_ERROR; - } -- wnsnsflag = atoi (argv[1]); -+ if (Tcl_GetBooleanFromObj(interp, objv[1], &argc) != TCL_OK) -+ return TCL_ERROR; -+ -+ wnsnsflag = argc; /* argc got recycled here */ - return TCL_OK; - } - -@@ -171,26 +175,30 @@ - ** type of search does. - */ - --int wn_contextualhelp (ClientData clientData, Tcl_Interp *interp, -- int argc, char *argv[]) { -+static int -+wn_contextualhelp (ClientData clientData, Tcl_Interp *interp, -+ int argc, Tcl_Obj * const objv[]) { - int pos, searchtype; - if (argc != 3) { -- interp -> result = "usage: contextualhelp partofspeechnum searchtypenum"; -+ Tcl_SetObjResult(interp, Tcl_NewStringObj("usage: contextualhelp partofspeechnum searchtypenum", -1)); - return TCL_ERROR; - } -- pos = atoi (argv[1]); -- searchtype = atoi (argv[2]); -- interp -> result = helptext[pos][searchtype]; -+ if (Tcl_GetIntFromObj(interp, objv[1], &pos) != TCL_OK || -+ Tcl_GetIntFromObj(interp, objv[2], &searchtype) != TCL_OK) -+ return TCL_ERROR; -+ /* Dropping const-ness below is Ok, because TCL_STATIC tells Tcl to DTRT */ -+ Tcl_SetResult(interp, (char *)helptext[pos][searchtype], TCL_STATIC); - return TCL_OK; - } - - /* This command, accessed in Tcl as "reopendb" reopens the WordNet database. - */ - --int wn_reopendb (ClientData clientData, Tcl_Interp *interp, -- int argc, char *argv[]) { -+static int -+wn_reopendb (ClientData clientData, Tcl_Interp *interp, -+ int argc, Tcl_Obj * const objv[]) { - if (argc != 1) { -- interp -> result = "usage: reopendb"; -+ Tcl_SetObjResult(interp, Tcl_NewStringObj("usage: reopendb", -1)); - return TCL_ERROR; - } - re_wninit (); -@@ -201,22 +209,40 @@ - ** stop whatever search it is currently in the middle of performing. - */ - --int wn_abortsearch (ClientData clientData, Tcl_Interp *interp, -- int argc, char *argv[]) { -+static int -+wn_abortsearch (ClientData clientData, Tcl_Interp *interp, -+ int argc, Tcl_Obj * const objv[]) { - if (argc != 1) { -- interp -> result = "usage: abortsearch"; -+ Tcl_SetObjResult(interp, Tcl_NewStringObj("usage: abortsearch", -1)); - return TCL_ERROR; - } - abortsearch = 1; - return TCL_OK; - } - -+/* Return text of the license. The license is compiled in anyway, so -+** there is not point in keeping another copy in a separate file. -+*/ -+static int -+wn_license(ClientData clientData, Tcl_Interp *interp, -+ int objc, Tcl_Obj * const objv[]) { -+ if (objc != 1) { -+ Tcl_WrongNumArgs(interp, 0, objv, "no arguments"); -+ return TCL_ERROR; -+ } -+ /* Dropping the const is Ok, as we supply TCL_STATIC to TCL API */ -+ Tcl_SetResult(interp, (char *)license, TCL_STATIC); -+ return TCL_OK; -+} -+ -+ - /* This is a callback function invoked by the WordNet search engine every so - ** often, to allow the interface to respond to events (especially the pressing - ** of a stop button) during the search. - */ - --void tkwn_doevents (void) { -+static void -+tkwn_doevents (void) { - while (Tcl_DoOneEvent (TCL_WINDOW_EVENTS | TCL_DONT_WAIT) != 0) {} - } - -@@ -225,13 +251,14 @@ - ** specific, since it uses the native error reporting mechanism. - */ - --int tkwn_displayerror (char *msg) { -+static int -+tkwn_displayerror (const char *msg) { - #ifdef _WINDOWS - MessageBeep (MB_ICONEXCLAMATION); - MessageBox (NULL, msg, "WordNet Library Error", - MB_ICONEXCLAMATION | MB_OK | MB_TASKMODAL | MB_SETFOREGROUND); - #else -- fprintf (stderr, "%s", msg); -+ fputs(msg, stderr); - #endif - return -1; - } -@@ -245,26 +272,27 @@ - interface_doevents_func = tkwn_doevents; - display_message = tkwn_displayerror; - wninit (); -- Tcl_CreateCommand (interp, "findvalidsearches", (void *) -+ Tcl_CreateObjCommand (interp, "findvalidsearches", - wn_findvalidsearches, (ClientData) NULL, (Tcl_CmdDeleteProc *) NULL); -- Tcl_CreateCommand (interp, "bit", (void *) wn_bit, (ClientData) NULL, -+ Tcl_CreateObjCommand (interp, "bit", wn_bit, (ClientData) NULL, - (Tcl_CmdDeleteProc *) NULL); -- Tcl_CreateCommand (interp, "search", (void *) wn_search, (ClientData) -+ Tcl_CreateCommand (interp, "search", wn_search, (ClientData) - NULL, (Tcl_CmdDeleteProc *) NULL); -- Tcl_CreateCommand (interp, "glosses", (void *) wn_glosses, (ClientData) -+ Tcl_CreateCommand (interp, "glosses", wn_glosses, (ClientData) - NULL, (Tcl_CmdDeleteProc *) NULL); -- Tcl_CreateCommand (interp, "fileinfo", (void *) wn_fileinfo, (ClientData) -+ Tcl_CreateCommand (interp, "fileinfo", wn_fileinfo, (ClientData) - NULL, (Tcl_CmdDeleteProc *) NULL); -- Tcl_CreateCommand (interp, "byteoffset", (void *) wn_byteoffset, -+ Tcl_CreateCommand (interp, "byteoffset", wn_byteoffset, - (ClientData) NULL, (Tcl_CmdDeleteProc *) NULL); -- Tcl_CreateCommand (interp, "senseflag", (void *) wn_senseflag, -+ Tcl_CreateObjCommand (interp, "senseflag", wn_senseflag, - (ClientData) NULL, (Tcl_CmdDeleteProc *) NULL); -- Tcl_CreateCommand (interp, "contextualhelp", (void *) wn_contextualhelp, -+ Tcl_CreateObjCommand (interp, "contextualhelp", wn_contextualhelp, - (ClientData) NULL, (Tcl_CmdDeleteProc *) NULL); -- Tcl_CreateCommand (interp, "reopendb", (void *) wn_reopendb, (ClientData) -+ Tcl_CreateObjCommand (interp, "reopendb", wn_reopendb, (ClientData) - NULL, (Tcl_CmdDeleteProc *) NULL); -- Tcl_CreateCommand (interp, "abortsearch", (void *) wn_abortsearch, -+ Tcl_CreateObjCommand (interp, "abortsearch", wn_abortsearch, - (ClientData) NULL, (Tcl_CmdDeleteProc *) NULL); -- return TCL_OK; -+ Tcl_CreateObjCommand (interp, "wnlicense", wn_license, -+ (ClientData) NULL, (Tcl_CmdDeleteProc *) NULL); -+ return Tcl_PkgProvide(interp, "Wordnet", "3.0"); - } -- Property changes on: head/textproc/wordnet/files/patch-ac ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/textproc/wordnet/files/patch-ab =================================================================== --- head/textproc/wordnet/files/patch-ab (revision 363335) +++ head/textproc/wordnet/files/patch-ab (nonexistent) @@ -1,286 +0,0 @@ ---- lib/wnutil.c Fri May 6 13:17:39 2005 -+++ lib/wnutil.c Wed Dec 21 16:04:36 2005 -@@ -15,5 +15,5 @@ - #ifdef __unix__ - #ifndef __MACH__ --#include -+#include - #endif - #endif -@@ -25,5 +25,5 @@ - #include "wn.h" - --static int do_init(); -+static int do_init(void); - - static char msgbuf[256]; /* buffer for constructing error messages */ -@@ -37,5 +37,5 @@ - /* Initialization functions */ - --static void closefps(); -+static void closefps(void); - - int wninit(void) -@@ -46,7 +46,6 @@ - - if (!done) { -- if (env = getenv("WNDBVERSION")) { -- wnrelease = strdup(env); /* set release */ -- assert(wnrelease); -+ if ((env = getenv("WNDBVERSION"))) { -+ wnrelease = env; /* set release */ - } - openerr = do_init(); -@@ -68,7 +67,6 @@ - closefps(); - -- if (env = getenv("WNDBVERSION")) { -- wnrelease = strdup(env); /* set release */ -- assert(wnrelease); -+ if ((env = getenv("WNDBVERSION"))) { -+ wnrelease = env; /* set release */ - } - openerr = do_init(); -@@ -248,4 +246,20 @@ - } - -+char *strtolower2(const char *from, char *to) -+{ -+ -+ char *t = to; -+ -+ do { -+ if(*from >= 'A' && *from <= 'Z') -+ *t = *from++ + 32; -+ else if(*from == '(') -+ *t = '\0'; -+ else -+ *t = *from++; -+ } while (*t++); -+ return(to); -+} -+ - /* Convert string passed to lower case */ - -@@ -276,11 +290,24 @@ - /* Return pointer code for pointer type characer passed. */ - --int getptrtype(char *ptrstr) -+unsigned short -+getptrtype(const char *ptrstr, char **end) - { -- register int i; -+ unsigned short i; -+ const char *ptype, *pstr; - for(i = 1; i <= MAXPTR; i++) { -- if(!strcmp(ptrstr, ptrtyp[i])) -+ ptype = ptrtyp[i]; -+ pstr = ptrstr; -+ while (*pstr == *ptype && *ptype) { -+ pstr++; -+ ptype++; -+ } -+ if (*ptype == '\0' && -+ (*pstr == '\n' || *pstr == ' ' || *pstr == '\0')) { -+ if (end) -+ *(const void **)end = pstr; - return(i); -+ } - } -+ fprintf(stderr, "Could not find the type of %s\n", ptrstr); - return(0); - } -@@ -288,5 +315,6 @@ - /* Return part of speech code for string passed */ - --int getpos(char *s) -+int -+getpos(const char *s) - { - switch (*s) { -@@ -310,5 +338,6 @@ - /* Return synset type code for string passed. */ - --int getsstype(char *s) -+int -+getsstype(const char *s) - { - switch (*s) { -@@ -332,5 +361,6 @@ - /* Pass in string for POS, return corresponding integer value */ - --int StrToPos(char *str) -+int -+StrToPos(const char *str) - { - if (!strcmp(str, "noun")) -@@ -389,5 +419,6 @@ - /* Return synset for sense key passed. */ - --SynsetPtr GetSynsetForSense(char *sensekey) -+SynsetPtr -+GetSynsetForSense(const char *sensekey) - { - long offset; -@@ -405,7 +436,8 @@ - /* Find offset of sense key in data file */ - --long GetDataOffset(char *sensekey) -+long -+GetDataOffset(const char *sensekey) - { -- char *line; -+ const char *line; - - /* Pass in encoded sense string, return byte offset of corresponding -@@ -426,5 +458,6 @@ - /* Find polysemy count for sense key passed. */ - --int GetPolyCount(char *sensekey) -+int -+GetPolyCount(const char *sensekey) - { - IndexPtr idx; -@@ -443,5 +476,6 @@ - - /* Return word part of sense key */ --char *GetWORD(char *sensekey) -+const char * -+GetWORD(const char *sensekey) - { - static char word[100]; -@@ -457,5 +491,6 @@ - /* Return POS code for sense key passed. */ - --int GetPOS(char *sensekey) -+int -+GetPOS(const char *sensekey) - { - int pos; -@@ -470,5 +505,6 @@ - /* Reconstruct synset from synset pointer and return ptr to buffer */ - --char *FmtSynset(SynsetPtr synptr, int defn) -+const char * -+FmtSynset(SynsetPtr synptr, int defn) - { - int i; -@@ -542,27 +578,8 @@ - } - --/* Search for string and/or baseform of word in database and return -- index structure for word if found in database. */ -- --IndexPtr GetValidIndexPointer(char *word, int pos) --{ -- IndexPtr idx; -- char *morphword; -- -- idx = getindex(word, pos); -- -- if (idx == NULL) { -- if ((morphword = morphstr(word, pos)) != NULL) -- while (morphword) { -- if ((idx = getindex(morphword, pos)) != NULL) break; -- morphword = morphstr(NULL, pos); -- } -- } -- return (idx); --} -- - /* Return sense number in database for word and lexsn passed. */ - --int GetWNSense(char *word, char *lexsn) -+int -+GetWNSense(const char *word, const char *lexsn) - { - SnsIndexPtr snsidx; -@@ -578,7 +595,8 @@ - /* Return parsed sense index entry for sense key passed. */ - --SnsIndexPtr GetSenseIndex(char *sensekey) -+SnsIndexPtr -+GetSenseIndex(const char *sensekey) - { -- char *line; -+ const char *line; - char buf[256], loc[9]; - SnsIndexPtr snsidx = NULL; -@@ -608,5 +626,6 @@ - int GetTagcnt(IndexPtr idx, int sense) - { -- char *sensekey, *line; -+ char *sensekey; -+ const char *line; - char buf[256]; - int snum, cnt = 0; -@@ -632,10 +651,11 @@ - } - --char *GetOffsetForKey(unsigned int key) -+const char * -+GetOffsetForKey(unsigned int key) - { - unsigned int rkey; - char ckey[7]; - static char loc[11] = ""; -- char *line; -+ const char *line; - char searchdir[256], tmpbuf[256]; - -@@ -657,10 +677,10 @@ - } - -- --unsigned int GetKeyForOffset(char *loc) -+unsigned int -+GetKeyForOffset(const char *loc) - { - unsigned int key; - char rloc[11] = ""; -- char *line; -+ const char *line; - char searchdir[256], tmpbuf[256]; - -@@ -681,8 +701,9 @@ - } - --char *SetSearchdir() -+const char * -+SetSearchdir() - { -- static char searchdir[256]; -- char *env; -+ char *searchdir; -+ const char *env; - - /* Find base directory for database. If set, use WNSEARCHDIR. -@@ -690,14 +711,17 @@ - - if ((env = getenv("WNSEARCHDIR")) != NULL) -- strcpy(searchdir, env); -- else if ((env = getenv("WNHOME")) != NULL) -+ return(env); -+ else if ((env = getenv("WNHOME")) != NULL) { -+ searchdir = malloc(strlen(env) + sizeof(DICTDIR)); - sprintf(searchdir, "%s%s", env, DICTDIR); -- else -- strcpy(searchdir, DEFAULTPATH); -- -- return(searchdir); -+ return(searchdir); -+ } else -+ return(DEFAULTPATH); - } - --int default_display_message(char *msg) -+#ifndef __GNUC__ -+# define __unused -+#endif -+int default_display_message(const char *msg __unused) - { - return(-1); -@@ -727,3 +751,2 @@ - return (loc - strstr_stringstart); - } -- Property changes on: head/textproc/wordnet/files/patch-ab ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/textproc/wordnet/files/patch-wn.h =================================================================== --- head/textproc/wordnet/files/patch-wn.h (revision 363335) +++ head/textproc/wordnet/files/patch-wn.h (nonexistent) @@ -1,271 +0,0 @@ ---- include/wn.h Wed Jul 6 14:48:44 2005 -+++ include/wn.h Wed Dec 21 17:24:58 2005 -@@ -152,12 +154,12 @@ - #define IMMED_POSTNOMINAL IPADJ - --extern char *wnrelease; /* WordNet release/version number */ -+extern const char *wnrelease; /* WordNet release/version number */ - --extern char *lexfiles[]; /* names of lexicographer files */ --extern char *ptrtyp[]; /* pointer characters */ --extern char *partnames[]; /* POS strings */ --extern char partchars[]; /* single chars for each POS */ --extern char *adjclass[]; /* adjective class strings */ --extern char *frametext[]; /* text of verb frames */ -+extern const char *lexfiles[]; /* names of lexicographer files */ -+extern const char *ptrtyp[]; /* pointer characters */ -+extern const char *partnames[]; /* POS strings */ -+extern const char partchars[]; /* single chars for each POS */ -+extern const char *adjclass[]; /* adjective class strings */ -+extern const char *frametext[]; /* text of verb frames */ - - /* Data structures used by search code functions. */ -@@ -173,5 +175,5 @@ - unsigned long *offset; /* offsets of synsets containing word */ - int ptruse_cnt; /* number of pointers used */ -- int *ptruse; /* pointers used */ -+ short *ptruse; /* pointers used */ - } Index; - -@@ -180,5 +182,5 @@ - /* Structure for data file synset */ - typedef struct ss { -- long hereiam; /* current file position */ -+ unsigned long hereiam; /* current file position */ - int sstype; /* type of ADJ synset */ - int fnum; /* file number that synset comes from */ -@@ -191,8 +193,8 @@ - int ptrcount; /* number of pointers */ - int *ptrtyp; /* pointer types */ -- long *ptroff; /* pointer offsets */ -+ unsigned long *ptroff; /* pointer offsets */ - int *ppos; /* pointer part of speech */ -- int *pto; /* pointer 'to' fields */ -- int *pfrm; /* pointer 'from' fields */ -+ unsigned short *pto; /* pointer 'to' fields */ -+ unsigned short *pfrm; /* pointer 'from' fields */ - int fcount; /* number of verb frames */ - int *frmid; /* frame numbers */ -@@ -218,5 +220,5 @@ - char *sensekey; /* sense key */ - char *word; /* word string */ -- long loc; /* synset offset */ -+ unsigned long loc; /* synset offset */ - int wnsense; /* WordNet sense number */ - int tag_cnt; /* number of semantic tags to sense */ -@@ -268,6 +270,6 @@ - Default function provided in library returns -1 */ - --extern int default_display_message(char *); --extern int (*display_message)(char *); -+int default_display_message(const char *); -+int (*display_message)(const char *); - - -@@ -282,5 +284,5 @@ - - /* Primry search algorithm for use with user interfaces */ --extern char *findtheinfo(char *, int, int, int); -+const char *findtheinfo(const char *, int, int, int); - - /* Primary search algorithm for use with programs (returns data structure) */ -@@ -289,27 +291,27 @@ - /* Set bit for each search type that is valid for the search word - passed and return bit mask. */ --extern unsigned int is_defined(char *, int); -+extern unsigned int is_defined(const char *, int); - - /* Set bit for each POS that search word is in. 0 returned if - word is not in WordNet. */ --extern unsigned int in_wn(char *, int); -+unsigned int in_wn(const char *, int); - - /* Find word in index file and return parsed entry in data structure. - Input word must be exact match of string in database. */ --extern IndexPtr index_lookup(char *, int); -+IndexPtr index_lookup(const char *, int); - - /* 'smart' search of index file. Find word in index file, trying different - techniques - replace hyphens with underscores, replace underscores with - hyphens, strip hyphens and underscores, strip periods. */ --extern IndexPtr getindex(char *, int); --extern IndexPtr parse_index(long, int, char *); -+extern IndexPtr getindex(const char *, int); -+extern IndexPtr parse_index(long, int, const char *); - - /* Read synset from data file at byte offset passed and return parsed - entry in data structure. */ --extern SynsetPtr read_synset(int, long, char *); -+extern SynsetPtr read_synset(int, long, const char *); - - /* Read synset at current byte offset in file and return parsed entry - in data structure. */ --extern SynsetPtr parse_synset(FILE *, int, char *); -+extern SynsetPtr parse_synset(FILE *, int, const char *); - - /* Free a synset linked list allocated by findtheinfo_ds() */ -@@ -324,22 +326,22 @@ - /* Recursive search algorithm to trace a pointer tree and return results - in linked list of data structures. */ --SynsetPtr traceptrs_ds(SynsetPtr, int, int, int); -+SynsetPtr traceptrs_ds(SynsetPtr, int, int); - - /* Do requested search on synset passed, returning output in buffer. */ --extern char *do_trace(SynsetPtr, int, int, int); -+const char *do_trace(SynsetPtr, int, int, int); - - /*** Morphology functions (morph.c) ***/ - - /* Open exception list files */ --extern int morphinit(); -+int morphinit(void); - - /* Close exception list files and reopen */ --extern int re_morphinit(); -+int re_morphinit(void); - - /* Try to find baseform (lemma) of word or collocation in POS. */ --extern char *morphstr(char *, int); -+const char *morphstr(const char *, int); - - /* Try to find baseform (lemma) of individual word in POS. */ --extern char *morphword(char *, int); -+const char *morphword(const char *, int); - - /*** Utility functions (wnutil.c) ***/ -@@ -347,9 +349,9 @@ - /* Top level function to open database files, initialize wn_filenames, - and open exeception lists. */ --extern int wninit(); -+int wninit(void); - - /* Top level function to close and reopen database files, initialize - wn_filenames and open exception lists. */ --extern int re_wninit(); -+int re_wninit(void); - - /* Count the number of underscore or space separated words in a string. */ -@@ -358,4 +360,5 @@ - /* Convert string to lower case remove trailing adjective marker if found */ - extern char *strtolower(char *); -+char *strtolower2(const char *from, char *to); - - /* Convert string passed to lower case */ -@@ -366,14 +369,14 @@ - - /* Return pointer code for pointer type characer passed. */ --extern int getptrtype(char *); -+unsigned short getptrtype(const char *, char **end); - - /* Return part of speech code for string passed */ --extern int getpos(char *); -+int getpos(const char *); - - /* Return synset type code for string passed. */ --extern int getsstype(char *); -+int getsstype(const char *); - - /* Reconstruct synset from synset pointer and return ptr to buffer */ --extern char *FmtSynset(SynsetPtr, int); -+const char *FmtSynset(SynsetPtr, int); - - /* Find string for 'searchstr' as it is in index file */ -@@ -381,37 +384,34 @@ - - /* Pass in string for POS, return corresponding integer value */ --extern int StrToPos(char *); -+int StrToPos(const char *); - - /* Return synset for sense key passed. */ --extern SynsetPtr GetSynsetForSense(char *); -+SynsetPtr GetSynsetForSense(const char *); - - /* Find offset of sense key in data file */ --extern long GetDataOffset(char *); -+long GetDataOffset(const char *); - - /* Find polysemy (collins) count for sense key passed. */ --extern int GetPolyCount(char *); -+int GetPolyCount(const char *); - - /* Return word part of sense key */ --extern char *GetWORD(char *); -+const char *GetWORD(const char *); - - /* Return POS code for sense key passed. */ --extern int GetPOS(char *); -+int GetPOS(const char *); - - /* Convert WordNet sense number passed of IndexPtr entry to sense key. */ - extern char *WNSnsToStr(IndexPtr, int); - --/* Search for string and/or baseform of word in database and return -- index structure for word if found in database. */ --extern IndexPtr GetValidIndexPointer(char *, int); -- - /* Return sense number in database for word and lexsn passed. */ --int GetWNSense(char *, char *); -+int GetWNSense(const char *, const char *); - --SnsIndexPtr GetSenseIndex(char *); -+SnsIndexPtr GetSenseIndex(const char *); -+void FreeSenseIndex(SnsIndexPtr); - --char *GetOffsetForKey(unsigned int); --unsigned int GetKeyForOffset(char *); -+const char *GetOffsetForKey(unsigned int); -+unsigned int GetKeyForOffset(const char *); - --char *SetSearchdir(); -+const char *SetSearchdir(void); - - /* Return number of times sense is tagged */ -@@ -435,17 +435,6 @@ - /* General purpose binary search function to search for key as first - item on line in open file. Item is delimited by space. */ --extern char *bin_search(char *, FILE *); --extern char *read_index(long, FILE *); -- --/* Copy contents from one file to another. */ --extern void copyfile(FILE *, FILE *); -- --/* Function to replace a line in a file. Returns the original line, -- or NULL in case of error. */ --extern char *replace_line(char *, char *, FILE *); -- --/* Find location to insert line at in file. If line with this -- key is already in file, return NULL. */ --extern char *insert_line(char *, char *, FILE *); -+const char *bin_search(const char *, FILE *); -+const char *read_index(long, FILE *); - - #ifdef __cplusplus -@@ -453,7 +453,8 @@ - #endif - --extern char **helptext[NUMPARTS + 1]; -+const char * const * helptext[NUMPARTS + 1]; - --static char *license = "\ -+#ifdef DEFINE_LICENSE /* should live in wn.c */ -+const char license[] = "\ - This software and database is being provided to you, the LICENSEE, by \n\ - Princeton University under the following license. By obtaining, using \n\ -@@ -486,5 +487,5 @@ - Princeton University and LICENSEE agrees to preserve same. \n" - ; -- -+#if 0 /* { */ - static char dblicense[] = "\ - 1 This software and database is being provided to you, the LICENSEE, by \n\ -@@ -518,6 +519,9 @@ - 29 Princeton University and LICENSEE agrees to preserve same. \n" - ; -- - #define DBLICENSE_SIZE (sizeof(dblicense)) -+#endif /* } */ -+#else /* } { */ -+extern const char license[]; -+#endif /* } */ - - #endif /*_WN_*/ Property changes on: head/textproc/wordnet/files/patch-wn.h ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/textproc/wordnet/files/patch-wnhelp =================================================================== --- head/textproc/wordnet/files/patch-wnhelp (revision 363335) +++ head/textproc/wordnet/files/patch-wnhelp (nonexistent) @@ -1,43 +0,0 @@ ---- lib/wnhelp.c Fri May 6 13:17:39 2005 -+++ lib/wnhelp.c Wed Dec 21 17:25:27 2005 -@@ -7,4 +7,5 @@ - /* $Id: wnhelp.c,v 1.14 2005/02/01 17:03:46 wn Rel $ */ - -+#define DEFINE_LICENSE - #include "wn.h" - -@@ -239,5 +240,5 @@ - "; - --static char *nounhelps[] = { -+static const char *nounhelps[] = { - hyper_help, - relatives_help, -@@ -259,5 +260,5 @@ - }; - --static char *verbhelps[] = { -+static const char *verbhelps[] = { - hyper_help, - relatives_help, -@@ -276,5 +277,5 @@ - }; - --static char *adjhelps[] = { -+static const char *adjhelps[] = { - /* SIMPTR */ - "Display synonyms and synsets related to synsets containing \n\ -@@ -351,5 +352,5 @@ - }; - --static char *advhelps[] = { -+static const char *advhelps[] = { - /* SIMPTR */ - "Display synonyms and synsets related to synsets containing \n\ -@@ -370,5 +371,5 @@ - }; - --char **helptext[NUMPARTS + 1] = { -+const char * const *helptext[NUMPARTS + 1] = { - NULL, nounhelps, verbhelps, adjhelps, advhelps - }; Property changes on: head/textproc/wordnet/files/patch-wnhelp ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/textproc/wordnet/files/patch-wnb =================================================================== --- head/textproc/wordnet/files/patch-wnb (revision 363335) +++ head/textproc/wordnet/files/patch-wnb (nonexistent) @@ -1,57 +0,0 @@ -This patch makes wnb use man(1) to access its own man-pages instead -of relying on textual copies of them being in the $resourcedir. - -Similarly, it looks for the compiled-in license instead of opening -its textual copy. - -These leave wn.xbm as the only "resource" file, thus removing the need -for a separate resource directory. FreeBSD port installs all -- the -dictionaries and the bitmap into ${PREFIX}/share/WordNet. - - -mi - ---- src/wnb Tue Jun 7 15:19:22 2005 -+++ src/wnb Sun Jan 15 07:42:38 2006 -@@ -103,9 +100,15 @@ - - if {$tcl_platform(platform) == "unix"} { -- if {[lsearch -exact [array names env] WNHOME] == -1} { -- set resourcedir "/usr/local/WordNet-3.0/lib/wnres" -- } else { -- set resourcedir "$env(WNHOME)/lib/wnres" -+ set resourcedirs { -+ /usr/local/WordNet-3.0 -+ /usr/local/WordNet-3.0/lib/wnres -+ } -+ if {[info exists env(WNHOME)]} { -+ lappend resourcedirs $env(WNHOME) $env(WNHOME)/lib/wnres - } -+ foreach resourcedir $resourcedirs { -+ if {[file exists $resourcedir/wn.xbm]} break -+ } -+ unset resourcedirs - set configfile "$env(HOME)/.wnrc" - if [ file exists $configfile ] { -@@ -575,7 +578,19 @@ - .$w.top.text configure \ - -state normal -- set fileid [open $filename "r"] -- set filetext [read $fileid] -- close $fileid -+ switch -glob -- $filename { -+ *.man { -+ set manpage [file tail $filename] -+ set manpage [string range $manpage 0 end-4] -+ set fileid [open "|man $manpage"] -+ } */license.txt { -+ set filetext [wnlicense] -+ } default { -+ set fileid [open $filename] -+ } -+ } -+ if {[info exists fileid]} { -+ set filetext [read $fileid] -+ close $fileid -+ } - regsub -all ".\b" $filetext "" filetext - .$w.top.text insert end $filetext Property changes on: head/textproc/wordnet/files/patch-wnb ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/textproc/wordnet/files/patch-binsrch =================================================================== --- head/textproc/wordnet/files/patch-binsrch (revision 363335) +++ head/textproc/wordnet/files/patch-binsrch (nonexistent) @@ -1,268 +0,0 @@ -Clean out the unused functions. Improve and const-ify, what remains. ---- lib/binsrch.c Fri May 6 13:17:38 2005 -+++ lib/binsrch.c Sun Jan 15 11:43:36 2006 -@@ -5,8 +5,9 @@ - */ - -+#include "wn.h" - #include - #include - --static char *Id = "$Id: binsrch.c,v 1.15 2005/02/01 16:46:43 wn Rel $"; -+__FBSDID("$Id: binsrch.c,v 1.15 2005/02/01 16:46:43 wn Rel $"); - - /* Binary search - looks for the key passed at the start of a line -@@ -14,5 +15,4 @@ - a buffer containing the line in the file. */ - --#define KEY_LEN (1024) - #define LINE_LEN (1024*25) - -@@ -25,201 +25,61 @@ - #undef getc - --char *read_index(long offset, FILE *fp) { -- char *linep; -+const char * -+read_index(long offset, FILE *fp) { - -- linep = line; - line[0] = '0'; - -- fseek( fp, offset, SEEK_SET ); -- fgets(linep, LINE_LEN, fp); -+ fseek(fp, offset, SEEK_SET); -+ fgets(line, LINE_LEN, fp); - return(line); - } - --char *bin_search(char *searchkey, FILE *fp) -+static int -+sign(int number) - { -- int c; -- long top, mid, bot, diff; -- char *linep, key[KEY_LEN]; -- int length; -- -- diff=666; -- linep = line; -- line[0] = '\0'; -- -- fseek(fp, 0L, 2); -- top = 0; -- bot = ftell(fp); -- mid = (bot - top) / 2; -- -- do { -- fseek(fp, mid - 1, 0); -- if(mid != 1) -- while((c = getc(fp)) != '\n' && c != EOF); -- last_bin_search_offset = ftell( fp ); -- fgets(linep, LINE_LEN, fp); -- length = (int)(strchr(linep, ' ') - linep); -- strncpy(key, linep, length); -- key[length] = '\0'; -- if(strcmp(key, searchkey) < 0) { -- top = mid; -- diff = (bot - top) / 2; -- mid = top + diff; -- } -- if(strcmp(key, searchkey) > 0) { -- bot = mid; -- diff = (bot - top) / 2; -- mid = top + diff; -- } -- } while((strcmp(key, searchkey)) && (diff != 0)); -- -- if(!strcmp(key, searchkey)) -- return(line); -- else -- return(NULL); -+ if (number > 0) -+ return 1; -+ if (number < 0) -+ return -1; -+ return 0; - } -- --static long offset; - --static int bin_search_key(char *searchkey, FILE *fp) -+const char * -+bin_search(const char *searchkey, FILE *fp) - { -- int c; -- long top, mid, bot, diff; -- char *linep, key[KEY_LEN]; -- int length, offset1, offset2; -- -- /* do binary search to find correct place in file to insert line */ -- -- diff=666; -- linep = line; -- line[0] = '\0'; -- -- fseek(fp, 0L, 2); -- top = 0; -- bot = ftell(fp); -- if (bot == 0) { -- offset = 0; -- return(0); /* empty file */ -- } -- mid = (bot - top) / 2; -- -- /* If only one line in file, don't work through loop */ -- -- length = 0; -- rewind(fp); -- while((c = getc(fp)) != '\n' && c != EOF) -- line[length++] = c; -- if (getc(fp) == EOF) { /* only 1 line in file */ -- length = (int)(strchr(linep, ' ') - linep); -- strncpy(key, linep, length); -- key[length] = '\0'; -- if(strcmp(key, searchkey) > 0) { -- offset = 0; -- return(0); /* line with key is not found */ -- } else if (strcmp(key, searchkey) < 0) { -- offset = ftell(fp); -- return(0); /* line with key is not found */ -- } else { -- offset = 0; -- return(1); /* line with key is found */ -+ int c; -+ long top, mid, bot; /* should be off_t */ -+ int length, keylen; -+ -+ fseek(fp, 0L, 2); -+ bot = ftell(fp); -+ mid = bot / 2; -+ keylen = strlen(searchkey); -+ -+ for (top = 0; bot - top >= 2; mid = (top + bot) / 2) { -+ fseek(fp, mid - 1, 0); -+ if(mid != 1) -+ while((c = getc(fp)) != '\n' && c != EOF); -+ last_bin_search_offset = ftell(fp); -+ if (fgets(line, LINE_LEN, fp) == NULL) -+ return(NULL); -+ length = strchr(line, ' ') - line; -+ switch (sign(strncmp(line, searchkey, length))) { -+ case 0: -+ /* a match up to the length! */ -+ if (length == keylen) -+ return(line); -+ if (length > keylen) -+ /* the word read is longer than ours */ -+ goto up; -+ /* FALLTHROUGH */ -+ case -1: -+ top = mid; -+ continue; -+ case 1: -+ up: -+ bot = mid; -+ } - } -- } -- -- do { -- fseek(fp, mid - 1, 0); -- if(mid != 1) -- while((c = getc(fp)) != '\n' && c != EOF); -- offset1 = ftell(fp); /* offset at start of line */ -- if (fgets(linep, LINE_LEN, fp) != NULL) { -- offset2 = ftell(fp); /* offset at start of next line */ -- length = (int)(strchr(linep, ' ') - linep); -- strncpy(key, linep, length); -- key[length] = '\0'; -- if(strcmp(key, searchkey) < 0) { /* further in file */ -- top = mid; -- diff = (bot - top) / 2; -- mid = top + diff; -- offset = offset2; -- } -- if(strcmp(key, searchkey) > 0) { /* earlier in file */ -- bot = mid; -- diff = (bot - top) / 2; -- mid = top + diff; -- offset = offset1; -- } -- } else { -- bot = mid; -- diff = (bot - top) / 2; -- mid = top + diff; -- } -- } while((strcmp(key, searchkey)) && (diff != 0)); -- -- if(!strcmp(key, searchkey)) { -- offset = offset1; /* get to start of current line */ -- return(1); /* line with key is found */ -- } else -- return(0); /* line with key is not found */ --} -- --/* Copy contents from one file to another. */ -- --void copyfile(FILE *fromfp, FILE *tofp) --{ -- int c; -- -- while ((c = getc(fromfp)) != EOF) -- putc(c, tofp); --} -- --/* Function to replace a line in a file. Returns the original line, -- or NULL in case of error. */ -- --char *replace_line(char *new_line, char *searchkey, FILE *fp) --{ -- FILE *tfp; /* temporary file pointer */ -- -- if (!bin_search_key(searchkey, fp)) -- return(NULL); /* line with key not found */ -- -- if ((tfp = tmpfile()) == NULL) -- return(NULL); /* could not create temp file */ -- fseek(fp, offset, 0); -- fgets(line, LINE_LEN, fp); /* read original */ -- copyfile(fp, tfp); -- if (fseek(fp, offset, 0) == -1) -- return(NULL); /* could not seek to offset */ -- fprintf(fp, new_line); /* write line */ -- rewind(tfp); -- copyfile(tfp, fp); -- -- fclose(tfp); -- fflush(fp); -- -- return(line); --} -- --/* Find location to insert line at in file. If line with this -- key is already in file, return NULL. */ -- --char *insert_line(char *new_line, char *searchkey, FILE *fp) --{ -- FILE *tfp; -- -- if (bin_search_key(searchkey, fp)) - return(NULL); -- -- if ((tfp = tmpfile()) == NULL) -- return(NULL); /* could not create temp file */ -- if (fseek(fp, offset, 0) == -1) -- return(NULL); /* could not seek to offset */ -- copyfile(fp, tfp); -- if (fseek(fp, offset, 0) == -1) -- return(NULL); /* could not seek to offset */ -- fprintf(fp, new_line); /* write line */ -- rewind(tfp); -- copyfile(tfp, fp); -- -- fclose(tfp); -- fflush(fp); -- -- return(new_line); - } Property changes on: head/textproc/wordnet/files/patch-binsrch ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/textproc/wordnet/files/patch-wnglobal =================================================================== --- head/textproc/wordnet/files/patch-wnglobal (revision 363335) +++ head/textproc/wordnet/files/patch-wnglobal (nonexistent) @@ -1,37 +0,0 @@ ---- lib/wnglobal.c Fri May 6 13:17:39 2005 -+++ lib/wnglobal.c Tue Dec 20 23:29:54 2005 -@@ -11,9 +11,9 @@ - #endif - --char *wnrelease = "3.0"; -+const char *wnrelease = "3.0"; - - /* Lexicographer file names and numbers */ - --char *lexfiles[] = { -+const char *lexfiles[] = { - "adj.all", /* 0 */ - "adj.pert", /* 1 */ -@@ -65,5 +65,5 @@ - /* Pointer characters and searches */ - --char *ptrtyp[]={ -+const char *ptrtyp[] = { - "", /* 0 not used */ - "!", /* 1 ANTPTR */ -@@ -110,11 +110,11 @@ - }; - --char *partnames[]={ "", "noun", "verb", "adj", "adv", NULL }; --char partchars[] = " nvara"; /* add char for satellites to end */ --char *adjclass[] = { "", "(p)", "(a)", "(ip)" }; -+const char *partnames[]={ "", "noun", "verb", "adj", "adv", NULL }; -+const char partchars[] = " nvara"; /* add char for satellites to end */ -+const char *adjclass[] = { "", "(p)", "(a)", "(ip)" }; - - /* Text of verb sentence frames */ - --char *frametext[] = { -+const char *frametext[] = { - "", - "Something ----s", Property changes on: head/textproc/wordnet/files/patch-wnglobal ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/textproc/wordnet/files/patch-wn.c =================================================================== --- head/textproc/wordnet/files/patch-wn.c (revision 363335) +++ head/textproc/wordnet/files/patch-wn.c (nonexistent) @@ -1,100 +0,0 @@ ---- src/wn.c Fri May 6 13:29:09 2005 -+++ src/wn.c Wed Dec 21 01:41:13 2005 -@@ -8,14 +8,14 @@ - #include - #include - #include "wn.h" - --static char *Id = "$Id: wn.c,v 1.13 2005/01/31 19:19:09 wn Rel $"; -+__FBSDID("$Id: wn.c,v 1.13 2005/01/31 19:19:09 wn Rel $"); - - static struct { -- char *option; /* user's search request */ -+ const char *option; /* user's search request */ - int search; /* search to pass findtheinfo() */ - int pos; /* part-of-speech to pass findtheinfo() */ - int helpmsgidx; /* index into help message table */ -- char *label; /* text for search header message */ -+ const char *label; /* text for search header message */ - } *optptr, optlist[] = { - { "-synsa", SIMPTR, ADJ, 0, "Similarity" }, -@@ -83,7 +84,7 @@ - - struct { -- char *template; /* template for generic search message */ -- char *option; /* text for help message */ -- char *helpstr; -+ const char *template; /* template for generic search message */ -+ const char *option; /* text for help message */ -+ const char *helpstr; - } searchstr[] = { /* index by search type type */ - { NULL, NULL, NULL }, -@@ -122,11 +123,11 @@ - }; - --static int getoptidx(char *), cmdopt(char *); -+static int getoptidx(const char *), cmdopt(const char *); - static int searchwn(int, char *[]); --static int do_search(char *, int, int, int, char *); -+static int do_search(char *, int, int, int, const char *); - static int do_is_defined(char *); - static void printusage(), printlicense(), -- printsearches(char *, int, unsigned long); --static int error_message(char *); -+ printsearches(const char *, int, unsigned long); -+static int error_message(const char *); - - main(int argc,char *argv[]) -@@ -214,9 +215,10 @@ - } - --static int do_search(char *searchword, int pos, int search, int whichsense, -- char *label) -+static int -+do_search(char *searchword, int pos, int search, int whichsense, -+ const char *label) - { - int totsenses = 0; -- char *morphword, *outbuf; -+ const char *morphword, *outbuf; - - outbuf = findtheinfo(searchword, pos, search, whichsense); -@@ -242,5 +244,5 @@ - int i, found = 0; - unsigned int search; -- char *morphword; -+ const char *morphword; - - if (searchword[0] == '-') { -@@ -274,5 +276,6 @@ - } - --static void printsearches(char *word, int dbase, unsigned long search) -+static void -+printsearches(const char *word, int dbase, unsigned long search) - { - int j; -@@ -316,5 +319,6 @@ - } - --static int cmdopt(char *str) -+static int -+cmdopt(const char *str) - { - -@@ -332,5 +336,6 @@ - } - --static int getoptidx(char *searchtype) -+static int -+getoptidx(const char *searchtype) - { - int i; -@@ -343,5 +348,6 @@ - } - --static int error_message(char *msg) -+static int -+error_message(const char *msg) - { - fprintf(stderr, msg); Property changes on: head/textproc/wordnet/files/patch-wn.c ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/textproc/wordnet/files/patch-wnrtl =================================================================== --- head/textproc/wordnet/files/patch-wnrtl (revision 363335) +++ head/textproc/wordnet/files/patch-wnrtl (nonexistent) @@ -1,17 +0,0 @@ ---- lib/wnrtl.c Fri May 6 13:17:39 2005 -+++ lib/wnrtl.c Wed Dec 21 00:21:04 2005 -@@ -8,5 +8,5 @@ - #include "wn.h" - --static char *Id = "$Id: wnrtl.c,v 1.8 2005/01/27 17:33:54 wn Rel $"; -+__FBSDID("$Id: wnrtl.c,v 1.8 2005/01/27 17:33:54 wn Rel $"); - - /* Search code variables and flags */ -@@ -43,6 +43,5 @@ - Default function provided in library returns -1 */ - --int default_display_message(char *); --int (*display_message)(char *) = default_display_message; -+int (*display_message)(const char *) = default_display_message; - - /* Property changes on: head/textproc/wordnet/files/patch-wnrtl ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/textproc/wordnet/files/patch-include__wn.h =================================================================== --- head/textproc/wordnet/files/patch-include__wn.h (nonexistent) +++ head/textproc/wordnet/files/patch-include__wn.h (revision 363336) @@ -0,0 +1,271 @@ +--- include/wn.h Wed Jul 6 14:48:44 2005 ++++ include/wn.h Wed Dec 21 17:24:58 2005 +@@ -152,12 +154,12 @@ + #define IMMED_POSTNOMINAL IPADJ + +-extern char *wnrelease; /* WordNet release/version number */ ++extern const char *wnrelease; /* WordNet release/version number */ + +-extern char *lexfiles[]; /* names of lexicographer files */ +-extern char *ptrtyp[]; /* pointer characters */ +-extern char *partnames[]; /* POS strings */ +-extern char partchars[]; /* single chars for each POS */ +-extern char *adjclass[]; /* adjective class strings */ +-extern char *frametext[]; /* text of verb frames */ ++extern const char *lexfiles[]; /* names of lexicographer files */ ++extern const char *ptrtyp[]; /* pointer characters */ ++extern const char *partnames[]; /* POS strings */ ++extern const char partchars[]; /* single chars for each POS */ ++extern const char *adjclass[]; /* adjective class strings */ ++extern const char *frametext[]; /* text of verb frames */ + + /* Data structures used by search code functions. */ +@@ -173,5 +175,5 @@ + unsigned long *offset; /* offsets of synsets containing word */ + int ptruse_cnt; /* number of pointers used */ +- int *ptruse; /* pointers used */ ++ short *ptruse; /* pointers used */ + } Index; + +@@ -180,5 +182,5 @@ + /* Structure for data file synset */ + typedef struct ss { +- long hereiam; /* current file position */ ++ unsigned long hereiam; /* current file position */ + int sstype; /* type of ADJ synset */ + int fnum; /* file number that synset comes from */ +@@ -191,8 +193,8 @@ + int ptrcount; /* number of pointers */ + int *ptrtyp; /* pointer types */ +- long *ptroff; /* pointer offsets */ ++ unsigned long *ptroff; /* pointer offsets */ + int *ppos; /* pointer part of speech */ +- int *pto; /* pointer 'to' fields */ +- int *pfrm; /* pointer 'from' fields */ ++ unsigned short *pto; /* pointer 'to' fields */ ++ unsigned short *pfrm; /* pointer 'from' fields */ + int fcount; /* number of verb frames */ + int *frmid; /* frame numbers */ +@@ -218,5 +220,5 @@ + char *sensekey; /* sense key */ + char *word; /* word string */ +- long loc; /* synset offset */ ++ unsigned long loc; /* synset offset */ + int wnsense; /* WordNet sense number */ + int tag_cnt; /* number of semantic tags to sense */ +@@ -268,6 +270,6 @@ + Default function provided in library returns -1 */ + +-extern int default_display_message(char *); +-extern int (*display_message)(char *); ++int default_display_message(const char *); ++int (*display_message)(const char *); + + +@@ -282,5 +284,5 @@ + + /* Primry search algorithm for use with user interfaces */ +-extern char *findtheinfo(char *, int, int, int); ++const char *findtheinfo(const char *, int, int, int); + + /* Primary search algorithm for use with programs (returns data structure) */ +@@ -289,27 +291,27 @@ + /* Set bit for each search type that is valid for the search word + passed and return bit mask. */ +-extern unsigned int is_defined(char *, int); ++extern unsigned int is_defined(const char *, int); + + /* Set bit for each POS that search word is in. 0 returned if + word is not in WordNet. */ +-extern unsigned int in_wn(char *, int); ++unsigned int in_wn(const char *, int); + + /* Find word in index file and return parsed entry in data structure. + Input word must be exact match of string in database. */ +-extern IndexPtr index_lookup(char *, int); ++IndexPtr index_lookup(const char *, int); + + /* 'smart' search of index file. Find word in index file, trying different + techniques - replace hyphens with underscores, replace underscores with + hyphens, strip hyphens and underscores, strip periods. */ +-extern IndexPtr getindex(char *, int); +-extern IndexPtr parse_index(long, int, char *); ++extern IndexPtr getindex(const char *, int); ++extern IndexPtr parse_index(long, int, const char *); + + /* Read synset from data file at byte offset passed and return parsed + entry in data structure. */ +-extern SynsetPtr read_synset(int, long, char *); ++extern SynsetPtr read_synset(int, long, const char *); + + /* Read synset at current byte offset in file and return parsed entry + in data structure. */ +-extern SynsetPtr parse_synset(FILE *, int, char *); ++extern SynsetPtr parse_synset(FILE *, int, const char *); + + /* Free a synset linked list allocated by findtheinfo_ds() */ +@@ -324,22 +326,22 @@ + /* Recursive search algorithm to trace a pointer tree and return results + in linked list of data structures. */ +-SynsetPtr traceptrs_ds(SynsetPtr, int, int, int); ++SynsetPtr traceptrs_ds(SynsetPtr, int, int); + + /* Do requested search on synset passed, returning output in buffer. */ +-extern char *do_trace(SynsetPtr, int, int, int); ++const char *do_trace(SynsetPtr, int, int, int); + + /*** Morphology functions (morph.c) ***/ + + /* Open exception list files */ +-extern int morphinit(); ++int morphinit(void); + + /* Close exception list files and reopen */ +-extern int re_morphinit(); ++int re_morphinit(void); + + /* Try to find baseform (lemma) of word or collocation in POS. */ +-extern char *morphstr(char *, int); ++const char *morphstr(const char *, int); + + /* Try to find baseform (lemma) of individual word in POS. */ +-extern char *morphword(char *, int); ++const char *morphword(const char *, int); + + /*** Utility functions (wnutil.c) ***/ +@@ -347,9 +349,9 @@ + /* Top level function to open database files, initialize wn_filenames, + and open exeception lists. */ +-extern int wninit(); ++int wninit(void); + + /* Top level function to close and reopen database files, initialize + wn_filenames and open exception lists. */ +-extern int re_wninit(); ++int re_wninit(void); + + /* Count the number of underscore or space separated words in a string. */ +@@ -358,4 +360,5 @@ + /* Convert string to lower case remove trailing adjective marker if found */ + extern char *strtolower(char *); ++char *strtolower2(const char *from, char *to); + + /* Convert string passed to lower case */ +@@ -366,14 +369,14 @@ + + /* Return pointer code for pointer type characer passed. */ +-extern int getptrtype(char *); ++unsigned short getptrtype(const char *, char **end); + + /* Return part of speech code for string passed */ +-extern int getpos(char *); ++int getpos(const char *); + + /* Return synset type code for string passed. */ +-extern int getsstype(char *); ++int getsstype(const char *); + + /* Reconstruct synset from synset pointer and return ptr to buffer */ +-extern char *FmtSynset(SynsetPtr, int); ++const char *FmtSynset(SynsetPtr, int); + + /* Find string for 'searchstr' as it is in index file */ +@@ -381,37 +384,34 @@ + + /* Pass in string for POS, return corresponding integer value */ +-extern int StrToPos(char *); ++int StrToPos(const char *); + + /* Return synset for sense key passed. */ +-extern SynsetPtr GetSynsetForSense(char *); ++SynsetPtr GetSynsetForSense(const char *); + + /* Find offset of sense key in data file */ +-extern long GetDataOffset(char *); ++long GetDataOffset(const char *); + + /* Find polysemy (collins) count for sense key passed. */ +-extern int GetPolyCount(char *); ++int GetPolyCount(const char *); + + /* Return word part of sense key */ +-extern char *GetWORD(char *); ++const char *GetWORD(const char *); + + /* Return POS code for sense key passed. */ +-extern int GetPOS(char *); ++int GetPOS(const char *); + + /* Convert WordNet sense number passed of IndexPtr entry to sense key. */ + extern char *WNSnsToStr(IndexPtr, int); + +-/* Search for string and/or baseform of word in database and return +- index structure for word if found in database. */ +-extern IndexPtr GetValidIndexPointer(char *, int); +- + /* Return sense number in database for word and lexsn passed. */ +-int GetWNSense(char *, char *); ++int GetWNSense(const char *, const char *); + +-SnsIndexPtr GetSenseIndex(char *); ++SnsIndexPtr GetSenseIndex(const char *); ++void FreeSenseIndex(SnsIndexPtr); + +-char *GetOffsetForKey(unsigned int); +-unsigned int GetKeyForOffset(char *); ++const char *GetOffsetForKey(unsigned int); ++unsigned int GetKeyForOffset(const char *); + +-char *SetSearchdir(); ++const char *SetSearchdir(void); + + /* Return number of times sense is tagged */ +@@ -435,17 +435,6 @@ + /* General purpose binary search function to search for key as first + item on line in open file. Item is delimited by space. */ +-extern char *bin_search(char *, FILE *); +-extern char *read_index(long, FILE *); +- +-/* Copy contents from one file to another. */ +-extern void copyfile(FILE *, FILE *); +- +-/* Function to replace a line in a file. Returns the original line, +- or NULL in case of error. */ +-extern char *replace_line(char *, char *, FILE *); +- +-/* Find location to insert line at in file. If line with this +- key is already in file, return NULL. */ +-extern char *insert_line(char *, char *, FILE *); ++const char *bin_search(const char *, FILE *); ++const char *read_index(long, FILE *); + + #ifdef __cplusplus +@@ -453,7 +453,8 @@ + #endif + +-extern char **helptext[NUMPARTS + 1]; ++const char * const * helptext[NUMPARTS + 1]; + +-static char *license = "\ ++#ifdef DEFINE_LICENSE /* should live in wn.c */ ++const char license[] = "\ + This software and database is being provided to you, the LICENSEE, by \n\ + Princeton University under the following license. By obtaining, using \n\ +@@ -486,5 +487,5 @@ + Princeton University and LICENSEE agrees to preserve same. \n" + ; +- ++#if 0 /* { */ + static char dblicense[] = "\ + 1 This software and database is being provided to you, the LICENSEE, by \n\ +@@ -518,6 +519,9 @@ + 29 Princeton University and LICENSEE agrees to preserve same. \n" + ; +- + #define DBLICENSE_SIZE (sizeof(dblicense)) ++#endif /* } */ ++#else /* } { */ ++extern const char license[]; ++#endif /* } */ + + #endif /*_WN_*/ Property changes on: head/textproc/wordnet/files/patch-include__wn.h ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/textproc/wordnet/files/patch-lib__binsrch.c =================================================================== --- head/textproc/wordnet/files/patch-lib__binsrch.c (nonexistent) +++ head/textproc/wordnet/files/patch-lib__binsrch.c (revision 363336) @@ -0,0 +1,268 @@ +Clean out the unused functions. Improve and const-ify, what remains. +--- lib/binsrch.c Fri May 6 13:17:38 2005 ++++ lib/binsrch.c Sun Jan 15 11:43:36 2006 +@@ -5,8 +5,9 @@ + */ + ++#include "wn.h" + #include + #include + +-static char *Id = "$Id: binsrch.c,v 1.15 2005/02/01 16:46:43 wn Rel $"; ++__FBSDID("$Id: binsrch.c,v 1.15 2005/02/01 16:46:43 wn Rel $"); + + /* Binary search - looks for the key passed at the start of a line +@@ -14,5 +15,4 @@ + a buffer containing the line in the file. */ + +-#define KEY_LEN (1024) + #define LINE_LEN (1024*25) + +@@ -25,201 +25,61 @@ + #undef getc + +-char *read_index(long offset, FILE *fp) { +- char *linep; ++const char * ++read_index(long offset, FILE *fp) { + +- linep = line; + line[0] = '0'; + +- fseek( fp, offset, SEEK_SET ); +- fgets(linep, LINE_LEN, fp); ++ fseek(fp, offset, SEEK_SET); ++ fgets(line, LINE_LEN, fp); + return(line); + } + +-char *bin_search(char *searchkey, FILE *fp) ++static int ++sign(int number) + { +- int c; +- long top, mid, bot, diff; +- char *linep, key[KEY_LEN]; +- int length; +- +- diff=666; +- linep = line; +- line[0] = '\0'; +- +- fseek(fp, 0L, 2); +- top = 0; +- bot = ftell(fp); +- mid = (bot - top) / 2; +- +- do { +- fseek(fp, mid - 1, 0); +- if(mid != 1) +- while((c = getc(fp)) != '\n' && c != EOF); +- last_bin_search_offset = ftell( fp ); +- fgets(linep, LINE_LEN, fp); +- length = (int)(strchr(linep, ' ') - linep); +- strncpy(key, linep, length); +- key[length] = '\0'; +- if(strcmp(key, searchkey) < 0) { +- top = mid; +- diff = (bot - top) / 2; +- mid = top + diff; +- } +- if(strcmp(key, searchkey) > 0) { +- bot = mid; +- diff = (bot - top) / 2; +- mid = top + diff; +- } +- } while((strcmp(key, searchkey)) && (diff != 0)); +- +- if(!strcmp(key, searchkey)) +- return(line); +- else +- return(NULL); ++ if (number > 0) ++ return 1; ++ if (number < 0) ++ return -1; ++ return 0; + } +- +-static long offset; + +-static int bin_search_key(char *searchkey, FILE *fp) ++const char * ++bin_search(const char *searchkey, FILE *fp) + { +- int c; +- long top, mid, bot, diff; +- char *linep, key[KEY_LEN]; +- int length, offset1, offset2; +- +- /* do binary search to find correct place in file to insert line */ +- +- diff=666; +- linep = line; +- line[0] = '\0'; +- +- fseek(fp, 0L, 2); +- top = 0; +- bot = ftell(fp); +- if (bot == 0) { +- offset = 0; +- return(0); /* empty file */ +- } +- mid = (bot - top) / 2; +- +- /* If only one line in file, don't work through loop */ +- +- length = 0; +- rewind(fp); +- while((c = getc(fp)) != '\n' && c != EOF) +- line[length++] = c; +- if (getc(fp) == EOF) { /* only 1 line in file */ +- length = (int)(strchr(linep, ' ') - linep); +- strncpy(key, linep, length); +- key[length] = '\0'; +- if(strcmp(key, searchkey) > 0) { +- offset = 0; +- return(0); /* line with key is not found */ +- } else if (strcmp(key, searchkey) < 0) { +- offset = ftell(fp); +- return(0); /* line with key is not found */ +- } else { +- offset = 0; +- return(1); /* line with key is found */ ++ int c; ++ long top, mid, bot; /* should be off_t */ ++ int length, keylen; ++ ++ fseek(fp, 0L, 2); ++ bot = ftell(fp); ++ mid = bot / 2; ++ keylen = strlen(searchkey); ++ ++ for (top = 0; bot - top >= 2; mid = (top + bot) / 2) { ++ fseek(fp, mid - 1, 0); ++ if(mid != 1) ++ while((c = getc(fp)) != '\n' && c != EOF); ++ last_bin_search_offset = ftell(fp); ++ if (fgets(line, LINE_LEN, fp) == NULL) ++ return(NULL); ++ length = strchr(line, ' ') - line; ++ switch (sign(strncmp(line, searchkey, length))) { ++ case 0: ++ /* a match up to the length! */ ++ if (length == keylen) ++ return(line); ++ if (length > keylen) ++ /* the word read is longer than ours */ ++ goto up; ++ /* FALLTHROUGH */ ++ case -1: ++ top = mid; ++ continue; ++ case 1: ++ up: ++ bot = mid; ++ } + } +- } +- +- do { +- fseek(fp, mid - 1, 0); +- if(mid != 1) +- while((c = getc(fp)) != '\n' && c != EOF); +- offset1 = ftell(fp); /* offset at start of line */ +- if (fgets(linep, LINE_LEN, fp) != NULL) { +- offset2 = ftell(fp); /* offset at start of next line */ +- length = (int)(strchr(linep, ' ') - linep); +- strncpy(key, linep, length); +- key[length] = '\0'; +- if(strcmp(key, searchkey) < 0) { /* further in file */ +- top = mid; +- diff = (bot - top) / 2; +- mid = top + diff; +- offset = offset2; +- } +- if(strcmp(key, searchkey) > 0) { /* earlier in file */ +- bot = mid; +- diff = (bot - top) / 2; +- mid = top + diff; +- offset = offset1; +- } +- } else { +- bot = mid; +- diff = (bot - top) / 2; +- mid = top + diff; +- } +- } while((strcmp(key, searchkey)) && (diff != 0)); +- +- if(!strcmp(key, searchkey)) { +- offset = offset1; /* get to start of current line */ +- return(1); /* line with key is found */ +- } else +- return(0); /* line with key is not found */ +-} +- +-/* Copy contents from one file to another. */ +- +-void copyfile(FILE *fromfp, FILE *tofp) +-{ +- int c; +- +- while ((c = getc(fromfp)) != EOF) +- putc(c, tofp); +-} +- +-/* Function to replace a line in a file. Returns the original line, +- or NULL in case of error. */ +- +-char *replace_line(char *new_line, char *searchkey, FILE *fp) +-{ +- FILE *tfp; /* temporary file pointer */ +- +- if (!bin_search_key(searchkey, fp)) +- return(NULL); /* line with key not found */ +- +- if ((tfp = tmpfile()) == NULL) +- return(NULL); /* could not create temp file */ +- fseek(fp, offset, 0); +- fgets(line, LINE_LEN, fp); /* read original */ +- copyfile(fp, tfp); +- if (fseek(fp, offset, 0) == -1) +- return(NULL); /* could not seek to offset */ +- fprintf(fp, new_line); /* write line */ +- rewind(tfp); +- copyfile(tfp, fp); +- +- fclose(tfp); +- fflush(fp); +- +- return(line); +-} +- +-/* Find location to insert line at in file. If line with this +- key is already in file, return NULL. */ +- +-char *insert_line(char *new_line, char *searchkey, FILE *fp) +-{ +- FILE *tfp; +- +- if (bin_search_key(searchkey, fp)) + return(NULL); +- +- if ((tfp = tmpfile()) == NULL) +- return(NULL); /* could not create temp file */ +- if (fseek(fp, offset, 0) == -1) +- return(NULL); /* could not seek to offset */ +- copyfile(fp, tfp); +- if (fseek(fp, offset, 0) == -1) +- return(NULL); /* could not seek to offset */ +- fprintf(fp, new_line); /* write line */ +- rewind(tfp); +- copyfile(tfp, fp); +- +- fclose(tfp); +- fflush(fp); +- +- return(new_line); + } Property changes on: head/textproc/wordnet/files/patch-lib__binsrch.c ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/textproc/wordnet/files/patch-lib__morph.c =================================================================== --- head/textproc/wordnet/files/patch-lib__morph.c (nonexistent) +++ head/textproc/wordnet/files/patch-lib__morph.c (revision 363336) @@ -0,0 +1,198 @@ +--- lib/morph.c Fri May 6 13:17:39 2005 ++++ lib/morph.c Tue Dec 20 23:21:44 2005 +@@ -19,7 +19,7 @@ + #endif + +-static char *Id = "$Id: morph.c,v 1.67 2006/11/14 21:00:23 wn Exp $"; ++__FBSDID("$Id: morph.c,v 1.67 2006/11/14 21:00:23 wn Exp $"); + +-static char *sufx[] ={ ++static const char *sufx[] ={ + /* Noun suffixes */ + "s", "ses", "xes", "zes", "ches", "shes", "men", "ies", +@@ -30,5 +30,5 @@ + }; + +-static char *addr[] ={ ++static const char *addr[] ={ + /* Noun endings */ + "", "s", "x", "z", "ch", "sh", "man", "y", +@@ -43,35 +43,36 @@ + static char msgbuf[256]; + +-#define NUMPREPS 15 + + static struct { +- char *str; ++ const char *str; + int strlen; +-} prepositions[NUMPREPS] = { +- "to", 2, +- "at", 2, +- "of", 2, +- "on", 2, +- "off", 3, +- "in", 2, +- "out", 3, +- "up", 2, +- "down", 4, +- "from", 4, +- "with", 4, +- "into", 4, +- "for", 3, +- "about", 5, +- "between", 7, ++} prepositions[] = { ++ { "to", 2 }, ++ { "at", 2 }, ++ { "of", 2 }, ++ { "on", 2 }, ++ { "off", 3 }, ++ { "in", 2 }, ++ { "out", 3 }, ++ { "up", 2 }, ++ { "down", 4 }, ++ { "from", 4 }, ++ { "with", 4 }, ++ { "into", 4 }, ++ { "for", 3 }, ++ { "about", 5 }, ++ { "between", 7 } + }; + ++#define NUMPREPS sizeof(prepositions)/sizeof(prepositions[0]) ++ + static FILE *exc_fps[NUMPARTS + 1]; + +-static int do_init(); +-static int strend(char *, char *); +-static char *wordbase(char *, int); +-static int hasprep(char *, int); +-static char *exc_lookup(char *, int); +-static char *morphprep(char *); ++static int do_init(void); ++static int strend(const char *, const char *); ++static const char *wordbase(const char *, int); ++static int hasprep(const char *, unsigned int); ++static const char *exc_lookup(const char *, int); ++static const char *morphprep(const char *); + + /* Open exception list files */ +@@ -167,13 +168,15 @@ + with NULL argument return additional baseforms for original string. */ + +-char *morphstr(char *origstr, int pos) ++const char * ++morphstr(const char *origstr, int pos) + { + static char searchstr[WORDBUF], str[WORDBUF]; + static int svcnt, svprep; +- char word[WORDBUF], *tmp; ++ char word[WORDBUF]; ++ const char *tmp; + int cnt, st_idx = 0, end_idx; + int prep; +- char *end_idx1, *end_idx2; +- char *append; ++ const char *end_idx1, *end_idx2; ++ const char *append; + + if (pos == SATELLITE) +@@ -230,5 +233,6 @@ + strncpy(word, str + st_idx, end_idx - st_idx); + word[end_idx - st_idx] = '\0'; +- if(tmp = morphword(word, pos)) ++ tmp = morphword(word, pos); ++ if(tmp) + strcat(searchstr,tmp); + else +@@ -238,5 +242,6 @@ + } + +- if(tmp = morphword(strcpy(word, str + st_idx), pos)) ++ tmp = morphword(strcpy(word, str + st_idx), pos); ++ if(tmp) + strcat(searchstr,tmp); + else +@@ -264,13 +269,14 @@ + + /* Try to find baseform (lemma) of individual word in POS */ +-char *morphword(char *word, int pos) ++const char * ++morphword(const char *word, int pos) + { + int offset, cnt; + int i; + static char retval[WORDBUF]; +- char *tmp, tmpbuf[WORDBUF], *end; ++ char tmpbuf[WORDBUF]; ++ const char *tmp, *end; + +- sprintf(retval,""); +- sprintf(tmpbuf, ""); ++ retval[0] = tmpbuf[0] = '\0'; + end = ""; + +@@ -315,7 +321,7 @@ + } + +-static int strend(char *str1, char *str2) ++static int strend(const char *str1, const char *str2) + { +- char *pt1; ++ const char *pt1; + + if(strlen(str2) >= strlen(str1)) +@@ -329,5 +335,6 @@ + } + +-static char *wordbase(char *word, int ender) ++static const char * ++wordbase(const char *word, int ender) + { + char *pt1; +@@ -344,10 +351,10 @@ + } + +-static int hasprep(char *s, int wdcnt) ++static int hasprep(const char *s, unsigned int wdcnt) + { + /* Find a preposition in the verb string and return its + corresponding word number. */ + +- int i, wdnum; ++ unsigned int i, wdnum; + + for (wdnum = 2; wdnum <= wdcnt; wdnum++) { +@@ -362,9 +369,9 @@ + } + +-static char *exc_lookup(char *word, int pos) ++static const char * ++exc_lookup(const char *word, int pos) + { + static char line[WORDBUF], *beglp, *endlp; +- char *excline; +- int found = 0; ++ const char *excline; + + if (exc_fps[pos] == NULL) +@@ -394,7 +401,8 @@ + } + +-static char *morphprep(char *s) ++static const char * ++morphprep(const char *s) + { +- char *rest, *exc_word, *lastwd = NULL, *last; ++ const char *rest, *exc_word, *lastwd = NULL, *last; + int i, offset, cnt; + char word[WORDBUF], end[WORDBUF]; +@@ -408,5 +416,6 @@ + last = strrchr(s, '_'); + if (rest != last) { /* more than 2 words */ +- if (lastwd = morphword(last + 1, NOUN)) { ++ lastwd = morphword(last + 1, NOUN); ++ if (lastwd) { + strncpy(end, rest, last - rest + 1); + end[last-rest+1] = '\0'; Property changes on: head/textproc/wordnet/files/patch-lib__morph.c ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/textproc/wordnet/files/patch-lib__search.c =================================================================== --- head/textproc/wordnet/files/patch-lib__search.c (nonexistent) +++ head/textproc/wordnet/files/patch-lib__search.c (revision 363336) @@ -0,0 +1,1175 @@ +--- lib/search.c 2006-11-29 16:02:21.000000000 -0500 ++++ lib/search.c 2014-04-01 14:50:06.000000000 -0400 +@@ -17,5 +17,5 @@ + #include "wn.h" + +-static char *Id = "$Id: search.c,v 1.166 2006/11/14 20:52:45 wn Exp $"; ++__FBSDID("$Id: search.c,v 1.166 2006/11/14 20:52:45 wn Exp $"); + + /* For adjectives, indicates synset type */ +@@ -45,12 +45,12 @@ + /* Forward function declarations */ + +-static void WNOverview(char *, int); ++static void WNOverview(const char *, int); + static void findverbgroups(IndexPtr); +-static void add_relatives(int, IndexPtr, int, int); ++static void add_relatives(int, int); + static void free_rellist(void); +-static void printsynset(char *, SynsetPtr, char *, int, int, int, int); +-static void printantsynset(SynsetPtr, char *, int, int); +-static char *printant(int, SynsetPtr, int, char *, char *); +-static void printbuffer(char *); ++static void printsynset(const char *, SynsetPtr, const char *, int, int, int, int); ++static void printantsynset(SynsetPtr, const char *, int); ++static const char *printant(int, SynsetPtr, int, const char *, const char *); ++static void printbuffer(const char *); + static void printsns(SynsetPtr, int); + static void printsense(SynsetPtr, int); +@@ -62,6 +62,6 @@ + static int getsearchsense(SynsetPtr, int); + static int depthcheck(int, SynsetPtr); +-static void interface_doevents(); +-static void getexample(char *, char *); ++static void interface_doevents(void); ++static void getexample(const char *, const char *); + static int findexample(SynsetPtr); + +@@ -84,9 +84,10 @@ + Input word must be exact match of string in database. */ + +-IndexPtr index_lookup(char *word, int dbase) ++IndexPtr ++index_lookup(const char *word, int dbase) + { + IndexPtr idx = NULL; + FILE *fp; +- char *line; ++ const char *line; + + if ((fp = indexfps[dbase]) == NULL) { +@@ -111,14 +112,16 @@ + */ + +-IndexPtr parse_index(long offset, int dbase, char *line) { ++IndexPtr ++parse_index(long offset, int dbase, const char *line) { + + IndexPtr idx = NULL; + char *ptrtok; + int j; ++ int len; + + if ( !line ) + line = read_index( offset, indexfps[dbase] ); + +- idx = (IndexPtr)malloc(sizeof(Index)); ++ idx = malloc(sizeof(Index)); + assert(idx); + +@@ -126,61 +129,62 @@ + idx->idxoffset = offset; + +- idx->wd='\0'; +- idx->pos='\0'; ++ idx->wd=NULL; ++ idx->pos=NULL; + idx->off_cnt=0; + idx->tagged_cnt = 0; + idx->sense_cnt=0; +- idx->offset='\0'; ++ idx->offset=NULL; + idx->ptruse_cnt=0; +- idx->ptruse='\0'; ++ idx->ptruse=NULL; + + /* get the word */ +- ptrtok=strtok(line," \n"); ++ ptrtok = strpbrk(line, " \n"); ++ len = ptrtok - line; + +- idx->wd = malloc(strlen(ptrtok) + 1); ++ idx->wd = malloc(len + 1); + assert(idx->wd); +- strcpy(idx->wd, ptrtok); ++ memcpy(idx->wd, line, len); ++ idx->wd[len] = '\0'; ++ line = ptrtok + 1; + + /* get the part of speech */ +- ptrtok=strtok(NULL," \n"); +- idx->pos = malloc(strlen(ptrtok) + 1); ++ ptrtok = strpbrk(line, " \n"); ++ len = ptrtok - line; ++ ++ idx->pos = malloc(len + 1); + assert(idx->pos); +- strcpy(idx->pos, ptrtok); ++ memcpy(idx->pos, line, len); ++ idx->pos[len] = '\0'; ++ line = ptrtok + 1; + + /* get the collins count */ +- ptrtok=strtok(NULL," \n"); +- idx->sense_cnt = atoi(ptrtok); +- ++ idx->sense_cnt = strtoul(line, &ptrtok, 10); ++ + /* get the number of pointers types */ +- ptrtok=strtok(NULL," \n"); +- idx->ptruse_cnt = atoi(ptrtok); +- ++ idx->ptruse_cnt = strtoul(ptrtok + 1, &ptrtok, 10); ++ + if (idx->ptruse_cnt) { +- idx->ptruse = (int *) malloc(idx->ptruse_cnt * (sizeof(int))); ++ idx->ptruse = malloc(idx->ptruse_cnt * (sizeof(short))); + assert(idx->ptruse); + + /* get the pointers types */ + for(j=0;j < idx->ptruse_cnt; j++) { +- ptrtok=strtok(NULL," \n"); +- idx->ptruse[j] = getptrtype(ptrtok); ++ idx->ptruse[j] = getptrtype(ptrtok + 1, &ptrtok); + } + } + + /* get the number of offsets */ +- ptrtok=strtok(NULL," \n"); +- idx->off_cnt = atoi(ptrtok); ++ idx->off_cnt = strtoul(ptrtok + 1, &ptrtok, 10); + + /* get the number of senses that are tagged */ +- ptrtok=strtok(NULL," \n"); +- idx->tagged_cnt = atoi(ptrtok); +- ++ idx->tagged_cnt = strtoul(ptrtok + 1, &ptrtok, 10); ++ + /* make space for the offsets */ +- idx->offset = (long *) malloc(idx->off_cnt * (sizeof(long))); ++ idx->offset = malloc(idx->off_cnt * (sizeof(long))); + assert(idx->offset); + + /* get the offsets */ + for(j=0;joff_cnt;j++) { +- ptrtok=strtok(NULL," \n"); +- idx->offset[j] = atol(ptrtok); ++ idx->offset[j] = strtoul(ptrtok + 1, &ptrtok, 10); + } + return(idx); +@@ -191,5 +195,6 @@ + hyphens, strip hyphens and underscores, strip periods. */ + +-IndexPtr getindex(char *searchstr, int dbase) ++IndexPtr ++getindex(const char *searchstr, int dbase) + { + int i, j, k; +@@ -207,6 +212,8 @@ + + offset = 0; +- strtolower(searchstr); +- for (i = 0; i < MAX_FORMS; i++) { ++ strtolower2(searchstr, strings[0]); ++ searchstr = strings[0]; ++ offsets[0] = 0; ++ for (i = 1; i < MAX_FORMS; i++) { + strcpy(strings[i], searchstr); + offsets[i] = 0; +@@ -230,9 +237,9 @@ + and get offsets of unique strings. */ + +- if (strings[0][0] != NULL) ++ if (strings[0][0] != '\0') + offsets[0] = index_lookup(strings[0], dbase); + + for (i = 1; i < MAX_FORMS; i++) +- if ((strings[i][0]) != NULL && (strcmp(strings[0], strings[i]))) ++ if ((strings[i][0]) != '\0' && (strcmp(strings[0], strings[i]))) + offsets[i] = index_lookup(strings[i], dbase); + } +@@ -251,5 +258,6 @@ + entry in data structure. */ + +-SynsetPtr read_synset(int dbase, long boffset, char *word) ++SynsetPtr ++read_synset(int dbase, long boffset, const char *word) + { + FILE *fp; +@@ -270,19 +278,18 @@ + in data structure. */ + +-SynsetPtr parse_synset(FILE *fp, int dbase, char *word) ++SynsetPtr ++parse_synset(FILE *fp, int dbase, const char *word) + { +- static char line[LINEBUF]; +- char tbuf[SMLINEBUF]; ++ char line[LINEBUF]; + char *ptrtok; +- char *tmpptr; + int foundpert = 0; + char wdnum[3]; +- int i; ++ int i, len; + SynsetPtr synptr; +- long loc; /* sanity check on file location */ ++ unsigned long loc; /* sanity check on file location */ + + loc = ftell(fp); + +- if ((tmpptr = fgets(line, LINEBUF, fp)) == NULL) ++ if (fgets(line, LINEBUF, fp) == NULL) + return(NULL); + +@@ -293,18 +300,18 @@ + synptr->sstype = DONT_KNOW; + synptr->fnum = 0; +- synptr->pos = '\0'; ++ synptr->pos = NULL; + synptr->wcount = 0; +- synptr->words = '\0'; ++ synptr->words = NULL; + synptr->whichword = 0; + synptr->ptrcount = 0; +- synptr->ptrtyp = '\0'; +- synptr->ptroff = '\0'; +- synptr->ppos = '\0'; +- synptr->pto = '\0'; +- synptr->pfrm = '\0'; ++ synptr->ptrtyp = NULL; ++ synptr->ptroff = NULL; ++ synptr->ppos = NULL; ++ synptr->pto = NULL; ++ synptr->pfrm = NULL; + synptr->fcount = 0; +- synptr->frmid = '\0'; +- synptr->frmto = '\0'; +- synptr->defn = '\0'; ++ synptr->frmid = NULL; ++ synptr->frmto = NULL; ++ synptr->defn = NULL; + synptr->key = 0; + synptr->nextss = NULL; +@@ -315,13 +322,10 @@ + synptr->headsense = 0; + +- ptrtok = line; +- + /* looking at offset */ +- ptrtok = strtok(line," \n"); +- synptr->hereiam = atol(ptrtok); ++ synptr->hereiam = strtol(line, &ptrtok, 10); + + /* sanity check - make sure starting file offset matches first field */ + if (synptr->hereiam != loc) { +- sprintf(msgbuf, "WordNet library error: no synset at location %d\n", ++ sprintf(msgbuf, "WordNet library error: no synset at location %lu\n", + loc); + display_message(msgbuf); +@@ -331,18 +335,20 @@ + + /* looking at FNUM */ +- ptrtok = strtok(NULL," \n"); +- synptr->fnum = atoi(ptrtok); ++ synptr->fnum = strtol(ptrtok + 1, &ptrtok, 10); + + /* looking at POS */ +- ptrtok = strtok(NULL, " \n"); +- synptr->pos = malloc(strlen(ptrtok) + 1); ++ ptrtok++; ++ len = strpbrk(ptrtok, " \n") - ptrtok; ++ synptr->pos = malloc(len + 1); + assert(synptr->pos); +- strcpy(synptr->pos, ptrtok); ++ memcpy(synptr->pos, ptrtok, len); ++ synptr->pos[len] = '\0'; ++ ptrtok += len; + if (getsstype(synptr->pos) == SATELLITE) + synptr->sstype = INDIRECT_ANT; + + /* looking at numwords */ +- ptrtok = strtok(NULL, " \n"); +- synptr->wcount = strtol(ptrtok, NULL, 16); ++ synptr->wcount = strtol(ptrtok, &ptrtok, 16); ++ ptrtok++; + + synptr->words = (char **)malloc(synptr->wcount * sizeof(char *)); +@@ -354,40 +360,42 @@ + + for (i = 0; i < synptr->wcount; i++) { +- ptrtok = strtok(NULL, " \n"); +- synptr->words[i] = malloc(strlen(ptrtok) + 1); ++ len = strpbrk(ptrtok, " \n") - ptrtok; ++ synptr->words[i] = malloc(len + 1); + assert(synptr->words[i]); +- strcpy(synptr->words[i], ptrtok); ++ memcpy(synptr->words[i], ptrtok, len); ++ synptr->words[i][len] = '\0'; + + /* is this the word we're looking for? */ + +- if (word && !strcmp(word,strtolower(ptrtok))) ++ if (word && !strcmp(word, synptr->words[i])) + synptr->whichword = i+1; + +- ptrtok = strtok(NULL, " \n"); +- sscanf(ptrtok, "%x", &synptr->lexid[i]); ++ ptrtok += len; ++ synptr->lexid[i] = strtol(ptrtok, &ptrtok, 16); ++ ptrtok++; + } + + /* get the pointer count */ +- ptrtok = strtok(NULL," \n"); +- synptr->ptrcount = atoi(ptrtok); ++ synptr->ptrcount = strtol(ptrtok, &ptrtok, 10); ++ ptrtok++; + + if (synptr->ptrcount) { + + /* alloc storage for the pointers */ +- synptr->ptrtyp = (int *)malloc(synptr->ptrcount * sizeof(int)); ++ synptr->ptrtyp = malloc(synptr->ptrcount * sizeof(int)); + assert(synptr->ptrtyp); +- synptr->ptroff = (long *)malloc(synptr->ptrcount * sizeof(long)); ++ synptr->ptroff = malloc(synptr->ptrcount * sizeof(unsigned long)); + assert(synptr->ptroff); +- synptr->ppos = (int *)malloc(synptr->ptrcount * sizeof(int)); ++ synptr->ppos = malloc(synptr->ptrcount * sizeof(int)); + assert(synptr->ppos); +- synptr->pto = (int *)malloc(synptr->ptrcount * sizeof(int)); ++ synptr->pto = malloc(synptr->ptrcount * sizeof(short)); + assert(synptr->pto); +- synptr->pfrm = (int *)malloc(synptr->ptrcount * sizeof(int)); ++ synptr->pfrm = malloc(synptr->ptrcount * sizeof(short)); + assert(synptr->pfrm); + + for(i = 0; i < synptr->ptrcount; i++) { + /* get the pointer type */ +- ptrtok = strtok(NULL," \n"); +- synptr->ptrtyp[i] = getptrtype(ptrtok); ++ synptr->ptrtyp[i] = getptrtype(ptrtok, &ptrtok); ++ ptrtok++; + /* For adjectives, set the synset type if it has a direct + antonym */ +@@ -400,23 +408,19 @@ + + /* get the pointer offset */ +- ptrtok = strtok(NULL," \n"); +- synptr->ptroff[i] = atol(ptrtok); ++ synptr->ptroff[i] = strtol(ptrtok, &ptrtok, 10); ++ ptrtok++; + + /* get the pointer part of speech */ +- ptrtok = strtok(NULL, " \n"); + synptr->ppos[i] = getpos(ptrtok); + + /* get the lexp to/from restrictions */ +- ptrtok = strtok(NULL," \n"); +- +- tmpptr = ptrtok; +- strncpy(wdnum, tmpptr, 2); ++ ++ ptrtok = strpbrk(ptrtok, " \n") + 1; ++ strncpy(wdnum, ptrtok, 2); + wdnum[2] = '\0'; +- synptr->pfrm[i] = strtol(wdnum, (char **)NULL, 16); ++ synptr->pfrm[i] = strtoul(wdnum, NULL, 16); + +- tmpptr += 2; +- strncpy(wdnum, tmpptr, 2); +- wdnum[2] = '\0'; +- synptr->pto[i] = strtol(wdnum, (char **)NULL, 16); ++ synptr->pto[i] = strtoul(ptrtok + 2, &ptrtok, 16); ++ ptrtok++; /* Something like ``0000 '' */ + } + } +@@ -429,23 +433,22 @@ + /* retireve optional information from verb synset */ + if(dbase == VERB) { +- ptrtok = strtok(NULL," \n"); +- synptr->fcount = atoi(ptrtok); +- ++ synptr->fcount = strtol(ptrtok, &ptrtok, 10); ++ ptrtok++; + /* allocate frame storage */ + +- synptr->frmid = (int *)malloc(synptr->fcount * sizeof(int)); ++ synptr->frmid = malloc(synptr->fcount * sizeof(int)); + assert(synptr->frmid); +- synptr->frmto = (int *)malloc(synptr->fcount * sizeof(int)); ++ synptr->frmto = malloc(synptr->fcount * sizeof(int)); + assert(synptr->frmto); + + for(i=0;ifcount;i++) { + /* skip the frame pointer (+) */ +- ptrtok = strtok(NULL," \n"); ++ ptrtok = strpbrk(ptrtok, " \n") + 1; + +- ptrtok = strtok(NULL," \n"); +- synptr->frmid[i] = atoi(ptrtok); ++ synptr->frmid[i] = strtol(ptrtok, &ptrtok, 10); ++ ptrtok++; + +- ptrtok = strtok(NULL," \n"); +- synptr->frmto[i] = strtol(ptrtok, NULL, 16); ++ synptr->frmto[i] = strtol(ptrtok, &ptrtok, 16); ++ ptrtok++; + } + } +@@ -453,22 +456,38 @@ + /* get the optional definition */ + +- ptrtok = strtok(NULL," \n"); +- if (ptrtok) { +- ptrtok = strtok(NULL," \n"); +- sprintf(tbuf, ""); +- while (ptrtok != NULL) { +- strcat(tbuf,ptrtok); +- ptrtok = strtok(NULL, " \n"); +- if(ptrtok) +- strcat(tbuf," "); +- } +- assert((1 + strlen(tbuf)) < sizeof(tbuf)); +- synptr->defn = malloc(strlen(tbuf) + 4); ++ ptrtok = strpbrk(ptrtok, " \n") + 1; ++ if (ptrtok && *ptrtok) { ++ char *defn; ++ len = strlen(ptrtok); ++ synptr->defn = malloc(len + 2); + assert(synptr->defn); +- sprintf(synptr->defn,"(%s)",tbuf); ++ synptr->defn[0] = '('; ++ for (defn = synptr->defn + 1; *ptrtok; ptrtok++) { ++ switch (*ptrtok) { ++ case '\n': ++ case ' ': ++ /* skip adjacent and initial blanks: */ ++ if (defn == synptr->defn + 1 || defn[-1] == ' ') ++ continue; ++ do ++ ptrtok++; ++ while (*ptrtok == '\n' || *ptrtok == ' '); ++ if (*ptrtok == '\0') ++ break; /* out of the loop */ ++ *defn++ = ' '; ++ /* FALLTHROUGH */; ++ default: ++ *defn++ = *ptrtok; ++ continue; ++ } ++ break; ++ } ++ *defn++ = ')'; ++ assert(defn - synptr->defn < len + 2); ++ *defn = '\0'; + } + + if (keyindexfp) { /* we have unique keys */ +- sprintf(tmpbuf, "%c:%8.8d", partchars[dbase], synptr->hereiam); ++ sprintf(tmpbuf, "%c:%8.8ld", partchars[dbase], synptr->hereiam); + synptr->key = GetKeyForOffset(tmpbuf); + } +@@ -547,5 +566,5 @@ + /* Recursive search algorithm to trace a pointer tree */ + +-static void traceptrs(SynsetPtr synptr, int ptrtyp, int dbase, int depth) ++static void traceptrs(SynsetPtr synptr, int ptyp, int dbase, int depth) + { + int i; +@@ -559,15 +578,15 @@ + return; + +- if (ptrtyp < 0) { +- ptrtyp = -ptrtyp; ++ if (ptyp < 0) { ++ ptyp = -ptyp; + extraindent = 2; + } + + for (i = 0; i < synptr->ptrcount; i++) { +- if ((ptrtyp == HYPERPTR && (synptr->ptrtyp[i] == HYPERPTR || ++ if ((ptyp == HYPERPTR && (synptr->ptrtyp[i] == HYPERPTR || + synptr->ptrtyp[i] == INSTANCE)) || +- (ptrtyp == HYPOPTR && (synptr->ptrtyp[i] == HYPOPTR || ++ (ptyp == HYPOPTR && (synptr->ptrtyp[i] == HYPOPTR || + synptr->ptrtyp[i] == INSTANCES)) || +- ((synptr->ptrtyp[i] == ptrtyp) && ++ ((synptr->ptrtyp[i] == ptyp) && + ((synptr->pfrm[i] == 0) || + (synptr->pfrm[i] == synptr->whichword)))) { +@@ -634,5 +653,5 @@ + Otherwise, just print the synset pointed to. */ + +- if ((ptrtyp == PERTPTR || ptrtyp == PPLPTR) && ++ if ((ptyp == PERTPTR || ptyp == PPLPTR) && + synptr->pto[i] != 0) { + sprintf(tbuf, " (Sense %d)\n", +@@ -640,5 +659,5 @@ + printsynset(prefix, cursyn, tbuf, DEFOFF, synptr->pto[i], + SKIP_ANTS, PRINT_MARKER); +- if (ptrtyp == PPLPTR) { /* adjective pointing to verb */ ++ if (ptyp == PPLPTR) { /* adjective pointing to verb */ + printsynset(" =>", cursyn, "\n", + DEFON, ALLWORDS, PRINT_ANTS, PRINT_MARKER); +@@ -656,5 +675,5 @@ + traceptrs(cursyn, HYPERPTR, getpos(cursyn->pos), 0); + } +- } else if (ptrtyp == ANTPTR && dbase != ADJ && synptr->pto[i] != 0) { ++ } else if (ptyp == ANTPTR && dbase != ADJ && synptr->pto[i] != 0) { + sprintf(tbuf, " (Sense %d)\n", + cursyn->wnsns[synptr->pto[i] - 1]); +@@ -670,10 +689,10 @@ + printed in buffer so results can be truncated later. */ + +- if (ptrtyp >= ISMEMBERPTR && ptrtyp <= HASPARTPTR) ++ if (ptyp >= ISMEMBERPTR && ptyp <= HASPARTPTR) + lastholomero = strlen(searchbuffer); + + if(depth) { + depth = depthcheck(depth, cursyn); +- traceptrs(cursyn, ptrtyp, getpos(cursyn->pos), (depth+1)); ++ traceptrs(cursyn, ptyp, getpos(cursyn->pos), (depth+1)); + + free_synset(cursyn); +@@ -684,5 +703,6 @@ + } + +-static void tracecoords(SynsetPtr synptr, int ptrtyp, int dbase, int depth) ++static void ++tracecoords(SynsetPtr synptr, int ptyp, int depth) + { + int i; +@@ -709,9 +729,9 @@ + SKIP_ANTS, PRINT_MARKER); + +- traceptrs(cursyn, ptrtyp, getpos(cursyn->pos), depth); ++ traceptrs(cursyn, ptyp, getpos(cursyn->pos), depth); + + if(depth) { + depth = depthcheck(depth, cursyn); +- tracecoords(cursyn, ptrtyp, getpos(cursyn->pos), (depth+1)); ++ tracecoords(cursyn, ptyp, (depth+1)); + free_synset(cursyn); + } else +@@ -721,9 +741,10 @@ + } + +-static void traceclassif(SynsetPtr synptr, int dbase, int search) ++static void ++traceclassif(SynsetPtr synptr, int search) + { + int i, j, idx; + SynsetPtr cursyn; +- long int prlist[1024]; ++ unsigned int prlist[1024]; + char head[60]; + int svwnsnsflag; +@@ -789,9 +810,12 @@ + } + +-static void tracenomins(SynsetPtr synptr, int dbase) ++static void ++tracenomins(SynsetPtr synptr) + { + int i, j, idx; + SynsetPtr cursyn; ++#ifdef FOOP + long int prlist[1024]; ++#endif + char prefix[40], tbuf[20]; + +@@ -823,16 +847,20 @@ + SKIP_ANTS, SKIP_MARKER); + ++#ifdef FOOP + /* only print synset once, even if more than one link */ + + for (j = 0; j < idx; j++) { +-#ifdef FOOP + if (synptr->ptroff[i] == prlist[j]) { + break; + } +-#endif + } ++#else ++ j = idx; ++#endif + + if (j == idx) { ++#ifdef FOOP + prlist[idx++] = synptr->ptroff[i]; ++#endif + printspaces(TRACEP, 2); + printsynset("=> ", cursyn, "\n", DEFON, ALLWORDS, +@@ -848,5 +876,6 @@ + and PART info. */ + +-static void traceinherit(SynsetPtr synptr, int ptrbase, int dbase, int depth) ++static void ++traceinherit(SynsetPtr synptr, int ptrbase, int depth) + { + int i; +@@ -879,5 +908,5 @@ + if(depth) { + depth = depthcheck(depth, cursyn); +- traceinherit(cursyn, ptrbase, getpos(cursyn->pos), (depth+1)); ++ traceinherit(cursyn, ptrbase, depth + 1); + free_synset(cursyn); + } else +@@ -890,10 +919,10 @@ + } + +-static void partsall(SynsetPtr synptr, int ptrtyp) ++static void partsall(SynsetPtr synptr, int ptyp) + { + int ptrbase; + int i, hasptr = 0; + +- ptrbase = (ptrtyp == HMERONYM) ? HASMEMBERPTR : ISMEMBERPTR; ++ ptrbase = (ptyp == HMERONYM) ? HASMEMBERPTR : ISMEMBERPTR; + + /* First, print out the MEMBER, STUFF, PART info for this synset */ +@@ -912,8 +941,8 @@ + HMERONYM search only */ + +-/* if (hasptr && ptrtyp == HMERONYM) { */ +- if (ptrtyp == HMERONYM) { ++/* if (hasptr && ptyp == HMERONYM) { */ ++ if (ptyp == HMERONYM) { + lastholomero = strlen(searchbuffer); +- traceinherit(synptr, ptrbase, NOUN, 1); ++ traceinherit(synptr, ptrbase, 1); + } + } +@@ -971,5 +1000,5 @@ + } + } else +- printantsynset(antptr, "\n", anttype, DEFON); ++ printantsynset(antptr, "\n", DEFON); + + free_synset(antptr); +@@ -984,11 +1013,13 @@ + /* Fetch the given example sentence from the example file and print it out */ + +-void getexample(char *offset, char *wd) ++static void ++getexample(const char *offset, const char *wd) + { +- char *line; ++ const char *line; + char sentbuf[512]; + + if (vsentfilefp != NULL) { +- if (line = bin_search(offset, vsentfilefp)) { ++ line = bin_search(offset, vsentfilefp); ++ if (line) { + while(*line != ' ') + line++; +@@ -1005,5 +1036,6 @@ + int findexample(SynsetPtr synptr) + { +- char tbuf[256], *temp, *offset; ++ char tbuf[256]; ++ const char *temp, *offset; + int wdnum; + int found = 0; +@@ -1103,17 +1135,17 @@ + } + +-static void freq_word(IndexPtr index) ++static void freq_word(IndexPtr idx) + { + int familiar=0; + int cnt; +- static char *a_an[] = { ++ static const char *a_an[] = { + "", "a noun", "a verb", "an adjective", "an adverb" }; +- static char *freqcats[] = { ++ static const char *freqcats[] = { + "extremely rare","very rare","rare","uncommon","common", + "familiar","very familiar","extremely familiar" + }; + +- if(index) { +- cnt = index->sense_cnt; ++ if(idx) { ++ cnt = idx->sense_cnt; + if (cnt == 0) familiar = 0; + if (cnt == 1) familiar = 1; +@@ -1127,10 +1159,11 @@ + sprintf(tmpbuf, + "\n%s used as %s is %s (polysemy count = %d)\n", +- index->wd, a_an[getpos(index->pos)], freqcats[familiar], cnt); ++ idx->wd, a_an[getpos(idx->pos)], freqcats[familiar], cnt); + printbuffer(tmpbuf); + } + } + +-void wngrep (char *word_passed, int pos) { ++static void ++wngrep(const char *word_passed, int pos) { + FILE *inputfile; + char word[256]; +@@ -1243,5 +1276,5 @@ + for (k = 0; k < idx->off_cnt; k++) { + if (synset->ptroff[j] == idx->offset[k]) { +- add_relatives(VERB, idx, i, k); ++ add_relatives(i, k); + break; + } +@@ -1253,8 +1286,9 @@ + } + +-static void add_relatives(int pos, IndexPtr idx, int rel1, int rel2) ++static void ++add_relatives(int rel1, int rel2) + { + int i; +- struct relgrp *rel, *last, *r; ++ struct relgrp *rel, *last = NULL, *r; + + /* If either of the new relatives are already in a relative group, +@@ -1356,5 +1390,6 @@ + */ + +-char *findtheinfo(char *searchstr, int dbase, int ptrtyp, int whichsense) ++const char * ++findtheinfo(const char *searchstr, int dbase, int ptyp, int whichsense) + { + SynsetPtr cursyn; +@@ -1364,5 +1399,5 @@ + char *bufstart; + unsigned long offsets[MAXSENSE]; +- int skipit; ++ int skipit = 0; + + /* Initializations - +@@ -1379,5 +1414,5 @@ + offsets[i] = 0; + +- switch (ptrtyp) { ++ switch (ptyp) { + case OVERVIEW: + WNOverview(searchstr, dbase); +@@ -1408,6 +1443,6 @@ + + /* If negative search type, set flag for recursive search */ +- if (ptrtyp < 0) { +- ptrtyp = -ptrtyp; ++ if (ptyp < 0) { ++ ptyp = -ptyp; + depth = 1; + } +@@ -1445,5 +1480,5 @@ + offsets[offsetcnt++] = idx->offset[sense]; + cursyn = read_synset(dbase, idx->offset[sense], idx->wd); +- switch(ptrtyp) { ++ switch(ptyp) { + case ANTPTR: + if(dbase == ADJ) +@@ -1454,5 +1489,5 @@ + + case COORDS: +- tracecoords(cursyn, HYPOPTR, dbase, depth); ++ tracecoords(cursyn, HYPOPTR, depth); + break; + +@@ -1487,5 +1522,5 @@ + #ifdef FOOP + case PPLPTR: +- traceptrs(cursyn, ptrtyp, dbase, depth); ++ traceptrs(cursyn, ptyp, dbase, depth); + traceptrs(cursyn, PPLPTR, dbase, depth); + break; +@@ -1498,5 +1533,5 @@ + prflag = 1; + +- traceptrs(cursyn, ptrtyp, dbase, depth); ++ traceptrs(cursyn, ptyp, dbase, depth); + + if (dbase == ADJ) { +@@ -1522,14 +1557,14 @@ + + case DERIVATION: +- tracenomins(cursyn, dbase); ++ tracenomins(cursyn); + break; + + case CLASSIFICATION: + case CLASS: +- traceclassif(cursyn, dbase, ptrtyp); ++ traceclassif(cursyn, ptyp); + break; + + default: +- traceptrs(cursyn, ptrtyp, dbase, depth); ++ traceptrs(cursyn, ptyp, dbase, depth); + break; + +@@ -1600,5 +1635,6 @@ + } + +-SynsetPtr findtheinfo_ds(char *searchstr, int dbase, int ptrtyp, int whichsense) ++SynsetPtr ++findtheinfo_ds(char *searchstr, int dbase, int ptyp, int whichsense) + { + IndexPtr idx; +@@ -1616,6 +1652,6 @@ + newsense = 1; + +- if(ptrtyp < 0) { +- ptrtyp = -ptrtyp; ++ if(ptyp < 0) { ++ ptyp = -ptyp; + depth = 1; + } +@@ -1642,8 +1678,6 @@ + newsense = 0; + +- cursyn->searchtype = ptrtyp; +- cursyn->ptrlist = traceptrs_ds(cursyn, ptrtyp, +- getpos(cursyn->pos), +- depth); ++ cursyn->searchtype = ptyp; ++ cursyn->ptrlist = traceptrs_ds(cursyn, ptyp, depth); + + lastsyn = cursyn; +@@ -1656,5 +1690,5 @@ + wnresults.numforms++; + +- if (ptrtyp == COORDS) { /* clean up by removing hypernym */ ++ if (ptyp == COORDS) { /* clean up by removing hypernym */ + lastsyn = synlist->ptrlist; + synlist->ptrlist = lastsyn->ptrlist; +@@ -1669,5 +1703,6 @@ + in linked list of data structures. */ + +-SynsetPtr traceptrs_ds(SynsetPtr synptr, int ptrtyp, int dbase, int depth) ++SynsetPtr ++traceptrs_ds(SynsetPtr synptr, int ptyp, int depth) + { + int i; +@@ -1693,9 +1728,9 @@ + } + +- if (ptrtyp == COORDS) { ++ if (ptyp == COORDS) { + tstptrtyp = HYPERPTR; + docoords = 1; + } else { +- tstptrtyp = ptrtyp; ++ tstptrtyp = ptyp; + docoords = 0; + } +@@ -1707,5 +1742,5 @@ + + cursyn=read_synset(synptr->ppos[i], synptr->ptroff[i], ""); +- cursyn->searchtype = ptrtyp; ++ cursyn->searchtype = ptyp; + + if (lastsyn) +@@ -1717,9 +1752,7 @@ + if(depth) { + depth = depthcheck(depth, cursyn); +- cursyn->ptrlist = traceptrs_ds(cursyn, ptrtyp, +- getpos(cursyn->pos), +- (depth+1)); ++ cursyn->ptrlist = traceptrs_ds(cursyn, ptyp, (depth+1)); + } else if (docoords) { +- cursyn->ptrlist = traceptrs_ds(cursyn, HYPOPTR, NOUN, 0); ++ cursyn->ptrlist = traceptrs_ds(cursyn, HYPOPTR, 0); + } + } +@@ -1728,10 +1761,12 @@ + } + +-static void WNOverview(char *searchstr, int pos) ++static void ++WNOverview(const char *searchstr, int pos) + { + SynsetPtr cursyn; + IndexPtr idx = NULL; +- char *cpstring = searchstr, *bufstart; +- int sense, i, offsetcnt; ++ const char *cpstring; ++ char *bufstart; ++ int sense_, i, offsetcnt; + int svdflag, skipit; + unsigned long offsets[MAXSENSE]; +@@ -1755,19 +1790,19 @@ + synset with synset offset and/or lexical file information.*/ + +- for (sense = 0; sense < idx->off_cnt; sense++) { ++ for (sense_ = 0; sense_ < idx->off_cnt; sense_++) { + + for (i = 0, skipit = 0; i < offsetcnt && !skipit; i++) +- if (offsets[i] == idx->offset[sense]) ++ if (offsets[i] == idx->offset[sense_]) + skipit = 1; + + if (!skipit) { +- offsets[offsetcnt++] = idx->offset[sense]; +- cursyn = read_synset(pos, idx->offset[sense], idx->wd); ++ offsets[offsetcnt++] = idx->offset[sense_]; ++ cursyn = read_synset(pos, idx->offset[sense_], idx->wd); + if (idx->tagged_cnt != -1 && +- ((sense + 1) <= idx->tagged_cnt)) { ++ ((sense_ + 1) <= idx->tagged_cnt)) { + sprintf(tmpbuf, "%d. (%d) ", +- sense + 1, GetTagcnt(idx, sense + 1)); ++ sense_ + 1, GetTagcnt(idx, sense_ + 1)); + } else { +- sprintf(tmpbuf, "%d. ", sense + 1); ++ sprintf(tmpbuf, "%d. ", sense_ + 1); + } + +@@ -1814,8 +1849,9 @@ + /* Do requested search on synset passed, returning output in buffer. */ + +-char *do_trace(SynsetPtr synptr, int ptrtyp, int dbase, int depth) ++const char * ++do_trace(SynsetPtr synptr, int ptyp, int dbase, int depth) + { + searchbuffer[0] = '\0'; /* clear output buffer */ +- traceptrs(synptr, ptrtyp, dbase, depth); ++ traceptrs(synptr, ptyp, dbase, depth); + return(searchbuffer); + } +@@ -1824,7 +1860,8 @@ + passed and return bit mask. */ + +-unsigned int is_defined(char *searchstr, int dbase) ++unsigned int ++is_defined(const char *searchstr, int dbase) + { +- IndexPtr index; ++ IndexPtr idx; + int i; + unsigned long retval = 0; +@@ -1834,8 +1871,8 @@ + wnresults.searchds = NULL; + +- while ((index = getindex(searchstr, dbase)) != NULL) { ++ while ((idx = getindex(searchstr, dbase)) != NULL) { + searchstr = NULL; /* clear out for next getindex() call */ + +- wnresults.SenseCount[wnresults.numforms] = index->off_cnt; ++ wnresults.SenseCount[wnresults.numforms] = idx->off_cnt; + + /* set bits that must be true for all words */ +@@ -1846,36 +1883,36 @@ + /* go through list of pointer characters and set appropriate bits */ + +- for(i = 0; i < index->ptruse_cnt; i++) { ++ for(i = 0; i < idx->ptruse_cnt; i++) { + +- if (index->ptruse[i] <= LASTTYPE) { +- retval |= bit(index->ptruse[i]); +- } else if (index->ptruse[i] == INSTANCE) { ++ if (idx->ptruse[i] <= LASTTYPE) { ++ retval |= bit(idx->ptruse[i]); ++ } else if (idx->ptruse[i] == INSTANCE) { + retval |= bit(HYPERPTR); +- } else if (index->ptruse[i] == INSTANCES) { ++ } else if (idx->ptruse[i] == INSTANCES) { + retval |= bit(HYPOPTR); + } + +- if (index->ptruse[i] == SIMPTR) { ++ if (idx->ptruse[i] == SIMPTR) { + retval |= bit(ANTPTR); + } + #ifdef FOOP + +- if (index->ptruse[i] >= CLASSIF_START && +- index->ptruse[i] <= CLASSIF_END) { ++ if (idx->ptruse[i] >= CLASSIF_START && ++ idx->ptruse[i] <= CLASSIF_END) { + retval |= bit(CLASSIFICATION); + } + + +- if (index->ptruse[i] >= CLASS_START && +- index->ptruse[i] <= CLASS_END) { ++ if (idx->ptruse[i] >= CLASS_START && ++ idx->ptruse[i] <= CLASS_END) { + retval |= bit(CLASS); + } + #endif + +- if (index->ptruse[i] >= ISMEMBERPTR && +- index->ptruse[i] <= ISPARTPTR) ++ if (idx->ptruse[i] >= ISMEMBERPTR && ++ idx->ptruse[i] <= ISPARTPTR) + retval |= bit(HOLONYM); +- else if (index->ptruse[i] >= HASMEMBERPTR && +- index->ptruse[i] <= HASPARTPTR) ++ else if (idx->ptruse[i] >= HASMEMBERPTR && ++ idx->ptruse[i] <= HASPARTPTR) + retval |= bit(MERONYM); + +@@ -1886,7 +1923,7 @@ + /* check for inherited holonyms and meronyms */ + +- if (HasHoloMero(index, HMERONYM)) ++ if (HasHoloMero(idx, HMERONYM)) + retval |= bit(HMERONYM); +- if (HasHoloMero(index, HHOLONYM)) ++ if (HasHoloMero(idx, HHOLONYM)) + retval |= bit(HHOLONYM); + +@@ -1906,5 +1943,5 @@ + } + +- free_index(index); ++ free_index(idx); + wnresults.numforms++; + } +@@ -1915,5 +1952,6 @@ + meronyms or holonyms. */ + +-static int HasHoloMero(IndexPtr index, int ptrtyp) ++static int ++HasHoloMero(IndexPtr idx, int ptyp) + { + int i, j; +@@ -1922,8 +1960,8 @@ + int ptrbase; + +- ptrbase = (ptrtyp == HMERONYM) ? HASMEMBERPTR : ISMEMBERPTR; ++ ptrbase = (ptyp == HMERONYM) ? HASMEMBERPTR : ISMEMBERPTR; + +- for(i = 0; i < index->off_cnt; i++) { +- synset = read_synset(NOUN, index->offset[i], ""); ++ for(i = 0; i < idx->off_cnt; i++) { ++ synset = read_synset(NOUN, idx->offset[i], ""); + for (j = 0; j < synset->ptrcount; j++) { + if (synset->ptrtyp[j] == HYPERPTR) { +@@ -1941,10 +1979,10 @@ + } + +-static int HasPtr(SynsetPtr synptr, int ptrtyp) ++static int HasPtr(SynsetPtr synptr, int ptyp) + { + int i; + + for(i = 0; i < synptr->ptrcount; i++) { +- if(synptr->ptrtyp[i] == ptrtyp) { ++ if(synptr->ptrtyp[i] == ptyp) { + return(1); + } +@@ -1956,5 +1994,6 @@ + word is not in WordNet. */ + +-unsigned int in_wn(char *word, int pos) ++unsigned int ++in_wn(const char *word, int pos) + { + int i; +@@ -1984,5 +2023,6 @@ + /* Strip off () enclosed comments from a word */ + +-static char *deadjify(char *word) ++static char * ++deadjify(char *word) + { + char *y; +@@ -2014,5 +2054,6 @@ + strtolower(wdbuf); + +- if (idx = index_lookup(wdbuf, getpos(synptr->pos))) { ++ idx = index_lookup(wdbuf, getpos(synptr->pos)); ++ if (idx) { + for (i = 0; i < idx->off_cnt; i++) + if (idx->offset[i] == synptr->hereiam) { +@@ -2025,5 +2066,7 @@ + } + +-static void printsynset(char *head, SynsetPtr synptr, char *tail, int definition, int wdnum, int antflag, int markerflag) ++static void ++printsynset(const char *head, SynsetPtr synptr, const char *tail, ++ int definition, int wdnum, int antflag, int markerflag) + { + int i, wdcnt; +@@ -2038,5 +2081,5 @@ + + if (offsetflag) /* print synset offset */ +- sprintf(tbuf + strlen(tbuf),"{%8.8d} ", synptr->hereiam); ++ sprintf(tbuf + strlen(tbuf),"{%8.8ld} ", synptr->hereiam); + if (fileinfoflag) { /* print lexicographer file information */ + sprintf(tbuf + strlen(tbuf), "<%s> ", lexfiles[synptr->fnum]); +@@ -2063,9 +2106,10 @@ + } + +-static void printantsynset(SynsetPtr synptr, char *tail, int anttype, int definition) ++static void ++printantsynset(SynsetPtr synptr, const char *tail, int definition) + { + int i, wdcnt; + char tbuf[SMLINEBUF]; +- char *str; ++ const char *str; + int first = 1; + +@@ -2073,5 +2117,5 @@ + + if (offsetflag) +- sprintf(tbuf,"{%8.8d} ", synptr->hereiam); ++ sprintf(tbuf,"{%8.8ld} ", synptr->hereiam); + if (fileinfoflag) { + sprintf(tbuf + strlen(tbuf),"<%s> ", lexfiles[synptr->fnum]); +@@ -2113,6 +2157,6 @@ + static void catword(char *buf, SynsetPtr synptr, int wdnum, int adjmarker, int antflag) + { +- static char vs[] = " (vs. %s)"; +- static char *markers[] = { ++ static const char vs[] = " (vs. %s)"; ++ static const char *markers[] = { + "", /* UNKNOWN_MARKER */ + "(predicate)", /* PREDICATIVE */ +@@ -2146,5 +2190,7 @@ + } + +-static char *printant(int dbase, SynsetPtr synptr, int wdnum, char *template, char *tail) ++static const char * ++printant(int dbase, SynsetPtr synptr, int wdnum, ++ const char *template, const char *tail) + { + int i, j, wdoff; +@@ -2200,5 +2246,6 @@ + } + +-static void printbuffer(char *string) ++static void ++printbuffer(const char *string) + { + if (overflag) +@@ -2210,11 +2257,13 @@ + } + +-static void printsns(SynsetPtr synptr, int sense) ++static void ++printsns(SynsetPtr synptr, int sense_) + { +- printsense(synptr, sense); ++ printsense(synptr, sense_); + printsynset("", synptr, "\n", DEFON, ALLWORDS, PRINT_ANTS, PRINT_MARKER); + } + +-static void printsense(SynsetPtr synptr, int sense) ++static void ++printsense(SynsetPtr synptr, int sense_) + { + char tbuf[256]; +@@ -2224,7 +2273,7 @@ + if (fnflag) + sprintf(tbuf,"\nSense %d in file \"%s\"\n", +- sense, lexfiles[synptr->fnum]); ++ sense_, lexfiles[synptr->fnum]); + else +- sprintf(tbuf,"\nSense %d\n", sense); ++ sprintf(tbuf,"\nSense %d\n", sense_); + + printbuffer(tbuf); Property changes on: head/textproc/wordnet/files/patch-lib__search.c ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/textproc/wordnet/files/patch-lib__wnglobal.c =================================================================== --- head/textproc/wordnet/files/patch-lib__wnglobal.c (nonexistent) +++ head/textproc/wordnet/files/patch-lib__wnglobal.c (revision 363336) @@ -0,0 +1,37 @@ +--- lib/wnglobal.c Fri May 6 13:17:39 2005 ++++ lib/wnglobal.c Tue Dec 20 23:29:54 2005 +@@ -11,9 +11,9 @@ + #endif + +-char *wnrelease = "3.0"; ++const char *wnrelease = "3.0"; + + /* Lexicographer file names and numbers */ + +-char *lexfiles[] = { ++const char *lexfiles[] = { + "adj.all", /* 0 */ + "adj.pert", /* 1 */ +@@ -65,5 +65,5 @@ + /* Pointer characters and searches */ + +-char *ptrtyp[]={ ++const char *ptrtyp[] = { + "", /* 0 not used */ + "!", /* 1 ANTPTR */ +@@ -110,11 +110,11 @@ + }; + +-char *partnames[]={ "", "noun", "verb", "adj", "adv", NULL }; +-char partchars[] = " nvara"; /* add char for satellites to end */ +-char *adjclass[] = { "", "(p)", "(a)", "(ip)" }; ++const char *partnames[]={ "", "noun", "verb", "adj", "adv", NULL }; ++const char partchars[] = " nvara"; /* add char for satellites to end */ ++const char *adjclass[] = { "", "(p)", "(a)", "(ip)" }; + + /* Text of verb sentence frames */ + +-char *frametext[] = { ++const char *frametext[] = { + "", + "Something ----s", Property changes on: head/textproc/wordnet/files/patch-lib__wnglobal.c ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/textproc/wordnet/files/patch-lib__wnhelp.c =================================================================== --- head/textproc/wordnet/files/patch-lib__wnhelp.c (nonexistent) +++ head/textproc/wordnet/files/patch-lib__wnhelp.c (revision 363336) @@ -0,0 +1,43 @@ +--- lib/wnhelp.c Fri May 6 13:17:39 2005 ++++ lib/wnhelp.c Wed Dec 21 17:25:27 2005 +@@ -7,4 +7,5 @@ + /* $Id: wnhelp.c,v 1.14 2005/02/01 17:03:46 wn Rel $ */ + ++#define DEFINE_LICENSE + #include "wn.h" + +@@ -239,5 +240,5 @@ + "; + +-static char *nounhelps[] = { ++static const char *nounhelps[] = { + hyper_help, + relatives_help, +@@ -259,5 +260,5 @@ + }; + +-static char *verbhelps[] = { ++static const char *verbhelps[] = { + hyper_help, + relatives_help, +@@ -276,5 +277,5 @@ + }; + +-static char *adjhelps[] = { ++static const char *adjhelps[] = { + /* SIMPTR */ + "Display synonyms and synsets related to synsets containing \n\ +@@ -351,5 +352,5 @@ + }; + +-static char *advhelps[] = { ++static const char *advhelps[] = { + /* SIMPTR */ + "Display synonyms and synsets related to synsets containing \n\ +@@ -370,5 +371,5 @@ + }; + +-char **helptext[NUMPARTS + 1] = { ++const char * const *helptext[NUMPARTS + 1] = { + NULL, nounhelps, verbhelps, adjhelps, advhelps + }; Property changes on: head/textproc/wordnet/files/patch-lib__wnhelp.c ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/textproc/wordnet/files/patch-lib__wnrtl.c =================================================================== --- head/textproc/wordnet/files/patch-lib__wnrtl.c (nonexistent) +++ head/textproc/wordnet/files/patch-lib__wnrtl.c (revision 363336) @@ -0,0 +1,17 @@ +--- lib/wnrtl.c Fri May 6 13:17:39 2005 ++++ lib/wnrtl.c Wed Dec 21 00:21:04 2005 +@@ -8,5 +8,5 @@ + #include "wn.h" + +-static char *Id = "$Id: wnrtl.c,v 1.8 2005/01/27 17:33:54 wn Rel $"; ++__FBSDID("$Id: wnrtl.c,v 1.8 2005/01/27 17:33:54 wn Rel $"); + + /* Search code variables and flags */ +@@ -43,6 +43,5 @@ + Default function provided in library returns -1 */ + +-int default_display_message(char *); +-int (*display_message)(char *) = default_display_message; ++int (*display_message)(const char *) = default_display_message; + + /* Property changes on: head/textproc/wordnet/files/patch-lib__wnrtl.c ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/textproc/wordnet/files/patch-lib__wnutil.c =================================================================== --- head/textproc/wordnet/files/patch-lib__wnutil.c (nonexistent) +++ head/textproc/wordnet/files/patch-lib__wnutil.c (revision 363336) @@ -0,0 +1,286 @@ +--- lib/wnutil.c Fri May 6 13:17:39 2005 ++++ lib/wnutil.c Wed Dec 21 16:04:36 2005 +@@ -15,5 +15,5 @@ + #ifdef __unix__ + #ifndef __MACH__ +-#include ++#include + #endif + #endif +@@ -25,5 +25,5 @@ + #include "wn.h" + +-static int do_init(); ++static int do_init(void); + + static char msgbuf[256]; /* buffer for constructing error messages */ +@@ -37,5 +37,5 @@ + /* Initialization functions */ + +-static void closefps(); ++static void closefps(void); + + int wninit(void) +@@ -46,7 +46,6 @@ + + if (!done) { +- if (env = getenv("WNDBVERSION")) { +- wnrelease = strdup(env); /* set release */ +- assert(wnrelease); ++ if ((env = getenv("WNDBVERSION"))) { ++ wnrelease = env; /* set release */ + } + openerr = do_init(); +@@ -68,7 +67,6 @@ + closefps(); + +- if (env = getenv("WNDBVERSION")) { +- wnrelease = strdup(env); /* set release */ +- assert(wnrelease); ++ if ((env = getenv("WNDBVERSION"))) { ++ wnrelease = env; /* set release */ + } + openerr = do_init(); +@@ -248,4 +246,20 @@ + } + ++char *strtolower2(const char *from, char *to) ++{ ++ ++ char *t = to; ++ ++ do { ++ if(*from >= 'A' && *from <= 'Z') ++ *t = *from++ + 32; ++ else if(*from == '(') ++ *t = '\0'; ++ else ++ *t = *from++; ++ } while (*t++); ++ return(to); ++} ++ + /* Convert string passed to lower case */ + +@@ -276,11 +290,24 @@ + /* Return pointer code for pointer type characer passed. */ + +-int getptrtype(char *ptrstr) ++unsigned short ++getptrtype(const char *ptrstr, char **end) + { +- register int i; ++ unsigned short i; ++ const char *ptype, *pstr; + for(i = 1; i <= MAXPTR; i++) { +- if(!strcmp(ptrstr, ptrtyp[i])) ++ ptype = ptrtyp[i]; ++ pstr = ptrstr; ++ while (*pstr == *ptype && *ptype) { ++ pstr++; ++ ptype++; ++ } ++ if (*ptype == '\0' && ++ (*pstr == '\n' || *pstr == ' ' || *pstr == '\0')) { ++ if (end) ++ *(const void **)end = pstr; + return(i); ++ } + } ++ fprintf(stderr, "Could not find the type of %s\n", ptrstr); + return(0); + } +@@ -288,5 +315,6 @@ + /* Return part of speech code for string passed */ + +-int getpos(char *s) ++int ++getpos(const char *s) + { + switch (*s) { +@@ -310,5 +338,6 @@ + /* Return synset type code for string passed. */ + +-int getsstype(char *s) ++int ++getsstype(const char *s) + { + switch (*s) { +@@ -332,5 +361,6 @@ + /* Pass in string for POS, return corresponding integer value */ + +-int StrToPos(char *str) ++int ++StrToPos(const char *str) + { + if (!strcmp(str, "noun")) +@@ -389,5 +419,6 @@ + /* Return synset for sense key passed. */ + +-SynsetPtr GetSynsetForSense(char *sensekey) ++SynsetPtr ++GetSynsetForSense(const char *sensekey) + { + long offset; +@@ -405,7 +436,8 @@ + /* Find offset of sense key in data file */ + +-long GetDataOffset(char *sensekey) ++long ++GetDataOffset(const char *sensekey) + { +- char *line; ++ const char *line; + + /* Pass in encoded sense string, return byte offset of corresponding +@@ -426,5 +458,6 @@ + /* Find polysemy count for sense key passed. */ + +-int GetPolyCount(char *sensekey) ++int ++GetPolyCount(const char *sensekey) + { + IndexPtr idx; +@@ -443,5 +476,6 @@ + + /* Return word part of sense key */ +-char *GetWORD(char *sensekey) ++const char * ++GetWORD(const char *sensekey) + { + static char word[100]; +@@ -457,5 +491,6 @@ + /* Return POS code for sense key passed. */ + +-int GetPOS(char *sensekey) ++int ++GetPOS(const char *sensekey) + { + int pos; +@@ -470,5 +505,6 @@ + /* Reconstruct synset from synset pointer and return ptr to buffer */ + +-char *FmtSynset(SynsetPtr synptr, int defn) ++const char * ++FmtSynset(SynsetPtr synptr, int defn) + { + int i; +@@ -542,27 +578,8 @@ + } + +-/* Search for string and/or baseform of word in database and return +- index structure for word if found in database. */ +- +-IndexPtr GetValidIndexPointer(char *word, int pos) +-{ +- IndexPtr idx; +- char *morphword; +- +- idx = getindex(word, pos); +- +- if (idx == NULL) { +- if ((morphword = morphstr(word, pos)) != NULL) +- while (morphword) { +- if ((idx = getindex(morphword, pos)) != NULL) break; +- morphword = morphstr(NULL, pos); +- } +- } +- return (idx); +-} +- + /* Return sense number in database for word and lexsn passed. */ + +-int GetWNSense(char *word, char *lexsn) ++int ++GetWNSense(const char *word, const char *lexsn) + { + SnsIndexPtr snsidx; +@@ -578,7 +595,8 @@ + /* Return parsed sense index entry for sense key passed. */ + +-SnsIndexPtr GetSenseIndex(char *sensekey) ++SnsIndexPtr ++GetSenseIndex(const char *sensekey) + { +- char *line; ++ const char *line; + char buf[256], loc[9]; + SnsIndexPtr snsidx = NULL; +@@ -608,5 +626,6 @@ + int GetTagcnt(IndexPtr idx, int sense) + { +- char *sensekey, *line; ++ char *sensekey; ++ const char *line; + char buf[256]; + int snum, cnt = 0; +@@ -632,10 +651,11 @@ + } + +-char *GetOffsetForKey(unsigned int key) ++const char * ++GetOffsetForKey(unsigned int key) + { + unsigned int rkey; + char ckey[7]; + static char loc[11] = ""; +- char *line; ++ const char *line; + char searchdir[256], tmpbuf[256]; + +@@ -657,10 +677,10 @@ + } + +- +-unsigned int GetKeyForOffset(char *loc) ++unsigned int ++GetKeyForOffset(const char *loc) + { + unsigned int key; + char rloc[11] = ""; +- char *line; ++ const char *line; + char searchdir[256], tmpbuf[256]; + +@@ -681,8 +701,9 @@ + } + +-char *SetSearchdir() ++const char * ++SetSearchdir() + { +- static char searchdir[256]; +- char *env; ++ char *searchdir; ++ const char *env; + + /* Find base directory for database. If set, use WNSEARCHDIR. +@@ -690,14 +711,17 @@ + + if ((env = getenv("WNSEARCHDIR")) != NULL) +- strcpy(searchdir, env); +- else if ((env = getenv("WNHOME")) != NULL) ++ return(env); ++ else if ((env = getenv("WNHOME")) != NULL) { ++ searchdir = malloc(strlen(env) + sizeof(DICTDIR)); + sprintf(searchdir, "%s%s", env, DICTDIR); +- else +- strcpy(searchdir, DEFAULTPATH); +- +- return(searchdir); ++ return(searchdir); ++ } else ++ return(DEFAULTPATH); + } + +-int default_display_message(char *msg) ++#ifndef __GNUC__ ++# define __unused ++#endif ++int default_display_message(const char *msg __unused) + { + return(-1); +@@ -727,3 +751,2 @@ + return (loc - strstr_stringstart); + } +- Property changes on: head/textproc/wordnet/files/patch-lib__wnutil.c ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/textproc/wordnet/files/patch-src__stubs.c =================================================================== --- head/textproc/wordnet/files/patch-src__stubs.c (nonexistent) +++ head/textproc/wordnet/files/patch-src__stubs.c (revision 363336) @@ -0,0 +1,316 @@ +--- src/stubs.c.orig 2007-01-04 18:47:55.000000000 +0100 ++++ src/stubs.c 2013-05-22 17:34:59.000000000 +0200 +@@ -11,10 +11,9 @@ + #include + #include + #include +-#include + #include + +-static char *Id = "$Id: stubs.c,v 1.7 2005/04/29 19:01:57 wn Exp $"; ++__FBSDID("$Id: stubs.c,v 1.7 2005/04/29 19:01:57 wn Exp $"); + + static char resultbuf[SEARCHBUF]; + +@@ -33,26 +32,26 @@ + ** the search word's base form. + */ + +-int wn_findvalidsearches (ClientData clientData, Tcl_Interp *interp, +- int argc, char *argv[]) { ++static int ++wn_findvalidsearches (ClientData clientData, Tcl_Interp *interp, ++ int argc, Tcl_Obj * const objv[]) { + unsigned int bitfield; +- static char bitfieldstr[32]; +- char *morph; ++ const char *morph; + int pos; + if (argc != 3) { +- interp -> result = +- "usage: findvalidsearches searchword partofspeechnum"; ++ Tcl_WrongNumArgs(interp, 1, objv, ++ "findvalidsearches searchword partofspeechnum"); + return TCL_ERROR; + } +- pos = atoi (argv[2]); +- bitfield = is_defined (argv[1], pos); +- if ((morph = morphstr (argv[1], pos)) != NULL) { ++ if (Tcl_GetIntFromObj(interp, objv[2], &pos) != TCL_OK) ++ return TCL_ERROR; ++ bitfield = is_defined (Tcl_GetString(objv[1]), pos); ++ if ((morph = morphstr (Tcl_GetString(objv[1]), pos)) != NULL) { + do { + bitfield |= is_defined (morph, pos); + } while ((morph = morphstr (NULL, pos)) != NULL); + } +- sprintf (bitfieldstr, "%u", bitfield); +- interp -> result = bitfieldstr; ++ Tcl_SetObjResult(interp, Tcl_NewIntObj(bitfield)); + return TCL_OK; + } + +@@ -63,19 +62,17 @@ + ** the results of findvalidsearches. Invoked from Tcl as "bit". + */ + +-int wn_bit (ClientData clientData, Tcl_Interp *interp, +- int argc, char *argv[]) { +- unsigned int bitfield; +- static char bitfieldstr[32]; ++static int ++wn_bit (ClientData clientData, Tcl_Interp *interp, ++ int argc, Tcl_Obj * const objv[]) { + int whichbit; + if (argc != 2) { +- interp -> result = "usage: bit bitnum"; ++ Tcl_WrongNumArgs(interp, 1, objv, "bitnum"); + return TCL_ERROR; + } +- whichbit = atoi (argv[1]); +- bitfield = bit (whichbit); +- sprintf (bitfieldstr, "%u", bitfield); +- interp -> result = bitfieldstr; ++ if (Tcl_GetIntFromObj(interp, objv[1], &whichbit) != TCL_OK) ++ return TCL_ERROR; ++ Tcl_SetObjResult(interp, Tcl_NewIntObj(bit(whichbit))); + return TCL_OK; + } + +@@ -84,13 +81,13 @@ + ** It is invoked from Tcl simply as "search". + */ + +-int wn_search (ClientData clientData, Tcl_Interp *interp, +- int argc, char *argv[]) { ++static int ++wn_search (ClientData clientData, Tcl_Interp *interp, ++ int argc, const char * argv[]) { + int pos, searchtype, sense; +- char *morph; ++ const char *morph; + if (argc != 5) { +- interp -> result = +- "usage: search searchword partofspeechnum searchtypenum sensenum"; ++ Tcl_SetObjResult(interp, Tcl_NewStringObj ("usage: search searchword partofspeechnum searchtypenum sensenum", -1)); + return TCL_ERROR; + } + pos = atoi (argv[2]); +@@ -102,7 +99,7 @@ + strcat (resultbuf, findtheinfo (morph, pos, searchtype, sense)); + } while ((morph = morphstr (NULL, pos)) != NULL); + } +- interp -> result = resultbuf; ++ Tcl_SetObjResult(interp, Tcl_NewStringObj(resultbuf, -1)); + return TCL_OK; + } + +@@ -111,10 +108,11 @@ + ** results. + */ + +-int wn_glosses (ClientData clientData, Tcl_Interp *interp, +- int argc, char *argv[]) { ++static int ++wn_glosses (ClientData clientData, Tcl_Interp *interp, ++ int argc, const char *argv[]) { + if (argc != 2) { +- interp -> result = "usage: glosses [1 | 0]"; ++ Tcl_SetObjResult(interp, Tcl_NewStringObj("usage: glosses [1 | 0]", -1)); + return TCL_ERROR; + } + dflag = atoi (argv[1]); +@@ -126,10 +124,11 @@ + ** results. + */ + +-int wn_fileinfo (ClientData clientData, Tcl_Interp *interp, +- int argc, char *argv[]) { ++static int ++wn_fileinfo (ClientData clientData, Tcl_Interp *interp, ++ int argc, const char *argv[]) { + if (argc != 2) { +- interp -> result = "usage: fileinfo [1 | 0]"; ++ Tcl_SetObjResult(interp, Tcl_NewStringObj("usage: fileinfo [1 | 0]", -1)); + return TCL_ERROR; + } + fileinfoflag = atoi (argv[1]); +@@ -141,10 +140,11 @@ + ** in the search results. + */ + +-int wn_byteoffset (ClientData clientData, Tcl_Interp *interp, +- int argc, char *argv[]) { ++static int ++wn_byteoffset (ClientData clientData, Tcl_Interp *interp, ++ int argc, const char *argv[]) { + if (argc != 2) { +- interp -> result = "usage: byteoffset [1 | 0]"; ++ Tcl_SetObjResult(interp, Tcl_NewStringObj("usage: byteoffset [1 | 0]", -1)); + return TCL_ERROR; + } + offsetflag = atoi (argv[1]); +@@ -156,13 +156,17 @@ + ** returned. + */ + +-int wn_senseflag (ClientData clientData, Tcl_Interp *interp, +- int argc, char *argv[]) { ++static int ++wn_senseflag (ClientData clientData, Tcl_Interp *interp, ++ int argc, Tcl_Obj * const objv[]) { + if (argc != 2) { +- interp -> result = "usage: senseflag [1 | 0]"; ++ Tcl_WrongNumArgs(interp, 0, objv, "?1|0?"); + return TCL_ERROR; + } +- wnsnsflag = atoi (argv[1]); ++ if (Tcl_GetBooleanFromObj(interp, objv[1], &argc) != TCL_OK) ++ return TCL_ERROR; ++ ++ wnsnsflag = argc; /* argc got recycled here */ + return TCL_OK; + } + +@@ -171,26 +175,30 @@ + ** type of search does. + */ + +-int wn_contextualhelp (ClientData clientData, Tcl_Interp *interp, +- int argc, char *argv[]) { ++static int ++wn_contextualhelp (ClientData clientData, Tcl_Interp *interp, ++ int argc, Tcl_Obj * const objv[]) { + int pos, searchtype; + if (argc != 3) { +- interp -> result = "usage: contextualhelp partofspeechnum searchtypenum"; ++ Tcl_SetObjResult(interp, Tcl_NewStringObj("usage: contextualhelp partofspeechnum searchtypenum", -1)); + return TCL_ERROR; + } +- pos = atoi (argv[1]); +- searchtype = atoi (argv[2]); +- interp -> result = helptext[pos][searchtype]; ++ if (Tcl_GetIntFromObj(interp, objv[1], &pos) != TCL_OK || ++ Tcl_GetIntFromObj(interp, objv[2], &searchtype) != TCL_OK) ++ return TCL_ERROR; ++ /* Dropping const-ness below is Ok, because TCL_STATIC tells Tcl to DTRT */ ++ Tcl_SetResult(interp, (char *)helptext[pos][searchtype], TCL_STATIC); + return TCL_OK; + } + + /* This command, accessed in Tcl as "reopendb" reopens the WordNet database. + */ + +-int wn_reopendb (ClientData clientData, Tcl_Interp *interp, +- int argc, char *argv[]) { ++static int ++wn_reopendb (ClientData clientData, Tcl_Interp *interp, ++ int argc, Tcl_Obj * const objv[]) { + if (argc != 1) { +- interp -> result = "usage: reopendb"; ++ Tcl_SetObjResult(interp, Tcl_NewStringObj("usage: reopendb", -1)); + return TCL_ERROR; + } + re_wninit (); +@@ -201,22 +209,40 @@ + ** stop whatever search it is currently in the middle of performing. + */ + +-int wn_abortsearch (ClientData clientData, Tcl_Interp *interp, +- int argc, char *argv[]) { ++static int ++wn_abortsearch (ClientData clientData, Tcl_Interp *interp, ++ int argc, Tcl_Obj * const objv[]) { + if (argc != 1) { +- interp -> result = "usage: abortsearch"; ++ Tcl_SetObjResult(interp, Tcl_NewStringObj("usage: abortsearch", -1)); + return TCL_ERROR; + } + abortsearch = 1; + return TCL_OK; + } + ++/* Return text of the license. The license is compiled in anyway, so ++** there is not point in keeping another copy in a separate file. ++*/ ++static int ++wn_license(ClientData clientData, Tcl_Interp *interp, ++ int objc, Tcl_Obj * const objv[]) { ++ if (objc != 1) { ++ Tcl_WrongNumArgs(interp, 0, objv, "no arguments"); ++ return TCL_ERROR; ++ } ++ /* Dropping the const is Ok, as we supply TCL_STATIC to TCL API */ ++ Tcl_SetResult(interp, (char *)license, TCL_STATIC); ++ return TCL_OK; ++} ++ ++ + /* This is a callback function invoked by the WordNet search engine every so + ** often, to allow the interface to respond to events (especially the pressing + ** of a stop button) during the search. + */ + +-void tkwn_doevents (void) { ++static void ++tkwn_doevents (void) { + while (Tcl_DoOneEvent (TCL_WINDOW_EVENTS | TCL_DONT_WAIT) != 0) {} + } + +@@ -225,13 +251,14 @@ + ** specific, since it uses the native error reporting mechanism. + */ + +-int tkwn_displayerror (char *msg) { ++static int ++tkwn_displayerror (const char *msg) { + #ifdef _WINDOWS + MessageBeep (MB_ICONEXCLAMATION); + MessageBox (NULL, msg, "WordNet Library Error", + MB_ICONEXCLAMATION | MB_OK | MB_TASKMODAL | MB_SETFOREGROUND); + #else +- fprintf (stderr, "%s", msg); ++ fputs(msg, stderr); + #endif + return -1; + } +@@ -245,26 +272,27 @@ + interface_doevents_func = tkwn_doevents; + display_message = tkwn_displayerror; + wninit (); +- Tcl_CreateCommand (interp, "findvalidsearches", (void *) ++ Tcl_CreateObjCommand (interp, "findvalidsearches", + wn_findvalidsearches, (ClientData) NULL, (Tcl_CmdDeleteProc *) NULL); +- Tcl_CreateCommand (interp, "bit", (void *) wn_bit, (ClientData) NULL, ++ Tcl_CreateObjCommand (interp, "bit", wn_bit, (ClientData) NULL, + (Tcl_CmdDeleteProc *) NULL); +- Tcl_CreateCommand (interp, "search", (void *) wn_search, (ClientData) ++ Tcl_CreateCommand (interp, "search", wn_search, (ClientData) + NULL, (Tcl_CmdDeleteProc *) NULL); +- Tcl_CreateCommand (interp, "glosses", (void *) wn_glosses, (ClientData) ++ Tcl_CreateCommand (interp, "glosses", wn_glosses, (ClientData) + NULL, (Tcl_CmdDeleteProc *) NULL); +- Tcl_CreateCommand (interp, "fileinfo", (void *) wn_fileinfo, (ClientData) ++ Tcl_CreateCommand (interp, "fileinfo", wn_fileinfo, (ClientData) + NULL, (Tcl_CmdDeleteProc *) NULL); +- Tcl_CreateCommand (interp, "byteoffset", (void *) wn_byteoffset, ++ Tcl_CreateCommand (interp, "byteoffset", wn_byteoffset, + (ClientData) NULL, (Tcl_CmdDeleteProc *) NULL); +- Tcl_CreateCommand (interp, "senseflag", (void *) wn_senseflag, ++ Tcl_CreateObjCommand (interp, "senseflag", wn_senseflag, + (ClientData) NULL, (Tcl_CmdDeleteProc *) NULL); +- Tcl_CreateCommand (interp, "contextualhelp", (void *) wn_contextualhelp, ++ Tcl_CreateObjCommand (interp, "contextualhelp", wn_contextualhelp, + (ClientData) NULL, (Tcl_CmdDeleteProc *) NULL); +- Tcl_CreateCommand (interp, "reopendb", (void *) wn_reopendb, (ClientData) ++ Tcl_CreateObjCommand (interp, "reopendb", wn_reopendb, (ClientData) + NULL, (Tcl_CmdDeleteProc *) NULL); +- Tcl_CreateCommand (interp, "abortsearch", (void *) wn_abortsearch, ++ Tcl_CreateObjCommand (interp, "abortsearch", wn_abortsearch, + (ClientData) NULL, (Tcl_CmdDeleteProc *) NULL); +- return TCL_OK; ++ Tcl_CreateObjCommand (interp, "wnlicense", wn_license, ++ (ClientData) NULL, (Tcl_CmdDeleteProc *) NULL); ++ return Tcl_PkgProvide(interp, "Wordnet", "3.0"); + } +- Property changes on: head/textproc/wordnet/files/patch-src__stubs.c ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/textproc/wordnet/files/patch-src__wn.c =================================================================== --- head/textproc/wordnet/files/patch-src__wn.c (nonexistent) +++ head/textproc/wordnet/files/patch-src__wn.c (revision 363336) @@ -0,0 +1,100 @@ +--- src/wn.c Fri May 6 13:29:09 2005 ++++ src/wn.c Wed Dec 21 01:41:13 2005 +@@ -8,14 +8,14 @@ + #include + #include + #include "wn.h" + +-static char *Id = "$Id: wn.c,v 1.13 2005/01/31 19:19:09 wn Rel $"; ++__FBSDID("$Id: wn.c,v 1.13 2005/01/31 19:19:09 wn Rel $"); + + static struct { +- char *option; /* user's search request */ ++ const char *option; /* user's search request */ + int search; /* search to pass findtheinfo() */ + int pos; /* part-of-speech to pass findtheinfo() */ + int helpmsgidx; /* index into help message table */ +- char *label; /* text for search header message */ ++ const char *label; /* text for search header message */ + } *optptr, optlist[] = { + { "-synsa", SIMPTR, ADJ, 0, "Similarity" }, +@@ -83,7 +84,7 @@ + + struct { +- char *template; /* template for generic search message */ +- char *option; /* text for help message */ +- char *helpstr; ++ const char *template; /* template for generic search message */ ++ const char *option; /* text for help message */ ++ const char *helpstr; + } searchstr[] = { /* index by search type type */ + { NULL, NULL, NULL }, +@@ -122,11 +123,11 @@ + }; + +-static int getoptidx(char *), cmdopt(char *); ++static int getoptidx(const char *), cmdopt(const char *); + static int searchwn(int, char *[]); +-static int do_search(char *, int, int, int, char *); ++static int do_search(char *, int, int, int, const char *); + static int do_is_defined(char *); + static void printusage(), printlicense(), +- printsearches(char *, int, unsigned long); +-static int error_message(char *); ++ printsearches(const char *, int, unsigned long); ++static int error_message(const char *); + + main(int argc,char *argv[]) +@@ -214,9 +215,10 @@ + } + +-static int do_search(char *searchword, int pos, int search, int whichsense, +- char *label) ++static int ++do_search(char *searchword, int pos, int search, int whichsense, ++ const char *label) + { + int totsenses = 0; +- char *morphword, *outbuf; ++ const char *morphword, *outbuf; + + outbuf = findtheinfo(searchword, pos, search, whichsense); +@@ -242,5 +244,5 @@ + int i, found = 0; + unsigned int search; +- char *morphword; ++ const char *morphword; + + if (searchword[0] == '-') { +@@ -274,5 +276,6 @@ + } + +-static void printsearches(char *word, int dbase, unsigned long search) ++static void ++printsearches(const char *word, int dbase, unsigned long search) + { + int j; +@@ -316,5 +319,6 @@ + } + +-static int cmdopt(char *str) ++static int ++cmdopt(const char *str) + { + +@@ -332,5 +336,6 @@ + } + +-static int getoptidx(char *searchtype) ++static int ++getoptidx(const char *searchtype) + { + int i; +@@ -343,5 +348,6 @@ + } + +-static int error_message(char *msg) ++static int ++error_message(const char *msg) + { + fprintf(stderr, msg); Property changes on: head/textproc/wordnet/files/patch-src__wn.c ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/textproc/wordnet/files/patch-src__wnb_1 =================================================================== --- head/textproc/wordnet/files/patch-src__wnb_1 (nonexistent) +++ head/textproc/wordnet/files/patch-src__wnb_1 (revision 363336) @@ -0,0 +1,9 @@ +--- src/wnb Sun Feb 22 12:49:56 1998 ++++ src/wnb Sat Feb 26 19:52:42 2000 +@@ -629,2 +626,6 @@ + -text "Based upon an earlier X Window version by\nBrian Gustafson."] \ ++ [label .aboutbox.top.right.textmi \ ++ -anchor w \ ++ -justify left \ ++ -text "Tuned for Tcl8.x and ported to FreeBSD by\nMikhail Teterin."] \ + [label .aboutbox.top.right.text5 \ Property changes on: head/textproc/wordnet/files/patch-src__wnb_1 ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/textproc/wordnet/files/patch-src__wnb_2 =================================================================== --- head/textproc/wordnet/files/patch-src__wnb_2 (nonexistent) +++ head/textproc/wordnet/files/patch-src__wnb_2 (revision 363336) @@ -0,0 +1,57 @@ +This patch makes wnb use man(1) to access its own man-pages instead +of relying on textual copies of them being in the $resourcedir. + +Similarly, it looks for the compiled-in license instead of opening +its textual copy. + +These leave wn.xbm as the only "resource" file, thus removing the need +for a separate resource directory. FreeBSD port installs all -- the +dictionaries and the bitmap into ${PREFIX}/share/WordNet. + + -mi + +--- src/wnb Tue Jun 7 15:19:22 2005 ++++ src/wnb Sun Jan 15 07:42:38 2006 +@@ -103,9 +100,15 @@ + + if {$tcl_platform(platform) == "unix"} { +- if {[lsearch -exact [array names env] WNHOME] == -1} { +- set resourcedir "/usr/local/WordNet-3.0/lib/wnres" +- } else { +- set resourcedir "$env(WNHOME)/lib/wnres" ++ set resourcedirs { ++ /usr/local/WordNet-3.0 ++ /usr/local/WordNet-3.0/lib/wnres ++ } ++ if {[info exists env(WNHOME)]} { ++ lappend resourcedirs $env(WNHOME) $env(WNHOME)/lib/wnres + } ++ foreach resourcedir $resourcedirs { ++ if {[file exists $resourcedir/wn.xbm]} break ++ } ++ unset resourcedirs + set configfile "$env(HOME)/.wnrc" + if [ file exists $configfile ] { +@@ -575,7 +578,19 @@ + .$w.top.text configure \ + -state normal +- set fileid [open $filename "r"] +- set filetext [read $fileid] +- close $fileid ++ switch -glob -- $filename { ++ *.man { ++ set manpage [file tail $filename] ++ set manpage [string range $manpage 0 end-4] ++ set fileid [open "|man $manpage"] ++ } */license.txt { ++ set filetext [wnlicense] ++ } default { ++ set fileid [open $filename] ++ } ++ } ++ if {[info exists fileid]} { ++ set filetext [read $fileid] ++ close $fileid ++ } + regsub -all ".\b" $filetext "" filetext + .$w.top.text insert end $filetext Property changes on: head/textproc/wordnet/files/patch-src__wnb_2 ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/textproc/xerces-c2/files/patch-aa =================================================================== --- head/textproc/xerces-c2/files/patch-aa (revision 363335) +++ head/textproc/xerces-c2/files/patch-aa (nonexistent) @@ -1,144 +0,0 @@ ---- samples/runConfigure.orig Tue Jan 13 19:42:18 2004 -+++ samples/runConfigure Thu Mar 11 17:11:03 2004 -@@ -271,8 +271,13 @@ - ;; - esac - elif test $platform = "freebsd"; then -- threadingLibs="-pthread -lc_r" -- threadingDefines="-D_THREAD_SAFE -DXML_USE_PTHREADS" -+ if test -n "${PTHREAD_LIBS}" ; then -+ threadingLibs="${PTHREAD_LIBS}" -+ threadingDefines="${PTHREAD_CFLAGS} -DXML_USE_PTHREADS" -+ else -+ threadingLibs="-lpthread" -+ threadingDefines="-DXML_USE_PTHREADS" -+ fi - elif test $platform = "netbsd"; then - threadingLibs="-pthread" - threadingDefines="-D_THREAD_SAFE -DXML_USE_PTHREADS" -@@ -390,38 +395,6 @@ - # - BITSTOBUILD=$bitsToBuild - export BITSTOBUILD -- --# --# Special test for libiconv necessity under FreeBSD --# --transcodingLibs="" # by default don't suppose the libiconv is necessary --transcodingDefines="" --if test $platform = "freebsd"; then -- if test -n "${XERCESCROOT}"; then -- # try lookup the configuration results -- . "${XERCESCROOT}/version.incl" -- SOLIBNAME=libxerces-c.so.${SO_TARGET_VERSION}.${SO_TARGET_VERSION_MAJOR} -- if test -f "${XERCESCROOT}/src/xercesc/config.log" ; then -- if grep XML_USE_LIBICONV "${XERCESCROOT}/src/xercesc/config.log" \ -- > /dev/null 2>&1 ; then -- transcodingLibs=" -L/usr/local/lib -liconv " -- transcodingDefines=" -DXML_USE_LIBICONV -I/usr/local/include " -- fi -- elif test -f "${XERCESCROOT}/obj/FREEBSD/IconvFBSDTransService.o" ; then -- if nm "${XERCESCROOT}/obj/FREEBSD/IconvFBSDTransService.o" | \ -- grep iconv_open > /dev/null 2>&1 ; then -- transcodingLibs=" -L/usr/local/lib -liconv " -- transcodingDefines=" -DXML_USE_LIBICONV -I/usr/local/include " -- fi -- elif test -f "${XERCESCROOT}/lib/${SOLIBNAME}" ; then -- if nm "${XERCESCROOT}/lib/${SOLIBNAME}" | \ -- grep iconv_open > /dev/null 2>&1 ; then -- transcodingLibs=" -L/usr/local/lib -liconv " -- transcodingDefines=" -DXML_USE_LIBICONV -I/usr/local/include " -- fi -- fi -- fi --fi - - # - # Set the C compiler and C++ compiler environment variables ---- src/xercesc/runConfigure.orig Wed Feb 4 13:26:44 2004 -+++ src/xercesc/runConfigure Thu Mar 11 17:10:00 2004 -@@ -319,8 +319,13 @@ - ;; - esac - elif test $platform = "freebsd"; then -- threadingLibs="-pthread -lc_r" -+ if test -n "${PTHREAD_LIBS}" ; then -+ threadingLibs="${PTHREAD_LIBS}" -+ threadingDefines="${PTHREAD_CFLAGS} -DXML_USE_PTHREADS" -+ else -+ threadingLibs="-lpthread" - threadingDefines="-D_THREAD_SAFE -DXML_USE_PTHREADS" -+ fi - elif test $platform = "netbsd"; then - threadingLibs="-pthread -lpthread" - threadingDefines="-D_THREAD_SAFE -DXML_USE_PTHREADS" -@@ -467,7 +472,11 @@ - TRANSCODER=Uniconv390 ;; - IconvFBSD) - TRANSCODER=IconvFBSD ; -- transcodingDefines="-DXML_USE_LIBICONV -I/usr/local/include" ;; -+ transcodingDefines="-DXML_USE_LIBICONV -I/usr/local/include" ; -+ if test ${ICONVROOT}o != "o"; then -+ ICONVROOT=/usr/local -+ fi -+ transcodingLibs="-L${ICONVROOT} -L${ICONVROOT}/lib -liconv" ;; - IconvGNU) - TRANSCODER=IconvGNU ; - transcodingDefines="-DXML_USE_GNU_TRANSCODER -I/usr/local/include" ;; ---- tests/runConfigure.orig Thu Mar 11 17:11:09 2004 -+++ tests/runConfigure Thu Mar 11 17:12:03 2004 -@@ -270,8 +270,13 @@ - ;; - esac - elif test $platform = "freebsd"; then -- threadingLibs="-pthread -lc_r" -- threadingDefines="-D_THREAD_SAFE -DXML_USE_PTHREADS" -+ if test -n "${PTHREAD_LIBS}" ; then -+ threadingLibs="${PTHREAD_LIBS}" -+ threadingDefines="${PTHREAD_CFLAGS} -DXML_USE_PTHREADS" -+ else -+ threadingLibs="-lpthread" -+ threadingDefines="-DXML_USE_PTHREADS" -+ fi - elif test $platform = "netbsd"; then - threadingLibs="-pthread" - threadingDefines="-D_THREAD_SAFE -DXML_USE_PTHREADS" -@@ -389,38 +394,6 @@ - # - BITSTOBUILD=$bitsToBuild - export BITSTOBUILD -- --# --# Special test for libiconv necessity under FreeBSD --# --transcodingLibs="" # by default don't suppose the libiconv is necessary --transcodingDefines="" --if test $platform = "freebsd"; then -- if test -n "${XERCESCROOT}"; then -- # try lookup the configuration results -- . "${XERCESCROOT}/version.incl" -- SOLIBNAME=libxerces-c.so.${SO_TARGET_VERSION}.${SO_TARGET_VERSION_MAJOR} -- if test -f "${XERCESCROOT}/src/xercesc/config.log" ; then -- if grep XML_USE_LIBICONV "${XERCESCROOT}/src/xercesc/config.log" \ -- > /dev/null 2>&1 ; then -- transcodingLibs=" -L/usr/local/lib -liconv " -- transcodingDefines=" -DXML_USE_LIBICONV -I/usr/local/include " -- fi -- elif test -f "${XERCESCROOT}/obj/FREEBSD/IconvFBSDTransService.o" ; then -- if nm "${XERCESCROOT}/obj/FREEBSD/IconvFBSDTransService.o" | \ -- grep iconv_open > /dev/null 2>&1 ; then -- transcodingLibs=" -L/usr/local/lib -liconv " -- transcodingDefines=" -DXML_USE_LIBICONV -I/usr/local/include " -- fi -- elif test -f "${XERCESCROOT}/lib/${SOLIBNAME}" ; then -- if nm "${XERCESCROOT}/lib/${SOLIBNAME}" | \ -- grep iconv_open > /dev/null 2>&1 ; then -- transcodingLibs=" -L/usr/local/lib -liconv " -- transcodingDefines=" -DXML_USE_LIBICONV -I/usr/local/include " -- fi -- fi -- fi --fi - - # - # Set the C compiler and C++ compiler environment variables Property changes on: head/textproc/xerces-c2/files/patch-aa ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/textproc/xerces-c2/files/patch-ab =================================================================== --- head/textproc/xerces-c2/files/patch-ab (revision 363335) +++ head/textproc/xerces-c2/files/patch-ab (nonexistent) @@ -1,15 +0,0 @@ ---- obj/Makefile.in.orig Wed Sep 7 11:56:58 2005 -+++ obj/Makefile.in Wed Mar 29 11:50:22 2006 -@@ -235,10 +235,10 @@ - (cd ${DESTDIR}$(PREFIX)/lib; rm -f ${LINK_DEPDOM}.a libxercesdepdom.dll.a; ln -s ${LIBDEPDOM}${SO_TARGET_VERSION}${SHLIBSUFFIX}.a ${LINK_DEPDOM}.a; rm -f libxercesdepdom.dll.a; ln -s ${LIBDEPDOM}${SO_TARGET_VERSION}${SHLIBSUFFIX}.a libxercesdepdom.dll.a) - else - $(CP) ${FQ_REAL_NAME} ${DESTDIR}$(PREFIX)/lib -- (cd ${DESTDIR}$(PREFIX)/lib; rm -f ${SO_NAME}; ln -s ${REAL_NAME} ${SO_NAME}; rm -f ${LINK_NAME}; ln -s ${REAL_NAME} ${LINK_NAME}) -+ (cd ${DESTDIR}$(PREFIX)/lib; rm -f ${SO_NAME}; ln -sf ${REAL_NAME} ${SO_NAME}; rm -f ${LINK_NAME}; ln -sf ${REAL_NAME} ${LINK_NAME}) - - $(CP) ${FQ_REAL_DEPDOM} ${DESTDIR}$(PREFIX)/lib -- (cd ${DESTDIR}$(PREFIX)/lib; rm -f ${SO_DEPDOM}; ln -s ${REAL_DEPDOM} ${SO_DEPDOM}; rm -f ${LINK_DEPDOM}; ln -s ${REAL_DEPDOM} ${LINK_DEPDOM}) -+ (cd ${DESTDIR}$(PREFIX)/lib; rm -f ${SO_DEPDOM}; ln -sf ${REAL_DEPDOM} ${SO_DEPDOM}; rm -f ${LINK_DEPDOM}; ln -sf ${REAL_DEPDOM} ${LINK_DEPDOM}) - endif - ifeq (${PLATFORM},OS390) - $(CP) ${LIBNAME}${VER}${OS390SIDEDECK} ${DESTDIR}$(PREFIX)/lib Property changes on: head/textproc/xerces-c2/files/patch-ab ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/textproc/xerces-c2/files/patch-obj__Makefile.in =================================================================== --- head/textproc/xerces-c2/files/patch-obj__Makefile.in (nonexistent) +++ head/textproc/xerces-c2/files/patch-obj__Makefile.in (revision 363336) @@ -0,0 +1,15 @@ +--- obj/Makefile.in.orig Wed Sep 7 11:56:58 2005 ++++ obj/Makefile.in Wed Mar 29 11:50:22 2006 +@@ -235,10 +235,10 @@ + (cd ${DESTDIR}$(PREFIX)/lib; rm -f ${LINK_DEPDOM}.a libxercesdepdom.dll.a; ln -s ${LIBDEPDOM}${SO_TARGET_VERSION}${SHLIBSUFFIX}.a ${LINK_DEPDOM}.a; rm -f libxercesdepdom.dll.a; ln -s ${LIBDEPDOM}${SO_TARGET_VERSION}${SHLIBSUFFIX}.a libxercesdepdom.dll.a) + else + $(CP) ${FQ_REAL_NAME} ${DESTDIR}$(PREFIX)/lib +- (cd ${DESTDIR}$(PREFIX)/lib; rm -f ${SO_NAME}; ln -s ${REAL_NAME} ${SO_NAME}; rm -f ${LINK_NAME}; ln -s ${REAL_NAME} ${LINK_NAME}) ++ (cd ${DESTDIR}$(PREFIX)/lib; rm -f ${SO_NAME}; ln -sf ${REAL_NAME} ${SO_NAME}; rm -f ${LINK_NAME}; ln -sf ${REAL_NAME} ${LINK_NAME}) + + $(CP) ${FQ_REAL_DEPDOM} ${DESTDIR}$(PREFIX)/lib +- (cd ${DESTDIR}$(PREFIX)/lib; rm -f ${SO_DEPDOM}; ln -s ${REAL_DEPDOM} ${SO_DEPDOM}; rm -f ${LINK_DEPDOM}; ln -s ${REAL_DEPDOM} ${LINK_DEPDOM}) ++ (cd ${DESTDIR}$(PREFIX)/lib; rm -f ${SO_DEPDOM}; ln -sf ${REAL_DEPDOM} ${SO_DEPDOM}; rm -f ${LINK_DEPDOM}; ln -sf ${REAL_DEPDOM} ${LINK_DEPDOM}) + endif + ifeq (${PLATFORM},OS390) + $(CP) ${LIBNAME}${VER}${OS390SIDEDECK} ${DESTDIR}$(PREFIX)/lib Property changes on: head/textproc/xerces-c2/files/patch-obj__Makefile.in ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/textproc/xerces-c2/files/patch-threading =================================================================== --- head/textproc/xerces-c2/files/patch-threading (nonexistent) +++ head/textproc/xerces-c2/files/patch-threading (revision 363336) @@ -0,0 +1,144 @@ +--- samples/runConfigure.orig Tue Jan 13 19:42:18 2004 ++++ samples/runConfigure Thu Mar 11 17:11:03 2004 +@@ -271,8 +271,13 @@ + ;; + esac + elif test $platform = "freebsd"; then +- threadingLibs="-pthread -lc_r" +- threadingDefines="-D_THREAD_SAFE -DXML_USE_PTHREADS" ++ if test -n "${PTHREAD_LIBS}" ; then ++ threadingLibs="${PTHREAD_LIBS}" ++ threadingDefines="${PTHREAD_CFLAGS} -DXML_USE_PTHREADS" ++ else ++ threadingLibs="-lpthread" ++ threadingDefines="-DXML_USE_PTHREADS" ++ fi + elif test $platform = "netbsd"; then + threadingLibs="-pthread" + threadingDefines="-D_THREAD_SAFE -DXML_USE_PTHREADS" +@@ -390,38 +395,6 @@ + # + BITSTOBUILD=$bitsToBuild + export BITSTOBUILD +- +-# +-# Special test for libiconv necessity under FreeBSD +-# +-transcodingLibs="" # by default don't suppose the libiconv is necessary +-transcodingDefines="" +-if test $platform = "freebsd"; then +- if test -n "${XERCESCROOT}"; then +- # try lookup the configuration results +- . "${XERCESCROOT}/version.incl" +- SOLIBNAME=libxerces-c.so.${SO_TARGET_VERSION}.${SO_TARGET_VERSION_MAJOR} +- if test -f "${XERCESCROOT}/src/xercesc/config.log" ; then +- if grep XML_USE_LIBICONV "${XERCESCROOT}/src/xercesc/config.log" \ +- > /dev/null 2>&1 ; then +- transcodingLibs=" -L/usr/local/lib -liconv " +- transcodingDefines=" -DXML_USE_LIBICONV -I/usr/local/include " +- fi +- elif test -f "${XERCESCROOT}/obj/FREEBSD/IconvFBSDTransService.o" ; then +- if nm "${XERCESCROOT}/obj/FREEBSD/IconvFBSDTransService.o" | \ +- grep iconv_open > /dev/null 2>&1 ; then +- transcodingLibs=" -L/usr/local/lib -liconv " +- transcodingDefines=" -DXML_USE_LIBICONV -I/usr/local/include " +- fi +- elif test -f "${XERCESCROOT}/lib/${SOLIBNAME}" ; then +- if nm "${XERCESCROOT}/lib/${SOLIBNAME}" | \ +- grep iconv_open > /dev/null 2>&1 ; then +- transcodingLibs=" -L/usr/local/lib -liconv " +- transcodingDefines=" -DXML_USE_LIBICONV -I/usr/local/include " +- fi +- fi +- fi +-fi + + # + # Set the C compiler and C++ compiler environment variables +--- src/xercesc/runConfigure.orig Wed Feb 4 13:26:44 2004 ++++ src/xercesc/runConfigure Thu Mar 11 17:10:00 2004 +@@ -319,8 +319,13 @@ + ;; + esac + elif test $platform = "freebsd"; then +- threadingLibs="-pthread -lc_r" ++ if test -n "${PTHREAD_LIBS}" ; then ++ threadingLibs="${PTHREAD_LIBS}" ++ threadingDefines="${PTHREAD_CFLAGS} -DXML_USE_PTHREADS" ++ else ++ threadingLibs="-lpthread" + threadingDefines="-D_THREAD_SAFE -DXML_USE_PTHREADS" ++ fi + elif test $platform = "netbsd"; then + threadingLibs="-pthread -lpthread" + threadingDefines="-D_THREAD_SAFE -DXML_USE_PTHREADS" +@@ -467,7 +472,11 @@ + TRANSCODER=Uniconv390 ;; + IconvFBSD) + TRANSCODER=IconvFBSD ; +- transcodingDefines="-DXML_USE_LIBICONV -I/usr/local/include" ;; ++ transcodingDefines="-DXML_USE_LIBICONV -I/usr/local/include" ; ++ if test ${ICONVROOT}o != "o"; then ++ ICONVROOT=/usr/local ++ fi ++ transcodingLibs="-L${ICONVROOT} -L${ICONVROOT}/lib -liconv" ;; + IconvGNU) + TRANSCODER=IconvGNU ; + transcodingDefines="-DXML_USE_GNU_TRANSCODER -I/usr/local/include" ;; +--- tests/runConfigure.orig Thu Mar 11 17:11:09 2004 ++++ tests/runConfigure Thu Mar 11 17:12:03 2004 +@@ -270,8 +270,13 @@ + ;; + esac + elif test $platform = "freebsd"; then +- threadingLibs="-pthread -lc_r" +- threadingDefines="-D_THREAD_SAFE -DXML_USE_PTHREADS" ++ if test -n "${PTHREAD_LIBS}" ; then ++ threadingLibs="${PTHREAD_LIBS}" ++ threadingDefines="${PTHREAD_CFLAGS} -DXML_USE_PTHREADS" ++ else ++ threadingLibs="-lpthread" ++ threadingDefines="-DXML_USE_PTHREADS" ++ fi + elif test $platform = "netbsd"; then + threadingLibs="-pthread" + threadingDefines="-D_THREAD_SAFE -DXML_USE_PTHREADS" +@@ -389,38 +394,6 @@ + # + BITSTOBUILD=$bitsToBuild + export BITSTOBUILD +- +-# +-# Special test for libiconv necessity under FreeBSD +-# +-transcodingLibs="" # by default don't suppose the libiconv is necessary +-transcodingDefines="" +-if test $platform = "freebsd"; then +- if test -n "${XERCESCROOT}"; then +- # try lookup the configuration results +- . "${XERCESCROOT}/version.incl" +- SOLIBNAME=libxerces-c.so.${SO_TARGET_VERSION}.${SO_TARGET_VERSION_MAJOR} +- if test -f "${XERCESCROOT}/src/xercesc/config.log" ; then +- if grep XML_USE_LIBICONV "${XERCESCROOT}/src/xercesc/config.log" \ +- > /dev/null 2>&1 ; then +- transcodingLibs=" -L/usr/local/lib -liconv " +- transcodingDefines=" -DXML_USE_LIBICONV -I/usr/local/include " +- fi +- elif test -f "${XERCESCROOT}/obj/FREEBSD/IconvFBSDTransService.o" ; then +- if nm "${XERCESCROOT}/obj/FREEBSD/IconvFBSDTransService.o" | \ +- grep iconv_open > /dev/null 2>&1 ; then +- transcodingLibs=" -L/usr/local/lib -liconv " +- transcodingDefines=" -DXML_USE_LIBICONV -I/usr/local/include " +- fi +- elif test -f "${XERCESCROOT}/lib/${SOLIBNAME}" ; then +- if nm "${XERCESCROOT}/lib/${SOLIBNAME}" | \ +- grep iconv_open > /dev/null 2>&1 ; then +- transcodingLibs=" -L/usr/local/lib -liconv " +- transcodingDefines=" -DXML_USE_LIBICONV -I/usr/local/include " +- fi +- fi +- fi +-fi + + # + # Set the C compiler and C++ compiler environment variables Property changes on: head/textproc/xerces-c2/files/patch-threading ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/textproc/xerces-c2-devel/files/patch-aa =================================================================== --- head/textproc/xerces-c2-devel/files/patch-aa (revision 363335) +++ head/textproc/xerces-c2-devel/files/patch-aa (nonexistent) @@ -1,144 +0,0 @@ ---- samples/runConfigure.orig Tue Jan 13 19:42:18 2004 -+++ samples/runConfigure Thu Mar 11 17:11:03 2004 -@@ -271,8 +271,13 @@ - ;; - esac - elif test $platform = "freebsd"; then -- threadingLibs="-pthread -lc_r" -- threadingDefines="-D_THREAD_SAFE -DXML_USE_PTHREADS" -+ if test -n "${PTHREAD_LIBS}" ; then -+ threadingLibs="${PTHREAD_LIBS}" -+ threadingDefines="${PTHREAD_CFLAGS} -DXML_USE_PTHREADS" -+ else -+ threadingLibs="-lpthread" -+ threadingDefines="-DXML_USE_PTHREADS" -+ fi - elif test $platform = "netbsd"; then - threadingLibs="-pthread" - threadingDefines="-D_THREAD_SAFE -DXML_USE_PTHREADS" -@@ -390,38 +395,6 @@ - # - BITSTOBUILD=$bitsToBuild - export BITSTOBUILD -- --# --# Special test for libiconv necessity under FreeBSD --# --transcodingLibs="" # by default don't suppose the libiconv is necessary --transcodingDefines="" --if test $platform = "freebsd"; then -- if test -n "${XERCESCROOT}"; then -- # try lookup the configuration results -- . "${XERCESCROOT}/version.incl" -- SOLIBNAME=libxerces-c.so.${SO_TARGET_VERSION}.${SO_TARGET_VERSION_MAJOR} -- if test -f "${XERCESCROOT}/src/xercesc/config.log" ; then -- if grep XML_USE_LIBICONV "${XERCESCROOT}/src/xercesc/config.log" \ -- > /dev/null 2>&1 ; then -- transcodingLibs=" -L/usr/local/lib -liconv " -- transcodingDefines=" -DXML_USE_LIBICONV -I/usr/local/include " -- fi -- elif test -f "${XERCESCROOT}/obj/FREEBSD/IconvFBSDTransService.o" ; then -- if nm "${XERCESCROOT}/obj/FREEBSD/IconvFBSDTransService.o" | \ -- grep iconv_open > /dev/null 2>&1 ; then -- transcodingLibs=" -L/usr/local/lib -liconv " -- transcodingDefines=" -DXML_USE_LIBICONV -I/usr/local/include " -- fi -- elif test -f "${XERCESCROOT}/lib/${SOLIBNAME}" ; then -- if nm "${XERCESCROOT}/lib/${SOLIBNAME}" | \ -- grep iconv_open > /dev/null 2>&1 ; then -- transcodingLibs=" -L/usr/local/lib -liconv " -- transcodingDefines=" -DXML_USE_LIBICONV -I/usr/local/include " -- fi -- fi -- fi --fi - - # - # Set the C compiler and C++ compiler environment variables ---- src/xercesc/runConfigure.orig Wed Feb 4 13:26:44 2004 -+++ src/xercesc/runConfigure Thu Mar 11 17:10:00 2004 -@@ -319,8 +319,13 @@ - ;; - esac - elif test $platform = "freebsd"; then -- threadingLibs="-pthread -lc_r" -+ if test -n "${PTHREAD_LIBS}" ; then -+ threadingLibs="${PTHREAD_LIBS}" -+ threadingDefines="${PTHREAD_CFLAGS} -DXML_USE_PTHREADS" -+ else -+ threadingLibs="-lpthread" - threadingDefines="-D_THREAD_SAFE -DXML_USE_PTHREADS" -+ fi - elif test $platform = "netbsd"; then - threadingLibs="-pthread -lpthread" - threadingDefines="-D_THREAD_SAFE -DXML_USE_PTHREADS" -@@ -467,7 +472,11 @@ - TRANSCODER=Uniconv390 ;; - IconvFBSD) - TRANSCODER=IconvFBSD ; -- transcodingDefines="-DXML_USE_LIBICONV -I/usr/local/include" ;; -+ transcodingDefines="-DXML_USE_LIBICONV -I/usr/local/include" ; -+ if test ${ICONVROOT}o != "o"; then -+ ICONVROOT=/usr/local -+ fi -+ transcodingLibs="-L${ICONVROOT} -L${ICONVROOT}/lib ${ICONV_LIB}" ;; - IconvGNU) - TRANSCODER=IconvGNU ; - transcodingDefines="-DXML_USE_GNU_TRANSCODER -I/usr/local/include" ;; ---- tests/runConfigure.orig Thu Mar 11 17:11:09 2004 -+++ tests/runConfigure Thu Mar 11 17:12:03 2004 -@@ -270,8 +270,13 @@ - ;; - esac - elif test $platform = "freebsd"; then -- threadingLibs="-pthread -lc_r" -- threadingDefines="-D_THREAD_SAFE -DXML_USE_PTHREADS" -+ if test -n "${PTHREAD_LIBS}" ; then -+ threadingLibs="${PTHREAD_LIBS}" -+ threadingDefines="${PTHREAD_CFLAGS} -DXML_USE_PTHREADS" -+ else -+ threadingLibs="-lpthread" -+ threadingDefines="-DXML_USE_PTHREADS" -+ fi - elif test $platform = "netbsd"; then - threadingLibs="-pthread" - threadingDefines="-D_THREAD_SAFE -DXML_USE_PTHREADS" -@@ -389,38 +394,6 @@ - # - BITSTOBUILD=$bitsToBuild - export BITSTOBUILD -- --# --# Special test for libiconv necessity under FreeBSD --# --transcodingLibs="" # by default don't suppose the libiconv is necessary --transcodingDefines="" --if test $platform = "freebsd"; then -- if test -n "${XERCESCROOT}"; then -- # try lookup the configuration results -- . "${XERCESCROOT}/version.incl" -- SOLIBNAME=libxerces-c.so.${SO_TARGET_VERSION}.${SO_TARGET_VERSION_MAJOR} -- if test -f "${XERCESCROOT}/src/xercesc/config.log" ; then -- if grep XML_USE_LIBICONV "${XERCESCROOT}/src/xercesc/config.log" \ -- > /dev/null 2>&1 ; then -- transcodingLibs=" -L/usr/local/lib -liconv " -- transcodingDefines=" -DXML_USE_LIBICONV -I/usr/local/include " -- fi -- elif test -f "${XERCESCROOT}/obj/FREEBSD/IconvFBSDTransService.o" ; then -- if nm "${XERCESCROOT}/obj/FREEBSD/IconvFBSDTransService.o" | \ -- grep iconv_open > /dev/null 2>&1 ; then -- transcodingLibs=" -L/usr/local/lib -liconv " -- transcodingDefines=" -DXML_USE_LIBICONV -I/usr/local/include " -- fi -- elif test -f "${XERCESCROOT}/lib/${SOLIBNAME}" ; then -- if nm "${XERCESCROOT}/lib/${SOLIBNAME}" | \ -- grep iconv_open > /dev/null 2>&1 ; then -- transcodingLibs=" -L/usr/local/lib -liconv " -- transcodingDefines=" -DXML_USE_LIBICONV -I/usr/local/include " -- fi -- fi -- fi --fi - - # - # Set the C compiler and C++ compiler environment variables Property changes on: head/textproc/xerces-c2-devel/files/patch-aa ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/textproc/xerces-c2-devel/files/patch-ab =================================================================== --- head/textproc/xerces-c2-devel/files/patch-ab (revision 363335) +++ head/textproc/xerces-c2-devel/files/patch-ab (nonexistent) @@ -1,15 +0,0 @@ ---- obj/Makefile.in.orig Wed Aug 29 03:47:18 2007 -+++ obj/Makefile.in Fri Jan 11 13:33:07 2008 -@@ -266,10 +266,10 @@ - (cd ${DESTDIR}$(PREFIX)/lib; rm -f ${LINK_DEPDOM}.a libxercesdepdom.dll.a; ln -s ${LIBDEPDOM}${SO_TARGET_VERSION}${SHLIBSUFFIX}.a ${LINK_DEPDOM}.a; rm -f libxercesdepdom.dll.a; ln -s ${LIBDEPDOM}${SO_TARGET_VERSION}${SHLIBSUFFIX}.a libxercesdepdom.dll.a) - else - $(CP) ${FQ_REAL_NAME} ${DESTDIR}$(PREFIX)/lib -- (cd ${DESTDIR}$(PREFIX)/lib; rm -f ${SO_NAME}; ln -s ${REAL_NAME} ${SO_NAME}; rm -f ${LINK_NAME}; ln -s ${REAL_NAME} ${LINK_NAME}) -+ (cd ${DESTDIR}$(PREFIX)/lib; rm -f ${SO_NAME}; ln -sf ${REAL_NAME} ${SO_NAME}; rm -f ${LINK_NAME}; ln -sf ${REAL_NAME} ${LINK_NAME}) - - $(CP) ${FQ_REAL_DEPDOM} ${DESTDIR}$(PREFIX)/lib -- (cd ${DESTDIR}$(PREFIX)/lib; rm -f ${SO_DEPDOM}; ln -s ${REAL_DEPDOM} ${SO_DEPDOM}; rm -f ${LINK_DEPDOM}; ln -s ${REAL_DEPDOM} ${LINK_DEPDOM}) -+ (cd ${DESTDIR}$(PREFIX)/lib; rm -f ${SO_DEPDOM}; ln -sf ${REAL_DEPDOM} ${SO_DEPDOM}; rm -f ${LINK_DEPDOM}; ln -sf ${REAL_DEPDOM} ${LINK_DEPDOM}) - endif - ifeq (${PLATFORM},OS390) - $(CP) ${LIBNAME}${VER}${OS390SIDEDECK} ${DESTDIR}$(PREFIX)/lib Property changes on: head/textproc/xerces-c2-devel/files/patch-ab ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/textproc/xerces-c2-devel/files/patch-obj__Makefile.in =================================================================== --- head/textproc/xerces-c2-devel/files/patch-obj__Makefile.in (nonexistent) +++ head/textproc/xerces-c2-devel/files/patch-obj__Makefile.in (revision 363336) @@ -0,0 +1,15 @@ +--- obj/Makefile.in.orig Wed Aug 29 03:47:18 2007 ++++ obj/Makefile.in Fri Jan 11 13:33:07 2008 +@@ -266,10 +266,10 @@ + (cd ${DESTDIR}$(PREFIX)/lib; rm -f ${LINK_DEPDOM}.a libxercesdepdom.dll.a; ln -s ${LIBDEPDOM}${SO_TARGET_VERSION}${SHLIBSUFFIX}.a ${LINK_DEPDOM}.a; rm -f libxercesdepdom.dll.a; ln -s ${LIBDEPDOM}${SO_TARGET_VERSION}${SHLIBSUFFIX}.a libxercesdepdom.dll.a) + else + $(CP) ${FQ_REAL_NAME} ${DESTDIR}$(PREFIX)/lib +- (cd ${DESTDIR}$(PREFIX)/lib; rm -f ${SO_NAME}; ln -s ${REAL_NAME} ${SO_NAME}; rm -f ${LINK_NAME}; ln -s ${REAL_NAME} ${LINK_NAME}) ++ (cd ${DESTDIR}$(PREFIX)/lib; rm -f ${SO_NAME}; ln -sf ${REAL_NAME} ${SO_NAME}; rm -f ${LINK_NAME}; ln -sf ${REAL_NAME} ${LINK_NAME}) + + $(CP) ${FQ_REAL_DEPDOM} ${DESTDIR}$(PREFIX)/lib +- (cd ${DESTDIR}$(PREFIX)/lib; rm -f ${SO_DEPDOM}; ln -s ${REAL_DEPDOM} ${SO_DEPDOM}; rm -f ${LINK_DEPDOM}; ln -s ${REAL_DEPDOM} ${LINK_DEPDOM}) ++ (cd ${DESTDIR}$(PREFIX)/lib; rm -f ${SO_DEPDOM}; ln -sf ${REAL_DEPDOM} ${SO_DEPDOM}; rm -f ${LINK_DEPDOM}; ln -sf ${REAL_DEPDOM} ${LINK_DEPDOM}) + endif + ifeq (${PLATFORM},OS390) + $(CP) ${LIBNAME}${VER}${OS390SIDEDECK} ${DESTDIR}$(PREFIX)/lib Property changes on: head/textproc/xerces-c2-devel/files/patch-obj__Makefile.in ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/textproc/xerces-c2-devel/files/patch-threading =================================================================== --- head/textproc/xerces-c2-devel/files/patch-threading (nonexistent) +++ head/textproc/xerces-c2-devel/files/patch-threading (revision 363336) @@ -0,0 +1,144 @@ +--- samples/runConfigure.orig Tue Jan 13 19:42:18 2004 ++++ samples/runConfigure Thu Mar 11 17:11:03 2004 +@@ -271,8 +271,13 @@ + ;; + esac + elif test $platform = "freebsd"; then +- threadingLibs="-pthread -lc_r" +- threadingDefines="-D_THREAD_SAFE -DXML_USE_PTHREADS" ++ if test -n "${PTHREAD_LIBS}" ; then ++ threadingLibs="${PTHREAD_LIBS}" ++ threadingDefines="${PTHREAD_CFLAGS} -DXML_USE_PTHREADS" ++ else ++ threadingLibs="-lpthread" ++ threadingDefines="-DXML_USE_PTHREADS" ++ fi + elif test $platform = "netbsd"; then + threadingLibs="-pthread" + threadingDefines="-D_THREAD_SAFE -DXML_USE_PTHREADS" +@@ -390,38 +395,6 @@ + # + BITSTOBUILD=$bitsToBuild + export BITSTOBUILD +- +-# +-# Special test for libiconv necessity under FreeBSD +-# +-transcodingLibs="" # by default don't suppose the libiconv is necessary +-transcodingDefines="" +-if test $platform = "freebsd"; then +- if test -n "${XERCESCROOT}"; then +- # try lookup the configuration results +- . "${XERCESCROOT}/version.incl" +- SOLIBNAME=libxerces-c.so.${SO_TARGET_VERSION}.${SO_TARGET_VERSION_MAJOR} +- if test -f "${XERCESCROOT}/src/xercesc/config.log" ; then +- if grep XML_USE_LIBICONV "${XERCESCROOT}/src/xercesc/config.log" \ +- > /dev/null 2>&1 ; then +- transcodingLibs=" -L/usr/local/lib -liconv " +- transcodingDefines=" -DXML_USE_LIBICONV -I/usr/local/include " +- fi +- elif test -f "${XERCESCROOT}/obj/FREEBSD/IconvFBSDTransService.o" ; then +- if nm "${XERCESCROOT}/obj/FREEBSD/IconvFBSDTransService.o" | \ +- grep iconv_open > /dev/null 2>&1 ; then +- transcodingLibs=" -L/usr/local/lib -liconv " +- transcodingDefines=" -DXML_USE_LIBICONV -I/usr/local/include " +- fi +- elif test -f "${XERCESCROOT}/lib/${SOLIBNAME}" ; then +- if nm "${XERCESCROOT}/lib/${SOLIBNAME}" | \ +- grep iconv_open > /dev/null 2>&1 ; then +- transcodingLibs=" -L/usr/local/lib -liconv " +- transcodingDefines=" -DXML_USE_LIBICONV -I/usr/local/include " +- fi +- fi +- fi +-fi + + # + # Set the C compiler and C++ compiler environment variables +--- src/xercesc/runConfigure.orig Wed Feb 4 13:26:44 2004 ++++ src/xercesc/runConfigure Thu Mar 11 17:10:00 2004 +@@ -319,8 +319,13 @@ + ;; + esac + elif test $platform = "freebsd"; then +- threadingLibs="-pthread -lc_r" ++ if test -n "${PTHREAD_LIBS}" ; then ++ threadingLibs="${PTHREAD_LIBS}" ++ threadingDefines="${PTHREAD_CFLAGS} -DXML_USE_PTHREADS" ++ else ++ threadingLibs="-lpthread" + threadingDefines="-D_THREAD_SAFE -DXML_USE_PTHREADS" ++ fi + elif test $platform = "netbsd"; then + threadingLibs="-pthread -lpthread" + threadingDefines="-D_THREAD_SAFE -DXML_USE_PTHREADS" +@@ -467,7 +472,11 @@ + TRANSCODER=Uniconv390 ;; + IconvFBSD) + TRANSCODER=IconvFBSD ; +- transcodingDefines="-DXML_USE_LIBICONV -I/usr/local/include" ;; ++ transcodingDefines="-DXML_USE_LIBICONV -I/usr/local/include" ; ++ if test ${ICONVROOT}o != "o"; then ++ ICONVROOT=/usr/local ++ fi ++ transcodingLibs="-L${ICONVROOT} -L${ICONVROOT}/lib ${ICONV_LIB}" ;; + IconvGNU) + TRANSCODER=IconvGNU ; + transcodingDefines="-DXML_USE_GNU_TRANSCODER -I/usr/local/include" ;; +--- tests/runConfigure.orig Thu Mar 11 17:11:09 2004 ++++ tests/runConfigure Thu Mar 11 17:12:03 2004 +@@ -270,8 +270,13 @@ + ;; + esac + elif test $platform = "freebsd"; then +- threadingLibs="-pthread -lc_r" +- threadingDefines="-D_THREAD_SAFE -DXML_USE_PTHREADS" ++ if test -n "${PTHREAD_LIBS}" ; then ++ threadingLibs="${PTHREAD_LIBS}" ++ threadingDefines="${PTHREAD_CFLAGS} -DXML_USE_PTHREADS" ++ else ++ threadingLibs="-lpthread" ++ threadingDefines="-DXML_USE_PTHREADS" ++ fi + elif test $platform = "netbsd"; then + threadingLibs="-pthread" + threadingDefines="-D_THREAD_SAFE -DXML_USE_PTHREADS" +@@ -389,38 +394,6 @@ + # + BITSTOBUILD=$bitsToBuild + export BITSTOBUILD +- +-# +-# Special test for libiconv necessity under FreeBSD +-# +-transcodingLibs="" # by default don't suppose the libiconv is necessary +-transcodingDefines="" +-if test $platform = "freebsd"; then +- if test -n "${XERCESCROOT}"; then +- # try lookup the configuration results +- . "${XERCESCROOT}/version.incl" +- SOLIBNAME=libxerces-c.so.${SO_TARGET_VERSION}.${SO_TARGET_VERSION_MAJOR} +- if test -f "${XERCESCROOT}/src/xercesc/config.log" ; then +- if grep XML_USE_LIBICONV "${XERCESCROOT}/src/xercesc/config.log" \ +- > /dev/null 2>&1 ; then +- transcodingLibs=" -L/usr/local/lib -liconv " +- transcodingDefines=" -DXML_USE_LIBICONV -I/usr/local/include " +- fi +- elif test -f "${XERCESCROOT}/obj/FREEBSD/IconvFBSDTransService.o" ; then +- if nm "${XERCESCROOT}/obj/FREEBSD/IconvFBSDTransService.o" | \ +- grep iconv_open > /dev/null 2>&1 ; then +- transcodingLibs=" -L/usr/local/lib -liconv " +- transcodingDefines=" -DXML_USE_LIBICONV -I/usr/local/include " +- fi +- elif test -f "${XERCESCROOT}/lib/${SOLIBNAME}" ; then +- if nm "${XERCESCROOT}/lib/${SOLIBNAME}" | \ +- grep iconv_open > /dev/null 2>&1 ; then +- transcodingLibs=" -L/usr/local/lib -liconv " +- transcodingDefines=" -DXML_USE_LIBICONV -I/usr/local/include " +- fi +- fi +- fi +-fi + + # + # Set the C compiler and C++ compiler environment variables Property changes on: head/textproc/xerces-c2-devel/files/patch-threading ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/textproc/xlhtml/files/patch-ac =================================================================== --- head/textproc/xlhtml/files/patch-ac (revision 363335) +++ head/textproc/xlhtml/files/patch-ac (nonexistent) @@ -1,20 +0,0 @@ - -$FreeBSD$ - ---- xlhtml/xlhtml.c 2002/02/27 18:10:01 1.1 -+++ xlhtml/xlhtml.c 2002/02/27 18:12:58 -@@ -746,8 +746,13 @@ - ws_array[i]->ws_title.str, ws_array[i]->biggest_row, ws_array[i]->biggest_col); - } - } -- else if (Xtract) -+ else if (Xtract) { -+ if (xr2 == HARD_MAX_ROWS) -+ xr2 = ws_array[xp]->biggest_row; -+ if (xc2 == HARD_MAX_COLS) -+ xc2 = ws_array[xp]->biggest_col; - OutputPartialTableAscii(); -+ } - } - else - { Property changes on: head/textproc/xlhtml/files/patch-ac ___________________________________________________________________ Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:keywords ## -1 +0,0 ## -FreeBSD=%H \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/textproc/xlhtml/files/patch-xlhtml__xlhtml.c =================================================================== --- head/textproc/xlhtml/files/patch-xlhtml__xlhtml.c (nonexistent) +++ head/textproc/xlhtml/files/patch-xlhtml__xlhtml.c (revision 363336) @@ -0,0 +1,20 @@ + +$FreeBSD$ + +--- xlhtml/xlhtml.c 2002/02/27 18:10:01 1.1 ++++ xlhtml/xlhtml.c 2002/02/27 18:12:58 +@@ -746,8 +746,13 @@ + ws_array[i]->ws_title.str, ws_array[i]->biggest_row, ws_array[i]->biggest_col); + } + } +- else if (Xtract) ++ else if (Xtract) { ++ if (xr2 == HARD_MAX_ROWS) ++ xr2 = ws_array[xp]->biggest_row; ++ if (xc2 == HARD_MAX_COLS) ++ xc2 = ws_array[xp]->biggest_col; + OutputPartialTableAscii(); ++ } + } + else + { Property changes on: head/textproc/xlhtml/files/patch-xlhtml__xlhtml.c ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property