Skip to content

Commit

Permalink
Finish xasy port to MSDOS.
Browse files Browse the repository at this point in the history
  • Loading branch information
johncbowman committed Jul 14, 2018
1 parent cd700b4 commit c928c92
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
5 changes: 2 additions & 3 deletions GUI/xasy2asy.py
Expand Up @@ -38,8 +38,7 @@
import uuid

class AsymptoteEngine:
# xasy=chr(4)+"\n"
xasy="xasy\n"
xasy=chr(4)+"\n"

def __init__(self, path=None, keepFiles=DebugFlags.keepFiles, keepDefaultArgs=True):
if path is None:
Expand Down Expand Up @@ -68,7 +67,7 @@ def __init__(self, path=None, keepFiles=DebugFlags.keepFiles, keepDefaultArgs=Tr
else:
self.tmpdir = tempfile.mkdtemp(prefix='xasyData_')+os.sep

self.args=['-vv','-xasy', '-noV', '-q', '-inpipe=' + str(rx), '-outpipe=' + str(wa), '-o', self.tmpdir]
self.args=['-xasy', '-noV', '-q', '-inpipe=' + str(rx), '-outpipe=' + str(wa), '-o', self.tmpdir]

self.asyPath = path
self.asyProcess = None
Expand Down
10 changes: 6 additions & 4 deletions process.cc
Expand Up @@ -783,12 +783,14 @@ class iprompt : public icore {
// Continue taking input until a termination command is received from xasy.
block *parseXasyLine(string line) {

#ifdef __MSDOS__
const string EOT="\x04\r\n";
#else
const string EOT="\x04\n";
#endif
string s;
// while((s=getline(true)) != "\x04\n") {// End of transmission
while((s=getline(true)) != "xasy\n") {// End of transmission
cout << s << endl;
while((s=getline(true)) != EOT)
line += s;
}
return parser::parseString(line, "-", true);
}

Expand Down

0 comments on commit c928c92

Please sign in to comment.