scdoc2mdoc

A fork of scdoc to output mdoc(7)
git clone git://git.sgregoratto.me/scdoc2mdoc
Log | Files | Refs | README | LICENSE

commit 14ef2b38397f9004c7baa54d320e9bac89610849
parent fe7d68bef94f691476e46dbfd9147602b4462926
Author: Drew DeVault <sir@cmpwn.com>
Date:   Sun, 10 Dec 2017 12:08:18 -0500

Fix indentation bugs

Diffstat:
MREADME.md | 4++++
Msrc/main.c | 5+++--
2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/README.md b/README.md @@ -12,6 +12,10 @@ You can pass PREFIX or DESTDIR to make if you'd like: make PREFIX=/usr sudo make PREFIX=/usr install +## Usage + +See scdoc(1) + ## Contributing Send patches/bug reports to sir@cmpwn.com diff --git a/src/main.c b/src/main.c @@ -171,8 +171,8 @@ static int parse_indent(struct parser *p, int *indent, bool write) { } else if (i != *indent && ch == '\t') { parser_fatal(p, "Indented by an amount greater than 1"); } - *indent = i; } + *indent = i; return i; } @@ -220,9 +220,10 @@ static void parse_list(struct parser *p, int *indent) { default: fprintf(p->output, "\n"); parser_pushch(p, ch); - return; + goto ret; } } while (ch != UTF8_INVALID); +ret: if (!closed) { roff_macro(p, "RE", NULL); }