Annotation of mandoc/mdoclint.c, Revision 1.2
1.2 ! kristaps 1: /* $Id: mdoclint.c,v 1.1 2009/02/23 13:05:06 kristaps Exp $ */
1.1 kristaps 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;
1.2 ! kristaps 31: int c;
1.1 kristaps 32: const struct mdoc *mdoc;
33:
34: p = mmain_alloc();
35:
1.2 ! kristaps 36: c = mmain_getopt(p, argc, argv, NULL, NULL, NULL, NULL);
! 37: if (1 != c)
! 38: mmain_exit(p, -1 == c ? 1 : 0);
1.1 kristaps 39:
40: if (NULL == (mdoc = mmain_mdoc(p)))
41: mmain_exit(p, 1);
42:
43: mmain_exit(p, 0);
44: /* NOTREACHED */
45: }
46:
CVSweb