From 8cb332836f8b5d961e1c6afd20c97ee365af4a1d Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Wed, 1 Apr 2015 07:17:17 +0000 Subject: [PATCH] scripts/specialize-patch: Fix a bug in evaluate() git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6176 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- scripts/specialize-patch | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/specialize-patch b/scripts/specialize-patch index dd0c842f2..f0b0e79ce 100755 --- a/scripts/specialize-patch +++ b/scripts/specialize-patch @@ -227,7 +227,7 @@ function evaluate(stmnt, pattern, arg, op, result) { stmnt = "+#if " (op[2] != 0 ? op[1] : op[2]) } - pattern="^+#if[[:blank:]]*(!*[[:blank:]]*[A-Za-z_]*[[:blank:]]*)\\&\\&[[:blank:]]*([01])[[:blank:]]*$" + pattern="^+#if[[:blank:]]*(!*[[:blank:]]*[A-Za-z_]*)[[:blank:]]*\\&\\&[[:blank:]]*([01])[[:blank:]]*$" while (match(stmnt, pattern, op) != 0) { stmnt = "+#if " (op[2] != 0 ? op[1] : op[2]) @@ -561,6 +561,8 @@ BEGIN { delete_next_blank_line = 0 if (match($0, "^+ *#")) { + if (debug) + printf "/* debug specialize-patch: line %d: %s*/\n", NR, $0 process_preprocessor_statement() } else if (output)