-/* $Id: mandoc.h,v 1.71 2011/04/29 22:18:12 kristaps Exp $ */
+/* $Id: mandoc.h,v 1.76 2011/05/17 11:50:20 kristaps Exp $ */
/*
* Copyright (c) 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
*
ESCAPE_FONTROMAN, /* roman font mode */
ESCAPE_FONTPREV, /* previous font mode */
ESCAPE_NUMBERED, /* a numbered glyph */
+ ESCAPE_UNICODE, /* a unicode codepoint */
ESCAPE_NOSPACE /* suppress space if the last on a line */
};
-enum mcharst {
- MCHARS_ASCII, /* 7-bit ascii representation */
- MCHARS_HTML /* unicode values */
-};
-
typedef void (*mandocmsg)(enum mandocerr, enum mandoclevel,
const char *, int, int, const char *);
enum mandoc_esc mandoc_escape(const char **, const char **, int *);
-struct mchars *mchars_init(enum mcharst);
-const char *mchars_num2char(const char *, size_t);
+struct mchars *mchars_alloc(void);
+char mchars_num2char(const char *, size_t);
+int mchars_num2uc(const char *, size_t);
const char *mchars_spec2str(struct mchars *, const char *, size_t, size_t *);
int mchars_spec2cp(struct mchars *, const char *, size_t);
const char *mchars_res2str(struct mchars *, const char *, size_t, size_t *);