Indicate which modifier a result applies to, helps debug complex cases.
This commit is contained in:
parent
ba9f975490
commit
7ab69f08a8
|
@ -1,4 +1,4 @@
|
||||||
/* $NetBSD: var.c,v 1.111 2006/06/29 22:01:17 rillig Exp $ */
|
/* $NetBSD: var.c,v 1.112 2006/07/28 17:08:55 sjg Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1988, 1989, 1990, 1993
|
* Copyright (c) 1988, 1989, 1990, 1993
|
||||||
|
@ -69,14 +69,14 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef MAKE_NATIVE
|
#ifndef MAKE_NATIVE
|
||||||
static char rcsid[] = "$NetBSD: var.c,v 1.111 2006/06/29 22:01:17 rillig Exp $";
|
static char rcsid[] = "$NetBSD: var.c,v 1.112 2006/07/28 17:08:55 sjg Exp $";
|
||||||
#else
|
#else
|
||||||
#include <sys/cdefs.h>
|
#include <sys/cdefs.h>
|
||||||
#ifndef lint
|
#ifndef lint
|
||||||
#if 0
|
#if 0
|
||||||
static char sccsid[] = "@(#)var.c 8.3 (Berkeley) 3/19/94";
|
static char sccsid[] = "@(#)var.c 8.3 (Berkeley) 3/19/94";
|
||||||
#else
|
#else
|
||||||
__RCSID("$NetBSD: var.c,v 1.111 2006/06/29 22:01:17 rillig Exp $");
|
__RCSID("$NetBSD: var.c,v 1.112 2006/07/28 17:08:55 sjg Exp $");
|
||||||
#endif
|
#endif
|
||||||
#endif /* not lint */
|
#endif /* not lint */
|
||||||
#endif
|
#endif
|
||||||
|
@ -1989,6 +1989,7 @@ ApplyModifiers(char *nstr, const char *tstr,
|
||||||
int cnt; /* Used to count brace pairs when variable in
|
int cnt; /* Used to count brace pairs when variable in
|
||||||
* in parens or braces */
|
* in parens or braces */
|
||||||
char delim;
|
char delim;
|
||||||
|
int modifier; /* that we are processing */
|
||||||
Var_Parse_State parsestate; /* Flags passed to helper functions */
|
Var_Parse_State parsestate; /* Flags passed to helper functions */
|
||||||
|
|
||||||
delim = '\0';
|
delim = '\0';
|
||||||
|
@ -2040,7 +2041,7 @@ ApplyModifiers(char *nstr, const char *tstr,
|
||||||
printf("Applying :%c to \"%s\"\n", *tstr, nstr);
|
printf("Applying :%c to \"%s\"\n", *tstr, nstr);
|
||||||
}
|
}
|
||||||
newStr = var_Error;
|
newStr = var_Error;
|
||||||
switch (*tstr) {
|
switch ((modifier = *tstr)) {
|
||||||
case ':':
|
case ':':
|
||||||
{
|
{
|
||||||
if (tstr[1] == '=' ||
|
if (tstr[1] == '=' ||
|
||||||
|
@ -2937,7 +2938,7 @@ ApplyModifiers(char *nstr, const char *tstr,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (DEBUG(VAR)) {
|
if (DEBUG(VAR)) {
|
||||||
printf("Result is \"%s\"\n", newStr);
|
printf("Result of :%c is \"%s\"\n", modifier, newStr);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (newStr != nstr) {
|
if (newStr != nstr) {
|
||||||
|
|
Loading…
Reference in New Issue