Hi MartinK,
My problem is exactly happended in _io_scanline(). And the fix is also in _io_scanline() and
_io_scanline_format_ignore_white_space().
char _io_scanline_format_ignore_white_space
(
/* [IN/OUT] the address of the string pointer */
registerchar _PTR_ _PTR_ s_ptr,
/* [OUT] the number of characters skipped */
register_mqx_uint _PTR_ count
)
{
/* Body */
registerchar c;
*count = 0;
c = **s_ptr;
//while ( (c == ' ') || (c == '\t') ) {//WMQ change - ignore all white spaces
while ( (c == ' ') || (c == '\t') || (c == '\n') || (c == '\r') || (c =='\v') || (c == '\f') ) {
c = *(++*s_ptr);
(*count)++;
}
/* Endwhile */
return (c);
}
/* Endbody */
_mqx_int _io_scanline
(
/* [IN] the input line of ascii data*/
char _PTR_ line_ptr,
/* [IN] fmt first points to the format string */
char _PTR_ format,
/* [IN] the list of parameters */
va_list args_ptr
)
{
/* Body */
char suppress_field;
register_mqx_int c;
register_mqx_uint n;
char _PTR_ sptr = NULL;
_mqx_int sign;
uint_32 val;
_mqx_int width;
_mqx_int numtype; /* used to indicate bit size of argument */
register_mqx_int number_of_chars;
_mqx_uint temp;
_mqx_uint base;
pointer tmp_ptr;
#if MQX_INCLUDE_FLOATING_POINT_IO
double dnum;
#endif
n = 0;
number_of_chars = 0;
while ((c = *format++) != 0) {
width = 0;
/*
** skip white space in format string, and any in input line
*/
//if ( (c == ' ') || (c == '\t') ) { //WMQ change - ignore all white spaces
if ( (c == ' ') || (c == '\t') || (c == '\n') || (c == '\r') || (c =='\v') || (c == '\f')) {
if ( ! _io_scanline_format_ignore_white_space( (
char _PTR_ _PTR_)&format, &temp ) ) {
......