make(1): rename Var_Set_with_flags to Var_SetWithFlags

Now that the function is exported from the var module, it should stick
to the naming conventions for public functions.
This commit is contained in:
rillig 2020-11-07 00:06:13 +00:00
parent ec691613fa
commit ec28553452
3 changed files with 11 additions and 11 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: job.c,v 1.304 2020/11/06 21:20:31 rillig Exp $ */
/* $NetBSD: job.c,v 1.305 2020/11/07 00:06:13 rillig Exp $ */
/*
* Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
@ -143,7 +143,7 @@
#include "trace.h"
/* "@(#)job.c 8.2 (Berkeley) 3/19/94" */
MAKE_RCSID("$NetBSD: job.c,v 1.304 2020/11/06 21:20:31 rillig Exp $");
MAKE_RCSID("$NetBSD: job.c,v 1.305 2020/11/07 00:06:13 rillig Exp $");
/* A shell defines how the commands are run. All commands for a target are
* written into a single file, which is then given to the shell to execute
@ -2077,7 +2077,7 @@ Shell_Init(void)
#endif
shellPath = str_concat3(_PATH_DEFSHELLDIR, "/", shellName);
}
Var_Set_with_flags(".SHELL", shellPath, VAR_CMDLINE, VAR_SET_READONLY);
Var_SetWithFlags(".SHELL", shellPath, VAR_CMDLINE, VAR_SET_READONLY);
if (commandShell->exit == NULL) {
commandShell->exit = "";
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: nonints.h,v 1.152 2020/11/07 00:02:54 rillig Exp $ */
/* $NetBSD: nonints.h,v 1.153 2020/11/07 00:06:13 rillig Exp $ */
/*-
* Copyright (c) 1988, 1989, 1990, 1993
@ -288,7 +288,7 @@ typedef enum VarParseResult {
void Var_Delete(const char *, GNode *);
void Var_Set(const char *, const char *, GNode *);
void Var_Set_with_flags(const char *, const char *, GNode *, VarSetFlags);
void Var_SetWithFlags(const char *, const char *, GNode *, VarSetFlags);
void Var_Append(const char *, const char *, GNode *);
Boolean Var_Exists(const char *, GNode *);
const char *Var_Value(const char *, GNode *, void **);

View File

@ -1,4 +1,4 @@
/* $NetBSD: var.c,v 1.670 2020/11/07 00:02:54 rillig Exp $ */
/* $NetBSD: var.c,v 1.671 2020/11/07 00:06:13 rillig Exp $ */
/*
* Copyright (c) 1988, 1989, 1990, 1993
@ -130,7 +130,7 @@
#include "metachar.h"
/* "@(#)var.c 8.3 (Berkeley) 3/19/94" */
MAKE_RCSID("$NetBSD: var.c,v 1.670 2020/11/07 00:02:54 rillig Exp $");
MAKE_RCSID("$NetBSD: var.c,v 1.671 2020/11/07 00:06:13 rillig Exp $");
#define VAR_DEBUG1(fmt, arg1) DEBUG1(VAR, fmt, arg1)
#define VAR_DEBUG2(fmt, arg1, arg2) DEBUG2(VAR, fmt, arg1, arg2)
@ -767,8 +767,8 @@ Var_UnExport(const char *str)
/* See Var_Set for documentation. */
void
Var_Set_with_flags(const char *name, const char *val, GNode *ctxt,
VarSetFlags flags)
Var_SetWithFlags(const char *name, const char *val, GNode *ctxt,
VarSetFlags flags)
{
const char *unexpanded_name = name;
char *name_freeIt = NULL;
@ -889,7 +889,7 @@ out:
void
Var_Set(const char *name, const char *val, GNode *ctxt)
{
Var_Set_with_flags(name, val, ctxt, 0);
Var_SetWithFlags(name, val, ctxt, 0);
}
/*-
@ -1457,7 +1457,7 @@ ModifyWord_Loop(const char *word, SepBuf *buf, void *data)
return;
args = data;
Var_Set_with_flags(args->tvar, word, args->ctx, VAR_NO_EXPORT);
Var_SetWithFlags(args->tvar, word, args->ctx, VAR_NO_EXPORT);
(void)Var_Subst(args->str, args->ctx, args->eflags, &s);
/* TODO: handle errors */