MPlib: detect bye/end

Nicola <[email protected]>
Newsgroups gmane.comp.tex.metapost
Message-ID <[email protected]>
Hello,
when running a non-interactive MP instance, how can I detect that the 
last executed command was `bye`, `end` or something that causes MetaPost 
to quit?

For instance, after

     char *line = "bye."
     int history = mp_execute(mp, line, strlen(line));

mp_rundata(mp) returns non-zero size data (it returns zero-size data if 
I execute another command).

Nicola

--
http://tug.org/metapost/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.