-/* $Id: libmdoc.h,v 1.14 2009/07/07 09:29:15 kristaps Exp $ */
+/* $Id: libmdoc.h,v 1.21 2009/07/20 14:09:38 kristaps Exp $ */
/*
* Copyright (c) 2008, 2009 Kristaps Dzonsons <kristaps@kth.se>
*
enum merr {
ETAILWS = 0,
- ECOLEMPTY,
- EARGVPARM,
EQUOTPARM,
EQUOTTERM,
EMALLOC,
EQUOTPHR,
ENOCTX,
ESPACE,
+ ELIB,
MERRMAX
};
#define mdoc_pwarn(m, l, p, t) \
mdoc_err((m), (l), (p), 0, (t))
#define mdoc_nerr(m, n, t) \
- mdoc_err((m), (n)->line, (n)->pos, 0, (t))
-#define mdoc_nwarn(m, n, t) \
mdoc_err((m), (n)->line, (n)->pos, 1, (t))
+#define mdoc_nwarn(m, n, t) \
+ mdoc_err((m), (n)->line, (n)->pos, 0, (t))
int mdoc_err(struct mdoc *, int, int, int, enum merr);
int mdoc_verr(struct mdoc *, int, int, const char *, ...);
time_t mdoc_atotime(const char *);
size_t mdoc_macro2len(int);
+const char *mdoc_a2att(const char *);
+const char *mdoc_a2lib(const char *);
+const char *mdoc_a2st(const char *);
const char *mdoc_a2arch(const char *);
const char *mdoc_a2vol(const char *);
const char *mdoc_a2msec(const char *);
void mdoc_argv_free(struct mdoc_arg *);
int mdoc_args(struct mdoc *, int,
int *, char *, int, char **);
+int mdoc_zargs(struct mdoc *, int,
+ int *, char *, char **);
#define ARGS_ERROR (-1)
#define ARGS_EOLN (0)
#define ARGS_WORD (1)