]> git.pld-linux.org Git - packages/speech_tools.git/blob - speech_tools-gcc34.patch
- updated.
[packages/speech_tools.git] / speech_tools-gcc34.patch
1 diff -uNr speech_tools.orig/base_class/EST_TMatrix.cc speech_tools/base_class/EST_TMatrix.cc
2 --- speech_tools.orig/base_class/EST_TMatrix.cc 2001-07-25 13:02:35.000000000 +0200
3 +++ speech_tools/base_class/EST_TMatrix.cc      2004-04-20 01:06:36.242622616 +0200
4 @@ -101,7 +101,7 @@
5  {
6  
7    if (!EST_matrix_bounds_check(row, col, num_rows(), num_columns(), FALSE))
8 -    return *error_return;
9 +    return *this->error_return;
10      
11    return a_no_check(row,col);
12  }
13 @@ -212,9 +212,9 @@
14  {
15      T *new_m;
16  
17 -    if (num_rows() != new_rows || num_columns() != new_cols || p_memory == NULL )
18 +    if (num_rows() != new_rows || num_columns() != new_cols || this->p_memory == NULL )
19        {
20 -       if (p_sub_matrix)
21 +       if (this->p_sub_matrix)
22           EST_error("Attempt to resize Sub-Matrix");
23  
24         if (new_cols < 0 || new_rows < 0)
25 @@ -225,22 +225,22 @@
26         
27         new_m = new T[new_rows*new_cols];
28  
29 -       if (p_memory != NULL)
30 +       if (this->p_memory != NULL)
31           if (old_vals != NULL)
32 -           *old_vals = p_memory;
33 -         else  if (!p_sub_matrix)
34 -           delete [] (p_memory-p_offset);
35 +           *old_vals = this->p_memory;
36 +         else  if (!this->p_sub_matrix)
37 +           delete [] (this->p_memory-this->p_offset);
38      
39         p_num_rows = new_rows;
40 -       p_num_columns = new_cols;
41 -       p_offset=0;
42 -       p_row_step=p_num_columns; 
43 -       p_column_step=1;
44 +       this->p_num_columns = new_cols;
45 +       this->p_offset=0;
46 +       p_row_step=this->p_num_columns; 
47 +       this->p_column_step=1;
48         
49 -       p_memory = new_m;
50 +       this->p_memory = new_m;
51        }
52      else
53 -      *old_vals = p_memory;
54 +      *old_vals = this->p_memory;
55         
56  }
57  
58 @@ -248,12 +248,12 @@
59  void EST_TMatrix<T>::resize(int new_rows, int new_cols, int set)
60  {
61    int i,j;
62 -  T * old_vals = p_memory;
63 +  T * old_vals = this->p_memory;
64    int old_rows = num_rows();
65    int old_cols = num_columns();
66    int old_row_step = p_row_step;
67 -  int old_offset = p_offset;
68 -  int old_column_step = p_column_step;
69 +  int old_offset = this->p_offset;
70 +  int old_column_step = this->p_column_step;
71  
72    if (new_rows<0)
73      new_rows = old_rows;
74 @@ -285,27 +285,27 @@
75        
76        for(i=0; i<copy_r; i++)
77         for(j=copy_c; j<new_cols; j++)
78 -         a_no_check(i,j) =  *def_val;
79 +         a_no_check(i,j) =  *this->def_val;
80        
81        for(i=copy_r; i<new_rows; i++)
82         for(j=0; j<new_cols; j++)
83 -         a_no_check(i,j) =  *def_val;
84 +         a_no_check(i,j) =  *this->def_val;
85      }
86  
87 -  if (old_vals && old_vals != p_memory && !p_sub_matrix)
88 +  if (old_vals && old_vals != this->p_memory && !this->p_sub_matrix)
89      delete [] (old_vals-old_offset);
90  }
91  
92  template<class T>
93  bool EST_TMatrix<T>::have_rows_before(int n) const
94  {
95 -  return p_offset >= n*p_row_step;
96 +  return this->p_offset >= n*p_row_step;
97  }
98  
99  template<class T>
100  bool EST_TMatrix<T>::have_columns_before(int n) const
101  {
102 -  return p_offset >= n*p_column_step;
103 +  return this->p_offset >= n*this->p_column_step;
104  }
105  
106  template<class T>
107 @@ -335,10 +335,10 @@
108           *outf 
109  #if 0
110             << "{" <<i<<","<<j
111 -               <<",m="<<((int)p_memory)<<","
112 -               <<"r'="<<((int)((T *) mx_move_pointer_f(p_memory, sizeof(T)*p_row_step, i)))<<","
113 -               <<"r="<<((int)mx_move_pointer(p_memory, T, p_row_step, i))<<","
114 -               <<"c="<<((int)mx_move_pointer(p_memory, T, p_column_step, j))<<","
115 +               <<",m="<<((int)this->p_memory)<<","
116 +               <<"r'="<<((int)((T *) mx_move_pointer_f(this->p_memory, sizeof(T)*p_row_step, i)))<<","
117 +               <<"r="<<((int)mx_move_pointer(this->p_memory, T, p_row_step, i))<<","
118 +               <<"c="<<((int)mx_move_pointer(this->p_memory, T, this->p_column_step, j))<<","
119                 <<((int)(&fast_a_m_gcc(i,j)))
120                 <<"}"
121  #endif
122 @@ -506,12 +506,12 @@
123  
124    rv.p_sub_matrix = TRUE;
125    rv.p_num_columns = len;
126 -  rv.p_offset = p_offset + start_c*p_column_step + r*p_row_step;
127 -  rv.p_memory = p_memory - p_offset + rv.p_offset;
128 +  rv.p_offset = this->p_offset + start_c*this->p_column_step + r*p_row_step;
129 +  rv.p_memory = this->p_memory - this->p_offset + rv.p_offset;
130  //  cout << "mrow: mem: " << rv.p_memory << " (" << (int)rv.p_memory << ")\n";
131  //  cout << "mrow: ofset: " << rv.p_offset << " (" << (int)rv.p_offset << ")\n";
132  
133 -  rv.p_column_step=p_column_step;
134 +  rv.p_column_step=this->p_column_step;
135  }
136  
137  template<class T>
138 @@ -528,8 +528,8 @@
139  
140    cv.p_sub_matrix = TRUE;
141    cv.p_num_columns = len;
142 -  cv.p_offset = p_offset + c*p_column_step + start_r*p_row_step;
143 -  cv.p_memory = p_memory -p_offset + cv.p_offset;
144 +  cv.p_offset = this->p_offset + c*this->p_column_step + start_r*p_row_step;
145 +  cv.p_memory = this->p_memory - this->p_offset + cv.p_offset;
146  //  cout << "mcol: mem: " << cv.p_memory << " (" << (int)cv.p_memory << ")\n";
147  //  cout << "mcol: offset: " << cv.p_offset << " (" << (int)cv.p_offset << ")\n";
148  
149 @@ -552,10 +552,10 @@
150      delete [] (sm.p_memory - sm.p_offset);
151  
152    sm.p_sub_matrix = TRUE;
153 -  sm.p_offset =  p_offset + c*p_column_step + r*p_row_step;
154 -  sm.p_memory = p_memory - p_offset + sm.p_offset;
155 +  sm.p_offset = this->p_offset + c*this->p_column_step + r*p_row_step;
156 +  sm.p_memory = this->p_memory - this->p_offset + sm.p_offset;
157    sm.p_row_step=p_row_step;
158 -  sm.p_column_step=p_column_step;
159 +  sm.p_column_step=this->p_column_step;
160    sm.p_num_rows = len_r;
161    sm.p_num_columns = len_c;
162    
163 diff -uNr speech_tools.orig/base_class/EST_TNamedEnum.cc speech_tools/base_class/EST_TNamedEnum.cc
164 --- speech_tools.orig/base_class/EST_TNamedEnum.cc      2001-04-04 15:11:27.000000000 +0200
165 +++ speech_tools/base_class/EST_TNamedEnum.cc   2004-04-20 01:06:36.244622312 +0200
166 @@ -58,15 +58,15 @@
167    for(n=1; defs[n].token != defs[0].token; n++)
168      ;
169  
170 -  ndefinitions = n;
171 -  definitions = new defn[n];
172 +  this->ndefinitions = n;
173 +  this->definitions = new defn[n];
174  
175 -  definitions[0] = defs[0];
176 +  this->definitions[0] = defs[0];
177    for(n=1; defs[n].token != defs[0].token; n++)
178 -    definitions[n] = defs[n];
179 +    this->definitions[n] = defs[n];
180  
181 -  p_unknown_enum = defs[n].token;
182 -  p_unknown_value = defs[n].values[0];
183 +  this->p_unknown_enum = defs[n].token;
184 +  this->p_unknown_value = defs[n].values[0];
185  }
186  
187  template<class ENUM, class VAL, class INFO> 
188 @@ -87,37 +87,37 @@
189        // fprintf(stderr, ": %d '%s' '%s'\n", n, defs[n].token, defs[0].token);
190      }
191  
192 -  ndefinitions = n;
193 +  this->ndefinitions = n;
194    typedef EST_TValuedEnumDefinition<ENUM,VAL,INFO> defn;
195 -  definitions = new defn[n];
196 +  this->definitions = new defn[n];
197  
198 -  definitions[0].token = conv(defs[0].token);  
199 +  this->definitions[0].token = conv(defs[0].token);  
200    for(int i=0; i<NAMED_ENUM_MAX_SYNONYMS; i++)
201 -    definitions[0].values[i] = defs[0].values[i];
202 -  definitions[0].info = defs[0].info;
203 +    this->definitions[0].values[i] = defs[0].values[i];
204 +  this->definitions[0].info = defs[0].info;
205    for(n=1; strcmp(defs[n].token, defs[0].token) != 0; n++)
206      {
207 -      definitions[n].token = conv(defs[n].token);
208 +      this->definitions[n].token = conv(defs[n].token);
209        for(int i2=0; i2<NAMED_ENUM_MAX_SYNONYMS; i2++)
210 -       definitions[n].values[i2] = defs[n].values[i2];
211 -      definitions[n].info = defs[n].info;
212 +       this->definitions[n].values[i2] = defs[n].values[i2];
213 +      this->definitions[n].info = defs[n].info;
214      }
215  
216 -  p_unknown_enum = conv(defs[n].token);
217 -  p_unknown_value = defs[n].values[0];
218 +  this->p_unknown_enum = conv(defs[n].token);
219 +  this->p_unknown_value = defs[n].values[0];
220  }
221  
222  template<class ENUM, class VAL, class INFO>
223  EST_TValuedEnumI<ENUM,VAL,INFO>::~EST_TValuedEnumI(void)
224  {
225 -  if (definitions)
226 -     delete[] definitions;
227 +  if (this->definitions)
228 +     delete[] this->definitions;
229  }
230  
231  template<class ENUM, class VAL, class INFO> 
232  int EST_TValuedEnumI<ENUM,VAL,INFO>::n(void) const
233  { 
234 -return ndefinitions; 
235 +return this->ndefinitions; 
236  }
237  
238  template<class ENUM, class VAL, class INFO>
239 @@ -125,11 +125,11 @@
240  {
241    int i;
242  
243 -  for(i=0; i<ndefinitions; i++)
244 -    if (definitions[i].token == token)
245 -      return definitions[i].values[n];
246 +  for(i=0; i<this->ndefinitions; i++)
247 +    if (this->definitions[i].token == token)
248 +      return this->definitions[i].values[n];
249  
250 -  return p_unknown_value;
251 +  return this->p_unknown_value;
252  }
253  
254  template<class ENUM, class VAL, class INFO>
255 @@ -137,9 +137,9 @@
256  {
257    int i;
258  
259 -  for(i=0; i<ndefinitions; i++)
260 -    if (definitions[i].token == token)
261 -      return definitions[i].info;
262 +  for(i=0; i<this->ndefinitions; i++)
263 +    if (this->definitions[i].token == token)
264 +      return this->definitions[i].info;
265  
266    cerr << "Fetching info for invalid entry\n";
267    abort();
268 @@ -151,10 +151,10 @@
269  template<class ENUM, class VAL, class INFO>
270  ENUM EST_TValuedEnumI<ENUM,VAL,INFO>::nth_token (int n) const
271  {
272 -  if (n>=0 && n < ndefinitions)
273 -    return definitions[n].token;
274 +  if (n>=0 && n < this->ndefinitions)
275 +    return this->definitions[n].token;
276  
277 -  return p_unknown_enum;
278 +  return this->p_unknown_enum;
279  }
280  
281  template<class ENUM, class VAL, class INFO> 
282 @@ -162,12 +162,12 @@
283  {
284      int i,j;
285  
286 -    for(i=0; i<ndefinitions; i++)
287 -       for(j=0; j<NAMED_ENUM_MAX_SYNONYMS && definitions[i].values[j] ; j++)
288 -           if (eq_vals(definitions[i].values[j], value))
289 -               return definitions[i].token;
290 +    for(i=0; i<this->ndefinitions; i++)
291 +       for(j=0; j<NAMED_ENUM_MAX_SYNONYMS && this->definitions[i].values[j] ; j++)
292 +           if (eq_vals(this->definitions[i].values[j], value))
293 +               return this->definitions[i].token;
294  
295 -    return p_unknown_enum;
296 +    return this->p_unknown_enum;
297  }
298  
299  template<class ENUM> 
300 @@ -186,11 +186,11 @@
301    if ((file=fopen(name, "rb"))==NULL)
302      return misc_read_error;
303  
304 -  if (definitions)
305 -    delete[] definitions;
306 +  if (this->definitions)
307 +    delete[] this->definitions;
308  
309 -  ndefinitions= -1;
310 -  definitions=NULL;
311 +  this->ndefinitions= -1;
312 +  this->definitions=NULL;
313  
314    buffer[LINE_LENGTH-1] = 'x';
315  
316 @@ -202,27 +202,27 @@
317           return wrong_format;
318         }
319  
320 -      if (ndefinitions>=0 && quote != '\0' && buffer[0] == '=')
321 +      if (this->ndefinitions>=0 && quote != '\0' && buffer[0] == '=')
322         {
323           // definition by number
324  
325 -         if ( n>= ndefinitions)
326 +         if ( n>= this->ndefinitions)
327             {
328               cerr << "too many definitions\n";
329               return wrong_format;
330             }
331  
332           int ntokens = split(line, tokens, NAMED_ENUM_MAX_SYNONYMS+2, RXwhite, '"');
333 -         definitions[n].token = (ENUM)atoi(tokens[0].after(0,1));
334 +         this->definitions[n].token = (ENUM)atoi(tokens[0].after(0,1));
335  
336           for(int i=1; i<ntokens; i++)
337 -             definitions[n].values[i-1] = wstrdup(tokens[i].unquote_if_needed(quote));
338 +             this->definitions[n].values[i-1] = wstrdup(tokens[i].unquote_if_needed(quote));
339           for(int j=ntokens-1 ; j< NAMED_ENUM_MAX_SYNONYMS; j++)
340 -           definitions[n].values[j]=NULL;
341 +           this->definitions[n].values[j]=NULL;
342  
343           n++;
344         }
345 -      else if (have_unknown && ndefinitions>=0 && quote != '\0' && buffer[0] == quote)
346 +      else if (have_unknown && this->ndefinitions>=0 && quote != '\0' && buffer[0] == quote)
347         {
348           // definition by standard name
349           if (!definitive)
350 @@ -230,7 +230,7 @@
351               cerr << "can't use names in this definition\n";
352               return wrong_format;
353             }
354 -         if ( n>= ndefinitions)
355 +         if ( n>= this->ndefinitions)
356             {
357               cerr << "too many definitions\n";
358               return wrong_format;
359 @@ -238,12 +238,12 @@
360  
361           int ntokens = split(line, tokens, NAMED_ENUM_MAX_SYNONYMS+2, RXwhite, quote);
362  
363 -         definitions[n].token = definitive->token(tokens[0].unquote(quote));
364 +         this->definitions[n].token = definitive->token(tokens[0].unquote(quote));
365  
366           for(int i=1; i<ntokens; i++)
367 -           definitions[n].values[i-1] = wstrdup(tokens[i].unquote_if_needed(quote));
368 +           this->definitions[n].values[i-1] = wstrdup(tokens[i].unquote_if_needed(quote));
369           for(int j=ntokens-1 ; j< NAMED_ENUM_MAX_SYNONYMS; j++)
370 -           definitions[n].values[j]=NULL;
371 +           this->definitions[n].values[j]=NULL;
372  
373           n++;
374         }
375 @@ -269,16 +269,16 @@
376             }
377           else if (key == "number")
378             {
379 -             ndefinitions=atoi(line.after(eq,1));
380 +             this->ndefinitions=atoi(line.after(eq,1));
381               // cout << "n = '" << ndefinitions << "'\n";
382 -             definitions = new Defn[ndefinitions];
383 -             for(int i=0; i<ndefinitions; i++)
384 -               definitions[i].values[0] =NULL;
385 +             this->definitions = new Defn[this->ndefinitions];
386 +             for(int i=0; i<this->ndefinitions; i++)
387 +               this->definitions[i].values[0] =NULL;
388               n=0;
389             }
390           else if (key == "unknown")
391             {
392 -             p_unknown_enum=(ENUM)atoi(line.after(eq,1));
393 +             this->p_unknown_enum=(ENUM)atoi(line.after(eq,1));
394               // cout << "unknown = '" << p_unknown_enum << "'\n";
395               have_unknown=1;
396             }
397 @@ -305,20 +305,20 @@
398    if ((file=fopen(name, "wb"))==NULL)
399      return write_fail;
400  
401 -  fprintf(file, "unknown=%d\n", p_unknown_enum);
402 +  fprintf(file, "unknown=%d\n", this->p_unknown_enum);
403    fprintf(file, "quote=%c\n", quote);
404 -  fprintf(file, "number=%d\n", ndefinitions);
405 +  fprintf(file, "number=%d\n", this->ndefinitions);
406  
407 -  for(int i=0; i<ndefinitions; i++)
408 -    if (definitions[i].values[0])
409 +  for(int i=0; i<this->ndefinitions; i++)
410 +    if (this->definitions[i].values[0])
411        {
412         if (definitive)
413 -         fprintf(file, "%s ", (const char *)EST_String(definitive->name(definitions[i].token)).quote(quote));
414 +         fprintf(file, "%s ", (const char *)EST_String(definitive->name(this->definitions[i].token)).quote(quote));
415         else
416 -         fprintf(file, "=%d ", (int)definitions[i].token);
417 +         fprintf(file, "=%d ", (int)this->definitions[i].token);
418  
419 -       for(int j=0; j<NAMED_ENUM_MAX_SYNONYMS && definitions[i].values[j] != NULL; j++)
420 -         fprintf(file, "%s ", (const char *) EST_String(definitions[i].values[j]).quote_if_needed(quote));
421 +       for(int j=0; j<NAMED_ENUM_MAX_SYNONYMS && this->definitions[i].values[j] != NULL; j++)
422 +         fprintf(file, "%s ", (const char *) EST_String(this->definitions[i].values[j]).quote_if_needed(quote));
423        
424         fputc('\n', file);
425        }
426 diff -uNr speech_tools.orig/base_class/EST_TSimpleMatrix.cc speech_tools/base_class/EST_TSimpleMatrix.cc
427 --- speech_tools.orig/base_class/EST_TSimpleMatrix.cc   2001-04-04 13:55:32.000000000 +0200
428 +++ speech_tools/base_class/EST_TSimpleMatrix.cc        2004-04-20 01:06:36.245622160 +0200
429 @@ -49,23 +49,23 @@
430  template<class T> 
431  void EST_TSimpleMatrix<T>::copy_data(const EST_TSimpleMatrix<T> &a)
432  {
433 -  if (!a.p_sub_matrix && !p_sub_matrix)
434 -    memcpy((void *)&a_no_check(0,0),
435 +  if (!a.p_sub_matrix && !this->p_sub_matrix)
436 +    memcpy((void *)&this->a_no_check(0,0),
437            (const void *)&a.a_no_check(0,0),
438 -          num_rows()*num_columns()*sizeof(T)
439 +          this->num_rows()*this->num_columns()*sizeof(T)
440            );
441    else
442      {
443 -    for (int i = 0; i < num_rows(); ++i)
444 -      for (int j = 0; j < num_columns(); ++j)
445 -       a_no_check(i,j) = a.a_no_check(i,j);
446 +    for (int i = 0; i < this->num_rows(); ++i)
447 +      for (int j = 0; j < this->num_columns(); ++j)
448 +       this->a_no_check(i,j) = a.a_no_check(i,j);
449      }
450  }
451  
452  template<class T> 
453  void EST_TSimpleMatrix<T>::copy(const EST_TSimpleMatrix<T> &a)
454  {
455 -  if (num_rows() != a.num_rows() || num_columns() != a.num_columns())
456 +  if (this->num_rows() != a.num_rows() || this->num_columns() != a.num_columns())
457      resize(a.num_rows(), a.num_columns(), 0);
458    
459    copy_data(a);
460 @@ -83,31 +83,31 @@
461                                   int set)
462  {
463    T* old_vals=NULL;
464 -  int old_offset = p_offset;
465 +  int old_offset = this->p_offset;
466  
467    if (new_rows<0)
468 -    new_rows = num_rows();
469 +    new_rows = this->num_rows();
470    if (new_cols<0)
471 -    new_cols = num_columns();
472 +    new_cols = this->num_columns();
473  
474    if (set)
475      {
476 -      if (!p_sub_matrix && new_cols == num_columns() && new_rows != num_rows())
477 +      if (!this->p_sub_matrix && new_cols == this->num_columns() && new_rows != this->num_rows())
478         {
479 -         int copy_r = Lof(num_rows(), new_rows);
480 +         int copy_r = Lof(this->num_rows(), new_rows);
481  
482           just_resize(new_rows, new_cols, &old_vals);
483  
484 -         memcpy((void *)p_memory, 
485 +         memcpy((void *)this->p_memory, 
486                  (const void *)old_vals,
487                  copy_r*new_cols*sizeof(T));
488           
489           int i,j;
490           
491           if (new_rows > copy_r)
492 -           if (*def_val == 0)
493 +           if (*this->def_val == 0)
494               {
495 -               memset((void *)(p_memory + copy_r*p_row_step),
496 +               memset((void *)(this->p_memory + copy_r*this->p_row_step),
497                        0,
498                        (new_rows-copy_r)*new_cols*sizeof(T));
499               }
500 @@ -115,15 +115,15 @@
501               {
502                 for(j=0; j<new_cols; j++)
503                   for(i=copy_r; i<new_rows; i++)
504 -                   a_no_check(i,j) = *def_val;
505 +                   this->a_no_check(i,j) = *this->def_val;
506               }
507         }
508 -      else if (!p_sub_matrix)
509 +      else if (!this->p_sub_matrix)
510         {
511 -         int old_row_step = p_row_step;
512 -         int old_column_step = p_column_step;
513 -         int copy_r = Lof(num_rows(), new_rows);
514 -         int copy_c = Lof(num_columns(), new_cols);
515 +         int old_row_step = this->p_row_step;
516 +         int old_column_step = this->p_column_step;
517 +         int copy_r = Lof(this->num_rows(), new_rows);
518 +         int copy_c = Lof(this->num_columns(), new_cols);
519           
520           just_resize(new_rows, new_cols, &old_vals);
521  
522 @@ -136,12 +136,12 @@
523           
524           for(i=0; i<copy_r; i++)
525             for(j=copy_c; j<new_cols; j++)
526 -             a_no_check(i,j) =  *def_val;
527 +             this->a_no_check(i,j) =  *this->def_val;
528           
529           if (new_rows > copy_r)
530 -           if (*def_val == 0)
531 +           if (*this->def_val == 0)
532               {
533 -               memset((void *)(p_memory + copy_r*p_row_step),
534 +               memset((void *)(this->p_memory + copy_r*this->p_row_step),
535                        0,
536                        (new_rows-copy_r)*new_cols*sizeof(T));
537               }
538 @@ -149,7 +149,7 @@
539               {
540                 for(j=0; j<new_cols; j++)
541                   for(i=copy_r; i<new_rows; i++)
542 -                   a_no_check(i,j) = *def_val;
543 +                   this->a_no_check(i,j) = *this->def_val;
544               }
545         }
546        else
547 @@ -158,7 +158,7 @@
548    else
549      EST_TMatrix<T>::resize(new_rows, new_cols, 0);
550  
551 -  if (old_vals && old_vals != p_memory)
552 +  if (old_vals && old_vals != this->p_memory)
553      delete [] (old_vals-old_offset);
554  }
555  
556 diff -uNr speech_tools.orig/base_class/EST_TSimpleVector.cc speech_tools/base_class/EST_TSimpleVector.cc
557 --- speech_tools.orig/base_class/EST_TSimpleVector.cc   2001-04-04 13:55:32.000000000 +0200
558 +++ speech_tools/base_class/EST_TSimpleVector.cc        2004-04-20 01:06:36.246622008 +0200
559 @@ -46,10 +46,10 @@
560  
561  template<class T> void EST_TSimpleVector<T>::copy(const EST_TSimpleVector<T> &a)
562  {
563 -  if (p_column_step==1 && a.p_column_step==1)
564 +  if (this->p_column_step==1 && a.p_column_step==1)
565      {
566      resize(a.n(), FALSE);
567 -    memcpy((void *)(p_memory), (const void *)(a.p_memory), n() * sizeof(T));
568 +    memcpy((void *)(this->p_memory), (const void *)(a.p_memory), this->n() * sizeof(T));
569      }
570  else
571    ((EST_TVector<T> *)this)->copy(a);
572 @@ -57,33 +57,33 @@
573  
574  template<class T> EST_TSimpleVector<T>::EST_TSimpleVector(const EST_TSimpleVector<T> &in)
575  {
576 -    default_vals();    
577 +    this->default_vals();
578      copy(in);
579  }
580  
581  // should copy from and delete old version first
582  template<class T> void EST_TSimpleVector<T>::resize(int newn, int set)
583  {
584 -  int oldn = n();
585 +  int oldn = this->n();
586    T *old_vals =NULL;
587 -  int old_offset = p_offset;
588 +  int old_offset = this->p_offset;
589  
590    just_resize(newn, &old_vals);
591  
592    if (set && old_vals)
593      {
594        int copy_c = 0;
595 -      if (p_memory != NULL)
596 +      if (this->p_memory != NULL)
597         {
598 -         copy_c = Lof(n(), oldn);
599 -         memcpy((void *)p_memory, (const void *)old_vals,  copy_c* sizeof(T));
600 +         copy_c = Lof(this->n(), oldn);
601 +         memcpy((void *)this->p_memory, (const void *)old_vals,  copy_c* sizeof(T));
602         }
603        
604 -      for (int i=copy_c; i < n(); ++i)
605 -       p_memory[i] = *def_val;
606 +      for (int i=copy_c; i < this->n(); ++i)
607 +       this->p_memory[i] = *this->def_val;
608      }
609    
610 -  if (old_vals != NULL && old_vals != p_memory && !p_sub_matrix)
611 +  if (old_vals != NULL && old_vals != this->p_memory && !this->p_sub_matrix)
612      delete [] (old_vals - old_offset);
613  
614  }
615 @@ -92,32 +92,32 @@
616  void EST_TSimpleVector<T>::copy_section(T* dest, int offset, int num) const
617  {
618    if (num<0)
619 -    num = num_columns()-offset;
620 +    num = this->num_columns()-offset;
621  
622 -  if (!EST_vector_bounds_check(num+offset-1, num_columns(), FALSE))
623 +  if (!EST_vector_bounds_check(num+offset-1, this->num_columns(), FALSE))
624      return;
625  
626 -  if (!p_sub_matrix && p_column_step==1)
627 -    memcpy((void *)dest, (const void *)(p_memory+offset), num*sizeof(T));
628 +  if (!this->p_sub_matrix && this->p_column_step==1)
629 +    memcpy((void *)dest, (const void *)(this->p_memory+offset), num*sizeof(T));
630    else
631      for(int i=0; i<num; i++)
632 -      dest[i] = a_no_check(offset+i);
633 +      dest[i] = this->a_no_check(offset+i);
634  }
635  
636  template<class T>
637  void EST_TSimpleVector<T>::set_section(const T* src, int offset, int num)
638  {
639    if (num<0)
640 -    num = num_columns()-offset;
641 +    num = this->num_columns()-offset;
642  
643 -  if (!EST_vector_bounds_check(num+offset-1, num_columns(), FALSE))
644 +  if (!EST_vector_bounds_check(num+offset-1, this->num_columns(), FALSE))
645      return;
646    
647 -  if (!p_sub_matrix && p_column_step==1)
648 -    memcpy((void *)(p_memory+offset), (void *)src, num*sizeof(T));
649 +  if (!this->p_sub_matrix && this->p_column_step==1)
650 +    memcpy((void *)(this->p_memory+offset), (void *)src, num*sizeof(T));
651    else
652      for(int i=0; i<num; i++)
653 -      a_no_check(offset+i) = src[i];
654 +      this->a_no_check(offset+i) = src[i];
655  }
656  
657  template<class T> EST_TSimpleVector<T> &EST_TSimpleVector<T>::operator=(const EST_TSimpleVector<T> &in)
658 @@ -128,9 +128,9 @@
659  
660  template<class T> void EST_TSimpleVector<T>::zero()
661  {
662 -  if (p_column_step==1)
663 -    memset((void *)(p_memory), 0, n() * sizeof(T));
664 +  if (this->p_column_step==1)
665 +    memset((void *)(this->p_memory), 0, this->n() * sizeof(T));
666    else
667 -    ((EST_TVector<T> *)this)->fill(*def_val);
668 +    ((EST_TVector<T> *)this)->fill(*this->def_val);
669  }
670  
671 diff -uNr speech_tools.orig/base_class/EST_Tvectlist.cc speech_tools/base_class/EST_Tvectlist.cc
672 --- speech_tools.orig/base_class/EST_Tvectlist.cc       2001-04-04 13:55:32.000000000 +0200
673 +++ speech_tools/base_class/EST_Tvectlist.cc    2004-04-20 01:06:48.954690088 +0200
674 @@ -38,6 +38,7 @@
675  /*                                                                       */
676  /*=======================================================================*/
677  #include <fstream.h>
678 +#include "EST_TList.h"
679  #include "EST_TVector.h"
680  #include "EST_cutils.h"
681  
682 @@ -46,8 +47,8 @@
683  {
684    v.resize(in.length(), FALSE);
685    EST_Litem *p;
686 -  int i;
687 -  for (i = 0, p = in.head(); p!= 0; p = next(p), ++i)
688 +  int i = 0;
689 +  for (p = in.head(); p!= 0; p = next(p), ++i)
690      v.a_no_check(i) = in.item(p);
691    
692    return v;
693 @@ -57,7 +58,8 @@
694  {
695      a.resize(in.length(), FALSE);
696      EST_Litem *p;
697 -    for (i = 0, p = in.head(); p!= 0; p = next(p), ++i)
698 +    int i = 0;
699 +    for (p = in.head(); p!= 0; p = next(p), ++i)
700         a[i] = in.item(p);
701  
702      return a;
703 diff -uNr speech_tools.orig/base_class/inst_tmpl/vector_dmatrix_t.cc speech_tools/base_class/inst_tmpl/vector_dmatrix_t.cc
704 --- speech_tools.orig/base_class/inst_tmpl/vector_dmatrix_t.cc  2001-04-04 13:55:32.000000000 +0200
705 +++ speech_tools/base_class/inst_tmpl/vector_dmatrix_t.cc       2004-04-20 01:06:36.254620792 +0200
706 @@ -52,8 +52,8 @@
707  #endif
708  static const EST_DMatrix def_val_DMatrix;
709  static EST_DMatrix error_return_DMatrix;
710 -const EST_DMatrix *EST_TVector<EST_DMatrix>::def_val = &def_val_DMatrix;
711 -EST_DMatrix *EST_TVector<EST_DMatrix>::error_return = &error_return_DMatrix;
712 +template <> const EST_DMatrix *EST_TVector<EST_DMatrix>::def_val = &def_val_DMatrix;
713 +template <> EST_DMatrix *EST_TVector<EST_DMatrix>::error_return = &error_return_DMatrix;
714  
715  int operator !=(const EST_DMatrix &fm1, 
716                 const EST_DMatrix &fm2)
717 diff -uNr speech_tools.orig/base_class/inst_tmpl/vector_dvector_t.cc speech_tools/base_class/inst_tmpl/vector_dvector_t.cc
718 --- speech_tools.orig/base_class/inst_tmpl/vector_dvector_t.cc  2001-04-04 13:55:32.000000000 +0200
719 +++ speech_tools/base_class/inst_tmpl/vector_dvector_t.cc       2004-04-20 01:06:36.255620640 +0200
720 @@ -52,8 +52,8 @@
721  #endif
722  static const EST_DVector def_val_DVector;
723  static EST_DVector error_return_DVector;
724 -const EST_DVector *EST_TVector<EST_DVector>::def_val = &def_val_DVector;
725 -EST_DVector *EST_TVector<EST_DVector>::error_return = &error_return_DVector;
726 +template <> const EST_DVector *EST_TVector<EST_DVector>::def_val = &def_val_DVector;
727 +template <> EST_DVector *EST_TVector<EST_DVector>::error_return = &error_return_DVector;
728  
729  int operator !=(const EST_DVector &fv1, 
730                 const EST_DVector &fv2)
731 diff -uNr speech_tools.orig/base_class/inst_tmpl/vector_fmatrix_t.cc speech_tools/base_class/inst_tmpl/vector_fmatrix_t.cc
732 --- speech_tools.orig/base_class/inst_tmpl/vector_fmatrix_t.cc  2001-04-04 13:55:32.000000000 +0200
733 +++ speech_tools/base_class/inst_tmpl/vector_fmatrix_t.cc       2004-04-20 01:06:36.256620488 +0200
734 @@ -52,8 +52,8 @@
735  #endif
736  static const EST_FMatrix def_val_FMatrix;
737  static EST_FMatrix error_return_FMatrix;
738 -const EST_FMatrix *EST_TVector<EST_FMatrix>::def_val = &def_val_FMatrix;
739 -EST_FMatrix *EST_TVector<EST_FMatrix>::error_return = &error_return_FMatrix;
740 +template <> const EST_FMatrix *EST_TVector<EST_FMatrix>::def_val = &def_val_FMatrix;
741 +template <> EST_FMatrix *EST_TVector<EST_FMatrix>::error_return = &error_return_FMatrix;
742  
743  int operator !=(const EST_FMatrix &fm1, 
744                 const EST_FMatrix &fm2)
745 diff -uNr speech_tools.orig/grammar/scfg/EST_SCFG_inout.cc speech_tools/grammar/scfg/EST_SCFG_inout.cc
746 --- speech_tools.orig/grammar/scfg/EST_SCFG_inout.cc    2001-04-04 13:55:32.000000000 +0200
747 +++ speech_tools/grammar/scfg/EST_SCFG_inout.cc 2004-04-20 01:06:36.257620336 +0200
748 @@ -54,8 +54,8 @@
749  
750  static const EST_bracketed_string def_val_s;
751  static EST_bracketed_string error_return_s;
752 -const EST_bracketed_string *EST_TVector<EST_bracketed_string>::def_val=&def_val_s;
753 -EST_bracketed_string *EST_TVector<EST_bracketed_string>::error_return=&error_return_s;
754 +template <> const EST_bracketed_string *EST_TVector<EST_bracketed_string>::def_val=&def_val_s;
755 +template <> EST_bracketed_string *EST_TVector<EST_bracketed_string>::error_return=&error_return_s;
756  
757  
758  #if defined(INSTANTIATE_TEMPLATES)
759 diff -uNr speech_tools.orig/grammar/wfst/wfst_ops.cc speech_tools/grammar/wfst/wfst_ops.cc
760 --- speech_tools.orig/grammar/wfst/wfst_ops.cc  2001-09-25 19:02:06.000000000 +0200
761 +++ speech_tools/grammar/wfst/wfst_ops.cc       2004-04-20 01:06:36.259620032 +0200
762 @@ -57,8 +57,8 @@
763         static EST_IList int_EST_IList_kv_def_EST_IList_s; 
764         static int int_EST_IList_kv_def_int_s; 
765         
766 -       EST_IList *EST_TKVL< int, EST_IList >::default_val=&int_EST_IList_kv_def_EST_IList_s; 
767 -       int *EST_TKVL< int, EST_IList >::default_key=&int_EST_IList_kv_def_int_s; 
768 +       template <> EST_IList *EST_TKVL< int, EST_IList >::default_val=&int_EST_IList_kv_def_EST_IList_s; 
769 +       template <> int *EST_TKVL< int, EST_IList >::default_key=&int_EST_IList_kv_def_int_s; 
770         
771         Declare_TList_N(KVI_int_EST_IList_t, 0)
772  
773 diff -uNr speech_tools.orig/include/EST_THash.h speech_tools/include/EST_THash.h
774 --- speech_tools.orig/include/EST_THash.h       2002-12-26 16:48:53.000000000 +0100
775 +++ speech_tools/include/EST_THash.h    2004-04-20 01:06:36.261619728 +0200
776 @@ -279,7 +279,7 @@
777  public:
778  
779    /// Create a string hash table of <parameter>size</parameter> buckets.
780 -  EST_TStringHash(int size) : EST_THash<EST_String, V>(size, StringHash) {};
781 +  EST_TStringHash(int size) : EST_THash<EST_String, V>(size, EST_HashFunctions::StringHash) {};
782  
783    /// An entry returned by the iterator is a key value pair.
784    typedef EST_Hash_Pair<EST_String, V> Entry;
785 @@ -289,9 +289,11 @@
786  
787  
788    /// Give the iterator a sensible name.
789 -  typedef EST_TStructIterator< EST_THash<EST_String, V>, IPointer, EST_Hash_Pair<EST_String, V> > Entries;
790 +  typedef EST_TStructIterator< EST_THash<EST_String, V>, typename EST_THash<EST_String, V>::IPointer,
791 +                                   EST_Hash_Pair<EST_String, V> > Entries;
792  
793 -  typedef EST_TRwStructIterator< EST_THash<EST_String, V>, IPointer, EST_Hash_Pair<EST_String, V> > RwEntries;
794 +  typedef EST_TRwStructIterator< EST_THash<EST_String, V>, typename EST_THash<EST_String, V>::IPointer,
795 +                                   EST_Hash_Pair<EST_String, V> > RwEntries;
796    //@}
797  
798    typedef EST_String KeyEntry;
799 @@ -300,8 +302,10 @@
800      typedef struct IPointer_k_s IPointer_k; */
801  
802    /// Give the iterator a sensible name.
803 -  typedef EST_TIterator< EST_THash<EST_String, V>, IPointer_k, EST_String > KeyEntries;
804 -  typedef EST_TRwIterator< EST_THash<EST_String, V>, IPointer_k, EST_String > KeyRwEntries;
805 +  typedef EST_TIterator< EST_THash<EST_String, V>, typename EST_THash<EST_String, V>::IPointer_k,
806 +                           EST_String > KeyEntries;
807 +  typedef EST_TRwIterator< EST_THash<EST_String, V>, typename EST_THash<EST_String, V>::IPointer_k,
808 +                           EST_String > KeyRwEntries;
809  };
810  
811  
812 diff -uNr speech_tools.orig/include/EST_TIterator.h speech_tools/include/EST_TIterator.h
813 --- speech_tools.orig/include/EST_TIterator.h   2002-12-26 16:48:54.000000000 +0100
814 +++ speech_tools/include/EST_TIterator.h        2004-04-20 01:06:36.263619424 +0200
815 @@ -201,18 +201,18 @@
816    typedef EST_TIterator<Container, IPointer, Entry> Iter;
817  
818    /// Create an iterator not associated with any specific container.
819 -  EST_TStructIterator() {cont=NULL;}
820 +  EST_TStructIterator() {this->cont=NULL;}
821  
822    /// Copy an iterator by assignment
823    Iter &operator = (const Iter &orig)
824 -    { cont=orig.cont; pos=orig.pos; pointer=orig.pointer; return *this;}
825 +    { this->cont=orig.cont; this->pos=orig.pos; this->pointer=orig.pointer; return *this;}
826  
827    /// Create an iterator ready to run over the given container.
828    EST_TStructIterator(const Container &over)
829      { begin(over); }
830  
831    const Entry *operator ->() const
832 -    {return &current();}
833 +    {return &this->current();}
834  };
835  
836  template <class Container, class IPointer, class Entry>
837 @@ -231,11 +231,11 @@
838    typedef EST_TIterator<Container, IPointer, Entry> Iter;
839  
840    /// Create an iterator not associated with any specific container.
841 -  EST_TRwIterator() {cont=NULL;}
842 +  EST_TRwIterator() {this->cont=NULL;}
843  
844    /// Copy an iterator by assignment
845    Iter &operator = (const Iter &orig)
846 -    { cont=orig.cont; pos=orig.pos; pointer=orig.pointer; return *this;}
847 +    { this->cont=orig.cont; this->pos=orig.pos; this->pointer=orig.pointer; return *this;}
848  
849    /// Create an iterator ready to run over the given container.
850    EST_TRwIterator(Container &over)
851 @@ -243,14 +243,14 @@
852  
853    /// Set the iterator ready to run over this container.
854    void begin(Container &over)
855 -    {cont=&over; beginning();}
856 +    {this->cont=&over; this->beginning();}
857  
858    /**@name Access
859      */
860    //@{
861    /// Return the element currentl pointed to.
862    Entry& current() const
863 -    {return cont->points_at(pointer);}
864 +    {return this->cont->points_at(this->pointer);}
865  
866    /// The * operator returns the current element. 
867    Entry &operator *() const
868 @@ -264,8 +264,8 @@
869    /// Return the current element and move the pointer forwards.
870    Entry& next_element() 
871         { 
872 -         Entry &it = cont->points_at(pointer); 
873 -         cont->move_pointer_forwards(pointer); 
874 +         Entry &it = this->cont->points_at(this->pointer); 
875 +         this->cont->move_pointer_forwards(this->pointer); 
876           return it; 
877         }
878  
879 @@ -281,18 +281,18 @@
880    typedef EST_TIterator<Container, IPointer, Entry> Iter;
881  
882    /// Create an iterator not associated with any specific container.
883 -  EST_TRwStructIterator() {cont=NULL;}
884 +  EST_TRwStructIterator() {this->cont=NULL;}
885  
886    /// Copy an iterator by assignment
887    Iter &operator = (const Iter &orig)
888 -    { cont=orig.cont; pos=orig.pos; pointer=orig.pointer; return *this;}
889 +    { this->cont=orig.cont; this->pos=orig.pos; this->pointer=orig.pointer; return *this;}
890  
891    /// Create an iterator ready to run over the given container.
892    EST_TRwStructIterator(Container &over)
893      { begin(over); }
894  
895    Entry *operator ->() const
896 -    {return &current();}
897 +    {return &this->current();}
898  };
899  
900  #endif
901 diff -uNr speech_tools.orig/include/EST_TMatrix.h speech_tools/include/EST_TMatrix.h
902 --- speech_tools.orig/include/EST_TMatrix.h     2001-07-25 13:02:36.000000000 +0200
903 +++ speech_tools/include/EST_TMatrix.h  2004-04-20 01:06:36.264619272 +0200
904 @@ -104,7 +104,7 @@
905      {
906  
907        return mcell_pos(r, c, 
908 -                      p_row_step, p_column_step);
909 +                      this->p_row_step, this->p_column_step);
910      }
911  
912    INLINE unsigned int mcell_pos_1(int r, int c) const
913 @@ -116,14 +116,14 @@
914  
915    /// quick method for returning {\tt x[m][n]}
916    INLINE const T &fast_a_m(int r, int c) const 
917 -    { return p_memory[mcell_pos(r,c)]; }
918 +    { return this->p_memory[mcell_pos(r,c)]; }
919    INLINE T &fast_a_m(int r, int c) 
920 -    { return p_memory[mcell_pos(r,c)]; }
921 +    { return this->p_memory[mcell_pos(r,c)]; }
922  
923    INLINE const T &fast_a_1(int r, int c) const 
924 -    { return p_memory[mcell_pos_1(r,c)]; }
925 +    { return this->p_memory[mcell_pos_1(r,c)]; }
926    INLINE T &fast_a_1(int r, int c) 
927 -    { return p_memory[mcell_pos_1(r,c)]; }
928 +    { return this->p_memory[mcell_pos_1(r,c)]; }
929    
930  
931      /// Get and set values from array
932 @@ -173,9 +173,9 @@
933    //@{
934  
935    /// return number of rows
936 -  int num_rows() const {return p_num_rows;}
937 +  int num_rows() const {return this->p_num_rows;}
938    /// return number of columns
939 -  int num_columns() const {return p_num_columns;}
940 +  int num_columns() const {return this->p_num_columns;}
941  
942    /// const access with no bounds check, care recommend
943    INLINE const T &a_no_check(int row, int col) const 
944 @@ -214,7 +214,7 @@
945  
946    /// fill matrix with value v
947    void fill(const T &v);
948 -  void fill() { fill(*def_val); }
949 +  void fill() { fill(*this->def_val); }
950  
951    /// assignment operator
952    EST_TMatrix &operator=(const EST_TMatrix &s); 
953 diff -uNr speech_tools.orig/include/EST_TNamedEnum.h speech_tools/include/EST_TNamedEnum.h
954 --- speech_tools.orig/include/EST_TNamedEnum.h  2001-04-04 13:55:32.000000000 +0200
955 +++ speech_tools/include/EST_TNamedEnum.h       2004-04-20 01:06:36.265619120 +0200
956 @@ -124,9 +124,9 @@
957  public:
958  
959    EST_TNamedEnumI(EST_TValuedEnumDefinition<ENUM,const char *,INFO> defs[])
960 -       {initialise((const void *)defs); };
961 +       {this->initialise((const void *)defs); };
962    EST_TNamedEnumI(EST_TValuedEnumDefinition<const char *,const char *,INFO> defs[], ENUM (*conv)(const char *))
963 -       {initialise((const void *)defs, conv); };
964 +       {this->initialise((const void *)defs, conv); };
965    const char *name(ENUM tok, int n=0) const {return value(tok,n); };
966  
967  };
968 @@ -136,9 +136,9 @@
969  template<class ENUM, class VAL> class EST_TValuedEnum : public EST_TValuedEnumI<ENUM,VAL,NO_INFO> { 
970  public:
971    EST_TValuedEnum(EST_TValuedEnumDefinition<ENUM,VAL,NO_INFO> defs[]) 
972 -       {initialise((const void *)defs);};
973 +       {this->initialise((const void *)defs);};
974    EST_TValuedEnum(EST_TValuedEnumDefinition<const char *,VAL,NO_INFO> defs[], ENUM (*conv)(const char *)) 
975 -       {initialise((const void *)defs, conv);};
976 +       {this->initialise((const void *)defs, conv);};
977  };
978  
979  
980 @@ -148,11 +148,11 @@
981    EST_write_status priv_save(EST_String name, EST_TNamedEnum *definitive, char quote) const;
982  public:
983    EST_TNamedEnum(ENUM undef_e, const char *undef_n = NULL) 
984 -       {initialise(undef_e, undef_n);};
985 +       {this->initialise(undef_e, undef_n);};
986    EST_TNamedEnum(EST_TValuedEnumDefinition<ENUM,const char *,NO_INFO> defs[]) 
987 -       {initialise((const void *)defs);};
988 +       {this->initialise((const void *)defs);};
989    EST_TNamedEnum(EST_TValuedEnumDefinition<const char *,const char *,NO_INFO> defs[], ENUM (*conv)(const char *)) 
990 -       {initialise((const void *)defs, conv);};
991 +       {this->initialise((const void *)defs, conv);};
992  
993    EST_read_status load(EST_String name) { return priv_load(name, NULL); };
994    EST_read_status load(EST_String name, EST_TNamedEnum &definitive) { return priv_load(name, &definitive); };
995 diff -uNr speech_tools.orig/include/EST_TSimpleVector.h speech_tools/include/EST_TSimpleVector.h
996 --- speech_tools.orig/include/EST_TSimpleVector.h       2001-04-04 13:55:32.000000000 +0200
997 +++ speech_tools/include/EST_TSimpleVector.h    2004-04-20 01:06:36.266618968 +0200
998 @@ -74,7 +74,7 @@
999      void zero(void);
1000  
1001      /// Fill vector with default value
1002 -    void empty(void) { if (*def_val == 0) zero(); else fill(*def_val); }
1003 +    void empty(void) { if (*this->def_val == 0) zero(); else fill(*this->def_val); }
1004  };
1005  
1006  #endif
1007 diff -uNr speech_tools.orig/include/instantiate/EST_TDequeI.h speech_tools/include/instantiate/EST_TDequeI.h
1008 --- speech_tools.orig/include/instantiate/EST_TDequeI.h 2001-04-04 15:11:27.000000000 +0200
1009 +++ speech_tools/include/instantiate/EST_TDequeI.h      2004-04-20 01:06:36.266618968 +0200
1010 @@ -54,16 +54,16 @@
1011  #define Instantiate_TDEQ(T) Instantiate_TDEQ_T(T, T) 
1012  
1013  #define Declare_TDEQ_T(T, TAG)  \
1014 -       const T *EST_TDeque< T >::Filler=NULL;
1015 +       template <> const T *EST_TDeque< T >::Filler=NULL;
1016  
1017  #define Declare_TDEQ_Base_T(T, FILLER ,TAG) \
1018         const T TAG ## _deq_filler=FILLER; \
1019 -       const T *EST_TDeque< T >::Filler=& TAG ## _deq_filler;
1020 +       template <> const T *EST_TDeque< T >::Filler=& TAG ## _deq_filler;
1021         
1022  
1023  #define Declare_TDEQ_Class_T(T, FILLER,TAG) \
1024         const T TAG ## _deq_filler(FILLER); \
1025 -       const T *EST_TDeque< T >::Filler=& TAG ## _deq_filler;
1026 +       template <> const T *EST_TDeque< T >::Filler=& TAG ## _deq_filler;
1027  
1028  #define Declare_TDEQ(T) Declare_TDEQ_T(T, T)
1029  
1030 diff -uNr speech_tools.orig/include/instantiate/EST_THashI.h speech_tools/include/instantiate/EST_THashI.h
1031 --- speech_tools.orig/include/instantiate/EST_THashI.h  2001-04-04 15:11:27.000000000 +0200
1032 +++ speech_tools/include/instantiate/EST_THashI.h       2004-04-20 01:06:36.267618816 +0200
1033 @@ -77,17 +77,17 @@
1034  
1035  
1036  #define Declare_THash_T(KEY, VAL, TAG) \
1037 -       VAL EST_THash< KEY, VAL >::Dummy_Value; \
1038 -       KEY EST_THash< KEY, VAL >::Dummy_Key; \
1039 +       template <> VAL EST_THash< KEY, VAL >::Dummy_Value; \
1040 +       template <> KEY EST_THash< KEY, VAL >::Dummy_Key; \
1041         EST_THash< KEY, VAL > TAG ## _hash_dummy(0);
1042  
1043  #define Declare_THash_Base_T(KEY, VAL, DEFAULTK, DEFAULT, ERROR,TAG) \
1044 -       KEY EST_THash< KEY, VAL >::Dummy_Key=DEFAULTK; \
1045 -       VAL EST_THash<KEY, VAL>::Dummy_Value=DEFAULT;
1046 +       template <> KEY EST_THash< KEY, VAL >::Dummy_Key=DEFAULTK; \
1047 +       template <> VAL EST_THash<KEY, VAL>::Dummy_Value=DEFAULT;
1048  
1049  #define Declare_THash_Class_T(KEY, VAL, DEFAULTK, DEFAULT, ERROR,TAG) \
1050 -       KEY EST_THash< KEY, VAL >::Dummy_Key(DEFAULTK); \
1051 -       VAL EST_THash<KEY, VAL>::Dummy_Value(DEFAULT);
1052 +       template <> KEY EST_THash< KEY, VAL >::Dummy_Key(DEFAULTK); \
1053 +       template <> VAL EST_THash<KEY, VAL>::Dummy_Value(DEFAULT);
1054  
1055  #define Declare_THash(KEY, VAL) Declare_THash_T(KEY, VAL, KEY ## VAL)
1056  
1057 diff -uNr speech_tools.orig/include/instantiate/EST_TKVLI.h speech_tools/include/instantiate/EST_TKVLI.h
1058 --- speech_tools.orig/include/instantiate/EST_TKVLI.h   2001-04-04 15:11:27.000000000 +0200
1059 +++ speech_tools/include/instantiate/EST_TKVLI.h        2004-04-20 01:06:36.268618664 +0200
1060 @@ -71,8 +71,8 @@
1061         static VAL TAG##_kv_def_val_s; \
1062         static KEY TAG##_kv_def_key_s; \
1063         \
1064 -       VAL *EST_TKVL< KEY, VAL >::default_val=&TAG##_kv_def_val_s; \
1065 -       KEY *EST_TKVL< KEY, VAL >::default_key=&TAG##_kv_def_key_s; \
1066 +       template <> VAL *EST_TKVL< KEY, VAL >::default_val=&TAG##_kv_def_val_s; \
1067 +       template <> KEY *EST_TKVL< KEY, VAL >::default_key=&TAG##_kv_def_key_s; \
1068         \
1069         Declare_TList_N(KVI_ ## TAG ## _t, MaxFree)
1070  #define Declare_KVL_T(KEY, VAL, TAG) \
1071 @@ -85,8 +85,8 @@
1072         static VAL TAG##_kv_def_val_s=DEFV; \
1073         static KEY TAG##_kv_def_key_s=DEFK; \
1074         \
1075 -       VAL *EST_TKVL< KEY, VAL >::default_val=&TAG##_kv_def_val_s; \
1076 -       KEY *EST_TKVL< KEY, VAL >::default_key=&TAG##_kv_def_key_s; \
1077 +       template <> VAL *EST_TKVL< KEY, VAL >::default_val=&TAG##_kv_def_val_s; \
1078 +       template <> KEY *EST_TKVL< KEY, VAL >::default_key=&TAG##_kv_def_key_s; \
1079         \
1080         Declare_TList_N(KVI_ ## TAG ## _t, MaxFree)
1081  #define Declare_KVL_Base_T(KEY, VAL, DEFV, DEFK, TAG) \
1082 @@ -99,8 +99,8 @@
1083         static VAL TAG##_kv_def_val_s(DEFV); \
1084         static KEY TAG##_kv_def_key_s(DEFK); \
1085         \
1086 -       VAL *EST_TKVL< KEY, VAL >::default_val=&TAG##_kv_def_val_s; \
1087 -       KEY *EST_TKVL< KEY, VAL >::default_key=&TAG##_kv_def_key_s; \
1088 +       template <> VAL *EST_TKVL< KEY, VAL >::default_val=&TAG##_kv_def_val_s; \
1089 +       template <> KEY *EST_TKVL< KEY, VAL >::default_key=&TAG##_kv_def_key_s; \
1090         \
1091         Declare_TList_N(KVI_ ## TAG ## _t, MaxFree)
1092  #define Declare_KVL_Class_T(KEY, VAL, DEFV, DEFK,TAG) \
1093 diff -uNr speech_tools.orig/include/instantiate/EST_TListI.h speech_tools/include/instantiate/EST_TListI.h
1094 --- speech_tools.orig/include/instantiate/EST_TListI.h  2001-04-04 15:11:27.000000000 +0200
1095 +++ speech_tools/include/instantiate/EST_TListI.h       2004-04-20 01:06:36.269618512 +0200
1096 @@ -64,9 +64,9 @@
1097  
1098  #define Declare_TList_TN(TYPE,MaxFree,TAG) \
1099         typedef TYPE TLIST_ ## TAG ## _VAL; \
1100 -       EST_TItem< TYPE > * EST_TItem< TYPE >::s_free=NULL; \
1101 -       unsigned int EST_TItem< TYPE >::s_maxFree=MaxFree; \
1102 -       unsigned int EST_TItem< TYPE >::s_nfree=0;
1103 +       template <> EST_TItem< TYPE > * EST_TItem< TYPE >::s_free=NULL; \
1104 +       template <> unsigned int EST_TItem< TYPE >::s_maxFree=MaxFree; \
1105 +       template <> unsigned int EST_TItem< TYPE >::s_nfree=0;
1106  #define Declare_TList_T(TYPE,TAG) \
1107         Declare_TList_TN(TYPE,0,TAG)
1108  
1109 diff -uNr speech_tools.orig/include/instantiate/EST_TVectorI.h speech_tools/include/instantiate/EST_TVectorI.h
1110 --- speech_tools.orig/include/instantiate/EST_TVectorI.h        2001-04-04 15:11:27.000000000 +0200
1111 +++ speech_tools/include/instantiate/EST_TVectorI.h     2004-04-20 01:06:36.270618360 +0200
1112 @@ -62,22 +62,22 @@
1113         static TYPE const TAG##_vec_def_val_s; \
1114         static TYPE TAG##_vec_error_return_s; \
1115         \
1116 -       TYPE const *EST_TVector< TYPE >::def_val=&TAG##_vec_def_val_s; \
1117 -       TYPE *EST_TVector< TYPE >::error_return=&TAG##_vec_error_return_s;
1118 +       template <> TYPE const *EST_TVector< TYPE >::def_val=&TAG##_vec_def_val_s; \
1119 +       template <> TYPE *EST_TVector< TYPE >::error_return=&TAG##_vec_error_return_s;
1120  
1121  #define Declare_TVector_Base_T(TYPE,DEFAULT,ERROR,TAG)  \
1122         static TYPE const TAG##_vec_def_val_s=DEFAULT; \
1123         static TYPE TAG##_vec_error_return_s=ERROR; \
1124         \
1125 -       TYPE const *EST_TVector<TYPE>::def_val=&TAG##_vec_def_val_s; \
1126 -       TYPE *EST_TVector<TYPE>::error_return=&TAG##_vec_error_return_s;
1127 +       template <> TYPE const *EST_TVector<TYPE>::def_val=&TAG##_vec_def_val_s; \
1128 +       template <> TYPE *EST_TVector<TYPE>::error_return=&TAG##_vec_error_return_s;
1129  
1130  #define Declare_TVector_Class_T(TYPE,DEFAULT,ERROR,TAG)  \
1131         static TYPE const TAG##_vec_def_val_s(DEFAULT); \
1132         static TYPE TAG##_vec_error_return_s(ERROR); \
1133         \
1134 -       TYPE const *EST_TVector<TYPE>::def_val=&TAG##_vec_def_val_s; \
1135 -       TYPE *EST_TVector<TYPE>::error_return=&TAG##_vec_error_return_s;
1136 +       template <> TYPE const *EST_TVector<TYPE>::def_val=&TAG##_vec_def_val_s; \
1137 +       template <> TYPE *EST_TVector<TYPE>::error_return=&TAG##_vec_error_return_s;
1138  
1139  #define Declare_TVector(TYPE) Declare_TVector_T(TYPE,TYPE)
1140  #define Declare_TVector_Base(TYPE,DEFAULT,ERROR)  Declare_TVector_Base_T(TYPE,DEFAULT,ERROR,TYPE)
1141 diff -uNr speech_tools.orig/stats/dynamic_program.cc speech_tools/stats/dynamic_program.cc
1142 --- speech_tools.orig/stats/dynamic_program.cc  2001-04-04 13:55:32.000000000 +0200
1143 +++ speech_tools/stats/dynamic_program.cc       2004-04-20 01:06:36.271618208 +0200
1144 @@ -50,10 +50,10 @@
1145  #endif
1146  
1147  static EST_Item *const def_val_item_ptr = NULL;
1148 -EST_Item* const *EST_Item_ptr_Vector::def_val = &def_val_item_ptr;
1149 +template <> EST_Item* const *EST_Item_ptr_Vector::def_val = &def_val_item_ptr;
1150  
1151  static EST_Item* error_return_item_ptr = NULL;
1152 -EST_Item* *EST_Item_ptr_Vector::error_return = &error_return_item_ptr;
1153 +template <> EST_Item* *EST_Item_ptr_Vector::error_return = &error_return_item_ptr;
1154  
1155  typedef
1156  float (*local_cost_function)(const EST_Item *item1,
This page took 0.136285 seconds and 3 git commands to generate.