From: brarcher Date: Wed, 23 Dec 2015 16:59:04 +0000 (+0000) Subject: checkmk: use double slash in regular expression X-Git-Tag: 0.11.0~54 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=88d9a9a075114d7459595db5900558eec192c25d;p=check checkmk: use double slash in regular expression For many awk implementations using both a single and double slash escapes in regex expressions in strings works correctly. However, it was observed on Solaris that a single slash results in the literal value being added to the string (e.g. \n was a newline) and only the double slash works as expected. As there should be no harm, updating the regex expressions to use double slashes. git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1229 64e312b2-a51f-0410-8e61-82d0ca0eb02a --- diff --git a/AUTHORS b/AUTHORS index 2778987..8d7628b 100644 --- a/AUTHORS +++ b/AUTHORS @@ -56,6 +56,7 @@ Contributors: Matt Clarkson (Fix CMake checks using time.h for MinGW and MSVC) Mario Sanchez Prada (configure.ac cleanup) Tobias Frost (strip timestamps from examples to enable reproducible builds) + James Morris (checkmk regex update for Solaris support) Anybody who has contributed code to Check or Check's build system is considered an author. Send patches to this file to diff --git a/checkmk/checkmk.in b/checkmk/checkmk.in index 4173de7..2100274 100644 --- a/checkmk/checkmk.in +++ b/checkmk/checkmk.in @@ -24,11 +24,11 @@ BEGIN { outfname="/dev/stdout"; # Tokens - pp_ws = "[ \t\f\v\r\n]+"; - pp_ws_op = "[ \t\f\v\r\n]*"; + pp_ws = "[ \\t\\f\\v\\r\\n]+"; + pp_ws_op = "[ \\t\\f\\v\\r\\n]*"; pp_digit = "[0-9]+" pp_prefix = pp_ws_op "#" pp_ws_op; - pp_sep = "[ \t\f\v\r\n]+"; + pp_sep = "[ \\t\\f\\v\\r\\n]+"; pp_name = ".+"; pp_hex_quad = "[A-F0-9a-f][A-F0-9a-f][A-F0-9a-f][A-F0-9a-f]" pp_ucn = "\\\\(u" pp_hex_quad "|U" pp_hex_quad pp_hex_quad ")";