From c32fc6e5feb3f6fc99efffba9cf9c7db2505bec7 Mon Sep 17 00:00:00 2001 From: kristerw Date: Fri, 15 Oct 2004 16:50:17 +0000 Subject: Make this work on NetBSD 1.6 again, by reverting the last change. (That change was a work-in-progress to get this to build with gcc3, so no functionality is lost by reverting it. The "correct" way of fixing this package is to upgrade to a newer version...) --- audio/festival/distinfo | 4 +- audio/festival/patches/patch-ao | 13 -- audio/festival/patches/patch-ap | 372 ---------------------------------------- 3 files changed, 1 insertion(+), 388 deletions(-) delete mode 100644 audio/festival/patches/patch-ao delete mode 100644 audio/festival/patches/patch-ap (limited to 'audio') diff --git a/audio/festival/distinfo b/audio/festival/distinfo index 8a499b7d635..a49c491cd8d 100644 --- a/audio/festival/distinfo +++ b/audio/festival/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.7 2004/09/15 06:20:08 jlam Exp $ +$NetBSD: distinfo,v 1.8 2004/10/15 16:50:17 kristerw Exp $ SHA1 (festival-1.4.1.tar.gz) = d3be7d58b986c37c39444a2dcc044cdc3ee1e774 Size (festival-1.4.1.tar.gz) = 543335 bytes @@ -22,5 +22,3 @@ SHA1 (patch-ak) = 705016ef010989c1b9ffe2d23b78ee9615a4c6f7 SHA1 (patch-al) = d8a22c5f509a6d75aa3295037654b594e8db4a4a SHA1 (patch-am) = cd6e07df1729fecca5cd9869229701b63ba71d14 SHA1 (patch-an) = bdd701017c72db315de8fcfb4ac6ce3bf97d4d47 -SHA1 (patch-ao) = 5641ec3df224ff3e0703912c2d706899a6860184 -SHA1 (patch-ap) = e99db4ff827d94d7b121daba7dce656ba45c8057 diff --git a/audio/festival/patches/patch-ao b/audio/festival/patches/patch-ao deleted file mode 100644 index a39085f3178..00000000000 --- a/audio/festival/patches/patch-ao +++ /dev/null @@ -1,13 +0,0 @@ -$NetBSD: patch-ao,v 1.1 2004/09/13 09:05:25 agc Exp $ - ---- speech_tools/include/EST_iostream.h 2004/01/05 10:37:27 1.1 -+++ speech_tools/include/EST_iostream.h 2004/01/05 10:37:38 -@@ -51,7 +51,7 @@ - # include - #elif defined(SYSTEM_IS_UNIX) - # include --# include -+# include - #elif defined(SYSTEM_IS_WIN32) - # include "win32/EST_iostream_win32.h" - # include diff --git a/audio/festival/patches/patch-ap b/audio/festival/patches/patch-ap deleted file mode 100644 index 05246f79f31..00000000000 --- a/audio/festival/patches/patch-ap +++ /dev/null @@ -1,372 +0,0 @@ -$NetBSD: patch-ap,v 1.1 2004/09/13 09:05:25 agc Exp $ - ---- speech_tools/siod/slib_file.cc 2004/08/12 10:31:50 1.1 -+++ speech_tools/siod/slib_file.cc 2004/08/12 10:33:42 -@@ -13,11 +13,16 @@ - #include "siodp.h" - #include "EST_Pathname.h" - --static void siod_string_print(LISP exp, ostrstream &sd); -+#include -+#include -+ -+using namespace std; -+ -+static int siod_string_print(LISP, char *, int, int); - - LISP open_files = NIL; - --void pprintf(FILE *fd,LISP exp,int indent,int width, int depth,int length) -+void pprintf(FILE *fd,LISP expression,int indent,int width, int depth,int length) - { - // A pretty printer for expressions - // indent is the number of spaces to indent by -@@ -27,13 +32,13 @@ - int i,ll; - LISP l; - -- if (exp == NIL) -+ if (expression == NIL) - fprintf(fd,"nil"); -- else if (!consp(exp)) -- fprintf(fd,"%s",(const char *)siod_sprint(exp)); -+ else if (!consp(expression)) -+ fprintf(fd,"%s",(const char *)siod_sprint(expression)); - else - { -- EST_String p = siod_sprint(exp); -+ EST_String p = siod_sprint(expression); - if (p.length() < width-indent) - fprintf(fd,"%s",(const char *)p); - else -@@ -44,8 +49,8 @@ - fprintf(fd,"..."); - else - { -- pprintf(fd,car(exp),indent,width,depth-1,length); -- for (ll=length,l=cdr(exp); l != NIL; l=cdr(l),ll--) -+ pprintf(fd,car(expression),indent,width,depth-1,length); -+ for (ll=length,l=cdr(expression); l != NIL; l=cdr(l),ll--) - { - fprintf(fd,"\n"); - for (i=0; istorage_as.string.data[i] != '\0'; i++) -+ (void) strlcpy(&buf[off], "\"", size - off); -+ off += 1; -+ for (i=0; expression->storage_as.string.data[i] != '\0'; i++) - { -- if (exp->storage_as.string.data[i] == '"') -- sd << '\\'; -- if (exp->storage_as.string.data[i] == '\\') -- sd << '\\'; -- sd << exp->storage_as.string.data[i]; -+ if (expression->storage_as.string.data[i] == '"' || -+ expression->storage_as.string.data[i] == '\\') { -+ (void) strlcpy(&buf[off], "\\", size - off); -+ off += 1; -+ } -+ (void) snprintf(&buf[off], size - off, "%c", expression->storage_as.string.data[i]); -+ off += 1; - } -- sd << "\""; -+ (void) strlcpy(&buf[off], "\"", size - off); -+ off += 1; - break; - case tc_symbol: -- sd << PNAME(exp); -+ off += snprintf(&buf[off], size - off, "%s", PNAME(expression)); - break; - case tc_subr_0: - case tc_subr_1: -@@ -167,57 +184,50 @@ - case tc_lsubr: - case tc_fsubr: - case tc_msubr: -- sprintf(tkbuffer,"#"; -+ off += snprintf(&buf[off], size - off, "#", TYPE(expression), (*expression).storage_as.subr.name); - break; - case tc_c_file: -- sprintf(tkbuffer,"#storage_as.c_file.f); -- sd << tkbuffer; -- if (exp->storage_as.c_file.name) -- sd << exp->storage_as.c_file.name; -- sd << ">"; -+ off += snprintf(&buf[off], size - off, "#storage_as.c_file.f); -+ if (expression->storage_as.c_file.name) -+ off += snprintf(&buf[off], size - off, "%s", expression->storage_as.c_file.name); -+ (void) strlcpy(&buf[off], ">", size - off); -+ off += 1; - break; - case tc_closure: -- sd << "#"; -+ off += snprintf(&buf[off], size - off, "#", size - off); -+ off += 1; - break; - default: - struct user_type_hooks *p; -- p = get_user_type_hooks(TYPE(exp)); -+ p = get_user_type_hooks(TYPE(expression)); - if (p->print_string) -- (*p->print_string)(exp, tkbuffer); -- else -- { -+ (*p->print_string)(expression, tkbuffer); -+ else { - if (p->name) -- sprintf(tkbuffer,"#<%s %p>",p->name,exp); -+ sprintf(tkbuffer,"#<%s %p>",p->name,expression); - else -- sprintf(tkbuffer,"#",TYPE(exp),exp); -+ sprintf(tkbuffer,"#",TYPE(expression),expression); - } -- sd << tkbuffer; -+ off += snprintf(&buf[off], size - off, "%s", tkbuffer); - } -- return; -+ return off - oldoff; - } - - --EST_String siod_sprint(LISP exp) -+EST_String siod_sprint(LISP expression) - { -- ostrstream sd; - EST_String r; -+ char buf[32767]; -+ int cc; - -- siod_string_print(exp,sd); -- -- sd << '\0'; -- r = sd.str(); -- --#ifdef __GNUC__ -- // need to do this otherwise sd doesn't free its internal buffer -- sd.freeze(0); --#endif -+ cc = siod_string_print(expression, buf, sizeof(buf), 0); -+ buf[cc] = 0x0; -+ r = buf; - - return r; - } -@@ -474,35 +484,35 @@ - no_interrupt(flag); - return(NIL);} - --LISP lprin1f(LISP exp,FILE *f) -+LISP lprin1f(LISP expression,FILE *f) - {LISP tmp; - struct user_type_hooks *p; -- STACK_CHECK(&exp); -+ STACK_CHECK(&expression); - INTERRUPT_CHECK(); -- switch TYPE(exp) -+ switch TYPE(expression) - {case tc_nil: - fput_st(f,"nil"); - break; - case tc_cons: - fput_st(f,"("); -- lprin1f(car(exp),f); -- for(tmp=cdr(exp);CONSP(tmp);tmp=cdr(tmp)) -+ lprin1f(car(expression),f); -+ for(tmp=cdr(expression);CONSP(tmp);tmp=cdr(tmp)) - {fput_st(f," ");lprin1f(car(tmp),f);} - if NNULLP(tmp) {fput_st(f," . ");lprin1f(tmp,f);} - fput_st(f,")"); - break; - case tc_flonum: -- if (FLONMPNAME(exp) == NULL) -+ if (FLONMPNAME(expression) == NULL) - { -- sprintf(tkbuffer,"%g",FLONM(exp)); -- FLONMPNAME(exp) = (char *)must_malloc(strlen(tkbuffer)+1); -- sprintf(FLONMPNAME(exp),"%s",tkbuffer); -+ sprintf(tkbuffer,"%g",FLONM(expression)); -+ FLONMPNAME(expression) = (char *)must_malloc(strlen(tkbuffer)+1); -+ sprintf(FLONMPNAME(expression),"%s",tkbuffer); - } -- sprintf(tkbuffer,"%s",FLONMPNAME(exp)); -+ sprintf(tkbuffer,"%s",FLONMPNAME(expression)); - fput_st(f,tkbuffer); - break; - case tc_symbol: -- fput_st(f,PNAME(exp)); -+ fput_st(f,PNAME(expression)); - break; - case tc_subr_0: - case tc_subr_1: -@@ -512,33 +522,33 @@ - case tc_lsubr: - case tc_fsubr: - case tc_msubr: -- sprintf(tkbuffer,"#"); - break; - case tc_closure: - fput_st(f,"#"); - break; - default: -- p = get_user_type_hooks(TYPE(exp)); -+ p = get_user_type_hooks(TYPE(expression)); - if (p->prin1) -- (*p->prin1)(exp,f); -+ (*p->prin1)(expression,f); - else - { - if (p->name) -- sprintf(tkbuffer,"#<%s %p>",p->name,USERVAL(exp)); -+ sprintf(tkbuffer,"#<%s %p>",p->name,USERVAL(expression)); - else -- sprintf(tkbuffer,"#",TYPE(exp),exp); -+ sprintf(tkbuffer,"#",TYPE(expression),expression); - fput_st(f,tkbuffer);}} - return(NIL);} - --static LISP lprintfp(LISP exp,LISP file) --{lprin1f(exp,get_c_file(file,stdout)); -+static LISP lprintfp(LISP expression,LISP file) -+{lprin1f(expression,get_c_file(file,stdout)); - return(NIL);} - - static LISP terpri(LISP file) -@@ -551,8 +561,8 @@ - LISP load(LISP fname,LISP cflag) - {return(vload(get_c_string(fname),NULLP(cflag) ? 0 : 1));} - --LISP lprint(LISP exp) --{lprin1f(exp,stdout); -+LISP lprint(LISP expression) -+{lprin1f(expression,stdout); - put_st("\n"); - return(NIL);} - -- cgit v1.2.3