From nobody Wed Aug 10 12:23:08 2022 X-Original-To: dev-commits-src-branches@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 4M2pxT4FDQz4YHNm; Wed, 10 Aug 2022 12:23:09 +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 4M2pxT1t3sz3X9m; Wed, 10 Aug 2022 12:23:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1660134189; 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=5zwmeDzG3lB/cpUo4qPEdjZf9a8wNNC74SpUzoLW6cE=; b=ZnckCljNuE8nZmSk3C2H6P2IcvQIEVtlKXuTivFeNmU7Tew96e2M7yfJHKKFOme5UqT3+O wh9/hMwl1o+ditQzQfXAX1y9hvdINZ6n8JII2hrnl5mHJBhRsmBisFMPUwnfyn8YMdNfXK /4j08/K3+sOXFaY8Ifs2VLLgb+V1oB5TEWTmdDdNFZBzKHfNred5HMv4pyYvTZFWgm2gEV AcTr5KjEkOvNO81V2xfyMJnHYSoYOM8xXPAln26awjd42x1nCGQMuZbhlcQ6L1uvInEHI7 Qoa7y9PpADr6I1JjxjZ3vRwp4sEKdw8TwO0RzgLSnnpoYs7XHSoFVzV+VZ9B6w== 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 4M2pxS5Xt4z19kl; Wed, 10 Aug 2022 12:23:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 27ACN8dp071812; Wed, 10 Aug 2022 12:23:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 27ACN8Pi071811; Wed, 10 Aug 2022 12:23:08 GMT (envelope-from git) Date: Wed, 10 Aug 2022 12:23:08 GMT Message-Id: <202208101223.27ACN8Pi071811@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gordon Bergling Subject: git: b83d5bf050a9 - stable/13 - libpathconv: Fix mandoc warnings in abs2rel(3) and rel2abs(3) List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: b83d5bf050a9c735c9f6079672d5af3dec24b7dd Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1660134189; 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=5zwmeDzG3lB/cpUo4qPEdjZf9a8wNNC74SpUzoLW6cE=; b=lqFlPMcBJR0k0sayrtWu81MZgLWTxiU4zj0UD5usZDqagxCRtqLrtgSFFEcXXyKDDv3km6 Iu7JIqNOePAvc2pry5qs5V9lN1fLkO7B7FUfDrMnqRT0Q6GPvUCT4OQkblLfwtZV8pSEMG co3YFOuw+l4Ou0MNEEJlTTAd2GdGhd0b3TcaV0wnWoldpXEeEt2ggvil66V0m8e8f0X76e gonZd9xj2zSi1FAuDUCT42DrJafQsI8M/jK7MrmkEraL4CzTSlBG7R0DDU7qOmkzkjU29I xWwCrlCbdOYhfY1ptbfhxRRVrg3Xipny6ejHXfXdpCp4Ob0STUC62L75MKex6Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1660134189; a=rsa-sha256; cv=none; b=Y5Z89KCw5cxsPIc7uzWAhWYy1GPuOrBEdNNOxVKf63np1Go1LZGMWm8A2SG+MExMcrXnMY 8sgwRHVUcEnrWRlw0N9jB9bV2ccNZLMgJ3dhAfWfqu6iIDZIoD5e9lV8V4Z9F0VJBGa9KI D616a1ek4wSiXZmt0lgZirb1ixrvYOUF7MEXQJml0EGPfnRo2RyYlTVeQcfqfbokccwSe4 VYb3ohE1PBo+6mfr20XrkSEmEOzrW+syNb8IWF1FE3t+JB6GP9qumHt5wisyKbDCdec4Sf /FiX113YPKt8x3UdY7Oe8ASS5b5IRo2LkGKUZZY/H1fS46zVL+f3vcTGA2VzsA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by gbe (doc committer): URL: https://cgit.FreeBSD.org/src/commit/?id=b83d5bf050a9c735c9f6079672d5af3dec24b7dd commit b83d5bf050a9c735c9f6079672d5af3dec24b7dd Author: Gordon Bergling AuthorDate: 2022-08-07 12:53:53 +0000 Commit: Gordon Bergling CommitDate: 2022-08-10 12:22:26 +0000 libpathconv: Fix mandoc warnings in abs2rel(3) and rel2abs(3) - cannot parse date, using it verbatim: Dec 15, 1997" - sections out of conventional order: Sh SEE ALSO - possible typo in section name: Sh EXAMPLE instead of EXAMPLES - AUTHORS section without An macro (cherry picked from commit 094517119c62c23369d545a7475ae982d86330a3) --- lib/libpathconv/abs2rel.3 | 44 ++++++++++++++++++++++---------------------- lib/libpathconv/rel2abs.3 | 40 ++++++++++++++++++++-------------------- 2 files changed, 42 insertions(+), 42 deletions(-) diff --git a/lib/libpathconv/abs2rel.3 b/lib/libpathconv/abs2rel.3 index 984b2530e1b0..fd684aa072d9 100644 --- a/lib/libpathconv/abs2rel.3 +++ b/lib/libpathconv/abs2rel.3 @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd Dec 15, 1997" +.Dd December 15, 1997 .Dt ABS2REL 3 .Os .Sh NAME @@ -60,6 +60,23 @@ function returns relative path name on success. If an error occurs, it returns .Dv NULL . +.Sh EXAMPLES + char result[MAXPATHLEN]; + char *path = abs2rel("/usr/src/sys", "/usr/local/lib", result, MAXPATHLEN); + +yields: + + path == "../../src/sys" + +Similarly, + + path1 = abs2rel("/usr/src/sys", "/usr", result, MAXPATHLEN); + path2 = abs2rel("/usr/src/sys", "/usr/src/sys", result, MAXPATHLEN); + +yields: + + path1 == "src/sys" + path2 == "." .Sh ERRORS The .Fn abs2rel @@ -77,24 +94,11 @@ argument is zero. The .Fa size argument is greater than zero but smaller than the length of the pathname plus 1. -.Sh EXAMPLE - char result[MAXPATHLEN]; - char *path = abs2rel("/usr/src/sys", "/usr/local/lib", result, MAXPATHLEN); - -yields: - - path == "../../src/sys" - -Similarly, - - path1 = abs2rel("/usr/src/sys", "/usr", result, MAXPATHLEN); - path2 = abs2rel("/usr/src/sys", "/usr/src/sys", result, MAXPATHLEN); - -yields: - - path1 == "src/sys" - path2 == "." +.Sh SEE ALSO +.Xr rel2abs 3 +.Sh AUTHORS +.An Shigio Yamaguchi (shigio@tamacom.com) .Sh BUGS If the .Fa base @@ -130,7 +134,3 @@ The function assures correct result, but don't forget that .Fn realpath requires that all but the last component of the path exist. -.Sh "SEE ALSO" -.Xr rel2abs 3 -.Sh AUTHORS -Shigio Yamaguchi (shigio@tamacom.com) diff --git a/lib/libpathconv/rel2abs.3 b/lib/libpathconv/rel2abs.3 index aee8039cf914..8bc880707d7b 100644 --- a/lib/libpathconv/rel2abs.3 +++ b/lib/libpathconv/rel2abs.3 @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd Dec 3, 1997" +.Dd December 3, 1997 .Dt REL2ABS 3 .Os .Sh NAME @@ -58,6 +58,23 @@ The function returns absolute path name on success. If an error occurs, it returns .Dv NULL . +.Sh EXAMPLES + char result[MAXPATHLEN]; + char *path = rel2abs("../../src/sys", "/usr/local/lib", result, MAXPATHLEN); + +yields: + + path == "/usr/src/sys" + +Similarly, + + path1 = rel2abs("src/sys", "/usr", result, MAXPATHLEN); + path2 = rel2abs(".", "/usr/src/sys", result, MAXPATHLEN); + +yields: + + path1 == "/usr/src/sys" + path2 == "/usr/src/sys" .Sh ERRORS The .Fn rel2abs @@ -75,24 +92,7 @@ argument is zero. The .Fa size argument is greater than zero but smaller than the length of the pathname plus 1 -.Sh EXAMPLE - char result[MAXPATHLEN]; - char *path = rel2abs("../../src/sys", "/usr/local/lib", result, MAXPATHLEN); - -yields: - - path == "/usr/src/sys" - -Similarly, - - path1 = rel2abs("src/sys", "/usr", result, MAXPATHLEN); - path2 = rel2abs(".", "/usr/src/sys", result, MAXPATHLEN); - -yields: - - path1 == "/usr/src/sys" - path2 == "/usr/src/sys" -.Sh "SEE ALSO" +.Sh SEE ALSO .Xr abs2rel 3 .Sh AUTHORS -Shigio Yamaguchi (shigio@tamacom.com) +.An Shigio Yamaguchi (shigio@tamacom.com)