-
Notifications
You must be signed in to change notification settings - Fork 0
/
options.h
81 lines (73 loc) · 2.18 KB
/
options.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
/*
* options.h - Defines possible command line options
*
* Copyright (C) 2003, 2006 Brailcom, o.p.s.
*
* This is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2, or (at your option)
* any later version.
*
* This software is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this package; see the file COPYING. If not, write to
* the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*
* $Id: options.h,v 1.11 2008-05-05 09:15:25 hanke Exp $
*/
#include <getopt.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#define PACKAGE "speechd-up"
#define MODE_DAEMON 1
#define MODE_SINGLE 0
#define DEFAULT 0
#define COMMAND_LINE 1
#define CONFIG_FILE 2
struct {
int log_level;
int log_level_set;
char *log_file_name;
int log_file_name_set;
int spd_spk_mode;
char *config_file_name;
char *speakup_device;
int speakup_device_set;
char *speakup_chartab;
int speakup_chartab_set;
char * speakup_characters;
int speakup_characters_set;
char *speakup_coding;
int speakup_coding_set;
char *language;
int language_set;
int probe_mode;
int dont_init_tables;
int dont_init_tables_set;
} options;
static struct option spd_long_options[] = {
{"run-daemon", 0, 0, 'd'},
{"run-single", 0, 0, 's'},
{"log-level", 1, 0, 'l'},
{"log-file", 1, 0, 'L'},
{"config-file", 1, 0, 'C'},
{"device", 1, 0, 'D'},
{"coding", 1, 0, 'c'},
{"language", 1, 0, 'i'},
{"synthesis", 1, 0, 'S'},
{"dont-init-tables", 0, 0, 't'},
{"probe", 0, 0, 'p'},
{"version", 0, 0, 'v'},
{"help", 0, 0, 0},
{0, 0, 0, 0}
};
static char* spd_short_options = "dsvhpti:l:L:C:D:S:c:";
void options_set_default(void);
void options_print_version(void);
void options_parse(int argc, char *argv[]);