summaryrefslogtreecommitdiff
path: root/usr/src/cmd/mandoc/preconv.c
diff options
context:
space:
mode:
authorYuri Pankov <yuri.pankov@nexenta.com>2017-05-28 20:36:38 +0300
committerRichard Lowe <richlowe@richlowe.net>2017-06-21 16:46:29 -0400
commita40ea1a7d80eee1b409e9dcc2e48c730988147ea (patch)
tree83ffaf56553e3c7cda31f650a37a1e0c7f2b5b90 /usr/src/cmd/mandoc/preconv.c
parent299c9e70a71f87365f8f88fdea2cccbd0d5b8db6 (diff)
downloadillumos-gate-a40ea1a7d80eee1b409e9dcc2e48c730988147ea.tar.gz
8297 update mdocml to 1.14.1
Reviewed by: Robert Mustacchi <rm@joyent.com> Approved by: Richard Lowe <richlowe@richlowe.net>
Diffstat (limited to 'usr/src/cmd/mandoc/preconv.c')
-rw-r--r--usr/src/cmd/mandoc/preconv.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/usr/src/cmd/mandoc/preconv.c b/usr/src/cmd/mandoc/preconv.c
index 1fc137a964..08f8df86a6 100644
--- a/usr/src/cmd/mandoc/preconv.c
+++ b/usr/src/cmd/mandoc/preconv.c
@@ -1,4 +1,4 @@
-/* $Id: preconv.c,v 1.15 2015/10/06 18:32:19 schwarze Exp $ */
+/* $Id: preconv.c,v 1.16 2017/02/18 13:43:52 schwarze Exp $ */
/*
* Copyright (c) 2011 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2014 Ingo Schwarze <schwarze@openbsd.org>
@@ -26,14 +26,14 @@
#include "libmandoc.h"
int
-preconv_encode(struct buf *ib, size_t *ii, struct buf *ob, size_t *oi,
+preconv_encode(const struct buf *ib, size_t *ii, struct buf *ob, size_t *oi,
int *filenc)
{
- unsigned char *cu;
- int nby;
- unsigned int accum;
+ const unsigned char *cu;
+ int nby;
+ unsigned int accum;
- cu = (unsigned char *)ib->buf + *ii;
+ cu = (const unsigned char *)ib->buf + *ii;
assert(*cu & 0x80);
if ( ! (*filenc & MPARSE_UTF8))
@@ -90,7 +90,7 @@ preconv_encode(struct buf *ib, size_t *ii, struct buf *ob, size_t *oi,
assert(accum < 0xd800 || accum > 0xdfff);
*oi += snprintf(ob->buf + *oi, 11, "\\[u%.4X]", accum);
- *ii = (char *)cu - ib->buf;
+ *ii = (const char *)cu - ib->buf;
*filenc &= ~MPARSE_LATIN1;
return 1;