1 /* This file is part of the Zebra server.
2 Copyright (C) 1994-2011 Index Data
4 Zebra is free software; you can redistribute it and/or modify it under
5 the terms of the GNU General Public License as published by the Free
6 Software Foundation; either version 2, or (at your option) any later
9 Zebra is distributed in the hope that it will be useful, but WITHOUT ANY
10 WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software
16 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
31 #include <idzebra/util.h>
39 void error (const char *format, ...)
42 va_start (argptr, format);
43 fprintf (stderr, "%s error: ", prog);
44 (void) vfprintf (stderr, format, argptr);
51 static int lexer_options (int argc, char **argv)
60 fprintf (stderr, "%s: %s %s\n", prog, __DATE__, __TIME__);
78 debug_dfa_followpos = 1;
83 debug_dfa_followpos = 1;
88 fprintf (stderr, "%s: unknown option `-%s'\n",
97 int main (int argc, char **argv)
104 i = lexer_options (argc, argv);
110 fprintf (stderr, "usage\n %s [-c] [-V] [-s] [-t] [-d[stf]] file\n",
114 else while (--argc > 0)
115 if (**++argv != '-' && **argv)
119 i = read_file (*argv, dfa);
134 fprintf (stderr, "%s: no files specified\n", prog);
143 * c-file-style: "Stroustrup"
144 * indent-tabs-mode: nil
146 * vim: shiftwidth=4 tabstop=8 expandtab