summaryrefslogtreecommitdiffstats
path: root/chars.c
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2011-01-02 10:10:57 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2011-01-02 10:10:57 +0000
commit18bac1d9d98fd8bc679a1de9e741fb25e542062e (patch)
tree10e164afcd2ef05278dbcbe506f45444082d3a17 /chars.c
parent52b05cf7e6f8b28dfbdbbdbdbeb9fd3f45b32407 (diff)
downloadmandoc-18bac1d9d98fd8bc679a1de9e741fb25e542062e.tar.gz
Churn to get parts of 'struct tbl' visible from mandoc.h: rename the
existing 'struct tbl' as 'struct tbl_node', then move all option stuff into a 'struct tbl' in mandoc.h. This conflicted with a structure in chars.c, which was renamed.
Diffstat (limited to 'chars.c')
-rw-r--r--chars.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/chars.c b/chars.c
index 5288abbe..b9f4b4fd 100644
--- a/chars.c
+++ b/chars.c
@@ -54,22 +54,22 @@ struct ln {
#include "chars.in"
-struct tbl {
+struct ctab {
enum chars type;
struct ln **htab;
};
static inline int match(const struct ln *,
const char *, size_t, int);
-static const struct ln *find(struct tbl *, const char *, size_t, int);
+static const struct ln *find(struct ctab *, const char *, size_t, int);
void
chars_free(void *arg)
{
- struct tbl *tab;
+ struct ctab *tab;
- tab = (struct tbl *)arg;
+ tab = (struct ctab *)arg;
free(tab->htab);
free(tab);
@@ -79,7 +79,7 @@ chars_free(void *arg)
void *
chars_init(enum chars type)
{
- struct tbl *tab;
+ struct ctab *tab;
struct ln **htab;
struct ln *pp;
int i, hash;
@@ -91,7 +91,7 @@ chars_init(enum chars type)
* (they're in-line re-ordered during lookup).
*/
- tab = malloc(sizeof(struct tbl));
+ tab = malloc(sizeof(struct ctab));
if (NULL == tab) {
perror(NULL);
exit((int)MANDOCLEVEL_SYSERR);
@@ -130,7 +130,7 @@ chars_spec2cp(void *arg, const char *p, size_t sz)
{
const struct ln *ln;
- ln = find((struct tbl *)arg, p, sz, CHARS_CHAR);
+ ln = find((struct ctab *)arg, p, sz, CHARS_CHAR);
if (NULL == ln)
return(-1);
return(ln->unicode);
@@ -145,7 +145,7 @@ chars_res2cp(void *arg, const char *p, size_t sz)
{
const struct ln *ln;
- ln = find((struct tbl *)arg, p, sz, CHARS_STRING);
+ ln = find((struct ctab *)arg, p, sz, CHARS_STRING);
if (NULL == ln)
return(-1);
return(ln->unicode);
@@ -160,7 +160,7 @@ chars_spec2str(void *arg, const char *p, size_t sz, size_t *rsz)
{
const struct ln *ln;
- ln = find((struct tbl *)arg, p, sz, CHARS_CHAR);
+ ln = find((struct ctab *)arg, p, sz, CHARS_CHAR);
if (NULL == ln)
return(NULL);
@@ -177,7 +177,7 @@ chars_res2str(void *arg, const char *p, size_t sz, size_t *rsz)
{
const struct ln *ln;
- ln = find((struct tbl *)arg, p, sz, CHARS_STRING);
+ ln = find((struct ctab *)arg, p, sz, CHARS_STRING);
if (NULL == ln)
return(NULL);
@@ -187,7 +187,7 @@ chars_res2str(void *arg, const char *p, size_t sz, size_t *rsz)
static const struct ln *
-find(struct tbl *tab, const char *p, size_t sz, int type)
+find(struct ctab *tab, const char *p, size_t sz, int type)
{
struct ln *pp, *prev;
struct ln **htab;