Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.bin/make make(1): fix documentation of VarParseErrors



details:   https://anonhg.NetBSD.org/src/rev/eee2c839e146
branches:  trunk
changeset: 1014197:eee2c839e146
user:      rillig <rillig%NetBSD.org@localhost>
date:      Sun Sep 13 20:38:47 2020 +0000

description:
make(1): fix documentation of VarParseErrors

It does not matter whether lint mode is enabled or not, Var_Parse must
reliably return whether an error message has been printed or not.

In the current phase where proper error handling is implemented only in
lint mode, this leads to code that looks a bit bloated since a few extra
branches are added, but that's ok.  Eventually the SILENT constants will
all be removed, and then the number of different cases will shrink
again.

diffstat:

 usr.bin/make/nonints.h |  11 ++++-------
 1 files changed, 4 insertions(+), 7 deletions(-)

diffs (39 lines):

diff -r 0648bdb8ce9f -r eee2c839e146 usr.bin/make/nonints.h
--- a/usr.bin/make/nonints.h    Sun Sep 13 20:21:24 2020 +0000
+++ b/usr.bin/make/nonints.h    Sun Sep 13 20:38:47 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: nonints.h,v 1.121 2020/09/13 19:46:23 rillig Exp $     */
+/*     $NetBSD: nonints.h,v 1.122 2020/09/13 20:38:47 rillig Exp $     */
 
 /*-
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -219,8 +219,7 @@
     VPE_OK             = 0x0000,
 
     /* Parsing failed.
-     * An error message has already been printed.
-     * (It suffices if the error message is printed in lint mode.) */
+     * An error message has already been printed. */
     VPE_PARSE_MSG      = 0x0001,
 
     /* Parsing failed.
@@ -233,8 +232,7 @@
     /* Parsing succeeded.
      * During evaluation, VARE_UNDEFERR was set and there was an undefined
      * variable.
-     * An error message has already been printed.
-     * (It suffices if the error message is printed in lint mode.) */
+     * An error message has already been printed. */
     VPE_UNDEF_MSG      = 0x0010,
 
     /* Parsing succeeded.
@@ -248,8 +246,7 @@
 
     /* Parsing succeeded.
      * Evaluation failed.
-     * An error message has already been printed.
-     * (It suffices if the error message is printed in lint mode.) */
+     * An error message has already been printed. */
     VPE_EVAL_MSG       = 0x0100,
 
     /* Parsing succeeded.



Home | Main Index | Thread Index | Old Index