]> git.cameronkatri.com Git - mandoc.git/blob - mdoclint.c
Strings abstracted into dynamically-created C files.
[mandoc.git] / mdoclint.c
1 /* $Id: mdoclint.c,v 1.2 2009/03/06 14:13:47 kristaps Exp $ */
2 /*
3 * Copyright (c) 2008 Kristaps Dzonsons <kristaps@kth.se>
4 *
5 * Permission to use, copy, modify, and distribute this software for any
6 * purpose with or without fee is hereby granted, provided that the
7 * above copyright notice and this permission notice appear in all
8 * copies.
9 *
10 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
11 * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
12 * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
13 * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
14 * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
15 * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
16 * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
17 * PERFORMANCE OF THIS SOFTWARE.
18 */
19 #include <assert.h>
20 #include <err.h>
21 #include <getopt.h>
22 #include <stdio.h>
23 #include <stdlib.h>
24
25 #include "mmain.h"
26
27 int
28 main(int argc, char *argv[])
29 {
30 struct mmain *p;
31 int c;
32 const struct mdoc *mdoc;
33
34 p = mmain_alloc();
35
36 c = mmain_getopt(p, argc, argv, NULL, NULL, NULL, NULL);
37 if (1 != c)
38 mmain_exit(p, -1 == c ? 1 : 0);
39
40 if (NULL == (mdoc = mmain_mdoc(p)))
41 mmain_exit(p, 1);
42
43 mmain_exit(p, 0);
44 /* NOTREACHED */
45 }
46