diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2016-01-08 02:53:13 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2016-01-08 02:53:13 +0000 |
commit | 88bc2f3d403685eb613237b364c82c0042b74ee5 (patch) | |
tree | 8003e0df848412664c88194e5e2f1b078478ffc0 /mandoc.3 | |
parent | 04d39401bf641371ebd7d33949c6022bf67ee762 (diff) | |
download | mandoc-88bc2f3d403685eb613237b364c82c0042b74ee5.tar.gz mandoc-88bc2f3d403685eb613237b364c82c0042b74ee5.tar.zst mandoc-88bc2f3d403685eb613237b364c82c0042b74ee5.zip |
Simplify the mparse_open() interface.
Just return the file descriptor or -1 on error;
there is just one kind of error anyway.
Suggested by Christos Zoulas (NetBSD).
Diffstat (limited to 'mandoc.3')
-rw-r--r-- | mandoc.3 | 9 |
1 files changed, 3 insertions, 6 deletions
@@ -1,4 +1,4 @@ -.\" $Id: mandoc.3,v 1.34 2016/01/08 02:13:39 schwarze Exp $ +.\" $Id: mandoc.3,v 1.35 2016/01/08 02:53:13 schwarze Exp $ .\" .\" Copyright (c) 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv> .\" Copyright (c) 2010, 2013, 2014, 2015 Ingo Schwarze <schwarze@openbsd.org> @@ -73,10 +73,9 @@ .Fo mparse_keep .Fa "struct mparse *parse" .Fc -.Ft "enum mandoclevel" +.Ft int .Fo mparse_open .Fa "struct mparse *parse" -.Fa "int *fd" .Fa "const char *fname" .Fc .Ft "enum mandoclevel" @@ -388,9 +387,7 @@ does not already end in try again after appending .Ql .gz . Save the information whether the file is zipped or not. -Return a file descriptor open for reading in -.Fa fd , -or -1 on failure. +Return a file descriptor open for reading or -1 on failure. It can be passed to .Fn mparse_readfd or used directly. |