~ubuntu-branches/ubuntu/oneiric/espeak/oneiric

« back to all changes in this revision

Viewing changes to src/speak_lib.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Luke Yelavich
  • Date: 2011-05-04 11:25:46 UTC
  • mfrom: (1.1.24 upstream) (5.1.10 sid)
  • Revision ID: james.westby@ubuntu.com-20110504112546-ykijzihgc7ybgzn2
Tags: 1.45.04-1ubuntu1
* Merge from debian unstable, remaining changes:
  - Add gbp.conf for use with git buildpackage
  - Update the explanation of the -b command-line flag in the espeak manpage

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/***************************************************************************
2
 
 *   Copyright (C) 2005 to 2010 by Jonathan Duddington                     *
 
2
 *   Copyright (C) 2005 to 2011 by Jonathan Duddington                     *
3
3
 *   email: jonsd@users.sourceforge.net                                    *
4
4
 *                                                                         *
5
5
 *   This program is free software; you can redistribute it and/or modify  *
370
370
#endif
371
371
}
372
372
 
373
 
static int initialise(void)
374
 
{//========================
 
373
static int initialise(int control)
 
374
{//===============================
375
375
        int param;
376
376
        int result;
377
377
 
382
382
                if(result == -1)
383
383
                {
384
384
                        fprintf(stderr,"Failed to load espeak-data\n");
385
 
                        exit(1);
 
385
                        if((control & espeakINITIALIZE_DONT_EXIT) == 0)
 
386
                        {
 
387
                                exit(1);
 
388
                        }
386
389
                }
387
390
                else
388
391
                        fprintf(stderr,"Wrong version of espeak-data 0x%x (expects 0x%x) at %s\n",result,version_phdata,path_home);
528
531
                                }
529
532
                        }
530
533
                }
531
 
    }
532
 
  return(EE_OK);
 
534
        }
 
535
        return(EE_OK);
533
536
}  //  end of Synthesize
534
537
 
535
538
#ifdef DEBUG_ENABLED
745
748
#endif
746
749
        
747
750
        init_path(path);
748
 
        initialise();
 
751
        initialise(options);
749
752
        select_output(output_type);
750
753
 
751
754
        if(f_logespeak)
1222
1225
        return EE_OK;
1223
1226
}   //  end of espeak_Terminate
1224
1227
 
1225
 
ESPEAK_API const char *espeak_Info(void *)
1226
 
{//=======================================
 
1228
ESPEAK_API const char *espeak_Info(const char **ptr)
 
1229
{//=================================================
 
1230
        if(ptr != NULL)
 
1231
        {
 
1232
                *ptr = path_home;
 
1233
        }
1227
1234
        return(version_string);
1228
1235
}
1229
1236