Fri Jun 16 07:12:46 2023 UTC ()
make: remove parameter names from function declarations

No binary change.


(rillig)
diff -r1.345 -r1.346 src/usr.bin/make/cond.c
diff -r1.320 -r1.321 src/usr.bin/make/make.h

cvs diff -r1.345 -r1.346 src/usr.bin/make/cond.c (expand / switch to unified diff)

--- src/usr.bin/make/cond.c 2023/06/01 07:44:10 1.345
+++ src/usr.bin/make/cond.c 2023/06/16 07:12:46 1.346
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: cond.c,v 1.345 2023/06/01 07:44:10 rillig Exp $ */ 1/* $NetBSD: cond.c,v 1.346 2023/06/16 07:12:46 rillig Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 1988, 1989, 1990 The Regents of the University of California. 4 * Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
5 * All rights reserved. 5 * All rights reserved.
6 * 6 *
7 * This code is derived from software contributed to Berkeley by 7 * This code is derived from software contributed to Berkeley by
8 * Adam de Boor. 8 * Adam de Boor.
9 * 9 *
10 * Redistribution and use in source and binary forms, with or without 10 * Redistribution and use in source and binary forms, with or without
11 * modification, are permitted provided that the following conditions 11 * modification, are permitted provided that the following conditions
12 * are met: 12 * are met:
13 * 1. Redistributions of source code must retain the above copyright 13 * 1. Redistributions of source code must retain the above copyright
14 * notice, this list of conditions and the following disclaimer. 14 * notice, this list of conditions and the following disclaimer.
@@ -82,27 +82,27 @@ @@ -82,27 +82,27 @@
82 * ':?then:else' variable modifier. 82 * ':?then:else' variable modifier.
83 * 83 *
84 * Cond_EndFile 84 * Cond_EndFile
85 * At the end of reading a makefile, ensure that the 85 * At the end of reading a makefile, ensure that the
86 * conditional directives are well-balanced. 86 * conditional directives are well-balanced.
87 */ 87 */
88 88
89#include <errno.h> 89#include <errno.h>
90 90
91#include "make.h" 91#include "make.h"
92#include "dir.h" 92#include "dir.h"
93 93
94/* "@(#)cond.c 8.2 (Berkeley) 1/2/94" */ 94/* "@(#)cond.c 8.2 (Berkeley) 1/2/94" */
95MAKE_RCSID("$NetBSD: cond.c,v 1.345 2023/06/01 07:44:10 rillig Exp $"); 95MAKE_RCSID("$NetBSD: cond.c,v 1.346 2023/06/16 07:12:46 rillig Exp $");
96 96
97/* 97/*
98 * Conditional expressions conform to this grammar: 98 * Conditional expressions conform to this grammar:
99 * Or -> And ('||' And)* 99 * Or -> And ('||' And)*
100 * And -> Term ('&&' Term)* 100 * And -> Term ('&&' Term)*
101 * Term -> Function '(' Argument ')' 101 * Term -> Function '(' Argument ')'
102 * Term -> Leaf Operator Leaf 102 * Term -> Leaf Operator Leaf
103 * Term -> Leaf 103 * Term -> Leaf
104 * Term -> '(' Or ')' 104 * Term -> '(' Or ')'
105 * Term -> '!' Term 105 * Term -> '!' Term
106 * Leaf -> "string" 106 * Leaf -> "string"
107 * Leaf -> Number 107 * Leaf -> Number
108 * Leaf -> VariableExpression 108 * Leaf -> VariableExpression
@@ -163,27 +163,27 @@ typedef struct CondParser { @@ -163,27 +163,27 @@ typedef struct CondParser {
163 163
164 const char *p; /* The remaining condition to parse */ 164 const char *p; /* The remaining condition to parse */
165 Token curr; /* Single push-back token used in parsing */ 165 Token curr; /* Single push-back token used in parsing */
166 166
167 /* 167 /*
168 * Whether an error message has already been printed for this 168 * Whether an error message has already been printed for this
169 * condition. The first available error message is usually the most 169 * condition. The first available error message is usually the most
170 * specific one, therefore it makes sense to suppress the standard 170 * specific one, therefore it makes sense to suppress the standard
171 * "Malformed conditional" message. 171 * "Malformed conditional" message.
172 */ 172 */
173 bool printedError; 173 bool printedError;
174} CondParser; 174} CondParser;
175 175
176static CondResult CondParser_Or(CondParser *par, bool); 176static CondResult CondParser_Or(CondParser *, bool);
177 177
178unsigned int cond_depth = 0; /* current .if nesting level */ 178unsigned int cond_depth = 0; /* current .if nesting level */
179 179
180/* Names for ComparisonOp. */ 180/* Names for ComparisonOp. */
181static const char opname[][3] = { "<", "<=", ">", ">=", "==", "!=" }; 181static const char opname[][3] = { "<", "<=", ">", ">=", "==", "!=" };
182 182
183MAKE_INLINE bool 183MAKE_INLINE bool
184skip_string(const char **pp, const char *str) 184skip_string(const char **pp, const char *str)
185{ 185{
186 size_t len = strlen(str); 186 size_t len = strlen(str);
187 bool ok = strncmp(*pp, str, len) == 0; 187 bool ok = strncmp(*pp, str, len) == 0;
188 if (ok) 188 if (ok)
189 *pp += len; 189 *pp += len;

cvs diff -r1.320 -r1.321 src/usr.bin/make/make.h (expand / switch to unified diff)

--- src/usr.bin/make/make.h 2023/06/01 07:44:10 1.320
+++ src/usr.bin/make/make.h 2023/06/16 07:12:46 1.321
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: make.h,v 1.320 2023/06/01 07:44:10 rillig Exp $ */ 1/* $NetBSD: make.h,v 1.321 2023/06/16 07:12:46 rillig Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 1988, 1989, 1990, 1993 4 * Copyright (c) 1988, 1989, 1990, 1993
5 * The Regents of the University of California. All rights reserved. 5 * The Regents of the University of California. All rights reserved.
6 * 6 *
7 * This code is derived from software contributed to Berkeley by 7 * This code is derived from software contributed to Berkeley by
8 * Adam de Boor. 8 * Adam de Boor.
9 * 9 *
10 * Redistribution and use in source and binary forms, with or without 10 * Redistribution and use in source and binary forms, with or without
11 * modification, are permitted provided that the following conditions 11 * modification, are permitted provided that the following conditions
12 * are met: 12 * are met:
13 * 1. Redistributions of source code must retain the above copyright 13 * 1. Redistributions of source code must retain the above copyright
14 * notice, this list of conditions and the following disclaimer. 14 * notice, this list of conditions and the following disclaimer.
@@ -768,28 +768,28 @@ typedef struct CmdOpts { @@ -768,28 +768,28 @@ typedef struct CmdOpts {
768} CmdOpts; 768} CmdOpts;
769 769
770extern CmdOpts opts; 770extern CmdOpts opts;
771extern bool forceJobs; 771extern bool forceJobs;
772extern char **environ; 772extern char **environ;
773 773
774/* arch.c */ 774/* arch.c */
775void Arch_Init(void); 775void Arch_Init(void);
776void Arch_End(void); 776void Arch_End(void);
777 777
778bool Arch_ParseArchive(char **, GNodeList *, GNode *); 778bool Arch_ParseArchive(char **, GNodeList *, GNode *);
779void Arch_Touch(GNode *); 779void Arch_Touch(GNode *);
780void Arch_TouchLib(GNode *); 780void Arch_TouchLib(GNode *);
781void Arch_UpdateMTime(GNode *gn); 781void Arch_UpdateMTime(GNode *);
782void Arch_UpdateMemberMTime(GNode *gn); 782void Arch_UpdateMemberMTime(GNode *);
783void Arch_FindLib(GNode *, SearchPath *); 783void Arch_FindLib(GNode *, SearchPath *);
784bool Arch_LibOODate(GNode *) MAKE_ATTR_USE; 784bool Arch_LibOODate(GNode *) MAKE_ATTR_USE;
785bool Arch_IsLib(GNode *) MAKE_ATTR_USE; 785bool Arch_IsLib(GNode *) MAKE_ATTR_USE;
786 786
787/* compat.c */ 787/* compat.c */
788bool Compat_RunCommand(const char *, GNode *, StringListNode *); 788bool Compat_RunCommand(const char *, GNode *, StringListNode *);
789void Compat_MakeAll(GNodeList *); 789void Compat_MakeAll(GNodeList *);
790void Compat_Make(GNode *, GNode *); 790void Compat_Make(GNode *, GNode *);
791 791
792/* cond.c */ 792/* cond.c */
793extern unsigned int cond_depth; 793extern unsigned int cond_depth;
794CondResult Cond_EvalCondition(const char *) MAKE_ATTR_USE; 794CondResult Cond_EvalCondition(const char *) MAKE_ATTR_USE;
795CondResult Cond_EvalLine(const char *) MAKE_ATTR_USE; 795CondResult Cond_EvalLine(const char *) MAKE_ATTR_USE;