Module Name: src Committed By: rillig Date: Sun Sep 13 19:16:22 UTC 2020
Modified Files: src/usr.bin/make: nonints.h var.c Log Message: make(1): make documentation of VarParseErrors more precise To generate a diff of this commit: cvs rdiff -u -r1.119 -r1.120 src/usr.bin/make/nonints.h cvs rdiff -u -r1.514 -r1.515 src/usr.bin/make/var.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/usr.bin/make/nonints.h diff -u src/usr.bin/make/nonints.h:1.119 src/usr.bin/make/nonints.h:1.120 --- src/usr.bin/make/nonints.h:1.119 Sun Sep 13 18:27:39 2020 +++ src/usr.bin/make/nonints.h Sun Sep 13 19:16:22 2020 @@ -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 @@ typedef enum { 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 @@ typedef enum { /* 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 @@ typedef enum { /* 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; Index: src/usr.bin/make/var.c diff -u src/usr.bin/make/var.c:1.514 src/usr.bin/make/var.c:1.515 --- src/usr.bin/make/var.c:1.514 Sun Sep 13 18:27:39 2020 +++ src/usr.bin/make/var.c Sun Sep 13 19:16:22 2020 @@ -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 @@ Var_Parse(const char **pp, GNode *ctxt, 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;