diff options
Diffstat (limited to 'Build/source/utils/xindy-new/xindy/make-rules/inputenc/make-inp-rules.pl')
-rwxr-xr-x | Build/source/utils/xindy-new/xindy/make-rules/inputenc/make-inp-rules.pl | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/Build/source/utils/xindy-new/xindy/make-rules/inputenc/make-inp-rules.pl b/Build/source/utils/xindy-new/xindy/make-rules/inputenc/make-inp-rules.pl new file mode 100755 index 00000000000..af418797b38 --- /dev/null +++ b/Build/source/utils/xindy-new/xindy/make-rules/inputenc/make-inp-rules.pl @@ -0,0 +1,31 @@ +#!/usr/bin/perl + +print <<"EOF"; +;; this file was generated by make-inp-rules.pl +;; these rules map inputenc generated macros (back) to 8-bit characters + +EOF + + +while (<STDIN>) { + if (/\\indexentry{(.+)--([8-9a-f][0-9a-f])\}\{1\}/) { + if (!($1 =~ /inputenc Error/)) { + $i = hex($2); + $macro = $1; + $macro =~ s/\~/~~/g; + $macro =~ s/\"/~\"/g; + printf("(merge-rule \"%s\" \"%c\" :string)\n", + $macro, $i); + if (@ARGV[0] eq "cyracc" && + $macro =~ /(cyra |cyre |cyri |cyro |cyru |cyrerev |cyryu |cyrya )/i) { + printf("(merge-rule \"\\'{%s}\" \"\\'%c\" :string)\n", + $macro, $i); + } + } + } +} + +print <<"EOF"; + +;; end of style file. +EOF |