From: Wolfgang Bangerth Date: Wed, 19 Jan 2011 00:23:32 +0000 (+0000) Subject: The previous incarnation of the script did not work for code that looks like X-Git-Tag: v8.0.0~4474 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5d6d934254c09f4cdfd36411315e8d277020b4c2;p=dealii.git The previous incarnation of the script did not work for code that looks like this: void f (int /*value*/) since it recognized the '/*' as the start of the block comment but did not expect the '*/' on the same line. Consequently, it scanned forward to the next place we have the '*/' marker, skipping all the text in between (or to the end of the file). git-svn-id: https://svn.dealii.org/trunk@23211 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/doc/doxygen/tutorial/program2plain b/deal.II/doc/doxygen/tutorial/program2plain index 92ca48494b..d18bf8ca86 100644 --- a/deal.II/doc/doxygen/tutorial/program2plain +++ b/deal.II/doc/doxygen/tutorial/program2plain @@ -2,7 +2,7 @@ # $Id$ # Version: $Name$ # -# Copyright (C) 2010 by the deal.II authors +# Copyright (C) 2010, 2011 by the deal.II authors # # This file is subject to QPL and may not be distributed # without copyright and license information. Please refer @@ -17,33 +17,10 @@ my $block_comment = 0; while (<>) { - # Eliminate comment lines + # Eliminate //-comment lines next if (m!^\s*//!); - if (s!^\s*/\*.*\*/!!g) - { - print unless (m/^\s*$/); - next; - } - #Find begin of block comment - if (s!/\*.*!!) - { - $block_comment = 1; - # Print unless empty - print unless m/^\s*$/; - next; - } - - # Find end of block comment - if ($block_comment != 0) - { - if (s!.*\*/!!) - { - $block_comment = 0; - # Print unless empty - print unless m/^\s*$/; - } - next; - } + + # Otherwise print the line print; }