exgettext: Handle the functions and the macro definitions that the arguments are...
authorShujing Zhao <pearly.zhao@oracle.com>
Fri, 22 Jan 2010 02:50:44 +0000 (02:50 +0000)
committerShujing Zhao <pzhao@gcc.gnu.org>
Fri, 22 Jan 2010 02:50:44 +0000 (02:50 +0000)
2010-01-22  Shujing Zhao  <pearly.zhao@oracle.com>

        * exgettext: Handle the functions and the macro definitions that the
        arguments are broken into more than one line.

From-SVN: r156168

gcc/po/ChangeLog
gcc/po/exgettext

index 3e0cf425227f13edbba6d87e059522f1d08c733a..ccab0c2d15a130d449cebc6a691ea6d4e34ffceb 100644 (file)
@@ -1,3 +1,8 @@
+2010-01-22  Shujing Zhao  <pearly.zhao@oracle.com>
+
+       * exgettext: Handle the functions and the macro definitions that the
+       arguments are broken into more than one line.
+
 2010-01-20  Joseph Myers  <joseph@codesourcery.com>
 
        * zh_CN.po: Update.
index 7ff3799fa20776d5b16eddcb76cc137ecd2b086c..35f81a7d17242fee831d730ef285a586bc65aff3 100644 (file)
@@ -184,6 +184,18 @@ END {
        while (getline < file) {
            if (/^(#[   ]*define[       ]*)?[A-Za-z_].*\(.*msgid[,\)]/) {
                keyword_option($0)
+           } else if (/^(#[   ]*define[       ]*)?[A-Za-z_].*(\(|\(.*,)$/) {
+               name_line = $0
+               while (getline < file) {
+                 lineno++
+                 if (/msgid[,\)]/){
+                   keyword_option(name_line $0)
+                   break
+                 } else if (/,$/) {
+                     name_line = name_line $0
+                     continue
+                 } else break
+               }
            } else if (/%e/ || /%n/) {
                spec_error_string($0)
            }