aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/term.c
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2011-04-29 22:18:12 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2011-04-29 22:18:12 +0000
commit4d1bc0c8c120742600a57c849edf1b2481c45e26 (patch)
treea34e167ede1a560af694e85311e4283146871c92 /term.c
parent8686868cc9a1d5c5f474b8cdbd718b152b4d6188 (diff)
downloadmandoc-4d1bc0c8c120742600a57c849edf1b2481c45e26.tar.gz
mandoc-4d1bc0c8c120742600a57c849edf1b2481c45e26.tar.zst
mandoc-4d1bc0c8c120742600a57c849edf1b2481c45e26.zip
Move "chars" interface out of out.h and into mandoc.h. This doesn't
change any code but for renaming functions and types to be consistent with other mandoc.h stuff. The reason for moving into libmandoc is that the rendering of special characters is part of mandoc itself---not an external part. From mandoc(1)'s perspective, this changes nothing, but for other utilities, it's important to have these part of libmandoc. Note this isn't documented [yet] in mandoc.3 because there are some parts I'd like to change around beforehand.
Diffstat (limited to 'term.c')
-rw-r--r--term.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/term.c b/term.c
index 12722b97..b3c8380d 100644
--- a/term.c
+++ b/term.c
@@ -1,4 +1,4 @@
-/* $Id: term.c,v 1.184 2011/04/09 15:29:40 kristaps Exp $ */
+/* $Id: term.c,v 1.185 2011/04/29 22:18:12 kristaps Exp $ */
/*
* Copyright (c) 2008, 2009, 2010 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2010, 2011 Ingo Schwarze <schwarze@openbsd.org>
@@ -47,7 +47,7 @@ term_free(struct termp *p)
if (p->buf)
free(p->buf);
if (p->symtab)
- chars_free(p->symtab);
+ mchars_free(p->symtab);
free(p);
}
@@ -350,7 +350,7 @@ numbered(struct termp *p, const char *word, size_t len)
{
const char *rhs;
- rhs = chars_num2char(word, len);
+ rhs = mchars_num2char(word, len);
if (rhs)
encode(p, rhs, 1);
}
@@ -362,7 +362,7 @@ spec(struct termp *p, const char *word, size_t len)
const char *rhs;
size_t sz;
- rhs = chars_spec2str(p->symtab, word, len, &sz);
+ rhs = mchars_spec2str(p->symtab, word, len, &sz);
if (rhs)
encode(p, rhs, sz);
else if (1 == len)
@@ -376,7 +376,7 @@ res(struct termp *p, const char *word, size_t len)
const char *rhs;
size_t sz;
- rhs = chars_res2str(p->symtab, word, len, &sz);
+ rhs = mchars_res2str(p->symtab, word, len, &sz);
if (rhs)
encode(p, rhs, sz);
}
@@ -623,11 +623,11 @@ term_strlen(const struct termp *p, const char *cp)
switch (esc) {
case (ESCAPE_PREDEF):
- rhs = chars_res2str
+ rhs = mchars_res2str
(p->symtab, seq, ssz, &rsz);
break;
case (ESCAPE_SPECIAL):
- rhs = chars_spec2str
+ rhs = mchars_spec2str
(p->symtab, seq, ssz, &rsz);
if (ssz != 1 || rhs)