[Libufo-commits] ufo-0.5/src/ui ucss.cpp,1.3,1.4
Status: Beta
Brought to you by:
schmidtjf
|
From: Johannes S. <sch...@us...> - 2005-09-02 14:13:34
|
Update of /cvsroot/libufo/ufo-0.5/src/ui In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25428/src/ui Modified Files: ucss.cpp Log Message: Fixed ufo_css_eatComments. Index: ucss.cpp =================================================================== RCS file: /cvsroot/libufo/ufo-0.5/src/ui/ucss.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** ucss.cpp 12 Jul 2005 13:41:09 -0000 1.3 --- ucss.cpp 2 Sep 2005 14:13:24 -0000 1.4 *************** *** 68,77 **** } ! // eats comment lines and empty lines ! // returns the comment ! void ! ufo_css_eatComments(std::istream & stream) { char comment1; char comment2; ufo_css_eatWhitespaces(stream); --- 68,80 ---- } ! // Checks whether a comment is following. ! // If yes, eats it and returns true. ! // Otherwise false. ! bool ! ufo_css_eatComment(std::istream & stream) { char comment1; char comment2; + bool comment_eaten = false; + std::string comment; ufo_css_eatWhitespaces(stream); *************** *** 83,88 **** comment1 = 0; comment2 = 0; do { ! if (stream) stream >> comment1; if (stream) stream >> comment2; } while (comment1 != '*' && comment2 != '/' && stream); --- 86,94 ---- comment1 = 0; comment2 = 0; + comment_eaten = true; do { ! do { ! if (stream) stream >> comment1; ! } while (comment1 != '*' && stream); if (stream) stream >> comment2; } while (comment1 != '*' && comment2 != '/' && stream); *************** *** 93,96 **** --- 99,112 ---- stream.putback(comment1); } + return comment_eaten; + } + + // eats comment lines and empty lines + void + ufo_css_eatComments(std::istream & stream) { + bool eat_comment = true; + while(eat_comment) { + eat_comment = ufo_css_eatComment(stream); + } } |