[Libreoffice-commits] core.git: solenv/gbuild

Isamu Mogi saturday6c at gmail.com
Mon May 13 06:26:59 PDT 2013


 solenv/gbuild/platform/filter-showIncludes.awk |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

New commits:
commit 80cf1c22b629d524de18f20dcfd155d889ee5d2f
Author: Isamu Mogi <saturday6c at gmail.com>
Date:   Sat May 11 08:31:51 2013 +0000

    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. at .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 at suse.de>
    Tested-by: Kohei Yoshida <kohei.yoshida at suse.de>

diff --git a/solenv/gbuild/platform/filter-showIncludes.awk b/solenv/gbuild/platform/filter-showIncludes.awk
index 9d94f3b..5d3fdcb 100755
--- a/solenv/gbuild/platform/filter-showIncludes.awk
+++ b/solenv/gbuild/platform/filter-showIncludes.awk
@@ -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


More information about the Libreoffice-commits mailing list