From f17896d1b996da13d21e07836de59cbb4d57e706 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Fri, 20 Jul 2001 14:44:37 +0000 Subject: externalize the pm 2 pm_.c in fake_c.pl --- perl-install/share/po/fake_c.pl | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100755 perl-install/share/po/fake_c.pl (limited to 'perl-install/share/po/fake_c.pl') diff --git a/perl-install/share/po/fake_c.pl b/perl-install/share/po/fake_c.pl new file mode 100755 index 000000000..86146bdaf --- /dev/null +++ b/perl-install/share/po/fake_c.pl @@ -0,0 +1,14 @@ +#!/usr/bin/perl -lp + +s|_\(\[(.*),\s*(.*),\s*(.*)\]| ngettext($2,$3,$1)|; # special plural form handling + +s|^(__?\()| $1|; # add a blank at the beginning (?!) +s,\Qs/#.*//,,; # ugly special case +s|//|/""/|g; # ensure // or not understood as comments + +s,(^|[^\$])#([^+].*),\1/*\2*/,; # rewrite comments to C format except for: + # - ``#+ xxx'' comments which are kept + # - ``$#xxx'' which are not comments + +s|$|\\n\\|; # multi-line strings not handled in C + -- cgit v1.2.1