diff options
author | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2014-09-03 23:20:34 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2014-09-03 23:20:34 +0000 |
commit | c03210bf59264ddf4da3873d44124eabdb50504b (patch) | |
tree | aef18d8b8103c427753f483992e8102e44de28ce /usr.bin/mandoc/mandoc.h | |
parent | cf788532a8e747740c1bd1ed63d7d79bfbde87bf (diff) |
Add *.gz support to apropos(1) -a, manm(1), and even mandoc(1).
Implemented by moving the zip code from makewhatis(8) to the parser lib.
Diffstat (limited to 'usr.bin/mandoc/mandoc.h')
-rw-r--r-- | usr.bin/mandoc/mandoc.h | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/usr.bin/mandoc/mandoc.h b/usr.bin/mandoc/mandoc.h index 662d964cbe8..782be62a1ec 100644 --- a/usr.bin/mandoc/mandoc.h +++ b/usr.bin/mandoc/mandoc.h @@ -1,4 +1,4 @@ -/* $Id: mandoc.h,v 1.96 2014/08/08 16:17:09 schwarze Exp $ */ +/* $OpenBSD: mandoc.h,v 1.97 2014/09/03 23:20:33 schwarze Exp $ */ /* * Copyright (c) 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv> * Copyright (c) 2010-2014 Ingo Schwarze <schwarze@openbsd.org> @@ -171,9 +171,16 @@ enum mandocerr { /* ===== system errors ===== */ + MANDOCERR_SYSDUP, /* cannot dup file descriptor */ + MANDOCERR_SYSEXEC, /* cannot exec */ + MANDOCERR_SYSEXIT, /* gunzip failed with code */ + MANDOCERR_SYSFORK, /* cannot fork */ MANDOCERR_SYSOPEN, /* cannot open file */ - MANDOCERR_SYSSTAT, /* cannot stat file */ + MANDOCERR_SYSPIPE, /* cannot open pipe */ MANDOCERR_SYSREAD, /* cannot read file */ + MANDOCERR_SYSSIG, /* gunzip died from signal */ + MANDOCERR_SYSSTAT, /* cannot stat file */ + MANDOCERR_SYSWAIT, /* wait failed */ MANDOCERR_MAX }; @@ -423,6 +430,8 @@ struct mparse *mparse_alloc(int, enum mandoclevel, mandocmsg, const char *); void mparse_free(struct mparse *); void mparse_keep(struct mparse *); +enum mandoclevel mparse_open(struct mparse *, int *, const char *, + pid_t *); enum mandoclevel mparse_readfd(struct mparse *, int, const char *); void mparse_reset(struct mparse *); void mparse_result(struct mparse *, @@ -430,6 +439,7 @@ void mparse_result(struct mparse *, const char *mparse_getkeep(const struct mparse *); const char *mparse_strerror(enum mandocerr); const char *mparse_strlevel(enum mandoclevel); +enum mandoclevel mparse_wait(struct mparse *, pid_t); __END_DECLS |