Var_SubstOnly() is only used to subsitute a variable from the global

context (and only in one place to substitute the .for variable). Therefor
there is no need to pass the context as a parameter.

Patch:	7.197
Submitted by:	Max Okumoto <okumoto@ucsd.edu>
This commit is contained in:
harti 2005-05-10 12:02:15 +00:00
parent aac19b11ef
commit e571f8f77c
3 changed files with 4 additions and 4 deletions

View File

@ -271,8 +271,7 @@ For_Run(int lineno)
Var_Set(var, val, VAR_GLOBAL);
DEBUGF(FOR, ("--- %s = %s\n", var, val));
str = Buf_Peel(Var_SubstOnly(var, Buf_Data(buf),
VAR_GLOBAL, FALSE));
str = Buf_Peel(Var_SubstOnly(var, Buf_Data(buf), FALSE));
Parse_FromString(str, lineno);
Var_Delete(var, VAR_GLOBAL);

View File

@ -2380,8 +2380,9 @@ Var_Subst(const char *str, GNode *ctxt, Boolean err)
* None. The old string must be freed by the caller
*/
Buffer *
Var_SubstOnly(const char *var, const char *str, GNode *ctxt, Boolean err)
Var_SubstOnly(const char *var, const char *str, Boolean err)
{
GNode *ctxt = VAR_GLOBAL;
Boolean errorReported;
Buffer *buf; /* Buffer for forming things */

View File

@ -61,7 +61,7 @@ char *Var_Parse(const char *, struct GNode *, Boolean, size_t *, Boolean *);
void Var_Set(const char *, const char *, struct GNode *);
void Var_SetEnv(const char *, struct GNode *);
struct Buffer *Var_Subst(const char *, struct GNode *, Boolean);
struct Buffer *Var_SubstOnly(const char *, const char *, struct GNode *, Boolean);
struct Buffer *Var_SubstOnly(const char *, const char *, Boolean);
char *Var_Value(const char *, struct GNode *, char **);
#endif /* var_h_9cccafce */