[fondue-commits] [SCM] Fondue Font Editor branch, master, updated. 5978d43d7876c7f1ae06431e88f544bd3e5dd2c8
Eugeniy Meshcheryakov
eugen at debian.org
Sun Apr 27 12:11:26 UTC 2008
The following commit has been merged in the master branch:
commit 5978d43d7876c7f1ae06431e88f544bd3e5dd2c8
Author: Eugeniy Meshcheryakov <eugen at debian.org>
Date: Sun Apr 27 14:11:06 2008 +0200
accept \r\n as line terminator for UCD files
diff --git a/nongui/unicodenameslist.awk b/nongui/unicodenameslist.awk
index 60f116e..1160ec5 100644
--- a/nongui/unicodenameslist.awk
+++ b/nongui/unicodenameslist.awk
@@ -1,4 +1,4 @@
-# Copyright © 2007 Євгеній Мещеряков <eugen at debian.org>
+# Copyright © 2007-2008 Євгеній Мещеряков <eugen at debian.org>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -22,6 +22,11 @@ BEGIN {
print "const UnicodeNamesList::UnicodeName UnicodeNamesList::UnicodeNames[] = {"
}
+# for DOS text file format compatibility
+function strip_cr(s) {
+ return gensub(/\r/, "", "g", s)
+}
+
# escape C and HTML special characters
function escape(s) {
tmp = gensub(/\\/, "\\\\\\\\", "g", s)
@@ -59,7 +64,7 @@ function close_record() {
close_record()
in_desc = 1
has_extra_desc = 0
- printf " {0x%s, \"%s\", ", $1, escape($2)
+ printf " {0x%s, \"%s\", ", $1, escape(strip_cr($2))
}
/^\t/ {
@@ -71,7 +76,7 @@ function close_record() {
has_extra_desc = 1
printf "\""
}
- printf "%s", replace_special(escape($2))
+ printf "%s", replace_special(escape(strip_cr($2)))
}
}
--
Fondue Font Editor
More information about the fondue-commits
mailing list