3
3
Based on BRLTTY, copyright (C) 1999-2006 by
6
Copyright (C) 2004, 2005, 2006
7
ViewPlus Technologies, Inc. www.viewplus.com
6
Copyright (C) 2004, 2005, 2006, 2009
7
ViewPlus Technologies, Inc. www.viewplus.com and
9
8
JJB Software, Inc. www.jjb-software.com
11
This file is free software; you can redistribute it and/or modify it
12
under the terms of the GNU General Public License as published by the
13
Free Software Foundation; either version 2, or (at your option) any
16
In addition to the permissions in the GNU General Public License, the
17
copyright holders give you unlimited permission to link the
18
compiled version of this file into combinations with other programs,
19
and to distribute those combinations without any restriction coming
20
from the use of this file. (The General Public License restrictions
21
do apply in other respects; for example, they cover modification of
22
the file, and distribution when not linked into a combine
25
This file is distributed in the hope that it will be useful, but
26
WITHOUT ANY WARRANTY; without even the implied warranty of
27
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
28
General Public License for more details.
10
This program is free software: you can redistribute it and/or modify
11
it under the terms of the GNU General Public License as published by
12
the Free Software Foundation, either version 3 of the License, or
13
(at your option) any later version.
15
This program is distributed in the hope that it will be useful,
16
but WITHOUT ANY WARRANTY; without even the implied warranty of
17
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18
GNU General Public License for more details.
30
20
You should have received a copy of the GNU General Public License
31
along with this program; see the file COPYING. If not, write to
32
the Free Software Foundation, 51 Franklin Street, Fifth Floor,
33
Boston, MA 02110-1301, USA.
21
along with this program. If not, see <http://www.gnu.org/licenses/>.
35
23
Maintained by John J. Boyer john.boyer@jjb-software.com
39
31
#include <string.h>
40
32
#include <stdlib.h>
36
#include "version-etc.h"
38
static const struct option longopts[] =
40
{ "help", no_argument, NULL, 'h' },
41
{ "version", no_argument, NULL, 'v' },
45
const char version_etc_copyright[] =
46
"Copyright %s %d ViewPlus Technologies, Inc. and JJB Software, Inc.";
48
#define AUTHORS "John J. Boyer"
54
Usage: %s [OPTION] TABLE\n", program_name);
57
Examine and debug Braille translation tables. This program allows you\n\
58
to inspect liblouis translation tables and gather information about\n\
59
them, such as forward and backward rules, characters and dot patterns,\n\
60
specific opcodes, the size of a table, whether a hyphenation\n\
61
table is used, how many passes the translation takes and much\n\
65
-h, --help display this help and exit\n\
66
-v, --version display version information and exit\n", stdout);
70
Report bugs to <%s>.\n", PACKAGE_BUGREPORT);
42
73
#define BUFSIZE 256
44
75
static const TranslationTableHeader *table;
662
693
main (int argc, char **argv)
697
set_program_name (argv[0]);
699
while ((optc = getopt_long (argc, argv, "hv", longopts, NULL)) != -1)
702
/* --help and --version exit immediately, per GNU coding standards. */
704
version_etc (stdout, program_name, PACKAGE_NAME, VERSION, AUTHORS, (char *) NULL);
712
fprintf (stderr, "Try `%s --help' for more information.\n",
718
if (optind != argc - 1)
666
fprintf (stderr, "Usage: lou_debug tablename\n");
720
/* Print error message and exit. */
721
if (optind < argc - 1)
722
fprintf (stderr, "%s: extra operand: %s\n",
723
program_name, argv[optind + 1]);
725
fprintf (stderr, "%s: no table specified\n",
727
fprintf (stderr, "Try `%s --help' for more information.\n",
669
if (!(table = lou_getTable (argv[1])))
732
if (!(table = lou_getTable (argv[optind])))