diff --git a/GUI/xasy2asy.py b/GUI/xasy2asy.py index e4b3f3700..f0d84cd98 100644 --- a/GUI/xasy2asy.py +++ b/GUI/xasy2asy.py @@ -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: @@ -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 diff --git a/process.cc b/process.cc index a7baac74a..8622be836 100644 --- a/process.cc +++ b/process.cc @@ -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); }