From c072a23a1e66f1871139e00e85ca90c66a5be024 Mon Sep 17 00:00:00 2001 From: Holger Wansing Date: Sat, 18 Jan 2020 00:33:10 +0100 Subject: Fix gawk warnings about invalid regexp escapes with latest gawk version. Thanks to Mattia Rizzolo for the hint --- scripts/merge_xml.awk | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'scripts') diff --git a/scripts/merge_xml.awk b/scripts/merge_xml.awk index cf87055d9..42a92c172 100644 --- a/scripts/merge_xml.awk +++ b/scripts/merge_xml.awk @@ -25,7 +25,7 @@ BEGIN { { # In the main loop we only want to process entities that are refered to line = $0 - if (match (line, /^[[:space:]]*&.*\.xml;[[:space:]]*(<\!--.*-->[[:space:]]*|)*$/) > 0) { + if (match (line, /^[[:space:]]*&.*\.xml;[[:space:]]*([[:space:]]*|)*$/) > 0) { process_file(line, "main") } } @@ -92,7 +92,7 @@ function parse_file(PARSEFILE, FNAME, fname, nwline, comment_count) { # Update the count of 'open' comments comment_count += count_comments(nwline) - if (match(nwline, /^[[:space:]]*&.*\.xml;[[:space:]]*(<\!--.*-->[[:space:]]*|)*$/) > 0) { + if (match(nwline, /^[[:space:]]*&.*\.xml;[[:space:]]*([[:space:]]*|)*$/) > 0) { # If we find another entity reference, we process that file recursively # But not if the reference is within a comment if (comment_count != 0) { @@ -102,13 +102,13 @@ function parse_file(PARSEFILE, FNAME, fname, nwline, comment_count) { } } else { # Else we just print the line - if (match(nwline, /<\!--.*<.*>.*<.*>.*-->/) > 0) { + if (match(nwline, //) > 0) { # Comments containing "<...> ... <...>" are not handled correctly # by xml2pot and split2po, so we skip lines like that # Note: this is a workaround for a bug in the tools: # http://bugs.kde.org/show_bug.cgi?id=90294 print "** Comment deleted in line '" nwline "'" >>LOG - gsub(/<\!--.*<.*>.*<.*>.*-->/, "", nwline) + gsub(//, "", nwline) } print nwline >>OUTFILE } @@ -131,7 +131,7 @@ function get_entname(entline, ename) { function count_comments(inline, tmpline, count) { # 'abuse' gsub to count them tmpline = inline - count += gsub(/<\!--/, "", tmpline) + count += gsub(//, "", tmpline) return count } -- cgit v1.2.3