Disabling auto-refresh of game list by default, as it is causing bugs sometimes
[open-ps2-loader.git] / thirdparty / freetype-2.3.12 / builds / mac / ascii2mpw.py
blobad32b219772550f2efecb6029ace370cce08aa0c
1 #!/usr/bin/env python
2 import sys
3 import string
5 if len( sys.argv ) == 1 :
6 for asc_line in sys.stdin.readlines():
7 mpw_line = string.replace(asc_line, "\\xA5", "\245")
8 mpw_line = string.replace(mpw_line, "\\xB6", "\266")
9 mpw_line = string.replace(mpw_line, "\\xC4", "\304")
10 mpw_line = string.replace(mpw_line, "\\xC5", "\305")
11 mpw_line = string.replace(mpw_line, "\\xFF", "\377")
12 mpw_line = string.replace(mpw_line, "\n", "\r")
13 mpw_line = string.replace(mpw_line, "\\n", "\n")
14 sys.stdout.write(mpw_line)
15 elif sys.argv[1] == "-r" :
16 for mpw_line in sys.stdin.readlines():
17 asc_line = string.replace(mpw_line, "\n", "\\n")
18 asc_line = string.replace(asc_line, "\r", "\n")
19 asc_line = string.replace(asc_line, "\245", "\\xA5")
20 asc_line = string.replace(asc_line, "\266", "\\xB6")
21 asc_line = string.replace(asc_line, "\304", "\\xC4")
22 asc_line = string.replace(asc_line, "\305", "\\xC5")
23 asc_line = string.replace(asc_line, "\377", "\\xFF")
24 sys.stdout.write(asc_line)