int main(void) { int i = 0; buf_init(); while (1) { buf_stat(); if (buf_in() == 1) //When 0xAA has entered during this fuction, execute the data output mode { if (buf_start == buf_end) printf("No more data to Print"); //if startpoint and endpoint else{ printf("\n\n\nGive me how much data you want out : "); scanf("%d", &i); if (i <= buf_size) buf_out(i); } } } }
void operator()(MapArg arg, MPrRes res) const { (*this)(buf_in(arg), buf_out(res)); }
void operator()(VecArg arg, VPrRes res) const { (*this)(buf_in(arg), buf_out(res)); }