summaryrefslogtreecommitdiffstats
path: root/usr.bin/yacc/mkpar.c
diff options
context:
space:
mode:
authorcharnier <charnier@FreeBSD.org>1997-08-28 06:33:53 +0000
committercharnier <charnier@FreeBSD.org>1997-08-28 06:33:53 +0000
commit0497c512b62944e105314fca99083da5644b48ba (patch)
tree38cf54f3951d6372a5c57233ee94f3828637cf07 /usr.bin/yacc/mkpar.c
parent301a83d5c0bd9ed745ccf115a2e2a94696a9bf37 (diff)
downloadFreeBSD-src-0497c512b62944e105314fca99083da5644b48ba.zip
FreeBSD-src-0497c512b62944e105314fca99083da5644b48ba.tar.gz
Use err(3). Rewrote man page in mdoc format. The user visible change is that
report of s/r and r/r conflicts is now printed in two separate lines beginning by `yacc: '.
Diffstat (limited to 'usr.bin/yacc/mkpar.c')
-rw-r--r--usr.bin/yacc/mkpar.c24
1 files changed, 10 insertions, 14 deletions
diff --git a/usr.bin/yacc/mkpar.c b/usr.bin/yacc/mkpar.c
index bb59d9d..212a79b 100644
--- a/usr.bin/yacc/mkpar.c
+++ b/usr.bin/yacc/mkpar.c
@@ -32,12 +32,14 @@
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
- *
- * $Id$
*/
#ifndef lint
+#if 0
static char const sccsid[] = "@(#)mkpar.c 5.3 (Berkeley) 1/20/91";
+#endif
+static const char rcsid[] =
+ "$Id$";
#endif /* not lint */
#include <stdlib.h>
@@ -245,9 +247,9 @@ unused_rules()
if (nunused)
if (nunused == 1)
- fprintf(stderr, "%s: 1 rule never reduced\n", myname);
+ warnx("1 rule never reduced");
else
- fprintf(stderr, "%s: %d rules never reduced\n", myname, nunused);
+ warnx("%d rules never reduced", nunused);
}
@@ -330,21 +332,15 @@ remove_conflicts()
static void
total_conflicts()
{
- fprintf(stderr, "%s: ", myname);
if (SRtotal == 1)
- fprintf(stderr, "1 shift/reduce conflict");
+ warnx("1 shift/reduce conflict");
else if (SRtotal > 1)
- fprintf(stderr, "%d shift/reduce conflicts", SRtotal);
-
- if (SRtotal && RRtotal)
- fprintf(stderr, ", ");
+ warnx("%d shift/reduce conflicts", SRtotal);
if (RRtotal == 1)
- fprintf(stderr, "1 reduce/reduce conflict");
+ warnx("1 reduce/reduce conflict");
else if (RRtotal > 1)
- fprintf(stderr, "%d reduce/reduce conflicts", RRtotal);
-
- fprintf(stderr, ".\n");
+ warnx("%d reduce/reduce conflicts", RRtotal);
}
OpenPOWER on IntegriCloud