From: schwarze Date: Wed, 17 Aug 2016 18:05:40 +0000 (+0000) Subject: Make sure manuals in architecture-independent directories are treated X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=0c1572bbaa8d72c8930d5b39f991947c5c666134;p=openbsd Make sure manuals in architecture-independent directories are treated as architecture-independent even if they abuse the third (architecture) argument of the .Dt macro for random stuff like "freetds reference manual". While the .Dt syntax is not the same as the .TH syntax in man(7), punishing offenders by treating them as architecture-dependent and hence completely excluding them from searches is too severe. Problem reported by sthen@. --- diff --git a/usr.bin/mandoc/dba.c b/usr.bin/mandoc/dba.c index c90f6653af9..3b0cf14c9a9 100644 --- a/usr.bin/mandoc/dba.c +++ b/usr.bin/mandoc/dba.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dba.c,v 1.2 2016/08/05 21:37:39 schwarze Exp $ */ +/* $OpenBSD: dba.c,v 1.3 2016/08/17 18:05:40 schwarze Exp $ */ /* * Copyright (c) 2016 Ingo Schwarze * @@ -169,7 +169,7 @@ dba_page_add(struct dba_array *page, int32_t ie, const char *str) if (ie == DBP_ARCH) { if (entries == NULL) return; - if (str == NULL) { + if (str == NULL || *str == '\0') { dba_array_free(entries); dba_array_set(page, DBP_ARCH, NULL); return;