CVSROOT: /cvs Module name: src Changes by: schwa...@cvs.openbsd.org 2016/09/18 09:45:50
Modified files: usr.bin/mandoc : main.c Log message: We cannot use fputs(3) in passthrough() because the stdout stream might be in stdio wide orientation due to prior formatting of an unformatted manual in man -aTutf8 mode. So for now, use fflush(3) followed by unbuffered write(2) instead. Fixes output corruption on glibc discovered on Linux while testing a diff to fix a loosely related bug reported by <jmates at ee dot washington dot edu>. I detest the concept of stdio stream orientation. One day, i will rewrite term_ascii.c to always use narrow streams, even in UTF-8 output mode. But that's too much work for today.