From 8c6f940e1f50ccc4d530823607a3d0186dbe4ee0 Mon Sep 17 00:00:00 2001 From: Andrew Johnson Date: Wed, 28 Oct 2009 19:47:00 +0000 Subject: [PATCH] Improve warning message, suggest using -V flag. --- msi.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/msi.c b/msi.c index 65c8fe5b6..1f88c1519 100644 --- a/msi.c +++ b/msi.c @@ -55,6 +55,8 @@ static char *substituteGetReplacements(void *substitutePvt); /*Exit status*/ static int exitStatus = 0; +int opt_V = 0; + int main(int argc,char **argv) { @@ -86,6 +88,7 @@ int main(int argc,char **argv) strcpy(substitutionName,pval); } else if(strncmp(argv[1],"-V",2)==0) { macSuppressWarning(macPvt,0); + opt_V = 1; narg = 1; /* no argument for this option */ } else { usageExit(); @@ -231,8 +234,8 @@ endif: n = macExpandString(macPvt,input,buffer,MAX_BUFFER_SIZE-1); fputs(buffer,stdout); if (!unexpWarned && n<0) { - fprintf(stderr, "Warning: Some macros cannot be expanded:\n" - " %s\n", input); + fprintf(stderr, "Warning: Undefined macros present%s\n", + opt_V ? "" : ", use msi -V to list"); unexpWarned++; } }