support comments in dsn files

This commit is contained in:
dickelbeck 2008-01-06 00:45:49 +00:00
parent a3510713b9
commit 9a2829f1e2
1 changed files with 15 additions and 5 deletions

View File

@ -601,13 +601,23 @@ L_read:
goto exit; goto exit;
} }
cur = next; cur = start;
}
// skip leading whitespace // skip leading whitespace
while( cur<limit && isspace(*cur) ) while( cur<limit && isspace(*cur) )
++cur; ++cur;
// if the first non-blank character is #, this line is a comment.
if( cur<limit && *cur=='#' )
goto L_read;
}
else
{
// skip leading whitespace
while( cur<limit && isspace(*cur) )
++cur;
}
if( cur >= limit ) if( cur >= limit )
goto L_read; goto L_read;