diff options
author | Yaakov Selkowitz <yselkowi@redhat.com> | 2022-01-09 16:19:48 -0500 |
---|---|---|
committer | Yaakov Selkowitz <yselkowi@redhat.com> | 2022-01-09 20:32:44 -0500 |
commit | bd9b4b5a2c4176ef4e116a5973095eb493a779c1 (patch) | |
tree | de0317f3b542b92ca570665b6ea272e47365d394 /iso_639.sed | |
parent | e3e59650141c5f8b5b825fa30b06459eac9e4401 (diff) | |
download | cygwin-filesystem-bd9b4b5a2c4176ef4e116a5973095eb493a779c1.tar.gz cygwin-filesystem-bd9b4b5a2c4176ef4e116a5973095eb493a779c1.tar.xz cygwin-filesystem-bd9b4b5a2c4176ef4e116a5973095eb493a779c1.zip |
Sync with mingw-filesystem 128
Diffstat (limited to 'iso_639.sed')
-rw-r--r-- | iso_639.sed | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/iso_639.sed b/iso_639.sed new file mode 100644 index 0000000..e7e4d05 --- /dev/null +++ b/iso_639.sed @@ -0,0 +1,31 @@ +1,/<iso_639_entries/b + +# on each new iso-code process the current one +\!\(<iso_639_entry\|</iso_639_entries>\)!{ + x + s/^$// + # we are on the first iso-code--nothing to process here + t + # process and write to output + s/\s\+/ /g + s/<iso_639_entry// + s!/\s*>!! + # use '%' as a separator of parsed and unparsed input + s/\(.*\)iso_639_2T_code="\([^"]\+\)"\(.*\)/\2 % \1 \3/ + s/\([^%]\+\)%\(.*\)iso_639_2B_code="\([^"]\+\)"\(.*\)/\1\t\3 % \2 \4/ + # clear subst. memory for the next t + t clear + :clear + s/\([^%]\+\)%\(.*\)iso_639_1_code="\([^"]\+\)"\(.*\)/\1\t\3 % \2 \4/ + t name + # no 639-1 code--write xx + s/%/\tXX %/ + :name + s/\([^%]\+\)%\(.*\)name="\([^"]\+\)"\(.*\)/\1\t\3/ + s/ \t/\t/g + p + b + :noout +} + +H |