diff options
author | 2015-10-13 22:59:54 +0000 | |
---|---|---|
committer | 2015-10-13 22:59:54 +0000 | |
commit | 35c319dedab41299e8ad1ec62697c36315fb88da (patch) | |
tree | 6d0023d2c650f7cadfa9c71eebdfd679f0bf3d51 /main.h | |
parent | e47784200392e2dea53b3decd3ceb23e1e2a0ca6 (diff) | |
download | mandoc-35c319dedab41299e8ad1ec62697c36315fb88da.tar.gz mandoc-35c319dedab41299e8ad1ec62697c36315fb88da.tar.zst mandoc-35c319dedab41299e8ad1ec62697c36315fb88da.zip |
Major character table cleanup:
* Use ohash(3) rather than a hand-rolled hash table.
* Make the character table static in the chars.c module:
There is no need to pass a pointer around, we most certainly
never want to use two different character tables concurrently.
* No need to keep the characters in a separate file chars.in;
that merely encourages downstream porters to mess with them.
* Sort the characters to agree with the mandoc_chars(7) manual page.
* Specify Unicode codepoints in hex, not decimal (that's the detail
that originally triggered this patch).
No functional change, minus 100 LOC, and i don't see a performance change.
Diffstat (limited to 'main.h')
-rw-r--r-- | main.h | 21 |
1 files changed, 7 insertions, 14 deletions
@@ -1,4 +1,4 @@ -/* $Id: main.h,v 1.22 2015/04/18 16:06:40 schwarze Exp $ */ +/* $Id: main.h,v 1.23 2015/10/13 22:59:54 schwarze Exp $ */ /* * Copyright (c) 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv> * Copyright (c) 2014, 2015 Ingo Schwarze <schwarze@openbsd.org> @@ -20,7 +20,6 @@ __BEGIN_DECLS -struct mchars; struct roff_man; struct manoutput; @@ -31,8 +30,7 @@ struct manoutput; * terminal output routines with different character settings. */ -void *html_alloc(const struct mchars *, - const struct manoutput *); +void *html_alloc(const struct manoutput *); void html_mdoc(void *, const struct roff_man *); void html_man(void *, const struct roff_man *); void html_free(void *); @@ -43,19 +41,14 @@ void tree_man(void *, const struct roff_man *); void man_mdoc(void *, const struct roff_man *); void man_man(void *, const struct roff_man *); -void *locale_alloc(const struct mchars *, - const struct manoutput *); -void *utf8_alloc(const struct mchars *, - const struct manoutput *); -void *ascii_alloc(const struct mchars *, - const struct manoutput *); +void *locale_alloc(const struct manoutput *); +void *utf8_alloc(const struct manoutput *); +void *ascii_alloc(const struct manoutput *); void ascii_free(void *); void ascii_sepline(void *); -void *pdf_alloc(const struct mchars *, - const struct manoutput *); -void *ps_alloc(const struct mchars *, - const struct manoutput *); +void *pdf_alloc(const struct manoutput *); +void *ps_alloc(const struct manoutput *); void pspdf_free(void *); void terminal_mdoc(void *, const struct roff_man *); |