mirror of
https://github.com/linux-speakup/espeakup.git
synced 2026-08-09 09:19:09 +02:00
use dupeString in command line processing
This commit is contained in:
parent
4272a5299a
commit
69506e2976
1 changed files with 3 additions and 5 deletions
|
|
@ -23,6 +23,7 @@
|
|||
#include <string.h>
|
||||
|
||||
#include "espeakup.h"
|
||||
#include "stringhandling.h"
|
||||
#include "version.h"
|
||||
|
||||
/* pid path */
|
||||
|
|
@ -72,18 +73,15 @@ static void show_version(void)
|
|||
void process_cli(int argc, char **argv)
|
||||
{
|
||||
int opt;
|
||||
char *cp;
|
||||
|
||||
do {
|
||||
opt = getopt_long(argc, argv, shortOptions, longOptions, NULL);
|
||||
switch (opt) {
|
||||
case 'p':
|
||||
cp = strdup(optarg);
|
||||
if (cp != NULL)
|
||||
pidPath = cp;
|
||||
pidPath = dupeString(optarg);
|
||||
break;
|
||||
case 'V':
|
||||
defaultVoice = strdup(optarg);
|
||||
defaultVoice = dupeString(optarg);
|
||||
break;
|
||||
case 'a':
|
||||
espeakup_mode = ESPEAKUP_MODE_ACSINT;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue