[Subject Prev][Subject Next][Thread Prev][Thread Next][Date Index][Thread Index]

[hts-users:02463] Small bugs in HTS-2.1.1beta


Hi,

I found small bugs in HTS-2.1.1beta, please apply the attached patch codes.

Regards,

Heiga ZEN (Byung Ha CHUN)

======================================================================
NOTE: The information in this email and any attachments may be
confidential and/or legally privileged. This message may be read, copied
and used only by the intended recipient. If you are not the intended
recipient, please destroy this message, delete any copies held on your
system and notify the sender immediately.

Toshiba Research Europe Limited, registered in England and Wales (2519556).
Registered Office: 208 Cambridge Science Park, Milton Road, Cambridge
CB4 0GZ, England. Web: http://www.toshiba-europe.com/research/crl
======================================================================



______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email ______________________________________________________________________
--- HAdapt.c	2010-05-07 08:54:24.472718000 +0000
+++ HAdapt.c	2010-05-07 08:58:31.815440000 +0000
@@ -1441,11 +1441,12 @@
 static DTriMat *CreateBlockTriMat(MemHeap *x, IntVec blockSize)
 {
    DTriMat *tm;
-  int nblock, bsize, b, *i;
+  int nblock, bsize, b;
+   long *i;
   
   nblock = IntVecSize(blockSize);
    tm = (DTriMat *)New(x,sizeof(DTriMat)*(nblock+1));  
-  i = (int *)tm; *i = nblock;
+  i = (long *)tm; *i = (long)nblock;
   for (b=1;b<=nblock;b++) {
     bsize = blockSize[b];
       tm[b] = CreateDTriMat(x, bsize); 
@@ -1456,9 +1457,10 @@
 
 static void ZeroBlockTriMat(DTriMat *bTriMat)
 {
-  int *nblock,b;
+  int b;
+  long *nblock;
 
-  nblock = (int *)bTriMat;
+  nblock = (long *)bTriMat;
   for (b=1; b<=*nblock; b++)
      ZeroDTriMat(bTriMat[b]);
 }
@@ -1466,10 +1468,10 @@
 static void ZeroBaseTriMat(DTriMat *bTriMat)
 {
   int i;
-  int *vsize;
+  long *vsize;
    DTriMat tm;
  
-  vsize = (int *)bTriMat;
+  vsize = (long *)bTriMat;
   for (i=1;i<=*vsize;i++) {
     tm = bTriMat[i];
       ZeroDTriMat(tm);
@@ -1485,7 +1487,8 @@
   MixPDF *me;
   BaseClass *bclass;
   ILink i;
-  int j, cntj, *vsp, b, bsize;
+   int j, cntj, b, bsize;
+   long *vsp;
    AdaptXForm *xform = xfinfo->outXForm;
 
   regAcc = GetRegAcc(mp);
@@ -1496,7 +1499,7 @@
     regAcc->bDiagMat = CreateBlockTriMat(x,blockSize); 
     ZeroBlockTriMat(regAcc->bDiagMat);
       tm = (DTriMat *)New(x,sizeof(DTriMat)*(vsize+1));
-    vsp = (int *)tm; *vsp = vsize;
+    vsp = (long *)tm; *vsp = (long)vsize;
     for (b=1,cntj=1;b<=IntVecSize(blockSize);b++) {
       bsize = blockSize[b];
       for (j=1;j<=bsize;j++,cntj++) {
--- HHEd.c	2010-05-07 09:12:01.813500000 +0000
+++ HHEd.c	2010-05-07 09:12:14.630477000 +0000
@@ -824,7 +824,7 @@
          }
 }
 
-/* EquivMix: return TRUE if both states are identical */
+/* EquivMix: return TRUE if both mixtures are identical */
 Boolean EquivMix(MixPDF *a, MixPDF *b)
 {
    if (a->mean != b->mean ||
@@ -3943,7 +3943,7 @@
       fflush(stdout);
    }
    TieLeafNodes(tree,macRoot);
-   Dispose(&tmpHeap,yes.sum);
+   FreeDVector(&tmpHeap,yes.sum);
    if (trace & T_BID) {
       printf("\n TB: Stats %d->%d [%.1f%%]  { %d->%d [%.1f%%] total }\n",
              numItems,numTreeClust,(float)numTreeClust*100.0/(float)numItems,