#include "mathlink.h"/* check a link for readable data */void f(MLINK lp);{ if(! MLFlush(lp)) { /* unable to flush any outgoing data buffered in lp */ } if(MLReady(lp)) { /* read the data from the link */ } else { /* data not ready to read */ }}