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): make documentation of VarParseErrors m...



details:   https://anonhg.NetBSD.org/src/rev/d774a6d78020
branches:  trunk
changeset: 943945:d774a6d78020
user:      rillig <rillig%NetBSD.org@localhost>
date:      Sun Sep 13 19:16:22 2020 +0000

description:
make(1): make documentation of VarParseErrors more precise

diffstat:

 usr.bin/make/nonints.h |  13 ++++++++-----
 usr.bin/make/var.c     |   8 +++-----
 2 files changed, 11 insertions(+), 10 deletions(-)

diffs (76 lines):

diff -r 76fcafb7813a -r d774a6d78020 usr.bin/make/nonints.h
--- a/usr.bin/make/nonints.h    Sun Sep 13 18:27:39 2020 +0000
+++ b/usr.bin/make/nonints.h    Sun Sep 13 19:16:22 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: nonints.h,v 1.119 2020/09/13 18:27:39 rillig Exp $     */
+/*     $NetBSD: nonints.h,v 1.120 2020/09/13 19:16:22 rillig Exp $     */
 
 /*-
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -219,7 +219,8 @@
     VPE_OK             = 0x0000,
 
     /* Parsing failed.
-     * An error message has already been printed. */
+     * An error message has already been printed.
+     * (It suffices if the error message is printed in lint mode.) */
     VPE_PARSE_MSG      = 0x0001,
 
     /* Parsing failed.
@@ -232,7 +233,8 @@
     /* Parsing succeeded.
      * During evaluation, VARE_UNDEFERR was set and there was an undefined
      * variable.
-     * An error message has already been printed. */
+     * An error message has already been printed.
+     * (It suffices if the error message is printed in lint mode.) */
     VPE_UNDEF_MSG      = 0x0010,
 
     /* Parsing succeeded.
@@ -246,14 +248,15 @@
 
     /* Parsing succeeded.
      * Evaluation failed.
-     * An error message has already been printed. */
+     * An error message has already been printed.
+     * (It suffices if the error message is printed in lint mode.) */
     VPE_EVAL_MSG       = 0x0100,
 
     /* Parsing succeeded.
      * Evaluation failed.
      * No error message has been printed yet.
      *
-     * This should never happens since it is impossible to say where
+     * This should never happen since it is impossible to say where
      * exactly the evaluation error occurred. */
     VPE_EVAL_SILENT    = 0x0200
 } VarParseErrors;
diff -r 76fcafb7813a -r d774a6d78020 usr.bin/make/var.c
--- a/usr.bin/make/var.c        Sun Sep 13 18:27:39 2020 +0000
+++ b/usr.bin/make/var.c        Sun Sep 13 19:16:22 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: var.c,v 1.514 2020/09/13 18:27:39 rillig Exp $ */
+/*     $NetBSD: var.c,v 1.515 2020/09/13 19:16:22 rillig Exp $ */
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -121,7 +121,7 @@
 #include    "metachar.h"
 
 /*     "@(#)var.c      8.3 (Berkeley) 3/19/94" */
-MAKE_RCSID("$NetBSD: var.c,v 1.514 2020/09/13 18:27:39 rillig Exp $");
+MAKE_RCSID("$NetBSD: var.c,v 1.515 2020/09/13 19:16:22 rillig Exp $");
 
 #define VAR_DEBUG_IF(cond, fmt, ...)   \
     if (!(DEBUG(VAR) && (cond)))       \
@@ -3480,9 +3480,7 @@
        if (!ValidShortVarname(startc, start)) {
            (*pp)++;
            *out_val = var_Error;
-           /* XXX: It's a mixture between VPE_PARSE_MSG and VPE_PARSE_SILENT;
-            * In lint mode, an error message is printed. */
-           return VPE_PARSE_SILENT;
+           return VPE_PARSE_MSG;
        }
 
        name[0] = startc;



Home | Main Index | Thread Index | Old Index