]> git.pld-linux.org Git - packages/gnome-applets.git/blob - gnome-applets-gweather-sunny.patch
- updated for gnome-applets-2.6.1
[packages/gnome-applets.git] / gnome-applets-gweather-sunny.patch
1 --- gweather/weather.c.orig     2004-03-14 21:47:40.000000000 +0100
2 +++ gweather/weather.c  2004-03-29 10:15:48.000000000 +0200
3 @@ -298,7 +298,7 @@
4  #define TIME_RE_STR  "^([0-9]{6})Z$"
5  #define WIND_RE_STR  "^(([0-9]{3})|VRB)([0-9]?[0-9]{2})(G[0-9]?[0-9]{2})?KT$"
6  #define VIS_RE_STR   "^(([0-9]?[0-9])|(M?1/[0-9]?[0-9]))SM$"
7 -#define CLOUD_RE_STR "^(CLR|BKN|SCT|FEW|OVC)([0-9]{3})?$"
8 +#define CLOUD_RE_STR "^(CLR|BKN|SCT|FEW|OVC|SKC)([0-9]{3})?$"
9  #define TEMP_RE_STR  "^(M?[0-9][0-9])/(M?(//|[0-9][0-9]))$"
10  #define PRES_RE_STR  "^(A|Q)([0-9]{4})$"
11  #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)$"
12 @@ -526,7 +526,13 @@
13      gint alt = -1;
14  
15      if (regexec(&metar_re[CLOUD_RE], tokp, 0, NULL, 0) == REG_NOMATCH)
16 -        return FALSE;
17 +       if (!strcmp(tokp,"CAVOK"))
18 +       {
19 +               info->sky=SKY_CLEAR;
20 +               return TRUE;
21 +       }
22 +       else
23 +               return FALSE;
24  
25      strncpy(stype, tokp, 3);
26      stype[3] = 0;
27 @@ -538,6 +544,8 @@
28  
29      if (!strcmp(stype, "CLR")) {
30          info->sky = SKY_CLEAR;
31 +    } else if (!strcmp(stype, "SKC")) {
32 +        info->sky = SKY_CLEAR;
33      } else if (!strcmp(stype, "BKN")) {
34          info->sky = SKY_BROKEN;
35      } else if (!strcmp(stype, "SCT")) {
This page took 0.027102 seconds and 3 git commands to generate.