summaryrefslogtreecommitdiff
path: root/Build/source/libs/freetype2/freetype-2.6/builds/mac/ascii2mpw.py
diff options
context:
space:
mode:
authorPeter Breitenlohner <peb@mppmu.mpg.de>2015-06-12 09:16:52 +0000
committerPeter Breitenlohner <peb@mppmu.mpg.de>2015-06-12 09:16:52 +0000
commitb8b9109c7d33c66566e3c5e77fe76b269d9764f1 (patch)
tree030fcd99887e95bb669c295a9ecf5c4c43f4c021 /Build/source/libs/freetype2/freetype-2.6/builds/mac/ascii2mpw.py
parent651ca331cd7943896e894fd42cf13fa1d012347f (diff)
freetype 2.6
git-svn-id: svn://tug.org/texlive/trunk@37506 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/libs/freetype2/freetype-2.6/builds/mac/ascii2mpw.py')
-rwxr-xr-xBuild/source/libs/freetype2/freetype-2.6/builds/mac/ascii2mpw.py24
1 files changed, 24 insertions, 0 deletions
diff --git a/Build/source/libs/freetype2/freetype-2.6/builds/mac/ascii2mpw.py b/Build/source/libs/freetype2/freetype-2.6/builds/mac/ascii2mpw.py
new file mode 100755
index 00000000000..ad32b219772
--- /dev/null
+++ b/Build/source/libs/freetype2/freetype-2.6/builds/mac/ascii2mpw.py
@@ -0,0 +1,24 @@
+#!/usr/bin/env python
+import sys
+import string
+
+if len( sys.argv ) == 1 :
+ for asc_line in sys.stdin.readlines():
+ mpw_line = string.replace(asc_line, "\\xA5", "\245")
+ mpw_line = string.replace(mpw_line, "\\xB6", "\266")
+ mpw_line = string.replace(mpw_line, "\\xC4", "\304")
+ mpw_line = string.replace(mpw_line, "\\xC5", "\305")
+ mpw_line = string.replace(mpw_line, "\\xFF", "\377")
+ mpw_line = string.replace(mpw_line, "\n", "\r")
+ mpw_line = string.replace(mpw_line, "\\n", "\n")
+ sys.stdout.write(mpw_line)
+elif sys.argv[1] == "-r" :
+ for mpw_line in sys.stdin.readlines():
+ asc_line = string.replace(mpw_line, "\n", "\\n")
+ asc_line = string.replace(asc_line, "\r", "\n")
+ asc_line = string.replace(asc_line, "\245", "\\xA5")
+ asc_line = string.replace(asc_line, "\266", "\\xB6")
+ asc_line = string.replace(asc_line, "\304", "\\xC4")
+ asc_line = string.replace(asc_line, "\305", "\\xC5")
+ asc_line = string.replace(asc_line, "\377", "\\xFF")
+ sys.stdout.write(asc_line)