B-4 PRODIGIT
if(ch == '?')
{
do
{
read_buf();
}while((rd_result == 0)&&(timeout == 0));
rd_result = 0;
}
}
for (cnt = 0;cnt<= count;cnt++)
{
intbuf[cnt] = '';
tempbuf[cnt] = '';
}
return(result);
}
return(OPER_ERR);
}
int pd_rd(char *buf,int count)
{
char ch;
int cnt = 0;
do
{
ch = queue[cnt];
*buf = ch;
cnt = cnt++;
buf = buf++;
}while((ch != '\n') && (cnt != count));
*buf = '\0';
queue[0] = '\0';
if (timeout == 1)
{
return(TIME_OUT);
}
return(SUCCESS);
}
int read_buf()