~ubuntu-branches/ubuntu/maverick/speech-tools/maverick

« back to all changes in this revision

Viewing changes to base_class/string/EST_String.cc

  • Committer: Bazaar Package Importer
  • Author(s): Kumar Appaiah, Kartik Mistry, Kumar Appaiah
  • Date: 2010-07-17 11:32:04 UTC
  • mfrom: (3.1.6 sid)
  • Revision ID: james.westby@ubuntu.com-20100717113204-mnse3jo236j107q8
Tags: 1:2.0.95~beta-1
[ Kartik Mistry ]
* debian/control:
  + [Lintian] Added missing ${misc:Depends}
  + Updated Standards-Version to 3.8.4 (no changes needed)
* debian/patches/const_char.diff:
  + Added missing patch header
* Removed unused patch invalid_const_char_conversion_fixes.diff

[ Kumar Appaiah ]
* New upstream release.
* Standards Version is now 3.9.0 (No changes needed)
* Update debian/rules to specify version numbers.

Show diffs side-by-side

added added

removed removed

Lines of Context:
245
245
 
246
246
EST_String EST_String::chop_internal (EST_Regex &it, int from, EST_chop_direction mode) const
247
247
{
248
 
  int start, end;
 
248
  int start=0, end=0;
249
249
  
250
250
  if (locate(it, from, start, end))
251
251
    switch (mode)
1001
1001
{
1002
1002
  int pos=0;
1003
1003
  int n=0;
1004
 
  int start, end;
 
1004
  int start, end=0;
1005
1005
 
1006
1006
  while (locate(ex, pos, start, end))
1007
1007
    {
1268
1268
  long val = strtol(str(), &end, 10);
1269
1269
 
1270
1270
  if (end==NULL|| *end != '\0')
 
1271
  {
1271
1272
    if (valid != NULL)
1272
1273
      {
1273
1274
        *valid=0;
1279
1280
                (const char *)str());
1280
1281
        exit(0);
1281
1282
      }
 
1283
  }
1282
1284
 
1283
1285
  if (valid)
1284
1286
    *valid=1;
1294
1296
    return 0L;
1295
1297
 
1296
1298
  if (val > INT_MAX || val < INT_MIN)
 
1299
  {
1297
1300
    if (valid != NULL)
1298
1301
      {
1299
1302
        *valid=0;
1305
1308
               val);
1306
1309
        exit(0);
1307
1310
      }
 
1311
  }
1308
1312
 
1309
1313
  return val;
1310
1314
}
1316
1320
  double val = strtod(str(), &end);
1317
1321
 
1318
1322
  if (end==NULL|| *end != '\0')
 
1323
  {
1319
1324
    if (valid != NULL)
1320
1325
      {
1321
1326
        *valid=0;
1327
1332
                (const char *)str());
1328
1333
        exit(0);
1329
1334
      }
 
1335
  }
1330
1336
 
1331
1337
  if (valid)
1332
1338
    *valid=1;
1342
1348
    return 0.0;
1343
1349
 
1344
1350
  if (val > FLT_MAX || val < -FLT_MAX) 
 
1351
  {
1345
1352
    if (valid != NULL)
1346
1353
      {
1347
1354
        *valid=0;
1353
1360
               val);
1354
1361
        exit(0);
1355
1362
      }
 
1363
  }
1356
1364
 
1357
1365
  return val;
1358
1366
}