X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=CASE-MAPPING.awk;h=cc64e619548ce3cca3b20567a20d6cd6923dc973;hb=5b1eda7298f9f792b00a6903e2693885ef8f0582;hp=fdb2dcffeea27fde70b18670b47062bd0a55c0b9;hpb=676fe1d34b0ae408c5d16b4fb618b3bd0b943bd8;p=m17n%2Fm17n-db.git diff --git a/CASE-MAPPING.awk b/CASE-MAPPING.awk index fdb2dcf..cc64e61 100644 --- a/CASE-MAPPING.awk +++ b/CASE-MAPPING.awk @@ -18,12 +18,11 @@ # You should have received a copy of the GNU Lesser General Public # License along with the m17n library; if not, write to the Free -# Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA -# 02111-1307, USA. +# Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +# Boston, MA 02110-1301, USA. BEGIN { - FS = ";"; - FILE = 1; + FS = "[ \t]*;[ \t]*"; } function mtext (str) { @@ -39,23 +38,21 @@ function mtext (str) { printf (" "); } -FILE == 1 && /^[^#]/ && NF == 5 { - printf ("0x%s ( ", $1); - mtext ($2); - mtext ($3); - mtext ($4); - printf (")\n"); - X[$1] = 1; - } - -/^0000;/ { - FILE = 2; -} - -FILE == 2 && /^[^#]/ && ($13 || $14 || $15) && ! X[$1] { - if (! $13) $13 = $1; - if (! $14) $14 = $1; - if (! $15) $15 = $1; - printf ("0x%s ( \"\\u%s\" \"\\u%s\" \"\\u%s\" )\n", - $1, $14, $15, $13); +/^[^\#]/ { + if (FILENAME == "UNIDATA/SpecialCasing.txt" && NF == 5) { + printf ("0x%s ( ", $1); + mtext($2); + mtext($3); + mtext($4); + printf (")\n"); + X[$1] = 1; + } + + else if (($13 || $14 || $15) && ! X[$1]) { + if (! $13) $13 = $1; + if (! $14) $14 = $1; + if (! $15) $15 = $1; + printf ("0x%s ( \"\\u%s\" \"\\u%s\" \"\\u%s\" )\n", + $1, $14, $15, $13); + } }