Changeset 152
- Timestamp:
- 1999-02-08T14:26:11+13:00 (25 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/lib/display.cpp
r118 r152 12 12 /* 13 13 $Log$ 14 Revision 1.7 1999/02/08 01:26:11 rjmcnab 15 16 Improved the error reporting. 17 14 18 Revision 1.6 1999/01/19 08:30:23 rjmcnab 15 19 … … 752 756 } 753 757 754 if (!err && c == '_') 755 { 756 c = my_get(fin, line); // skip the _ 757 758 // skip all white space 759 while (!fin.eof() && my_isspace(c)) c = my_get(fin, line); 760 } 761 else err = 1; 758 if (!err && c == '_') { 759 c = my_get(fin, line); // skip the _ 760 761 // skip all white space 762 while (!fin.eof() && my_isspace(c)) c = my_get(fin, line); 763 } else if (!err) err = 1; 762 764 763 765 // get the macro parameters (optional) … … 779 781 while (!fin.eof() && my_isspace(c)) c = my_get(fin, line); 780 782 } 781 else err = 2;783 else if (!err) err = 2; 782 784 } 783 785 … … 833 835 834 836 err = 0; // for the test below 835 } 836 else err = 3;837 } 838 else err = 4;837 } 838 else if (!err) err = 3; 839 } 840 else if (!err) err = 4; 839 841 840 842 if (err) … … 842 844 // found an error, skip to the end of the line 843 845 if (logout != NULL) { 844 (*logout) << text_t2ascii << "Err: Unexpected input on line "; 845 (*logout) << line; 846 (*logout) << text_t2ascii << " ("; 847 (*logout) << err; 848 (*logout) << text_t2ascii << ")\n"; 846 (*logout) << text_t2ascii << "Error: "; 847 if (err == 1) (*logout) << text_t2ascii << "'_'"; 848 else if (err == 2) (*logout) << text_t2ascii << "']'"; 849 else if (err == 3) (*logout) << text_t2ascii << "'}'"; 850 else if (err == 4) (*logout) << text_t2ascii << "'{'"; 851 (*logout) << text_t2ascii << " expected on line "; 852 (*logout) << line ; 853 (*logout) << text_t2ascii << " of " << thisfilename << "\n"; 849 854 } 850 855 while (!fin.eof ())
Note:
See TracChangeset
for help on using the changeset viewer.