//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
-// Foundation, 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
while ((i = sock->readline(buf, buflen))) {
if (i <= 2 && isspace(buf[0]) && (!buf[1] || isspace(buf[1])))
break;
while ((i = sock->readline(buf, buflen))) {
if (i <= 2 && isspace(buf[0]) && (!buf[1] || isspace(buf[1])))
break;
distance = i;
} else {
// M?(\d{1,2}|\d{1,2}/\d{1,2}|\d{1,2} \d{1,2}/\d{1,2})(SM|KM)
distance = i;
} else {
// M?(\d{1,2}|\d{1,2}/\d{1,2}|\d{1,2} \d{1,2}/\d{1,2})(SM|KM)
- { "SH", "showers of" },
- { "TS", "thunderstorm with" },
- { "BC", "patches of" },
- { "BL", "blowing" },
- { "DR", "low drifting" },
- { "FZ", "freezing" },
- { "MI", "shallow" },
- { "PR", "partial" },
+ { "SH", "showers of" },
+ { "TS", "thunderstorm with" },
+ { "BC", "patches of" },
+ { "BL", "blowing" },
+ { "DR", "low drifting" },
+ { "FZ", "freezing" },
+ { "MI", "shallow" },
+ { "PR", "partial" },
- { "DZ", "drizzle" },
- { "GR", "hail" },
- { "GS", "small hail and/or snow pellets" },
- { "IC", "ice crystals" },
- { "PE", "ice pellets" },
- { "RA", "rain" },
- { "SG", "snow grains" },
- { "SN", "snow" },
- { "UP", "unknown precipitation" },
- { "BR", "mist" },
- { "DU", "widespread dust" },
- { "SG", "fog" },
- { "SGBR", "fog bank" },
- { "FU", "smoke" },
- { "HZ", "haze" },
- { "PY", "spray" },
- { "SA", "sand" },
- { "VA", "volcanic ash" },
- { "DS", "duststorm" },
- { "FC", "funnel cloud/tornado waterspout" },
- { "PO", "well-developed dust/sand whirls" },
- { "SQ", "squalls" },
- { "SS", "sandstorm" },
- { "UP", "unknown" }, // ... due to failed automatic acquisition
+ { "DZ", "drizzle" },
+ { "GR", "hail" },
+ { "GS", "small hail and/or snow pellets" },
+ { "IC", "ice crystals" },
+ { "PE", "ice pellets" },
+ { "RA", "rain" },
+ { "SG", "snow grains" },
+ { "SN", "snow" },
+ { "UP", "unknown precipitation" },
+ { "BR", "mist" },
+ { "DU", "widespread dust" },
+ { "FG", "fog" },
+ { "FGBR", "fog bank" },
+ { "FU", "smoke" },
+ { "HZ", "haze" },
+ { "PY", "spray" },
+ { "SA", "sand" },
+ { "VA", "volcanic ash" },
+ { "DS", "duststorm" },
+ { "FC", "funnel cloud/tornado waterspout" },
+ { "PO", "well-developed dust/sand whirls" },
+ { "SQ", "squalls" },
+ { "SS", "sandstorm" },
+ { "UP", "unknown" }, // ... due to failed automatic acquisition
- { "AC", "altocumulus" },
- { "ACC", "altocumulus castellanus" },
- { "ACSL", "altocumulus standing lenticular" },
- { "AS", "altostratus" },
- { "CB", "cumulonimbus" },
+ { "AC", "altocumulus" },
+ { "ACC", "altocumulus castellanus" },
+ { "ACSL", "altocumulus standing lenticular" },
+ { "AS", "altostratus" },
+ { "CB", "cumulonimbus" },
- { "CC", "cirrocumulus" },
- { "CCSL", "cirrocumulus standing lenticular" },
- { "CI", "cirrus" },
- { "CS", "cirrostratus" },
- { "CU", "cumulus" },
+ { "CC", "cirrocumulus" },
+ { "CCSL", "cirrocumulus standing lenticular" },
+ { "CI", "cirrus" },
+ { "CS", "cirrostratus" },
+ { "CU", "cumulus" },
- { "NS", "nimbostratus" },
- { "SAC", "stratoaltocumulus" }, // guessed
- { "SC", "stratocumulus" },
- { "SCSL", "stratocumulus standing lenticular" },
- { "ST", "stratus" },
+ { "NS", "nimbostratus" },
+ { "SAC", "stratoaltocumulus" }, // guessed
+ { "SC", "stratocumulus" },
+ { "SCSL", "stratocumulus standing lenticular" },
+ { "ST", "stratus" },
{ "STFRA", "stratus fractus" },
{ "TCU", "towering cumulus" },
{ 0, 0 }
{ "STFRA", "stratus fractus" },
{ "TCU", "towering cumulus" },
{ 0, 0 }
if (!strncmp(m, "CLR", i = 3) // clear
|| !strncmp(m, "SKC", i = 3) // sky clear
|| !strncmp(m, "NSC", i = 3) // no significant clouds
if (!strncmp(m, "CLR", i = 3) // clear
|| !strncmp(m, "SKC", i = 3) // sky clear
|| !strncmp(m, "NSC", i = 3) // no significant clouds
else if (i > 0 && i <= 90)
r._depth = i / 1000.0; // i mm deep
else if (i >= 92 && i <= 98)
else if (i > 0 && i <= 90)
r._depth = i / 1000.0; // i mm deep
else if (i >= 92 && i <= 98)
_runways[id]._extent = r._extent;
_runways[id]._extent_string = r._extent_string;
_runways[id]._depth = r._depth;
_runways[id]._extent = r._extent;
_runways[id]._extent_string = r._extent_string;
_runways[id]._depth = r._depth;
for (int i = 0; (s = list[i].id); i++) {
len = strlen(s);
if (!strncmp(s, *str, len) && len > maxlen) {
for (int i = 0; (s = list[i].id); i++) {
len = strlen(s);
if (!strncmp(s, *str, len) && len > maxlen) {