[packages/mate-applets: 168/311] - fix for Sky: Invalid

glen glen at pld-linux.org
Thu Dec 27 20:37:14 CET 2012


commit 28982be435785fc57099a13720979e845e6a19f4
Author: Marcin Krzyżanowski <marcin.krzyzanowski at hakore.com>
Date:   Fri Apr 16 10:53:52 2004 +0000

    - fix for Sky: Invalid
    
    Changed files:
        gnome-applets-gweather-sunny.patch -> 1.1

 gnome-applets-gweather-sunny.patch | 35 +++++++++++++++++++++++++++++++++++
 1 file changed, 35 insertions(+)
---
diff --git a/gnome-applets-gweather-sunny.patch b/gnome-applets-gweather-sunny.patch
new file mode 100644
index 0000000..9e64da9
--- /dev/null
+++ b/gnome-applets-gweather-sunny.patch
@@ -0,0 +1,35 @@
+--- gweather/weather.c.orig	2004-03-14 21:47:40.000000000 +0100
++++ gweather/weather.c	2004-03-29 10:15:48.000000000 +0200
+@@ -298,7 +298,7 @@
+ #define TIME_RE_STR  "^([0-9]{6})Z$"
+ #define WIND_RE_STR  "^(([0-9]{3})|VRB)([0-9]?[0-9]{2})(G[0-9]?[0-9]{2})?KT$"
+ #define VIS_RE_STR   "^(([0-9]?[0-9])|(M?1/[0-9]?[0-9]))SM$"
+-#define CLOUD_RE_STR "^(CLR|BKN|SCT|FEW|OVC)([0-9]{3})?$"
++#define CLOUD_RE_STR "^(CLR|BKN|SCT|FEW|OVC|SKC)([0-9]{3})?$"
+ #define TEMP_RE_STR  "^(M?[0-9][0-9])/(M?(//|[0-9][0-9]))$"
+ #define PRES_RE_STR  "^(A|Q)([0-9]{4})$"
+ #define COND_RE_STR  "^(-|\\+)?(VC|MI|BC|PR|TS|BL|SH|DR|FZ)?(DZ|RA|SN|SG|IC|PE|GR|GS|UP|BR|FG|FU|VA|SA|HZ|PY|DU|SQ|SS|DS|PO|\\+?FC)$"
+@@ -526,7 +526,13 @@
+     gint alt = -1;
+ 
+     if (regexec(&metar_re[CLOUD_RE], tokp, 0, NULL, 0) == REG_NOMATCH)
+-        return FALSE;
++	if (!strcmp(tokp,"CAVOK"))
++	{
++		info->sky=SKY_CLEAR;
++		return TRUE;
++	}
++   	else
++        	return FALSE;
+ 
+     strncpy(stype, tokp, 3);
+     stype[3] = 0;
+@@ -538,6 +544,8 @@
+ 
+     if (!strcmp(stype, "CLR")) {
+         info->sky = SKY_CLEAR;
++    } else if (!strcmp(stype, "SKC")) {
++        info->sky = SKY_CLEAR;
+     } else if (!strcmp(stype, "BKN")) {
+         info->sky = SKY_BROKEN;
+     } else if (!strcmp(stype, "SCT")) {
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/mate-applets.git/commitdiff/65c1b73f8721e2c1dd8f5b7d875df06b87ad8453



More information about the pld-cvs-commit mailing list