CVSROOT: /cvs Module name: src Changes by: schwa...@cvs.openbsd.org 2016/01/07 19:13:35
Modified files: usr.bin/mandoc : main.c mandocdb.c read.c Log message: It was very surprising that a function called mparse_readfd() closed the file descriptor passed to it after completing its work, in particular considering the fact that it required its callers to call open(2) or mparse_open() beforehand. Change mparse_readfd() to not call close(2) and change the callers to call close(2) afterwards, more or less bringing open and close to the same level of the code and making review easier. Note that man.cgi(8) already did that, even though it was wrong in the past. Small restructuring suggested by Christos Zoulas (NetBSD).