gbuild: Replace SHOWINCLUDES_PREFIX without regexp.
With MSVC Japanese, SHOWINCLUDES_PREFIX includes regexp special charactor \x5b (left square bracket). In this case replacing SHOWINCLUDES_PREFIX with regexp fails. To fix it, this commit changes the script not to use regexp. Example value of $SHOWINCLUDES_PREFIX from MSVC Japanese: $ echo $SHOWINCLUDES_PREFIX | hexdump -C 83 81 83 82 3a 20 83 43 83 93 83 4e 83 8b 81 5b |....:.C...N...[| 83 68 20 83 74 83 40 83 43 83 8b 3a 20 20 43 3a |.h.t.@.C..: C:| 5c 54 65 6d 70 5c 73 74 64 69 6f 2e 68 0d 0a |\Temp\stdio.h..| Change-Id: Ic7d85fc3a93807de11155488e9d0368427375c78 Reviewed-on: https://gerrit.libreoffice.org/3579 Reviewed-by: Kohei Yoshida <kohei.yoshida@suse.de> Tested-by: Kohei Yoshida <kohei.yoshida@suse.de>
This commit is contained in:
committed by
Kohei Yoshida
parent
0e750859cd
commit
80cf1c22b6
@@ -31,8 +31,6 @@ BEGIN {
|
||||
if (!showincludes_prefix) {
|
||||
showincludes_prefix = "Note: including file:"
|
||||
}
|
||||
regex = "^ *" showincludes_prefix " *"
|
||||
pattern = "/" regex "/"
|
||||
|
||||
# to match especially drive letters in whitelist case insensitive
|
||||
IGNORECASE = 1
|
||||
@@ -42,8 +40,10 @@ BEGIN {
|
||||
}
|
||||
|
||||
{
|
||||
if ($0 ~ regex) {
|
||||
sub(regex, "")
|
||||
sub(/^ */, "")
|
||||
if (index($0, showincludes_prefix) == 1) {
|
||||
$0 = substr($0, 1, length(showincludes_prefix))
|
||||
sub(/^ */, "")
|
||||
gsub(/\\/, "/")
|
||||
gsub(/ /, "\\ ")
|
||||
if ($0 ~ whitelist) { # filter out system headers
|
||||
|
||||
Reference in New Issue
Block a user