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
28 #include <idzebra/util.h>
36 void error (const char *format, ...)
39 va_start (argptr, format);
40 fprintf (stderr, "%s error: ", prog);
41 (void) vfprintf (stderr, format, argptr);
48 static int lexer_options (int argc, char **argv)
57 fprintf (stderr, "%s: %s %s\n", prog, __DATE__, __TIME__);
75 debug_dfa_followpos = 1;
80 debug_dfa_followpos = 1;
85 fprintf (stderr, "%s: unknown option `-%s'\n",
94 int main (int argc, char **argv)
101 i = lexer_options (argc, argv);
107 fprintf (stderr, "usage\n %s [-c] [-V] [-s] [-t] [-d[stf]] file\n",
111 else while (--argc > 0)
112 if (**++argv != '-' && **argv)
116 i = read_file (*argv, dfa);
131 fprintf (stderr, "%s: no files specified\n", prog);
140 * c-file-style: "Stroustrup"
141 * indent-tabs-mode: nil
143 * vim: shiftwidth=4 tabstop=8 expandtab