From nobody Mon Mar 25 08:32:24 2024 X-Original-To: dev-commits-doc-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4V35lY04Nxz5Fdy8 for ; Mon, 25 Mar 2024 08:32:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4V35lX6kl8z4fsp; Mon, 25 Mar 2024 08:32:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1711355544; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YFrirPLXawZJ1RWk+Y/9lIo4qTn7ZlKGs5WDvC+0FG4=; b=WvnXk9eDH1YsrxFLWDwZMDO3xheY3ou9zm79doDKrCaDuEIVC75XJTILGHl+A6ZVWUvC7Y yv0GLQh6LBlzh53BZK6q8eW0Rqje7BgOUCRKLURhEiSZIYuoFWVpumVCjXa2lHktdcWaYb F0kfXlxmlWAszUAnpI1wFMhvoT23nxkViOMpRinBQ0xDKVdHAzV/6Zk7XlXi/+xbOTgyr4 0/b/MGGOTfstMSTt3BqSj1oC8CjABwQw+ryrdOBcRn0I9bKSvFkDzHag+k1y/IOEePW6Rh CnRVwcVAm9eENCzipRP9mG0cmOpYuwhnlEjl4RhzDIZf6LKdWStiuQuE+YmmBA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1711355544; a=rsa-sha256; cv=none; b=JLcEvce49nIOE7Tu4qPepnTyoXimfLMM6EhpRQeXxd7lYcTI2Qbr5hYlBtj/dbJYaz5I02 LMwqVvX8GsshBgzvKz2/0gOsTPaaihhHJ/o1dUPhECYdzRF6Vc6yJzripTGJO8/JDtSnxU gPmg1+Affmm6fyFQILz4nk3+6MJVCPbEr2E8z0GOWrvkaW+ImScUKo/OsCHmtEktIG9hs2 uKBmKlPqdGA9h6IkuSe2JG0S5O2XOjUWI/3u0MWg/AGuhMrljctpv24SbLkDrnOjPYvyqX ELC/gXoUL3O53VQ+fLNVP7iC1jnXR6iZhY46A6ttPYNLRINfxmmxWK+6O5LMAg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1711355544; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YFrirPLXawZJ1RWk+Y/9lIo4qTn7ZlKGs5WDvC+0FG4=; b=yxHwGFbzgjEPVjqBTOn5w1ratsah7dB2KyRrf3r4VoMRumhi65149g7Ati6MC7sOmgmHi6 2bWURWhIgCpwD98KSCkLbX5snqAL6S7nK2zl7A330caxlXOdCgb6NOJdbe2KWzpFixItXX 5PlH1E+S3FubLXSCRdF1oXDrvRjkgFIcQ6Ya2bPOnKkZcvjDyRgfSZDYOHTcDuGvvgWTzt RFZT/AK55V7Brq7HDeRcD3w/p/SYohNa/CghtGlz9YGZ/EdwHjFimNy5+c0+0YQ3/i+aFD /J0HMk9aegxAC/vtO+iI6MDnqrUdZR7GrXOhE1Evh+aF/+woKI+aEFRp0MEH9A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4V35lX6L2Yz17h0; Mon, 25 Mar 2024 08:32:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 42P8WOa8036687; Mon, 25 Mar 2024 08:32:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 42P8WOwG036684; Mon, 25 Mar 2024 08:32:24 GMT (envelope-from git) Date: Mon, 25 Mar 2024 08:32:24 GMT Message-Id: <202403250832.42P8WOwG036684@gitrepo.freebsd.org> To: doc-committers@FreeBSD.org, dev-commits-doc-all@FreeBSD.org From: Wolfram Schneider Subject: git: 546cb8d83c - main - man.cgi: make apropos support filtering by section PR: 272906 Reported by: Pat Maddox List-Id: Commit messages for all branches of the doc repository List-Archive: https://lists.freebsd.org/archives/dev-commits-doc-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-doc-all@freebsd.org X-BeenThere: dev-commits-doc-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: wosch X-Git-Repository: doc X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 546cb8d83cbb382a828a69c0ff56a57745a0ccf7 Auto-Submitted: auto-generated The branch main has been updated by wosch: URL: https://cgit.FreeBSD.org/doc/commit/?id=546cb8d83cbb382a828a69c0ff56a57745a0ccf7 commit 546cb8d83cbb382a828a69c0ff56a57745a0ccf7 Author: Wolfram Schneider AuthorDate: 2024-03-25 08:28:13 +0000 Commit: Wolfram Schneider CommitDate: 2024-03-25 08:28:13 +0000 man.cgi: make apropos support filtering by section PR: 272906 Reported by: Pat Maddox --- website/content/en/cgi/man.cgi | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/website/content/en/cgi/man.cgi b/website/content/en/cgi/man.cgi index 3ca0d100af..5b82116121 100755 --- a/website/content/en/cgi/man.cgi +++ b/website/content/en/cgi/man.cgi @@ -1302,7 +1302,7 @@ sub do_man { } else { $section = ''; } - $apropos ? &apropos($query) : &man( $name, $section, $arch ); + $apropos ? &apropos($query, $section) : &man( $name, $section, $arch ); } # --------------------- support routines ------------------------ @@ -1378,7 +1378,7 @@ sub http_header { sub env { defined( $main'ENV{ $_[0] } ) ? $main'ENV{ $_[0] } : undef; } sub apropos { - local ($query) = @_; + local ($query, $sektion) = @_; local ( $_, $title, $head, *APROPOS ); local ( $names, $section, $msg, $key ); local ($prefix); @@ -1397,6 +1397,8 @@ sub apropos { &http_header("text/html"); print &html_header("Apropos $title"); print "
\n

$www{'head'}

\n\n"; + + $section = $sektion; &formquery; local ($mpath) = $manPath{$manpath}; @@ -1421,6 +1423,8 @@ sub apropos { print qq{
\n}; while () { next if !/$q/oi; + next if $sektion && !/\($sektion\)/oi; + $acounter++; # matches whatis.db lines: name[, name ...] (sect) - msg