git.ckatri.com
/
mandoc.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Implement centering and adjustment to the right margin directly in
[mandoc.git]
/
mandocd.c
diff --git
a/mandocd.c
b/mandocd.c
index 3f055a503efaad492f0cee1049669bc84b5cd2eb..77fd3d0d07ccdcde4cf4cfe5ec1ca1e993e2c1cb 100644
(file)
--- a/
mandocd.c
+++ b/
mandocd.c
@@
-1,4
+1,4
@@
-/* $Id: mandocd.c,v 1.
7 2018/12/13 11:55:46
schwarze Exp $ */
+/* $Id: mandocd.c,v 1.
9 2018/12/30 00:49:55
schwarze Exp $ */
/*
* Copyright (c) 2017 Michael Stapelberg <stapelberg@debian.org>
* Copyright (c) 2017 Ingo Schwarze <schwarze@openbsd.org>
/*
* Copyright (c) 2017 Michael Stapelberg <stapelberg@debian.org>
* Copyright (c) 2017 Ingo Schwarze <schwarze@openbsd.org>
@@
-172,7
+172,7
@@
main(int argc, char *argv[])
mchars_alloc();
parser = mparse_alloc(MPARSE_SO | MPARSE_UTF8 | MPARSE_LATIN1,
mchars_alloc();
parser = mparse_alloc(MPARSE_SO | MPARSE_UTF8 | MPARSE_LATIN1,
- MANDOC
ERR_MAX, NULL, MANDOC
_OS_OTHER, defos);
+ MANDOC_OS_OTHER, defos);
memset(&options, 0, sizeof(options));
switch (outtype) {
memset(&options, 0, sizeof(options));
switch (outtype) {
@@
-244,35
+244,29
@@
main(int argc, char *argv[])
static void
process(struct mparse *parser, enum outt outtype, void *formatter)
{
static void
process(struct mparse *parser, enum outt outtype, void *formatter)
{
- struct roff_m
an *man
;
+ struct roff_m
eta *meta
;
mparse_readfd(parser, STDIN_FILENO, "<unixfd>");
mparse_readfd(parser, STDIN_FILENO, "<unixfd>");
- mparse_result(parser, &man, NULL);
-
- if (man == NULL)
- return;
-
- if (man->macroset == MACROSET_MDOC) {
- mdoc_validate(man);
+ meta = mparse_result(parser);
+ if (meta->macroset == MACROSET_MDOC) {
switch (outtype) {
case OUTT_ASCII:
case OUTT_UTF8:
switch (outtype) {
case OUTT_ASCII:
case OUTT_UTF8:
- terminal_mdoc(formatter, m
an
);
+ terminal_mdoc(formatter, m
eta
);
break;
case OUTT_HTML:
break;
case OUTT_HTML:
- html_mdoc(formatter, m
an
);
+ html_mdoc(formatter, m
eta
);
break;
}
}
break;
}
}
- if (man->macroset == MACROSET_MAN) {
- man_validate(man);
+ if (meta->macroset == MACROSET_MAN) {
switch (outtype) {
case OUTT_ASCII:
case OUTT_UTF8:
switch (outtype) {
case OUTT_ASCII:
case OUTT_UTF8:
- terminal_man(formatter, m
an
);
+ terminal_man(formatter, m
eta
);
break;
case OUTT_HTML:
break;
case OUTT_HTML:
- html_man(formatter, m
an
);
+ html_man(formatter, m
eta
);
break;
}
}
break;
}
}