File speech_tools-1.2.95-gcc4.patch of Package festival

--- speech_tools/include/EST_Chunk.h
+++ speech_tools/include/EST_Chunk.h
@@ -130,15 +130,15 @@
   public:
     friend class EST_ChunkPtr;
 
-    friend EST_ChunkPtr chunk_allocate(int bytes);
-    friend EST_ChunkPtr chunk_allocate(int bytes, const char *initial, int initial_len);
-    friend EST_ChunkPtr chunk_allocate(int bytes, const EST_ChunkPtr &initial, int initial_start, int initial_len);
+    friend class EST_ChunkPtr chunk_allocate(int bytes);
+    friend class EST_ChunkPtr chunk_allocate(int bytes, const char *initial, int initial_len);
+    friend class EST_ChunkPtr chunk_allocate(int bytes, const class EST_ChunkPtr &initial, int initial_start, int initial_len);
 
-    friend void make_updatable(EST_ChunkPtr &shared, EST_chunk_size inuse);
-    friend void make_updatable(EST_ChunkPtr &shared);
+    friend void make_updatable(class EST_ChunkPtr &shared, EST_chunk_size inuse);
+    friend void make_updatable(class EST_ChunkPtr &shared);
 
-    friend void grow_chunk(EST_ChunkPtr &shared, EST_chunk_size inuse, EST_chunk_size newsize);
-    friend void grow_chunk(EST_ChunkPtr &shared, EST_chunk_size newsize);
+    friend void grow_chunk(class EST_ChunkPtr &shared, EST_chunk_size inuse, EST_chunk_size newsize);
+    friend void grow_chunk(class EST_ChunkPtr &shared, EST_chunk_size newsize);
 
     friend ostream &operator << (ostream &s, const EST_Chunk &chp);
     friend void tester(void);
--- speech_tools/include/EST_simplestats.h
+++ speech_tools/include/EST_simplestats.h
@@ -265,17 +265,17 @@
     /// 
     double frequency(const int i) const; 
     /// Used for iterating through members of the distribution
-    int item_start() const;
+    size_t item_start() const;
     /// Used for iterating through members of the distribution
-    int item_next(int idx) const;
+    size_t item_next(size_t idx) const;
     /// Used for iterating through members of the distribution
-    int item_end(int idx) const;
+    size_t item_end(size_t idx) const;
     /// During iteration returns name given index 
-    const EST_String &item_name(int idx) const;
+    const EST_String &item_name(size_t idx) const;
     /// During iteration returns name and frequency given index  
-    void item_freq(int idx,EST_String &s,double &freq) const;
+    void item_freq(size_t idx,EST_String &s,double &freq) const;
     /// During iteration returns name and probability given index
-    void item_prob(int idx,EST_String &s,double &prob) const;
+    void item_prob(size_t idx,EST_String &s,double &prob) const;
 
     /// Returns discrete vocabulary of distribution
     inline const EST_Discrete *const get_discrete() const { return discrete; };
--- speech_tools/ling_class/item_feats.cc
+++ speech_tools/ling_class/item_feats.cc
@@ -78,7 +78,7 @@
    EST_String name = EST_FeatureFunctionContext::global->get_featfunc_name(func, found);
 
    if (!found)
-	EST_error("featfunc 0x%x has no name", (int)func);
+	EST_error("featfunc 0x%x has no name", func);
 
     return name;
 }
--- speech_tools/siod/siod_est.cc
+++ speech_tools/siod/siod_est.cc
@@ -52,7 +52,7 @@
 #include "EST_Track.h"
 #include "EST_track_aux.h"
 
-Declare_TStringHash_Base(LISP,NIL,NIL)
+Declare_TStringHash_Base(LISP,(LISP)0,NIL)
 
 #if defined(INSTANTIATE_TEMPLATES)
 #include "../base_class/EST_THash.cc"
--- speech_tools/siod/slib_math.cc
+++ speech_tools/siod/slib_math.cc
@@ -157,7 +157,7 @@
  init_subr_1("number?",numberp,
  "(number? DATA)\n\
   Returns t if DATA is a number, nil otherwise.");
- init_lsubr("+",plus,
+ init_lsubr("+",::plus,
  "(+ NUM1 NUM2 ...)\n\
   Returns the sum of NUM1 and NUM2 ...  An error is given is any argument\n\
   is not a number.");
--- speech_tools/stats/EST_DProbDist.cc
+++ speech_tools/stats/EST_DProbDist.cc
@@ -305,15 +305,15 @@
 }
 
 //  For iterating through members of a probability distribution
-int EST_DiscreteProbDistribution::item_start(void) const
+size_t EST_DiscreteProbDistribution::item_start(void) const
 {
     if (type == tprob_discrete)
 	return 0;
     else
-	return (int)scounts.list.head();
+	return (size_t)scounts.list.head();
 }
 
-int EST_DiscreteProbDistribution::item_end(int idx) const
+size_t EST_DiscreteProbDistribution::item_end(size_t idx) const
 {
     if (type == tprob_discrete)
 	return (idx >= icounts.length());
@@ -321,15 +321,15 @@
 	return ((EST_Litem *)idx == 0);
 }
 
-int EST_DiscreteProbDistribution::item_next(int idx) const
+size_t EST_DiscreteProbDistribution::item_next(size_t idx) const
 {
     if (type == tprob_discrete)
 	return ++idx;
     else
-	return (int)next((EST_Litem *)idx);
+	return (size_t)next((EST_Litem *)idx);
 }
 
-const EST_String &EST_DiscreteProbDistribution::item_name(int idx) const
+const EST_String &EST_DiscreteProbDistribution::item_name(size_t idx) const
 {
     if (type == tprob_discrete)
 	return discrete->name(idx);
@@ -337,7 +337,7 @@
 	return scounts.list((EST_Litem *)idx).k;
 }
 
-void EST_DiscreteProbDistribution::item_freq(int idx,EST_String &s,double &freq) const
+void EST_DiscreteProbDistribution::item_freq(size_t idx,EST_String &s,double &freq) const
 {
     if (type == tprob_discrete)
     {
@@ -351,7 +351,7 @@
     }
 }
 
-void EST_DiscreteProbDistribution::item_prob(int idx,EST_String &s,double &prob) const
+void EST_DiscreteProbDistribution::item_prob(size_t idx,EST_String &s,double &prob) const
 {
     if (type == tprob_discrete)
     {
@@ -368,7 +368,7 @@
 ostream & operator<<(ostream &s, const EST_DiscreteProbDistribution &pd)
 {
     // Output best with probabilities
-    int i;
+    size_t i;
     double prob;
     double sum=0;
     EST_String name;