-/* $Id: mdoc.h,v 1.51 2009/03/21 09:42:07 kristaps Exp $ */
+/* $Id: mdoc.h,v 1.56 2009/04/12 19:45:26 kristaps Exp $ */
/*
- * Copyright (c) 2008 Kristaps Dzonsons <kristaps@kth.se>
+ * Copyright (c) 2008, 2009 Kristaps Dzonsons <kristaps@openbsd.org>
*
* Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the
- * above copyright notice and this permission notice appear in all
- * copies.
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
*
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
- * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
- * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
- * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
- * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
- * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef MDOC_H
#define MDOC_H
#define MDOC_IGN_SCOPE (1 << 0) /* Ignore scope violations. */
#define MDOC_IGN_ESCAPE (1 << 1) /* Ignore bad escape sequences. */
#define MDOC_IGN_MACRO (1 << 2) /* Ignore unknown macros. */
+#define MDOC_IGN_CHARS (1 << 3) /* Ignore disallowed chars. */
/* Call-backs for parse messages. */
struct mdoc_cb {
struct mdoc *mdoc_alloc(void *, int, const struct mdoc_cb *);
/* Gets system ready for another parse. */
-void mdoc_reset(struct mdoc *);
+int mdoc_reset(struct mdoc *);
/* Parse a single line in a stream (boolean retval). */
int mdoc_parseln(struct mdoc *, int, char *buf);
const char *mdoc_a2lib(const char *);
const char *mdoc_a2st(const char *);
-int mdoc_isdelim(const char *);
-
__END_DECLS
#endif /*!MDOC_H*/