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
Test a Braille translation table. If the table contains errors,\n\
58
appropriate messages are displayed. If there are no errors the\n\
59
message \"no errors found.\" is shown.\n", stdout);
62
-h, --help display this help and exit\n\
63
-v, --version display version information and exit\n", stdout);
67
Report bugs to <%s>.\n", PACKAGE_BUGREPORT);
44
71
main (int argc, char **argv)
46
73
const TranslationTableHeader *table;
76
set_program_name (argv[0]);
78
while ((optc = getopt_long (argc, argv, "hv", longopts, NULL)) != -1)
81
/* --help and --version exit immediately, per GNU coding standards. */
83
version_etc (stdout, program_name, PACKAGE_NAME, VERSION, AUTHORS, (char *) NULL);
91
fprintf (stderr, "Try `%s --help' for more information.\n",
97
if (optind != argc - 1)
49
fprintf (stderr, "Usage: lou_checktable tablename\n");
99
/* Print error message and exit. */
100
if (optind < argc - 1)
101
fprintf (stderr, "%s: extra operand: %s\n",
102
program_name, argv[optind + 1]);
104
fprintf (stderr, "%s: no table specified\n",
106
fprintf (stderr, "Try `%s --help' for more information.\n",
52
if (!(table = lou_getTable (argv[1])))
111
if (!(table = lou_getTable (argv[optind])))
57
116
fprintf (stderr, "No errors found.\n");