[Pkg-wmaker-commits] [wmfrog] 47/145: 0.2.2

Doug Torrance dtorrance-guest at moszumanska.debian.org
Sun Aug 23 05:46:20 UTC 2015


This is an automated email from the git hooks/post-receive script.

dtorrance-guest pushed a commit to branch master
in repository wmfrog.

commit ba327e131f8526748d8cf85b1517113e45390879
Author: thibautc <thibautc at frenchie.pcf.com>
Date:   Fri Aug 27 10:04:38 2010 -0700

    0.2.2
---
 wmfrog/CHANGES         |  1 +
 wmfrog/Src/weather.pl  | 18 +++++++++++-------
 wmfrog/dist/weather.pl | 18 +++++++++++-------
 3 files changed, 23 insertions(+), 14 deletions(-)

diff --git a/wmfrog/CHANGES b/wmfrog/CHANGES
index 25abcf9..db61e7c 100644
--- a/wmfrog/CHANGES
+++ b/wmfrog/CHANGES
@@ -1,6 +1,7 @@
 
 Version         Description
 -------------------------------------------------------------------------
+0.2.2		08/27/2010 : Fixed wind parsing
 0.2.1		08/2010 : Fixed possible buffer overflows as reported by Petr Pisar / Jim Ramsey
 		Fixed weather.pl for change in weather format as reported bt Ben Parees
 0.2.0	Fixed potentail security risk, by storing temp data in ~/.wmapps/ rather than /tmp
diff --git a/wmfrog/Src/weather.pl b/wmfrog/Src/weather.pl
index 1019f8c..f6b4a7c 100755
--- a/wmfrog/Src/weather.pl
+++ b/wmfrog/Src/weather.pl
@@ -7,7 +7,6 @@
 #in wich case you should choose ftp.
 $mode="http"; # html || ftp
 
-
 ########################################
 # Start:
 ########################################
@@ -59,8 +58,8 @@ if($mode eq "http")
     $i=0;
     while($i!=8)
     {
-	$line=<DATA>;
-	$i++;
+		$line=<DATA>;
+		$i++;
     }
 }
 $newLine=<DATA>;
@@ -72,27 +71,32 @@ close DATA;
 
 chomp $line;
 @args=split(/\ /,$line);
-
+#print "line: $line";
+#print "args: @args";
 if(debug)
 {
 	#print "@args\n";
 }
 
+#print "line: $line";
 $i=0;
 $station=@args[$i];
 if(($station eq 'METAR') or ($station eq 'SPECI'))
 {
 	$station=@args[$i+1];
-	$i++;
+	$i++
 }
-$i++;
-$i++;#time
+$i++;#date (ln 1)
+$i++;#time (ln 1)
+$i++;#station (ln 2)
+$i++;#datetime (ln 2)
 $wind=@args[$i];
 if($wind eq 'AUTO')
 {
 	$wind=@args[$i+1];
 	$i++;
 }
+#print "wind: $wind";
 $i++;
 $visibility=@args[$i];
 $i++;#Visibility
diff --git a/wmfrog/dist/weather.pl b/wmfrog/dist/weather.pl
index 1019f8c..f6b4a7c 100755
--- a/wmfrog/dist/weather.pl
+++ b/wmfrog/dist/weather.pl
@@ -7,7 +7,6 @@
 #in wich case you should choose ftp.
 $mode="http"; # html || ftp
 
-
 ########################################
 # Start:
 ########################################
@@ -59,8 +58,8 @@ if($mode eq "http")
     $i=0;
     while($i!=8)
     {
-	$line=<DATA>;
-	$i++;
+		$line=<DATA>;
+		$i++;
     }
 }
 $newLine=<DATA>;
@@ -72,27 +71,32 @@ close DATA;
 
 chomp $line;
 @args=split(/\ /,$line);
-
+#print "line: $line";
+#print "args: @args";
 if(debug)
 {
 	#print "@args\n";
 }
 
+#print "line: $line";
 $i=0;
 $station=@args[$i];
 if(($station eq 'METAR') or ($station eq 'SPECI'))
 {
 	$station=@args[$i+1];
-	$i++;
+	$i++
 }
-$i++;
-$i++;#time
+$i++;#date (ln 1)
+$i++;#time (ln 1)
+$i++;#station (ln 2)
+$i++;#datetime (ln 2)
 $wind=@args[$i];
 if($wind eq 'AUTO')
 {
 	$wind=@args[$i+1];
 	$i++;
 }
+#print "wind: $wind";
 $i++;
 $visibility=@args[$i];
 $i++;#Visibility

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-wmaker/wmfrog.git



More information about the Pkg-wmaker-commits mailing list