* Fixed use portable method for escaping symbol for gawk 3 and 4
authorVOS Maintainer <vos.admin@openlinksw.com>
Thu, 8 Mar 2012 13:52:41 +0000 (13:52 +0000)
committerDebian Krap Maintainers <debian-qt-kde@lists.debian.org>
Wed, 17 Apr 2013 19:30:26 +0000 (19:30 +0000)
Gbp-Pq: Name portable-method-for-escaping-symbol-gawk.diff

binsrc/cached_resources/res_to_c.awk
binsrc/hosting/perl/pl_to_c.awk
binsrc/hosting/python/py_to_c.awk
binsrc/ws/wsrm/xsd2sql.awk
libsrc/Wi/sql_to_c.awk

index 31b4c5c9088a78ec8f5760743978730eda4a4ac0..9de67890fda425fc5c776a6689665caa6b78b11e 100644 (file)
@@ -30,13 +30,7 @@ BEGIN   {
        }
        {
          fun = $0
-         # was: gsub ( /\\/, "\\\\", fun)
-         q = "\\\\"
-         if (PROCINFO["version"] ~ /^4/)
-           gsub ( q, q q, fun)
-         else
-           gsub ( q, q, fun)
-
+          gsub ( "\\\\", "&&", fun)
          gsub ( /"/, "\\\"", fun)
          gsub ( /\$/, "\\044", fun)
          gsub ( /.*/, "\"&\\n\",", fun)
index 369610f7db8f17c16558b3ad70a6a9d29a39cd20..7307d419dd0d8b7bea82a5043ffa399a64a0835e 100644 (file)
@@ -42,7 +42,7 @@ END {
     }
 
   x = $0
-  gsub (/\\/, "\\\\", x)
+  gsub ( "\\\\", "&&", x)
   gsub (/\"/, "\\\"", x)
   print "\"" x "\\n\""
 }
index f7d6935f86340b15103d5628d6c31a0482ad8a8f..8de185148d0c0939f72f0550cd2c9b56ca0fcfb6 100644 (file)
@@ -48,7 +48,7 @@ END {
     }
 
   x = $0
-  gsub (/\\/, "\\\\", x)
+  gsub ( "\\\\", "&&", x)
   gsub (/\"/, "\\\"", x)
   print "\"" x "\\n\""
 }
index 074a30d73efdfaa18d963c675e4c80900d753038..27052075563c543b4fe254a3f23598c40077b622 100644 (file)
@@ -54,7 +54,7 @@ BEGIN {
       print "  ses := string_output ();"
     }
   str = $0
-  gsub ( /\\/, "\\\\", str)
+  gsub ( "\\\\", "&&", str)
   gsub ( /'/, "\\'", str)
 
   #
index d52470373b7db97c4cb28b76951cb69914072cdd..3a2b52e0af28b7059ea3caa00bd1369d2c5f5a51 100644 (file)
@@ -343,13 +343,7 @@ BEGIN   {
 
                 # does escape the symbols
                fun = $0
-               q = "\\\\"
-               if (PROCINFO["version"] ~ /^4/)
-                   gsub ( q, q q, fun)
-               else
-                   gsub ( q, q, fun)
-
-               #WAS: gsub ( /\\/, "\\\\", fun)
+               gsub ("\\\\", "&&", fun)
 
                # remove whitespace except when there is just a semicolon
                if ((in_xsl_mode == 0) && (in_xsd_mode == 0))