From cb194c3c1b66de114f1b156a0dafe4088e15eaca Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Mon, 25 Mar 2019 23:30:32 +0000 Subject: [PATCH] scripts/specialize-patch: Fix handling of #endif followed by a tab git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8082 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- scripts/specialize-patch | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/scripts/specialize-patch b/scripts/specialize-patch index 97ee1acbf..188e556cf 100755 --- a/scripts/specialize-patch +++ b/scripts/specialize-patch @@ -525,9 +525,8 @@ function process_preprocessor_statement(evaluated, condition) { ei = substr(ei, 6) else if (ei ~ "^+#ifdef") ei = substr(ei, 9) - evaluated = sprintf("%s /* %s */", - $0 ~ " " ? substr($0, 1, index($0, " ")) : $0, - ei); + match($0, "([^/ ]*)[[:blank:]]*/\\*[^*]*\\*/[[:blank:]]*", arg) + evaluated = sprintf("%s /* %s */", arg[1], ei); if (match(evaluated, "([^/ ]*) */\\* defined\\(([^()]*)\\) \\*/", arg)) {