[metapost] MPlib: detect bye/end

Nicola nvitacolonna at gmail.com
Fri Dec 9 11:50:54 CET 2016


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



More information about the metapost mailing list