summaryrefslogtreecommitdiff
path: root/usr.bin/mandoc/chars.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin/mandoc/chars.c')
-rw-r--r--usr.bin/mandoc/chars.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/usr.bin/mandoc/chars.c b/usr.bin/mandoc/chars.c
index e3fe1a44d76..e3b192e6d70 100644
--- a/usr.bin/mandoc/chars.c
+++ b/usr.bin/mandoc/chars.c
@@ -1,4 +1,4 @@
-/* $Id: chars.c,v 1.14 2010/09/20 20:43:38 schwarze Exp $ */
+/* $Id: chars.c,v 1.15 2011/01/04 22:28:17 schwarze Exp $ */
/*
* Copyright (c) 2009, 2010 Kristaps Dzonsons <kristaps@bsd.lv>
*
@@ -50,22 +50,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);
@@ -75,7 +75,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;
@@ -87,7 +87,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);
@@ -126,7 +126,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);
@@ -141,7 +141,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);
@@ -156,7 +156,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);
@@ -173,7 +173,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);
@@ -183,7 +183,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;