1#!/bin/sh 2# $NetBSD: makeman,v 1.7 2023/07/21 15:00:32 lukem Exp $ 3# 4# Copyright (c) 2000 The NetBSD Foundation, Inc. 5# All rights reserved. 6# 7# This code is derived from software contributed to The NetBSD Foundation 8# by Christos Zoulas. 9# 10# Redistribution and use in source and binary forms, with or without 11# modification, are permitted provided that the following conditions 12# are met: 13# 1. Redistributions of source code must retain the above copyright 14# notice, this list of conditions and the following disclaimer. 15# 2. Redistributions in binary form must reproduce the above copyright 16# notice, this list of conditions and the following disclaimer in the 17# documentation and/or other materials provided with the distribution. 18# 19# THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS 20# ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 21# TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 22# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 23# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 24# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 25# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 26# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 27# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 28# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 29# POSSIBILITY OF SUCH DAMAGE. 30 31: ${SED:=sed} 32 33tab=' ' 34 35list_messages() { 36 ${SED} -E -n \ 37 -e 's|^'"$tab"'"(.+)",.*/\* '"$2"'([0-9]+) \*/$|\2'"$tab"'\1|p' \ 38 -e 's|^'"$tab"'"",.*/\* '"$2"'[0-9]+ \*/$|---'"$tab"'(no longer used)|p' \ 39 "$1" \ 40 | ${SED} -E \ 41 -e 's|\\"|"|g' \ 42 -e 's|\\\\|\\e|g' \ 43 -e "s|'|\\'|g" \ 44 -e 's|^|.It |' 45} 46 47# shellcheck disable=SC2016 48cvsid='$NetBSD: makeman,v 1.7 2023/07/21 15:00:32 lukem Exp $' 49date="$1" 50year="${date##* }" 51messages="$(list_messages "$2" "")" 52queries="$(list_messages "$2" "Q")" 53 54cat << EOF 55.\" $cvsid 56.\" 57.\" Copyright (c) 2000,$year The NetBSD Foundation, Inc. 58.\" All rights reserved. 59.\" 60.\" This code is derived from software contributed to The NetBSD Foundation 61.\" by Christos Zoulas. 62.\" 63.\" Redistribution and use in source and binary forms, with or without 64.\" modification, are permitted provided that the following conditions 65.\" are met: 66.\" 1. Redistributions of source code must retain the above copyright 67.\" notice, this list of conditions and the following disclaimer. 68.\" 2. Redistributions in binary form must reproduce the above copyright 69.\" notice, this list of conditions and the following disclaimer in the 70.\" documentation and/or other materials provided with the distribution. 71.\" 72.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS 73.\" \`\`AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 74.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 75.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 76.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 77.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 78.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 79.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 80.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 81.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 82.\" POSSIBILITY OF SUCH DAMAGE. 83.Dd $date 84.Dt LINT 7 85.Os 86.Sh NAME 87.Nm lint 88.Nd Error, warning and query messages from lint 89.Sh DESCRIPTION 90The following is a list of message IDs and messages produced by 91.Xr lint 1 . 92It is intended to be used with the 93.Fl X 94flag of 95.Xr lint 1 . 96.Pp 97.Bd -ragged -offset indent -compact 98.Bl -column "XXXX" 99$messages 100.El 101.Ed 102.Pp 103The following is a list of query IDs and their messages produced by 104.Xr lint 1 . 105It is intended to be used with the 106.Fl q 107flag of 108.Xr lint 1 . 109.Pp 110.Bd -ragged -offset indent -compact 111.Bl -column "XXXX" 112$queries 113.El 114.Ed 115EOF 116