SOURCES: speech_tools-gcc41.patch - initial x86-64 hash/int/ptr ca...
pluto
pluto at pld-linux.org
Wed Feb 1 19:12:27 CET 2006
Author: pluto Date: Wed Feb 1 18:12:27 2006 GMT
Module: SOURCES Tag: HEAD
---- Log message:
- initial x86-64 hash/int/ptr casting fixes. such code makes me crazy.
---- Files affected:
SOURCES:
speech_tools-gcc41.patch (1.4 -> 1.5)
---- Diffs:
================================================================
Index: SOURCES/speech_tools-gcc41.patch
diff -u SOURCES/speech_tools-gcc41.patch:1.4 SOURCES/speech_tools-gcc41.patch:1.5
--- SOURCES/speech_tools-gcc41.patch:1.4 Wed Jan 18 20:29:04 2006
+++ SOURCES/speech_tools-gcc41.patch Wed Feb 1 19:12:22 2006
@@ -103,3 +103,137 @@
+CXXFLAGS += -fno-strict-aliasing
+--- speech_tools/ling_class/item_feats.cc.orig 2001-04-04 13:55:32.000000000 +0200
++++ speech_tools/ling_class/item_feats.cc 2006-02-01 18:22:51.357182250 +0100
+@@ -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%p has no name", func);
+
+ return name;
+ }
+--- speech_tools/include/EST_simplestats.h.orig 2004-04-30 18:56:49.000000000 +0200
++++ speech_tools/include/EST_simplestats.h 2006-02-01 18:56:49.596564250 +0100
+@@ -60,7 +60,7 @@
+ private:
+ // for fast index->name
+ EST_StrVector namevector;
+- int p_def_val;
++ long p_def_val;
+ // for fast name->index
+ EST_StringTrie nametrie;
+
+@@ -80,22 +80,22 @@
+
+ /// The number of members in the discrete
+ const int length(void) const { return namevector.length(); }
+- /** The int assigned to the given name, if it doesn't exists p\_def\_val
++ /** The long assigned to the given name, if it doesn't exists p\_def\_val
+ is returned (which is -1 by default)
+ */
+- const int index(const EST_String &n) const {
+- int *i;
+- return (((i=(int*)nametrie.lookup(n)) != NULL) ? *i : p_def_val);
++ const long index(const EST_String &n) const {
++ long *i;
++ return (((i=(long*)nametrie.lookup(n)) != NULL) ? *i : p_def_val);
+ };
+
+ /// The name given the index
+- const EST_String &name(const int n) const { return namevector(n); }
++ const EST_String &name(const long n) const { return namevector(n); }
+
+ /// set the default value when a name isn't found (-1 by default)
+ void def_val(const EST_String &v) { p_def_val = index(v); }
+
+- /// An alternative method for getting the int form the name
+- int name(const EST_String &n) const { return index(n); };
++ /// An alternative method for getting the long form the name
++ long name(const EST_String &n) const { return index(n); };
+
+ bool operator == (const EST_Discrete &d);
+ bool operator != (const EST_Discrete &d);
+@@ -265,17 +265,17 @@
+ ///
+ double frequency(const int i) const;
+ /// Used for iterating through members of the distribution
+- int item_start() const;
++ long item_start() const;
+ /// Used for iterating through members of the distribution
+- int item_next(int idx) const;
++ long item_next(long idx) const;
+ /// Used for iterating through members of the distribution
+- int item_end(int idx) const;
++ long item_end(long idx) const;
+ /// During iteration returns name given index
+- const EST_String &item_name(int idx) const;
++ const EST_String &item_name(long) const;
+ /// During iteration returns name and frequency given index
+- void item_freq(int idx,EST_String &s,double &freq) const;
++ void item_freq(long,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(long,EST_String &s,double &prob) const;
+
+ /// Returns discrete vocabulary of distribution
+ inline const EST_Discrete *const get_discrete() const { return discrete; };
+--- speech_tools/stats/EST_DProbDist.cc.orig 2004-04-30 18:56:51.000000000 +0200
++++ speech_tools/stats/EST_DProbDist.cc 2006-02-01 18:57:56.324734500 +0100
+@@ -305,15 +305,15 @@
+ }
+
+ // For iterating through members of a probability distribution
+-int EST_DiscreteProbDistribution::item_start(void) const
++long EST_DiscreteProbDistribution::item_start(void) const
+ {
+ if (type == tprob_discrete)
+ return 0;
+ else
+- return (int)scounts.list.head();
++ return (long)scounts.list.head();
+ }
+
+-int EST_DiscreteProbDistribution::item_end(int idx) const
++long EST_DiscreteProbDistribution::item_end(long 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
++long EST_DiscreteProbDistribution::item_next(long idx) const
+ {
+ if (type == tprob_discrete)
+ return ++idx;
+ else
+- return (int)next((EST_Litem *)idx);
++ return (long)next((EST_Litem *)idx);
+ }
+
+-const EST_String &EST_DiscreteProbDistribution::item_name(int idx) const
++const EST_String &EST_DiscreteProbDistribution::item_name(long 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(long 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(long idx,EST_String &s,double &prob) const
+ {
+ if (type == tprob_discrete)
+ {
================================================================
---- CVS-web:
http://cvs.pld-linux.org/SOURCES/speech_tools-gcc41.patch?r1=1.4&r2=1.5&f=u
More information about the pld-cvs-commit
mailing list