the same stream, and actually, it fails spectacularly on glibc.
Portability issue pointed out by Svyatoslav Mishyn <juef at openmailbox
dot org> after testing on Void Linux.
-/* $OpenBSD: main.c,v 1.172 2016/04/14 20:54:15 schwarze Exp $ */
+/* $OpenBSD: main.c,v 1.173 2016/07/08 22:27:58 schwarze Exp $ */
/*
* Copyright (c) 2008-2012 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2010-2012, 2014-2016 Ingo Schwarze <schwarze@openbsd.org>
conf.output.synopsisonly);
if (argc > 1 && curp.outtype <= OUTT_UTF8)
- ascii_sepline(curp.outdata);
+ terminal_sepline(curp.outdata);
} else if (rc < MANDOCLEVEL_ERROR)
rc = MANDOCLEVEL_ERROR;
-/* $OpenBSD: main.h,v 1.19 2015/11/07 13:57:55 schwarze Exp $ */
+/* $OpenBSD: main.h,v 1.20 2016/07/08 22:27:58 schwarze Exp $ */
/*
* Copyright (c) 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2014, 2015 Ingo Schwarze <schwarze@openbsd.org>
void *utf8_alloc(const struct manoutput *);
void *ascii_alloc(const struct manoutput *);
void ascii_free(void *);
-void ascii_sepline(void *);
void *pdf_alloc(const struct manoutput *);
void *ps_alloc(const struct manoutput *);
void terminal_mdoc(void *, const struct roff_man *);
void terminal_man(void *, const struct roff_man *);
+void terminal_sepline(void *);
-/* $OpenBSD: term_ascii.c,v 1.38 2015/11/12 21:49:29 schwarze Exp $ */
+/* $OpenBSD: term_ascii.c,v 1.39 2016/07/08 22:27:58 schwarze Exp $ */
/*
* Copyright (c) 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2014, 2015 Ingo Schwarze <schwarze@openbsd.org>
}
void
-ascii_sepline(void *arg)
+terminal_sepline(void *arg)
{
struct termp *p;
size_t i;
p = (struct termp *)arg;
- p->line += 3;
- putchar('\n');
+ (*p->endline)(p);
for (i = 0; i < p->defrmargin; i++)
- putchar('-');
- putchar('\n');
- putchar('\n');
+ (*p->letter)(p, '-');
+ (*p->endline)(p);
+ (*p->endline)(p);
}
static size_t