espeakedit/espeakedit-wx3.diff

46 lines
1.1 KiB
Diff

From: Jan Engelhardt <jengelh@inai.de>
Date: 2016-06-29 16:03:01.838755093 +0200
Make espeakedit build with wxWidgets 3.
---
src/espeakedit.cpp | 17 +++--------------
1 file changed, 3 insertions(+), 14 deletions(-)
Index: espeakedit-1.48.03/src/espeakedit.cpp
===================================================================
--- espeakedit-1.48.03.orig/src/espeakedit.cpp
+++ espeakedit-1.48.03/src/espeakedit.cpp
@@ -116,20 +116,10 @@ static const char *help_text =
// Initialise this in OnInit, not statically
bool MyApp::OnInit(void)
{//=====================
-
-int j;
-wxChar *p;
-char param[120];
-
-
if(argc > 1)
{
- p = argv[1];
- j = 0;
- while((param[j] = p[j]) != 0) j++;
-
- if((strcmp(param,"--help")==0) || (strcmp(param,"-h")==0))
- {
+ wxString param = argv[1];
+ if (param == "--help" || param == "-h") {
printf(about_string2,espeak_Info(NULL));
printf("%s", help_text);
exit(0);
@@ -137,8 +127,7 @@ if(argc > 1)
ConfigInit();
- if(strcmp(param,"--compile")==0)
- {
+ if (param == "--compile") {
samplerate_native = samplerate = 22050;
LoadPhData(NULL);
if(LoadVoice("", 0) == NULL)