summaryrefslogtreecommitdiffstats
path: root/modules/freetype2/builds/mac/ascii2mpw.py
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 17:32:43 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 17:32:43 +0000
commit6bf0a5cb5034a7e684dcc3500e841785237ce2dd (patch)
treea68f146d7fa01f0134297619fbe7e33db084e0aa /modules/freetype2/builds/mac/ascii2mpw.py
parentInitial commit. (diff)
downloadthunderbird-6bf0a5cb5034a7e684dcc3500e841785237ce2dd.tar.xz
thunderbird-6bf0a5cb5034a7e684dcc3500e841785237ce2dd.zip
Adding upstream version 1:115.7.0.upstream/1%115.7.0upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'modules/freetype2/builds/mac/ascii2mpw.py')
-rwxr-xr-xmodules/freetype2/builds/mac/ascii2mpw.py24
1 files changed, 24 insertions, 0 deletions
diff --git a/modules/freetype2/builds/mac/ascii2mpw.py b/modules/freetype2/builds/mac/ascii2mpw.py
new file mode 100755
index 0000000000..ad32b21977
--- /dev/null
+++ b/modules/freetype2/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)