From 19d5591abadf4237944a582ef6cb54019d1a013b Mon Sep 17 00:00:00 2001 From: handa Date: Wed, 18 Feb 2009 00:48:52 +0000 Subject: [PATCH] *** empty log message *** --- utils/expand-mdb.awk | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/utils/expand-mdb.awk b/utils/expand-mdb.awk index a13c937..4067750 100644 --- a/utils/expand-mdb.awk +++ b/utils/expand-mdb.awk @@ -19,13 +19,11 @@ BEGIN { } /[^<]*<\/filename>/ { - from = match($0, ""); - HEAD = substr($0, 1, from - 1) - if (length(HEAD) > 1 && ! match(HEAD, "^[ \t]*$")) - printf "%s\n", substr($0, 1, from - 1); - to = match($0, "<\/filename>"); - TAIL = substr($0, to + RLENGTH); - FILE = sprintf("%s%s", SUBDIR[KEY], substr($0, from+10, to - (from+10))); + from = match($0, "[^<]*"); + to = from + RLENGTH; + printf "%s\n", substr($0, 1, to - 1); + TAIL = substr($0, to); + FILE = sprintf("%s%s", SUBDIR[KEY], substr($0, from + 10, to - from - 21)); system(sprintf("ls %s/%s | sed -f %s", M17NDB, FILE, SEDFILE)); if (length(TAIL) > 0 && ! match(TAIL, "^[ \t]*$")) print TAIL; -- 1.7.10.4