summaryrefslogtreecommitdiffstats
path: root/perl-install/share/po/fake_c.pl
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2001-09-15 14:40:45 +0000
committerPascal Rigaux <pixel@mandriva.com>2001-09-15 14:40:45 +0000
commit7ee2825d864dc47256557f7951bb1a72210224f2 (patch)
treee240e90a4173509527b48698ac09e6e40dc6a62e /perl-install/share/po/fake_c.pl
parent02b777ace76a6cb4d65c24e74cd736b373eb1063 (diff)
downloaddrakx-7ee2825d864dc47256557f7951bb1a72210224f2.tar
drakx-7ee2825d864dc47256557f7951bb1a72210224f2.tar.gz
drakx-7ee2825d864dc47256557f7951bb1a72210224f2.tar.bz2
drakx-7ee2825d864dc47256557f7951bb1a72210224f2.tar.xz
drakx-7ee2825d864dc47256557f7951bb1a72210224f2.zip
fix a tricky hack
Diffstat (limited to 'perl-install/share/po/fake_c.pl')
-rwxr-xr-xperl-install/share/po/fake_c.pl11
1 files changed, 9 insertions, 2 deletions
diff --git a/perl-install/share/po/fake_c.pl b/perl-install/share/po/fake_c.pl
index 64f20ca9c..21cf25b04 100755
--- a/perl-install/share/po/fake_c.pl
+++ b/perl-install/share/po/fake_c.pl
@@ -5,11 +5,18 @@ s|^(__?\()| $1|; # add a blank at the beginning (?!)
s|_\(\[(.*),\s*(.*),\s*(.*)\]|ngettext($2,$3,$1)|; # special plural form handling
s,\Qs/#.*//,,; # ugly special case
-s|//|/""/|g; # ensure // or not understood as comments
-s,(^|[^\$])#([^+].*),\1/*\2*/,; # rewrite comments to C format except for:
+s,(^|[^\$])#([^+].*),"$1/*" . simpl($2) . "*/",e;
+ # rewrite comments to C format except for:
# - ``#+ xxx'' comments which are kept
# - ``$#xxx'' which are not comments
+s|//|/""/|g; # ensure // or not understood as comments
+
s|$|\\n\\|; # multi-line strings not handled in C
+sub simpl {
+ local $_ = $_[0];
+ s,\*/,,g;
+ $_;
+}