From 2d98bfdff42fe2b3f0bf47c3cd1a1ed71ec0488c Mon Sep 17 00:00:00 2001 From: wolf Date: Thu, 29 Aug 2002 17:02:14 +0000 Subject: [PATCH] Properly treat comment lines that have nothing except the comment sign. Simplify code while at it. git-svn-id: https://svn.dealii.org/trunk@6342 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/deal.II/source/grid/grid_in.cc | 14 +++++++------- deal.II/doc/news/2002/c-3-4.html | 8 ++++++++ 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/deal.II/deal.II/source/grid/grid_in.cc b/deal.II/deal.II/source/grid/grid_in.cc index eec1d5ff3e..15dbabae52 100644 --- a/deal.II/deal.II/source/grid/grid_in.cc +++ b/deal.II/deal.II/source/grid/grid_in.cc @@ -401,14 +401,14 @@ void GridIn::skip_empty_lines (std::istream &in) template void GridIn::skip_comment_lines (std::istream &in, const char comment_start) -{ +{ char c; - while (in.get(c), c==comment_start) - { - char line[256]; - in.get (line, 255, '\n'); // ignore rest of line, at most 256 chars - in.get (c); // ignore '\n' at end of line. - }; + // loop over the following comment + // lines + while ((c=in.get()) == comment_start) + // loop over the characters after + // the comment starter + while (in.get() != '\n'); // put back first character of // first non-comment line diff --git a/deal.II/doc/news/2002/c-3-4.html b/deal.II/doc/news/2002/c-3-4.html index 560c7d0dfb..c5a1c4f870 100644 --- a/deal.II/doc/news/2002/c-3-4.html +++ b/deal.II/doc/news/2002/c-3-4.html @@ -162,6 +162,14 @@ contributor's names are abbreviated by WB (Wolfgang Bangerth), GK

deal.II

    +
  1. + Fixed: the GridIn class had problems + when reading in UCD grids with comment lines that contained + only the comment sign, but nothing else. This is now fixed. +
    + (WB 2002/08/30) +

    +
  2. Improved: VectorTools::integrate_difference can compute Lp -- 2.39.5