Module Name:    src
Committed By:   rillig
Date:           Thu Sep  3 16:02:03 UTC 2020

Modified Files:
        src/usr.bin/make: cond.c nonints.h

Log Message:
make(1): make parameter of Cond_Eval and Cond_EvalExpression const


To generate a diff of this commit:
cvs rdiff -u -r1.106 -r1.107 src/usr.bin/make/cond.c
cvs rdiff -u -r1.102 -r1.103 src/usr.bin/make/nonints.h

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/cond.c
diff -u src/usr.bin/make/cond.c:1.106 src/usr.bin/make/cond.c:1.107
--- src/usr.bin/make/cond.c:1.106	Sat Aug 29 13:38:48 2020
+++ src/usr.bin/make/cond.c	Thu Sep  3 16:02:02 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: cond.c,v 1.106 2020/08/29 13:38:48 rillig Exp $	*/
+/*	$NetBSD: cond.c,v 1.107 2020/09/03 16:02:02 rillig Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
@@ -70,14 +70,14 @@
  */
 
 #ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: cond.c,v 1.106 2020/08/29 13:38:48 rillig Exp $";
+static char rcsid[] = "$NetBSD: cond.c,v 1.107 2020/09/03 16:02:02 rillig Exp $";
 #else
 #include <sys/cdefs.h>
 #ifndef lint
 #if 0
 static char sccsid[] = "@(#)cond.c	8.2 (Berkeley) 1/2/94";
 #else
-__RCSID("$NetBSD: cond.c,v 1.106 2020/08/29 13:38:48 rillig Exp $");
+__RCSID("$NetBSD: cond.c,v 1.107 2020/09/03 16:02:02 rillig Exp $");
 #endif
 #endif /* not lint */
 #endif
@@ -1043,7 +1043,7 @@ do_Cond_EvalExpression(Boolean *value)
  *-----------------------------------------------------------------------
  */
 CondEvalResult
-Cond_EvalExpression(const struct If *info, char *line, Boolean *value,
+Cond_EvalExpression(const struct If *info, const char *line, Boolean *value,
 		    int eprint, Boolean strictLHS)
 {
     static const struct If *dflt_info;
@@ -1108,7 +1108,7 @@ Cond_EvalExpression(const struct If *inf
  *-----------------------------------------------------------------------
  */
 CondEvalResult
-Cond_Eval(char *line)
+Cond_Eval(const char *line)
 {
     enum { MAXIF = 128 };	/* maximum depth of .if'ing */
     enum { MAXIF_BUMP = 32 };	/* how much to grow by */

Index: src/usr.bin/make/nonints.h
diff -u src/usr.bin/make/nonints.h:1.102 src/usr.bin/make/nonints.h:1.103
--- src/usr.bin/make/nonints.h:1.102	Sun Aug 30 19:56:02 2020
+++ src/usr.bin/make/nonints.h	Thu Sep  3 16:02:02 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: nonints.h,v 1.102 2020/08/30 19:56:02 rillig Exp $	*/
+/*	$NetBSD: nonints.h,v 1.103 2020/09/03 16:02:02 rillig Exp $	*/
 
 /*-
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -91,8 +91,9 @@ int Compat_Make(void *, void *);
 
 /* cond.c */
 struct If;
-CondEvalResult Cond_EvalExpression(const struct If *, char *, Boolean *, int, Boolean);
-CondEvalResult Cond_Eval(char *);
+CondEvalResult Cond_EvalExpression(const struct If *, const char *,
+				   Boolean *, int, Boolean);
+CondEvalResult Cond_Eval(const char *);
 void Cond_restore_depth(unsigned int);
 unsigned int Cond_save_depth(void);
 

Reply via email to