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): add const to For_Eval and For_Accum



details:   https://anonhg.NetBSD.org/src/rev/d62c42454f26
branches:  trunk
changeset: 938335:d62c42454f26
user:      rillig <rillig%NetBSD.org@localhost>
date:      Sun Sep 06 19:30:53 2020 +0000

description:
make(1): add const to For_Eval and For_Accum

diffstat:

 usr.bin/make/for.c     |  12 ++++++------
 usr.bin/make/nonints.h |   6 +++---
 2 files changed, 9 insertions(+), 9 deletions(-)

diffs (67 lines):

diff -r 55dcd9174e2b -r d62c42454f26 usr.bin/make/for.c
--- a/usr.bin/make/for.c        Sun Sep 06 19:28:49 2020 +0000
+++ b/usr.bin/make/for.c        Sun Sep 06 19:30:53 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: for.c,v 1.72 2020/09/06 19:28:49 rillig Exp $  */
+/*     $NetBSD: for.c,v 1.73 2020/09/06 19:30:53 rillig Exp $  */
 
 /*
  * Copyright (c) 1992, The Regents of the University of California.
@@ -30,14 +30,14 @@
  */
 
 #ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: for.c,v 1.72 2020/09/06 19:28:49 rillig Exp $";
+static char rcsid[] = "$NetBSD: for.c,v 1.73 2020/09/06 19:30:53 rillig Exp $";
 #else
 #include <sys/cdefs.h>
 #ifndef lint
 #if 0
 static char sccsid[] = "@(#)for.c      8.1 (Berkeley) 6/6/93";
 #else
-__RCSID("$NetBSD: for.c,v 1.72 2020/09/06 19:28:49 rillig Exp $");
+__RCSID("$NetBSD: for.c,v 1.73 2020/09/06 19:30:53 rillig Exp $");
 #endif
 #endif /* not lint */
 #endif
@@ -120,7 +120,7 @@
  *     -1: A .for statement with a bad syntax error, discard.
  */
 int
-For_Eval(char *line)
+For_Eval(const char *line)
 {
     For *new_for;
     const char *ptr;
@@ -269,9 +269,9 @@
  */
 
 int
-For_Accum(char *line)
+For_Accum(const char *line)
 {
-    char *ptr = line;
+    const char *ptr = line;
 
     if (*ptr == '.') {
 
diff -r 55dcd9174e2b -r d62c42454f26 usr.bin/make/nonints.h
--- a/usr.bin/make/nonints.h    Sun Sep 06 19:28:49 2020 +0000
+++ b/usr.bin/make/nonints.h    Sun Sep 06 19:30:53 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: nonints.h,v 1.104 2020/09/03 18:19:15 rillig Exp $     */
+/*     $NetBSD: nonints.h,v 1.105 2020/09/06 19:30:53 rillig Exp $     */
 
 /*-
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -98,8 +98,8 @@
 unsigned int Cond_save_depth(void);
 
 /* for.c */
-int For_Eval(char *);
-int For_Accum(char *);
+int For_Eval(const char *);
+int For_Accum(const char *);
 void For_Run(int);
 
 /* job.c */



Home | Main Index | Thread Index | Old Index