Browse Source

espeakedit: fix argument processing for unicode argv types

master
Reece H. Dunn 9 years ago
parent
commit
61522a12a3
1 changed files with 6 additions and 6 deletions
  1. 6
    6
      src/espeakedit.cpp

+ 6
- 6
src/espeakedit.cpp View File

/*************************************************************************** /***************************************************************************
* Copyright (C) 2005 to 2015 by Jonathan Duddington * * Copyright (C) 2005 to 2015 by Jonathan Duddington *
* email: [email protected] * * email: [email protected] *
* Copyright (C) 2013 by Reece H. Dunn *
* Copyright (C) 2013-2015 by Reece H. Dunn *
* * * *
* This program is free software; you can redistribute it and/or modify * * This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by * * it under the terms of the GNU General Public License as published by *
"\tCompile phoneme data in espeak-data/phsource\n" "\tCompile phoneme data in espeak-data/phsource\n"
"\tand dictionary data in espeak-data/dictsource\n"; "\tand dictionary data in espeak-data/dictsource\n";



// Initialise this in OnInit, not statically // Initialise this in OnInit, not statically
bool MyApp::OnInit(void) bool MyApp::OnInit(void)
{//===================== {//=====================


int j; int j;
const wxChar *p;
char param[120]; char param[120];



if(argc > 1) if(argc > 1)
{ {
p = argv[1];
j = 0;
#if wxUSE_UNICODE == 1
wcstombs(param, argv[1], sizeof(param));
#else
const char *p = argv[1];
while((param[j] = p[j]) != 0) j++; while((param[j] = p[j]) != 0) j++;
#endif


if((strcmp(param,"--help")==0) || (strcmp(param,"-h")==0)) if((strcmp(param,"--help")==0) || (strcmp(param,"-h")==0))
{ {

Loading…
Cancel
Save