//
// 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.
//
// $Id$
* @file metar.cxx
* Interface for encoded Meteorological Aerodrome Reports (METAR).
*/
+#ifdef HAVE_CONFIG_H
+# include <simgear_config.h>
+#endif
#include <string>
#include <time.h>
{
struct tm now;
time_t now_sec = time(0);
-#if defined( _MSC_VER ) || defined ( __MINGW32__ )
+#ifdef _WIN32
now = *gmtime(&now_sec);
#else
gmtime_r(&now_sec, &now);
distance = i;
} else {
// M?(\d{1,2}|\d{1,2}/\d{1,2}|\d{1,2} \d{1,2}/\d{1,2})(SM|KM)
- modifier = 0;
if (*m == 'M')
m++, modifier = SGMetarVisibility::LESS_THAN;
int i;
SGMetarCloud cl;
+ if (!strncmp(m, "//////", 6)) {
+ m += 6;
+ if (!scanBoundary(&m))
+ return false;
+ _m = m;
+ return true;
+ }
+
if (!strncmp(m, "CLR", i = 3) // clear
|| !strncmp(m, "SKC", i = 3) // sky clear
|| !strncmp(m, "NSC", i = 3) // no significant clouds
return false;
if (!scanBoundary(&m)) {
if (!strncmp(m, "XX", 2)) // not spec compliant!
- m += 2, sign = 0;
+ m += 2, sign = 0, dew = temp;
else {
sign = 1;
if (*m == 'M')
{
const struct Token *longest = 0;
int maxlen = 0, len;
- char *s;
+ const char *s;
for (int i = 0; (s = list[i].id); i++) {
len = strlen(s);
if (!strncmp(s, *str, len) && len > maxlen) {