X-Git-Url: https://git.cameronkatri.com/mandoc.git/blobdiff_plain/d5899efe4a68c00b14f7b4e40042b60c86db4898..74317de919ffbe0b012c3dc4777d6b55037b810a:/compat_getsubopt.c diff --git a/compat_getsubopt.c b/compat_getsubopt.c index 1a7ec6e8..c442f87e 100644 --- a/compat_getsubopt.c +++ b/compat_getsubopt.c @@ -1,9 +1,4 @@ -#ifdef HAVE_GETSUBOPT - -int dummy; - -#else - +/* $Id: compat_getsubopt.c,v 1.6 2020/06/15 01:37:15 schwarze Exp $ */ /* $OpenBSD: getsubopt.c,v 1.4 2005/08/08 08:05:36 espie Exp $ */ /*- @@ -34,23 +29,17 @@ int dummy; * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ +#include "config.h" #include #include #include -/* - * The SVID interface to getsubopt provides no way of figuring out which - * part of the suboptions list wasn't matched. This makes error messages - * tricky... The extern variable suboptarg is a pointer to the token - * which didn't match. - */ -char *suboptarg; - int getsubopt(char **optionp, char * const *tokens, char **valuep) { int cnt; + char *suboptarg; char *p; suboptarg = *valuep = NULL; @@ -96,5 +85,3 @@ getsubopt(char **optionp, char * const *tokens, char **valuep) return(cnt); return(-1); } - -#endif