From b2661392649ece0c93a5a5a56c9861027a78ffe2 Mon Sep 17 00:00:00 2001 From: lxoliva Date: Fri, 29 Jan 2010 04:42:46 +0000 Subject: [PATCH] Adjust initc, defsc, ocomment and oprepline to work better with PCRE engines. git-svn-id: http://www.fsfla.org/svn/fsfla/software/linux-libre/scripts@5899 559672b5-ba27-0410-b829-e8f1faed8b1b --- deblob-check | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/deblob-check b/deblob-check index ed1ce37181b..6d91e05454d 100755 --- a/deblob-check +++ b/deblob-check @@ -1,6 +1,6 @@ #! /bin/sh -# deblob-check version 2010-01-24 +# deblob-check version 2010-01-26 # Inspired in gNewSense's find-firmware script. # Written by Alexandre Oliva @@ -3929,12 +3929,12 @@ check () { # $1 (implicitly anchored to the beginning of the line), and ending # at the first ';' that's not within comments. initc () { - addx "$1\\([^;]*\\|$comment\\)*[;]\\?" $2 + addx "$1\\([^;]\\|$comment\\)*[;]\\?" $2 } # Same as initc, but require the terminating semicolon. defsc () { - addx "$1\\([^;]*\\|$comment\\)*[;]" $2 + addx "$1\\([^;]\\|$comment\\)*[;]" $2 } # Accept as a non-blob an expression $1 that would have otherwise @@ -3946,13 +3946,13 @@ check () { # Match up to the end a comment started in $1. ocomment () { - addx "$1[/]*\\([^/]\\|[^*/][/]*\\)*[*][/]" $2 + addx "$1[/]*\\([*]*[^*/][/]*\\)*[*]\+[/]" $2 } # Match $1 followed by backslash-terminated lines and a last # non-backslash-terminated line. oprepline () { - addx "$1\\([^\\n]*\\\\[\\n]\\)*[^\\n\\\\]*$" $2 + addx "$1\\([^\\\\\\n]*[\\\\][\\n]\\)*[^\\\\\\n]*$" $2 } # Match $1 in $2 as a blob. Not anchored. -- 2.31.1