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