changeset 181:9c3100ab29cc

Cosmetics.
author Matti Hamalainen <ccr@tnsp.org>
date Tue, 08 Sep 2015 10:48:48 +0300
parents b4a07ea2d739
children a59bb75aa0ec
files parsedata.pl
diffstat 1 files changed, 24 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/parsedata.pl	Tue Sep 01 14:51:25 2015 +0300
+++ b/parsedata.pl	Tue Sep 08 10:48:48 2015 +0300
@@ -394,20 +394,29 @@
 ### Main program
 ###
 
-while (defined(my $arg = shift)) {
-  if (substr($arg, 0, 1) eq "-") {
-    if ($arg =~ /^-($modes)$/o) {
+while (defined(my $arg = shift))
+{
+  if (substr($arg, 0, 1) eq "-")
+  {
+    if ($arg =~ /^-($modes)$/o)
+    {
       $opt_mode = $1;
     }
-    elsif ($arg eq "-dump") {
+    elsif ($arg eq "-dump")
+    {
       $opt_dump = 1;
     }
-    elsif ($arg eq "-o") {
+    elsif ($arg eq "-o")
+    {
       $opt_outfile = shift or die("Output filename option -o requires an argument.\n");
-    } else {
+    }
+    else
+    {
       die("Invalid option '$arg'.\n");
     }
-  } else {
+  }
+  else
+  {
     $opt_filename = $arg;
   }
 }
@@ -449,12 +458,16 @@
 
 my %class = ();
 my $body = fnode($otree, "body");
-if (defined($body) && defined($$body{"nodes"})) {
-  foreach my $n (@{$$body{"nodes"}}) {
-    if ($$n{"name"} eq "text") {
+if (defined($body) && defined($$body{"nodes"}))
+{
+  foreach my $n (@{$$body{"nodes"}})
+  {
+    if ($$n{"name"} eq "text")
+    {
       push(@{$class{"info"}}, $$n{"text"});
     }
-    elsif ($$n{"name"} eq "b") {
+    elsif ($$n{"name"} eq "b")
+    {
       push(@{$class{"data"}}, $n);
     }
   }