|
@@ -191,11 +191,19 @@ pm_getuint(istream * const ifP) {
|
|
|
-----------------------------------------------------------------------------*/
|
|
-----------------------------------------------------------------------------*/
|
|
|
char ch;
|
|
char ch;
|
|
|
unsigned int i;
|
|
unsigned int i;
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
|
|
+ // skip whitespace
|
|
|
do {
|
|
do {
|
|
|
ch = ifP->get();
|
|
ch = ifP->get();
|
|
|
- } while (ch == ' ' || ch == '\t' || ch == '\n' || ch == '\r');
|
|
|
|
|
|
|
|
|
|
|
|
+ if (ch == '#') {
|
|
|
|
|
+ // Skip a comment
|
|
|
|
|
+ do {
|
|
|
|
|
+ ch = ifP->get();
|
|
|
|
|
+ } while (ch != EOF && ch != '\n');
|
|
|
|
|
+ }
|
|
|
|
|
+ } while (ch == ' ' || ch == '\t' || ch == '\n' || ch == '\r');
|
|
|
|
|
+
|
|
|
if (ch < '0' || ch > '9')
|
|
if (ch < '0' || ch > '9')
|
|
|
pm_error("junk in file where an unsigned integer should be");
|
|
pm_error("junk in file where an unsigned integer should be");
|
|
|
|
|
|