]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Properly treat comment lines that have nothing except the comment sign. Simplify...
authorwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 29 Aug 2002 17:02:14 +0000 (17:02 +0000)
committerwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 29 Aug 2002 17:02:14 +0000 (17:02 +0000)
git-svn-id: https://svn.dealii.org/trunk@6342 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/deal.II/source/grid/grid_in.cc
deal.II/doc/news/2002/c-3-4.html

index eec1d5ff3e3651455a5ad052eaf21cbd95f766ef..15dbabae5251bcb71734316ebfd5630b10bf1613 100644 (file)
@@ -401,14 +401,14 @@ void GridIn<dim>::skip_empty_lines (std::istream &in)
 template <int dim>
 void GridIn<dim>::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
index 560c7d0dfbbe9153b37058cad071b8184b9e24a9..c5a1c4f87024a2fcee08f6c61bf8db795f200dfe 100644 (file)
@@ -162,6 +162,14 @@ contributor's names are abbreviated by WB (Wolfgang Bangerth), GK
 <h3>deal.II</h3>
 
 <ol>
+  <li> <p> 
+       Fixed: the <code class="class">GridIn</code> class had problems
+       when reading in UCD grids with comment lines that contained
+       only the comment sign, but nothing else. This is now fixed.
+       <br>
+       (WB 2002/08/30)
+  </p>
+
   <li> <p> 
        Improved: <code class="class">VectorTools</code>::<code
        class="member">integrate_difference</code> can compute <i>L<sup>p</sup></i>

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.