summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--[email protected]_travis-ci/index.html131
-rw-r--r--[email protected]_travis-ci/report-70b407.html428
-rw-r--r--[email protected]_travis-ci/report-7a840e.html912
-rw-r--r--[email protected]_travis-ci/report-8defcd.html700
-rw-r--r--[email protected]_travis-ci/report-93edd5.html700
-rw-r--r--[email protected]_travis-ci/report-94e15c.html912
-rw-r--r--[email protected]_travis-ci/report-ab125a.html920
-rw-r--r--[email protected]_travis-ci/report-b400d5.html2025
-rw-r--r--[email protected]_travis-ci/report-bbf6e6.html552
-rw-r--r--[email protected]_travis-ci/report-d5b01e.html700
-rw-r--r--[email protected]_travis-ci/report-e98982.html2025
-rw-r--r--[email protected]_travis-ci/scanview.css62
-rw-r--r--[email protected]_travis-ci/sorttable.js492
-rw-r--r--[email protected]_travis-ci/0.html1352
-rw-r--r--[email protected]_travis-ci/1.html976
-rw-r--r--[email protected]_travis-ci/10.html368
-rw-r--r--[email protected]_travis-ci/11.html3546
-rw-r--r--[email protected]_travis-ci/2.html692
-rw-r--r--[email protected]_travis-ci/3.html314
-rw-r--r--[email protected]_travis-ci/4.html334
-rw-r--r--[email protected]_travis-ci/5.html320
-rw-r--r--[email protected]_travis-ci/6.html1106
-rw-r--r--[email protected]_travis-ci/7.html512
-rw-r--r--[email protected]_travis-ci/8.html1308
-rw-r--r--[email protected]_travis-ci/9.html860
-rw-r--r--[email protected]_travis-ci/index.html148
-rw-r--r--[email protected]_travis-ci/stats.html103
-rw-r--r--[email protected]_travis-ci/style.css149
-rw-r--r--[email protected]_master/index.html131
-rw-r--r--[email protected]_master/report-016d65.html912
-rw-r--r--[email protected]_master/report-22a1b9.html700
-rw-r--r--[email protected]_master/report-367678.html912
-rw-r--r--[email protected]_master/report-38117e.html2025
-rw-r--r--[email protected]_master/report-39e5c9.html700
-rw-r--r--[email protected]_master/report-a61650.html700
-rw-r--r--[email protected]_master/report-c5251e.html552
-rw-r--r--[email protected]_master/report-da349b.html428
-rw-r--r--[email protected]_master/report-e38552.html920
-rw-r--r--[email protected]_master/report-e39eec.html2025
-rw-r--r--[email protected]_master/scanview.css62
-rw-r--r--[email protected]_master/sorttable.js492
-rw-r--r--[email protected]_master/0.html1352
-rw-r--r--[email protected]_master/1.html976
-rw-r--r--[email protected]_master/10.html368
-rw-r--r--[email protected]_master/11.html3546
-rw-r--r--[email protected]_master/2.html692
-rw-r--r--[email protected]_master/3.html314
-rw-r--r--[email protected]_master/4.html334
-rw-r--r--[email protected]_master/5.html320
-rw-r--r--[email protected]_master/6.html1106
-rw-r--r--[email protected]_master/7.html512
-rw-r--r--[email protected]_master/8.html1308
-rw-r--r--[email protected]_master/9.html860
-rw-r--r--[email protected]_master/index.html148
-rw-r--r--[email protected]_master/stats.html103
-rw-r--r--[email protected]_master/style.css149
-rw-r--r--[email protected]_master/index.html131
-rw-r--r--[email protected]_master/report-0b7fc5.html912
-rw-r--r--[email protected]_master/report-2dd3a7.html700
-rw-r--r--[email protected]_master/report-561a32.html2025
-rw-r--r--[email protected]_master/report-6fa6ed.html552
-rw-r--r--[email protected]_master/report-736354.html700
-rw-r--r--[email protected]_master/report-79aae2.html428
-rw-r--r--[email protected]_master/report-81700f.html700
-rw-r--r--[email protected]_master/report-a6d9bd.html912
-rw-r--r--[email protected]_master/report-babca9.html2025
-rw-r--r--[email protected]_master/report-c784f5.html920
-rw-r--r--[email protected]_master/scanview.css62
-rw-r--r--[email protected]_master/sorttable.js492
-rw-r--r--[email protected]_master/0.html1352
-rw-r--r--[email protected]_master/1.html976
-rw-r--r--[email protected]_master/10.html368
-rw-r--r--[email protected]_master/11.html3546
-rw-r--r--[email protected]_master/2.html692
-rw-r--r--[email protected]_master/3.html314
-rw-r--r--[email protected]_master/4.html334
-rw-r--r--[email protected]_master/5.html320
-rw-r--r--[email protected]_master/6.html1106
-rw-r--r--[email protected]_master/7.html512
-rw-r--r--[email protected]_master/8.html1308
-rw-r--r--[email protected]_master/9.html860
-rw-r--r--[email protected]_master/index.html148
-rw-r--r--[email protected]_master/stats.html103
-rw-r--r--[email protected]_master/style.css149
-rw-r--r--[email protected]_master/index.html131
-rw-r--r--[email protected]_master/report-0de0f9.html2025
-rw-r--r--[email protected]_master/report-14d270.html428
-rw-r--r--[email protected]_master/report-386c99.html2025
-rw-r--r--[email protected]_master/report-3a4c7e.html920
-rw-r--r--[email protected]_master/report-8b270a.html700
-rw-r--r--[email protected]_master/report-8ec82b.html700
-rw-r--r--[email protected]_master/report-c9e5e3.html700
-rw-r--r--[email protected]_master/report-cfd206.html552
-rw-r--r--[email protected]_master/report-d924e7.html912
-rw-r--r--[email protected]_master/report-f97f9c.html912
-rw-r--r--[email protected]_master/scanview.css62
-rw-r--r--[email protected]7196_master/sorttable.js492
-rw-r--r--[email protected]_master/0.html1352
-rw-r--r--[email protected]_master/1.html976
-rw-r--r--[email protected]_master/10.html368
-rw-r--r--[email protected]_master/11.html3546
-rw-r--r--[email protected]_master/2.html692
-rw-r--r--[email protected]_master/3.html314
-rw-r--r--[email protected]_master/4.html334
-rw-r--r--[email protected]_master/5.html320
-rw-r--r--[email protected]_master/6.html1106
-rw-r--r--[email protected]_master/7.html512
-rw-r--r--[email protected]_master/8.html1308
-rw-r--r--[email protected]_master/9.html860
-rw-r--r--[email protected]_master/index.html148
-rw-r--r--[email protected]_master/stats.html103
-rw-r--r--[email protected]_master/style.css149
-rw-r--r--[email protected]_v1.25.0/index.html131
-rw-r--r--[email protected]_v1.25.0/report-077608.html552
-rw-r--r--[email protected]6_v1.25.0/report-6df16c.html920
-rw-r--r--[email protected]_v1.25.0/report-9184c4.html912
-rw-r--r--[email protected]_v1.25.0/report-919fee.html2025
-rw-r--r--[email protected]_v1.25.0/report-96ead2.html428
-rw-r--r--[email protected]_v1.25.0/report-9cfd7e.html700
-rw-r--r--[email protected]_v1.25.0/report-a5f2d5.html912
-rw-r--r--[email protected]_v1.25.0/report-a7fe6c.html2025
-rw-r--r--[email protected]_v1.25.0/report-c0e04f.html700
-rw-r--r--[email protected]_v1.25.0/report-d10486.html700
-rw-r--r--[email protected]_v1.25.0/scanview.css62
-rw-r--r--[email protected]_v1.25.0/sorttable.js492
-rw-r--r--[email protected]_v1.25.0/0.html1352
-rw-r--r--[email protected]_v1.25.0/1.html976
-rw-r--r--[email protected]_v1.25.0/10.html368
-rw-r--r--[email protected]_v1.25.0/11.html3546
-rw-r--r--[email protected]_v1.25.0/2.html692
-rw-r--r--[email protected]_v1.25.0/3.html314
-rw-r--r--[email protected]_v1.25.0/4.html334
-rw-r--r--[email protected]_v1.25.0/5.html320
-rw-r--r--[email protected]_v1.25.0/6.html1106
-rw-r--r--[email protected]_v1.25.0/7.html512
-rw-r--r--[email protected]_v1.25.0/8.html1308
-rw-r--r--[email protected]_v1.25.0/9.html860
-rw-r--r--[email protected]_v1.25.0/index.html148
-rw-r--r--[email protected]_v1.25.0/stats.html103
-rw-r--r--[email protected]_v1.25.0/style.css149
-rw-r--r--[email protected]_master/index.html131
-rw-r--r--[email protected]_master/report-0cb58d.html912
-rw-r--r--[email protected]_master/report-1b5152.html700
-rw-r--r--[email protected]_master/report-525855.html912
-rw-r--r--[email protected]_master/report-57df0f.html2025
-rw-r--r--[email protected]_master/report-86767f.html700
-rw-r--r--[email protected]_master/report-a0d144.html920
-rw-r--r--[email protected]_master/report-a14731.html552
-rw-r--r--[email protected]_master/report-baab18.html2025
-rw-r--r--[email protected]_master/report-e5cfcb.html700
-rw-r--r--[email protected]_master/report-f10a91.html428
-rw-r--r--[email protected]_master/scanview.css62
-rw-r--r--[email protected]_master/sorttable.js492
-rw-r--r--[email protected]_master/0.html1352
-rw-r--r--[email protected]_master/1.html976
-rw-r--r--[email protected]_master/10.html368
-rw-r--r--[email protected]_master/11.html3546
-rw-r--r--[email protected]_master/2.html692
-rw-r--r--[email protected]_master/3.html314
-rw-r--r--[email protected]_master/4.html334
-rw-r--r--[email protected]_master/5.html320
-rw-r--r--[email protected]_master/6.html1106
-rw-r--r--[email protected]_master/7.html512
-rw-r--r--[email protected]_master/8.html1308
-rw-r--r--[email protected]_master/9.html860
-rw-r--r--[email protected]_master/index.html148
-rw-r--r--[email protected]_master/stats.html103
-rw-r--r--[email protected]_master/style.css149
-rw-r--r--[email protected]_extract-xsl/index.html131
-rw-r--r--[email protected]_extract-xsl/report-18645b.html700
-rw-r--r--[email protected]_extract-xsl/report-18d56d.html428
-rw-r--r--[email protected]_extract-xsl/report-1b8d21.html700
-rw-r--r--[email protected]_extract-xsl/report-27f82d.html920
-rw-r--r--[email protected]_extract-xsl/report-4d345e.html552
-rw-r--r--[email protected]_extract-xsl/report-7653f9.html912
-rw-r--r--[email protected]_extract-xsl/report-97b0b5.html2025
-rw-r--r--[email protected]_extract-xsl/report-a71288.html912
-rw-r--r--[email protected]_extract-xsl/report-d04818.html2025
-rw-r--r--[email protected]_extract-xsl/report-ddd41a.html700
-rw-r--r--[email protected]_extract-xsl/scanview.css62
-rw-r--r--[email protected]_extract-xsl/sorttable.js492
-rw-r--r--[email protected]_extract-xsl/0.html1352
-rw-r--r--[email protected]_extract-xsl/1.html976
-rw-r--r--[email protected]_extract-xsl/10.html368
-rw-r--r--[email protected]_extract-xsl/11.html3546
-rw-r--r--[email protected]_extract-xsl/2.html692
-rw-r--r--[email protected]_extract-xsl/3.html314
-rw-r--r--[email protected]_extract-xsl/4.html334
-rw-r--r--[email protected]_extract-xsl/5.html320
-rw-r--r--[email protected]_extract-xsl/6.html1106
-rw-r--r--[email protected]_extract-xsl/7.html512
-rw-r--r--[email protected]_extract-xsl/8.html1308
-rw-r--r--[email protected]_extract-xsl/9.html860
-rw-r--r--[email protected]_extract-xsl/index.html148
-rw-r--r--2020-07-09-190009-3644-c[email protected]_extract-xsl/stats.html103
-rw-r--r--[email protected]_extract-xsl/style.css149
-rw-r--r--[email protected]_master/index.html131
-rw-r--r--[email protected]_master/report-044eda.html2025
-rw-r--r--[email protected]_master/report-1ab0ce.html700
-rw-r--r--[email protected]_master/report-390df1.html428
-rw-r--r--[email protected]_master/report-6389af.html700
-rw-r--r--[email protected]_master/report-7efcfd.html2025
-rw-r--r--[email protected]_master/report-8d3335.html920
-rw-r--r--[email protected]_master/report-9b8882.html552
-rw-r--r--[email protected]_master/report-ac37b5.html912
-rw-r--r--[email protected]_master/report-c30f76.html700
-rw-r--r--[email protected]_master/report-fd7773.html912
-rw-r--r--[email protected]_master/scanview.css62
-rw-r--r--[email protected]_master/sorttable.js492
-rw-r--r--[email protected]_master/0.html1368
-rw-r--r--[email protected]_master/1.html994
-rw-r--r--[email protected]_master/10.html384
-rw-r--r--[email protected]_master/11.html3562
-rw-r--r--[email protected]_master/2.html708
-rw-r--r--[email protected]_master/3.html330
-rw-r--r--[email protected]_master/4.html350
-rw-r--r--[email protected]_master/5.html336
-rw-r--r--[email protected]_master/6.html1122
-rw-r--r--[email protected]_master/7.html528
-rw-r--r--[email protected]_master/8.html1324
-rw-r--r--[email protected]_master/9.html876
-rw-r--r--[email protected]_master/index.html167
-rw-r--r--[email protected]_master/stats.html119
-rw-r--r--[email protected]_master/style.css137
-rw-r--r--[email protected]_master/index.html131
-rw-r--r--[email protected]_master/report-16bef6.html552
-rw-r--r--[email protected]_master/report-5ee04f.html428
-rw-r--r--[email protected]_master/report-6237e8.html2025
-rw-r--r--[email protected]_master/report-945e07.html700
-rw-r--r--[email protected]_master/report-b67884.html912
-rw-r--r--[email protected]_master/report-bdef10.html2025
-rw-r--r--[email protected]_master/report-c52891.html700
-rw-r--r--[email protected]_master/report-c5ea6f.html912
-rw-r--r--[email protected]_master/report-dce5bf.html920
-rw-r--r--[email protected]_master/report-e58b7c.html700
-rw-r--r--[email protected]_master/scanview.css62
-rw-r--r--[email protected]_master/sorttable.js492
-rw-r--r--[email protected]_master/0.html1368
-rw-r--r--[email protected]_master/1.html994
-rw-r--r--[email protected]_master/10.html384
-rw-r--r--[email protected]_master/11.html3562
-rw-r--r--[email protected]_master/2.html708
-rw-r--r--[email protected]_master/3.html330
-rw-r--r--[email protected]_master/4.html350
-rw-r--r--[email protected]_master/5.html336
-rw-r--r--[email protected]_master/6.html1122
-rw-r--r--[email protected]_master/7.html528
-rw-r--r--[email protected]_master/8.html1324
-rw-r--r--[email protected]_master/9.html876
-rw-r--r--[email protected]_master/index.html167
-rw-r--r--[email protected]_master/stats.html119
-rw-r--r--[email protected]_master/style.css137
-rw-r--r--[email protected]_master/index.html131
-rw-r--r--[email protected]_master/report-1207d7.html912
-rw-r--r--[email protected]_master/report-20426a.html920
-rw-r--r--[email protected]_master/report-271da4.html912
-rw-r--r--[email protected]_master/report-54db50.html2025
-rw-r--r--[email protected]_master/report-7a2b15.html428
-rw-r--r--[email protected]_master/report-8fe0aa.html700
-rw-r--r--[email protected]_master/report-a49f6d.html700
-rw-r--r--[email protected]_master/report-adfa9d.html2025
-rw-r--r--[email protected]_master/report-c5c5c1.html700
-rw-r--r--[email protected]_master/report-c885d4.html552
-rw-r--r--[email protected]_master/scanview.css62
-rw-r--r--[email protected]_master/sorttable.js492
-rw-r--r--[email protected]_master/0.html1368
-rw-r--r--[email protected]_master/1.html994
-rw-r--r--[email protected]_master/10.html384
-rw-r--r--[email protected]_master/11.html3562
-rw-r--r--[email protected]_master/2.html708
-rw-r--r--[email protected]_master/3.html330
-rw-r--r--[email protected]_master/4.html350
-rw-r--r--[email protected]_master/5.html336
-rw-r--r--[email protected]_master/6.html1122
-rw-r--r--[email protected]_master/7.html528
-rw-r--r--[email protected]_master/8.html1324
-rw-r--r--[email protected]_master/9.html876
-rw-r--r--[email protected]_master/index.html167
-rw-r--r--[email protected]_master/stats.html119
-rw-r--r--[email protected]_master/style.css137
-rw-r--r--CNAME1
-rw-r--r--index.html46
282 files changed, 227168 insertions, 0 deletions
diff --git a/[email protected]_travis-ci/index.html b/[email protected]_travis-ci/index.html
new file mode 100644
index 0000000..41ea7c1
--- /dev/null
+++ b/[email protected]_travis-ci/index.html
@@ -0,0 +1,131 @@
+<html>
+<head>
+<title>rootdir - scan-build results</title>
+<link type="text/css" rel="stylesheet" href="scanview.css"/>
+<script src="sorttable.js"></script>
+<script language='javascript' type="text/javascript">
+function SetDisplay(RowClass, DisplayVal)
+{
+ var Rows = document.getElementsByTagName("tr");
+ for ( var i = 0 ; i < Rows.length; ++i ) {
+ if (Rows[i].className == RowClass) {
+ Rows[i].style.display = DisplayVal;
+ }
+ }
+}
+
+function CopyCheckedStateToCheckButtons(SummaryCheckButton) {
+ var Inputs = document.getElementsByTagName("input");
+ for ( var i = 0 ; i < Inputs.length; ++i ) {
+ if (Inputs[i].type == "checkbox") {
+ if(Inputs[i] != SummaryCheckButton) {
+ Inputs[i].checked = SummaryCheckButton.checked;
+ Inputs[i].onclick();
+ }
+ }
+ }
+}
+
+function returnObjById( id ) {
+ if (document.getElementById)
+ var returnVar = document.getElementById(id);
+ else if (document.all)
+ var returnVar = document.all[id];
+ else if (document.layers)
+ var returnVar = document.layers[id];
+ return returnVar;
+}
+
+var NumUnchecked = 0;
+
+function ToggleDisplay(CheckButton, ClassName) {
+ if (CheckButton.checked) {
+ SetDisplay(ClassName, "");
+ if (--NumUnchecked == 0) {
+ returnObjById("AllBugsCheck").checked = true;
+ }
+ }
+ else {
+ SetDisplay(ClassName, "none");
+ NumUnchecked++;
+ returnObjById("AllBugsCheck").checked = false;
+ }
+}
+</script>
+<!-- SUMMARYENDHEAD -->
+</head>
+<body>
+<h1>rootdir - scan-build results</h1>
+
+<table>
+<tr><th>User:</th><td>[email protected]</td></tr>
+<tr><th>Working Directory:</th><td>/rootdir</td></tr>
+<tr><th>Command Line:</th><td>make -j 2</td></tr>
+<tr><th>Clang Version:</th><td>clang version 9.0.1 (Fedora 9.0.1-2.fc31)
+</td></tr>
+<tr><th>Date:</th><td>Mon Jun 22 14:15:06 2020</td></tr>
+</table>
+<h2>Bug Summary</h2><table>
+<thead><tr><td>Bug Type</td><td>Quantity</td><td class="sorttable_nosort">Display?</td></tr></thead>
+<tr style="font-weight:bold"><td class="SUMM_DESC">All Bugs</td><td class="Q">10</td><td><center><input type="checkbox" id="AllBugsCheck" onClick="CopyCheckedStateToCheckButtons(this);" checked/></center></td></tr>
+<tr><th>Dead code</th><th colspan=2></th></tr>
+<tr><td class="SUMM_DESC">Unreachable code</td><td class="Q">2</td><td><center><input type="checkbox" onClick="ToggleDisplay(this,'bt_dead_code_unreachable_code');" checked/></center></td></tr>
+<tr><th>Dead store</th><th colspan=2></th></tr>
+<tr><td class="SUMM_DESC">Dead assignment</td><td class="Q">2</td><td><center><input type="checkbox" onClick="ToggleDisplay(this,'bt_dead_store_dead_assignment');" checked/></center></td></tr>
+<tr><td class="SUMM_DESC">Dead initialization</td><td class="Q">2</td><td><center><input type="checkbox" onClick="ToggleDisplay(this,'bt_dead_store_dead_initialization');" checked/></center></td></tr>
+<tr><th>Logic error</th><th colspan=2></th></tr>
+<tr><td class="SUMM_DESC">Dereference of null pointer</td><td class="Q">1</td><td><center><input type="checkbox" onClick="ToggleDisplay(this,'bt_logic_error_dereference_of_null_pointer');" checked/></center></td></tr>
+<tr><td class="SUMM_DESC">Out-of-bound access</td><td class="Q">1</td><td><center><input type="checkbox" onClick="ToggleDisplay(this,'bt_logic_error_out-of-bound_access');" checked/></center></td></tr>
+<tr><th>Security</th><th colspan=2></th></tr>
+<tr><td class="SUMM_DESC">Potential insecure memory buffer bounds restriction in call 'strcpy'</td><td class="Q">1</td><td><center><input type="checkbox" onClick="ToggleDisplay(this,'bt_security_potential_insecure_memory_buffer_bounds_restriction_in_call_strcpy_');" checked/></center></td></tr>
+<tr><th>Unix Stream API Error</th><th colspan=2></th></tr>
+<tr><td class="SUMM_DESC">Resource Leak</td><td class="Q">1</td><td><center><input type="checkbox" onClick="ToggleDisplay(this,'bt_unix_stream_api_error_resource_leak');" checked/></center></td></tr>
+</table>
+<h2>Reports</h2>
+
+<table class="sortable" style="table-layout:automatic">
+<thead><tr>
+ <td>Bug Group</td>
+ <td class="sorttable_sorted">Bug Type<span id="sorttable_sortfwdind">&nbsp;&#x25BE;</span></td>
+ <td>File</td>
+ <td>Function/Method</td>
+ <td class="Q">Line</td>
+ <td class="Q">Path Length</td>
+ <td class="sorttable_nosort"></td>
+ <!-- REPORTBUGCOL -->
+</tr></thead>
+<tbody>
+<tr class="bt_dead_store_dead_assignment"><td class="DESC">Dead store</td><td class="DESC">Dead assignment</td><td>weather.c</td><td class="DESC">_weather_info_fill</td><td class="Q">498</td><td class="Q">1</td><td><a href="report-b400d5.html#EndPath">View Report</a></td>
+<!-- REPORTBUG id="report-b400d5.html" -->
+</tr>
+<tr class="bt_dead_store_dead_assignment"><td class="DESC">Dead store</td><td class="DESC">Dead assignment</td><td>weather-metar.c</td><td class="DESC">metar_parse</td><td class="Q">454</td><td class="Q">1</td><td><a href="report-94e15c.html#EndPath">View Report</a></td>
+<!-- REPORTBUG id="report-94e15c.html" -->
+</tr>
+<tr class="bt_dead_store_dead_initialization"><td class="DESC">Dead store</td><td class="DESC">Dead initialization</td><td>weather-sun.c</td><td class="DESC">calc_sun2</td><td class="Q">165</td><td class="Q">1</td><td><a href="report-93edd5.html#EndPath">View Report</a></td>
+<!-- REPORTBUG id="report-93edd5.html" -->
+</tr>
+<tr class="bt_dead_store_dead_initialization"><td class="DESC">Dead store</td><td class="DESC">Dead initialization</td><td>weather-sun.c</td><td class="DESC">calc_sun2</td><td class="Q">164</td><td class="Q">1</td><td><a href="report-d5b01e.html#EndPath">View Report</a></td>
+<!-- REPORTBUG id="report-d5b01e.html" -->
+</tr>
+<tr class="bt_logic_error_dereference_of_null_pointer"><td class="DESC">Logic error</td><td class="DESC">Dereference of null pointer</td><td>weather-met.c</td><td class="DESC">met_reprocess</td><td class="Q">111</td><td class="Q">27</td><td><a href="report-bbf6e6.html#EndPath">View Report</a></td>
+<!-- REPORTBUG id="report-bbf6e6.html" -->
+</tr>
+<tr class="bt_logic_error_out-of-bound_access"><td class="DESC">Logic error</td><td class="DESC">Out-of-bound access</td><td>weather-metar.c</td><td class="DESC">metar_tok_vis</td><td class="Q">169</td><td class="Q">9</td><td><a href="report-ab125a.html#EndPath">View Report</a></td>
+<!-- REPORTBUG id="report-ab125a.html" -->
+</tr>
+<tr class="bt_security_potential_insecure_memory_buffer_bounds_restriction_in_call_strcpy_"><td class="DESC">Security</td><td class="DESC">Potential insecure memory buffer bounds restriction in call 'strcpy'</td><td>weather.c</td><td class="DESC">weather_info_get_update</td><td class="Q">725</td><td class="Q">1</td><td><a href="report-e98982.html#EndPath">View Report</a></td>
+<!-- REPORTBUG id="report-e98982.html" -->
+</tr>
+<tr class="bt_unix_stream_api_error_resource_leak"><td class="DESC">Unix Stream API Error</td><td class="DESC">Resource Leak</td><td>test_metar.c</td><td class="DESC">main</td><td class="Q">73</td><td class="Q">8</td><td><a href="report-70b407.html#EndPath">View Report</a></td>
+<!-- REPORTBUG id="report-70b407.html" -->
+</tr>
+<tr class="bt_dead_code_unreachable_code"><td class="DESC">Dead code</td><td class="DESC">Unreachable code</td><td>weather-metar.c</td><td class="DESC">metar_tok_vis</td><td class="Q">177</td><td class="Q">1</td><td><a href="report-7a840e.html#EndPath">View Report</a></td>
+<!-- REPORTBUG id="report-7a840e.html" -->
+</tr>
+<tr class="bt_dead_code_unreachable_code"><td class="DESC">Dead code</td><td class="DESC">Unreachable code</td><td>weather-sun.c</td><td class="DESC">weather_info_next_sun_event</td><td class="Q">339</td><td class="Q">1</td><td><a href="report-8defcd.html#EndPath">View Report</a></td>
+<!-- REPORTBUG id="report-8defcd.html" -->
+</tr>
+</tbody>
+</table>
+
+</body></html>
diff --git a/[email protected]_travis-ci/report-70b407.html b/[email protected]_travis-ci/report-70b407.html
new file mode 100644
index 0000000..2bcc706
--- /dev/null
+++ b/[email protected]_travis-ci/report-70b407.html
@@ -0,0 +1,428 @@
+<!doctype html>
+<html>
+<head>
+<title>test_metar.c</title>
+
+<style type="text/css">
+body { color:#000000; background-color:#ffffff }
+body { font-family:Helvetica, sans-serif; font-size:10pt }
+h1 { font-size:14pt }
+.FileName { margin-top: 5px; margin-bottom: 5px; display: inline; }
+.FileNav { margin-left: 5px; margin-right: 5px; display: inline; }
+.FileNav a { text-decoration:none; font-size: larger; }
+.divider { margin-top: 30px; margin-bottom: 30px; height: 15px; }
+.divider { background-color: gray; }
+.code { border-collapse:collapse; width:100%; }
+.code { font-family: "Monospace", monospace; font-size:10pt }
+.code { line-height: 1.2em }
+.comment { color: green; font-style: oblique }
+.keyword { color: blue }
+.string_literal { color: red }
+.directive { color: darkmagenta }
+
+/* Macros and variables could have pop-up notes hidden by default.
+ - Macro pop-up: expansion of the macro
+ - Variable pop-up: value (table) of the variable */
+.macro_popup, .variable_popup { display: none; }
+
+/* Pop-up appears on mouse-hover event. */
+.macro:hover .macro_popup, .variable:hover .variable_popup {
+ display: block;
+ padding: 2px;
+ -webkit-border-radius:5px;
+ -webkit-box-shadow:1px 1px 7px #000;
+ border-radius:5px;
+ box-shadow:1px 1px 7px #000;
+ position: absolute;
+ top: -1em;
+ left:10em;
+ z-index: 1
+}
+
+.macro_popup {
+ border: 2px solid red;
+ background-color:#FFF0F0;
+ font-weight: normal;
+}
+
+.variable_popup {
+ border: 2px solid blue;
+ background-color:#F0F0FF;
+ font-weight: bold;
+ font-family: Helvetica, sans-serif;
+ font-size: 9pt;
+}
+
+/* Pop-up notes needs a relative position as a base where they pops up. */
+.macro, .variable {
+ background-color: PaleGoldenRod;
+ position: relative;
+}
+.macro { color: DarkMagenta; }
+
+#tooltiphint {
+ position: fixed;
+ width: 50em;
+ margin-left: -25em;
+ left: 50%;
+ padding: 10px;
+ border: 1px solid #b0b0b0;
+ border-radius: 2px;
+ box-shadow: 1px 1px 7px black;
+ background-color: #c0c0c0;
+ z-index: 2;
+}
+
+.num { width:2.5em; padding-right:2ex; background-color:#eeeeee }
+.num { text-align:right; font-size:8pt }
+.num { color:#444444 }
+.line { padding-left: 1ex; border-left: 3px solid #ccc }
+.line { white-space: pre }
+.msg { -webkit-box-shadow:1px 1px 7px #000 }
+.msg { box-shadow:1px 1px 7px #000 }
+.msg { -webkit-border-radius:5px }
+.msg { border-radius:5px }
+.msg { font-family:Helvetica, sans-serif; font-size:8pt }
+.msg { float:left }
+.msg { padding:0.25em 1ex 0.25em 1ex }
+.msg { margin-top:10px; margin-bottom:10px }
+.msg { font-weight:bold }
+.msg { max-width:60em; word-wrap: break-word; white-space: pre-wrap }
+.msgT { padding:0x; spacing:0x }
+.msgEvent { background-color:#fff8b4; color:#000000 }
+.msgControl { background-color:#bbbbbb; color:#000000 }
+.msgNote { background-color:#ddeeff; color:#000000 }
+.mrange { background-color:#dfddf3 }
+.mrange { border-bottom:1px solid #6F9DBE }
+.PathIndex { font-weight: bold; padding:0px 5px; margin-right:5px; }
+.PathIndex { -webkit-border-radius:8px }
+.PathIndex { border-radius:8px }
+.PathIndexEvent { background-color:#bfba87 }
+.PathIndexControl { background-color:#8c8c8c }
+.PathIndexPopUp { background-color: #879abc; }
+.PathNav a { text-decoration:none; font-size: larger }
+.CodeInsertionHint { font-weight: bold; background-color: #10dd10 }
+.CodeRemovalHint { background-color:#de1010 }
+.CodeRemovalHint { border-bottom:1px solid #6F9DBE }
+.selected{ background-color:orange !important; }
+
+table.simpletable {
+ padding: 5px;
+ font-size:12pt;
+ margin:20px;
+ border-collapse: collapse; border-spacing: 0px;
+}
+td.rowname {
+ text-align: right;
+ vertical-align: top;
+ font-weight: bold;
+ color:#444444;
+ padding-right:2ex;
+}
+
+/* Hidden text. */
+input.spoilerhider + label {
+ cursor: pointer;
+ text-decoration: underline;
+ display: block;
+}
+input.spoilerhider {
+ display: none;
+}
+input.spoilerhider ~ .spoiler {
+ overflow: hidden;
+ margin: 10px auto 0;
+ height: 0;
+ opacity: 0;
+}
+input.spoilerhider:checked + label + .spoiler{
+ height: auto;
+ opacity: 1;
+}
+</style>
+</head>
+<body>
+<!-- BUGDESC Opened file is never closed; potential resource leak -->
+
+<!-- BUGTYPE Resource Leak -->
+
+<!-- BUGCATEGORY Unix Stream API Error -->
+
+<!-- BUGFILE /rootdir/libmateweather/test_metar.c -->
+
+<!-- FILENAME test_metar.c -->
+
+<!-- FUNCTIONNAME main -->
+
+<!-- ISSUEHASHCONTENTOFLINEINCONTEXT 3d7553bc3a6b66b21a2fbf7209eca6d1 -->
+
+<!-- BUGLINE 73 -->
+
+<!-- BUGCOLUMN 12 -->
+
+<!-- BUGPATHLENGTH 8 -->
+
+<!-- BUGMETAEND -->
+<!-- REPORTHEADER -->
+<h3>Bug Summary</h3>
+<table class="simpletable">
+<tr><td class="rowname">File:</td><td>test_metar.c</td></tr>
+<tr><td class="rowname">Warning:</td><td><a href="#EndPath">line 73, column 12</a><br />Opened file is never closed; potential resource leak</td></tr>
+
+</table>
+<!-- REPORTSUMMARYEXTRA -->
+<h3>Annotated Source Code</h3>
+<p>Press <a href="#" onclick="toggleHelp(); return false;">'?'</a>
+ to see keyboard shortcuts</p>
+<input type="checkbox" class="spoilerhider" id="showinvocation" />
+<label for="showinvocation" >Show analyzer invocation</label>
+<div class="spoiler">clang -cc1 -triple x86_64-unknown-linux-gnu -analyze -disable-free -disable-llvm-verifier -discard-value-names -main-file-name test_metar.c -analyzer-store=region -analyzer-opt-analyze-nested-blocks -analyzer-checker=core -analyzer-checker=apiModeling -analyzer-checker=unix -analyzer-checker=deadcode -analyzer-checker=security.insecureAPI.UncheckedReturn -analyzer-checker=security.insecureAPI.getpw -analyzer-checker=security.insecureAPI.gets -analyzer-checker=security.insecureAPI.mktemp -analyzer-checker=security.insecureAPI.mkstemp -analyzer-checker=security.insecureAPI.vfork -analyzer-checker=nullability.NullPassedToNonnull -analyzer-checker=nullability.NullReturnedFromNonnull -analyzer-output plist -w -mrelocation-model static -mthread-model posix -fmath-errno -masm-verbose -mconstructor-aliases -munwind-tables -fuse-init-array -target-cpu x86-64 -dwarf-column-info -debugger-tuning=gdb -momit-leaf-frame-pointer -resource-dir /usr/lib64/clang/9.0.1 -D HAVE_CONFIG_H -I . -I .. -I /usr/include/gtk-3.0 -I /usr/include/pango-1.0 -I /usr/include/glib-2.0 -I /usr/lib64/glib-2.0/include -I /usr/include/harfbuzz -I /usr/include/fribidi -I /usr/include/freetype2 -I /usr/include/libpng16 -I /usr/include/cairo -I /usr/include/pixman-1 -I /usr/include/gdk-pixbuf-2.0 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/gio-unix-2.0 -I /usr/include/libdrm -I /usr/include/atk-1.0 -I /usr/include/at-spi2-atk/2.0 -I /usr/include/dbus-1.0 -I /usr/lib64/dbus-1.0/include -I /usr/include/at-spi-2.0 -I .. -I . -I /usr/include/libsoup-2.4 -I /usr/include/glib-2.0 -I /usr/lib64/glib-2.0/include -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/libxml2 -internal-isystem /usr/local/include -internal-isystem /usr/lib64/clang/9.0.1/include -internal-externc-isystem /include -internal-externc-isystem /usr/include -O2 -Wno-unused-parameter -Wno-sign-compare -fdebug-compilation-dir /rootdir/libmateweather -ferror-limit 19 -fmessage-length 0 -fobjc-runtime=gcc -fdiagnostics-show-option -vectorize-loops -vectorize-slp -analyzer-checker deadcode.DeadStores -analyzer-checker alpha.deadcode.UnreachableCode -analyzer-checker alpha.core.CastSize -analyzer-checker alpha.core.CastToStruct -analyzer-checker alpha.core.IdenticalExpr -analyzer-checker alpha.core.SizeofPtr -analyzer-checker alpha.security.ArrayBoundV2 -analyzer-checker alpha.security.MallocOverflow -analyzer-checker alpha.security.ReturnPtrRange -analyzer-checker alpha.unix.SimpleStream -analyzer-checker alpha.unix.cstring.BufferOverlap -analyzer-checker alpha.unix.cstring.NotNullTerminated -analyzer-checker alpha.unix.cstring.OutOfBounds -analyzer-checker alpha.core.FixedAddr -analyzer-checker security.insecureAPI.strcpy -analyzer-output=html -faddrsig -o /rootdir/html-report/2020-06-22-141506-5642-1 -x c test_metar.c
+</div>
+<div id='tooltiphint' hidden="true">
+ <p>Keyboard shortcuts: </p>
+ <ul>
+ <li>Use 'j/k' keys for keyboard navigation</li>
+ <li>Use 'Shift+S' to show/hide relevant lines</li>
+ <li>Use '?' to toggle this window</li>
+ </ul>
+ <a href="#" onclick="toggleHelp(); return false;">Close</a>
+</div>
+<script type='text/javascript'>
+var relevant_lines = {"1": {"16": 1, "17": 1, "18": 1, "19": 1, "20": 1, "21": 1, "22": 1, "26": 1, "27": 1, "28": 1, "29": 1, "30": 1, "32": 1, "33": 1, "34": 1, "36": 1, "40": 1, "41": 1, "42": 1, "50": 1, "73": 1}};
+
+var filterCounterexample = function (hide) {
+ var tables = document.getElementsByClassName("code");
+ for (var t=0; t<tables.length; t++) {
+ var table = tables[t];
+ var file_id = table.getAttribute("data-fileid");
+ var lines_in_fid = relevant_lines[file_id];
+ if (!lines_in_fid) {
+ lines_in_fid = {};
+ }
+ var lines = table.getElementsByClassName("codeline");
+ for (var i=0; i<lines.length; i++) {
+ var el = lines[i];
+ var lineNo = el.getAttribute("data-linenumber");
+ if (!lines_in_fid[lineNo]) {
+ if (hide) {
+ el.setAttribute("hidden", "");
+ } else {
+ el.removeAttribute("hidden");
+ }
+ }
+ }
+ }
+}
+
+window.addEventListener("keydown", function (event) {
+ if (event.defaultPrevented) {
+ return;
+ }
+ if (event.key == "S") {
+ var checked = document.getElementsByName("showCounterexample")[0].checked;
+ filterCounterexample(!checked);
+ document.getElementsByName("showCounterexample")[0].checked = !checked;
+ } else {
+ return;
+ }
+ event.preventDefault();
+}, true);
+
+document.addEventListener("DOMContentLoaded", function() {
+ document.querySelector('input[name="showCounterexample"]').onchange=
+ function (event) {
+ filterCounterexample(this.checked);
+ };
+});
+</script>
+
+<form>
+ <input type="checkbox" name="showCounterexample" id="showCounterexample" />
+ <label for="showCounterexample">
+ Show only relevant lines
+ </label>
+</form>
+
+<script type='text/javascript'>
+var digitMatcher = new RegExp("[0-9]+");
+
+document.addEventListener("DOMContentLoaded", function() {
+ document.querySelectorAll(".PathNav > a").forEach(
+ function(currentValue, currentIndex) {
+ var hrefValue = currentValue.getAttribute("href");
+ currentValue.onclick = function() {
+ scrollTo(document.querySelector(hrefValue));
+ return false;
+ };
+ });
+});
+
+var findNum = function() {
+ var s = document.querySelector(".selected");
+ if (!s || s.id == "EndPath") {
+ return 0;
+ }
+ var out = parseInt(digitMatcher.exec(s.id)[0]);
+ return out;
+};
+
+var scrollTo = function(el) {
+ document.querySelectorAll(".selected").forEach(function(s) {
+ s.classList.remove("selected");
+ });
+ el.classList.add("selected");
+ window.scrollBy(0, el.getBoundingClientRect().top -
+ (window.innerHeight / 2));
+}
+
+var move = function(num, up, numItems) {
+ if (num == 1 && up || num == numItems - 1 && !up) {
+ return 0;
+ } else if (num == 0 && up) {
+ return numItems - 1;
+ } else if (num == 0 && !up) {
+ return 1 % numItems;
+ }
+ return up ? num - 1 : num + 1;
+}
+
+var numToId = function(num) {
+ if (num == 0) {
+ return document.getElementById("EndPath")
+ }
+ return document.getElementById("Path" + num);
+};
+
+var navigateTo = function(up) {
+ var numItems = document.querySelectorAll(
+ ".line > .msgEvent, .line > .msgControl").length;
+ var currentSelected = findNum();
+ var newSelected = move(currentSelected, up, numItems);
+ var newEl = numToId(newSelected, numItems);
+
+ // Scroll element into center.
+ scrollTo(newEl);
+};
+
+window.addEventListener("keydown", function (event) {
+ if (event.defaultPrevented) {
+ return;
+ }
+ if (event.key == "j") {
+ navigateTo(/*up=*/false);
+ } else if (event.key == "k") {
+ navigateTo(/*up=*/true);
+ } else {
+ return;
+ }
+ event.preventDefault();
+}, true);
+</script>
+
+<script type='text/javascript'>
+
+var toggleHelp = function() {
+ var hint = document.querySelector("#tooltiphint");
+ var attributeName = "hidden";
+ if (hint.hasAttribute(attributeName)) {
+ hint.removeAttribute(attributeName);
+ } else {
+ hint.setAttribute("hidden", "true");
+ }
+};
+window.addEventListener("keydown", function (event) {
+ if (event.defaultPrevented) {
+ return;
+ }
+ if (event.key == "?") {
+ toggleHelp();
+ } else {
+ return;
+ }
+ event.preventDefault();
+});
+</script>
+<table class="code" data-fileid="1">
+<tr class="codeline" data-linenumber="1"><td class="num" id="LN1">1</td><td class="line"><span class='comment'>/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 4 -*- */</span></td></tr>
+<tr class="codeline" data-linenumber="2"><td class="num" id="LN2">2</td><td class="line"><span class='comment'>/*</span></td></tr>
+<tr class="codeline" data-linenumber="3"><td class="num" id="LN3">3</td><td class="line"> <span class='comment'>* Simple program to reproduce METAR parsing results from command line</span></td></tr>
+<tr class="codeline" data-linenumber="4"><td class="num" id="LN4">4</td><td class="line"> <span class='comment'>*/</span></td></tr>
+<tr class="codeline" data-linenumber="5"><td class="num" id="LN5">5</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="6"><td class="num" id="LN6">6</td><td class="line"><span class='directive'>#include &lt;glib.h&gt;</span></td></tr>
+<tr class="codeline" data-linenumber="7"><td class="num" id="LN7">7</td><td class="line"><span class='directive'>#include &lt;string.h&gt;</span></td></tr>
+<tr class="codeline" data-linenumber="8"><td class="num" id="LN8">8</td><td class="line"><span class='directive'>#include &lt;stdio.h&gt;</span></td></tr>
+<tr class="codeline" data-linenumber="9"><td class="num" id="LN9">9</td><td class="line"><span class='directive'>#define MATEWEATHER_I_KNOW_THIS_IS_UNSTABLE</span></td></tr>
+<tr class="codeline" data-linenumber="10"><td class="num" id="LN10">10</td><td class="line"><span class='directive'>#include "weather-priv.h"</span></td></tr>
+<tr class="codeline" data-linenumber="11"><td class="num" id="LN11">11</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="12"><td class="num" id="LN12">12</td><td class="line"><span class='directive'>#ifndef <span class='macro'>BUFLEN<span class='macro_popup'>4096</span></span></span></td></tr>
+<tr class="codeline" data-linenumber="13"><td class="num" id="LN13">13</td><td class="line"><span class='directive'>#define <span class='macro'>BUFLEN<span class='macro_popup'>4096</span></span> 4096</span></td></tr>
+<tr class="codeline" data-linenumber="14"><td class="num" id="LN14">14</td><td class="line"><span class='directive'>#endif /* BUFLEN */</span></td></tr>
+<tr class="codeline" data-linenumber="15"><td class="num" id="LN15">15</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="16"><td class="num" id="LN16">16</td><td class="line"><span class='keyword'>int</span></td></tr>
+<tr class="codeline" data-linenumber="17"><td class="num" id="LN17">17</td><td class="line">main (<span class='keyword'>int</span> argc, <span class='keyword'>char</span> **argv)</td></tr>
+<tr class="codeline" data-linenumber="18"><td class="num" id="LN18">18</td><td class="line">{</td></tr>
+<tr class="codeline" data-linenumber="19"><td class="num" id="LN19">19</td><td class="line"> FILE* stream = <span class='macro'>stdin<span class='macro_popup'>stdin</span></span>;</td></tr>
+<tr class="codeline" data-linenumber="20"><td class="num" id="LN20">20</td><td class="line"> gchar* filename = <span class='macro'>NULL<span class='macro_popup'>((void*)0)</span></span>;</td></tr>
+<tr class="codeline" data-linenumber="21"><td class="num" id="LN21">21</td><td class="line"> GOptionEntry entries[] = {</td></tr>
+<tr class="codeline" data-linenumber="22"><td class="num" id="LN22">22</td><td class="line"> { <span class='string_literal'>"file"</span>, 'f', 0, G_OPTION_ARG_FILENAME, &amp;filename,</td></tr>
+<tr class="codeline" data-linenumber="23"><td class="num" id="LN23">23</td><td class="line"> <span class='string_literal'>"file constaining metar observations"</span>, <span class='macro'>NULL<span class='macro_popup'>((void*)0)</span></span> },</td></tr>
+<tr class="codeline" data-linenumber="24"><td class="num" id="LN24">24</td><td class="line"> { <span class='macro'>NULL<span class='macro_popup'>((void*)0)</span></span> }</td></tr>
+<tr class="codeline" data-linenumber="25"><td class="num" id="LN25">25</td><td class="line"> };</td></tr>
+<tr class="codeline" data-linenumber="26"><td class="num" id="LN26">26</td><td class="line"> GOptionContext* context;</td></tr>
+<tr class="codeline" data-linenumber="27"><td class="num" id="LN27">27</td><td class="line"> GError* error = <span class='macro'>NULL<span class='macro_popup'>((void*)0)</span></span>;</td></tr>
+<tr class="codeline" data-linenumber="28"><td class="num" id="LN28">28</td><td class="line"> <span class='keyword'>char</span> buf[<span class='macro'>BUFLEN<span class='macro_popup'>4096</span></span>];</td></tr>
+<tr class="codeline" data-linenumber="29"><td class="num" id="LN29">29</td><td class="line"> <span class='keyword'>int</span> len;</td></tr>
+<tr class="codeline" data-linenumber="30"><td class="num" id="LN30">30</td><td class="line"> WeatherInfo info;</td></tr>
+<tr class="codeline" data-linenumber="31"><td class="num" id="LN31">31</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="32"><td class="num" id="LN32">32</td><td class="line"> context = g_option_context_new (<span class='string_literal'>"- test libmateweather metar parser"</span>);</td></tr>
+<tr class="codeline" data-linenumber="33"><td class="num" id="LN33">33</td><td class="line"> g_option_context_add_main_entries (context, entries, <span class='macro'>NULL<span class='macro_popup'>((void*)0)</span></span>);</td></tr>
+<tr class="codeline" data-linenumber="34"><td class="num" id="LN34">34</td><td class="line"> g_option_context_parse (context, &amp;argc, &amp;argv, &amp;error);</td></tr>
+<tr class="codeline" data-linenumber="35"><td class="num" id="LN35">35</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="36"><td class="num" id="LN36">36</td><td class="line"> <span class='keyword'>if</span> (<span class="mrange">error</span>) {</td></tr>
+<tr><td class="num"></td><td class="line"><div id="Path1" class="msg msgEvent" style="margin-left:9ex"><table class="msgT"><tr><td valign="top"><div class="PathIndex PathIndexEvent">1</div></td><td>Assuming 'error' is null</td><td><div class="PathNav"><a href="#Path2" title="Next event (2)">&#x2192;</a></div></td></tr></table></div></td></tr>
+<tr><td class="num"></td><td class="line"><div id="Path2" class="msg msgControl" style="margin-left:5ex"><table class="msgT"><tr><td valign="top"><div class="PathIndex PathIndexControl">2</div></td><td><div class="PathNav"><a href="#Path1" title="Previous event (1)">&#x2190;</a></div></td></td><td>Taking false branch</td><td><div class="PathNav"><a href="#Path3" title="Next event (3)">&#x2192;</a></div></td></tr></table></div></td></tr>
+<tr class="codeline" data-linenumber="37"><td class="num" id="LN37">37</td><td class="line"> perror (error-&gt;message);</td></tr>
+<tr class="codeline" data-linenumber="38"><td class="num" id="LN38">38</td><td class="line"> <span class='keyword'>return</span> error-&gt;code;</td></tr>
+<tr class="codeline" data-linenumber="39"><td class="num" id="LN39">39</td><td class="line"> }</td></tr>
+<tr class="codeline" data-linenumber="40"><td class="num" id="LN40">40</td><td class="line"> <span class='keyword'>if</span> (<span class="mrange">filename</span>) {</td></tr>
+<tr><td class="num"></td><td class="line"><div id="Path3" class="msg msgEvent" style="margin-left:9ex"><table class="msgT"><tr><td valign="top"><div class="PathIndex PathIndexEvent">3</div></td><td><div class="PathNav"><a href="#Path2" title="Previous event (2)">&#x2190;</a></div></td></td><td>Assuming 'filename' is non-null</td><td><div class="PathNav"><a href="#Path4" title="Next event (4)">&#x2192;</a></div></td></tr></table></div></td></tr>
+<tr><td class="num"></td><td class="line"><div id="Path4" class="msg msgControl" style="margin-left:5ex"><table class="msgT"><tr><td valign="top"><div class="PathIndex PathIndexControl">4</div></td><td><div class="PathNav"><a href="#Path3" title="Previous event (3)">&#x2190;</a></div></td></td><td>Taking true branch</td><td><div class="PathNav"><a href="#Path5" title="Next event (5)">&#x2192;</a></div></td></tr></table></div></td></tr>
+<tr class="codeline" data-linenumber="41"><td class="num" id="LN41">41</td><td class="line"> stream = fopen (filename, <span class='string_literal'>"r"</span>);</td></tr>
+<tr class="codeline" data-linenumber="42"><td class="num" id="LN42">42</td><td class="line"> <span class='keyword'>if</span> (<span class="mrange">!stream</span>) {</td></tr>
+<tr><td class="num"></td><td class="line"><div id="Path5" class="msg msgEvent" style="margin-left:13ex"><table class="msgT"><tr><td valign="top"><div class="PathIndex PathIndexEvent">5</div></td><td><div class="PathNav"><a href="#Path4" title="Previous event (4)">&#x2190;</a></div></td></td><td>Assuming 'stream' is non-null</td><td><div class="PathNav"><a href="#Path6" title="Next event (6)">&#x2192;</a></div></td></tr></table></div></td></tr>
+<tr><td class="num"></td><td class="line"><div id="Path6" class="msg msgControl" style="margin-left:9ex"><table class="msgT"><tr><td valign="top"><div class="PathIndex PathIndexControl">6</div></td><td><div class="PathNav"><a href="#Path5" title="Previous event (5)">&#x2190;</a></div></td></td><td>Taking false branch</td><td><div class="PathNav"><a href="#Path7" title="Next event (7)">&#x2192;</a></div></td></tr></table></div></td></tr>
+<tr class="codeline" data-linenumber="43"><td class="num" id="LN43">43</td><td class="line"> perror (<span class='string_literal'>"fopen"</span>);</td></tr>
+<tr class="codeline" data-linenumber="44"><td class="num" id="LN44">44</td><td class="line"> <span class='keyword'>return</span> -1;</td></tr>
+<tr class="codeline" data-linenumber="45"><td class="num" id="LN45">45</td><td class="line"> }</td></tr>
+<tr class="codeline" data-linenumber="46"><td class="num" id="LN46">46</td><td class="line"> } <span class='keyword'>else</span> {</td></tr>
+<tr class="codeline" data-linenumber="47"><td class="num" id="LN47">47</td><td class="line"> fprintf (<span class='macro'>stderr<span class='macro_popup'>stderr</span></span>, <span class='string_literal'>"Enter a METAR string...\n"</span>);</td></tr>
+<tr class="codeline" data-linenumber="48"><td class="num" id="LN48">48</td><td class="line"> }</td></tr>
+<tr class="codeline" data-linenumber="49"><td class="num" id="LN49">49</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="50"><td class="num" id="LN50">50</td><td class="line"> <span class='keyword'>while</span> (fgets (buf, <span class='keyword'>sizeof</span> (buf), stream)) {</td></tr>
+<tr><td class="num"></td><td class="line"><div id="Path7" class="msg msgControl" style="margin-left:5ex"><table class="msgT"><tr><td valign="top"><div class="PathIndex PathIndexControl">7</div></td><td><div class="PathNav"><a href="#Path6" title="Previous event (6)">&#x2190;</a></div></td></td><td>Loop condition is false. Execution continues on line 73</td><td><div class="PathNav"><a href="#EndPath" title="Next event (8)">&#x2192;</a></div></td></tr></table></div></td></tr>
+<tr class="codeline" data-linenumber="51"><td class="num" id="LN51">51</td><td class="line"> len = strlen (buf);</td></tr>
+<tr class="codeline" data-linenumber="52"><td class="num" id="LN52">52</td><td class="line"> <span class='keyword'>if</span> (buf[len - 1] == '\n') {</td></tr>
+<tr class="codeline" data-linenumber="53"><td class="num" id="LN53">53</td><td class="line"> buf[--len] = '\0';</td></tr>
+<tr class="codeline" data-linenumber="54"><td class="num" id="LN54">54</td><td class="line"> }</td></tr>
+<tr class="codeline" data-linenumber="55"><td class="num" id="LN55">55</td><td class="line"> printf (<span class='string_literal'>"\n%s\n"</span>, buf);</td></tr>
+<tr class="codeline" data-linenumber="56"><td class="num" id="LN56">56</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="57"><td class="num" id="LN57">57</td><td class="line"> memset (&amp;info, 0, <span class='keyword'>sizeof</span> (info));</td></tr>
+<tr class="codeline" data-linenumber="58"><td class="num" id="LN58">58</td><td class="line"> info.valid = 1;</td></tr>
+<tr class="codeline" data-linenumber="59"><td class="num" id="LN59">59</td><td class="line"> metar_parse (buf, &amp;info);</td></tr>
+<tr class="codeline" data-linenumber="60"><td class="num" id="LN60">60</td><td class="line"> weather_info_to_metric (&amp;info);</td></tr>
+<tr class="codeline" data-linenumber="61"><td class="num" id="LN61">61</td><td class="line"> printf (<span class='string_literal'>"Returned info:\n"</span>);</td></tr>
+<tr class="codeline" data-linenumber="62"><td class="num" id="LN62">62</td><td class="line"> printf (<span class='string_literal'>" update: %s"</span>, ctime (&amp;info.update));</td></tr>
+<tr class="codeline" data-linenumber="63"><td class="num" id="LN63">63</td><td class="line"> printf (<span class='string_literal'>" sky: %s\n"</span>, weather_info_get_sky (&amp;info));</td></tr>
+<tr class="codeline" data-linenumber="64"><td class="num" id="LN64">64</td><td class="line"> printf (<span class='string_literal'>" cond: %s\n"</span>, weather_info_get_conditions (&amp;info));</td></tr>
+<tr class="codeline" data-linenumber="65"><td class="num" id="LN65">65</td><td class="line"> printf (<span class='string_literal'>" temp: %s\n"</span>, weather_info_get_temp (&amp;info));</td></tr>
+<tr class="codeline" data-linenumber="66"><td class="num" id="LN66">66</td><td class="line"> printf (<span class='string_literal'>" dewp: %s\n"</span>, weather_info_get_dew (&amp;info));</td></tr>
+<tr class="codeline" data-linenumber="67"><td class="num" id="LN67">67</td><td class="line"> printf (<span class='string_literal'>" wind: %s\n"</span>, weather_info_get_wind (&amp;info));</td></tr>
+<tr class="codeline" data-linenumber="68"><td class="num" id="LN68">68</td><td class="line"> printf (<span class='string_literal'>" pressure: %s\n"</span>, weather_info_get_pressure (&amp;info));</td></tr>
+<tr class="codeline" data-linenumber="69"><td class="num" id="LN69">69</td><td class="line"> printf (<span class='string_literal'>" vis: %s\n"</span>, weather_info_get_visibility (&amp;info));</td></tr>
+<tr class="codeline" data-linenumber="70"><td class="num" id="LN70">70</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="71"><td class="num" id="LN71">71</td><td class="line"> <span class='comment'>// TODO: retrieve location's lat/lon to display sunrise/set times</span></td></tr>
+<tr class="codeline" data-linenumber="72"><td class="num" id="LN72">72</td><td class="line"> }</td></tr>
+<tr class="codeline" data-linenumber="73"><td class="num" id="LN73">73</td><td class="line"> <span class='keyword'>return</span> <span class="mrange">0</span>;</td></tr>
+<tr><td class="num"></td><td class="line"><div id="EndPath" class="msg msgEvent" style="margin-left:12ex"><table class="msgT"><tr><td valign="top"><div class="PathIndex PathIndexEvent">8</div></td><td><div class="PathNav"><a href="#Path7" title="Previous event (7)">&#x2190;</a></div></td></td><td>Opened file is never closed; potential resource leak</td></tr></table></div></td></tr>
+<tr class="codeline" data-linenumber="74"><td class="num" id="LN74">74</td><td class="line">}</td></tr>
+</table></body></html>
diff --git a/[email protected]_travis-ci/report-7a840e.html b/[email protected]_travis-ci/report-7a840e.html
new file mode 100644
index 0000000..17b5554
--- /dev/null
+++ b/[email protected]_travis-ci/report-7a840e.html
@@ -0,0 +1,912 @@
+<!doctype html>
+<html>
+<head>
+<title>weather-metar.c</title>
+
+<style type="text/css">
+body { color:#000000; background-color:#ffffff }
+body { font-family:Helvetica, sans-serif; font-size:10pt }
+h1 { font-size:14pt }
+.FileName { margin-top: 5px; margin-bottom: 5px; display: inline; }
+.FileNav { margin-left: 5px; margin-right: 5px; display: inline; }
+.FileNav a { text-decoration:none; font-size: larger; }
+.divider { margin-top: 30px; margin-bottom: 30px; height: 15px; }
+.divider { background-color: gray; }
+.code { border-collapse:collapse; width:100%; }
+.code { font-family: "Monospace", monospace; font-size:10pt }
+.code { line-height: 1.2em }
+.comment { color: green; font-style: oblique }
+.keyword { color: blue }
+.string_literal { color: red }
+.directive { color: darkmagenta }
+
+/* Macros and variables could have pop-up notes hidden by default.
+ - Macro pop-up: expansion of the macro
+ - Variable pop-up: value (table) of the variable */
+.macro_popup, .variable_popup { display: none; }
+
+/* Pop-up appears on mouse-hover event. */
+.macro:hover .macro_popup, .variable:hover .variable_popup {
+ display: block;
+ padding: 2px;
+ -webkit-border-radius:5px;
+ -webkit-box-shadow:1px 1px 7px #000;
+ border-radius:5px;
+ box-shadow:1px 1px 7px #000;
+ position: absolute;
+ top: -1em;
+ left:10em;
+ z-index: 1
+}
+
+.macro_popup {
+ border: 2px solid red;
+ background-color:#FFF0F0;
+ font-weight: normal;
+}
+
+.variable_popup {
+ border: 2px solid blue;
+ background-color:#F0F0FF;
+ font-weight: bold;
+ font-family: Helvetica, sans-serif;
+ font-size: 9pt;
+}
+
+/* Pop-up notes needs a relative position as a base where they pops up. */
+.macro, .variable {
+ background-color: PaleGoldenRod;
+ position: relative;
+}
+.macro { color: DarkMagenta; }
+
+#tooltiphint {
+ position: fixed;
+ width: 50em;
+ margin-left: -25em;
+ left: 50%;
+ padding: 10px;
+ border: 1px solid #b0b0b0;
+ border-radius: 2px;
+ box-shadow: 1px 1px 7px black;
+ background-color: #c0c0c0;
+ z-index: 2;
+}
+
+.num { width:2.5em; padding-right:2ex; background-color:#eeeeee }
+.num { text-align:right; font-size:8pt }
+.num { color:#444444 }
+.line { padding-left: 1ex; border-left: 3px solid #ccc }
+.line { white-space: pre }
+.msg { -webkit-box-shadow:1px 1px 7px #000 }
+.msg { box-shadow:1px 1px 7px #000 }
+.msg { -webkit-border-radius:5px }
+.msg { border-radius:5px }
+.msg { font-family:Helvetica, sans-serif; font-size:8pt }
+.msg { float:left }
+.msg { padding:0.25em 1ex 0.25em 1ex }
+.msg { margin-top:10px; margin-bottom:10px }
+.msg { font-weight:bold }
+.msg { max-width:60em; word-wrap: break-word; white-space: pre-wrap }
+.msgT { padding:0x; spacing:0x }
+.msgEvent { background-color:#fff8b4; color:#000000 }
+.msgControl { background-color:#bbbbbb; color:#000000 }
+.msgNote { background-color:#ddeeff; color:#000000 }
+.mrange { background-color:#dfddf3 }
+.mrange { border-bottom:1px solid #6F9DBE }
+.PathIndex { font-weight: bold; padding:0px 5px; margin-right:5px; }
+.PathIndex { -webkit-border-radius:8px }
+.PathIndex { border-radius:8px }
+.PathIndexEvent { background-color:#bfba87 }
+.PathIndexControl { background-color:#8c8c8c }
+.PathIndexPopUp { background-color: #879abc; }
+.PathNav a { text-decoration:none; font-size: larger }
+.CodeInsertionHint { font-weight: bold; background-color: #10dd10 }
+.CodeRemovalHint { background-color:#de1010 }
+.CodeRemovalHint { border-bottom:1px solid #6F9DBE }
+.selected{ background-color:orange !important; }
+
+table.simpletable {
+ padding: 5px;
+ font-size:12pt;
+ margin:20px;
+ border-collapse: collapse; border-spacing: 0px;
+}
+td.rowname {
+ text-align: right;
+ vertical-align: top;
+ font-weight: bold;
+ color:#444444;
+ padding-right:2ex;
+}
+
+/* Hidden text. */
+input.spoilerhider + label {
+ cursor: pointer;
+ text-decoration: underline;
+ display: block;
+}
+input.spoilerhider {
+ display: none;
+}
+input.spoilerhider ~ .spoiler {
+ overflow: hidden;
+ margin: 10px auto 0;
+ height: 0;
+ opacity: 0;
+}
+input.spoilerhider:checked + label + .spoiler{
+ height: auto;
+ opacity: 1;
+}
+</style>
+</head>
+<body>
+<!-- BUGDESC This statement is never executed -->
+
+<!-- BUGTYPE Unreachable code -->
+
+<!-- BUGCATEGORY Dead code -->
+
+<!-- BUGFILE /rootdir/libmateweather/weather-metar.c -->
+
+<!-- FILENAME weather-metar.c -->
+
+<!-- FUNCTIONNAME metar_tok_vis -->
+
+<!-- ISSUEHASHCONTENTOFLINEINCONTEXT 54e1e1a0afeccd04162c41a01d40e8bb -->
+
+<!-- BUGLINE 177 -->
+
+<!-- BUGCOLUMN 28 -->
+
+<!-- BUGPATHLENGTH 1 -->
+
+<!-- BUGMETAEND -->
+<!-- REPORTHEADER -->
+<h3>Bug Summary</h3>
+<table class="simpletable">
+<tr><td class="rowname">File:</td><td>weather-metar.c</td></tr>
+<tr><td class="rowname">Warning:</td><td><a href="#EndPath">line 177, column 28</a><br />This statement is never executed</td></tr>
+
+</table>
+<!-- REPORTSUMMARYEXTRA -->
+<h3>Annotated Source Code</h3>
+<p>Press <a href="#" onclick="toggleHelp(); return false;">'?'</a>
+ to see keyboard shortcuts</p>
+<input type="checkbox" class="spoilerhider" id="showinvocation" />
+<label for="showinvocation" >Show analyzer invocation</label>
+<div class="spoiler">clang -cc1 -triple x86_64-unknown-linux-gnu -analyze -disable-free -disable-llvm-verifier -discard-value-names -main-file-name weather-metar.c -analyzer-store=region -analyzer-opt-analyze-nested-blocks -analyzer-checker=core -analyzer-checker=apiModeling -analyzer-checker=unix -analyzer-checker=deadcode -analyzer-checker=security.insecureAPI.UncheckedReturn -analyzer-checker=security.insecureAPI.getpw -analyzer-checker=security.insecureAPI.gets -analyzer-checker=security.insecureAPI.mktemp -analyzer-checker=security.insecureAPI.mkstemp -analyzer-checker=security.insecureAPI.vfork -analyzer-checker=nullability.NullPassedToNonnull -analyzer-checker=nullability.NullReturnedFromNonnull -analyzer-output plist -w -mrelocation-model pic -pic-level 2 -mthread-model posix -fmath-errno -masm-verbose -mconstructor-aliases -munwind-tables -fuse-init-array -target-cpu x86-64 -dwarf-column-info -debugger-tuning=gdb -momit-leaf-frame-pointer -resource-dir /usr/lib64/clang/9.0.1 -D HAVE_CONFIG_H -I . -I .. -I /usr/include/gtk-3.0 -I /usr/include/pango-1.0 -I /usr/include/glib-2.0 -I /usr/lib64/glib-2.0/include -I /usr/include/harfbuzz -I /usr/include/fribidi -I /usr/include/freetype2 -I /usr/include/libpng16 -I /usr/include/cairo -I /usr/include/pixman-1 -I /usr/include/gdk-pixbuf-2.0 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/gio-unix-2.0 -I /usr/include/libdrm -I /usr/include/atk-1.0 -I /usr/include/at-spi2-atk/2.0 -I /usr/include/dbus-1.0 -I /usr/lib64/dbus-1.0/include -I /usr/include/at-spi-2.0 -I .. -I . -I /usr/include/libxml2 -I /usr/include/libsoup-2.4 -I /usr/include/glib-2.0 -I /usr/lib64/glib-2.0/include -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/libxml2 -I /usr/include/glib-2.0 -I /usr/lib64/glib-2.0/include -I /usr/include/libmount -I /usr/include/blkid -D G_LOG_DOMAIN="MateWeather" -D MATELOCALEDIR="/usr/local/share/locale" -D MATEWEATHER_XML_LOCATION_DIR="/usr/local/share/libmateweather" -D PIC -internal-isystem /usr/local/include -internal-isystem /usr/lib64/clang/9.0.1/include -internal-externc-isystem /include -internal-externc-isystem /usr/include -O2 -Wno-unused-parameter -Wno-sign-compare -fdebug-compilation-dir /rootdir/libmateweather -ferror-limit 19 -fmessage-length 0 -fobjc-runtime=gcc -fdiagnostics-show-option -vectorize-loops -vectorize-slp -analyzer-checker deadcode.DeadStores -analyzer-checker alpha.deadcode.UnreachableCode -analyzer-checker alpha.core.CastSize -analyzer-checker alpha.core.CastToStruct -analyzer-checker alpha.core.IdenticalExpr -analyzer-checker alpha.core.SizeofPtr -analyzer-checker alpha.security.ArrayBoundV2 -analyzer-checker alpha.security.MallocOverflow -analyzer-checker alpha.security.ReturnPtrRange -analyzer-checker alpha.unix.SimpleStream -analyzer-checker alpha.unix.cstring.BufferOverlap -analyzer-checker alpha.unix.cstring.NotNullTerminated -analyzer-checker alpha.unix.cstring.OutOfBounds -analyzer-checker alpha.core.FixedAddr -analyzer-checker security.insecureAPI.strcpy -analyzer-output=html -faddrsig -o /rootdir/html-report/2020-06-22-141506-5642-1 -x c weather-metar.c
+</div>
+<div id='tooltiphint' hidden="true">
+ <p>Keyboard shortcuts: </p>
+ <ul>
+ <li>Use 'j/k' keys for keyboard navigation</li>
+ <li>Use 'Shift+S' to show/hide relevant lines</li>
+ <li>Use '?' to toggle this window</li>
+ </ul>
+ <a href="#" onclick="toggleHelp(); return false;">Close</a>
+</div>
+<script type='text/javascript'>
+var relevant_lines = {"1": {"177": 1}};
+
+var filterCounterexample = function (hide) {
+ var tables = document.getElementsByClassName("code");
+ for (var t=0; t<tables.length; t++) {
+ var table = tables[t];
+ var file_id = table.getAttribute("data-fileid");
+ var lines_in_fid = relevant_lines[file_id];
+ if (!lines_in_fid) {
+ lines_in_fid = {};
+ }
+ var lines = table.getElementsByClassName("codeline");
+ for (var i=0; i<lines.length; i++) {
+ var el = lines[i];
+ var lineNo = el.getAttribute("data-linenumber");
+ if (!lines_in_fid[lineNo]) {
+ if (hide) {
+ el.setAttribute("hidden", "");
+ } else {
+ el.removeAttribute("hidden");
+ }
+ }
+ }
+ }
+}
+
+window.addEventListener("keydown", function (event) {
+ if (event.defaultPrevented) {
+ return;
+ }
+ if (event.key == "S") {
+ var checked = document.getElementsByName("showCounterexample")[0].checked;
+ filterCounterexample(!checked);
+ document.getElementsByName("showCounterexample")[0].checked = !checked;
+ } else {
+ return;
+ }
+ event.preventDefault();
+}, true);
+
+document.addEventListener("DOMContentLoaded", function() {
+ document.querySelector('input[name="showCounterexample"]').onchange=
+ function (event) {
+ filterCounterexample(this.checked);
+ };
+});
+</script>
+
+<form>
+ <input type="checkbox" name="showCounterexample" id="showCounterexample" />
+ <label for="showCounterexample">
+ Show only relevant lines
+ </label>
+</form>
+
+<script type='text/javascript'>
+var digitMatcher = new RegExp("[0-9]+");
+
+document.addEventListener("DOMContentLoaded", function() {
+ document.querySelectorAll(".PathNav > a").forEach(
+ function(currentValue, currentIndex) {
+ var hrefValue = currentValue.getAttribute("href");
+ currentValue.onclick = function() {
+ scrollTo(document.querySelector(hrefValue));
+ return false;
+ };
+ });
+});
+
+var findNum = function() {
+ var s = document.querySelector(".selected");
+ if (!s || s.id == "EndPath") {
+ return 0;
+ }
+ var out = parseInt(digitMatcher.exec(s.id)[0]);
+ return out;
+};
+
+var scrollTo = function(el) {
+ document.querySelectorAll(".selected").forEach(function(s) {
+ s.classList.remove("selected");
+ });
+ el.classList.add("selected");
+ window.scrollBy(0, el.getBoundingClientRect().top -
+ (window.innerHeight / 2));
+}
+
+var move = function(num, up, numItems) {
+ if (num == 1 && up || num == numItems - 1 && !up) {
+ return 0;
+ } else if (num == 0 && up) {
+ return numItems - 1;
+ } else if (num == 0 && !up) {
+ return 1 % numItems;
+ }
+ return up ? num - 1 : num + 1;
+}
+
+var numToId = function(num) {
+ if (num == 0) {
+ return document.getElementById("EndPath")
+ }
+ return document.getElementById("Path" + num);
+};
+
+var navigateTo = function(up) {
+ var numItems = document.querySelectorAll(
+ ".line > .msgEvent, .line > .msgControl").length;
+ var currentSelected = findNum();
+ var newSelected = move(currentSelected, up, numItems);
+ var newEl = numToId(newSelected, numItems);
+
+ // Scroll element into center.
+ scrollTo(newEl);
+};
+
+window.addEventListener("keydown", function (event) {
+ if (event.defaultPrevented) {
+ return;
+ }
+ if (event.key == "j") {
+ navigateTo(/*up=*/false);
+ } else if (event.key == "k") {
+ navigateTo(/*up=*/true);
+ } else {
+ return;
+ }
+ event.preventDefault();
+}, true);
+</script>
+
+<script type='text/javascript'>
+
+var toggleHelp = function() {
+ var hint = document.querySelector("#tooltiphint");
+ var attributeName = "hidden";
+ if (hint.hasAttribute(attributeName)) {
+ hint.removeAttribute(attributeName);
+ } else {
+ hint.setAttribute("hidden", "true");
+ }
+};
+window.addEventListener("keydown", function (event) {
+ if (event.defaultPrevented) {
+ return;
+ }
+ if (event.key == "?") {
+ toggleHelp();
+ } else {
+ return;
+ }
+ event.preventDefault();
+});
+</script>
+<table class="code" data-fileid="1">
+<tr class="codeline" data-linenumber="1"><td class="num" id="LN1">1</td><td class="line"><span class='comment'>/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 4 -*- */</span></td></tr>
+<tr class="codeline" data-linenumber="2"><td class="num" id="LN2">2</td><td class="line"><span class='comment'>/* weather-metar.c - Weather server functions (METAR)</span></td></tr>
+<tr class="codeline" data-linenumber="3"><td class="num" id="LN3">3</td><td class="line"> <span class='comment'>*</span></td></tr>
+<tr class="codeline" data-linenumber="4"><td class="num" id="LN4">4</td><td class="line"> <span class='comment'>* This program is free software; you can redistribute it and/or</span></td></tr>
+<tr class="codeline" data-linenumber="5"><td class="num" id="LN5">5</td><td class="line"> <span class='comment'>* modify it under the terms of the GNU General Public License as</span></td></tr>
+<tr class="codeline" data-linenumber="6"><td class="num" id="LN6">6</td><td class="line"> <span class='comment'>* published by the Free Software Foundation; either version 2 of the</span></td></tr>
+<tr class="codeline" data-linenumber="7"><td class="num" id="LN7">7</td><td class="line"> <span class='comment'>* License, or (at your option) any later version.</span></td></tr>
+<tr class="codeline" data-linenumber="8"><td class="num" id="LN8">8</td><td class="line"> <span class='comment'>*</span></td></tr>
+<tr class="codeline" data-linenumber="9"><td class="num" id="LN9">9</td><td class="line"> <span class='comment'>* This program is distributed in the hope that it will be useful, but</span></td></tr>
+<tr class="codeline" data-linenumber="10"><td class="num" id="LN10">10</td><td class="line"> <span class='comment'>* WITHOUT ANY WARRANTY; without even the implied warranty of</span></td></tr>
+<tr class="codeline" data-linenumber="11"><td class="num" id="LN11">11</td><td class="line"> <span class='comment'>* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU</span></td></tr>
+<tr class="codeline" data-linenumber="12"><td class="num" id="LN12">12</td><td class="line"> <span class='comment'>* General Public License for more details.</span></td></tr>
+<tr class="codeline" data-linenumber="13"><td class="num" id="LN13">13</td><td class="line"> <span class='comment'>*</span></td></tr>
+<tr class="codeline" data-linenumber="14"><td class="num" id="LN14">14</td><td class="line"> <span class='comment'>* You should have received a copy of the GNU General Public License</span></td></tr>
+<tr class="codeline" data-linenumber="15"><td class="num" id="LN15">15</td><td class="line"> <span class='comment'>* along with this program; if not, see</span></td></tr>
+<tr class="codeline" data-linenumber="16"><td class="num" id="LN16">16</td><td class="line"> <span class='comment'>* &lt;http://www.gnu.org/licenses/&gt;.</span></td></tr>
+<tr class="codeline" data-linenumber="17"><td class="num" id="LN17">17</td><td class="line"> <span class='comment'>*/</span></td></tr>
+<tr class="codeline" data-linenumber="18"><td class="num" id="LN18">18</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="19"><td class="num" id="LN19">19</td><td class="line"><span class='directive'>#ifdef <span class='macro'>HAVE_CONFIG_H<span class='macro_popup'>1</span></span></span></td></tr>
+<tr class="codeline" data-linenumber="20"><td class="num" id="LN20">20</td><td class="line"><span class='directive'>#include &lt;config.h&gt;</span></td></tr>
+<tr class="codeline" data-linenumber="21"><td class="num" id="LN21">21</td><td class="line"><span class='directive'>#endif</span></td></tr>
+<tr class="codeline" data-linenumber="22"><td class="num" id="LN22">22</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="23"><td class="num" id="LN23">23</td><td class="line"><span class='directive'>#include &lt;stdlib.h&gt;</span></td></tr>
+<tr class="codeline" data-linenumber="24"><td class="num" id="LN24">24</td><td class="line"><span class='directive'>#include &lt;string.h&gt;</span></td></tr>
+<tr class="codeline" data-linenumber="25"><td class="num" id="LN25">25</td><td class="line"><span class='directive'>#include &lt;sys/types.h&gt;</span></td></tr>
+<tr class="codeline" data-linenumber="26"><td class="num" id="LN26">26</td><td class="line"><span class='directive'>#include &lt;regex.h&gt;</span></td></tr>
+<tr class="codeline" data-linenumber="27"><td class="num" id="LN27">27</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="28"><td class="num" id="LN28">28</td><td class="line"><span class='directive'>#define MATEWEATHER_I_KNOW_THIS_IS_UNSTABLE</span></td></tr>
+<tr class="codeline" data-linenumber="29"><td class="num" id="LN29">29</td><td class="line"><span class='directive'>#include "weather.h"</span></td></tr>
+<tr class="codeline" data-linenumber="30"><td class="num" id="LN30">30</td><td class="line"><span class='directive'>#include "weather-priv.h"</span></td></tr>
+<tr class="codeline" data-linenumber="31"><td class="num" id="LN31">31</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="32"><td class="num" id="LN32">32</td><td class="line"><span class='keyword'>enum</span> {</td></tr>
+<tr class="codeline" data-linenumber="33"><td class="num" id="LN33">33</td><td class="line"> TIME_RE,</td></tr>
+<tr class="codeline" data-linenumber="34"><td class="num" id="LN34">34</td><td class="line"> WIND_RE,</td></tr>
+<tr class="codeline" data-linenumber="35"><td class="num" id="LN35">35</td><td class="line"> VIS_RE,</td></tr>
+<tr class="codeline" data-linenumber="36"><td class="num" id="LN36">36</td><td class="line"> COND_RE,</td></tr>
+<tr class="codeline" data-linenumber="37"><td class="num" id="LN37">37</td><td class="line"> CLOUD_RE,</td></tr>
+<tr class="codeline" data-linenumber="38"><td class="num" id="LN38">38</td><td class="line"> TEMP_RE,</td></tr>
+<tr class="codeline" data-linenumber="39"><td class="num" id="LN39">39</td><td class="line"> PRES_RE,</td></tr>
+<tr class="codeline" data-linenumber="40"><td class="num" id="LN40">40</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="41"><td class="num" id="LN41">41</td><td class="line"> RE_NUM</td></tr>
+<tr class="codeline" data-linenumber="42"><td class="num" id="LN42">42</td><td class="line">};</td></tr>
+<tr class="codeline" data-linenumber="43"><td class="num" id="LN43">43</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="44"><td class="num" id="LN44">44</td><td class="line"><span class='comment'>/* Return time of weather report as secs since epoch UTC */</span></td></tr>
+<tr class="codeline" data-linenumber="45"><td class="num" id="LN45">45</td><td class="line"><span class='keyword'>static</span> time_t</td></tr>
+<tr class="codeline" data-linenumber="46"><td class="num" id="LN46">46</td><td class="line">make_time (gint utcDate, gint utcHour, gint utcMin)</td></tr>
+<tr class="codeline" data-linenumber="47"><td class="num" id="LN47">47</td><td class="line">{</td></tr>
+<tr class="codeline" data-linenumber="48"><td class="num" id="LN48">48</td><td class="line"> <span class='keyword'>const</span> time_t now = time (<span class='macro'>NULL<span class='macro_popup'>((void*)0)</span></span>);</td></tr>
+<tr class="codeline" data-linenumber="49"><td class="num" id="LN49">49</td><td class="line"> <span class='keyword'>struct</span> tm tm;</td></tr>
+<tr class="codeline" data-linenumber="50"><td class="num" id="LN50">50</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="51"><td class="num" id="LN51">51</td><td class="line"> localtime_r (&amp;now, &amp;tm);</td></tr>
+<tr class="codeline" data-linenumber="52"><td class="num" id="LN52">52</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="53"><td class="num" id="LN53">53</td><td class="line"> <span class='comment'>/* If last reading took place just before midnight UTC on the</span></td></tr>
+<tr class="codeline" data-linenumber="54"><td class="num" id="LN54">54</td><td class="line"> <span class='comment'>* first, adjust the date downward to allow for the month</span></td></tr>
+<tr class="codeline" data-linenumber="55"><td class="num" id="LN55">55</td><td class="line"> <span class='comment'>* change-over. This ASSUMES that the reading won't be more than</span></td></tr>
+<tr class="codeline" data-linenumber="56"><td class="num" id="LN56">56</td><td class="line"> <span class='comment'>* 24 hrs old! */</span></td></tr>
+<tr class="codeline" data-linenumber="57"><td class="num" id="LN57">57</td><td class="line"> <span class='keyword'>if</span> ((utcDate &gt; tm.tm_mday) &amp;&amp; (tm.tm_mday == 1)) {</td></tr>
+<tr class="codeline" data-linenumber="58"><td class="num" id="LN58">58</td><td class="line"> tm.tm_mday = 0; <span class='comment'>/* mktime knows this is the last day of the previous</span></td></tr>
+<tr class="codeline" data-linenumber="59"><td class="num" id="LN59">59</td><td class="line"> <span class='comment'>* month. */</span></td></tr>
+<tr class="codeline" data-linenumber="60"><td class="num" id="LN60">60</td><td class="line"> } <span class='keyword'>else</span> {</td></tr>
+<tr class="codeline" data-linenumber="61"><td class="num" id="LN61">61</td><td class="line"> tm.tm_mday = utcDate;</td></tr>
+<tr class="codeline" data-linenumber="62"><td class="num" id="LN62">62</td><td class="line"> }</td></tr>
+<tr class="codeline" data-linenumber="63"><td class="num" id="LN63">63</td><td class="line"> tm.tm_hour = utcHour;</td></tr>
+<tr class="codeline" data-linenumber="64"><td class="num" id="LN64">64</td><td class="line"> tm.tm_min = utcMin;</td></tr>
+<tr class="codeline" data-linenumber="65"><td class="num" id="LN65">65</td><td class="line"> tm.tm_sec = 0;</td></tr>
+<tr class="codeline" data-linenumber="66"><td class="num" id="LN66">66</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="67"><td class="num" id="LN67">67</td><td class="line"> <span class='comment'>/* mktime() assumes value is local, not UTC. Use tm_gmtoff to compensate */</span></td></tr>
+<tr class="codeline" data-linenumber="68"><td class="num" id="LN68">68</td><td class="line"><span class='directive'>#ifdef <span class='macro'>HAVE_TM_TM_GMOFF<span class='macro_popup'>1</span></span></span></td></tr>
+<tr class="codeline" data-linenumber="69"><td class="num" id="LN69">69</td><td class="line"> <span class='keyword'>return</span> tm.tm_gmtoff + mktime (&amp;tm);</td></tr>
+<tr class="codeline" data-linenumber="70"><td class="num" id="LN70">70</td><td class="line"><span class='directive'>#elif defined HAVE_TIMEZONE</span></td></tr>
+<tr class="codeline" data-linenumber="71"><td class="num" id="LN71">71</td><td class="line"> <span class='keyword'>return</span> timezone + mktime (&amp;tm);</td></tr>
+<tr class="codeline" data-linenumber="72"><td class="num" id="LN72">72</td><td class="line"><span class='directive'>#endif</span></td></tr>
+<tr class="codeline" data-linenumber="73"><td class="num" id="LN73">73</td><td class="line">}</td></tr>
+<tr class="codeline" data-linenumber="74"><td class="num" id="LN74">74</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="75"><td class="num" id="LN75">75</td><td class="line"><span class='keyword'>static</span> <span class='keyword'>void</span></td></tr>
+<tr class="codeline" data-linenumber="76"><td class="num" id="LN76">76</td><td class="line">metar_tok_time (gchar *tokp, WeatherInfo *info)</td></tr>
+<tr class="codeline" data-linenumber="77"><td class="num" id="LN77">77</td><td class="line">{</td></tr>
+<tr class="codeline" data-linenumber="78"><td class="num" id="LN78">78</td><td class="line"> gint day, hr, min;</td></tr>
+<tr class="codeline" data-linenumber="79"><td class="num" id="LN79">79</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="80"><td class="num" id="LN80">80</td><td class="line"> sscanf (tokp, <span class='string_literal'>"%2u%2u%2u"</span>, &amp;day, &amp;hr, &amp;min);</td></tr>
+<tr class="codeline" data-linenumber="81"><td class="num" id="LN81">81</td><td class="line"> info-&gt;update = make_time (day, hr, min);</td></tr>
+<tr class="codeline" data-linenumber="82"><td class="num" id="LN82">82</td><td class="line">}</td></tr>
+<tr class="codeline" data-linenumber="83"><td class="num" id="LN83">83</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="84"><td class="num" id="LN84">84</td><td class="line"><span class='keyword'>static</span> <span class='keyword'>void</span></td></tr>
+<tr class="codeline" data-linenumber="85"><td class="num" id="LN85">85</td><td class="line">metar_tok_wind (gchar *tokp, WeatherInfo *info)</td></tr>
+<tr class="codeline" data-linenumber="86"><td class="num" id="LN86">86</td><td class="line">{</td></tr>
+<tr class="codeline" data-linenumber="87"><td class="num" id="LN87">87</td><td class="line"> gchar sdir[4], sspd[4], sgust[4];</td></tr>
+<tr class="codeline" data-linenumber="88"><td class="num" id="LN88">88</td><td class="line"> gint dir, spd = -1;</td></tr>
+<tr class="codeline" data-linenumber="89"><td class="num" id="LN89">89</td><td class="line"> gchar *gustp;</td></tr>
+<tr class="codeline" data-linenumber="90"><td class="num" id="LN90">90</td><td class="line"> size_t glen;</td></tr>
+<tr class="codeline" data-linenumber="91"><td class="num" id="LN91">91</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="92"><td class="num" id="LN92">92</td><td class="line"> strncpy (sdir, tokp, 3);</td></tr>
+<tr class="codeline" data-linenumber="93"><td class="num" id="LN93">93</td><td class="line"> sdir[3] = 0;</td></tr>
+<tr class="codeline" data-linenumber="94"><td class="num" id="LN94">94</td><td class="line"> dir = (!strcmp (sdir, <span class='string_literal'>"VRB"</span>)) ? -1 : atoi (sdir);</td></tr>
+<tr class="codeline" data-linenumber="95"><td class="num" id="LN95">95</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="96"><td class="num" id="LN96">96</td><td class="line"> memset (sspd, 0, <span class='keyword'>sizeof</span> (sspd));</td></tr>
+<tr class="codeline" data-linenumber="97"><td class="num" id="LN97">97</td><td class="line"> glen = strspn (tokp + 3, <span class='macro'>CONST_DIGITS<span class='macro_popup'>"0123456789"</span></span>);</td></tr>
+<tr class="codeline" data-linenumber="98"><td class="num" id="LN98">98</td><td class="line"> strncpy (sspd, tokp + 3, glen);</td></tr>
+<tr class="codeline" data-linenumber="99"><td class="num" id="LN99">99</td><td class="line"> spd = atoi (sspd);</td></tr>
+<tr class="codeline" data-linenumber="100"><td class="num" id="LN100">100</td><td class="line"> tokp += glen + 3;</td></tr>
+<tr class="codeline" data-linenumber="101"><td class="num" id="LN101">101</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="102"><td class="num" id="LN102">102</td><td class="line"> gustp = strchr (tokp, 'G');</td></tr>
+<tr class="codeline" data-linenumber="103"><td class="num" id="LN103">103</td><td class="line"> <span class='keyword'>if</span> (gustp) {</td></tr>
+<tr class="codeline" data-linenumber="104"><td class="num" id="LN104">104</td><td class="line"> memset (sgust, 0, <span class='keyword'>sizeof</span> (sgust));</td></tr>
+<tr class="codeline" data-linenumber="105"><td class="num" id="LN105">105</td><td class="line"> glen = strspn (gustp + 1, <span class='macro'>CONST_DIGITS<span class='macro_popup'>"0123456789"</span></span>);</td></tr>
+<tr class="codeline" data-linenumber="106"><td class="num" id="LN106">106</td><td class="line"> strncpy (sgust, gustp + 1, glen);</td></tr>
+<tr class="codeline" data-linenumber="107"><td class="num" id="LN107">107</td><td class="line"> tokp = gustp + 1 + glen;</td></tr>
+<tr class="codeline" data-linenumber="108"><td class="num" id="LN108">108</td><td class="line"> }</td></tr>
+<tr class="codeline" data-linenumber="109"><td class="num" id="LN109">109</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="110"><td class="num" id="LN110">110</td><td class="line"> <span class='keyword'>if</span> (!strcmp (tokp, <span class='string_literal'>"MPS"</span>))</td></tr>
+<tr class="codeline" data-linenumber="111"><td class="num" id="LN111">111</td><td class="line"> info-&gt;windspeed = <span class='macro'>WINDSPEED_MS_TO_KNOTS ((WeatherWindSpeed)spd)<span class='macro_popup'>(((WeatherWindSpeed)spd) / 0.514444)</span></span>;</td></tr>
+<tr class="codeline" data-linenumber="112"><td class="num" id="LN112">112</td><td class="line"> <span class='keyword'>else</span></td></tr>
+<tr class="codeline" data-linenumber="113"><td class="num" id="LN113">113</td><td class="line"> info-&gt;windspeed = (WeatherWindSpeed)spd;</td></tr>
+<tr class="codeline" data-linenumber="114"><td class="num" id="LN114">114</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="115"><td class="num" id="LN115">115</td><td class="line"> <span class='keyword'>if</span> ((349 &lt;= dir) || (dir &lt;= 11))</td></tr>
+<tr class="codeline" data-linenumber="116"><td class="num" id="LN116">116</td><td class="line"> info-&gt;wind = WIND_N;</td></tr>
+<tr class="codeline" data-linenumber="117"><td class="num" id="LN117">117</td><td class="line"> <span class='keyword'>else</span> <span class='keyword'>if</span> ((12 &lt;= dir) &amp;&amp; (dir &lt;= 33))</td></tr>
+<tr class="codeline" data-linenumber="118"><td class="num" id="LN118">118</td><td class="line"> info-&gt;wind = WIND_NNE;</td></tr>
+<tr class="codeline" data-linenumber="119"><td class="num" id="LN119">119</td><td class="line"> <span class='keyword'>else</span> <span class='keyword'>if</span> ((34 &lt;= dir) &amp;&amp; (dir &lt;= 56))</td></tr>
+<tr class="codeline" data-linenumber="120"><td class="num" id="LN120">120</td><td class="line"> info-&gt;wind = WIND_NE;</td></tr>
+<tr class="codeline" data-linenumber="121"><td class="num" id="LN121">121</td><td class="line"> <span class='keyword'>else</span> <span class='keyword'>if</span> ((57 &lt;= dir) &amp;&amp; (dir &lt;= 78))</td></tr>
+<tr class="codeline" data-linenumber="122"><td class="num" id="LN122">122</td><td class="line"> info-&gt;wind = WIND_ENE;</td></tr>
+<tr class="codeline" data-linenumber="123"><td class="num" id="LN123">123</td><td class="line"> <span class='keyword'>else</span> <span class='keyword'>if</span> ((79 &lt;= dir) &amp;&amp; (dir &lt;= 101))</td></tr>
+<tr class="codeline" data-linenumber="124"><td class="num" id="LN124">124</td><td class="line"> info-&gt;wind = WIND_E;</td></tr>
+<tr class="codeline" data-linenumber="125"><td class="num" id="LN125">125</td><td class="line"> <span class='keyword'>else</span> <span class='keyword'>if</span> ((102 &lt;= dir) &amp;&amp; (dir &lt;= 123))</td></tr>
+<tr class="codeline" data-linenumber="126"><td class="num" id="LN126">126</td><td class="line"> info-&gt;wind = WIND_ESE;</td></tr>
+<tr class="codeline" data-linenumber="127"><td class="num" id="LN127">127</td><td class="line"> <span class='keyword'>else</span> <span class='keyword'>if</span> ((124 &lt;= dir) &amp;&amp; (dir &lt;= 146))</td></tr>
+<tr class="codeline" data-linenumber="128"><td class="num" id="LN128">128</td><td class="line"> info-&gt;wind = WIND_SE;</td></tr>
+<tr class="codeline" data-linenumber="129"><td class="num" id="LN129">129</td><td class="line"> <span class='keyword'>else</span> <span class='keyword'>if</span> ((147 &lt;= dir) &amp;&amp; (dir &lt;= 168))</td></tr>
+<tr class="codeline" data-linenumber="130"><td class="num" id="LN130">130</td><td class="line"> info-&gt;wind = WIND_SSE;</td></tr>
+<tr class="codeline" data-linenumber="131"><td class="num" id="LN131">131</td><td class="line"> <span class='keyword'>else</span> <span class='keyword'>if</span> ((169 &lt;= dir) &amp;&amp; (dir &lt;= 191))</td></tr>
+<tr class="codeline" data-linenumber="132"><td class="num" id="LN132">132</td><td class="line"> info-&gt;wind = WIND_S;</td></tr>
+<tr class="codeline" data-linenumber="133"><td class="num" id="LN133">133</td><td class="line"> <span class='keyword'>else</span> <span class='keyword'>if</span> ((192 &lt;= dir) &amp;&amp; (dir &lt;= 213))</td></tr>
+<tr class="codeline" data-linenumber="134"><td class="num" id="LN134">134</td><td class="line"> info-&gt;wind = WIND_SSW;</td></tr>
+<tr class="codeline" data-linenumber="135"><td class="num" id="LN135">135</td><td class="line"> <span class='keyword'>else</span> <span class='keyword'>if</span> ((214 &lt;= dir) &amp;&amp; (dir &lt;= 236))</td></tr>
+<tr class="codeline" data-linenumber="136"><td class="num" id="LN136">136</td><td class="line"> info-&gt;wind = WIND_SW;</td></tr>
+<tr class="codeline" data-linenumber="137"><td class="num" id="LN137">137</td><td class="line"> <span class='keyword'>else</span> <span class='keyword'>if</span> ((237 &lt;= dir) &amp;&amp; (dir &lt;= 258))</td></tr>
+<tr class="codeline" data-linenumber="138"><td class="num" id="LN138">138</td><td class="line"> info-&gt;wind = WIND_WSW;</td></tr>
+<tr class="codeline" data-linenumber="139"><td class="num" id="LN139">139</td><td class="line"> <span class='keyword'>else</span> <span class='keyword'>if</span> ((259 &lt;= dir) &amp;&amp; (dir &lt;= 281))</td></tr>
+<tr class="codeline" data-linenumber="140"><td class="num" id="LN140">140</td><td class="line"> info-&gt;wind = WIND_W;</td></tr>
+<tr class="codeline" data-linenumber="141"><td class="num" id="LN141">141</td><td class="line"> <span class='keyword'>else</span> <span class='keyword'>if</span> ((282 &lt;= dir) &amp;&amp; (dir &lt;= 303))</td></tr>
+<tr class="codeline" data-linenumber="142"><td class="num" id="LN142">142</td><td class="line"> info-&gt;wind = WIND_WNW;</td></tr>
+<tr class="codeline" data-linenumber="143"><td class="num" id="LN143">143</td><td class="line"> <span class='keyword'>else</span> <span class='keyword'>if</span> ((304 &lt;= dir) &amp;&amp; (dir &lt;= 326))</td></tr>
+<tr class="codeline" data-linenumber="144"><td class="num" id="LN144">144</td><td class="line"> info-&gt;wind = WIND_NW;</td></tr>
+<tr class="codeline" data-linenumber="145"><td class="num" id="LN145">145</td><td class="line"> <span class='keyword'>else</span> <span class='keyword'>if</span> ((327 &lt;= dir) &amp;&amp; (dir &lt;= 348))</td></tr>
+<tr class="codeline" data-linenumber="146"><td class="num" id="LN146">146</td><td class="line"> info-&gt;wind = WIND_NNW;</td></tr>
+<tr class="codeline" data-linenumber="147"><td class="num" id="LN147">147</td><td class="line">}</td></tr>
+<tr class="codeline" data-linenumber="148"><td class="num" id="LN148">148</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="149"><td class="num" id="LN149">149</td><td class="line"><span class='keyword'>static</span> <span class='keyword'>void</span></td></tr>
+<tr class="codeline" data-linenumber="150"><td class="num" id="LN150">150</td><td class="line">metar_tok_vis (gchar *tokp, WeatherInfo *info)</td></tr>
+<tr class="codeline" data-linenumber="151"><td class="num" id="LN151">151</td><td class="line">{</td></tr>
+<tr class="codeline" data-linenumber="152"><td class="num" id="LN152">152</td><td class="line"> gchar *pfrac, *pend, *psp;</td></tr>
+<tr class="codeline" data-linenumber="153"><td class="num" id="LN153">153</td><td class="line"> gchar sval[6];</td></tr>
+<tr class="codeline" data-linenumber="154"><td class="num" id="LN154">154</td><td class="line"> gint num, den, val;</td></tr>
+<tr class="codeline" data-linenumber="155"><td class="num" id="LN155">155</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="156"><td class="num" id="LN156">156</td><td class="line"> memset (sval, 0, <span class='keyword'>sizeof</span> (sval));</td></tr>
+<tr class="codeline" data-linenumber="157"><td class="num" id="LN157">157</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="158"><td class="num" id="LN158">158</td><td class="line"> <span class='keyword'>if</span> (!strcmp (tokp,<span class='string_literal'>"CAVOK"</span>)) {</td></tr>
+<tr class="codeline" data-linenumber="159"><td class="num" id="LN159">159</td><td class="line"> <span class='comment'>// "Ceiling And Visibility OK": visibility &gt;= 10 KM</span></td></tr>
+<tr class="codeline" data-linenumber="160"><td class="num" id="LN160">160</td><td class="line"> info-&gt;visibility=10000. / <span class='macro'>VISIBILITY_SM_TO_M (1.)<span class='macro_popup'>(((1.) * 1.609344) * 1000)</span></span>;</td></tr>
+<tr class="codeline" data-linenumber="161"><td class="num" id="LN161">161</td><td class="line"> info-&gt;sky = SKY_CLEAR;</td></tr>
+<tr class="codeline" data-linenumber="162"><td class="num" id="LN162">162</td><td class="line"> } <span class='keyword'>else</span> <span class='keyword'>if</span> (0 != (pend = strstr (tokp, <span class='string_literal'>"SM"</span>))) {</td></tr>
+<tr class="codeline" data-linenumber="163"><td class="num" id="LN163">163</td><td class="line"> <span class='comment'>// US observation: field ends with "SM"</span></td></tr>
+<tr class="codeline" data-linenumber="164"><td class="num" id="LN164">164</td><td class="line"> pfrac = strchr (tokp, '/');</td></tr>
+<tr class="codeline" data-linenumber="165"><td class="num" id="LN165">165</td><td class="line"> <span class='keyword'>if</span> (pfrac) {</td></tr>
+<tr class="codeline" data-linenumber="166"><td class="num" id="LN166">166</td><td class="line"> <span class='keyword'>if</span> (*tokp == 'M') {</td></tr>
+<tr class="codeline" data-linenumber="167"><td class="num" id="LN167">167</td><td class="line"> info-&gt;visibility = 0.001;</td></tr>
+<tr class="codeline" data-linenumber="168"><td class="num" id="LN168">168</td><td class="line"> } <span class='keyword'>else</span> {</td></tr>
+<tr class="codeline" data-linenumber="169"><td class="num" id="LN169">169</td><td class="line"> num = (*(pfrac - 1) - '0');</td></tr>
+<tr class="codeline" data-linenumber="170"><td class="num" id="LN170">170</td><td class="line"> strncpy (sval, pfrac + 1, pend - pfrac - 1);</td></tr>
+<tr class="codeline" data-linenumber="171"><td class="num" id="LN171">171</td><td class="line"> den = atoi (sval);</td></tr>
+<tr class="codeline" data-linenumber="172"><td class="num" id="LN172">172</td><td class="line"> info-&gt;visibility =</td></tr>
+<tr class="codeline" data-linenumber="173"><td class="num" id="LN173">173</td><td class="line"> ((WeatherVisibility)num / ((WeatherVisibility)den));</td></tr>
+<tr class="codeline" data-linenumber="174"><td class="num" id="LN174">174</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="175"><td class="num" id="LN175">175</td><td class="line"> psp = strchr (tokp, ' ');</td></tr>
+<tr class="codeline" data-linenumber="176"><td class="num" id="LN176">176</td><td class="line"> <span class='keyword'>if</span> (psp) {</td></tr>
+<tr class="codeline" data-linenumber="177"><td class="num" id="LN177">177</td><td class="line"> *psp = <span class="mrange">'\0';</td></tr></span>
+<tr><td class="num"></td><td class="line"><div id="EndPath" class="msg msgEvent" style="margin-left:28ex">This statement is never executed</div></td></tr>
+<tr class="codeline" data-linenumber="178"><td class="num" id="LN178">178</td><td class="line"> val = atoi (tokp);</td></tr>
+<tr class="codeline" data-linenumber="179"><td class="num" id="LN179">179</td><td class="line"> info-&gt;visibility += (WeatherVisibility)val;</td></tr>
+<tr class="codeline" data-linenumber="180"><td class="num" id="LN180">180</td><td class="line"> }</td></tr>
+<tr class="codeline" data-linenumber="181"><td class="num" id="LN181">181</td><td class="line"> }</td></tr>
+<tr class="codeline" data-linenumber="182"><td class="num" id="LN182">182</td><td class="line"> } <span class='keyword'>else</span> {</td></tr>
+<tr class="codeline" data-linenumber="183"><td class="num" id="LN183">183</td><td class="line"> strncpy (sval, tokp, pend - tokp);</td></tr>
+<tr class="codeline" data-linenumber="184"><td class="num" id="LN184">184</td><td class="line"> val = atoi (sval);</td></tr>
+<tr class="codeline" data-linenumber="185"><td class="num" id="LN185">185</td><td class="line"> info-&gt;visibility = (WeatherVisibility)val;</td></tr>
+<tr class="codeline" data-linenumber="186"><td class="num" id="LN186">186</td><td class="line"> }</td></tr>
+<tr class="codeline" data-linenumber="187"><td class="num" id="LN187">187</td><td class="line"> } <span class='keyword'>else</span> {</td></tr>
+<tr class="codeline" data-linenumber="188"><td class="num" id="LN188">188</td><td class="line"> <span class='comment'>// International observation: NNNN(DD NNNNDD)?</span></td></tr>
+<tr class="codeline" data-linenumber="189"><td class="num" id="LN189">189</td><td class="line"> <span class='comment'>// For now: use only the minimum visibility and ignore its direction</span></td></tr>
+<tr class="codeline" data-linenumber="190"><td class="num" id="LN190">190</td><td class="line"> strncpy (sval, tokp, strspn (tokp, <span class='macro'>CONST_DIGITS<span class='macro_popup'>"0123456789"</span></span>));</td></tr>
+<tr class="codeline" data-linenumber="191"><td class="num" id="LN191">191</td><td class="line"> val = atoi (sval);</td></tr>
+<tr class="codeline" data-linenumber="192"><td class="num" id="LN192">192</td><td class="line"> info-&gt;visibility = (WeatherVisibility)val / <span class='macro'>VISIBILITY_SM_TO_M (1.)<span class='macro_popup'>(((1.) * 1.609344) * 1000)</span></span>;</td></tr>
+<tr class="codeline" data-linenumber="193"><td class="num" id="LN193">193</td><td class="line"> }</td></tr>
+<tr class="codeline" data-linenumber="194"><td class="num" id="LN194">194</td><td class="line">}</td></tr>
+<tr class="codeline" data-linenumber="195"><td class="num" id="LN195">195</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="196"><td class="num" id="LN196">196</td><td class="line"><span class='keyword'>static</span> <span class='keyword'>void</span></td></tr>
+<tr class="codeline" data-linenumber="197"><td class="num" id="LN197">197</td><td class="line">metar_tok_cloud (gchar *tokp, WeatherInfo *info)</td></tr>
+<tr class="codeline" data-linenumber="198"><td class="num" id="LN198">198</td><td class="line">{</td></tr>
+<tr class="codeline" data-linenumber="199"><td class="num" id="LN199">199</td><td class="line"> gchar stype[4], salt[4];</td></tr>
+<tr class="codeline" data-linenumber="200"><td class="num" id="LN200">200</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="201"><td class="num" id="LN201">201</td><td class="line"> strncpy (stype, tokp, 3);</td></tr>
+<tr class="codeline" data-linenumber="202"><td class="num" id="LN202">202</td><td class="line"> stype[3] = 0;</td></tr>
+<tr class="codeline" data-linenumber="203"><td class="num" id="LN203">203</td><td class="line"> <span class='keyword'>if</span> (strlen (tokp) == 6) {</td></tr>
+<tr class="codeline" data-linenumber="204"><td class="num" id="LN204">204</td><td class="line"> strncpy (salt, tokp + 3, 3);</td></tr>
+<tr class="codeline" data-linenumber="205"><td class="num" id="LN205">205</td><td class="line"> salt[3] = 0;</td></tr>
+<tr class="codeline" data-linenumber="206"><td class="num" id="LN206">206</td><td class="line"> }</td></tr>
+<tr class="codeline" data-linenumber="207"><td class="num" id="LN207">207</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="208"><td class="num" id="LN208">208</td><td class="line"> <span class='keyword'>if</span> (!strcmp (stype, <span class='string_literal'>"CLR"</span>)) {</td></tr>
+<tr class="codeline" data-linenumber="209"><td class="num" id="LN209">209</td><td class="line"> info-&gt;sky = SKY_CLEAR;</td></tr>
+<tr class="codeline" data-linenumber="210"><td class="num" id="LN210">210</td><td class="line"> } <span class='keyword'>else</span> <span class='keyword'>if</span> (!strcmp (stype, <span class='string_literal'>"SKC"</span>)) {</td></tr>
+<tr class="codeline" data-linenumber="211"><td class="num" id="LN211">211</td><td class="line"> info-&gt;sky = SKY_CLEAR;</td></tr>
+<tr class="codeline" data-linenumber="212"><td class="num" id="LN212">212</td><td class="line"> } <span class='keyword'>else</span> <span class='keyword'>if</span> (!strcmp (stype, <span class='string_literal'>"NSC"</span>)) {</td></tr>
+<tr class="codeline" data-linenumber="213"><td class="num" id="LN213">213</td><td class="line"> info-&gt;sky = SKY_CLEAR;</td></tr>
+<tr class="codeline" data-linenumber="214"><td class="num" id="LN214">214</td><td class="line"> } <span class='keyword'>else</span> <span class='keyword'>if</span> (!strcmp (stype, <span class='string_literal'>"BKN"</span>)) {</td></tr>
+<tr class="codeline" data-linenumber="215"><td class="num" id="LN215">215</td><td class="line"> info-&gt;sky = SKY_BROKEN;</td></tr>
+<tr class="codeline" data-linenumber="216"><td class="num" id="LN216">216</td><td class="line"> } <span class='keyword'>else</span> <span class='keyword'>if</span> (!strcmp (stype, <span class='string_literal'>"SCT"</span>)) {</td></tr>
+<tr class="codeline" data-linenumber="217"><td class="num" id="LN217">217</td><td class="line"> info-&gt;sky = SKY_SCATTERED;</td></tr>
+<tr class="codeline" data-linenumber="218"><td class="num" id="LN218">218</td><td class="line"> } <span class='keyword'>else</span> <span class='keyword'>if</span> (!strcmp (stype, <span class='string_literal'>"FEW"</span>)) {</td></tr>
+<tr class="codeline" data-linenumber="219"><td class="num" id="LN219">219</td><td class="line"> info-&gt;sky = SKY_FEW;</td></tr>
+<tr class="codeline" data-linenumber="220"><td class="num" id="LN220">220</td><td class="line"> } <span class='keyword'>else</span> <span class='keyword'>if</span> (!strcmp (stype, <span class='string_literal'>"OVC"</span>)) {</td></tr>
+<tr class="codeline" data-linenumber="221"><td class="num" id="LN221">221</td><td class="line"> info-&gt;sky = SKY_OVERCAST;</td></tr>
+<tr class="codeline" data-linenumber="222"><td class="num" id="LN222">222</td><td class="line"> }</td></tr>
+<tr class="codeline" data-linenumber="223"><td class="num" id="LN223">223</td><td class="line">}</td></tr>
+<tr class="codeline" data-linenumber="224"><td class="num" id="LN224">224</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="225"><td class="num" id="LN225">225</td><td class="line"><span class='keyword'>static</span> <span class='keyword'>void</span></td></tr>
+<tr class="codeline" data-linenumber="226"><td class="num" id="LN226">226</td><td class="line">metar_tok_pres (gchar *tokp, WeatherInfo *info)</td></tr>
+<tr class="codeline" data-linenumber="227"><td class="num" id="LN227">227</td><td class="line">{</td></tr>
+<tr class="codeline" data-linenumber="228"><td class="num" id="LN228">228</td><td class="line"> <span class='keyword'>if</span> (*tokp == 'A') {</td></tr>
+<tr class="codeline" data-linenumber="229"><td class="num" id="LN229">229</td><td class="line"> gchar sintg[3], sfract[3];</td></tr>
+<tr class="codeline" data-linenumber="230"><td class="num" id="LN230">230</td><td class="line"> gint intg, fract;</td></tr>
+<tr class="codeline" data-linenumber="231"><td class="num" id="LN231">231</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="232"><td class="num" id="LN232">232</td><td class="line"> strncpy (sintg, tokp + 1, 2);</td></tr>
+<tr class="codeline" data-linenumber="233"><td class="num" id="LN233">233</td><td class="line"> sintg[2] = 0;</td></tr>
+<tr class="codeline" data-linenumber="234"><td class="num" id="LN234">234</td><td class="line"> intg = atoi (sintg);</td></tr>
+<tr class="codeline" data-linenumber="235"><td class="num" id="LN235">235</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="236"><td class="num" id="LN236">236</td><td class="line"> strncpy (sfract, tokp + 3, 2);</td></tr>
+<tr class="codeline" data-linenumber="237"><td class="num" id="LN237">237</td><td class="line"> sfract[2] = 0;</td></tr>
+<tr class="codeline" data-linenumber="238"><td class="num" id="LN238">238</td><td class="line"> fract = atoi (sfract);</td></tr>
+<tr class="codeline" data-linenumber="239"><td class="num" id="LN239">239</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="240"><td class="num" id="LN240">240</td><td class="line"> info-&gt;pressure = (WeatherPressure)intg + (((WeatherPressure)fract)/100.0);</td></tr>
+<tr class="codeline" data-linenumber="241"><td class="num" id="LN241">241</td><td class="line"> } <span class='keyword'>else</span> { <span class='comment'>/* *tokp == 'Q' */</span></td></tr>
+<tr class="codeline" data-linenumber="242"><td class="num" id="LN242">242</td><td class="line"> gchar spres[5];</td></tr>
+<tr class="codeline" data-linenumber="243"><td class="num" id="LN243">243</td><td class="line"> gint pres;</td></tr>
+<tr class="codeline" data-linenumber="244"><td class="num" id="LN244">244</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="245"><td class="num" id="LN245">245</td><td class="line"> strncpy (spres, tokp + 1, 4);</td></tr>
+<tr class="codeline" data-linenumber="246"><td class="num" id="LN246">246</td><td class="line"> spres[4] = 0;</td></tr>
+<tr class="codeline" data-linenumber="247"><td class="num" id="LN247">247</td><td class="line"> pres = atoi (spres);</td></tr>
+<tr class="codeline" data-linenumber="248"><td class="num" id="LN248">248</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="249"><td class="num" id="LN249">249</td><td class="line"> info-&gt;pressure = <span class='macro'>PRESSURE_MBAR_TO_INCH ((WeatherPressure)pres)<span class='macro_popup'>(((WeatherPressure)pres) * 0.029533373)</span></span>;</td></tr>
+<tr class="codeline" data-linenumber="250"><td class="num" id="LN250">250</td><td class="line"> }</td></tr>
+<tr class="codeline" data-linenumber="251"><td class="num" id="LN251">251</td><td class="line">}</td></tr>
+<tr class="codeline" data-linenumber="252"><td class="num" id="LN252">252</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="253"><td class="num" id="LN253">253</td><td class="line"><span class='keyword'>static</span> <span class='keyword'>void</span></td></tr>
+<tr class="codeline" data-linenumber="254"><td class="num" id="LN254">254</td><td class="line">metar_tok_temp (gchar *tokp, WeatherInfo *info)</td></tr>
+<tr class="codeline" data-linenumber="255"><td class="num" id="LN255">255</td><td class="line">{</td></tr>
+<tr class="codeline" data-linenumber="256"><td class="num" id="LN256">256</td><td class="line"> gchar *ptemp, *pdew, *psep;</td></tr>
+<tr class="codeline" data-linenumber="257"><td class="num" id="LN257">257</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="258"><td class="num" id="LN258">258</td><td class="line"> psep = strchr (tokp, '/');</td></tr>
+<tr class="codeline" data-linenumber="259"><td class="num" id="LN259">259</td><td class="line"> *psep = 0;</td></tr>
+<tr class="codeline" data-linenumber="260"><td class="num" id="LN260">260</td><td class="line"> ptemp = tokp;</td></tr>
+<tr class="codeline" data-linenumber="261"><td class="num" id="LN261">261</td><td class="line"> pdew = psep + 1;</td></tr>
+<tr class="codeline" data-linenumber="262"><td class="num" id="LN262">262</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="263"><td class="num" id="LN263">263</td><td class="line"> info-&gt;temp = (*ptemp == 'M') ? <span class='macro'>TEMP_C_TO_F (-atoi (ptemp + 1))<span class='macro_popup'>(((-atoi (ptemp + 1)) * (9.0/5.0)) + 32.0)</span></span></td></tr>
+<tr class="codeline" data-linenumber="264"><td class="num" id="LN264">264</td><td class="line"> : <span class='macro'>TEMP_C_TO_F (atoi (ptemp))<span class='macro_popup'>(((atoi (ptemp)) * (9.0/5.0)) + 32.0)</span></span>;</td></tr>
+<tr class="codeline" data-linenumber="265"><td class="num" id="LN265">265</td><td class="line"> <span class='keyword'>if</span> (*pdew) {</td></tr>
+<tr class="codeline" data-linenumber="266"><td class="num" id="LN266">266</td><td class="line"> info-&gt;dew = (*pdew == 'M') ? <span class='macro'>TEMP_C_TO_F (-atoi (pdew + 1))<span class='macro_popup'>(((-atoi (pdew + 1)) * (9.0/5.0)) + 32.0)</span></span></td></tr>
+<tr class="codeline" data-linenumber="267"><td class="num" id="LN267">267</td><td class="line"> : <span class='macro'>TEMP_C_TO_F (atoi (pdew))<span class='macro_popup'>(((atoi (pdew)) * (9.0/5.0)) + 32.0)</span></span>;</td></tr>
+<tr class="codeline" data-linenumber="268"><td class="num" id="LN268">268</td><td class="line"> } <span class='keyword'>else</span> {</td></tr>
+<tr class="codeline" data-linenumber="269"><td class="num" id="LN269">269</td><td class="line"> info-&gt;dew = -1000.0;</td></tr>
+<tr class="codeline" data-linenumber="270"><td class="num" id="LN270">270</td><td class="line"> }</td></tr>
+<tr class="codeline" data-linenumber="271"><td class="num" id="LN271">271</td><td class="line">}</td></tr>
+<tr class="codeline" data-linenumber="272"><td class="num" id="LN272">272</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="273"><td class="num" id="LN273">273</td><td class="line"><span class='keyword'>static</span> <span class='keyword'>void</span></td></tr>
+<tr class="codeline" data-linenumber="274"><td class="num" id="LN274">274</td><td class="line">metar_tok_cond (gchar *tokp, WeatherInfo *info)</td></tr>
+<tr class="codeline" data-linenumber="275"><td class="num" id="LN275">275</td><td class="line">{</td></tr>
+<tr class="codeline" data-linenumber="276"><td class="num" id="LN276">276</td><td class="line"> gchar squal[3], sphen[4];</td></tr>
+<tr class="codeline" data-linenumber="277"><td class="num" id="LN277">277</td><td class="line"> gchar *pphen;</td></tr>
+<tr class="codeline" data-linenumber="278"><td class="num" id="LN278">278</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="279"><td class="num" id="LN279">279</td><td class="line"> <span class='keyword'>if</span> ((strlen (tokp) &gt; 3) &amp;&amp; ((*tokp == '+') || (*tokp == '-')))</td></tr>
+<tr class="codeline" data-linenumber="280"><td class="num" id="LN280">280</td><td class="line"> ++tokp; <span class='comment'>/* FIX */</span></td></tr>
+<tr class="codeline" data-linenumber="281"><td class="num" id="LN281">281</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="282"><td class="num" id="LN282">282</td><td class="line"> <span class='keyword'>if</span> ((*tokp == '+') || (*tokp == '-'))</td></tr>
+<tr class="codeline" data-linenumber="283"><td class="num" id="LN283">283</td><td class="line"> pphen = tokp + 1;</td></tr>
+<tr class="codeline" data-linenumber="284"><td class="num" id="LN284">284</td><td class="line"> <span class='keyword'>else</span> <span class='keyword'>if</span> (strlen (tokp) &lt; 4)</td></tr>
+<tr class="codeline" data-linenumber="285"><td class="num" id="LN285">285</td><td class="line"> pphen = tokp;</td></tr>
+<tr class="codeline" data-linenumber="286"><td class="num" id="LN286">286</td><td class="line"> <span class='keyword'>else</span></td></tr>
+<tr class="codeline" data-linenumber="287"><td class="num" id="LN287">287</td><td class="line"> pphen = tokp + 2;</td></tr>
+<tr class="codeline" data-linenumber="288"><td class="num" id="LN288">288</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="289"><td class="num" id="LN289">289</td><td class="line"> memset (squal, 0, <span class='keyword'>sizeof</span> (squal));</td></tr>
+<tr class="codeline" data-linenumber="290"><td class="num" id="LN290">290</td><td class="line"> strncpy (squal, tokp, pphen - tokp);</td></tr>
+<tr class="codeline" data-linenumber="291"><td class="num" id="LN291">291</td><td class="line"> squal[pphen - tokp] = 0;</td></tr>
+<tr class="codeline" data-linenumber="292"><td class="num" id="LN292">292</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="293"><td class="num" id="LN293">293</td><td class="line"> memset (sphen, 0, <span class='keyword'>sizeof</span> (sphen));</td></tr>
+<tr class="codeline" data-linenumber="294"><td class="num" id="LN294">294</td><td class="line"> strncpy (sphen, pphen, <span class='keyword'>sizeof</span> (sphen));</td></tr>
+<tr class="codeline" data-linenumber="295"><td class="num" id="LN295">295</td><td class="line"> sphen[<span class='keyword'>sizeof</span> (sphen)-1] = '\0';</td></tr>
+<tr class="codeline" data-linenumber="296"><td class="num" id="LN296">296</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="297"><td class="num" id="LN297">297</td><td class="line"> <span class='comment'>/* Defaults */</span></td></tr>
+<tr class="codeline" data-linenumber="298"><td class="num" id="LN298">298</td><td class="line"> info-&gt;cond.qualifier = QUALIFIER_NONE;</td></tr>
+<tr class="codeline" data-linenumber="299"><td class="num" id="LN299">299</td><td class="line"> info-&gt;cond.phenomenon = PHENOMENON_NONE;</td></tr>
+<tr class="codeline" data-linenumber="300"><td class="num" id="LN300">300</td><td class="line"> info-&gt;cond.significant = <span class='macro'>FALSE<span class='macro_popup'>(0)</span></span>;</td></tr>
+<tr class="codeline" data-linenumber="301"><td class="num" id="LN301">301</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="302"><td class="num" id="LN302">302</td><td class="line"> <span class='keyword'>if</span> (!strcmp (squal, <span class='string_literal'>""</span>)) {</td></tr>
+<tr class="codeline" data-linenumber="303"><td class="num" id="LN303">303</td><td class="line"> info-&gt;cond.qualifier = QUALIFIER_MODERATE;</td></tr>
+<tr class="codeline" data-linenumber="304"><td class="num" id="LN304">304</td><td class="line"> } <span class='keyword'>else</span> <span class='keyword'>if</span> (!strcmp (squal, <span class='string_literal'>"-"</span>)) {</td></tr>
+<tr class="codeline" data-linenumber="305"><td class="num" id="LN305">305</td><td class="line"> info-&gt;cond.qualifier = QUALIFIER_LIGHT;</td></tr>
+<tr class="codeline" data-linenumber="306"><td class="num" id="LN306">306</td><td class="line"> } <span class='keyword'>else</span> <span class='keyword'>if</span> (!strcmp (squal, <span class='string_literal'>"+"</span>)) {</td></tr>
+<tr class="codeline" data-linenumber="307"><td class="num" id="LN307">307</td><td class="line"> info-&gt;cond.qualifier = QUALIFIER_HEAVY;</td></tr>
+<tr class="codeline" data-linenumber="308"><td class="num" id="LN308">308</td><td class="line"> } <span class='keyword'>else</span> <span class='keyword'>if</span> (!strcmp (squal, <span class='string_literal'>"VC"</span>)) {</td></tr>
+<tr class="codeline" data-linenumber="309"><td class="num" id="LN309">309</td><td class="line"> info-&gt;cond.qualifier = QUALIFIER_VICINITY;</td></tr>
+<tr class="codeline" data-linenumber="310"><td class="num" id="LN310">310</td><td class="line"> } <span class='keyword'>else</span> <span class='keyword'>if</span> (!strcmp (squal, <span class='string_literal'>"MI"</span>)) {</td></tr>
+<tr class="codeline" data-linenumber="311"><td class="num" id="LN311">311</td><td class="line"> info-&gt;cond.qualifier = QUALIFIER_SHALLOW;</td></tr>
+<tr class="codeline" data-linenumber="312"><td class="num" id="LN312">312</td><td class="line"> } <span class='keyword'>else</span> <span class='keyword'>if</span> (!strcmp (squal, <span class='string_literal'>"BC"</span>)) {</td></tr>
+<tr class="codeline" data-linenumber="313"><td class="num" id="LN313">313</td><td class="line"> info-&gt;cond.qualifier = QUALIFIER_PATCHES;</td></tr>
+<tr class="codeline" data-linenumber="314"><td class="num" id="LN314">314</td><td class="line"> } <span class='keyword'>else</span> <span class='keyword'>if</span> (!strcmp (squal, <span class='string_literal'>"PR"</span>)) {</td></tr>
+<tr class="codeline" data-linenumber="315"><td class="num" id="LN315">315</td><td class="line"> info-&gt;cond.qualifier = QUALIFIER_PARTIAL;</td></tr>
+<tr class="codeline" data-linenumber="316"><td class="num" id="LN316">316</td><td class="line"> } <span class='keyword'>else</span> <span class='keyword'>if</span> (!strcmp (squal, <span class='string_literal'>"TS"</span>)) {</td></tr>
+<tr class="codeline" data-linenumber="317"><td class="num" id="LN317">317</td><td class="line"> info-&gt;cond.qualifier = QUALIFIER_THUNDERSTORM;</td></tr>
+<tr class="codeline" data-linenumber="318"><td class="num" id="LN318">318</td><td class="line"> } <span class='keyword'>else</span> <span class='keyword'>if</span> (!strcmp (squal, <span class='string_literal'>"BL"</span>)) {</td></tr>
+<tr class="codeline" data-linenumber="319"><td class="num" id="LN319">319</td><td class="line"> info-&gt;cond.qualifier = QUALIFIER_BLOWING;</td></tr>
+<tr class="codeline" data-linenumber="320"><td class="num" id="LN320">320</td><td class="line"> } <span class='keyword'>else</span> <span class='keyword'>if</span> (!strcmp (squal, <span class='string_literal'>"SH"</span>)) {</td></tr>
+<tr class="codeline" data-linenumber="321"><td class="num" id="LN321">321</td><td class="line"> info-&gt;cond.qualifier = QUALIFIER_SHOWERS;</td></tr>
+<tr class="codeline" data-linenumber="322"><td class="num" id="LN322">322</td><td class="line"> } <span class='keyword'>else</span> <span class='keyword'>if</span> (!strcmp (squal, <span class='string_literal'>"DR"</span>)) {</td></tr>
+<tr class="codeline" data-linenumber="323"><td class="num" id="LN323">323</td><td class="line"> info-&gt;cond.qualifier = QUALIFIER_DRIFTING;</td></tr>
+<tr class="codeline" data-linenumber="324"><td class="num" id="LN324">324</td><td class="line"> } <span class='keyword'>else</span> <span class='keyword'>if</span> (!strcmp (squal, <span class='string_literal'>"FZ"</span>)) {</td></tr>
+<tr class="codeline" data-linenumber="325"><td class="num" id="LN325">325</td><td class="line"> info-&gt;cond.qualifier = QUALIFIER_FREEZING;</td></tr>
+<tr class="codeline" data-linenumber="326"><td class="num" id="LN326">326</td><td class="line"> } <span class='keyword'>else</span> {</td></tr>
+<tr class="codeline" data-linenumber="327"><td class="num" id="LN327">327</td><td class="line"> <span class='keyword'>return</span>;</td></tr>
+<tr class="codeline" data-linenumber="328"><td class="num" id="LN328">328</td><td class="line"> }</td></tr>
+<tr class="codeline" data-linenumber="329"><td class="num" id="LN329">329</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="330"><td class="num" id="LN330">330</td><td class="line"> <span class='keyword'>if</span> (!strcmp (sphen, <span class='string_literal'>"DZ"</span>)) {</td></tr>
+<tr class="codeline" data-linenumber="331"><td class="num" id="LN331">331</td><td class="line"> info-&gt;cond.phenomenon = PHENOMENON_DRIZZLE;</td></tr>
+<tr class="codeline" data-linenumber="332"><td class="num" id="LN332">332</td><td class="line"> } <span class='keyword'>else</span> <span class='keyword'>if</span> (!strcmp (sphen, <span class='string_literal'>"RA"</span>)) {</td></tr>
+<tr class="codeline" data-linenumber="333"><td class="num" id="LN333">333</td><td class="line"> info-&gt;cond.phenomenon = PHENOMENON_RAIN;</td></tr>
+<tr class="codeline" data-linenumber="334"><td class="num" id="LN334">334</td><td class="line"> } <span class='keyword'>else</span> <span class='keyword'>if</span> (!strcmp (sphen, <span class='string_literal'>"SN"</span>)) {</td></tr>
+<tr class="codeline" data-linenumber="335"><td class="num" id="LN335">335</td><td class="line"> info-&gt;cond.phenomenon = PHENOMENON_SNOW;</td></tr>
+<tr class="codeline" data-linenumber="336"><td class="num" id="LN336">336</td><td class="line"> } <span class='keyword'>else</span> <span class='keyword'>if</span> (!strcmp (sphen, <span class='string_literal'>"SG"</span>)) {</td></tr>
+<tr class="codeline" data-linenumber="337"><td class="num" id="LN337">337</td><td class="line"> info-&gt;cond.phenomenon = PHENOMENON_SNOW_GRAINS;</td></tr>
+<tr class="codeline" data-linenumber="338"><td class="num" id="LN338">338</td><td class="line"> } <span class='keyword'>else</span> <span class='keyword'>if</span> (!strcmp (sphen, <span class='string_literal'>"IC"</span>)) {</td></tr>
+<tr class="codeline" data-linenumber="339"><td class="num" id="LN339">339</td><td class="line"> info-&gt;cond.phenomenon = PHENOMENON_ICE_CRYSTALS;</td></tr>
+<tr class="codeline" data-linenumber="340"><td class="num" id="LN340">340</td><td class="line"> } <span class='keyword'>else</span> <span class='keyword'>if</span> (!strcmp (sphen, <span class='string_literal'>"PE"</span>)) {</td></tr>
+<tr class="codeline" data-linenumber="341"><td class="num" id="LN341">341</td><td class="line"> info-&gt;cond.phenomenon = PHENOMENON_ICE_PELLETS;</td></tr>
+<tr class="codeline" data-linenumber="342"><td class="num" id="LN342">342</td><td class="line"> } <span class='keyword'>else</span> <span class='keyword'>if</span> (!strcmp (sphen, <span class='string_literal'>"GR"</span>)) {</td></tr>
+<tr class="codeline" data-linenumber="343"><td class="num" id="LN343">343</td><td class="line"> info-&gt;cond.phenomenon = PHENOMENON_HAIL;</td></tr>
+<tr class="codeline" data-linenumber="344"><td class="num" id="LN344">344</td><td class="line"> } <span class='keyword'>else</span> <span class='keyword'>if</span> (!strcmp (sphen, <span class='string_literal'>"GS"</span>)) {</td></tr>
+<tr class="codeline" data-linenumber="345"><td class="num" id="LN345">345</td><td class="line"> info-&gt;cond.phenomenon = PHENOMENON_SMALL_HAIL;</td></tr>
+<tr class="codeline" data-linenumber="346"><td class="num" id="LN346">346</td><td class="line"> } <span class='keyword'>else</span> <span class='keyword'>if</span> (!strcmp (sphen, <span class='string_literal'>"UP"</span>)) {</td></tr>
+<tr class="codeline" data-linenumber="347"><td class="num" id="LN347">347</td><td class="line"> info-&gt;cond.phenomenon = PHENOMENON_UNKNOWN_PRECIPITATION;</td></tr>
+<tr class="codeline" data-linenumber="348"><td class="num" id="LN348">348</td><td class="line"> } <span class='keyword'>else</span> <span class='keyword'>if</span> (!strcmp (sphen, <span class='string_literal'>"BR"</span>)) {</td></tr>
+<tr class="codeline" data-linenumber="349"><td class="num" id="LN349">349</td><td class="line"> info-&gt;cond.phenomenon = PHENOMENON_MIST;</td></tr>
+<tr class="codeline" data-linenumber="350"><td class="num" id="LN350">350</td><td class="line"> } <span class='keyword'>else</span> <span class='keyword'>if</span> (!strcmp (sphen, <span class='string_literal'>"FG"</span>)) {</td></tr>
+<tr class="codeline" data-linenumber="351"><td class="num" id="LN351">351</td><td class="line"> info-&gt;cond.phenomenon = PHENOMENON_FOG;</td></tr>
+<tr class="codeline" data-linenumber="352"><td class="num" id="LN352">352</td><td class="line"> } <span class='keyword'>else</span> <span class='keyword'>if</span> (!strcmp (sphen, <span class='string_literal'>"FU"</span>)) {</td></tr>
+<tr class="codeline" data-linenumber="353"><td class="num" id="LN353">353</td><td class="line"> info-&gt;cond.phenomenon = PHENOMENON_SMOKE;</td></tr>
+<tr class="codeline" data-linenumber="354"><td class="num" id="LN354">354</td><td class="line"> } <span class='keyword'>else</span> <span class='keyword'>if</span> (!strcmp (sphen, <span class='string_literal'>"VA"</span>)) {</td></tr>
+<tr class="codeline" data-linenumber="355"><td class="num" id="LN355">355</td><td class="line"> info-&gt;cond.phenomenon = PHENOMENON_VOLCANIC_ASH;</td></tr>
+<tr class="codeline" data-linenumber="356"><td class="num" id="LN356">356</td><td class="line"> } <span class='keyword'>else</span> <span class='keyword'>if</span> (!strcmp (sphen, <span class='string_literal'>"SA"</span>)) {</td></tr>
+<tr class="codeline" data-linenumber="357"><td class="num" id="LN357">357</td><td class="line"> info-&gt;cond.phenomenon = PHENOMENON_SAND;</td></tr>
+<tr class="codeline" data-linenumber="358"><td class="num" id="LN358">358</td><td class="line"> } <span class='keyword'>else</span> <span class='keyword'>if</span> (!strcmp (sphen, <span class='string_literal'>"HZ"</span>)) {</td></tr>
+<tr class="codeline" data-linenumber="359"><td class="num" id="LN359">359</td><td class="line"> info-&gt;cond.phenomenon = PHENOMENON_HAZE;</td></tr>
+<tr class="codeline" data-linenumber="360"><td class="num" id="LN360">360</td><td class="line"> } <span class='keyword'>else</span> <span class='keyword'>if</span> (!strcmp (sphen, <span class='string_literal'>"PY"</span>)) {</td></tr>
+<tr class="codeline" data-linenumber="361"><td class="num" id="LN361">361</td><td class="line"> info-&gt;cond.phenomenon = PHENOMENON_SPRAY;</td></tr>
+<tr class="codeline" data-linenumber="362"><td class="num" id="LN362">362</td><td class="line"> } <span class='keyword'>else</span> <span class='keyword'>if</span> (!strcmp (sphen, <span class='string_literal'>"DU"</span>)) {</td></tr>
+<tr class="codeline" data-linenumber="363"><td class="num" id="LN363">363</td><td class="line"> info-&gt;cond.phenomenon = PHENOMENON_DUST;</td></tr>
+<tr class="codeline" data-linenumber="364"><td class="num" id="LN364">364</td><td class="line"> } <span class='keyword'>else</span> <span class='keyword'>if</span> (!strcmp (sphen, <span class='string_literal'>"SQ"</span>)) {</td></tr>
+<tr class="codeline" data-linenumber="365"><td class="num" id="LN365">365</td><td class="line"> info-&gt;cond.phenomenon = PHENOMENON_SQUALL;</td></tr>
+<tr class="codeline" data-linenumber="366"><td class="num" id="LN366">366</td><td class="line"> } <span class='keyword'>else</span> <span class='keyword'>if</span> (!strcmp (sphen, <span class='string_literal'>"SS"</span>)) {</td></tr>
+<tr class="codeline" data-linenumber="367"><td class="num" id="LN367">367</td><td class="line"> info-&gt;cond.phenomenon = PHENOMENON_SANDSTORM;</td></tr>
+<tr class="codeline" data-linenumber="368"><td class="num" id="LN368">368</td><td class="line"> } <span class='keyword'>else</span> <span class='keyword'>if</span> (!strcmp (sphen, <span class='string_literal'>"DS"</span>)) {</td></tr>
+<tr class="codeline" data-linenumber="369"><td class="num" id="LN369">369</td><td class="line"> info-&gt;cond.phenomenon = PHENOMENON_DUSTSTORM;</td></tr>
+<tr class="codeline" data-linenumber="370"><td class="num" id="LN370">370</td><td class="line"> } <span class='keyword'>else</span> <span class='keyword'>if</span> (!strcmp (sphen, <span class='string_literal'>"PO"</span>)) {</td></tr>
+<tr class="codeline" data-linenumber="371"><td class="num" id="LN371">371</td><td class="line"> info-&gt;cond.phenomenon = PHENOMENON_DUST_WHIRLS;</td></tr>
+<tr class="codeline" data-linenumber="372"><td class="num" id="LN372">372</td><td class="line"> } <span class='keyword'>else</span> <span class='keyword'>if</span> (!strcmp (sphen, <span class='string_literal'>"+FC"</span>)) {</td></tr>
+<tr class="codeline" data-linenumber="373"><td class="num" id="LN373">373</td><td class="line"> info-&gt;cond.phenomenon = PHENOMENON_TORNADO;</td></tr>
+<tr class="codeline" data-linenumber="374"><td class="num" id="LN374">374</td><td class="line"> } <span class='keyword'>else</span> <span class='keyword'>if</span> (!strcmp (sphen, <span class='string_literal'>"FC"</span>)) {</td></tr>
+<tr class="codeline" data-linenumber="375"><td class="num" id="LN375">375</td><td class="line"> info-&gt;cond.phenomenon = PHENOMENON_FUNNEL_CLOUD;</td></tr>
+<tr class="codeline" data-linenumber="376"><td class="num" id="LN376">376</td><td class="line"> } <span class='keyword'>else</span> {</td></tr>
+<tr class="codeline" data-linenumber="377"><td class="num" id="LN377">377</td><td class="line"> <span class='keyword'>return</span>;</td></tr>
+<tr class="codeline" data-linenumber="378"><td class="num" id="LN378">378</td><td class="line"> }</td></tr>
+<tr class="codeline" data-linenumber="379"><td class="num" id="LN379">379</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="380"><td class="num" id="LN380">380</td><td class="line"> <span class='keyword'>if</span> ((info-&gt;cond.qualifier != QUALIFIER_NONE) || (info-&gt;cond.phenomenon != PHENOMENON_NONE))</td></tr>
+<tr class="codeline" data-linenumber="381"><td class="num" id="LN381">381</td><td class="line"> info-&gt;cond.significant = <span class='macro'>TRUE<span class='macro_popup'>(!(0))</span></span>;</td></tr>
+<tr class="codeline" data-linenumber="382"><td class="num" id="LN382">382</td><td class="line">}</td></tr>
+<tr class="codeline" data-linenumber="383"><td class="num" id="LN383">383</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="384"><td class="num" id="LN384">384</td><td class="line"><span class='directive'>#define <span class='macro'>TIME_RE_STR<span class='macro_popup'>"([0-9]{6})Z"</span></span> "([0-9]{6})Z"</span></td></tr>
+<tr class="codeline" data-linenumber="385"><td class="num" id="LN385">385</td><td class="line"><span class='directive'>#define <span class='macro'>WIND_RE_STR<span class='macro_popup'>"(([0-9]{3})|VRB)([0-9]?[0-9]{2})(G[0-9]?[0-9]{2})?(KT|MPS)"</span></span> "(([0-9]{3})|VRB)([0-9]?[0-9]{2})(G[0-9]?[0-9]{2})?(KT|MPS)"</span></td></tr>
+<tr class="codeline" data-linenumber="386"><td class="num" id="LN386">386</td><td class="line"><span class='directive'>#define <span class='macro'>VIS_RE_STR<span class='macro_popup'>"((([0-9]?[0-9])|(M?([12] )?([1357]/1?[0-9])))SM)|" "([0-9]{4}(N|NE|E|SE|S|SW|W|NW( [0-9]{4}(N|NE|E|SE|S|SW|W|NW))?)?)|"<br> "CAVOK"</span></span> "((([0-9]?[0-9])|(M?([12] )?([1357]/1?[0-9])))SM)|" \</span></td></tr>
+<tr class="codeline" data-linenumber="387"><td class="num" id="LN387">387</td><td class="line"> <span class='directive'>"([0-9]{4}(N|NE|E|SE|S|SW|W|NW( [0-9]{4}(N|NE|E|SE|S|SW|W|NW))?)?)|" \</span></td></tr>
+<tr class="codeline" data-linenumber="388"><td class="num" id="LN388">388</td><td class="line"> <span class='directive'>"CAVOK"</span></td></tr>
+<tr class="codeline" data-linenumber="389"><td class="num" id="LN389">389</td><td class="line"><span class='directive'>#define <span class='macro'>COND_RE_STR<span class='macro_popup'>"(-|\\+)?(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)"</span></span> "(-|\\+)?(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)"</span></td></tr>
+<tr class="codeline" data-linenumber="390"><td class="num" id="LN390">390</td><td class="line"><span class='directive'>#define <span class='macro'>CLOUD_RE_STR<span class='macro_popup'>"((CLR|BKN|SCT|FEW|OVC|SKC|NSC)([0-9]{3}|///)?(CB|TCU|///)?)"</span></span> "((CLR|BKN|SCT|FEW|OVC|SKC|NSC)([0-9]{3}|///)?(CB|TCU|///)?)"</span></td></tr>
+<tr class="codeline" data-linenumber="391"><td class="num" id="LN391">391</td><td class="line"><span class='directive'>#define <span class='macro'>TEMP_RE_STR<span class='macro_popup'>"(M?[0-9][0-9])/(M?(//|[0-9][0-9])?)"</span></span> "(M?[0-9][0-9])/(M?(//|[0-9][0-9])?)"</span></td></tr>
+<tr class="codeline" data-linenumber="392"><td class="num" id="LN392">392</td><td class="line"><span class='directive'>#define <span class='macro'>PRES_RE_STR<span class='macro_popup'>"(A|Q)([0-9]{4})"</span></span> "(A|Q)([0-9]{4})"</span></td></tr>
+<tr class="codeline" data-linenumber="393"><td class="num" id="LN393">393</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="394"><td class="num" id="LN394">394</td><td class="line"><span class='comment'>/* POSIX regular expressions do not allow us to express "match whole words</span></td></tr>
+<tr class="codeline" data-linenumber="395"><td class="num" id="LN395">395</td><td class="line"> <span class='comment'>* only" in a simple way, so we have to wrap them all into</span></td></tr>
+<tr class="codeline" data-linenumber="396"><td class="num" id="LN396">396</td><td class="line"> <span class='comment'>* (^| )(...regex...)( |$)</span></td></tr>
+<tr class="codeline" data-linenumber="397"><td class="num" id="LN397">397</td><td class="line"> <span class='comment'>*/</span></td></tr>
+<tr class="codeline" data-linenumber="398"><td class="num" id="LN398">398</td><td class="line"><span class='directive'>#define <span class='macro'>RE_PREFIX<span class='macro_popup'>"(^| )("</span></span> "(^| )("</span></td></tr>
+<tr class="codeline" data-linenumber="399"><td class="num" id="LN399">399</td><td class="line"><span class='directive'>#define <span class='macro'>RE_SUFFIX<span class='macro_popup'>")( |$)"</span></span> ")( |$)"</span></td></tr>
+<tr class="codeline" data-linenumber="400"><td class="num" id="LN400">400</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="401"><td class="num" id="LN401">401</td><td class="line"><span class='keyword'>static</span> regex_t metar_re[RE_NUM];</td></tr>
+<tr class="codeline" data-linenumber="402"><td class="num" id="LN402">402</td><td class="line"><span class='keyword'>static</span> <span class='keyword'>void</span> (*metar_f[RE_NUM]) (gchar *tokp, WeatherInfo *info);</td></tr>
+<tr class="codeline" data-linenumber="403"><td class="num" id="LN403">403</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="404"><td class="num" id="LN404">404</td><td class="line"><span class='keyword'>static</span> <span class='keyword'>void</span></td></tr>
+<tr class="codeline" data-linenumber="405"><td class="num" id="LN405">405</td><td class="line">metar_init_re (<span class='keyword'>void</span>)</td></tr>
+<tr class="codeline" data-linenumber="406"><td class="num" id="LN406">406</td><td class="line">{</td></tr>
+<tr class="codeline" data-linenumber="407"><td class="num" id="LN407">407</td><td class="line"> <span class='keyword'>static</span> gboolean initialized = <span class='macro'>FALSE<span class='macro_popup'>(0)</span></span>;</td></tr>
+<tr class="codeline" data-linenumber="408"><td class="num" id="LN408">408</td><td class="line"> <span class='keyword'>if</span> (initialized)</td></tr>
+<tr class="codeline" data-linenumber="409"><td class="num" id="LN409">409</td><td class="line"> <span class='keyword'>return</span>;</td></tr>
+<tr class="codeline" data-linenumber="410"><td class="num" id="LN410">410</td><td class="line"> initialized = <span class='macro'>TRUE<span class='macro_popup'>(!(0))</span></span>;</td></tr>
+<tr class="codeline" data-linenumber="411"><td class="num" id="LN411">411</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="412"><td class="num" id="LN412">412</td><td class="line"> regcomp (&amp;metar_re[TIME_RE], <span class='macro'>RE_PREFIX<span class='macro_popup'>"(^| )("</span></span> <span class='macro'>TIME_RE_STR<span class='macro_popup'>"([0-9]{6})Z"</span></span> <span class='macro'>RE_SUFFIX<span class='macro_popup'>")( |$)"</span></span>, <span class='macro'>REG_EXTENDED<span class='macro_popup'>1</span></span>);</td></tr>
+<tr class="codeline" data-linenumber="413"><td class="num" id="LN413">413</td><td class="line"> regcomp (&amp;metar_re[WIND_RE], <span class='macro'>RE_PREFIX<span class='macro_popup'>"(^| )("</span></span> <span class='macro'>WIND_RE_STR<span class='macro_popup'>"(([0-9]{3})|VRB)([0-9]?[0-9]{2})(G[0-9]?[0-9]{2})?(KT|MPS)"</span></span> <span class='macro'>RE_SUFFIX<span class='macro_popup'>")( |$)"</span></span>, <span class='macro'>REG_EXTENDED<span class='macro_popup'>1</span></span>);</td></tr>
+<tr class="codeline" data-linenumber="414"><td class="num" id="LN414">414</td><td class="line"> regcomp (&amp;metar_re[VIS_RE], <span class='macro'>RE_PREFIX<span class='macro_popup'>"(^| )("</span></span> <span class='macro'>VIS_RE_STR<span class='macro_popup'>"((([0-9]?[0-9])|(M?([12] )?([1357]/1?[0-9])))SM)|" "([0-9]{4}(N|NE|E|SE|S|SW|W|NW( [0-9]{4}(N|NE|E|SE|S|SW|W|NW))?)?)|"<br> "CAVOK"</span></span> <span class='macro'>RE_SUFFIX<span class='macro_popup'>")( |$)"</span></span>, <span class='macro'>REG_EXTENDED<span class='macro_popup'>1</span></span>);</td></tr>
+<tr class="codeline" data-linenumber="415"><td class="num" id="LN415">415</td><td class="line"> regcomp (&amp;metar_re[COND_RE], <span class='macro'>RE_PREFIX<span class='macro_popup'>"(^| )("</span></span> <span class='macro'>COND_RE_STR<span class='macro_popup'>"(-|\\+)?(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)"</span></span> <span class='macro'>RE_SUFFIX<span class='macro_popup'>")( |$)"</span></span>, <span class='macro'>REG_EXTENDED<span class='macro_popup'>1</span></span>);</td></tr>
+<tr class="codeline" data-linenumber="416"><td class="num" id="LN416">416</td><td class="line"> regcomp (&amp;metar_re[CLOUD_RE], <span class='macro'>RE_PREFIX<span class='macro_popup'>"(^| )("</span></span> <span class='macro'>CLOUD_RE_STR<span class='macro_popup'>"((CLR|BKN|SCT|FEW|OVC|SKC|NSC)([0-9]{3}|///)?(CB|TCU|///)?)"</span></span> <span class='macro'>RE_SUFFIX<span class='macro_popup'>")( |$)"</span></span>, <span class='macro'>REG_EXTENDED<span class='macro_popup'>1</span></span>);</td></tr>
+<tr class="codeline" data-linenumber="417"><td class="num" id="LN417">417</td><td class="line"> regcomp (&amp;metar_re[TEMP_RE], <span class='macro'>RE_PREFIX<span class='macro_popup'>"(^| )("</span></span> <span class='macro'>TEMP_RE_STR<span class='macro_popup'>"(M?[0-9][0-9])/(M?(//|[0-9][0-9])?)"</span></span> <span class='macro'>RE_SUFFIX<span class='macro_popup'>")( |$)"</span></span>, <span class='macro'>REG_EXTENDED<span class='macro_popup'>1</span></span>);</td></tr>
+<tr class="codeline" data-linenumber="418"><td class="num" id="LN418">418</td><td class="line"> regcomp (&amp;metar_re[PRES_RE], <span class='macro'>RE_PREFIX<span class='macro_popup'>"(^| )("</span></span> <span class='macro'>PRES_RE_STR<span class='macro_popup'>"(A|Q)([0-9]{4})"</span></span> <span class='macro'>RE_SUFFIX<span class='macro_popup'>")( |$)"</span></span>, <span class='macro'>REG_EXTENDED<span class='macro_popup'>1</span></span>);</td></tr>
+<tr class="codeline" data-linenumber="419"><td class="num" id="LN419">419</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="420"><td class="num" id="LN420">420</td><td class="line"> metar_f[TIME_RE] = metar_tok_time;</td></tr>
+<tr class="codeline" data-linenumber="421"><td class="num" id="LN421">421</td><td class="line"> metar_f[WIND_RE] = metar_tok_wind;</td></tr>
+<tr class="codeline" data-linenumber="422"><td class="num" id="LN422">422</td><td class="line"> metar_f[VIS_RE] = metar_tok_vis;</td></tr>
+<tr class="codeline" data-linenumber="423"><td class="num" id="LN423">423</td><td class="line"> metar_f[COND_RE] = metar_tok_cond;</td></tr>
+<tr class="codeline" data-linenumber="424"><td class="num" id="LN424">424</td><td class="line"> metar_f[CLOUD_RE] = metar_tok_cloud;</td></tr>
+<tr class="codeline" data-linenumber="425"><td class="num" id="LN425">425</td><td class="line"> metar_f[TEMP_RE] = metar_tok_temp;</td></tr>
+<tr class="codeline" data-linenumber="426"><td class="num" id="LN426">426</td><td class="line"> metar_f[PRES_RE] = metar_tok_pres;</td></tr>
+<tr class="codeline" data-linenumber="427"><td class="num" id="LN427">427</td><td class="line">}</td></tr>
+<tr class="codeline" data-linenumber="428"><td class="num" id="LN428">428</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="429"><td class="num" id="LN429">429</td><td class="line">gboolean</td></tr>
+<tr class="codeline" data-linenumber="430"><td class="num" id="LN430">430</td><td class="line">metar_parse (gchar *metar, WeatherInfo *info)</td></tr>
+<tr class="codeline" data-linenumber="431"><td class="num" id="LN431">431</td><td class="line">{</td></tr>
+<tr class="codeline" data-linenumber="432"><td class="num" id="LN432">432</td><td class="line"> gchar *p;</td></tr>
+<tr class="codeline" data-linenumber="433"><td class="num" id="LN433">433</td><td class="line"> <span class='comment'>//gchar *rmk;</span></td></tr>
+<tr class="codeline" data-linenumber="434"><td class="num" id="LN434">434</td><td class="line"> gint i, i2;</td></tr>
+<tr class="codeline" data-linenumber="435"><td class="num" id="LN435">435</td><td class="line"> regmatch_t rm, rm2;</td></tr>
+<tr class="codeline" data-linenumber="436"><td class="num" id="LN436">436</td><td class="line"> gchar *tokp;</td></tr>
+<tr class="codeline" data-linenumber="437"><td class="num" id="LN437">437</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="438"><td class="num" id="LN438">438</td><td class="line"> <span class='macro'>g_return_val_if_fail (info != NULL, FALSE)<span class='macro_popup'>do { if ((__builtin_expect (__extension__ ({ int _g_boolean_var_<br>; if (info != ((void*)0)) _g_boolean_var_ = 1; else _g_boolean_var_<br> = 0; _g_boolean_var_; }), 1))) { } else { g_return_if_fail_warning<br> ("MateWeather", ((const char*) (__func__)), "info != NULL");<br> return ((0)); } } while (0)</span></span>;</td></tr>
+<tr class="codeline" data-linenumber="439"><td class="num" id="LN439">439</td><td class="line"> <span class='macro'>g_return_val_if_fail (metar != NULL, FALSE)<span class='macro_popup'>do { if ((__builtin_expect (__extension__ ({ int _g_boolean_var_<br>; if (metar != ((void*)0)) _g_boolean_var_ = 1; else _g_boolean_var_<br> = 0; _g_boolean_var_; }), 1))) { } else { g_return_if_fail_warning<br> ("MateWeather", ((const char*) (__func__)), "metar != NULL")<br>; return ((0)); } } while (0)</span></span>;</td></tr>
+<tr class="codeline" data-linenumber="440"><td class="num" id="LN440">440</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="441"><td class="num" id="LN441">441</td><td class="line"> metar_init_re ();</td></tr>
+<tr class="codeline" data-linenumber="442"><td class="num" id="LN442">442</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="443"><td class="num" id="LN443">443</td><td class="line"> <span class='comment'>/*</span></td></tr>
+<tr class="codeline" data-linenumber="444"><td class="num" id="LN444">444</td><td class="line"> <span class='comment'>* Force parsing to end at "RMK" field. This prevents a subtle</span></td></tr>
+<tr class="codeline" data-linenumber="445"><td class="num" id="LN445">445</td><td class="line"> <span class='comment'>* problem when info within the remark happens to match an earlier state</span></td></tr>
+<tr class="codeline" data-linenumber="446"><td class="num" id="LN446">446</td><td class="line"> <span class='comment'>* and, as a result, throws off all the remaining expression</span></td></tr>
+<tr class="codeline" data-linenumber="447"><td class="num" id="LN447">447</td><td class="line"> <span class='comment'>*/</span></td></tr>
+<tr class="codeline" data-linenumber="448"><td class="num" id="LN448">448</td><td class="line"> <span class='keyword'>if</span> (0 != (p = strstr (metar, <span class='string_literal'>" RMK "</span>))) {</td></tr>
+<tr class="codeline" data-linenumber="449"><td class="num" id="LN449">449</td><td class="line"> *p = '\0';</td></tr>
+<tr class="codeline" data-linenumber="450"><td class="num" id="LN450">450</td><td class="line"> <span class='comment'>//rmk = p + 5; // uncomment this if RMK data becomes useful</span></td></tr>
+<tr class="codeline" data-linenumber="451"><td class="num" id="LN451">451</td><td class="line"> }</td></tr>
+<tr class="codeline" data-linenumber="452"><td class="num" id="LN452">452</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="453"><td class="num" id="LN453">453</td><td class="line"> p = metar;</td></tr>
+<tr class="codeline" data-linenumber="454"><td class="num" id="LN454">454</td><td class="line"> i = TIME_RE;</td></tr>
+<tr class="codeline" data-linenumber="455"><td class="num" id="LN455">455</td><td class="line"> <span class='keyword'>while</span> (*p) {</td></tr>
+<tr class="codeline" data-linenumber="456"><td class="num" id="LN456">456</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="457"><td class="num" id="LN457">457</td><td class="line"> i2 = RE_NUM;</td></tr>
+<tr class="codeline" data-linenumber="458"><td class="num" id="LN458">458</td><td class="line"> rm2.rm_so = strlen (p);</td></tr>
+<tr class="codeline" data-linenumber="459"><td class="num" id="LN459">459</td><td class="line"> rm2.rm_eo = rm2.rm_so;</td></tr>
+<tr class="codeline" data-linenumber="460"><td class="num" id="LN460">460</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="461"><td class="num" id="LN461">461</td><td class="line"> <span class='keyword'>for</span> (i = 0; i &lt; RE_NUM &amp;&amp; rm2.rm_so &gt; 0; i++) {</td></tr>
+<tr class="codeline" data-linenumber="462"><td class="num" id="LN462">462</td><td class="line"> <span class='keyword'>if</span> (0 == regexec (&amp;metar_re[i], p, 1, &amp;rm, 0)</td></tr>
+<tr class="codeline" data-linenumber="463"><td class="num" id="LN463">463</td><td class="line"> &amp;&amp; rm.rm_so &lt; rm2.rm_so)</td></tr>
+<tr class="codeline" data-linenumber="464"><td class="num" id="LN464">464</td><td class="line"> {</td></tr>
+<tr class="codeline" data-linenumber="465"><td class="num" id="LN465">465</td><td class="line"> i2 = i;</td></tr>
+<tr class="codeline" data-linenumber="466"><td class="num" id="LN466">466</td><td class="line"> <span class='comment'>/* Skip leading and trailing space characters, if present.</span></td></tr>
+<tr class="codeline" data-linenumber="467"><td class="num" id="LN467">467</td><td class="line"> <span class='comment'>(the regular expressions include those characters to</span></td></tr>
+<tr class="codeline" data-linenumber="468"><td class="num" id="LN468">468</td><td class="line"> <span class='comment'>only get matches limited to whole words). */</span></td></tr>
+<tr class="codeline" data-linenumber="469"><td class="num" id="LN469">469</td><td class="line"> <span class='keyword'>if</span> (p[rm.rm_so] == ' ') rm.rm_so++;</td></tr>
+<tr class="codeline" data-linenumber="470"><td class="num" id="LN470">470</td><td class="line"> <span class='keyword'>if</span> (p[rm.rm_eo - 1] == ' ') rm.rm_eo--;</td></tr>
+<tr class="codeline" data-linenumber="471"><td class="num" id="LN471">471</td><td class="line"> rm2.rm_so = rm.rm_so;</td></tr>
+<tr class="codeline" data-linenumber="472"><td class="num" id="LN472">472</td><td class="line"> rm2.rm_eo = rm.rm_eo;</td></tr>
+<tr class="codeline" data-linenumber="473"><td class="num" id="LN473">473</td><td class="line"> }</td></tr>
+<tr class="codeline" data-linenumber="474"><td class="num" id="LN474">474</td><td class="line"> }</td></tr>
+<tr class="codeline" data-linenumber="475"><td class="num" id="LN475">475</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="476"><td class="num" id="LN476">476</td><td class="line"> <span class='keyword'>if</span> (i2 != RE_NUM) {</td></tr>
+<tr class="codeline" data-linenumber="477"><td class="num" id="LN477">477</td><td class="line"> tokp = g_strndup (p + rm2.rm_so, rm2.rm_eo - rm2.rm_so);</td></tr>
+<tr class="codeline" data-linenumber="478"><td class="num" id="LN478">478</td><td class="line"> metar_f[i2] (tokp, info);</td></tr>
+<tr class="codeline" data-linenumber="479"><td class="num" id="LN479">479</td><td class="line"> g_free (tokp);</td></tr>
+<tr class="codeline" data-linenumber="480"><td class="num" id="LN480">480</td><td class="line"> }</td></tr>
+<tr class="codeline" data-linenumber="481"><td class="num" id="LN481">481</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="482"><td class="num" id="LN482">482</td><td class="line"> p += rm2.rm_eo;</td></tr>
+<tr class="codeline" data-linenumber="483"><td class="num" id="LN483">483</td><td class="line"> p += strspn (p, <span class='string_literal'>" "</span>);</td></tr>
+<tr class="codeline" data-linenumber="484"><td class="num" id="LN484">484</td><td class="line"> }</td></tr>
+<tr class="codeline" data-linenumber="485"><td class="num" id="LN485">485</td><td class="line"> <span class='keyword'>return</span> <span class='macro'>TRUE<span class='macro_popup'>(!(0))</span></span>;</td></tr>
+<tr class="codeline" data-linenumber="486"><td class="num" id="LN486">486</td><td class="line">}</td></tr>
+<tr class="codeline" data-linenumber="487"><td class="num" id="LN487">487</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="488"><td class="num" id="LN488">488</td><td class="line"><span class='keyword'>static</span> <span class='keyword'>void</span></td></tr>
+<tr class="codeline" data-linenumber="489"><td class="num" id="LN489">489</td><td class="line">metar_finish (SoupSession *session, SoupMessage *msg, gpointer data)</td></tr>
+<tr class="codeline" data-linenumber="490"><td class="num" id="LN490">490</td><td class="line">{</td></tr>
+<tr class="codeline" data-linenumber="491"><td class="num" id="LN491">491</td><td class="line"> WeatherInfo *info = (WeatherInfo *)data;</td></tr>
+<tr class="codeline" data-linenumber="492"><td class="num" id="LN492">492</td><td class="line"> WeatherLocation *loc;</td></tr>
+<tr class="codeline" data-linenumber="493"><td class="num" id="LN493">493</td><td class="line"> <span class='keyword'>const</span> gchar *p, *endtag;</td></tr>
+<tr class="codeline" data-linenumber="494"><td class="num" id="LN494">494</td><td class="line"> gchar *searchkey, *metar;</td></tr>
+<tr class="codeline" data-linenumber="495"><td class="num" id="LN495">495</td><td class="line"> gboolean success = <span class='macro'>FALSE<span class='macro_popup'>(0)</span></span>;</td></tr>
+<tr class="codeline" data-linenumber="496"><td class="num" id="LN496">496</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="497"><td class="num" id="LN497">497</td><td class="line"> <span class='macro'>g_return_if_fail (info != NULL)<span class='macro_popup'>do { if ((__builtin_expect (__extension__ ({ int _g_boolean_var_<br>; if (info != ((void*)0)) _g_boolean_var_ = 1; else _g_boolean_var_<br> = 0; _g_boolean_var_; }), 1))) { } else { g_return_if_fail_warning<br> ("MateWeather", ((const char*) (__func__)), "info != NULL");<br> return; } } while (0)</span></span>;</td></tr>
+<tr class="codeline" data-linenumber="498"><td class="num" id="LN498">498</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="499"><td class="num" id="LN499">499</td><td class="line"> <span class='keyword'>if</span> (!<span class='macro'>SOUP_STATUS_IS_SUCCESSFUL (msg-&gt;status_code)<span class='macro_popup'>((msg-&gt;status_code) &gt;= 200 &amp;&amp; (msg-&gt;status_code<br>) &lt; 300)</span></span>) {</td></tr>
+<tr class="codeline" data-linenumber="500"><td class="num" id="LN500">500</td><td class="line"> <span class='keyword'>if</span> (<span class='macro'>SOUP_STATUS_IS_TRANSPORT_ERROR (msg-&gt;status_code)<span class='macro_popup'>((msg-&gt;status_code) &gt; 0 &amp;&amp; (msg-&gt;status_code<br>) &lt; 100)</span></span>)</td></tr>
+<tr class="codeline" data-linenumber="501"><td class="num" id="LN501">501</td><td class="line"> info-&gt;network_error = <span class='macro'>TRUE<span class='macro_popup'>(!(0))</span></span>;</td></tr>
+<tr class="codeline" data-linenumber="502"><td class="num" id="LN502">502</td><td class="line"> <span class='keyword'>else</span> {</td></tr>
+<tr class="codeline" data-linenumber="503"><td class="num" id="LN503">503</td><td class="line"> <span class='comment'>/* Translators: %d is an error code, and %s the error string */</span></td></tr>
+<tr class="codeline" data-linenumber="504"><td class="num" id="LN504">504</td><td class="line"> g_warning (<span class='macro'>_(<span class='string_literal'>"Failed to get METAR data: %d %s.\n"</span>)<span class='macro_popup'>(mateweather_gettext ("Failed to get METAR data: %d %s.\n"))</span></span>,</td></tr>
+<tr class="codeline" data-linenumber="505"><td class="num" id="LN505">505</td><td class="line"> msg-&gt;status_code, msg-&gt;reason_phrase);</td></tr>
+<tr class="codeline" data-linenumber="506"><td class="num" id="LN506">506</td><td class="line"> }</td></tr>
+<tr class="codeline" data-linenumber="507"><td class="num" id="LN507">507</td><td class="line"> request_done (info, <span class='macro'>FALSE<span class='macro_popup'>(0)</span></span>);</td></tr>
+<tr class="codeline" data-linenumber="508"><td class="num" id="LN508">508</td><td class="line"> <span class='keyword'>return</span>;</td></tr>
+<tr class="codeline" data-linenumber="509"><td class="num" id="LN509">509</td><td class="line"> }</td></tr>
+<tr class="codeline" data-linenumber="510"><td class="num" id="LN510">510</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="511"><td class="num" id="LN511">511</td><td class="line"> loc = info-&gt;location;</td></tr>
+<tr class="codeline" data-linenumber="512"><td class="num" id="LN512">512</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="513"><td class="num" id="LN513">513</td><td class="line"> searchkey = g_strdup_printf (<span class='string_literal'>"&lt;raw_text&gt;%s"</span>, loc-&gt;code);</td></tr>
+<tr class="codeline" data-linenumber="514"><td class="num" id="LN514">514</td><td class="line"> p = strstr (msg-&gt;response_body-&gt;data, searchkey);</td></tr>
+<tr class="codeline" data-linenumber="515"><td class="num" id="LN515">515</td><td class="line"> g_free (searchkey);</td></tr>
+<tr class="codeline" data-linenumber="516"><td class="num" id="LN516">516</td><td class="line"> <span class='keyword'>if</span> (p) {</td></tr>
+<tr class="codeline" data-linenumber="517"><td class="num" id="LN517">517</td><td class="line"> p += <span class='macro'>WEATHER_LOCATION_CODE_LEN<span class='macro_popup'>4</span></span> + 11;</td></tr>
+<tr class="codeline" data-linenumber="518"><td class="num" id="LN518">518</td><td class="line"> endtag = strstr (p, <span class='string_literal'>"&lt;/raw_text&gt;"</span>);</td></tr>
+<tr class="codeline" data-linenumber="519"><td class="num" id="LN519">519</td><td class="line"> <span class='keyword'>if</span> (endtag)</td></tr>
+<tr class="codeline" data-linenumber="520"><td class="num" id="LN520">520</td><td class="line"> metar = g_strndup (p, endtag - p);</td></tr>
+<tr class="codeline" data-linenumber="521"><td class="num" id="LN521">521</td><td class="line"> <span class='keyword'>else</span></td></tr>
+<tr class="codeline" data-linenumber="522"><td class="num" id="LN522">522</td><td class="line"> metar = g_strdup (p);</td></tr>
+<tr class="codeline" data-linenumber="523"><td class="num" id="LN523">523</td><td class="line"> success = metar_parse (metar, info);</td></tr>
+<tr class="codeline" data-linenumber="524"><td class="num" id="LN524">524</td><td class="line"> g_free (metar);</td></tr>
+<tr class="codeline" data-linenumber="525"><td class="num" id="LN525">525</td><td class="line"> } <span class='keyword'>else</span> <span class='keyword'>if</span> (!strstr (msg-&gt;response_body-&gt;data, <span class='string_literal'>"aviationweather.gov"</span>)) {</td></tr>
+<tr class="codeline" data-linenumber="526"><td class="num" id="LN526">526</td><td class="line"> <span class='comment'>/* The response doesn't even seem to have come from NOAA...</span></td></tr>
+<tr class="codeline" data-linenumber="527"><td class="num" id="LN527">527</td><td class="line"> <span class='comment'>* most likely it is a wifi hotspot login page. Call that a</span></td></tr>
+<tr class="codeline" data-linenumber="528"><td class="num" id="LN528">528</td><td class="line"> <span class='comment'>* network error.</span></td></tr>
+<tr class="codeline" data-linenumber="529"><td class="num" id="LN529">529</td><td class="line"> <span class='comment'>*/</span></td></tr>
+<tr class="codeline" data-linenumber="530"><td class="num" id="LN530">530</td><td class="line"> info-&gt;network_error = <span class='macro'>TRUE<span class='macro_popup'>(!(0))</span></span>;</td></tr>
+<tr class="codeline" data-linenumber="531"><td class="num" id="LN531">531</td><td class="line"> }</td></tr>
+<tr class="codeline" data-linenumber="532"><td class="num" id="LN532">532</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="533"><td class="num" id="LN533">533</td><td class="line"> info-&gt;valid = success;</td></tr>
+<tr class="codeline" data-linenumber="534"><td class="num" id="LN534">534</td><td class="line"> request_done (info, <span class='macro'>TRUE<span class='macro_popup'>(!(0))</span></span>);</td></tr>
+<tr class="codeline" data-linenumber="535"><td class="num" id="LN535">535</td><td class="line">}</td></tr>
+<tr class="codeline" data-linenumber="536"><td class="num" id="LN536">536</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="537"><td class="num" id="LN537">537</td><td class="line"><span class='comment'>/* Read current conditions and fill in info structure */</span></td></tr>
+<tr class="codeline" data-linenumber="538"><td class="num" id="LN538">538</td><td class="line"><span class='keyword'>void</span></td></tr>
+<tr class="codeline" data-linenumber="539"><td class="num" id="LN539">539</td><td class="line">metar_start_open (WeatherInfo *info)</td></tr>
+<tr class="codeline" data-linenumber="540"><td class="num" id="LN540">540</td><td class="line">{</td></tr>
+<tr class="codeline" data-linenumber="541"><td class="num" id="LN541">541</td><td class="line"> WeatherLocation *loc;</td></tr>
+<tr class="codeline" data-linenumber="542"><td class="num" id="LN542">542</td><td class="line"> SoupMessage *msg;</td></tr>
+<tr class="codeline" data-linenumber="543"><td class="num" id="LN543">543</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="544"><td class="num" id="LN544">544</td><td class="line"> <span class='macro'>g_return_if_fail (info != NULL)<span class='macro_popup'>do { if ((__builtin_expect (__extension__ ({ int _g_boolean_var_<br>; if (info != ((void*)0)) _g_boolean_var_ = 1; else _g_boolean_var_<br> = 0; _g_boolean_var_; }), 1))) { } else { g_return_if_fail_warning<br> ("MateWeather", ((const char*) (__func__)), "info != NULL");<br> return; } } while (0)</span></span>;</td></tr>
+<tr class="codeline" data-linenumber="545"><td class="num" id="LN545">545</td><td class="line"> info-&gt;valid = info-&gt;network_error = <span class='macro'>FALSE<span class='macro_popup'>(0)</span></span>;</td></tr>
+<tr class="codeline" data-linenumber="546"><td class="num" id="LN546">546</td><td class="line"> loc = info-&gt;location;</td></tr>
+<tr class="codeline" data-linenumber="547"><td class="num" id="LN547">547</td><td class="line"> <span class='keyword'>if</span> (loc == <span class='macro'>NULL<span class='macro_popup'>((void*)0)</span></span>) {</td></tr>
+<tr class="codeline" data-linenumber="548"><td class="num" id="LN548">548</td><td class="line"> g_warning (<span class='macro'>_(<span class='string_literal'>"WeatherInfo missing location"</span>)<span class='macro_popup'>(mateweather_gettext ("WeatherInfo missing location"))</span></span>);</td></tr>
+<tr class="codeline" data-linenumber="549"><td class="num" id="LN549">549</td><td class="line"> <span class='keyword'>return</span>;</td></tr>
+<tr class="codeline" data-linenumber="550"><td class="num" id="LN550">550</td><td class="line"> }</td></tr>
+<tr class="codeline" data-linenumber="551"><td class="num" id="LN551">551</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="552"><td class="num" id="LN552">552</td><td class="line"> msg = soup_form_request_new (</td></tr>
+<tr class="codeline" data-linenumber="553"><td class="num" id="LN553">553</td><td class="line"> <span class='string_literal'>"GET"</span>, <span class='string_literal'>"https://www.aviationweather.gov/adds/dataserver_current/httpparam"</span>,</td></tr>
+<tr class="codeline" data-linenumber="554"><td class="num" id="LN554">554</td><td class="line"> <span class='string_literal'>"dataSource"</span>, <span class='string_literal'>"metars"</span>,</td></tr>
+<tr class="codeline" data-linenumber="555"><td class="num" id="LN555">555</td><td class="line"> <span class='string_literal'>"requestType"</span>, <span class='string_literal'>"retrieve"</span>,</td></tr>
+<tr class="codeline" data-linenumber="556"><td class="num" id="LN556">556</td><td class="line"> <span class='string_literal'>"format"</span>, <span class='string_literal'>"xml"</span>,</td></tr>
+<tr class="codeline" data-linenumber="557"><td class="num" id="LN557">557</td><td class="line"> <span class='string_literal'>"hoursBeforeNow"</span>, <span class='string_literal'>"3"</span>,</td></tr>
+<tr class="codeline" data-linenumber="558"><td class="num" id="LN558">558</td><td class="line"> <span class='string_literal'>"mostRecent"</span>, <span class='string_literal'>"true"</span>,</td></tr>
+<tr class="codeline" data-linenumber="559"><td class="num" id="LN559">559</td><td class="line"> <span class='string_literal'>"fields"</span>, <span class='string_literal'>"raw_text"</span>,</td></tr>
+<tr class="codeline" data-linenumber="560"><td class="num" id="LN560">560</td><td class="line"> <span class='string_literal'>"stationString"</span>, loc-&gt;code,</td></tr>
+<tr class="codeline" data-linenumber="561"><td class="num" id="LN561">561</td><td class="line"> <span class='macro'>NULL<span class='macro_popup'>((void*)0)</span></span>);</td></tr>
+<tr class="codeline" data-linenumber="562"><td class="num" id="LN562">562</td><td class="line"> soup_session_queue_message (info-&gt;session, msg, metar_finish, info);</td></tr>
+<tr class="codeline" data-linenumber="563"><td class="num" id="LN563">563</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="564"><td class="num" id="LN564">564</td><td class="line"> info-&gt;requests_pending++;</td></tr>
+<tr class="codeline" data-linenumber="565"><td class="num" id="LN565">565</td><td class="line">}</td></tr>
+</table></body></html>
diff --git a/[email protected]_travis-ci/report-8defcd.html b/[email protected]_travis-ci/report-8defcd.html
new file mode 100644
index 0000000..896fd37
--- /dev/null
+++ b/[email protected]_travis-ci/report-8defcd.html
@@ -0,0 +1,700 @@
+<!doctype html>
+<html>
+<head>
+<title>weather-sun.c</title>
+
+<style type="text/css">
+body { color:#000000; background-color:#ffffff }
+body { font-family:Helvetica, sans-serif; font-size:10pt }
+h1 { font-size:14pt }
+.FileName { margin-top: 5px; margin-bottom: 5px; display: inline; }
+.FileNav { margin-left: 5px; margin-right: 5px; display: inline; }
+.FileNav a { text-decoration:none; font-size: larger; }
+.divider { margin-top: 30px; margin-bottom: 30px; height: 15px; }
+.divider { background-color: gray; }
+.code { border-collapse:collapse; width:100%; }
+.code { font-family: "Monospace", monospace; font-size:10pt }
+.code { line-height: 1.2em }
+.comment { color: green; font-style: oblique }
+.keyword { color: blue }
+.string_literal { color: red }
+.directive { color: darkmagenta }
+
+/* Macros and variables could have pop-up notes hidden by default.
+ - Macro pop-up: expansion of the macro
+ - Variable pop-up: value (table) of the variable */
+.macro_popup, .variable_popup { display: none; }
+
+/* Pop-up appears on mouse-hover event. */
+.macro:hover .macro_popup, .variable:hover .variable_popup {
+ display: block;
+ padding: 2px;
+ -webkit-border-radius:5px;
+ -webkit-box-shadow:1px 1px 7px #000;
+ border-radius:5px;
+ box-shadow:1px 1px 7px #000;
+ position: absolute;
+ top: -1em;
+ left:10em;
+ z-index: 1
+}
+
+.macro_popup {
+ border: 2px solid red;
+ background-color:#FFF0F0;
+ font-weight: normal;
+}
+
+.variable_popup {
+ border: 2px solid blue;
+ background-color:#F0F0FF;
+ font-weight: bold;
+ font-family: Helvetica, sans-serif;
+ font-size: 9pt;
+}
+
+/* Pop-up notes needs a relative position as a base where they pops up. */
+.macro, .variable {
+ background-color: PaleGoldenRod;
+ position: relative;
+}
+.macro { color: DarkMagenta; }
+
+#tooltiphint {
+ position: fixed;
+ width: 50em;
+ margin-left: -25em;
+ left: 50%;
+ padding: 10px;
+ border: 1px solid #b0b0b0;
+ border-radius: 2px;
+ box-shadow: 1px 1px 7px black;
+ background-color: #c0c0c0;
+ z-index: 2;
+}
+
+.num { width:2.5em; padding-right:2ex; background-color:#eeeeee }
+.num { text-align:right; font-size:8pt }
+.num { color:#444444 }
+.line { padding-left: 1ex; border-left: 3px solid #ccc }
+.line { white-space: pre }
+.msg { -webkit-box-shadow:1px 1px 7px #000 }
+.msg { box-shadow:1px 1px 7px #000 }
+.msg { -webkit-border-radius:5px }
+.msg { border-radius:5px }
+.msg { font-family:Helvetica, sans-serif; font-size:8pt }
+.msg { float:left }
+.msg { padding:0.25em 1ex 0.25em 1ex }
+.msg { margin-top:10px; margin-bottom:10px }
+.msg { font-weight:bold }
+.msg { max-width:60em; word-wrap: break-word; white-space: pre-wrap }
+.msgT { padding:0x; spacing:0x }
+.msgEvent { background-color:#fff8b4; color:#000000 }
+.msgControl { background-color:#bbbbbb; color:#000000 }
+.msgNote { background-color:#ddeeff; color:#000000 }
+.mrange { background-color:#dfddf3 }
+.mrange { border-bottom:1px solid #6F9DBE }
+.PathIndex { font-weight: bold; padding:0px 5px; margin-right:5px; }
+.PathIndex { -webkit-border-radius:8px }
+.PathIndex { border-radius:8px }
+.PathIndexEvent { background-color:#bfba87 }
+.PathIndexControl { background-color:#8c8c8c }
+.PathIndexPopUp { background-color: #879abc; }
+.PathNav a { text-decoration:none; font-size: larger }
+.CodeInsertionHint { font-weight: bold; background-color: #10dd10 }
+.CodeRemovalHint { background-color:#de1010 }
+.CodeRemovalHint { border-bottom:1px solid #6F9DBE }
+.selected{ background-color:orange !important; }
+
+table.simpletable {
+ padding: 5px;
+ font-size:12pt;
+ margin:20px;
+ border-collapse: collapse; border-spacing: 0px;
+}
+td.rowname {
+ text-align: right;
+ vertical-align: top;
+ font-weight: bold;
+ color:#444444;
+ padding-right:2ex;
+}
+
+/* Hidden text. */
+input.spoilerhider + label {
+ cursor: pointer;
+ text-decoration: underline;
+ display: block;
+}
+input.spoilerhider {
+ display: none;
+}
+input.spoilerhider ~ .spoiler {
+ overflow: hidden;
+ margin: 10px auto 0;
+ height: 0;
+ opacity: 0;
+}
+input.spoilerhider:checked + label + .spoiler{
+ height: auto;
+ opacity: 1;
+}
+</style>
+</head>
+<body>
+<!-- BUGDESC This statement is never executed -->
+
+<!-- BUGTYPE Unreachable code -->
+
+<!-- BUGCATEGORY Dead code -->
+
+<!-- BUGFILE /rootdir/libmateweather/weather-sun.c -->
+
+<!-- FILENAME weather-sun.c -->
+
+<!-- FUNCTIONNAME weather_info_next_sun_event -->
+
+<!-- ISSUEHASHCONTENTOFLINEINCONTEXT 688a74542b41bc03a5c20d15119e753c -->
+
+<!-- BUGLINE 339 -->
+
+<!-- BUGCOLUMN 12 -->
+
+<!-- BUGPATHLENGTH 1 -->
+
+<!-- BUGMETAEND -->
+<!-- REPORTHEADER -->
+<h3>Bug Summary</h3>
+<table class="simpletable">
+<tr><td class="rowname">File:</td><td>weather-sun.c</td></tr>
+<tr><td class="rowname">Warning:</td><td><a href="#EndPath">line 339, column 12</a><br />This statement is never executed</td></tr>
+
+</table>
+<!-- REPORTSUMMARYEXTRA -->
+<h3>Annotated Source Code</h3>
+<p>Press <a href="#" onclick="toggleHelp(); return false;">'?'</a>
+ to see keyboard shortcuts</p>
+<input type="checkbox" class="spoilerhider" id="showinvocation" />
+<label for="showinvocation" >Show analyzer invocation</label>
+<div class="spoiler">clang -cc1 -triple x86_64-unknown-linux-gnu -analyze -disable-free -disable-llvm-verifier -discard-value-names -main-file-name weather-sun.c -analyzer-store=region -analyzer-opt-analyze-nested-blocks -analyzer-checker=core -analyzer-checker=apiModeling -analyzer-checker=unix -analyzer-checker=deadcode -analyzer-checker=security.insecureAPI.UncheckedReturn -analyzer-checker=security.insecureAPI.getpw -analyzer-checker=security.insecureAPI.gets -analyzer-checker=security.insecureAPI.mktemp -analyzer-checker=security.insecureAPI.mkstemp -analyzer-checker=security.insecureAPI.vfork -analyzer-checker=nullability.NullPassedToNonnull -analyzer-checker=nullability.NullReturnedFromNonnull -analyzer-output plist -w -mrelocation-model pic -pic-level 2 -mthread-model posix -fmath-errno -masm-verbose -mconstructor-aliases -munwind-tables -fuse-init-array -target-cpu x86-64 -dwarf-column-info -debugger-tuning=gdb -momit-leaf-frame-pointer -resource-dir /usr/lib64/clang/9.0.1 -D HAVE_CONFIG_H -I . -I .. -I /usr/include/gtk-3.0 -I /usr/include/pango-1.0 -I /usr/include/glib-2.0 -I /usr/lib64/glib-2.0/include -I /usr/include/harfbuzz -I /usr/include/fribidi -I /usr/include/freetype2 -I /usr/include/libpng16 -I /usr/include/cairo -I /usr/include/pixman-1 -I /usr/include/gdk-pixbuf-2.0 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/gio-unix-2.0 -I /usr/include/libdrm -I /usr/include/atk-1.0 -I /usr/include/at-spi2-atk/2.0 -I /usr/include/dbus-1.0 -I /usr/lib64/dbus-1.0/include -I /usr/include/at-spi-2.0 -I .. -I . -I /usr/include/libxml2 -I /usr/include/libsoup-2.4 -I /usr/include/glib-2.0 -I /usr/lib64/glib-2.0/include -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/libxml2 -I /usr/include/glib-2.0 -I /usr/lib64/glib-2.0/include -I /usr/include/libmount -I /usr/include/blkid -D G_LOG_DOMAIN="MateWeather" -D MATELOCALEDIR="/usr/local/share/locale" -D MATEWEATHER_XML_LOCATION_DIR="/usr/local/share/libmateweather" -D PIC -internal-isystem /usr/local/include -internal-isystem /usr/lib64/clang/9.0.1/include -internal-externc-isystem /include -internal-externc-isystem /usr/include -O2 -Wno-unused-parameter -Wno-sign-compare -fdebug-compilation-dir /rootdir/libmateweather -ferror-limit 19 -fmessage-length 0 -fobjc-runtime=gcc -fdiagnostics-show-option -vectorize-loops -vectorize-slp -analyzer-checker deadcode.DeadStores -analyzer-checker alpha.deadcode.UnreachableCode -analyzer-checker alpha.core.CastSize -analyzer-checker alpha.core.CastToStruct -analyzer-checker alpha.core.IdenticalExpr -analyzer-checker alpha.core.SizeofPtr -analyzer-checker alpha.security.ArrayBoundV2 -analyzer-checker alpha.security.MallocOverflow -analyzer-checker alpha.security.ReturnPtrRange -analyzer-checker alpha.unix.SimpleStream -analyzer-checker alpha.unix.cstring.BufferOverlap -analyzer-checker alpha.unix.cstring.NotNullTerminated -analyzer-checker alpha.unix.cstring.OutOfBounds -analyzer-checker alpha.core.FixedAddr -analyzer-checker security.insecureAPI.strcpy -analyzer-output=html -faddrsig -o /rootdir/html-report/2020-06-22-141506-5642-1 -x c weather-sun.c
+</div>
+<div id='tooltiphint' hidden="true">
+ <p>Keyboard shortcuts: </p>
+ <ul>
+ <li>Use 'j/k' keys for keyboard navigation</li>
+ <li>Use 'Shift+S' to show/hide relevant lines</li>
+ <li>Use '?' to toggle this window</li>
+ </ul>
+ <a href="#" onclick="toggleHelp(); return false;">Close</a>
+</div>
+<script type='text/javascript'>
+var relevant_lines = {"1": {"339": 1}};
+
+var filterCounterexample = function (hide) {
+ var tables = document.getElementsByClassName("code");
+ for (var t=0; t<tables.length; t++) {
+ var table = tables[t];
+ var file_id = table.getAttribute("data-fileid");
+ var lines_in_fid = relevant_lines[file_id];
+ if (!lines_in_fid) {
+ lines_in_fid = {};
+ }
+ var lines = table.getElementsByClassName("codeline");
+ for (var i=0; i<lines.length; i++) {
+ var el = lines[i];
+ var lineNo = el.getAttribute("data-linenumber");
+ if (!lines_in_fid[lineNo]) {
+ if (hide) {
+ el.setAttribute("hidden", "");
+ } else {
+ el.removeAttribute("hidden");
+ }
+ }
+ }
+ }
+}
+
+window.addEventListener("keydown", function (event) {
+ if (event.defaultPrevented) {
+ return;
+ }
+ if (event.key == "S") {
+ var checked = document.getElementsByName("showCounterexample")[0].checked;
+ filterCounterexample(!checked);
+ document.getElementsByName("showCounterexample")[0].checked = !checked;
+ } else {
+ return;
+ }
+ event.preventDefault();
+}, true);
+
+document.addEventListener("DOMContentLoaded", function() {
+ document.querySelector('input[name="showCounterexample"]').onchange=
+ function (event) {
+ filterCounterexample(this.checked);
+ };
+});
+</script>
+
+<form>
+ <input type="checkbox" name="showCounterexample" id="showCounterexample" />
+ <label for="showCounterexample">
+ Show only relevant lines
+ </label>
+</form>
+
+<script type='text/javascript'>
+var digitMatcher = new RegExp("[0-9]+");
+
+document.addEventListener("DOMContentLoaded", function() {
+ document.querySelectorAll(".PathNav > a").forEach(
+ function(currentValue, currentIndex) {
+ var hrefValue = currentValue.getAttribute("href");
+ currentValue.onclick = function() {
+ scrollTo(document.querySelector(hrefValue));
+ return false;
+ };
+ });
+});
+
+var findNum = function() {
+ var s = document.querySelector(".selected");
+ if (!s || s.id == "EndPath") {
+ return 0;
+ }
+ var out = parseInt(digitMatcher.exec(s.id)[0]);
+ return out;
+};
+
+var scrollTo = function(el) {
+ document.querySelectorAll(".selected").forEach(function(s) {
+ s.classList.remove("selected");
+ });
+ el.classList.add("selected");
+ window.scrollBy(0, el.getBoundingClientRect().top -
+ (window.innerHeight / 2));
+}
+
+var move = function(num, up, numItems) {
+ if (num == 1 && up || num == numItems - 1 && !up) {
+ return 0;
+ } else if (num == 0 && up) {
+ return numItems - 1;
+ } else if (num == 0 && !up) {
+ return 1 % numItems;
+ }
+ return up ? num - 1 : num + 1;
+}
+
+var numToId = function(num) {
+ if (num == 0) {
+ return document.getElementById("EndPath")
+ }
+ return document.getElementById("Path" + num);
+};
+
+var navigateTo = function(up) {
+ var numItems = document.querySelectorAll(
+ ".line > .msgEvent, .line > .msgControl").length;
+ var currentSelected = findNum();
+ var newSelected = move(currentSelected, up, numItems);
+ var newEl = numToId(newSelected, numItems);
+
+ // Scroll element into center.
+ scrollTo(newEl);
+};
+
+window.addEventListener("keydown", function (event) {
+ if (event.defaultPrevented) {
+ return;
+ }
+ if (event.key == "j") {
+ navigateTo(/*up=*/false);
+ } else if (event.key == "k") {
+ navigateTo(/*up=*/true);
+ } else {
+ return;
+ }
+ event.preventDefault();
+}, true);
+</script>
+
+<script type='text/javascript'>
+
+var toggleHelp = function() {
+ var hint = document.querySelector("#tooltiphint");
+ var attributeName = "hidden";
+ if (hint.hasAttribute(attributeName)) {
+ hint.removeAttribute(attributeName);
+ } else {
+ hint.setAttribute("hidden", "true");
+ }
+};
+window.addEventListener("keydown", function (event) {
+ if (event.defaultPrevented) {
+ return;
+ }
+ if (event.key == "?") {
+ toggleHelp();
+ } else {
+ return;
+ }
+ event.preventDefault();
+});
+</script>
+<table class="code" data-fileid="1">
+<tr class="codeline" data-linenumber="1"><td class="num" id="LN1">1</td><td class="line"><span class='comment'>/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 4 -*- */</span></td></tr>
+<tr class="codeline" data-linenumber="2"><td class="num" id="LN2">2</td><td class="line"><span class='comment'>/* weather-sun.c - Astronomy calculations for mateweather</span></td></tr>
+<tr class="codeline" data-linenumber="3"><td class="num" id="LN3">3</td><td class="line"> <span class='comment'>*</span></td></tr>
+<tr class="codeline" data-linenumber="4"><td class="num" id="LN4">4</td><td class="line"> <span class='comment'>* This program is free software; you can redistribute it and/or</span></td></tr>
+<tr class="codeline" data-linenumber="5"><td class="num" id="LN5">5</td><td class="line"> <span class='comment'>* modify it under the terms of the GNU General Public License as</span></td></tr>
+<tr class="codeline" data-linenumber="6"><td class="num" id="LN6">6</td><td class="line"> <span class='comment'>* published by the Free Software Foundation; either version 2 of the</span></td></tr>
+<tr class="codeline" data-linenumber="7"><td class="num" id="LN7">7</td><td class="line"> <span class='comment'>* License, or (at your option) any later version.</span></td></tr>
+<tr class="codeline" data-linenumber="8"><td class="num" id="LN8">8</td><td class="line"> <span class='comment'>*</span></td></tr>
+<tr class="codeline" data-linenumber="9"><td class="num" id="LN9">9</td><td class="line"> <span class='comment'>* This program is distributed in the hope that it will be useful, but</span></td></tr>
+<tr class="codeline" data-linenumber="10"><td class="num" id="LN10">10</td><td class="line"> <span class='comment'>* WITHOUT ANY WARRANTY; without even the implied warranty of</span></td></tr>
+<tr class="codeline" data-linenumber="11"><td class="num" id="LN11">11</td><td class="line"> <span class='comment'>* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU</span></td></tr>
+<tr class="codeline" data-linenumber="12"><td class="num" id="LN12">12</td><td class="line"> <span class='comment'>* General Public License for more details.</span></td></tr>
+<tr class="codeline" data-linenumber="13"><td class="num" id="LN13">13</td><td class="line"> <span class='comment'>*</span></td></tr>
+<tr class="codeline" data-linenumber="14"><td class="num" id="LN14">14</td><td class="line"> <span class='comment'>* You should have received a copy of the GNU General Public License</span></td></tr>
+<tr class="codeline" data-linenumber="15"><td class="num" id="LN15">15</td><td class="line"> <span class='comment'>* along with this program; if not, see</span></td></tr>
+<tr class="codeline" data-linenumber="16"><td class="num" id="LN16">16</td><td class="line"> <span class='comment'>* &lt;http://www.gnu.org/licenses/&gt;.</span></td></tr>
+<tr class="codeline" data-linenumber="17"><td class="num" id="LN17">17</td><td class="line"> <span class='comment'>*/</span></td></tr>
+<tr class="codeline" data-linenumber="18"><td class="num" id="LN18">18</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="19"><td class="num" id="LN19">19</td><td class="line"><span class='comment'>/*</span></td></tr>
+<tr class="codeline" data-linenumber="20"><td class="num" id="LN20">20</td><td class="line"> <span class='comment'>* Formulas from:</span></td></tr>
+<tr class="codeline" data-linenumber="21"><td class="num" id="LN21">21</td><td class="line"> <span class='comment'>* "Practical Astronomy With Your Calculator" (3e), Peter Duffett-Smith</span></td></tr>
+<tr class="codeline" data-linenumber="22"><td class="num" id="LN22">22</td><td class="line"> <span class='comment'>* Cambridge University Press 1988</span></td></tr>
+<tr class="codeline" data-linenumber="23"><td class="num" id="LN23">23</td><td class="line"> <span class='comment'>* Unless otherwise noted, comments referencing "steps" are related to</span></td></tr>
+<tr class="codeline" data-linenumber="24"><td class="num" id="LN24">24</td><td class="line"> <span class='comment'>* the algorithm presented in section 49 of above</span></td></tr>
+<tr class="codeline" data-linenumber="25"><td class="num" id="LN25">25</td><td class="line"> <span class='comment'>*/</span></td></tr>
+<tr class="codeline" data-linenumber="26"><td class="num" id="LN26">26</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="27"><td class="num" id="LN27">27</td><td class="line"><span class='directive'>#ifdef <span class='macro'>HAVE_CONFIG_H<span class='macro_popup'>1</span></span></span></td></tr>
+<tr class="codeline" data-linenumber="28"><td class="num" id="LN28">28</td><td class="line"><span class='directive'>#include &lt;config.h&gt;</span></td></tr>
+<tr class="codeline" data-linenumber="29"><td class="num" id="LN29">29</td><td class="line"><span class='directive'>#endif</span></td></tr>
+<tr class="codeline" data-linenumber="30"><td class="num" id="LN30">30</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="31"><td class="num" id="LN31">31</td><td class="line"><span class='directive'>#include &lt;math.h&gt;</span></td></tr>
+<tr class="codeline" data-linenumber="32"><td class="num" id="LN32">32</td><td class="line"><span class='directive'>#include &lt;time.h&gt;</span></td></tr>
+<tr class="codeline" data-linenumber="33"><td class="num" id="LN33">33</td><td class="line"><span class='directive'>#include &lt;glib.h&gt;</span></td></tr>
+<tr class="codeline" data-linenumber="34"><td class="num" id="LN34">34</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="35"><td class="num" id="LN35">35</td><td class="line"><span class='directive'>#define MATEWEATHER_I_KNOW_THIS_IS_UNSTABLE</span></td></tr>
+<tr class="codeline" data-linenumber="36"><td class="num" id="LN36">36</td><td class="line"><span class='directive'>#include "weather-priv.h"</span></td></tr>
+<tr class="codeline" data-linenumber="37"><td class="num" id="LN37">37</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="38"><td class="num" id="LN38">38</td><td class="line"><span class='directive'>#define <span class='macro'>ECCENTRICITY(d)<span class='macro_popup'>(0.01671123 - (d)/36525.*0.00004392)</span></span> (0.01671123 - (d)/36525.*0.00004392)</span></td></tr>
+<tr class="codeline" data-linenumber="39"><td class="num" id="LN39">39</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="40"><td class="num" id="LN40">40</td><td class="line"><span class='comment'>/*</span></td></tr>
+<tr class="codeline" data-linenumber="41"><td class="num" id="LN41">41</td><td class="line"> <span class='comment'>* Ecliptic longitude of the sun at specified time (UT)</span></td></tr>
+<tr class="codeline" data-linenumber="42"><td class="num" id="LN42">42</td><td class="line"> <span class='comment'>* The algoithm is described in section 47 of Duffett-Smith</span></td></tr>
+<tr class="codeline" data-linenumber="43"><td class="num" id="LN43">43</td><td class="line"> <span class='comment'>* Return value is in radians</span></td></tr>
+<tr class="codeline" data-linenumber="44"><td class="num" id="LN44">44</td><td class="line"> <span class='comment'>*/</span></td></tr>
+<tr class="codeline" data-linenumber="45"><td class="num" id="LN45">45</td><td class="line">gdouble</td></tr>
+<tr class="codeline" data-linenumber="46"><td class="num" id="LN46">46</td><td class="line">sunEclipLongitude(time_t t)</td></tr>
+<tr class="codeline" data-linenumber="47"><td class="num" id="LN47">47</td><td class="line">{</td></tr>
+<tr class="codeline" data-linenumber="48"><td class="num" id="LN48">48</td><td class="line"> gdouble ndays, meanAnom, eccenAnom, delta, e, longitude;</td></tr>
+<tr class="codeline" data-linenumber="49"><td class="num" id="LN49">49</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="50"><td class="num" id="LN50">50</td><td class="line"> <span class='comment'>/*</span></td></tr>
+<tr class="codeline" data-linenumber="51"><td class="num" id="LN51">51</td><td class="line"> <span class='comment'>* Start with an estimate based on a fixed daily rate</span></td></tr>
+<tr class="codeline" data-linenumber="52"><td class="num" id="LN52">52</td><td class="line"> <span class='comment'>*/</span></td></tr>
+<tr class="codeline" data-linenumber="53"><td class="num" id="LN53">53</td><td class="line"> ndays = <span class='macro'>EPOCH_TO_J2000(t)<span class='macro_popup'>((gdouble)(t)-946727935.816)</span></span> / 86400.;</td></tr>
+<tr class="codeline" data-linenumber="54"><td class="num" id="LN54">54</td><td class="line"> meanAnom = <span class='macro'>DEGREES_TO_RADIANS(MEAN_ECLIPTIC_LONGITUDE(ndays)<span class='macro_popup'>((fmod (((280.46457166 + (ndays)/36525.*35999.37244981) - (282.93768193<br> + (ndays)/36525.*0.32327364)),360.) / 180.) * 3.14159265358979323846<br>)</span></span></td></tr>
+<tr class="codeline" data-linenumber="55"><td class="num" id="LN55">55</td><td class="line"> <span class='macro'>- PERIGEE_LONGITUDE(ndays))<span class='macro_popup'>((fmod (((280.46457166 + (ndays)/36525.*35999.37244981) - (282.93768193<br> + (ndays)/36525.*0.32327364)),360.) / 180.) * 3.14159265358979323846<br>)</span></span>;</td></tr>
+<tr class="codeline" data-linenumber="56"><td class="num" id="LN56">56</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="57"><td class="num" id="LN57">57</td><td class="line"> <span class='comment'>/*</span></td></tr>
+<tr class="codeline" data-linenumber="58"><td class="num" id="LN58">58</td><td class="line"> <span class='comment'>* Approximate solution of Kepler's equation:</span></td></tr>
+<tr class="codeline" data-linenumber="59"><td class="num" id="LN59">59</td><td class="line"> <span class='comment'>* Find E which satisfies E - e sin(E) = M (mean anomaly)</span></td></tr>
+<tr class="codeline" data-linenumber="60"><td class="num" id="LN60">60</td><td class="line"> <span class='comment'>*/</span></td></tr>
+<tr class="codeline" data-linenumber="61"><td class="num" id="LN61">61</td><td class="line"> eccenAnom = meanAnom;</td></tr>
+<tr class="codeline" data-linenumber="62"><td class="num" id="LN62">62</td><td class="line"> e = <span class='macro'>ECCENTRICITY(ndays)<span class='macro_popup'>(0.01671123 - (ndays)/36525.*0.00004392)</span></span>;</td></tr>
+<tr class="codeline" data-linenumber="63"><td class="num" id="LN63">63</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="64"><td class="num" id="LN64">64</td><td class="line"> <span class='keyword'>while</span> (1e-12 &lt; fabs( delta = eccenAnom - e * sin(eccenAnom) - meanAnom))</td></tr>
+<tr class="codeline" data-linenumber="65"><td class="num" id="LN65">65</td><td class="line"> {</td></tr>
+<tr class="codeline" data-linenumber="66"><td class="num" id="LN66">66</td><td class="line"> eccenAnom -= delta / (1.- e * cos(eccenAnom));</td></tr>
+<tr class="codeline" data-linenumber="67"><td class="num" id="LN67">67</td><td class="line"> }</td></tr>
+<tr class="codeline" data-linenumber="68"><td class="num" id="LN68">68</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="69"><td class="num" id="LN69">69</td><td class="line"> <span class='comment'>/*</span></td></tr>
+<tr class="codeline" data-linenumber="70"><td class="num" id="LN70">70</td><td class="line"> <span class='comment'>* Earth's longitude on the ecliptic</span></td></tr>
+<tr class="codeline" data-linenumber="71"><td class="num" id="LN71">71</td><td class="line"> <span class='comment'>*/</span></td></tr>
+<tr class="codeline" data-linenumber="72"><td class="num" id="LN72">72</td><td class="line"> longitude = fmod( <span class='macro'>DEGREES_TO_RADIANS (PERIGEE_LONGITUDE(ndays))<span class='macro_popup'>((fmod (((282.93768193 + (ndays)/36525.*0.32327364)),360.) / 180.<br>) * 3.14159265358979323846)</span></span></td></tr>
+<tr class="codeline" data-linenumber="73"><td class="num" id="LN73">73</td><td class="line"> + 2. * atan (sqrt ((1.+e)/(1.-e))</td></tr>
+<tr class="codeline" data-linenumber="74"><td class="num" id="LN74">74</td><td class="line"> * tan (eccenAnom / 2.)),</td></tr>
+<tr class="codeline" data-linenumber="75"><td class="num" id="LN75">75</td><td class="line"> 2. * <span class='macro'>M_PI<span class='macro_popup'>3.14159265358979323846</span></span>);</td></tr>
+<tr class="codeline" data-linenumber="76"><td class="num" id="LN76">76</td><td class="line"> <span class='keyword'>if</span> (longitude &lt; 0.) {</td></tr>
+<tr class="codeline" data-linenumber="77"><td class="num" id="LN77">77</td><td class="line"> longitude += 2 * <span class='macro'>M_PI<span class='macro_popup'>3.14159265358979323846</span></span>;</td></tr>
+<tr class="codeline" data-linenumber="78"><td class="num" id="LN78">78</td><td class="line"> }</td></tr>
+<tr class="codeline" data-linenumber="79"><td class="num" id="LN79">79</td><td class="line"> <span class='keyword'>return</span> longitude;</td></tr>
+<tr class="codeline" data-linenumber="80"><td class="num" id="LN80">80</td><td class="line">}</td></tr>
+<tr class="codeline" data-linenumber="81"><td class="num" id="LN81">81</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="82"><td class="num" id="LN82">82</td><td class="line"><span class='keyword'>static</span> gdouble</td></tr>
+<tr class="codeline" data-linenumber="83"><td class="num" id="LN83">83</td><td class="line">ecliptic_obliquity (gdouble time)</td></tr>
+<tr class="codeline" data-linenumber="84"><td class="num" id="LN84">84</td><td class="line">{</td></tr>
+<tr class="codeline" data-linenumber="85"><td class="num" id="LN85">85</td><td class="line"> gdouble jc = <span class='macro'>EPOCH_TO_J2000 (time)<span class='macro_popup'>((gdouble)(time)-946727935.816)</span></span> / (36525. * 86400.);</td></tr>
+<tr class="codeline" data-linenumber="86"><td class="num" id="LN86">86</td><td class="line"> gdouble eclip_secs = (84381.448</td></tr>
+<tr class="codeline" data-linenumber="87"><td class="num" id="LN87">87</td><td class="line"> - (46.84024 * jc)</td></tr>
+<tr class="codeline" data-linenumber="88"><td class="num" id="LN88">88</td><td class="line"> - (59.e-5 * jc * jc)</td></tr>
+<tr class="codeline" data-linenumber="89"><td class="num" id="LN89">89</td><td class="line"> + (1.813e-3 * jc * jc * jc));</td></tr>
+<tr class="codeline" data-linenumber="90"><td class="num" id="LN90">90</td><td class="line"> <span class='keyword'>return</span> <span class='macro'>DEGREES_TO_RADIANS(eclip_secs / 3600.)<span class='macro_popup'>((fmod ((eclip_secs / 3600.),360.) / 180.) * 3.14159265358979323846<br>)</span></span>;</td></tr>
+<tr class="codeline" data-linenumber="91"><td class="num" id="LN91">91</td><td class="line">}</td></tr>
+<tr class="codeline" data-linenumber="92"><td class="num" id="LN92">92</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="93"><td class="num" id="LN93">93</td><td class="line"><span class='comment'>/*</span></td></tr>
+<tr class="codeline" data-linenumber="94"><td class="num" id="LN94">94</td><td class="line"> <span class='comment'>* Convert ecliptic longitude and latitude (radians) to equitorial</span></td></tr>
+<tr class="codeline" data-linenumber="95"><td class="num" id="LN95">95</td><td class="line"> <span class='comment'>* coordinates, expressed as right ascension (hours) and</span></td></tr>
+<tr class="codeline" data-linenumber="96"><td class="num" id="LN96">96</td><td class="line"> <span class='comment'>* declination (radians)</span></td></tr>
+<tr class="codeline" data-linenumber="97"><td class="num" id="LN97">97</td><td class="line"> <span class='comment'>*/</span></td></tr>
+<tr class="codeline" data-linenumber="98"><td class="num" id="LN98">98</td><td class="line"><span class='keyword'>void</span></td></tr>
+<tr class="codeline" data-linenumber="99"><td class="num" id="LN99">99</td><td class="line">ecl2equ (gdouble time,</td></tr>
+<tr class="codeline" data-linenumber="100"><td class="num" id="LN100">100</td><td class="line"> gdouble eclipLon, gdouble eclipLat,</td></tr>
+<tr class="codeline" data-linenumber="101"><td class="num" id="LN101">101</td><td class="line"> gdouble *ra, gdouble *decl)</td></tr>
+<tr class="codeline" data-linenumber="102"><td class="num" id="LN102">102</td><td class="line">{</td></tr>
+<tr class="codeline" data-linenumber="103"><td class="num" id="LN103">103</td><td class="line"> gdouble mEclipObliq = ecliptic_obliquity(time);</td></tr>
+<tr class="codeline" data-linenumber="104"><td class="num" id="LN104">104</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="105"><td class="num" id="LN105">105</td><td class="line"> <span class='keyword'>if</span> (ra) {</td></tr>
+<tr class="codeline" data-linenumber="106"><td class="num" id="LN106">106</td><td class="line"> *ra = <span class='macro'>RADIANS_TO_HOURS (atan2 ((sin (eclipLon) * cos (mEclipObliq)<span class='macro_popup'>((atan2 ((sin (eclipLon) * cos (mEclipObliq) - tan (eclipLat)<br> * sin(mEclipObliq)), cos (eclipLon))) * 12. / 3.14159265358979323846<br>)</span></span></td></tr>
+<tr class="codeline" data-linenumber="107"><td class="num" id="LN107">107</td><td class="line"> <span class='macro'>- tan (eclipLat) * sin(mEclipObliq)),<span class='macro_popup'>((atan2 ((sin (eclipLon) * cos (mEclipObliq) - tan (eclipLat)<br> * sin(mEclipObliq)), cos (eclipLon))) * 12. / 3.14159265358979323846<br>)</span></span></td></tr>
+<tr class="codeline" data-linenumber="108"><td class="num" id="LN108">108</td><td class="line"> <span class='macro'>cos (eclipLon)))<span class='macro_popup'>((atan2 ((sin (eclipLon) * cos (mEclipObliq) - tan (eclipLat)<br> * sin(mEclipObliq)), cos (eclipLon))) * 12. / 3.14159265358979323846<br>)</span></span>;</td></tr>
+<tr class="codeline" data-linenumber="109"><td class="num" id="LN109">109</td><td class="line"> <span class='keyword'>if</span> (*ra &lt; 0.)</td></tr>
+<tr class="codeline" data-linenumber="110"><td class="num" id="LN110">110</td><td class="line"> *ra += 24.;</td></tr>
+<tr class="codeline" data-linenumber="111"><td class="num" id="LN111">111</td><td class="line"> }</td></tr>
+<tr class="codeline" data-linenumber="112"><td class="num" id="LN112">112</td><td class="line"> <span class='keyword'>if</span> (decl) {</td></tr>
+<tr class="codeline" data-linenumber="113"><td class="num" id="LN113">113</td><td class="line"> *decl = asin (( sin (eclipLat) * cos (mEclipObliq))</td></tr>
+<tr class="codeline" data-linenumber="114"><td class="num" id="LN114">114</td><td class="line"> + cos (eclipLat) * sin (mEclipObliq) * sin(eclipLon));</td></tr>
+<tr class="codeline" data-linenumber="115"><td class="num" id="LN115">115</td><td class="line"> }</td></tr>
+<tr class="codeline" data-linenumber="116"><td class="num" id="LN116">116</td><td class="line">}</td></tr>
+<tr class="codeline" data-linenumber="117"><td class="num" id="LN117">117</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="118"><td class="num" id="LN118">118</td><td class="line"><span class='comment'>/*</span></td></tr>
+<tr class="codeline" data-linenumber="119"><td class="num" id="LN119">119</td><td class="line"> <span class='comment'>* Calculate rising and setting times for an object</span></td></tr>
+<tr class="codeline" data-linenumber="120"><td class="num" id="LN120">120</td><td class="line"> <span class='comment'>* based on it equitorial coordinates (section 33 &amp; 15)</span></td></tr>
+<tr class="codeline" data-linenumber="121"><td class="num" id="LN121">121</td><td class="line"> <span class='comment'>* Returned "rise" and "set" values are sideral times in hours</span></td></tr>
+<tr class="codeline" data-linenumber="122"><td class="num" id="LN122">122</td><td class="line"> <span class='comment'>*/</span></td></tr>
+<tr class="codeline" data-linenumber="123"><td class="num" id="LN123">123</td><td class="line"><span class='keyword'>static</span> <span class='keyword'>void</span></td></tr>
+<tr class="codeline" data-linenumber="124"><td class="num" id="LN124">124</td><td class="line">gstObsv (gdouble ra, gdouble decl,</td></tr>
+<tr class="codeline" data-linenumber="125"><td class="num" id="LN125">125</td><td class="line"> gdouble obsLat, gdouble obsLon,</td></tr>
+<tr class="codeline" data-linenumber="126"><td class="num" id="LN126">126</td><td class="line"> gdouble *rise, gdouble *set)</td></tr>
+<tr class="codeline" data-linenumber="127"><td class="num" id="LN127">127</td><td class="line">{</td></tr>
+<tr class="codeline" data-linenumber="128"><td class="num" id="LN128">128</td><td class="line"> <span class='keyword'>double</span> a = acos (-tan (obsLat) * tan (decl));</td></tr>
+<tr class="codeline" data-linenumber="129"><td class="num" id="LN129">129</td><td class="line"> <span class='keyword'>double</span> b;</td></tr>
+<tr class="codeline" data-linenumber="130"><td class="num" id="LN130">130</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="131"><td class="num" id="LN131">131</td><td class="line"> <span class='keyword'>if</span> (<span class='macro'>isnan (a)<span class='macro_popup'>__builtin_isnan (a)</span></span> != 0) {</td></tr>
+<tr class="codeline" data-linenumber="132"><td class="num" id="LN132">132</td><td class="line"> *set = *rise = a;</td></tr>
+<tr class="codeline" data-linenumber="133"><td class="num" id="LN133">133</td><td class="line"> <span class='keyword'>return</span>;</td></tr>
+<tr class="codeline" data-linenumber="134"><td class="num" id="LN134">134</td><td class="line"> }</td></tr>
+<tr class="codeline" data-linenumber="135"><td class="num" id="LN135">135</td><td class="line"> a = <span class='macro'>RADIANS_TO_HOURS (a)<span class='macro_popup'>((a) * 12. / 3.14159265358979323846)</span></span>;</td></tr>
+<tr class="codeline" data-linenumber="136"><td class="num" id="LN136">136</td><td class="line"> b = 24. - a + ra;</td></tr>
+<tr class="codeline" data-linenumber="137"><td class="num" id="LN137">137</td><td class="line"> a += ra;</td></tr>
+<tr class="codeline" data-linenumber="138"><td class="num" id="LN138">138</td><td class="line"> a -= <span class='macro'>RADIANS_TO_HOURS (obsLon)<span class='macro_popup'>((obsLon) * 12. / 3.14159265358979323846)</span></span>;</td></tr>
+<tr class="codeline" data-linenumber="139"><td class="num" id="LN139">139</td><td class="line"> b -= <span class='macro'>RADIANS_TO_HOURS (obsLon)<span class='macro_popup'>((obsLon) * 12. / 3.14159265358979323846)</span></span>;</td></tr>
+<tr class="codeline" data-linenumber="140"><td class="num" id="LN140">140</td><td class="line"> <span class='keyword'>if</span> ((a = fmod (a, 24.)) &lt; 0)</td></tr>
+<tr class="codeline" data-linenumber="141"><td class="num" id="LN141">141</td><td class="line"> a += 24.;</td></tr>
+<tr class="codeline" data-linenumber="142"><td class="num" id="LN142">142</td><td class="line"> <span class='keyword'>if</span> ((b = fmod (b, 24.)) &lt; 0)</td></tr>
+<tr class="codeline" data-linenumber="143"><td class="num" id="LN143">143</td><td class="line"> b += 24.;</td></tr>
+<tr class="codeline" data-linenumber="144"><td class="num" id="LN144">144</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="145"><td class="num" id="LN145">145</td><td class="line"> *set = a;</td></tr>
+<tr class="codeline" data-linenumber="146"><td class="num" id="LN146">146</td><td class="line"> *rise = b;</td></tr>
+<tr class="codeline" data-linenumber="147"><td class="num" id="LN147">147</td><td class="line">}</td></tr>
+<tr class="codeline" data-linenumber="148"><td class="num" id="LN148">148</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="149"><td class="num" id="LN149">149</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="150"><td class="num" id="LN150">150</td><td class="line"><span class='keyword'>static</span> gdouble</td></tr>
+<tr class="codeline" data-linenumber="151"><td class="num" id="LN151">151</td><td class="line">t0 (time_t date)</td></tr>
+<tr class="codeline" data-linenumber="152"><td class="num" id="LN152">152</td><td class="line">{</td></tr>
+<tr class="codeline" data-linenumber="153"><td class="num" id="LN153">153</td><td class="line"> gdouble t = ((gdouble)(<span class='macro'>EPOCH_TO_J2000 (date)<span class='macro_popup'>((gdouble)(date)-946727935.816)</span></span> / 86400)) / 36525.0;</td></tr>
+<tr class="codeline" data-linenumber="154"><td class="num" id="LN154">154</td><td class="line"> gdouble t0 = fmod (6.697374558 + 2400.051366 * t + 2.5862e-5 * t * t, 24.);</td></tr>
+<tr class="codeline" data-linenumber="155"><td class="num" id="LN155">155</td><td class="line"> <span class='keyword'>if</span> (t0 &lt; 0.)</td></tr>
+<tr class="codeline" data-linenumber="156"><td class="num" id="LN156">156</td><td class="line"> t0 += 24.;</td></tr>
+<tr class="codeline" data-linenumber="157"><td class="num" id="LN157">157</td><td class="line"> <span class='keyword'>return</span> t0;</td></tr>
+<tr class="codeline" data-linenumber="158"><td class="num" id="LN158">158</td><td class="line">}</td></tr>
+<tr class="codeline" data-linenumber="159"><td class="num" id="LN159">159</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="160"><td class="num" id="LN160">160</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="161"><td class="num" id="LN161">161</td><td class="line"><span class='keyword'>static</span> gboolean</td></tr>
+<tr class="codeline" data-linenumber="162"><td class="num" id="LN162">162</td><td class="line">calc_sun2 (WeatherInfo *info, time_t t)</td></tr>
+<tr class="codeline" data-linenumber="163"><td class="num" id="LN163">163</td><td class="line">{</td></tr>
+<tr class="codeline" data-linenumber="164"><td class="num" id="LN164">164</td><td class="line"> gdouble obsLat = info-&gt;location-&gt;latitude;</td></tr>
+<tr class="codeline" data-linenumber="165"><td class="num" id="LN165">165</td><td class="line"> gdouble obsLon = info-&gt;location-&gt;longitude;</td></tr>
+<tr class="codeline" data-linenumber="166"><td class="num" id="LN166">166</td><td class="line"> time_t gm_midn;</td></tr>
+<tr class="codeline" data-linenumber="167"><td class="num" id="LN167">167</td><td class="line"> time_t lcl_midn;</td></tr>
+<tr class="codeline" data-linenumber="168"><td class="num" id="LN168">168</td><td class="line"> gdouble gm_hoff, lambda;</td></tr>
+<tr class="codeline" data-linenumber="169"><td class="num" id="LN169">169</td><td class="line"> gdouble ra1, ra2;</td></tr>
+<tr class="codeline" data-linenumber="170"><td class="num" id="LN170">170</td><td class="line"> gdouble decl1, decl2;</td></tr>
+<tr class="codeline" data-linenumber="171"><td class="num" id="LN171">171</td><td class="line"> gdouble decl_midn, decl_noon;</td></tr>
+<tr class="codeline" data-linenumber="172"><td class="num" id="LN172">172</td><td class="line"> gdouble rise1, rise2;</td></tr>
+<tr class="codeline" data-linenumber="173"><td class="num" id="LN173">173</td><td class="line"> gdouble set1, set2;</td></tr>
+<tr class="codeline" data-linenumber="174"><td class="num" id="LN174">174</td><td class="line"> gdouble tt, t00;</td></tr>
+<tr class="codeline" data-linenumber="175"><td class="num" id="LN175">175</td><td class="line"> gdouble x, u, dt;</td></tr>
+<tr class="codeline" data-linenumber="176"><td class="num" id="LN176">176</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="177"><td class="num" id="LN177">177</td><td class="line"> <span class='comment'>/* Approximate preceding local midnight at observer's longitude */</span></td></tr>
+<tr class="codeline" data-linenumber="178"><td class="num" id="LN178">178</td><td class="line"> obsLat = info-&gt;location-&gt;latitude;</td></tr>
+<tr class="codeline" data-linenumber="179"><td class="num" id="LN179">179</td><td class="line"> obsLon = info-&gt;location-&gt;longitude;</td></tr>
+<tr class="codeline" data-linenumber="180"><td class="num" id="LN180">180</td><td class="line"> gm_midn = t - (t % 86400);</td></tr>
+<tr class="codeline" data-linenumber="181"><td class="num" id="LN181">181</td><td class="line"> gm_hoff = floor ((<span class='macro'>RADIANS_TO_DEGREES (obsLon)<span class='macro_popup'>((obsLon) * 180. / 3.14159265358979323846)</span></span> + 7.5) / 15.);</td></tr>
+<tr class="codeline" data-linenumber="182"><td class="num" id="LN182">182</td><td class="line"> lcl_midn = gm_midn - 3600. * gm_hoff;</td></tr>
+<tr class="codeline" data-linenumber="183"><td class="num" id="LN183">183</td><td class="line"> <span class='keyword'>if</span> (t - lcl_midn &gt;= 86400)</td></tr>
+<tr class="codeline" data-linenumber="184"><td class="num" id="LN184">184</td><td class="line"> lcl_midn += 86400;</td></tr>
+<tr class="codeline" data-linenumber="185"><td class="num" id="LN185">185</td><td class="line"> <span class='keyword'>else</span> <span class='keyword'>if</span> (lcl_midn &gt; t)</td></tr>
+<tr class="codeline" data-linenumber="186"><td class="num" id="LN186">186</td><td class="line"> lcl_midn -= 86400;</td></tr>
+<tr class="codeline" data-linenumber="187"><td class="num" id="LN187">187</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="188"><td class="num" id="LN188">188</td><td class="line"> lambda = sunEclipLongitude (lcl_midn);</td></tr>
+<tr class="codeline" data-linenumber="189"><td class="num" id="LN189">189</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="190"><td class="num" id="LN190">190</td><td class="line"> <span class='comment'>/*</span></td></tr>
+<tr class="codeline" data-linenumber="191"><td class="num" id="LN191">191</td><td class="line"> <span class='comment'>* Calculate equitorial coordinates of sun at previous</span></td></tr>
+<tr class="codeline" data-linenumber="192"><td class="num" id="LN192">192</td><td class="line"> <span class='comment'>* and next local midnights</span></td></tr>
+<tr class="codeline" data-linenumber="193"><td class="num" id="LN193">193</td><td class="line"> <span class='comment'>*/</span></td></tr>
+<tr class="codeline" data-linenumber="194"><td class="num" id="LN194">194</td><td class="line"> ecl2equ (lcl_midn, lambda, 0., &amp;ra1, &amp;decl1);</td></tr>
+<tr class="codeline" data-linenumber="195"><td class="num" id="LN195">195</td><td class="line"> ecl2equ (lcl_midn + 86400.,</td></tr>
+<tr class="codeline" data-linenumber="196"><td class="num" id="LN196">196</td><td class="line"> lambda + <span class='macro'>DEGREES_TO_RADIANS(SOL_PROGRESSION)<span class='macro_popup'>((fmod (((360./365.242191)),360.) / 180.) * 3.14159265358979323846<br>)</span></span>, 0.,</td></tr>
+<tr class="codeline" data-linenumber="197"><td class="num" id="LN197">197</td><td class="line"> &amp;ra2, &amp;decl2);</td></tr>
+<tr class="codeline" data-linenumber="198"><td class="num" id="LN198">198</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="199"><td class="num" id="LN199">199</td><td class="line"> <span class='comment'>/*</span></td></tr>
+<tr class="codeline" data-linenumber="200"><td class="num" id="LN200">200</td><td class="line"> <span class='comment'>* If the observer is within the Arctic or Antarctic Circles then</span></td></tr>
+<tr class="codeline" data-linenumber="201"><td class="num" id="LN201">201</td><td class="line"> <span class='comment'>* the sun may be above or below the horizon for the full day.</span></td></tr>
+<tr class="codeline" data-linenumber="202"><td class="num" id="LN202">202</td><td class="line"> <span class='comment'>*/</span></td></tr>
+<tr class="codeline" data-linenumber="203"><td class="num" id="LN203">203</td><td class="line"> decl_midn = <span class='macro'>MIN(decl1,decl2)<span class='macro_popup'>(((decl1) &lt; (decl2)) ? (decl1) : (decl2))</span></span>;</td></tr>
+<tr class="codeline" data-linenumber="204"><td class="num" id="LN204">204</td><td class="line"> decl_noon = (decl1+decl2)/2.;</td></tr>
+<tr class="codeline" data-linenumber="205"><td class="num" id="LN205">205</td><td class="line"> info-&gt;midnightSun =</td></tr>
+<tr class="codeline" data-linenumber="206"><td class="num" id="LN206">206</td><td class="line"> (obsLat &gt; (<span class='macro'>M_PI<span class='macro_popup'>3.14159265358979323846</span></span>/2.-decl_midn)) || (obsLat &lt; (-<span class='macro'>M_PI<span class='macro_popup'>3.14159265358979323846</span></span>/2.-decl_midn));</td></tr>
+<tr class="codeline" data-linenumber="207"><td class="num" id="LN207">207</td><td class="line"> info-&gt;polarNight =</td></tr>
+<tr class="codeline" data-linenumber="208"><td class="num" id="LN208">208</td><td class="line"> (obsLat &gt; (<span class='macro'>M_PI<span class='macro_popup'>3.14159265358979323846</span></span>/2.+decl_noon)) || (obsLat &lt; (-<span class='macro'>M_PI<span class='macro_popup'>3.14159265358979323846</span></span>/2.+decl_noon));</td></tr>
+<tr class="codeline" data-linenumber="209"><td class="num" id="LN209">209</td><td class="line"> <span class='keyword'>if</span> (info-&gt;midnightSun || info-&gt;polarNight) {</td></tr>
+<tr class="codeline" data-linenumber="210"><td class="num" id="LN210">210</td><td class="line"> info-&gt;sunriseValid = info-&gt;sunsetValid = <span class='macro'>FALSE<span class='macro_popup'>(0)</span></span>;</td></tr>
+<tr class="codeline" data-linenumber="211"><td class="num" id="LN211">211</td><td class="line"> <span class='keyword'>return</span> <span class='macro'>FALSE<span class='macro_popup'>(0)</span></span>;</td></tr>
+<tr class="codeline" data-linenumber="212"><td class="num" id="LN212">212</td><td class="line"> }</td></tr>
+<tr class="codeline" data-linenumber="213"><td class="num" id="LN213">213</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="214"><td class="num" id="LN214">214</td><td class="line"> <span class='comment'>/*</span></td></tr>
+<tr class="codeline" data-linenumber="215"><td class="num" id="LN215">215</td><td class="line"> <span class='comment'>* Convert to rise and set times based positions for the preceding</span></td></tr>
+<tr class="codeline" data-linenumber="216"><td class="num" id="LN216">216</td><td class="line"> <span class='comment'>* and following local midnights.</span></td></tr>
+<tr class="codeline" data-linenumber="217"><td class="num" id="LN217">217</td><td class="line"> <span class='comment'>*/</span></td></tr>
+<tr class="codeline" data-linenumber="218"><td class="num" id="LN218">218</td><td class="line"> gstObsv (ra1, decl1, obsLat, obsLon - (gm_hoff * <span class='macro'>M_PI<span class='macro_popup'>3.14159265358979323846</span></span> / 12.), &amp;rise1, &amp;set1);</td></tr>
+<tr class="codeline" data-linenumber="219"><td class="num" id="LN219">219</td><td class="line"> gstObsv (ra2, decl2, obsLat, obsLon - (gm_hoff * <span class='macro'>M_PI<span class='macro_popup'>3.14159265358979323846</span></span> / 12.), &amp;rise2, &amp;set2);</td></tr>
+<tr class="codeline" data-linenumber="220"><td class="num" id="LN220">220</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="221"><td class="num" id="LN221">221</td><td class="line"> <span class='comment'>/* TODO: include calculations for regions near the poles. */</span></td></tr>
+<tr class="codeline" data-linenumber="222"><td class="num" id="LN222">222</td><td class="line"> <span class='keyword'>if</span> (<span class='macro'>isnan(rise1)<span class='macro_popup'>__builtin_isnan (rise1)</span></span> || <span class='macro'>isnan(rise2)<span class='macro_popup'>__builtin_isnan (rise2)</span></span>) {</td></tr>
+<tr class="codeline" data-linenumber="223"><td class="num" id="LN223">223</td><td class="line"> info-&gt;sunriseValid = info-&gt;sunsetValid = <span class='macro'>FALSE<span class='macro_popup'>(0)</span></span>;</td></tr>
+<tr class="codeline" data-linenumber="224"><td class="num" id="LN224">224</td><td class="line"> <span class='keyword'>return</span> <span class='macro'>FALSE<span class='macro_popup'>(0)</span></span>;</td></tr>
+<tr class="codeline" data-linenumber="225"><td class="num" id="LN225">225</td><td class="line"> }</td></tr>
+<tr class="codeline" data-linenumber="226"><td class="num" id="LN226">226</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="227"><td class="num" id="LN227">227</td><td class="line"> <span class='keyword'>if</span> (rise2 &lt; rise1) {</td></tr>
+<tr class="codeline" data-linenumber="228"><td class="num" id="LN228">228</td><td class="line"> rise2 += 24.;</td></tr>
+<tr class="codeline" data-linenumber="229"><td class="num" id="LN229">229</td><td class="line"> }</td></tr>
+<tr class="codeline" data-linenumber="230"><td class="num" id="LN230">230</td><td class="line"> <span class='keyword'>if</span> (set2 &lt; set1) {</td></tr>
+<tr class="codeline" data-linenumber="231"><td class="num" id="LN231">231</td><td class="line"> set2 += 24.;</td></tr>
+<tr class="codeline" data-linenumber="232"><td class="num" id="LN232">232</td><td class="line"> }</td></tr>
+<tr class="codeline" data-linenumber="233"><td class="num" id="LN233">233</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="234"><td class="num" id="LN234">234</td><td class="line"> tt = t0(lcl_midn);</td></tr>
+<tr class="codeline" data-linenumber="235"><td class="num" id="LN235">235</td><td class="line"> t00 = tt - (gm_hoff + <span class='macro'>RADIANS_TO_HOURS(obsLon)<span class='macro_popup'>((obsLon) * 12. / 3.14159265358979323846)</span></span>) * 1.002737909;</td></tr>
+<tr class="codeline" data-linenumber="236"><td class="num" id="LN236">236</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="237"><td class="num" id="LN237">237</td><td class="line"> <span class='keyword'>if</span> (t00 &lt; 0.)</td></tr>
+<tr class="codeline" data-linenumber="238"><td class="num" id="LN238">238</td><td class="line"> t00 += 24.;</td></tr>
+<tr class="codeline" data-linenumber="239"><td class="num" id="LN239">239</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="240"><td class="num" id="LN240">240</td><td class="line"> <span class='keyword'>if</span> (rise1 &lt; t00) {</td></tr>
+<tr class="codeline" data-linenumber="241"><td class="num" id="LN241">241</td><td class="line"> rise1 += 24.;</td></tr>
+<tr class="codeline" data-linenumber="242"><td class="num" id="LN242">242</td><td class="line"> rise2 += 24.;</td></tr>
+<tr class="codeline" data-linenumber="243"><td class="num" id="LN243">243</td><td class="line"> }</td></tr>
+<tr class="codeline" data-linenumber="244"><td class="num" id="LN244">244</td><td class="line"> <span class='keyword'>if</span> (set1 &lt; t00) {</td></tr>
+<tr class="codeline" data-linenumber="245"><td class="num" id="LN245">245</td><td class="line"> set1 += 24.;</td></tr>
+<tr class="codeline" data-linenumber="246"><td class="num" id="LN246">246</td><td class="line"> set2 += 24.;</td></tr>
+<tr class="codeline" data-linenumber="247"><td class="num" id="LN247">247</td><td class="line"> }</td></tr>
+<tr class="codeline" data-linenumber="248"><td class="num" id="LN248">248</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="249"><td class="num" id="LN249">249</td><td class="line"> <span class='comment'>/*</span></td></tr>
+<tr class="codeline" data-linenumber="250"><td class="num" id="LN250">250</td><td class="line"> <span class='comment'>* Interpolate between the two to get a rise and set time</span></td></tr>
+<tr class="codeline" data-linenumber="251"><td class="num" id="LN251">251</td><td class="line"> <span class='comment'>* based on the sun's position at local noon (step 8)</span></td></tr>
+<tr class="codeline" data-linenumber="252"><td class="num" id="LN252">252</td><td class="line"> <span class='comment'>*/</span></td></tr>
+<tr class="codeline" data-linenumber="253"><td class="num" id="LN253">253</td><td class="line"> rise1 = (24.07 * rise1 - t00 * (rise2 - rise1)) / (24.07 + rise1 - rise2);</td></tr>
+<tr class="codeline" data-linenumber="254"><td class="num" id="LN254">254</td><td class="line"> set1 = (24.07 * set1 - t00 * (set2 - set1)) / (24.07 + set1 - set2);</td></tr>
+<tr class="codeline" data-linenumber="255"><td class="num" id="LN255">255</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="256"><td class="num" id="LN256">256</td><td class="line"> <span class='comment'>/*</span></td></tr>
+<tr class="codeline" data-linenumber="257"><td class="num" id="LN257">257</td><td class="line"> <span class='comment'>* Calculate an adjustment value to account for parallax,</span></td></tr>
+<tr class="codeline" data-linenumber="258"><td class="num" id="LN258">258</td><td class="line"> <span class='comment'>* refraction and the Sun's finite diameter (steps 9,10)</span></td></tr>
+<tr class="codeline" data-linenumber="259"><td class="num" id="LN259">259</td><td class="line"> <span class='comment'>*/</span></td></tr>
+<tr class="codeline" data-linenumber="260"><td class="num" id="LN260">260</td><td class="line"> decl2 = (decl1 + decl2) / 2.;</td></tr>
+<tr class="codeline" data-linenumber="261"><td class="num" id="LN261">261</td><td class="line"> x = <span class='macro'>DEGREES_TO_RADIANS(0.830725)<span class='macro_popup'>((fmod ((0.830725),360.) / 180.) * 3.14159265358979323846)</span></span>;</td></tr>
+<tr class="codeline" data-linenumber="262"><td class="num" id="LN262">262</td><td class="line"> u = acos ( sin(obsLat) / cos(decl2) );</td></tr>
+<tr class="codeline" data-linenumber="263"><td class="num" id="LN263">263</td><td class="line"> dt = <span class='macro'>RADIANS_TO_HOURS ( asin ( sin(x) / sin(u) ) / cos(decl2) )<span class='macro_popup'>((asin ( sin(x) / sin(u) ) / cos(decl2)) * 12. / 3.14159265358979323846<br>)</span></span>;</td></tr>
+<tr class="codeline" data-linenumber="264"><td class="num" id="LN264">264</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="265"><td class="num" id="LN265">265</td><td class="line"> <span class='comment'>/*</span></td></tr>
+<tr class="codeline" data-linenumber="266"><td class="num" id="LN266">266</td><td class="line"> <span class='comment'>* Subtract the correction value from sunrise and add to sunset,</span></td></tr>
+<tr class="codeline" data-linenumber="267"><td class="num" id="LN267">267</td><td class="line"> <span class='comment'>* then (step 11) convert sideral times to UT</span></td></tr>
+<tr class="codeline" data-linenumber="268"><td class="num" id="LN268">268</td><td class="line"> <span class='comment'>*/</span></td></tr>
+<tr class="codeline" data-linenumber="269"><td class="num" id="LN269">269</td><td class="line"> rise1 = (rise1 - dt - tt) * 0.9972695661;</td></tr>
+<tr class="codeline" data-linenumber="270"><td class="num" id="LN270">270</td><td class="line"> <span class='keyword'>if</span> (rise1 &lt; 0.)</td></tr>
+<tr class="codeline" data-linenumber="271"><td class="num" id="LN271">271</td><td class="line"> rise1 += 24;</td></tr>
+<tr class="codeline" data-linenumber="272"><td class="num" id="LN272">272</td><td class="line"> <span class='keyword'>else</span> <span class='keyword'>if</span> (rise1 &gt;= 24.)</td></tr>
+<tr class="codeline" data-linenumber="273"><td class="num" id="LN273">273</td><td class="line"> rise1 -= 24.;</td></tr>
+<tr class="codeline" data-linenumber="274"><td class="num" id="LN274">274</td><td class="line"> info-&gt;sunriseValid = ((rise1 &gt;= 0.) &amp;&amp; (rise1 &lt; 24.));</td></tr>
+<tr class="codeline" data-linenumber="275"><td class="num" id="LN275">275</td><td class="line"> info-&gt;sunrise = (rise1 * 3600.) + lcl_midn;</td></tr>
+<tr class="codeline" data-linenumber="276"><td class="num" id="LN276">276</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="277"><td class="num" id="LN277">277</td><td class="line"> set1 = (set1 + dt - tt) * 0.9972695661;</td></tr>
+<tr class="codeline" data-linenumber="278"><td class="num" id="LN278">278</td><td class="line"> <span class='keyword'>if</span> (set1 &lt; 0.)</td></tr>
+<tr class="codeline" data-linenumber="279"><td class="num" id="LN279">279</td><td class="line"> set1 += 24;</td></tr>
+<tr class="codeline" data-linenumber="280"><td class="num" id="LN280">280</td><td class="line"> <span class='keyword'>else</span> <span class='keyword'>if</span> (set1 &gt;= 24.)</td></tr>
+<tr class="codeline" data-linenumber="281"><td class="num" id="LN281">281</td><td class="line"> set1 -= 24.;</td></tr>
+<tr class="codeline" data-linenumber="282"><td class="num" id="LN282">282</td><td class="line"> info-&gt;sunsetValid = ((set1 &gt;= 0.) &amp;&amp; (set1 &lt; 24.));</td></tr>
+<tr class="codeline" data-linenumber="283"><td class="num" id="LN283">283</td><td class="line"> info-&gt;sunset = (set1 * 3600.) + lcl_midn;</td></tr>
+<tr class="codeline" data-linenumber="284"><td class="num" id="LN284">284</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="285"><td class="num" id="LN285">285</td><td class="line"> <span class='keyword'>return</span> (info-&gt;sunriseValid || info-&gt;sunsetValid);</td></tr>
+<tr class="codeline" data-linenumber="286"><td class="num" id="LN286">286</td><td class="line">}</td></tr>
+<tr class="codeline" data-linenumber="287"><td class="num" id="LN287">287</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="288"><td class="num" id="LN288">288</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="289"><td class="num" id="LN289">289</td><td class="line"><span class='comment'>/**</span></td></tr>
+<tr class="codeline" data-linenumber="290"><td class="num" id="LN290">290</td><td class="line"> <span class='comment'>* calc_sun_time:</span></td></tr>
+<tr class="codeline" data-linenumber="291"><td class="num" id="LN291">291</td><td class="line"> <span class='comment'>* @info: #WeatherInfo structure containing the observer's latitude</span></td></tr>
+<tr class="codeline" data-linenumber="292"><td class="num" id="LN292">292</td><td class="line"> <span class='comment'>* and longitude in radians, fills in the sunrise and sunset times.</span></td></tr>
+<tr class="codeline" data-linenumber="293"><td class="num" id="LN293">293</td><td class="line"> <span class='comment'>* @t: time_t</span></td></tr>
+<tr class="codeline" data-linenumber="294"><td class="num" id="LN294">294</td><td class="line"> <span class='comment'>*</span></td></tr>
+<tr class="codeline" data-linenumber="295"><td class="num" id="LN295">295</td><td class="line"> <span class='comment'>* Returns: gboolean indicating if the results are valid.</span></td></tr>
+<tr class="codeline" data-linenumber="296"><td class="num" id="LN296">296</td><td class="line"> <span class='comment'>*/</span></td></tr>
+<tr class="codeline" data-linenumber="297"><td class="num" id="LN297">297</td><td class="line">gboolean</td></tr>
+<tr class="codeline" data-linenumber="298"><td class="num" id="LN298">298</td><td class="line">calc_sun_time (WeatherInfo *info, time_t t)</td></tr>
+<tr class="codeline" data-linenumber="299"><td class="num" id="LN299">299</td><td class="line">{</td></tr>
+<tr class="codeline" data-linenumber="300"><td class="num" id="LN300">300</td><td class="line"> <span class='keyword'>return</span> info-&gt;location-&gt;latlon_valid &amp;&amp; calc_sun2 (info, t);</td></tr>
+<tr class="codeline" data-linenumber="301"><td class="num" id="LN301">301</td><td class="line">}</td></tr>
+<tr class="codeline" data-linenumber="302"><td class="num" id="LN302">302</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="303"><td class="num" id="LN303">303</td><td class="line"><span class='comment'>/**</span></td></tr>
+<tr class="codeline" data-linenumber="304"><td class="num" id="LN304">304</td><td class="line"> <span class='comment'>* calc_sun:</span></td></tr>
+<tr class="codeline" data-linenumber="305"><td class="num" id="LN305">305</td><td class="line"> <span class='comment'>* @info: #WeatherInfo structure containing the observer's latitude</span></td></tr>
+<tr class="codeline" data-linenumber="306"><td class="num" id="LN306">306</td><td class="line"> <span class='comment'>* and longitude in radians, fills in the sunrise and sunset times.</span></td></tr>
+<tr class="codeline" data-linenumber="307"><td class="num" id="LN307">307</td><td class="line"> <span class='comment'>*</span></td></tr>
+<tr class="codeline" data-linenumber="308"><td class="num" id="LN308">308</td><td class="line"> <span class='comment'>* Returns: gboolean indicating if the results are valid.</span></td></tr>
+<tr class="codeline" data-linenumber="309"><td class="num" id="LN309">309</td><td class="line"> <span class='comment'>*/</span></td></tr>
+<tr class="codeline" data-linenumber="310"><td class="num" id="LN310">310</td><td class="line">gboolean</td></tr>
+<tr class="codeline" data-linenumber="311"><td class="num" id="LN311">311</td><td class="line">calc_sun (WeatherInfo *info)</td></tr>
+<tr class="codeline" data-linenumber="312"><td class="num" id="LN312">312</td><td class="line">{</td></tr>
+<tr class="codeline" data-linenumber="313"><td class="num" id="LN313">313</td><td class="line"> <span class='keyword'>return</span> calc_sun_time(info, time(<span class='macro'>NULL<span class='macro_popup'>((void*)0)</span></span>));</td></tr>
+<tr class="codeline" data-linenumber="314"><td class="num" id="LN314">314</td><td class="line">}</td></tr>
+<tr class="codeline" data-linenumber="315"><td class="num" id="LN315">315</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="316"><td class="num" id="LN316">316</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="317"><td class="num" id="LN317">317</td><td class="line"><span class='comment'>/**</span></td></tr>
+<tr class="codeline" data-linenumber="318"><td class="num" id="LN318">318</td><td class="line"> <span class='comment'>* weather_info_next_sun_event:</span></td></tr>
+<tr class="codeline" data-linenumber="319"><td class="num" id="LN319">319</td><td class="line"> <span class='comment'>* @info: #WeatherInfo structure</span></td></tr>
+<tr class="codeline" data-linenumber="320"><td class="num" id="LN320">320</td><td class="line"> <span class='comment'>*</span></td></tr>
+<tr class="codeline" data-linenumber="321"><td class="num" id="LN321">321</td><td class="line"> <span class='comment'>* Returns: the interval, in seconds, until the next "sun event":</span></td></tr>
+<tr class="codeline" data-linenumber="322"><td class="num" id="LN322">322</td><td class="line"> <span class='comment'>* - local midnight, when rise and set times are recomputed</span></td></tr>
+<tr class="codeline" data-linenumber="323"><td class="num" id="LN323">323</td><td class="line"> <span class='comment'>* - next sunrise, when icon changes to daytime version</span></td></tr>
+<tr class="codeline" data-linenumber="324"><td class="num" id="LN324">324</td><td class="line"> <span class='comment'>* - next sunset, when icon changes to nighttime version</span></td></tr>
+<tr class="codeline" data-linenumber="325"><td class="num" id="LN325">325</td><td class="line"> <span class='comment'>*/</span></td></tr>
+<tr class="codeline" data-linenumber="326"><td class="num" id="LN326">326</td><td class="line">gint</td></tr>
+<tr class="codeline" data-linenumber="327"><td class="num" id="LN327">327</td><td class="line">weather_info_next_sun_event (WeatherInfo *info)</td></tr>
+<tr class="codeline" data-linenumber="328"><td class="num" id="LN328">328</td><td class="line">{</td></tr>
+<tr class="codeline" data-linenumber="329"><td class="num" id="LN329">329</td><td class="line"> time_t now = time (<span class='macro'>NULL<span class='macro_popup'>((void*)0)</span></span>);</td></tr>
+<tr class="codeline" data-linenumber="330"><td class="num" id="LN330">330</td><td class="line"> <span class='keyword'>struct</span> tm ltm;</td></tr>
+<tr class="codeline" data-linenumber="331"><td class="num" id="LN331">331</td><td class="line"> time_t nxtEvent;</td></tr>
+<tr class="codeline" data-linenumber="332"><td class="num" id="LN332">332</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="333"><td class="num" id="LN333">333</td><td class="line"> <span class='macro'>g_return_val_if_fail (info != NULL, -1)<span class='macro_popup'>do { if ((__builtin_expect (__extension__ ({ int _g_boolean_var_<br>; if (info != ((void*)0)) _g_boolean_var_ = 1; else _g_boolean_var_<br> = 0; _g_boolean_var_; }), 1))) { } else { g_return_if_fail_warning<br> ("MateWeather", ((const char*) (__func__)), "info != NULL");<br> return (-1); } } while (0)</span></span>;</td></tr>
+<tr class="codeline" data-linenumber="334"><td class="num" id="LN334">334</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="335"><td class="num" id="LN335">335</td><td class="line"> <span class='keyword'>if</span> (!calc_sun (info))</td></tr>
+<tr class="codeline" data-linenumber="336"><td class="num" id="LN336">336</td><td class="line"> <span class='keyword'>return</span> -1;</td></tr>
+<tr class="codeline" data-linenumber="337"><td class="num" id="LN337">337</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="338"><td class="num" id="LN338">338</td><td class="line"> <span class='comment'>/* Determine when the next local midnight occurs */</span></td></tr>
+<tr class="codeline" data-linenumber="339"><td class="num" id="LN339">339</td><td class="line"> (<span class='keyword'>void</span>) <span class="mrange">localtime_r</span> (&amp;now, &amp;ltm);</td></tr>
+<tr><td class="num"></td><td class="line"><div id="EndPath" class="msg msgEvent" style="margin-left:12ex">This statement is never executed</div></td></tr>
+<tr class="codeline" data-linenumber="340"><td class="num" id="LN340">340</td><td class="line"> ltm.tm_sec = 0;</td></tr>
+<tr class="codeline" data-linenumber="341"><td class="num" id="LN341">341</td><td class="line"> ltm.tm_min = 0;</td></tr>
+<tr class="codeline" data-linenumber="342"><td class="num" id="LN342">342</td><td class="line"> ltm.tm_hour = 0;</td></tr>
+<tr class="codeline" data-linenumber="343"><td class="num" id="LN343">343</td><td class="line"> ltm.tm_mday++;</td></tr>
+<tr class="codeline" data-linenumber="344"><td class="num" id="LN344">344</td><td class="line"> nxtEvent = mktime (&amp;ltm);</td></tr>
+<tr class="codeline" data-linenumber="345"><td class="num" id="LN345">345</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="346"><td class="num" id="LN346">346</td><td class="line"> <span class='keyword'>if</span> (info-&gt;sunsetValid &amp;&amp;</td></tr>
+<tr class="codeline" data-linenumber="347"><td class="num" id="LN347">347</td><td class="line"> (info-&gt;sunset &gt; now) &amp;&amp; (info-&gt;sunset &lt; nxtEvent))</td></tr>
+<tr class="codeline" data-linenumber="348"><td class="num" id="LN348">348</td><td class="line"> nxtEvent = info-&gt;sunset;</td></tr>
+<tr class="codeline" data-linenumber="349"><td class="num" id="LN349">349</td><td class="line"> <span class='keyword'>if</span> (info-&gt;sunriseValid &amp;&amp;</td></tr>
+<tr class="codeline" data-linenumber="350"><td class="num" id="LN350">350</td><td class="line"> (info-&gt;sunrise &gt; now) &amp;&amp; (info-&gt;sunrise &lt; nxtEvent))</td></tr>
+<tr class="codeline" data-linenumber="351"><td class="num" id="LN351">351</td><td class="line"> nxtEvent = info-&gt;sunrise;</td></tr>
+<tr class="codeline" data-linenumber="352"><td class="num" id="LN352">352</td><td class="line"> <span class='keyword'>return</span> (gint)(nxtEvent - now);</td></tr>
+<tr class="codeline" data-linenumber="353"><td class="num" id="LN353">353</td><td class="line">}</td></tr>
+</table></body></html>
diff --git a/[email protected]_travis-ci/report-93edd5.html b/[email protected]_travis-ci/report-93edd5.html
new file mode 100644
index 0000000..b69f978
--- /dev/null
+++ b/[email protected]_travis-ci/report-93edd5.html
@@ -0,0 +1,700 @@
+<!doctype html>
+<html>
+<head>
+<title>weather-sun.c</title>
+
+<style type="text/css">
+body { color:#000000; background-color:#ffffff }
+body { font-family:Helvetica, sans-serif; font-size:10pt }
+h1 { font-size:14pt }
+.FileName { margin-top: 5px; margin-bottom: 5px; display: inline; }
+.FileNav { margin-left: 5px; margin-right: 5px; display: inline; }
+.FileNav a { text-decoration:none; font-size: larger; }
+.divider { margin-top: 30px; margin-bottom: 30px; height: 15px; }
+.divider { background-color: gray; }
+.code { border-collapse:collapse; width:100%; }
+.code { font-family: "Monospace", monospace; font-size:10pt }
+.code { line-height: 1.2em }
+.comment { color: green; font-style: oblique }
+.keyword { color: blue }
+.string_literal { color: red }
+.directive { color: darkmagenta }
+
+/* Macros and variables could have pop-up notes hidden by default.
+ - Macro pop-up: expansion of the macro
+ - Variable pop-up: value (table) of the variable */
+.macro_popup, .variable_popup { display: none; }
+
+/* Pop-up appears on mouse-hover event. */
+.macro:hover .macro_popup, .variable:hover .variable_popup {
+ display: block;
+ padding: 2px;
+ -webkit-border-radius:5px;
+ -webkit-box-shadow:1px 1px 7px #000;
+ border-radius:5px;
+ box-shadow:1px 1px 7px #000;
+ position: absolute;
+ top: -1em;
+ left:10em;
+ z-index: 1
+}
+
+.macro_popup {
+ border: 2px solid red;
+ background-color:#FFF0F0;
+ font-weight: normal;
+}
+
+.variable_popup {
+ border: 2px solid blue;
+ background-color:#F0F0FF;
+ font-weight: bold;
+ font-family: Helvetica, sans-serif;
+ font-size: 9pt;
+}
+
+/* Pop-up notes needs a relative position as a base where they pops up. */
+.macro, .variable {
+ background-color: PaleGoldenRod;
+ position: relative;
+}
+.macro { color: DarkMagenta; }
+
+#tooltiphint {
+ position: fixed;
+ width: 50em;
+ margin-left: -25em;
+ left: 50%;
+ padding: 10px;
+ border: 1px solid #b0b0b0;
+ border-radius: 2px;
+ box-shadow: 1px 1px 7px black;
+ background-color: #c0c0c0;
+ z-index: 2;
+}
+
+.num { width:2.5em; padding-right:2ex; background-color:#eeeeee }
+.num { text-align:right; font-size:8pt }
+.num { color:#444444 }
+.line { padding-left: 1ex; border-left: 3px solid #ccc }
+.line { white-space: pre }
+.msg { -webkit-box-shadow:1px 1px 7px #000 }
+.msg { box-shadow:1px 1px 7px #000 }
+.msg { -webkit-border-radius:5px }
+.msg { border-radius:5px }
+.msg { font-family:Helvetica, sans-serif; font-size:8pt }
+.msg { float:left }
+.msg { padding:0.25em 1ex 0.25em 1ex }
+.msg { margin-top:10px; margin-bottom:10px }
+.msg { font-weight:bold }
+.msg { max-width:60em; word-wrap: break-word; white-space: pre-wrap }
+.msgT { padding:0x; spacing:0x }
+.msgEvent { background-color:#fff8b4; color:#000000 }
+.msgControl { background-color:#bbbbbb; color:#000000 }
+.msgNote { background-color:#ddeeff; color:#000000 }
+.mrange { background-color:#dfddf3 }
+.mrange { border-bottom:1px solid #6F9DBE }
+.PathIndex { font-weight: bold; padding:0px 5px; margin-right:5px; }
+.PathIndex { -webkit-border-radius:8px }
+.PathIndex { border-radius:8px }
+.PathIndexEvent { background-color:#bfba87 }
+.PathIndexControl { background-color:#8c8c8c }
+.PathIndexPopUp { background-color: #879abc; }
+.PathNav a { text-decoration:none; font-size: larger }
+.CodeInsertionHint { font-weight: bold; background-color: #10dd10 }
+.CodeRemovalHint { background-color:#de1010 }
+.CodeRemovalHint { border-bottom:1px solid #6F9DBE }
+.selected{ background-color:orange !important; }
+
+table.simpletable {
+ padding: 5px;
+ font-size:12pt;
+ margin:20px;
+ border-collapse: collapse; border-spacing: 0px;
+}
+td.rowname {
+ text-align: right;
+ vertical-align: top;
+ font-weight: bold;
+ color:#444444;
+ padding-right:2ex;
+}
+
+/* Hidden text. */
+input.spoilerhider + label {
+ cursor: pointer;
+ text-decoration: underline;
+ display: block;
+}
+input.spoilerhider {
+ display: none;
+}
+input.spoilerhider ~ .spoiler {
+ overflow: hidden;
+ margin: 10px auto 0;
+ height: 0;
+ opacity: 0;
+}
+input.spoilerhider:checked + label + .spoiler{
+ height: auto;
+ opacity: 1;
+}
+</style>
+</head>
+<body>
+<!-- BUGDESC Value stored to 'obsLon' during its initialization is never read -->
+
+<!-- BUGTYPE Dead initialization -->
+
+<!-- BUGCATEGORY Dead store -->
+
+<!-- BUGFILE /rootdir/libmateweather/weather-sun.c -->
+
+<!-- FILENAME weather-sun.c -->
+
+<!-- FUNCTIONNAME calc_sun2 -->
+
+<!-- ISSUEHASHCONTENTOFLINEINCONTEXT 1b914f72d85f7c3cbabde064abbfdcb1 -->
+
+<!-- BUGLINE 165 -->
+
+<!-- BUGCOLUMN 13 -->
+
+<!-- BUGPATHLENGTH 1 -->
+
+<!-- BUGMETAEND -->
+<!-- REPORTHEADER -->
+<h3>Bug Summary</h3>
+<table class="simpletable">
+<tr><td class="rowname">File:</td><td>weather-sun.c</td></tr>
+<tr><td class="rowname">Warning:</td><td><a href="#EndPath">line 165, column 13</a><br />Value stored to 'obsLon' during its initialization is never read</td></tr>
+
+</table>
+<!-- REPORTSUMMARYEXTRA -->
+<h3>Annotated Source Code</h3>
+<p>Press <a href="#" onclick="toggleHelp(); return false;">'?'</a>
+ to see keyboard shortcuts</p>
+<input type="checkbox" class="spoilerhider" id="showinvocation" />
+<label for="showinvocation" >Show analyzer invocation</label>
+<div class="spoiler">clang -cc1 -triple x86_64-unknown-linux-gnu -analyze -disable-free -disable-llvm-verifier -discard-value-names -main-file-name weather-sun.c -analyzer-store=region -analyzer-opt-analyze-nested-blocks -analyzer-checker=core -analyzer-checker=apiModeling -analyzer-checker=unix -analyzer-checker=deadcode -analyzer-checker=security.insecureAPI.UncheckedReturn -analyzer-checker=security.insecureAPI.getpw -analyzer-checker=security.insecureAPI.gets -analyzer-checker=security.insecureAPI.mktemp -analyzer-checker=security.insecureAPI.mkstemp -analyzer-checker=security.insecureAPI.vfork -analyzer-checker=nullability.NullPassedToNonnull -analyzer-checker=nullability.NullReturnedFromNonnull -analyzer-output plist -w -mrelocation-model pic -pic-level 2 -mthread-model posix -fmath-errno -masm-verbose -mconstructor-aliases -munwind-tables -fuse-init-array -target-cpu x86-64 -dwarf-column-info -debugger-tuning=gdb -momit-leaf-frame-pointer -resource-dir /usr/lib64/clang/9.0.1 -D HAVE_CONFIG_H -I . -I .. -I /usr/include/gtk-3.0 -I /usr/include/pango-1.0 -I /usr/include/glib-2.0 -I /usr/lib64/glib-2.0/include -I /usr/include/harfbuzz -I /usr/include/fribidi -I /usr/include/freetype2 -I /usr/include/libpng16 -I /usr/include/cairo -I /usr/include/pixman-1 -I /usr/include/gdk-pixbuf-2.0 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/gio-unix-2.0 -I /usr/include/libdrm -I /usr/include/atk-1.0 -I /usr/include/at-spi2-atk/2.0 -I /usr/include/dbus-1.0 -I /usr/lib64/dbus-1.0/include -I /usr/include/at-spi-2.0 -I .. -I . -I /usr/include/libxml2 -I /usr/include/libsoup-2.4 -I /usr/include/glib-2.0 -I /usr/lib64/glib-2.0/include -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/libxml2 -I /usr/include/glib-2.0 -I /usr/lib64/glib-2.0/include -I /usr/include/libmount -I /usr/include/blkid -D G_LOG_DOMAIN="MateWeather" -D MATELOCALEDIR="/usr/local/share/locale" -D MATEWEATHER_XML_LOCATION_DIR="/usr/local/share/libmateweather" -D PIC -internal-isystem /usr/local/include -internal-isystem /usr/lib64/clang/9.0.1/include -internal-externc-isystem /include -internal-externc-isystem /usr/include -O2 -Wno-unused-parameter -Wno-sign-compare -fdebug-compilation-dir /rootdir/libmateweather -ferror-limit 19 -fmessage-length 0 -fobjc-runtime=gcc -fdiagnostics-show-option -vectorize-loops -vectorize-slp -analyzer-checker deadcode.DeadStores -analyzer-checker alpha.deadcode.UnreachableCode -analyzer-checker alpha.core.CastSize -analyzer-checker alpha.core.CastToStruct -analyzer-checker alpha.core.IdenticalExpr -analyzer-checker alpha.core.SizeofPtr -analyzer-checker alpha.security.ArrayBoundV2 -analyzer-checker alpha.security.MallocOverflow -analyzer-checker alpha.security.ReturnPtrRange -analyzer-checker alpha.unix.SimpleStream -analyzer-checker alpha.unix.cstring.BufferOverlap -analyzer-checker alpha.unix.cstring.NotNullTerminated -analyzer-checker alpha.unix.cstring.OutOfBounds -analyzer-checker alpha.core.FixedAddr -analyzer-checker security.insecureAPI.strcpy -analyzer-output=html -faddrsig -o /rootdir/html-report/2020-06-22-141506-5642-1 -x c weather-sun.c
+</div>
+<div id='tooltiphint' hidden="true">
+ <p>Keyboard shortcuts: </p>
+ <ul>
+ <li>Use 'j/k' keys for keyboard navigation</li>
+ <li>Use 'Shift+S' to show/hide relevant lines</li>
+ <li>Use '?' to toggle this window</li>
+ </ul>
+ <a href="#" onclick="toggleHelp(); return false;">Close</a>
+</div>
+<script type='text/javascript'>
+var relevant_lines = {"1": {"165": 1}};
+
+var filterCounterexample = function (hide) {
+ var tables = document.getElementsByClassName("code");
+ for (var t=0; t<tables.length; t++) {
+ var table = tables[t];
+ var file_id = table.getAttribute("data-fileid");
+ var lines_in_fid = relevant_lines[file_id];
+ if (!lines_in_fid) {
+ lines_in_fid = {};
+ }
+ var lines = table.getElementsByClassName("codeline");
+ for (var i=0; i<lines.length; i++) {
+ var el = lines[i];
+ var lineNo = el.getAttribute("data-linenumber");
+ if (!lines_in_fid[lineNo]) {
+ if (hide) {
+ el.setAttribute("hidden", "");
+ } else {
+ el.removeAttribute("hidden");
+ }
+ }
+ }
+ }
+}
+
+window.addEventListener("keydown", function (event) {
+ if (event.defaultPrevented) {
+ return;
+ }
+ if (event.key == "S") {
+ var checked = document.getElementsByName("showCounterexample")[0].checked;
+ filterCounterexample(!checked);
+ document.getElementsByName("showCounterexample")[0].checked = !checked;
+ } else {
+ return;
+ }
+ event.preventDefault();
+}, true);
+
+document.addEventListener("DOMContentLoaded", function() {
+ document.querySelector('input[name="showCounterexample"]').onchange=
+ function (event) {
+ filterCounterexample(this.checked);
+ };
+});
+</script>
+
+<form>
+ <input type="checkbox" name="showCounterexample" id="showCounterexample" />
+ <label for="showCounterexample">
+ Show only relevant lines
+ </label>
+</form>
+
+<script type='text/javascript'>
+var digitMatcher = new RegExp("[0-9]+");
+
+document.addEventListener("DOMContentLoaded", function() {
+ document.querySelectorAll(".PathNav > a").forEach(
+ function(currentValue, currentIndex) {
+ var hrefValue = currentValue.getAttribute("href");
+ currentValue.onclick = function() {
+ scrollTo(document.querySelector(hrefValue));
+ return false;
+ };
+ });
+});
+
+var findNum = function() {
+ var s = document.querySelector(".selected");
+ if (!s || s.id == "EndPath") {
+ return 0;
+ }
+ var out = parseInt(digitMatcher.exec(s.id)[0]);
+ return out;
+};
+
+var scrollTo = function(el) {
+ document.querySelectorAll(".selected").forEach(function(s) {
+ s.classList.remove("selected");
+ });
+ el.classList.add("selected");
+ window.scrollBy(0, el.getBoundingClientRect().top -
+ (window.innerHeight / 2));
+}
+
+var move = function(num, up, numItems) {
+ if (num == 1 && up || num == numItems - 1 && !up) {
+ return 0;
+ } else if (num == 0 && up) {
+ return numItems - 1;
+ } else if (num == 0 && !up) {
+ return 1 % numItems;
+ }
+ return up ? num - 1 : num + 1;
+}
+
+var numToId = function(num) {
+ if (num == 0) {
+ return document.getElementById("EndPath")
+ }
+ return document.getElementById("Path" + num);
+};
+
+var navigateTo = function(up) {
+ var numItems = document.querySelectorAll(
+ ".line > .msgEvent, .line > .msgControl").length;
+ var currentSelected = findNum();
+ var newSelected = move(currentSelected, up, numItems);
+ var newEl = numToId(newSelected, numItems);
+
+ // Scroll element into center.
+ scrollTo(newEl);
+};
+
+window.addEventListener("keydown", function (event) {
+ if (event.defaultPrevented) {
+ return;
+ }
+ if (event.key == "j") {
+ navigateTo(/*up=*/false);
+ } else if (event.key == "k") {
+ navigateTo(/*up=*/true);
+ } else {
+ return;
+ }
+ event.preventDefault();
+}, true);
+</script>
+
+<script type='text/javascript'>
+
+var toggleHelp = function() {
+ var hint = document.querySelector("#tooltiphint");
+ var attributeName = "hidden";
+ if (hint.hasAttribute(attributeName)) {
+ hint.removeAttribute(attributeName);
+ } else {
+ hint.setAttribute("hidden", "true");
+ }
+};
+window.addEventListener("keydown", function (event) {
+ if (event.defaultPrevented) {
+ return;
+ }
+ if (event.key == "?") {
+ toggleHelp();
+ } else {
+ return;
+ }
+ event.preventDefault();
+});
+</script>
+<table class="code" data-fileid="1">
+<tr class="codeline" data-linenumber="1"><td class="num" id="LN1">1</td><td class="line"><span class='comment'>/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 4 -*- */</span></td></tr>
+<tr class="codeline" data-linenumber="2"><td class="num" id="LN2">2</td><td class="line"><span class='comment'>/* weather-sun.c - Astronomy calculations for mateweather</span></td></tr>
+<tr class="codeline" data-linenumber="3"><td class="num" id="LN3">3</td><td class="line"> <span class='comment'>*</span></td></tr>
+<tr class="codeline" data-linenumber="4"><td class="num" id="LN4">4</td><td class="line"> <span class='comment'>* This program is free software; you can redistribute it and/or</span></td></tr>
+<tr class="codeline" data-linenumber="5"><td class="num" id="LN5">5</td><td class="line"> <span class='comment'>* modify it under the terms of the GNU General Public License as</span></td></tr>
+<tr class="codeline" data-linenumber="6"><td class="num" id="LN6">6</td><td class="line"> <span class='comment'>* published by the Free Software Foundation; either version 2 of the</span></td></tr>
+<tr class="codeline" data-linenumber="7"><td class="num" id="LN7">7</td><td class="line"> <span class='comment'>* License, or (at your option) any later version.</span></td></tr>
+<tr class="codeline" data-linenumber="8"><td class="num" id="LN8">8</td><td class="line"> <span class='comment'>*</span></td></tr>
+<tr class="codeline" data-linenumber="9"><td class="num" id="LN9">9</td><td class="line"> <span class='comment'>* This program is distributed in the hope that it will be useful, but</span></td></tr>
+<tr class="codeline" data-linenumber="10"><td class="num" id="LN10">10</td><td class="line"> <span class='comment'>* WITHOUT ANY WARRANTY; without even the implied warranty of</span></td></tr>
+<tr class="codeline" data-linenumber="11"><td class="num" id="LN11">11</td><td class="line"> <span class='comment'>* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU</span></td></tr>
+<tr class="codeline" data-linenumber="12"><td class="num" id="LN12">12</td><td class="line"> <span class='comment'>* General Public License for more details.</span></td></tr>
+<tr class="codeline" data-linenumber="13"><td class="num" id="LN13">13</td><td class="line"> <span class='comment'>*</span></td></tr>
+<tr class="codeline" data-linenumber="14"><td class="num" id="LN14">14</td><td class="line"> <span class='comment'>* You should have received a copy of the GNU General Public License</span></td></tr>
+<tr class="codeline" data-linenumber="15"><td class="num" id="LN15">15</td><td class="line"> <span class='comment'>* along with this program; if not, see</span></td></tr>
+<tr class="codeline" data-linenumber="16"><td class="num" id="LN16">16</td><td class="line"> <span class='comment'>* &lt;http://www.gnu.org/licenses/&gt;.</span></td></tr>
+<tr class="codeline" data-linenumber="17"><td class="num" id="LN17">17</td><td class="line"> <span class='comment'>*/</span></td></tr>
+<tr class="codeline" data-linenumber="18"><td class="num" id="LN18">18</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="19"><td class="num" id="LN19">19</td><td class="line"><span class='comment'>/*</span></td></tr>
+<tr class="codeline" data-linenumber="20"><td class="num" id="LN20">20</td><td class="line"> <span class='comment'>* Formulas from:</span></td></tr>
+<tr class="codeline" data-linenumber="21"><td class="num" id="LN21">21</td><td class="line"> <span class='comment'>* "Practical Astronomy With Your Calculator" (3e), Peter Duffett-Smith</span></td></tr>
+<tr class="codeline" data-linenumber="22"><td class="num" id="LN22">22</td><td class="line"> <span class='comment'>* Cambridge University Press 1988</span></td></tr>
+<tr class="codeline" data-linenumber="23"><td class="num" id="LN23">23</td><td class="line"> <span class='comment'>* Unless otherwise noted, comments referencing "steps" are related to</span></td></tr>
+<tr class="codeline" data-linenumber="24"><td class="num" id="LN24">24</td><td class="line"> <span class='comment'>* the algorithm presented in section 49 of above</span></td></tr>
+<tr class="codeline" data-linenumber="25"><td class="num" id="LN25">25</td><td class="line"> <span class='comment'>*/</span></td></tr>
+<tr class="codeline" data-linenumber="26"><td class="num" id="LN26">26</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="27"><td class="num" id="LN27">27</td><td class="line"><span class='directive'>#ifdef <span class='macro'>HAVE_CONFIG_H<span class='macro_popup'>1</span></span></span></td></tr>
+<tr class="codeline" data-linenumber="28"><td class="num" id="LN28">28</td><td class="line"><span class='directive'>#include &lt;config.h&gt;</span></td></tr>
+<tr class="codeline" data-linenumber="29"><td class="num" id="LN29">29</td><td class="line"><span class='directive'>#endif</span></td></tr>
+<tr class="codeline" data-linenumber="30"><td class="num" id="LN30">30</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="31"><td class="num" id="LN31">31</td><td class="line"><span class='directive'>#include &lt;math.h&gt;</span></td></tr>
+<tr class="codeline" data-linenumber="32"><td class="num" id="LN32">32</td><td class="line"><span class='directive'>#include &lt;time.h&gt;</span></td></tr>
+<tr class="codeline" data-linenumber="33"><td class="num" id="LN33">33</td><td class="line"><span class='directive'>#include &lt;glib.h&gt;</span></td></tr>
+<tr class="codeline" data-linenumber="34"><td class="num" id="LN34">34</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="35"><td class="num" id="LN35">35</td><td class="line"><span class='directive'>#define MATEWEATHER_I_KNOW_THIS_IS_UNSTABLE</span></td></tr>
+<tr class="codeline" data-linenumber="36"><td class="num" id="LN36">36</td><td class="line"><span class='directive'>#include "weather-priv.h"</span></td></tr>
+<tr class="codeline" data-linenumber="37"><td class="num" id="LN37">37</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="38"><td class="num" id="LN38">38</td><td class="line"><span class='directive'>#define <span class='macro'>ECCENTRICITY(d)<span class='macro_popup'>(0.01671123 - (d)/36525.*0.00004392)</span></span> (0.01671123 - (d)/36525.*0.00004392)</span></td></tr>
+<tr class="codeline" data-linenumber="39"><td class="num" id="LN39">39</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="40"><td class="num" id="LN40">40</td><td class="line"><span class='comment'>/*</span></td></tr>
+<tr class="codeline" data-linenumber="41"><td class="num" id="LN41">41</td><td class="line"> <span class='comment'>* Ecliptic longitude of the sun at specified time (UT)</span></td></tr>
+<tr class="codeline" data-linenumber="42"><td class="num" id="LN42">42</td><td class="line"> <span class='comment'>* The algoithm is described in section 47 of Duffett-Smith</span></td></tr>
+<tr class="codeline" data-linenumber="43"><td class="num" id="LN43">43</td><td class="line"> <span class='comment'>* Return value is in radians</span></td></tr>
+<tr class="codeline" data-linenumber="44"><td class="num" id="LN44">44</td><td class="line"> <span class='comment'>*/</span></td></tr>
+<tr class="codeline" data-linenumber="45"><td class="num" id="LN45">45</td><td class="line">gdouble</td></tr>
+<tr class="codeline" data-linenumber="46"><td class="num" id="LN46">46</td><td class="line">sunEclipLongitude(time_t t)</td></tr>
+<tr class="codeline" data-linenumber="47"><td class="num" id="LN47">47</td><td class="line">{</td></tr>
+<tr class="codeline" data-linenumber="48"><td class="num" id="LN48">48</td><td class="line"> gdouble ndays, meanAnom, eccenAnom, delta, e, longitude;</td></tr>
+<tr class="codeline" data-linenumber="49"><td class="num" id="LN49">49</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="50"><td class="num" id="LN50">50</td><td class="line"> <span class='comment'>/*</span></td></tr>
+<tr class="codeline" data-linenumber="51"><td class="num" id="LN51">51</td><td class="line"> <span class='comment'>* Start with an estimate based on a fixed daily rate</span></td></tr>
+<tr class="codeline" data-linenumber="52"><td class="num" id="LN52">52</td><td class="line"> <span class='comment'>*/</span></td></tr>
+<tr class="codeline" data-linenumber="53"><td class="num" id="LN53">53</td><td class="line"> ndays = <span class='macro'>EPOCH_TO_J2000(t)<span class='macro_popup'>((gdouble)(t)-946727935.816)</span></span> / 86400.;</td></tr>
+<tr class="codeline" data-linenumber="54"><td class="num" id="LN54">54</td><td class="line"> meanAnom = <span class='macro'>DEGREES_TO_RADIANS(MEAN_ECLIPTIC_LONGITUDE(ndays)<span class='macro_popup'>((fmod (((280.46457166 + (ndays)/36525.*35999.37244981) - (282.93768193<br> + (ndays)/36525.*0.32327364)),360.) / 180.) * 3.14159265358979323846<br>)</span></span></td></tr>
+<tr class="codeline" data-linenumber="55"><td class="num" id="LN55">55</td><td class="line"> <span class='macro'>- PERIGEE_LONGITUDE(ndays))<span class='macro_popup'>((fmod (((280.46457166 + (ndays)/36525.*35999.37244981) - (282.93768193<br> + (ndays)/36525.*0.32327364)),360.) / 180.) * 3.14159265358979323846<br>)</span></span>;</td></tr>
+<tr class="codeline" data-linenumber="56"><td class="num" id="LN56">56</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="57"><td class="num" id="LN57">57</td><td class="line"> <span class='comment'>/*</span></td></tr>
+<tr class="codeline" data-linenumber="58"><td class="num" id="LN58">58</td><td class="line"> <span class='comment'>* Approximate solution of Kepler's equation:</span></td></tr>
+<tr class="codeline" data-linenumber="59"><td class="num" id="LN59">59</td><td class="line"> <span class='comment'>* Find E which satisfies E - e sin(E) = M (mean anomaly)</span></td></tr>
+<tr class="codeline" data-linenumber="60"><td class="num" id="LN60">60</td><td class="line"> <span class='comment'>*/</span></td></tr>
+<tr class="codeline" data-linenumber="61"><td class="num" id="LN61">61</td><td class="line"> eccenAnom = meanAnom;</td></tr>
+<tr class="codeline" data-linenumber="62"><td class="num" id="LN62">62</td><td class="line"> e = <span class='macro'>ECCENTRICITY(ndays)<span class='macro_popup'>(0.01671123 - (ndays)/36525.*0.00004392)</span></span>;</td></tr>
+<tr class="codeline" data-linenumber="63"><td class="num" id="LN63">63</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="64"><td class="num" id="LN64">64</td><td class="line"> <span class='keyword'>while</span> (1e-12 &lt; fabs( delta = eccenAnom - e * sin(eccenAnom) - meanAnom))</td></tr>
+<tr class="codeline" data-linenumber="65"><td class="num" id="LN65">65</td><td class="line"> {</td></tr>
+<tr class="codeline" data-linenumber="66"><td class="num" id="LN66">66</td><td class="line"> eccenAnom -= delta / (1.- e * cos(eccenAnom));</td></tr>
+<tr class="codeline" data-linenumber="67"><td class="num" id="LN67">67</td><td class="line"> }</td></tr>
+<tr class="codeline" data-linenumber="68"><td class="num" id="LN68">68</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="69"><td class="num" id="LN69">69</td><td class="line"> <span class='comment'>/*</span></td></tr>
+<tr class="codeline" data-linenumber="70"><td class="num" id="LN70">70</td><td class="line"> <span class='comment'>* Earth's longitude on the ecliptic</span></td></tr>
+<tr class="codeline" data-linenumber="71"><td class="num" id="LN71">71</td><td class="line"> <span class='comment'>*/</span></td></tr>
+<tr class="codeline" data-linenumber="72"><td class="num" id="LN72">72</td><td class="line"> longitude = fmod( <span class='macro'>DEGREES_TO_RADIANS (PERIGEE_LONGITUDE(ndays))<span class='macro_popup'>((fmod (((282.93768193 + (ndays)/36525.*0.32327364)),360.) / 180.<br>) * 3.14159265358979323846)</span></span></td></tr>
+<tr class="codeline" data-linenumber="73"><td class="num" id="LN73">73</td><td class="line"> + 2. * atan (sqrt ((1.+e)/(1.-e))</td></tr>
+<tr class="codeline" data-linenumber="74"><td class="num" id="LN74">74</td><td class="line"> * tan (eccenAnom / 2.)),</td></tr>
+<tr class="codeline" data-linenumber="75"><td class="num" id="LN75">75</td><td class="line"> 2. * <span class='macro'>M_PI<span class='macro_popup'>3.14159265358979323846</span></span>);</td></tr>
+<tr class="codeline" data-linenumber="76"><td class="num" id="LN76">76</td><td class="line"> <span class='keyword'>if</span> (longitude &lt; 0.) {</td></tr>
+<tr class="codeline" data-linenumber="77"><td class="num" id="LN77">77</td><td class="line"> longitude += 2 * <span class='macro'>M_PI<span class='macro_popup'>3.14159265358979323846</span></span>;</td></tr>
+<tr class="codeline" data-linenumber="78"><td class="num" id="LN78">78</td><td class="line"> }</td></tr>
+<tr class="codeline" data-linenumber="79"><td class="num" id="LN79">79</td><td class="line"> <span class='keyword'>return</span> longitude;</td></tr>
+<tr class="codeline" data-linenumber="80"><td class="num" id="LN80">80</td><td class="line">}</td></tr>
+<tr class="codeline" data-linenumber="81"><td class="num" id="LN81">81</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="82"><td class="num" id="LN82">82</td><td class="line"><span class='keyword'>static</span> gdouble</td></tr>
+<tr class="codeline" data-linenumber="83"><td class="num" id="LN83">83</td><td class="line">ecliptic_obliquity (gdouble time)</td></tr>
+<tr class="codeline" data-linenumber="84"><td class="num" id="LN84">84</td><td class="line">{</td></tr>
+<tr class="codeline" data-linenumber="85"><td class="num" id="LN85">85</td><td class="line"> gdouble jc = <span class='macro'>EPOCH_TO_J2000 (time)<span class='macro_popup'>((gdouble)(time)-946727935.816)</span></span> / (36525. * 86400.);</td></tr>
+<tr class="codeline" data-linenumber="86"><td class="num" id="LN86">86</td><td class="line"> gdouble eclip_secs = (84381.448</td></tr>
+<tr class="codeline" data-linenumber="87"><td class="num" id="LN87">87</td><td class="line"> - (46.84024 * jc)</td></tr>
+<tr class="codeline" data-linenumber="88"><td class="num" id="LN88">88</td><td class="line"> - (59.e-5 * jc * jc)</td></tr>
+<tr class="codeline" data-linenumber="89"><td class="num" id="LN89">89</td><td class="line"> + (1.813e-3 * jc * jc * jc));</td></tr>
+<tr class="codeline" data-linenumber="90"><td class="num" id="LN90">90</td><td class="line"> <span class='keyword'>return</span> <span class='macro'>DEGREES_TO_RADIANS(eclip_secs / 3600.)<span class='macro_popup'>((fmod ((eclip_secs / 3600.),360.) / 180.) * 3.14159265358979323846<br>)</span></span>;</td></tr>
+<tr class="codeline" data-linenumber="91"><td class="num" id="LN91">91</td><td class="line">}</td></tr>
+<tr class="codeline" data-linenumber="92"><td class="num" id="LN92">92</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="93"><td class="num" id="LN93">93</td><td class="line"><span class='comment'>/*</span></td></tr>
+<tr class="codeline" data-linenumber="94"><td class="num" id="LN94">94</td><td class="line"> <span class='comment'>* Convert ecliptic longitude and latitude (radians) to equitorial</span></td></tr>
+<tr class="codeline" data-linenumber="95"><td class="num" id="LN95">95</td><td class="line"> <span class='comment'>* coordinates, expressed as right ascension (hours) and</span></td></tr>
+<tr class="codeline" data-linenumber="96"><td class="num" id="LN96">96</td><td class="line"> <span class='comment'>* declination (radians)</span></td></tr>
+<tr class="codeline" data-linenumber="97"><td class="num" id="LN97">97</td><td class="line"> <span class='comment'>*/</span></td></tr>
+<tr class="codeline" data-linenumber="98"><td class="num" id="LN98">98</td><td class="line"><span class='keyword'>void</span></td></tr>
+<tr class="codeline" data-linenumber="99"><td class="num" id="LN99">99</td><td class="line">ecl2equ (gdouble time,</td></tr>
+<tr class="codeline" data-linenumber="100"><td class="num" id="LN100">100</td><td class="line"> gdouble eclipLon, gdouble eclipLat,</td></tr>
+<tr class="codeline" data-linenumber="101"><td class="num" id="LN101">101</td><td class="line"> gdouble *ra, gdouble *decl)</td></tr>
+<tr class="codeline" data-linenumber="102"><td class="num" id="LN102">102</td><td class="line">{</td></tr>
+<tr class="codeline" data-linenumber="103"><td class="num" id="LN103">103</td><td class="line"> gdouble mEclipObliq = ecliptic_obliquity(time);</td></tr>
+<tr class="codeline" data-linenumber="104"><td class="num" id="LN104">104</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="105"><td class="num" id="LN105">105</td><td class="line"> <span class='keyword'>if</span> (ra) {</td></tr>
+<tr class="codeline" data-linenumber="106"><td class="num" id="LN106">106</td><td class="line"> *ra = <span class='macro'>RADIANS_TO_HOURS (atan2 ((sin (eclipLon) * cos (mEclipObliq)<span class='macro_popup'>((atan2 ((sin (eclipLon) * cos (mEclipObliq) - tan (eclipLat)<br> * sin(mEclipObliq)), cos (eclipLon))) * 12. / 3.14159265358979323846<br>)</span></span></td></tr>
+<tr class="codeline" data-linenumber="107"><td class="num" id="LN107">107</td><td class="line"> <span class='macro'>- tan (eclipLat) * sin(mEclipObliq)),<span class='macro_popup'>((atan2 ((sin (eclipLon) * cos (mEclipObliq) - tan (eclipLat)<br> * sin(mEclipObliq)), cos (eclipLon))) * 12. / 3.14159265358979323846<br>)</span></span></td></tr>
+<tr class="codeline" data-linenumber="108"><td class="num" id="LN108">108</td><td class="line"> <span class='macro'>cos (eclipLon)))<span class='macro_popup'>((atan2 ((sin (eclipLon) * cos (mEclipObliq) - tan (eclipLat)<br> * sin(mEclipObliq)), cos (eclipLon))) * 12. / 3.14159265358979323846<br>)</span></span>;</td></tr>
+<tr class="codeline" data-linenumber="109"><td class="num" id="LN109">109</td><td class="line"> <span class='keyword'>if</span> (*ra &lt; 0.)</td></tr>
+<tr class="codeline" data-linenumber="110"><td class="num" id="LN110">110</td><td class="line"> *ra += 24.;</td></tr>
+<tr class="codeline" data-linenumber="111"><td class="num" id="LN111">111</td><td class="line"> }</td></tr>
+<tr class="codeline" data-linenumber="112"><td class="num" id="LN112">112</td><td class="line"> <span class='keyword'>if</span> (decl) {</td></tr>
+<tr class="codeline" data-linenumber="113"><td class="num" id="LN113">113</td><td class="line"> *decl = asin (( sin (eclipLat) * cos (mEclipObliq))</td></tr>
+<tr class="codeline" data-linenumber="114"><td class="num" id="LN114">114</td><td class="line"> + cos (eclipLat) * sin (mEclipObliq) * sin(eclipLon));</td></tr>
+<tr class="codeline" data-linenumber="115"><td class="num" id="LN115">115</td><td class="line"> }</td></tr>
+<tr class="codeline" data-linenumber="116"><td class="num" id="LN116">116</td><td class="line">}</td></tr>
+<tr class="codeline" data-linenumber="117"><td class="num" id="LN117">117</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="118"><td class="num" id="LN118">118</td><td class="line"><span class='comment'>/*</span></td></tr>
+<tr class="codeline" data-linenumber="119"><td class="num" id="LN119">119</td><td class="line"> <span class='comment'>* Calculate rising and setting times for an object</span></td></tr>
+<tr class="codeline" data-linenumber="120"><td class="num" id="LN120">120</td><td class="line"> <span class='comment'>* based on it equitorial coordinates (section 33 &amp; 15)</span></td></tr>
+<tr class="codeline" data-linenumber="121"><td class="num" id="LN121">121</td><td class="line"> <span class='comment'>* Returned "rise" and "set" values are sideral times in hours</span></td></tr>
+<tr class="codeline" data-linenumber="122"><td class="num" id="LN122">122</td><td class="line"> <span class='comment'>*/</span></td></tr>
+<tr class="codeline" data-linenumber="123"><td class="num" id="LN123">123</td><td class="line"><span class='keyword'>static</span> <span class='keyword'>void</span></td></tr>
+<tr class="codeline" data-linenumber="124"><td class="num" id="LN124">124</td><td class="line">gstObsv (gdouble ra, gdouble decl,</td></tr>
+<tr class="codeline" data-linenumber="125"><td class="num" id="LN125">125</td><td class="line"> gdouble obsLat, gdouble obsLon,</td></tr>
+<tr class="codeline" data-linenumber="126"><td class="num" id="LN126">126</td><td class="line"> gdouble *rise, gdouble *set)</td></tr>
+<tr class="codeline" data-linenumber="127"><td class="num" id="LN127">127</td><td class="line">{</td></tr>
+<tr class="codeline" data-linenumber="128"><td class="num" id="LN128">128</td><td class="line"> <span class='keyword'>double</span> a = acos (-tan (obsLat) * tan (decl));</td></tr>
+<tr class="codeline" data-linenumber="129"><td class="num" id="LN129">129</td><td class="line"> <span class='keyword'>double</span> b;</td></tr>
+<tr class="codeline" data-linenumber="130"><td class="num" id="LN130">130</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="131"><td class="num" id="LN131">131</td><td class="line"> <span class='keyword'>if</span> (<span class='macro'>isnan (a)<span class='macro_popup'>__builtin_isnan (a)</span></span> != 0) {</td></tr>
+<tr class="codeline" data-linenumber="132"><td class="num" id="LN132">132</td><td class="line"> *set = *rise = a;</td></tr>
+<tr class="codeline" data-linenumber="133"><td class="num" id="LN133">133</td><td class="line"> <span class='keyword'>return</span>;</td></tr>
+<tr class="codeline" data-linenumber="134"><td class="num" id="LN134">134</td><td class="line"> }</td></tr>
+<tr class="codeline" data-linenumber="135"><td class="num" id="LN135">135</td><td class="line"> a = <span class='macro'>RADIANS_TO_HOURS (a)<span class='macro_popup'>((a) * 12. / 3.14159265358979323846)</span></span>;</td></tr>
+<tr class="codeline" data-linenumber="136"><td class="num" id="LN136">136</td><td class="line"> b = 24. - a + ra;</td></tr>
+<tr class="codeline" data-linenumber="137"><td class="num" id="LN137">137</td><td class="line"> a += ra;</td></tr>
+<tr class="codeline" data-linenumber="138"><td class="num" id="LN138">138</td><td class="line"> a -= <span class='macro'>RADIANS_TO_HOURS (obsLon)<span class='macro_popup'>((obsLon) * 12. / 3.14159265358979323846)</span></span>;</td></tr>
+<tr class="codeline" data-linenumber="139"><td class="num" id="LN139">139</td><td class="line"> b -= <span class='macro'>RADIANS_TO_HOURS (obsLon)<span class='macro_popup'>((obsLon) * 12. / 3.14159265358979323846)</span></span>;</td></tr>
+<tr class="codeline" data-linenumber="140"><td class="num" id="LN140">140</td><td class="line"> <span class='keyword'>if</span> ((a = fmod (a, 24.)) &lt; 0)</td></tr>
+<tr class="codeline" data-linenumber="141"><td class="num" id="LN141">141</td><td class="line"> a += 24.;</td></tr>
+<tr class="codeline" data-linenumber="142"><td class="num" id="LN142">142</td><td class="line"> <span class='keyword'>if</span> ((b = fmod (b, 24.)) &lt; 0)</td></tr>
+<tr class="codeline" data-linenumber="143"><td class="num" id="LN143">143</td><td class="line"> b += 24.;</td></tr>
+<tr class="codeline" data-linenumber="144"><td class="num" id="LN144">144</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="145"><td class="num" id="LN145">145</td><td class="line"> *set = a;</td></tr>
+<tr class="codeline" data-linenumber="146"><td class="num" id="LN146">146</td><td class="line"> *rise = b;</td></tr>
+<tr class="codeline" data-linenumber="147"><td class="num" id="LN147">147</td><td class="line">}</td></tr>
+<tr class="codeline" data-linenumber="148"><td class="num" id="LN148">148</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="149"><td class="num" id="LN149">149</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="150"><td class="num" id="LN150">150</td><td class="line"><span class='keyword'>static</span> gdouble</td></tr>
+<tr class="codeline" data-linenumber="151"><td class="num" id="LN151">151</td><td class="line">t0 (time_t date)</td></tr>
+<tr class="codeline" data-linenumber="152"><td class="num" id="LN152">152</td><td class="line">{</td></tr>
+<tr class="codeline" data-linenumber="153"><td class="num" id="LN153">153</td><td class="line"> gdouble t = ((gdouble)(<span class='macro'>EPOCH_TO_J2000 (date)<span class='macro_popup'>((gdouble)(date)-946727935.816)</span></span> / 86400)) / 36525.0;</td></tr>
+<tr class="codeline" data-linenumber="154"><td class="num" id="LN154">154</td><td class="line"> gdouble t0 = fmod (6.697374558 + 2400.051366 * t + 2.5862e-5 * t * t, 24.);</td></tr>
+<tr class="codeline" data-linenumber="155"><td class="num" id="LN155">155</td><td class="line"> <span class='keyword'>if</span> (t0 &lt; 0.)</td></tr>
+<tr class="codeline" data-linenumber="156"><td class="num" id="LN156">156</td><td class="line"> t0 += 24.;</td></tr>
+<tr class="codeline" data-linenumber="157"><td class="num" id="LN157">157</td><td class="line"> <span class='keyword'>return</span> t0;</td></tr>
+<tr class="codeline" data-linenumber="158"><td class="num" id="LN158">158</td><td class="line">}</td></tr>
+<tr class="codeline" data-linenumber="159"><td class="num" id="LN159">159</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="160"><td class="num" id="LN160">160</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="161"><td class="num" id="LN161">161</td><td class="line"><span class='keyword'>static</span> gboolean</td></tr>
+<tr class="codeline" data-linenumber="162"><td class="num" id="LN162">162</td><td class="line">calc_sun2 (WeatherInfo *info, time_t t)</td></tr>
+<tr class="codeline" data-linenumber="163"><td class="num" id="LN163">163</td><td class="line">{</td></tr>
+<tr class="codeline" data-linenumber="164"><td class="num" id="LN164">164</td><td class="line"> gdouble obsLat = info-&gt;location-&gt;latitude;</td></tr>
+<tr class="codeline" data-linenumber="165"><td class="num" id="LN165">165</td><td class="line"> gdouble <span class="mrange">obsLon</span> = <span class="mrange">info-&gt;location-&gt;longitude</span>;</td></tr>
+<tr><td class="num"></td><td class="line"><div id="EndPath" class="msg msgEvent" style="margin-left:13ex">Value stored to 'obsLon' during its initialization is never read</div></td></tr>
+<tr class="codeline" data-linenumber="166"><td class="num" id="LN166">166</td><td class="line"> time_t gm_midn;</td></tr>
+<tr class="codeline" data-linenumber="167"><td class="num" id="LN167">167</td><td class="line"> time_t lcl_midn;</td></tr>
+<tr class="codeline" data-linenumber="168"><td class="num" id="LN168">168</td><td class="line"> gdouble gm_hoff, lambda;</td></tr>
+<tr class="codeline" data-linenumber="169"><td class="num" id="LN169">169</td><td class="line"> gdouble ra1, ra2;</td></tr>
+<tr class="codeline" data-linenumber="170"><td class="num" id="LN170">170</td><td class="line"> gdouble decl1, decl2;</td></tr>
+<tr class="codeline" data-linenumber="171"><td class="num" id="LN171">171</td><td class="line"> gdouble decl_midn, decl_noon;</td></tr>
+<tr class="codeline" data-linenumber="172"><td class="num" id="LN172">172</td><td class="line"> gdouble rise1, rise2;</td></tr>
+<tr class="codeline" data-linenumber="173"><td class="num" id="LN173">173</td><td class="line"> gdouble set1, set2;</td></tr>
+<tr class="codeline" data-linenumber="174"><td class="num" id="LN174">174</td><td class="line"> gdouble tt, t00;</td></tr>
+<tr class="codeline" data-linenumber="175"><td class="num" id="LN175">175</td><td class="line"> gdouble x, u, dt;</td></tr>
+<tr class="codeline" data-linenumber="176"><td class="num" id="LN176">176</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="177"><td class="num" id="LN177">177</td><td class="line"> <span class='comment'>/* Approximate preceding local midnight at observer's longitude */</span></td></tr>
+<tr class="codeline" data-linenumber="178"><td class="num" id="LN178">178</td><td class="line"> obsLat = info-&gt;location-&gt;latitude;</td></tr>
+<tr class="codeline" data-linenumber="179"><td class="num" id="LN179">179</td><td class="line"> obsLon = info-&gt;location-&gt;longitude;</td></tr>
+<tr class="codeline" data-linenumber="180"><td class="num" id="LN180">180</td><td class="line"> gm_midn = t - (t % 86400);</td></tr>
+<tr class="codeline" data-linenumber="181"><td class="num" id="LN181">181</td><td class="line"> gm_hoff = floor ((<span class='macro'>RADIANS_TO_DEGREES (obsLon)<span class='macro_popup'>((obsLon) * 180. / 3.14159265358979323846)</span></span> + 7.5) / 15.);</td></tr>
+<tr class="codeline" data-linenumber="182"><td class="num" id="LN182">182</td><td class="line"> lcl_midn = gm_midn - 3600. * gm_hoff;</td></tr>
+<tr class="codeline" data-linenumber="183"><td class="num" id="LN183">183</td><td class="line"> <span class='keyword'>if</span> (t - lcl_midn &gt;= 86400)</td></tr>
+<tr class="codeline" data-linenumber="184"><td class="num" id="LN184">184</td><td class="line"> lcl_midn += 86400;</td></tr>
+<tr class="codeline" data-linenumber="185"><td class="num" id="LN185">185</td><td class="line"> <span class='keyword'>else</span> <span class='keyword'>if</span> (lcl_midn &gt; t)</td></tr>
+<tr class="codeline" data-linenumber="186"><td class="num" id="LN186">186</td><td class="line"> lcl_midn -= 86400;</td></tr>
+<tr class="codeline" data-linenumber="187"><td class="num" id="LN187">187</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="188"><td class="num" id="LN188">188</td><td class="line"> lambda = sunEclipLongitude (lcl_midn);</td></tr>
+<tr class="codeline" data-linenumber="189"><td class="num" id="LN189">189</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="190"><td class="num" id="LN190">190</td><td class="line"> <span class='comment'>/*</span></td></tr>
+<tr class="codeline" data-linenumber="191"><td class="num" id="LN191">191</td><td class="line"> <span class='comment'>* Calculate equitorial coordinates of sun at previous</span></td></tr>
+<tr class="codeline" data-linenumber="192"><td class="num" id="LN192">192</td><td class="line"> <span class='comment'>* and next local midnights</span></td></tr>
+<tr class="codeline" data-linenumber="193"><td class="num" id="LN193">193</td><td class="line"> <span class='comment'>*/</span></td></tr>
+<tr class="codeline" data-linenumber="194"><td class="num" id="LN194">194</td><td class="line"> ecl2equ (lcl_midn, lambda, 0., &amp;ra1, &amp;decl1);</td></tr>
+<tr class="codeline" data-linenumber="195"><td class="num" id="LN195">195</td><td class="line"> ecl2equ (lcl_midn + 86400.,</td></tr>
+<tr class="codeline" data-linenumber="196"><td class="num" id="LN196">196</td><td class="line"> lambda + <span class='macro'>DEGREES_TO_RADIANS(SOL_PROGRESSION)<span class='macro_popup'>((fmod (((360./365.242191)),360.) / 180.) * 3.14159265358979323846<br>)</span></span>, 0.,</td></tr>
+<tr class="codeline" data-linenumber="197"><td class="num" id="LN197">197</td><td class="line"> &amp;ra2, &amp;decl2);</td></tr>
+<tr class="codeline" data-linenumber="198"><td class="num" id="LN198">198</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="199"><td class="num" id="LN199">199</td><td class="line"> <span class='comment'>/*</span></td></tr>
+<tr class="codeline" data-linenumber="200"><td class="num" id="LN200">200</td><td class="line"> <span class='comment'>* If the observer is within the Arctic or Antarctic Circles then</span></td></tr>
+<tr class="codeline" data-linenumber="201"><td class="num" id="LN201">201</td><td class="line"> <span class='comment'>* the sun may be above or below the horizon for the full day.</span></td></tr>
+<tr class="codeline" data-linenumber="202"><td class="num" id="LN202">202</td><td class="line"> <span class='comment'>*/</span></td></tr>
+<tr class="codeline" data-linenumber="203"><td class="num" id="LN203">203</td><td class="line"> decl_midn = <span class='macro'>MIN(decl1,decl2)<span class='macro_popup'>(((decl1) &lt; (decl2)) ? (decl1) : (decl2))</span></span>;</td></tr>
+<tr class="codeline" data-linenumber="204"><td class="num" id="LN204">204</td><td class="line"> decl_noon = (decl1+decl2)/2.;</td></tr>
+<tr class="codeline" data-linenumber="205"><td class="num" id="LN205">205</td><td class="line"> info-&gt;midnightSun =</td></tr>
+<tr class="codeline" data-linenumber="206"><td class="num" id="LN206">206</td><td class="line"> (obsLat &gt; (<span class='macro'>M_PI<span class='macro_popup'>3.14159265358979323846</span></span>/2.-decl_midn)) || (obsLat &lt; (-<span class='macro'>M_PI<span class='macro_popup'>3.14159265358979323846</span></span>/2.-decl_midn));</td></tr>
+<tr class="codeline" data-linenumber="207"><td class="num" id="LN207">207</td><td class="line"> info-&gt;polarNight =</td></tr>
+<tr class="codeline" data-linenumber="208"><td class="num" id="LN208">208</td><td class="line"> (obsLat &gt; (<span class='macro'>M_PI<span class='macro_popup'>3.14159265358979323846</span></span>/2.+decl_noon)) || (obsLat &lt; (-<span class='macro'>M_PI<span class='macro_popup'>3.14159265358979323846</span></span>/2.+decl_noon));</td></tr>
+<tr class="codeline" data-linenumber="209"><td class="num" id="LN209">209</td><td class="line"> <span class='keyword'>if</span> (info-&gt;midnightSun || info-&gt;polarNight) {</td></tr>
+<tr class="codeline" data-linenumber="210"><td class="num" id="LN210">210</td><td class="line"> info-&gt;sunriseValid = info-&gt;sunsetValid = <span class='macro'>FALSE<span class='macro_popup'>(0)</span></span>;</td></tr>
+<tr class="codeline" data-linenumber="211"><td class="num" id="LN211">211</td><td class="line"> <span class='keyword'>return</span> <span class='macro'>FALSE<span class='macro_popup'>(0)</span></span>;</td></tr>
+<tr class="codeline" data-linenumber="212"><td class="num" id="LN212">212</td><td class="line"> }</td></tr>
+<tr class="codeline" data-linenumber="213"><td class="num" id="LN213">213</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="214"><td class="num" id="LN214">214</td><td class="line"> <span class='comment'>/*</span></td></tr>
+<tr class="codeline" data-linenumber="215"><td class="num" id="LN215">215</td><td class="line"> <span class='comment'>* Convert to rise and set times based positions for the preceding</span></td></tr>
+<tr class="codeline" data-linenumber="216"><td class="num" id="LN216">216</td><td class="line"> <span class='comment'>* and following local midnights.</span></td></tr>
+<tr class="codeline" data-linenumber="217"><td class="num" id="LN217">217</td><td class="line"> <span class='comment'>*/</span></td></tr>
+<tr class="codeline" data-linenumber="218"><td class="num" id="LN218">218</td><td class="line"> gstObsv (ra1, decl1, obsLat, obsLon - (gm_hoff * <span class='macro'>M_PI<span class='macro_popup'>3.14159265358979323846</span></span> / 12.), &amp;rise1, &amp;set1);</td></tr>
+<tr class="codeline" data-linenumber="219"><td class="num" id="LN219">219</td><td class="line"> gstObsv (ra2, decl2, obsLat, obsLon - (gm_hoff * <span class='macro'>M_PI<span class='macro_popup'>3.14159265358979323846</span></span> / 12.), &amp;rise2, &amp;set2);</td></tr>
+<tr class="codeline" data-linenumber="220"><td class="num" id="LN220">220</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="221"><td class="num" id="LN221">221</td><td class="line"> <span class='comment'>/* TODO: include calculations for regions near the poles. */</span></td></tr>
+<tr class="codeline" data-linenumber="222"><td class="num" id="LN222">222</td><td class="line"> <span class='keyword'>if</span> (<span class='macro'>isnan(rise1)<span class='macro_popup'>__builtin_isnan (rise1)</span></span> || <span class='macro'>isnan(rise2)<span class='macro_popup'>__builtin_isnan (rise2)</span></span>) {</td></tr>
+<tr class="codeline" data-linenumber="223"><td class="num" id="LN223">223</td><td class="line"> info-&gt;sunriseValid = info-&gt;sunsetValid = <span class='macro'>FALSE<span class='macro_popup'>(0)</span></span>;</td></tr>
+<tr class="codeline" data-linenumber="224"><td class="num" id="LN224">224</td><td class="line"> <span class='keyword'>return</span> <span class='macro'>FALSE<span class='macro_popup'>(0)</span></span>;</td></tr>
+<tr class="codeline" data-linenumber="225"><td class="num" id="LN225">225</td><td class="line"> }</td></tr>
+<tr class="codeline" data-linenumber="226"><td class="num" id="LN226">226</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="227"><td class="num" id="LN227">227</td><td class="line"> <span class='keyword'>if</span> (rise2 &lt; rise1) {</td></tr>
+<tr class="codeline" data-linenumber="228"><td class="num" id="LN228">228</td><td class="line"> rise2 += 24.;</td></tr>
+<tr class="codeline" data-linenumber="229"><td class="num" id="LN229">229</td><td class="line"> }</td></tr>
+<tr class="codeline" data-linenumber="230"><td class="num" id="LN230">230</td><td class="line"> <span class='keyword'>if</span> (set2 &lt; set1) {</td></tr>
+<tr class="codeline" data-linenumber="231"><td class="num" id="LN231">231</td><td class="line"> set2 += 24.;</td></tr>
+<tr class="codeline" data-linenumber="232"><td class="num" id="LN232">232</td><td class="line"> }</td></tr>
+<tr class="codeline" data-linenumber="233"><td class="num" id="LN233">233</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="234"><td class="num" id="LN234">234</td><td class="line"> tt = t0(lcl_midn);</td></tr>
+<tr class="codeline" data-linenumber="235"><td class="num" id="LN235">235</td><td class="line"> t00 = tt - (gm_hoff + <span class='macro'>RADIANS_TO_HOURS(obsLon)<span class='macro_popup'>((obsLon) * 12. / 3.14159265358979323846)</span></span>) * 1.002737909;</td></tr>
+<tr class="codeline" data-linenumber="236"><td class="num" id="LN236">236</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="237"><td class="num" id="LN237">237</td><td class="line"> <span class='keyword'>if</span> (t00 &lt; 0.)</td></tr>
+<tr class="codeline" data-linenumber="238"><td class="num" id="LN238">238</td><td class="line"> t00 += 24.;</td></tr>
+<tr class="codeline" data-linenumber="239"><td class="num" id="LN239">239</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="240"><td class="num" id="LN240">240</td><td class="line"> <span class='keyword'>if</span> (rise1 &lt; t00) {</td></tr>
+<tr class="codeline" data-linenumber="241"><td class="num" id="LN241">241</td><td class="line"> rise1 += 24.;</td></tr>
+<tr class="codeline" data-linenumber="242"><td class="num" id="LN242">242</td><td class="line"> rise2 += 24.;</td></tr>
+<tr class="codeline" data-linenumber="243"><td class="num" id="LN243">243</td><td class="line"> }</td></tr>
+<tr class="codeline" data-linenumber="244"><td class="num" id="LN244">244</td><td class="line"> <span class='keyword'>if</span> (set1 &lt; t00) {</td></tr>
+<tr class="codeline" data-linenumber="245"><td class="num" id="LN245">245</td><td class="line"> set1 += 24.;</td></tr>
+<tr class="codeline" data-linenumber="246"><td class="num" id="LN246">246</td><td class="line"> set2 += 24.;</td></tr>
+<tr class="codeline" data-linenumber="247"><td class="num" id="LN247">247</td><td class="line"> }</td></tr>
+<tr class="codeline" data-linenumber="248"><td class="num" id="LN248">248</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="249"><td class="num" id="LN249">249</td><td class="line"> <span class='comment'>/*</span></td></tr>
+<tr class="codeline" data-linenumber="250"><td class="num" id="LN250">250</td><td class="line"> <span class='comment'>* Interpolate between the two to get a rise and set time</span></td></tr>
+<tr class="codeline" data-linenumber="251"><td class="num" id="LN251">251</td><td class="line"> <span class='comment'>* based on the sun's position at local noon (step 8)</span></td></tr>
+<tr class="codeline" data-linenumber="252"><td class="num" id="LN252">252</td><td class="line"> <span class='comment'>*/</span></td></tr>
+<tr class="codeline" data-linenumber="253"><td class="num" id="LN253">253</td><td class="line"> rise1 = (24.07 * rise1 - t00 * (rise2 - rise1)) / (24.07 + rise1 - rise2);</td></tr>
+<tr class="codeline" data-linenumber="254"><td class="num" id="LN254">254</td><td class="line"> set1 = (24.07 * set1 - t00 * (set2 - set1)) / (24.07 + set1 - set2);</td></tr>
+<tr class="codeline" data-linenumber="255"><td class="num" id="LN255">255</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="256"><td class="num" id="LN256">256</td><td class="line"> <span class='comment'>/*</span></td></tr>
+<tr class="codeline" data-linenumber="257"><td class="num" id="LN257">257</td><td class="line"> <span class='comment'>* Calculate an adjustment value to account for parallax,</span></td></tr>
+<tr class="codeline" data-linenumber="258"><td class="num" id="LN258">258</td><td class="line"> <span class='comment'>* refraction and the Sun's finite diameter (steps 9,10)</span></td></tr>
+<tr class="codeline" data-linenumber="259"><td class="num" id="LN259">259</td><td class="line"> <span class='comment'>*/</span></td></tr>
+<tr class="codeline" data-linenumber="260"><td class="num" id="LN260">260</td><td class="line"> decl2 = (decl1 + decl2) / 2.;</td></tr>
+<tr class="codeline" data-linenumber="261"><td class="num" id="LN261">261</td><td class="line"> x = <span class='macro'>DEGREES_TO_RADIANS(0.830725)<span class='macro_popup'>((fmod ((0.830725),360.) / 180.) * 3.14159265358979323846)</span></span>;</td></tr>
+<tr class="codeline" data-linenumber="262"><td class="num" id="LN262">262</td><td class="line"> u = acos ( sin(obsLat) / cos(decl2) );</td></tr>
+<tr class="codeline" data-linenumber="263"><td class="num" id="LN263">263</td><td class="line"> dt = <span class='macro'>RADIANS_TO_HOURS ( asin ( sin(x) / sin(u) ) / cos(decl2) )<span class='macro_popup'>((asin ( sin(x) / sin(u) ) / cos(decl2)) * 12. / 3.14159265358979323846<br>)</span></span>;</td></tr>
+<tr class="codeline" data-linenumber="264"><td class="num" id="LN264">264</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="265"><td class="num" id="LN265">265</td><td class="line"> <span class='comment'>/*</span></td></tr>
+<tr class="codeline" data-linenumber="266"><td class="num" id="LN266">266</td><td class="line"> <span class='comment'>* Subtract the correction value from sunrise and add to sunset,</span></td></tr>
+<tr class="codeline" data-linenumber="267"><td class="num" id="LN267">267</td><td class="line"> <span class='comment'>* then (step 11) convert sideral times to UT</span></td></tr>
+<tr class="codeline" data-linenumber="268"><td class="num" id="LN268">268</td><td class="line"> <span class='comment'>*/</span></td></tr>
+<tr class="codeline" data-linenumber="269"><td class="num" id="LN269">269</td><td class="line"> rise1 = (rise1 - dt - tt) * 0.9972695661;</td></tr>
+<tr class="codeline" data-linenumber="270"><td class="num" id="LN270">270</td><td class="line"> <span class='keyword'>if</span> (rise1 &lt; 0.)</td></tr>
+<tr class="codeline" data-linenumber="271"><td class="num" id="LN271">271</td><td class="line"> rise1 += 24;</td></tr>
+<tr class="codeline" data-linenumber="272"><td class="num" id="LN272">272</td><td class="line"> <span class='keyword'>else</span> <span class='keyword'>if</span> (rise1 &gt;= 24.)</td></tr>
+<tr class="codeline" data-linenumber="273"><td class="num" id="LN273">273</td><td class="line"> rise1 -= 24.;</td></tr>
+<tr class="codeline" data-linenumber="274"><td class="num" id="LN274">274</td><td class="line"> info-&gt;sunriseValid = ((rise1 &gt;= 0.) &amp;&amp; (rise1 &lt; 24.));</td></tr>
+<tr class="codeline" data-linenumber="275"><td class="num" id="LN275">275</td><td class="line"> info-&gt;sunrise = (rise1 * 3600.) + lcl_midn;</td></tr>
+<tr class="codeline" data-linenumber="276"><td class="num" id="LN276">276</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="277"><td class="num" id="LN277">277</td><td class="line"> set1 = (set1 + dt - tt) * 0.9972695661;</td></tr>
+<tr class="codeline" data-linenumber="278"><td class="num" id="LN278">278</td><td class="line"> <span class='keyword'>if</span> (set1 &lt; 0.)</td></tr>
+<tr class="codeline" data-linenumber="279"><td class="num" id="LN279">279</td><td class="line"> set1 += 24;</td></tr>
+<tr class="codeline" data-linenumber="280"><td class="num" id="LN280">280</td><td class="line"> <span class='keyword'>else</span> <span class='keyword'>if</span> (set1 &gt;= 24.)</td></tr>
+<tr class="codeline" data-linenumber="281"><td class="num" id="LN281">281</td><td class="line"> set1 -= 24.;</td></tr>
+<tr class="codeline" data-linenumber="282"><td class="num" id="LN282">282</td><td class="line"> info-&gt;sunsetValid = ((set1 &gt;= 0.) &amp;&amp; (set1 &lt; 24.));</td></tr>
+<tr class="codeline" data-linenumber="283"><td class="num" id="LN283">283</td><td class="line"> info-&gt;sunset = (set1 * 3600.) + lcl_midn;</td></tr>
+<tr class="codeline" data-linenumber="284"><td class="num" id="LN284">284</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="285"><td class="num" id="LN285">285</td><td class="line"> <span class='keyword'>return</span> (info-&gt;sunriseValid || info-&gt;sunsetValid);</td></tr>
+<tr class="codeline" data-linenumber="286"><td class="num" id="LN286">286</td><td class="line">}</td></tr>
+<tr class="codeline" data-linenumber="287"><td class="num" id="LN287">287</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="288"><td class="num" id="LN288">288</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="289"><td class="num" id="LN289">289</td><td class="line"><span class='comment'>/**</span></td></tr>
+<tr class="codeline" data-linenumber="290"><td class="num" id="LN290">290</td><td class="line"> <span class='comment'>* calc_sun_time:</span></td></tr>
+<tr class="codeline" data-linenumber="291"><td class="num" id="LN291">291</td><td class="line"> <span class='comment'>* @info: #WeatherInfo structure containing the observer's latitude</span></td></tr>
+<tr class="codeline" data-linenumber="292"><td class="num" id="LN292">292</td><td class="line"> <span class='comment'>* and longitude in radians, fills in the sunrise and sunset times.</span></td></tr>
+<tr class="codeline" data-linenumber="293"><td class="num" id="LN293">293</td><td class="line"> <span class='comment'>* @t: time_t</span></td></tr>
+<tr class="codeline" data-linenumber="294"><td class="num" id="LN294">294</td><td class="line"> <span class='comment'>*</span></td></tr>
+<tr class="codeline" data-linenumber="295"><td class="num" id="LN295">295</td><td class="line"> <span class='comment'>* Returns: gboolean indicating if the results are valid.</span></td></tr>
+<tr class="codeline" data-linenumber="296"><td class="num" id="LN296">296</td><td class="line"> <span class='comment'>*/</span></td></tr>
+<tr class="codeline" data-linenumber="297"><td class="num" id="LN297">297</td><td class="line">gboolean</td></tr>
+<tr class="codeline" data-linenumber="298"><td class="num" id="LN298">298</td><td class="line">calc_sun_time (WeatherInfo *info, time_t t)</td></tr>
+<tr class="codeline" data-linenumber="299"><td class="num" id="LN299">299</td><td class="line">{</td></tr>
+<tr class="codeline" data-linenumber="300"><td class="num" id="LN300">300</td><td class="line"> <span class='keyword'>return</span> info-&gt;location-&gt;latlon_valid &amp;&amp; calc_sun2 (info, t);</td></tr>
+<tr class="codeline" data-linenumber="301"><td class="num" id="LN301">301</td><td class="line">}</td></tr>
+<tr class="codeline" data-linenumber="302"><td class="num" id="LN302">302</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="303"><td class="num" id="LN303">303</td><td class="line"><span class='comment'>/**</span></td></tr>
+<tr class="codeline" data-linenumber="304"><td class="num" id="LN304">304</td><td class="line"> <span class='comment'>* calc_sun:</span></td></tr>
+<tr class="codeline" data-linenumber="305"><td class="num" id="LN305">305</td><td class="line"> <span class='comment'>* @info: #WeatherInfo structure containing the observer's latitude</span></td></tr>
+<tr class="codeline" data-linenumber="306"><td class="num" id="LN306">306</td><td class="line"> <span class='comment'>* and longitude in radians, fills in the sunrise and sunset times.</span></td></tr>
+<tr class="codeline" data-linenumber="307"><td class="num" id="LN307">307</td><td class="line"> <span class='comment'>*</span></td></tr>
+<tr class="codeline" data-linenumber="308"><td class="num" id="LN308">308</td><td class="line"> <span class='comment'>* Returns: gboolean indicating if the results are valid.</span></td></tr>
+<tr class="codeline" data-linenumber="309"><td class="num" id="LN309">309</td><td class="line"> <span class='comment'>*/</span></td></tr>
+<tr class="codeline" data-linenumber="310"><td class="num" id="LN310">310</td><td class="line">gboolean</td></tr>
+<tr class="codeline" data-linenumber="311"><td class="num" id="LN311">311</td><td class="line">calc_sun (WeatherInfo *info)</td></tr>
+<tr class="codeline" data-linenumber="312"><td class="num" id="LN312">312</td><td class="line">{</td></tr>
+<tr class="codeline" data-linenumber="313"><td class="num" id="LN313">313</td><td class="line"> <span class='keyword'>return</span> calc_sun_time(info, time(<span class='macro'>NULL<span class='macro_popup'>((void*)0)</span></span>));</td></tr>
+<tr class="codeline" data-linenumber="314"><td class="num" id="LN314">314</td><td class="line">}</td></tr>
+<tr class="codeline" data-linenumber="315"><td class="num" id="LN315">315</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="316"><td class="num" id="LN316">316</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="317"><td class="num" id="LN317">317</td><td class="line"><span class='comment'>/**</span></td></tr>
+<tr class="codeline" data-linenumber="318"><td class="num" id="LN318">318</td><td class="line"> <span class='comment'>* weather_info_next_sun_event:</span></td></tr>
+<tr class="codeline" data-linenumber="319"><td class="num" id="LN319">319</td><td class="line"> <span class='comment'>* @info: #WeatherInfo structure</span></td></tr>
+<tr class="codeline" data-linenumber="320"><td class="num" id="LN320">320</td><td class="line"> <span class='comment'>*</span></td></tr>
+<tr class="codeline" data-linenumber="321"><td class="num" id="LN321">321</td><td class="line"> <span class='comment'>* Returns: the interval, in seconds, until the next "sun event":</span></td></tr>
+<tr class="codeline" data-linenumber="322"><td class="num" id="LN322">322</td><td class="line"> <span class='comment'>* - local midnight, when rise and set times are recomputed</span></td></tr>
+<tr class="codeline" data-linenumber="323"><td class="num" id="LN323">323</td><td class="line"> <span class='comment'>* - next sunrise, when icon changes to daytime version</span></td></tr>
+<tr class="codeline" data-linenumber="324"><td class="num" id="LN324">324</td><td class="line"> <span class='comment'>* - next sunset, when icon changes to nighttime version</span></td></tr>
+<tr class="codeline" data-linenumber="325"><td class="num" id="LN325">325</td><td class="line"> <span class='comment'>*/</span></td></tr>
+<tr class="codeline" data-linenumber="326"><td class="num" id="LN326">326</td><td class="line">gint</td></tr>
+<tr class="codeline" data-linenumber="327"><td class="num" id="LN327">327</td><td class="line">weather_info_next_sun_event (WeatherInfo *info)</td></tr>
+<tr class="codeline" data-linenumber="328"><td class="num" id="LN328">328</td><td class="line">{</td></tr>
+<tr class="codeline" data-linenumber="329"><td class="num" id="LN329">329</td><td class="line"> time_t now = time (<span class='macro'>NULL<span class='macro_popup'>((void*)0)</span></span>);</td></tr>
+<tr class="codeline" data-linenumber="330"><td class="num" id="LN330">330</td><td class="line"> <span class='keyword'>struct</span> tm ltm;</td></tr>
+<tr class="codeline" data-linenumber="331"><td class="num" id="LN331">331</td><td class="line"> time_t nxtEvent;</td></tr>
+<tr class="codeline" data-linenumber="332"><td class="num" id="LN332">332</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="333"><td class="num" id="LN333">333</td><td class="line"> <span class='macro'>g_return_val_if_fail (info != NULL, -1)<span class='macro_popup'>do { if ((__builtin_expect (__extension__ ({ int _g_boolean_var_<br>; if (info != ((void*)0)) _g_boolean_var_ = 1; else _g_boolean_var_<br> = 0; _g_boolean_var_; }), 1))) { } else { g_return_if_fail_warning<br> ("MateWeather", ((const char*) (__func__)), "info != NULL");<br> return (-1); } } while (0)</span></span>;</td></tr>
+<tr class="codeline" data-linenumber="334"><td class="num" id="LN334">334</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="335"><td class="num" id="LN335">335</td><td class="line"> <span class='keyword'>if</span> (!calc_sun (info))</td></tr>
+<tr class="codeline" data-linenumber="336"><td class="num" id="LN336">336</td><td class="line"> <span class='keyword'>return</span> -1;</td></tr>
+<tr class="codeline" data-linenumber="337"><td class="num" id="LN337">337</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="338"><td class="num" id="LN338">338</td><td class="line"> <span class='comment'>/* Determine when the next local midnight occurs */</span></td></tr>
+<tr class="codeline" data-linenumber="339"><td class="num" id="LN339">339</td><td class="line"> (<span class='keyword'>void</span>) localtime_r (&amp;now, &amp;ltm);</td></tr>
+<tr class="codeline" data-linenumber="340"><td class="num" id="LN340">340</td><td class="line"> ltm.tm_sec = 0;</td></tr>
+<tr class="codeline" data-linenumber="341"><td class="num" id="LN341">341</td><td class="line"> ltm.tm_min = 0;</td></tr>
+<tr class="codeline" data-linenumber="342"><td class="num" id="LN342">342</td><td class="line"> ltm.tm_hour = 0;</td></tr>
+<tr class="codeline" data-linenumber="343"><td class="num" id="LN343">343</td><td class="line"> ltm.tm_mday++;</td></tr>
+<tr class="codeline" data-linenumber="344"><td class="num" id="LN344">344</td><td class="line"> nxtEvent = mktime (&amp;ltm);</td></tr>
+<tr class="codeline" data-linenumber="345"><td class="num" id="LN345">345</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="346"><td class="num" id="LN346">346</td><td class="line"> <span class='keyword'>if</span> (info-&gt;sunsetValid &amp;&amp;</td></tr>
+<tr class="codeline" data-linenumber="347"><td class="num" id="LN347">347</td><td class="line"> (info-&gt;sunset &gt; now) &amp;&amp; (info-&gt;sunset &lt; nxtEvent))</td></tr>
+<tr class="codeline" data-linenumber="348"><td class="num" id="LN348">348</td><td class="line"> nxtEvent = info-&gt;sunset;</td></tr>
+<tr class="codeline" data-linenumber="349"><td class="num" id="LN349">349</td><td class="line"> <span class='keyword'>if</span> (info-&gt;sunriseValid &amp;&amp;</td></tr>
+<tr class="codeline" data-linenumber="350"><td class="num" id="LN350">350</td><td class="line"> (info-&gt;sunrise &gt; now) &amp;&amp; (info-&gt;sunrise &lt; nxtEvent))</td></tr>
+<tr class="codeline" data-linenumber="351"><td class="num" id="LN351">351</td><td class="line"> nxtEvent = info-&gt;sunrise;</td></tr>
+<tr class="codeline" data-linenumber="352"><td class="num" id="LN352">352</td><td class="line"> <span class='keyword'>return</span> (gint)(nxtEvent - now);</td></tr>
+<tr class="codeline" data-linenumber="353"><td class="num" id="LN353">353</td><td class="line">}</td></tr>
+</table></body></html>
diff --git a/[email protected]_travis-ci/report-94e15c.html b/[email protected]_travis-ci/report-94e15c.html
new file mode 100644
index 0000000..54027e2
--- /dev/null
+++ b/[email protected]_travis-ci/report-94e15c.html
@@ -0,0 +1,912 @@
+<!doctype html>
+<html>
+<head>
+<title>weather-metar.c</title>
+
+<style type="text/css">
+body { color:#000000; background-color:#ffffff }
+body { font-family:Helvetica, sans-serif; font-size:10pt }
+h1 { font-size:14pt }
+.FileName { margin-top: 5px; margin-bottom: 5px; display: inline; }
+.FileNav { margin-left: 5px; margin-right: 5px; display: inline; }
+.FileNav a { text-decoration:none; font-size: larger; }
+.divider { margin-top: 30px; margin-bottom: 30px; height: 15px; }
+.divider { background-color: gray; }
+.code { border-collapse:collapse; width:100%; }
+.code { font-family: "Monospace", monospace; font-size:10pt }
+.code { line-height: 1.2em }
+.comment { color: green; font-style: oblique }
+.keyword { color: blue }
+.string_literal { color: red }
+.directive { color: darkmagenta }
+
+/* Macros and variables could have pop-up notes hidden by default.
+ - Macro pop-up: expansion of the macro
+ - Variable pop-up: value (table) of the variable */
+.macro_popup, .variable_popup { display: none; }
+
+/* Pop-up appears on mouse-hover event. */
+.macro:hover .macro_popup, .variable:hover .variable_popup {
+ display: block;
+ padding: 2px;
+ -webkit-border-radius:5px;
+ -webkit-box-shadow:1px 1px 7px #000;
+ border-radius:5px;
+ box-shadow:1px 1px 7px #000;
+ position: absolute;
+ top: -1em;
+ left:10em;
+ z-index: 1
+}
+
+.macro_popup {
+ border: 2px solid red;
+ background-color:#FFF0F0;
+ font-weight: normal;
+}
+
+.variable_popup {
+ border: 2px solid blue;
+ background-color:#F0F0FF;
+ font-weight: bold;
+ font-family: Helvetica, sans-serif;
+ font-size: 9pt;
+}
+
+/* Pop-up notes needs a relative position as a base where they pops up. */
+.macro, .variable {
+ background-color: PaleGoldenRod;
+ position: relative;
+}
+.macro { color: DarkMagenta; }
+
+#tooltiphint {
+ position: fixed;
+ width: 50em;
+ margin-left: -25em;
+ left: 50%;
+ padding: 10px;
+ border: 1px solid #b0b0b0;
+ border-radius: 2px;
+ box-shadow: 1px 1px 7px black;
+ background-color: #c0c0c0;
+ z-index: 2;
+}
+
+.num { width:2.5em; padding-right:2ex; background-color:#eeeeee }
+.num { text-align:right; font-size:8pt }
+.num { color:#444444 }
+.line { padding-left: 1ex; border-left: 3px solid #ccc }
+.line { white-space: pre }
+.msg { -webkit-box-shadow:1px 1px 7px #000 }
+.msg { box-shadow:1px 1px 7px #000 }
+.msg { -webkit-border-radius:5px }
+.msg { border-radius:5px }
+.msg { font-family:Helvetica, sans-serif; font-size:8pt }
+.msg { float:left }
+.msg { padding:0.25em 1ex 0.25em 1ex }
+.msg { margin-top:10px; margin-bottom:10px }
+.msg { font-weight:bold }
+.msg { max-width:60em; word-wrap: break-word; white-space: pre-wrap }
+.msgT { padding:0x; spacing:0x }
+.msgEvent { background-color:#fff8b4; color:#000000 }
+.msgControl { background-color:#bbbbbb; color:#000000 }
+.msgNote { background-color:#ddeeff; color:#000000 }
+.mrange { background-color:#dfddf3 }
+.mrange { border-bottom:1px solid #6F9DBE }
+.PathIndex { font-weight: bold; padding:0px 5px; margin-right:5px; }
+.PathIndex { -webkit-border-radius:8px }
+.PathIndex { border-radius:8px }
+.PathIndexEvent { background-color:#bfba87 }
+.PathIndexControl { background-color:#8c8c8c }
+.PathIndexPopUp { background-color: #879abc; }
+.PathNav a { text-decoration:none; font-size: larger }
+.CodeInsertionHint { font-weight: bold; background-color: #10dd10 }
+.CodeRemovalHint { background-color:#de1010 }
+.CodeRemovalHint { border-bottom:1px solid #6F9DBE }
+.selected{ background-color:orange !important; }
+
+table.simpletable {
+ padding: 5px;
+ font-size:12pt;
+ margin:20px;
+ border-collapse: collapse; border-spacing: 0px;
+}
+td.rowname {
+ text-align: right;
+ vertical-align: top;
+ font-weight: bold;
+ color:#444444;
+ padding-right:2ex;
+}
+
+/* Hidden text. */
+input.spoilerhider + label {
+ cursor: pointer;
+ text-decoration: underline;
+ display: block;
+}
+input.spoilerhider {
+ display: none;
+}
+input.spoilerhider ~ .spoiler {
+ overflow: hidden;
+ margin: 10px auto 0;
+ height: 0;
+ opacity: 0;
+}
+input.spoilerhider:checked + label + .spoiler{
+ height: auto;
+ opacity: 1;
+}
+</style>
+</head>
+<body>
+<!-- BUGDESC Value stored to 'i' is never read -->
+
+<!-- BUGTYPE Dead assignment -->
+
+<!-- BUGCATEGORY Dead store -->
+
+<!-- BUGFILE /rootdir/libmateweather/weather-metar.c -->
+
+<!-- FILENAME weather-metar.c -->
+
+<!-- FUNCTIONNAME metar_parse -->
+
+<!-- ISSUEHASHCONTENTOFLINEINCONTEXT d766a0e5bf18a00e3f5446f823316a7b -->
+
+<!-- BUGLINE 454 -->
+
+<!-- BUGCOLUMN 5 -->
+
+<!-- BUGPATHLENGTH 1 -->
+
+<!-- BUGMETAEND -->
+<!-- REPORTHEADER -->
+<h3>Bug Summary</h3>
+<table class="simpletable">
+<tr><td class="rowname">File:</td><td>weather-metar.c</td></tr>
+<tr><td class="rowname">Warning:</td><td><a href="#EndPath">line 454, column 5</a><br />Value stored to 'i' is never read</td></tr>
+
+</table>
+<!-- REPORTSUMMARYEXTRA -->
+<h3>Annotated Source Code</h3>
+<p>Press <a href="#" onclick="toggleHelp(); return false;">'?'</a>
+ to see keyboard shortcuts</p>
+<input type="checkbox" class="spoilerhider" id="showinvocation" />
+<label for="showinvocation" >Show analyzer invocation</label>
+<div class="spoiler">clang -cc1 -triple x86_64-unknown-linux-gnu -analyze -disable-free -disable-llvm-verifier -discard-value-names -main-file-name weather-metar.c -analyzer-store=region -analyzer-opt-analyze-nested-blocks -analyzer-checker=core -analyzer-checker=apiModeling -analyzer-checker=unix -analyzer-checker=deadcode -analyzer-checker=security.insecureAPI.UncheckedReturn -analyzer-checker=security.insecureAPI.getpw -analyzer-checker=security.insecureAPI.gets -analyzer-checker=security.insecureAPI.mktemp -analyzer-checker=security.insecureAPI.mkstemp -analyzer-checker=security.insecureAPI.vfork -analyzer-checker=nullability.NullPassedToNonnull -analyzer-checker=nullability.NullReturnedFromNonnull -analyzer-output plist -w -mrelocation-model pic -pic-level 2 -mthread-model posix -fmath-errno -masm-verbose -mconstructor-aliases -munwind-tables -fuse-init-array -target-cpu x86-64 -dwarf-column-info -debugger-tuning=gdb -momit-leaf-frame-pointer -resource-dir /usr/lib64/clang/9.0.1 -D HAVE_CONFIG_H -I . -I .. -I /usr/include/gtk-3.0 -I /usr/include/pango-1.0 -I /usr/include/glib-2.0 -I /usr/lib64/glib-2.0/include -I /usr/include/harfbuzz -I /usr/include/fribidi -I /usr/include/freetype2 -I /usr/include/libpng16 -I /usr/include/cairo -I /usr/include/pixman-1 -I /usr/include/gdk-pixbuf-2.0 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/gio-unix-2.0 -I /usr/include/libdrm -I /usr/include/atk-1.0 -I /usr/include/at-spi2-atk/2.0 -I /usr/include/dbus-1.0 -I /usr/lib64/dbus-1.0/include -I /usr/include/at-spi-2.0 -I .. -I . -I /usr/include/libxml2 -I /usr/include/libsoup-2.4 -I /usr/include/glib-2.0 -I /usr/lib64/glib-2.0/include -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/libxml2 -I /usr/include/glib-2.0 -I /usr/lib64/glib-2.0/include -I /usr/include/libmount -I /usr/include/blkid -D G_LOG_DOMAIN="MateWeather" -D MATELOCALEDIR="/usr/local/share/locale" -D MATEWEATHER_XML_LOCATION_DIR="/usr/local/share/libmateweather" -D PIC -internal-isystem /usr/local/include -internal-isystem /usr/lib64/clang/9.0.1/include -internal-externc-isystem /include -internal-externc-isystem /usr/include -O2 -Wno-unused-parameter -Wno-sign-compare -fdebug-compilation-dir /rootdir/libmateweather -ferror-limit 19 -fmessage-length 0 -fobjc-runtime=gcc -fdiagnostics-show-option -vectorize-loops -vectorize-slp -analyzer-checker deadcode.DeadStores -analyzer-checker alpha.deadcode.UnreachableCode -analyzer-checker alpha.core.CastSize -analyzer-checker alpha.core.CastToStruct -analyzer-checker alpha.core.IdenticalExpr -analyzer-checker alpha.core.SizeofPtr -analyzer-checker alpha.security.ArrayBoundV2 -analyzer-checker alpha.security.MallocOverflow -analyzer-checker alpha.security.ReturnPtrRange -analyzer-checker alpha.unix.SimpleStream -analyzer-checker alpha.unix.cstring.BufferOverlap -analyzer-checker alpha.unix.cstring.NotNullTerminated -analyzer-checker alpha.unix.cstring.OutOfBounds -analyzer-checker alpha.core.FixedAddr -analyzer-checker security.insecureAPI.strcpy -analyzer-output=html -faddrsig -o /rootdir/html-report/2020-06-22-141506-5642-1 -x c weather-metar.c
+</div>
+<div id='tooltiphint' hidden="true">
+ <p>Keyboard shortcuts: </p>
+ <ul>
+ <li>Use 'j/k' keys for keyboard navigation</li>
+ <li>Use 'Shift+S' to show/hide relevant lines</li>
+ <li>Use '?' to toggle this window</li>
+ </ul>
+ <a href="#" onclick="toggleHelp(); return false;">Close</a>
+</div>
+<script type='text/javascript'>
+var relevant_lines = {"1": {"454": 1}};
+
+var filterCounterexample = function (hide) {
+ var tables = document.getElementsByClassName("code");
+ for (var t=0; t<tables.length; t++) {
+ var table = tables[t];
+ var file_id = table.getAttribute("data-fileid");
+ var lines_in_fid = relevant_lines[file_id];
+ if (!lines_in_fid) {
+ lines_in_fid = {};
+ }
+ var lines = table.getElementsByClassName("codeline");
+ for (var i=0; i<lines.length; i++) {
+ var el = lines[i];
+ var lineNo = el.getAttribute("data-linenumber");
+ if (!lines_in_fid[lineNo]) {
+ if (hide) {
+ el.setAttribute("hidden", "");
+ } else {
+ el.removeAttribute("hidden");
+ }
+ }
+ }
+ }
+}
+
+window.addEventListener("keydown", function (event) {
+ if (event.defaultPrevented) {
+ return;
+ }
+ if (event.key == "S") {
+ var checked = document.getElementsByName("showCounterexample")[0].checked;
+ filterCounterexample(!checked);
+ document.getElementsByName("showCounterexample")[0].checked = !checked;
+ } else {
+ return;
+ }
+ event.preventDefault();
+}, true);
+
+document.addEventListener("DOMContentLoaded", function() {
+ document.querySelector('input[name="showCounterexample"]').onchange=
+ function (event) {
+ filterCounterexample(this.checked);
+ };
+});
+</script>
+
+<form>
+ <input type="checkbox" name="showCounterexample" id="showCounterexample" />
+ <label for="showCounterexample">
+ Show only relevant lines
+ </label>
+</form>
+
+<script type='text/javascript'>
+var digitMatcher = new RegExp("[0-9]+");
+
+document.addEventListener("DOMContentLoaded", function() {
+ document.querySelectorAll(".PathNav > a").forEach(
+ function(currentValue, currentIndex) {
+ var hrefValue = currentValue.getAttribute("href");
+ currentValue.onclick = function() {
+ scrollTo(document.querySelector(hrefValue));
+ return false;
+ };
+ });
+});
+
+var findNum = function() {
+ var s = document.querySelector(".selected");
+ if (!s || s.id == "EndPath") {
+ return 0;
+ }
+ var out = parseInt(digitMatcher.exec(s.id)[0]);
+ return out;
+};
+
+var scrollTo = function(el) {
+ document.querySelectorAll(".selected").forEach(function(s) {
+ s.classList.remove("selected");
+ });
+ el.classList.add("selected");
+ window.scrollBy(0, el.getBoundingClientRect().top -
+ (window.innerHeight / 2));
+}
+
+var move = function(num, up, numItems) {
+ if (num == 1 && up || num == numItems - 1 && !up) {
+ return 0;
+ } else if (num == 0 && up) {
+ return numItems - 1;
+ } else if (num == 0 && !up) {
+ return 1 % numItems;
+ }
+ return up ? num - 1 : num + 1;
+}
+
+var numToId = function(num) {
+ if (num == 0) {
+ return document.getElementById("EndPath")
+ }
+ return document.getElementById("Path" + num);
+};
+
+var navigateTo = function(up) {
+ var numItems = document.querySelectorAll(
+ ".line > .msgEvent, .line > .msgControl").length;
+ var currentSelected = findNum();
+ var newSelected = move(currentSelected, up, numItems);
+ var newEl = numToId(newSelected, numItems);
+
+ // Scroll element into center.
+ scrollTo(newEl);
+};
+
+window.addEventListener("keydown", function (event) {
+ if (event.defaultPrevented) {
+ return;
+ }
+ if (event.key == "j") {
+ navigateTo(/*up=*/false);
+ } else if (event.key == "k") {
+ navigateTo(/*up=*/true);
+ } else {
+ return;
+ }
+ event.preventDefault();
+}, true);
+</script>
+
+<script type='text/javascript'>
+
+var toggleHelp = function() {
+ var hint = document.querySelector("#tooltiphint");
+ var attributeName = "hidden";
+ if (hint.hasAttribute(attributeName)) {
+ hint.removeAttribute(attributeName);
+ } else {
+ hint.setAttribute("hidden", "true");
+ }
+};
+window.addEventListener("keydown", function (event) {
+ if (event.defaultPrevented) {
+ return;
+ }
+ if (event.key == "?") {
+ toggleHelp();
+ } else {
+ return;
+ }
+ event.preventDefault();
+});
+</script>
+<table class="code" data-fileid="1">
+<tr class="codeline" data-linenumber="1"><td class="num" id="LN1">1</td><td class="line"><span class='comment'>/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 4 -*- */</span></td></tr>
+<tr class="codeline" data-linenumber="2"><td class="num" id="LN2">2</td><td class="line"><span class='comment'>/* weather-metar.c - Weather server functions (METAR)</span></td></tr>
+<tr class="codeline" data-linenumber="3"><td class="num" id="LN3">3</td><td class="line"> <span class='comment'>*</span></td></tr>
+<tr class="codeline" data-linenumber="4"><td class="num" id="LN4">4</td><td class="line"> <span class='comment'>* This program is free software; you can redistribute it and/or</span></td></tr>
+<tr class="codeline" data-linenumber="5"><td class="num" id="LN5">5</td><td class="line"> <span class='comment'>* modify it under the terms of the GNU General Public License as</span></td></tr>
+<tr class="codeline" data-linenumber="6"><td class="num" id="LN6">6</td><td class="line"> <span class='comment'>* published by the Free Software Foundation; either version 2 of the</span></td></tr>
+<tr class="codeline" data-linenumber="7"><td class="num" id="LN7">7</td><td class="line"> <span class='comment'>* License, or (at your option) any later version.</span></td></tr>
+<tr class="codeline" data-linenumber="8"><td class="num" id="LN8">8</td><td class="line"> <span class='comment'>*</span></td></tr>
+<tr class="codeline" data-linenumber="9"><td class="num" id="LN9">9</td><td class="line"> <span class='comment'>* This program is distributed in the hope that it will be useful, but</span></td></tr>
+<tr class="codeline" data-linenumber="10"><td class="num" id="LN10">10</td><td class="line"> <span class='comment'>* WITHOUT ANY WARRANTY; without even the implied warranty of</span></td></tr>
+<tr class="codeline" data-linenumber="11"><td class="num" id="LN11">11</td><td class="line"> <span class='comment'>* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU</span></td></tr>
+<tr class="codeline" data-linenumber="12"><td class="num" id="LN12">12</td><td class="line"> <span class='comment'>* General Public License for more details.</span></td></tr>
+<tr class="codeline" data-linenumber="13"><td class="num" id="LN13">13</td><td class="line"> <span class='comment'>*</span></td></tr>
+<tr class="codeline" data-linenumber="14"><td class="num" id="LN14">14</td><td class="line"> <span class='comment'>* You should have received a copy of the GNU General Public License</span></td></tr>
+<tr class="codeline" data-linenumber="15"><td class="num" id="LN15">15</td><td class="line"> <span class='comment'>* along with this program; if not, see</span></td></tr>
+<tr class="codeline" data-linenumber="16"><td class="num" id="LN16">16</td><td class="line"> <span class='comment'>* &lt;http://www.gnu.org/licenses/&gt;.</span></td></tr>
+<tr class="codeline" data-linenumber="17"><td class="num" id="LN17">17</td><td class="line"> <span class='comment'>*/</span></td></tr>
+<tr class="codeline" data-linenumber="18"><td class="num" id="LN18">18</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="19"><td class="num" id="LN19">19</td><td class="line"><span class='directive'>#ifdef <span class='macro'>HAVE_CONFIG_H<span class='macro_popup'>1</span></span></span></td></tr>
+<tr class="codeline" data-linenumber="20"><td class="num" id="LN20">20</td><td class="line"><span class='directive'>#include &lt;config.h&gt;</span></td></tr>
+<tr class="codeline" data-linenumber="21"><td class="num" id="LN21">21</td><td class="line"><span class='directive'>#endif</span></td></tr>
+<tr class="codeline" data-linenumber="22"><td class="num" id="LN22">22</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="23"><td class="num" id="LN23">23</td><td class="line"><span class='directive'>#include &lt;stdlib.h&gt;</span></td></tr>
+<tr class="codeline" data-linenumber="24"><td class="num" id="LN24">24</td><td class="line"><span class='directive'>#include &lt;string.h&gt;</span></td></tr>
+<tr class="codeline" data-linenumber="25"><td class="num" id="LN25">25</td><td class="line"><span class='directive'>#include &lt;sys/types.h&gt;</span></td></tr>
+<tr class="codeline" data-linenumber="26"><td class="num" id="LN26">26</td><td class="line"><span class='directive'>#include &lt;regex.h&gt;</span></td></tr>
+<tr class="codeline" data-linenumber="27"><td class="num" id="LN27">27</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="28"><td class="num" id="LN28">28</td><td class="line"><span class='directive'>#define MATEWEATHER_I_KNOW_THIS_IS_UNSTABLE</span></td></tr>
+<tr class="codeline" data-linenumber="29"><td class="num" id="LN29">29</td><td class="line"><span class='directive'>#include "weather.h"</span></td></tr>
+<tr class="codeline" data-linenumber="30"><td class="num" id="LN30">30</td><td class="line"><span class='directive'>#include "weather-priv.h"</span></td></tr>
+<tr class="codeline" data-linenumber="31"><td class="num" id="LN31">31</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="32"><td class="num" id="LN32">32</td><td class="line"><span class='keyword'>enum</span> {</td></tr>
+<tr class="codeline" data-linenumber="33"><td class="num" id="LN33">33</td><td class="line"> TIME_RE,</td></tr>
+<tr class="codeline" data-linenumber="34"><td class="num" id="LN34">34</td><td class="line"> WIND_RE,</td></tr>
+<tr class="codeline" data-linenumber="35"><td class="num" id="LN35">35</td><td class="line"> VIS_RE,</td></tr>
+<tr class="codeline" data-linenumber="36"><td class="num" id="LN36">36</td><td class="line"> COND_RE,</td></tr>
+<tr class="codeline" data-linenumber="37"><td class="num" id="LN37">37</td><td class="line"> CLOUD_RE,</td></tr>
+<tr class="codeline" data-linenumber="38"><td class="num" id="LN38">38</td><td class="line"> TEMP_RE,</td></tr>
+<tr class="codeline" data-linenumber="39"><td class="num" id="LN39">39</td><td class="line"> PRES_RE,</td></tr>
+<tr class="codeline" data-linenumber="40"><td class="num" id="LN40">40</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="41"><td class="num" id="LN41">41</td><td class="line"> RE_NUM</td></tr>
+<tr class="codeline" data-linenumber="42"><td class="num" id="LN42">42</td><td class="line">};</td></tr>
+<tr class="codeline" data-linenumber="43"><td class="num" id="LN43">43</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="44"><td class="num" id="LN44">44</td><td class="line"><span class='comment'>/* Return time of weather report as secs since epoch UTC */</span></td></tr>
+<tr class="codeline" data-linenumber="45"><td class="num" id="LN45">45</td><td class="line"><span class='keyword'>static</span> time_t</td></tr>
+<tr class="codeline" data-linenumber="46"><td class="num" id="LN46">46</td><td class="line">make_time (gint utcDate, gint utcHour, gint utcMin)</td></tr>
+<tr class="codeline" data-linenumber="47"><td class="num" id="LN47">47</td><td class="line">{</td></tr>
+<tr class="codeline" data-linenumber="48"><td class="num" id="LN48">48</td><td class="line"> <span class='keyword'>const</span> time_t now = time (<span class='macro'>NULL<span class='macro_popup'>((void*)0)</span></span>);</td></tr>
+<tr class="codeline" data-linenumber="49"><td class="num" id="LN49">49</td><td class="line"> <span class='keyword'>struct</span> tm tm;</td></tr>
+<tr class="codeline" data-linenumber="50"><td class="num" id="LN50">50</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="51"><td class="num" id="LN51">51</td><td class="line"> localtime_r (&amp;now, &amp;tm);</td></tr>
+<tr class="codeline" data-linenumber="52"><td class="num" id="LN52">52</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="53"><td class="num" id="LN53">53</td><td class="line"> <span class='comment'>/* If last reading took place just before midnight UTC on the</span></td></tr>
+<tr class="codeline" data-linenumber="54"><td class="num" id="LN54">54</td><td class="line"> <span class='comment'>* first, adjust the date downward to allow for the month</span></td></tr>
+<tr class="codeline" data-linenumber="55"><td class="num" id="LN55">55</td><td class="line"> <span class='comment'>* change-over. This ASSUMES that the reading won't be more than</span></td></tr>
+<tr class="codeline" data-linenumber="56"><td class="num" id="LN56">56</td><td class="line"> <span class='comment'>* 24 hrs old! */</span></td></tr>
+<tr class="codeline" data-linenumber="57"><td class="num" id="LN57">57</td><td class="line"> <span class='keyword'>if</span> ((utcDate &gt; tm.tm_mday) &amp;&amp; (tm.tm_mday == 1)) {</td></tr>
+<tr class="codeline" data-linenumber="58"><td class="num" id="LN58">58</td><td class="line"> tm.tm_mday = 0; <span class='comment'>/* mktime knows this is the last day of the previous</span></td></tr>
+<tr class="codeline" data-linenumber="59"><td class="num" id="LN59">59</td><td class="line"> <span class='comment'>* month. */</span></td></tr>
+<tr class="codeline" data-linenumber="60"><td class="num" id="LN60">60</td><td class="line"> } <span class='keyword'>else</span> {</td></tr>
+<tr class="codeline" data-linenumber="61"><td class="num" id="LN61">61</td><td class="line"> tm.tm_mday = utcDate;</td></tr>
+<tr class="codeline" data-linenumber="62"><td class="num" id="LN62">62</td><td class="line"> }</td></tr>
+<tr class="codeline" data-linenumber="63"><td class="num" id="LN63">63</td><td class="line"> tm.tm_hour = utcHour;</td></tr>
+<tr class="codeline" data-linenumber="64"><td class="num" id="LN64">64</td><td class="line"> tm.tm_min = utcMin;</td></tr>
+<tr class="codeline" data-linenumber="65"><td class="num" id="LN65">65</td><td class="line"> tm.tm_sec = 0;</td></tr>
+<tr class="codeline" data-linenumber="66"><td class="num" id="LN66">66</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="67"><td class="num" id="LN67">67</td><td class="line"> <span class='comment'>/* mktime() assumes value is local, not UTC. Use tm_gmtoff to compensate */</span></td></tr>
+<tr class="codeline" data-linenumber="68"><td class="num" id="LN68">68</td><td class="line"><span class='directive'>#ifdef <span class='macro'>HAVE_TM_TM_GMOFF<span class='macro_popup'>1</span></span></span></td></tr>
+<tr class="codeline" data-linenumber="69"><td class="num" id="LN69">69</td><td class="line"> <span class='keyword'>return</span> tm.tm_gmtoff + mktime (&amp;tm);</td></tr>
+<tr class="codeline" data-linenumber="70"><td class="num" id="LN70">70</td><td class="line"><span class='directive'>#elif defined HAVE_TIMEZONE</span></td></tr>
+<tr class="codeline" data-linenumber="71"><td class="num" id="LN71">71</td><td class="line"> <span class='keyword'>return</span> timezone + mktime (&amp;tm);</td></tr>
+<tr class="codeline" data-linenumber="72"><td class="num" id="LN72">72</td><td class="line"><span class='directive'>#endif</span></td></tr>
+<tr class="codeline" data-linenumber="73"><td class="num" id="LN73">73</td><td class="line">}</td></tr>
+<tr class="codeline" data-linenumber="74"><td class="num" id="LN74">74</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="75"><td class="num" id="LN75">75</td><td class="line"><span class='keyword'>static</span> <span class='keyword'>void</span></td></tr>
+<tr class="codeline" data-linenumber="76"><td class="num" id="LN76">76</td><td class="line">metar_tok_time (gchar *tokp, WeatherInfo *info)</td></tr>
+<tr class="codeline" data-linenumber="77"><td class="num" id="LN77">77</td><td class="line">{</td></tr>
+<tr class="codeline" data-linenumber="78"><td class="num" id="LN78">78</td><td class="line"> gint day, hr, min;</td></tr>
+<tr class="codeline" data-linenumber="79"><td class="num" id="LN79">79</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="80"><td class="num" id="LN80">80</td><td class="line"> sscanf (tokp, <span class='string_literal'>"%2u%2u%2u"</span>, &amp;day, &amp;hr, &amp;min);</td></tr>
+<tr class="codeline" data-linenumber="81"><td class="num" id="LN81">81</td><td class="line"> info-&gt;update = make_time (day, hr, min);</td></tr>
+<tr class="codeline" data-linenumber="82"><td class="num" id="LN82">82</td><td class="line">}</td></tr>
+<tr class="codeline" data-linenumber="83"><td class="num" id="LN83">83</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="84"><td class="num" id="LN84">84</td><td class="line"><span class='keyword'>static</span> <span class='keyword'>void</span></td></tr>
+<tr class="codeline" data-linenumber="85"><td class="num" id="LN85">85</td><td class="line">metar_tok_wind (gchar *tokp, WeatherInfo *info)</td></tr>
+<tr class="codeline" data-linenumber="86"><td class="num" id="LN86">86</td><td class="line">{</td></tr>
+<tr class="codeline" data-linenumber="87"><td class="num" id="LN87">87</td><td class="line"> gchar sdir[4], sspd[4], sgust[4];</td></tr>
+<tr class="codeline" data-linenumber="88"><td class="num" id="LN88">88</td><td class="line"> gint dir, spd = -1;</td></tr>
+<tr class="codeline" data-linenumber="89"><td class="num" id="LN89">89</td><td class="line"> gchar *gustp;</td></tr>
+<tr class="codeline" data-linenumber="90"><td class="num" id="LN90">90</td><td class="line"> size_t glen;</td></tr>
+<tr class="codeline" data-linenumber="91"><td class="num" id="LN91">91</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="92"><td class="num" id="LN92">92</td><td class="line"> strncpy (sdir, tokp, 3);</td></tr>
+<tr class="codeline" data-linenumber="93"><td class="num" id="LN93">93</td><td class="line"> sdir[3] = 0;</td></tr>
+<tr class="codeline" data-linenumber="94"><td class="num" id="LN94">94</td><td class="line"> dir = (!strcmp (sdir, <span class='string_literal'>"VRB"</span>)) ? -1 : atoi (sdir);</td></tr>
+<tr class="codeline" data-linenumber="95"><td class="num" id="LN95">95</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="96"><td class="num" id="LN96">96</td><td class="line"> memset (sspd, 0, <span class='keyword'>sizeof</span> (sspd));</td></tr>
+<tr class="codeline" data-linenumber="97"><td class="num" id="LN97">97</td><td class="line"> glen = strspn (tokp + 3, <span class='macro'>CONST_DIGITS<span class='macro_popup'>"0123456789"</span></span>);</td></tr>
+<tr class="codeline" data-linenumber="98"><td class="num" id="LN98">98</td><td class="line"> strncpy (sspd, tokp + 3, glen);</td></tr>
+<tr class="codeline" data-linenumber="99"><td class="num" id="LN99">99</td><td class="line"> spd = atoi (sspd);</td></tr>
+<tr class="codeline" data-linenumber="100"><td class="num" id="LN100">100</td><td class="line"> tokp += glen + 3;</td></tr>
+<tr class="codeline" data-linenumber="101"><td class="num" id="LN101">101</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="102"><td class="num" id="LN102">102</td><td class="line"> gustp = strchr (tokp, 'G');</td></tr>
+<tr class="codeline" data-linenumber="103"><td class="num" id="LN103">103</td><td class="line"> <span class='keyword'>if</span> (gustp) {</td></tr>
+<tr class="codeline" data-linenumber="104"><td class="num" id="LN104">104</td><td class="line"> memset (sgust, 0, <span class='keyword'>sizeof</span> (sgust));</td></tr>
+<tr class="codeline" data-linenumber="105"><td class="num" id="LN105">105</td><td class="line"> glen = strspn (gustp + 1, <span class='macro'>CONST_DIGITS<span class='macro_popup'>"0123456789"</span></span>);</td></tr>
+<tr class="codeline" data-linenumber="106"><td class="num" id="LN106">106</td><td class="line"> strncpy (sgust, gustp + 1, glen);</td></tr>
+<tr class="codeline" data-linenumber="107"><td class="num" id="LN107">107</td><td class="line"> tokp = gustp + 1 + glen;</td></tr>
+<tr class="codeline" data-linenumber="108"><td class="num" id="LN108">108</td><td class="line"> }</td></tr>
+<tr class="codeline" data-linenumber="109"><td class="num" id="LN109">109</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="110"><td class="num" id="LN110">110</td><td class="line"> <span class='keyword'>if</span> (!strcmp (tokp, <span class='string_literal'>"MPS"</span>))</td></tr>
+<tr class="codeline" data-linenumber="111"><td class="num" id="LN111">111</td><td class="line"> info-&gt;windspeed = <span class='macro'>WINDSPEED_MS_TO_KNOTS ((WeatherWindSpeed)spd)<span class='macro_popup'>(((WeatherWindSpeed)spd) / 0.514444)</span></span>;</td></tr>
+<tr class="codeline" data-linenumber="112"><td class="num" id="LN112">112</td><td class="line"> <span class='keyword'>else</span></td></tr>
+<tr class="codeline" data-linenumber="113"><td class="num" id="LN113">113</td><td class="line"> info-&gt;windspeed = (WeatherWindSpeed)spd;</td></tr>
+<tr class="codeline" data-linenumber="114"><td class="num" id="LN114">114</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="115"><td class="num" id="LN115">115</td><td class="line"> <span class='keyword'>if</span> ((349 &lt;= dir) || (dir &lt;= 11))</td></tr>
+<tr class="codeline" data-linenumber="116"><td class="num" id="LN116">116</td><td class="line"> info-&gt;wind = WIND_N;</td></tr>
+<tr class="codeline" data-linenumber="117"><td class="num" id="LN117">117</td><td class="line"> <span class='keyword'>else</span> <span class='keyword'>if</span> ((12 &lt;= dir) &amp;&amp; (dir &lt;= 33))</td></tr>
+<tr class="codeline" data-linenumber="118"><td class="num" id="LN118">118</td><td class="line"> info-&gt;wind = WIND_NNE;</td></tr>
+<tr class="codeline" data-linenumber="119"><td class="num" id="LN119">119</td><td class="line"> <span class='keyword'>else</span> <span class='keyword'>if</span> ((34 &lt;= dir) &amp;&amp; (dir &lt;= 56))</td></tr>
+<tr class="codeline" data-linenumber="120"><td class="num" id="LN120">120</td><td class="line"> info-&gt;wind = WIND_NE;</td></tr>
+<tr class="codeline" data-linenumber="121"><td class="num" id="LN121">121</td><td class="line"> <span class='keyword'>else</span> <span class='keyword'>if</span> ((57 &lt;= dir) &amp;&amp; (dir &lt;= 78))</td></tr>
+<tr class="codeline" data-linenumber="122"><td class="num" id="LN122">122</td><td class="line"> info-&gt;wind = WIND_ENE;</td></tr>
+<tr class="codeline" data-linenumber="123"><td class="num" id="LN123">123</td><td class="line"> <span class='keyword'>else</span> <span class='keyword'>if</span> ((79 &lt;= dir) &amp;&amp; (dir &lt;= 101))</td></tr>
+<tr class="codeline" data-linenumber="124"><td class="num" id="LN124">124</td><td class="line"> info-&gt;wind = WIND_E;</td></tr>
+<tr class="codeline" data-linenumber="125"><td class="num" id="LN125">125</td><td class="line"> <span class='keyword'>else</span> <span class='keyword'>if</span> ((102 &lt;= dir) &amp;&amp; (dir &lt;= 123))</td></tr>
+<tr class="codeline" data-linenumber="126"><td class="num" id="LN126">126</td><td class="line"> info-&gt;wind = WIND_ESE;</td></tr>
+<tr class="codeline" data-linenumber="127"><td class="num" id="LN127">127</td><td class="line"> <span class='keyword'>else</span> <span class='keyword'>if</span> ((124 &lt;= dir) &amp;&amp; (dir &lt;= 146))</td></tr>
+<tr class="codeline" data-linenumber="128"><td class="num" id="LN128">128</td><td class="line"> info-&gt;wind = WIND_SE;</td></tr>
+<tr class="codeline" data-linenumber="129"><td class="num" id="LN129">129</td><td class="line"> <span class='keyword'>else</span> <span class='keyword'>if</span> ((147 &lt;= dir) &amp;&amp; (dir &lt;= 168))</td></tr>
+<tr class="codeline" data-linenumber="130"><td class="num" id="LN130">130</td><td class="line"> info-&gt;wind = WIND_SSE;</td></tr>
+<tr class="codeline" data-linenumber="131"><td class="num" id="LN131">131</td><td class="line"> <span class='keyword'>else</span> <span class='keyword'>if</span> ((169 &lt;= dir) &amp;&amp; (dir &lt;= 191))</td></tr>
+<tr class="codeline" data-linenumber="132"><td class="num" id="LN132">132</td><td class="line"> info-&gt;wind = WIND_S;</td></tr>
+<tr class="codeline" data-linenumber="133"><td class="num" id="LN133">133</td><td class="line"> <span class='keyword'>else</span> <span class='keyword'>if</span> ((192 &lt;= dir) &amp;&amp; (dir &lt;= 213))</td></tr>
+<tr class="codeline" data-linenumber="134"><td class="num" id="LN134">134</td><td class="line"> info-&gt;wind = WIND_SSW;</td></tr>
+<tr class="codeline" data-linenumber="135"><td class="num" id="LN135">135</td><td class="line"> <span class='keyword'>else</span> <span class='keyword'>if</span> ((214 &lt;= dir) &amp;&amp; (dir &lt;= 236))</td></tr>
+<tr class="codeline" data-linenumber="136"><td class="num" id="LN136">136</td><td class="line"> info-&gt;wind = WIND_SW;</td></tr>
+<tr class="codeline" data-linenumber="137"><td class="num" id="LN137">137</td><td class="line"> <span class='keyword'>else</span> <span class='keyword'>if</span> ((237 &lt;= dir) &amp;&amp; (dir &lt;= 258))</td></tr>
+<tr class="codeline" data-linenumber="138"><td class="num" id="LN138">138</td><td class="line"> info-&gt;wind = WIND_WSW;</td></tr>
+<tr class="codeline" data-linenumber="139"><td class="num" id="LN139">139</td><td class="line"> <span class='keyword'>else</span> <span class='keyword'>if</span> ((259 &lt;= dir) &amp;&amp; (dir &lt;= 281))</td></tr>
+<tr class="codeline" data-linenumber="140"><td class="num" id="LN140">140</td><td class="line"> info-&gt;wind = WIND_W;</td></tr>
+<tr class="codeline" data-linenumber="141"><td class="num" id="LN141">141</td><td class="line"> <span class='keyword'>else</span> <span class='keyword'>if</span> ((282 &lt;= dir) &amp;&amp; (dir &lt;= 303))</td></tr>
+<tr class="codeline" data-linenumber="142"><td class="num" id="LN142">142</td><td class="line"> info-&gt;wind = WIND_WNW;</td></tr>
+<tr class="codeline" data-linenumber="143"><td class="num" id="LN143">143</td><td class="line"> <span class='keyword'>else</span> <span class='keyword'>if</span> ((304 &lt;= dir) &amp;&amp; (dir &lt;= 326))</td></tr>
+<tr class="codeline" data-linenumber="144"><td class="num" id="LN144">144</td><td class="line"> info-&gt;wind = WIND_NW;</td></tr>
+<tr class="codeline" data-linenumber="145"><td class="num" id="LN145">145</td><td class="line"> <span class='keyword'>else</span> <span class='keyword'>if</span> ((327 &lt;= dir) &amp;&amp; (dir &lt;= 348))</td></tr>
+<tr class="codeline" data-linenumber="146"><td class="num" id="LN146">146</td><td class="line"> info-&gt;wind = WIND_NNW;</td></tr>
+<tr class="codeline" data-linenumber="147"><td class="num" id="LN147">147</td><td class="line">}</td></tr>
+<tr class="codeline" data-linenumber="148"><td class="num" id="LN148">148</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="149"><td class="num" id="LN149">149</td><td class="line"><span class='keyword'>static</span> <span class='keyword'>void</span></td></tr>
+<tr class="codeline" data-linenumber="150"><td class="num" id="LN150">150</td><td class="line">metar_tok_vis (gchar *tokp, WeatherInfo *info)</td></tr>
+<tr class="codeline" data-linenumber="151"><td class="num" id="LN151">151</td><td class="line">{</td></tr>
+<tr class="codeline" data-linenumber="152"><td class="num" id="LN152">152</td><td class="line"> gchar *pfrac, *pend, *psp;</td></tr>
+<tr class="codeline" data-linenumber="153"><td class="num" id="LN153">153</td><td class="line"> gchar sval[6];</td></tr>
+<tr class="codeline" data-linenumber="154"><td class="num" id="LN154">154</td><td class="line"> gint num, den, val;</td></tr>
+<tr class="codeline" data-linenumber="155"><td class="num" id="LN155">155</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="156"><td class="num" id="LN156">156</td><td class="line"> memset (sval, 0, <span class='keyword'>sizeof</span> (sval));</td></tr>
+<tr class="codeline" data-linenumber="157"><td class="num" id="LN157">157</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="158"><td class="num" id="LN158">158</td><td class="line"> <span class='keyword'>if</span> (!strcmp (tokp,<span class='string_literal'>"CAVOK"</span>)) {</td></tr>
+<tr class="codeline" data-linenumber="159"><td class="num" id="LN159">159</td><td class="line"> <span class='comment'>// "Ceiling And Visibility OK": visibility &gt;= 10 KM</span></td></tr>
+<tr class="codeline" data-linenumber="160"><td class="num" id="LN160">160</td><td class="line"> info-&gt;visibility=10000. / <span class='macro'>VISIBILITY_SM_TO_M (1.)<span class='macro_popup'>(((1.) * 1.609344) * 1000)</span></span>;</td></tr>
+<tr class="codeline" data-linenumber="161"><td class="num" id="LN161">161</td><td class="line"> info-&gt;sky = SKY_CLEAR;</td></tr>
+<tr class="codeline" data-linenumber="162"><td class="num" id="LN162">162</td><td class="line"> } <span class='keyword'>else</span> <span class='keyword'>if</span> (0 != (pend = strstr (tokp, <span class='string_literal'>"SM"</span>))) {</td></tr>
+<tr class="codeline" data-linenumber="163"><td class="num" id="LN163">163</td><td class="line"> <span class='comment'>// US observation: field ends with "SM"</span></td></tr>
+<tr class="codeline" data-linenumber="164"><td class="num" id="LN164">164</td><td class="line"> pfrac = strchr (tokp, '/');</td></tr>
+<tr class="codeline" data-linenumber="165"><td class="num" id="LN165">165</td><td class="line"> <span class='keyword'>if</span> (pfrac) {</td></tr>
+<tr class="codeline" data-linenumber="166"><td class="num" id="LN166">166</td><td class="line"> <span class='keyword'>if</span> (*tokp == 'M') {</td></tr>
+<tr class="codeline" data-linenumber="167"><td class="num" id="LN167">167</td><td class="line"> info-&gt;visibility = 0.001;</td></tr>
+<tr class="codeline" data-linenumber="168"><td class="num" id="LN168">168</td><td class="line"> } <span class='keyword'>else</span> {</td></tr>
+<tr class="codeline" data-linenumber="169"><td class="num" id="LN169">169</td><td class="line"> num = (*(pfrac - 1) - '0');</td></tr>
+<tr class="codeline" data-linenumber="170"><td class="num" id="LN170">170</td><td class="line"> strncpy (sval, pfrac + 1, pend - pfrac - 1);</td></tr>
+<tr class="codeline" data-linenumber="171"><td class="num" id="LN171">171</td><td class="line"> den = atoi (sval);</td></tr>
+<tr class="codeline" data-linenumber="172"><td class="num" id="LN172">172</td><td class="line"> info-&gt;visibility =</td></tr>
+<tr class="codeline" data-linenumber="173"><td class="num" id="LN173">173</td><td class="line"> ((WeatherVisibility)num / ((WeatherVisibility)den));</td></tr>
+<tr class="codeline" data-linenumber="174"><td class="num" id="LN174">174</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="175"><td class="num" id="LN175">175</td><td class="line"> psp = strchr (tokp, ' ');</td></tr>
+<tr class="codeline" data-linenumber="176"><td class="num" id="LN176">176</td><td class="line"> <span class='keyword'>if</span> (psp) {</td></tr>
+<tr class="codeline" data-linenumber="177"><td class="num" id="LN177">177</td><td class="line"> *psp = '\0';</td></tr>
+<tr class="codeline" data-linenumber="178"><td class="num" id="LN178">178</td><td class="line"> val = atoi (tokp);</td></tr>
+<tr class="codeline" data-linenumber="179"><td class="num" id="LN179">179</td><td class="line"> info-&gt;visibility += (WeatherVisibility)val;</td></tr>
+<tr class="codeline" data-linenumber="180"><td class="num" id="LN180">180</td><td class="line"> }</td></tr>
+<tr class="codeline" data-linenumber="181"><td class="num" id="LN181">181</td><td class="line"> }</td></tr>
+<tr class="codeline" data-linenumber="182"><td class="num" id="LN182">182</td><td class="line"> } <span class='keyword'>else</span> {</td></tr>
+<tr class="codeline" data-linenumber="183"><td class="num" id="LN183">183</td><td class="line"> strncpy (sval, tokp, pend - tokp);</td></tr>
+<tr class="codeline" data-linenumber="184"><td class="num" id="LN184">184</td><td class="line"> val = atoi (sval);</td></tr>
+<tr class="codeline" data-linenumber="185"><td class="num" id="LN185">185</td><td class="line"> info-&gt;visibility = (WeatherVisibility)val;</td></tr>
+<tr class="codeline" data-linenumber="186"><td class="num" id="LN186">186</td><td class="line"> }</td></tr>
+<tr class="codeline" data-linenumber="187"><td class="num" id="LN187">187</td><td class="line"> } <span class='keyword'>else</span> {</td></tr>
+<tr class="codeline" data-linenumber="188"><td class="num" id="LN188">188</td><td class="line"> <span class='comment'>// International observation: NNNN(DD NNNNDD)?</span></td></tr>
+<tr class="codeline" data-linenumber="189"><td class="num" id="LN189">189</td><td class="line"> <span class='comment'>// For now: use only the minimum visibility and ignore its direction</span></td></tr>
+<tr class="codeline" data-linenumber="190"><td class="num" id="LN190">190</td><td class="line"> strncpy (sval, tokp, strspn (tokp, <span class='macro'>CONST_DIGITS<span class='macro_popup'>"0123456789"</span></span>));</td></tr>
+<tr class="codeline" data-linenumber="191"><td class="num" id="LN191">191</td><td class="line"> val = atoi (sval);</td></tr>
+<tr class="codeline" data-linenumber="192"><td class="num" id="LN192">192</td><td class="line"> info-&gt;visibility = (WeatherVisibility)val / <span class='macro'>VISIBILITY_SM_TO_M (1.)<span class='macro_popup'>(((1.) * 1.609344) * 1000)</span></span>;</td></tr>
+<tr class="codeline" data-linenumber="193"><td class="num" id="LN193">193</td><td class="line"> }</td></tr>
+<tr class="codeline" data-linenumber="194"><td class="num" id="LN194">194</td><td class="line">}</td></tr>
+<tr class="codeline" data-linenumber="195"><td class="num" id="LN195">195</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="196"><td class="num" id="LN196">196</td><td class="line"><span class='keyword'>static</span> <span class='keyword'>void</span></td></tr>
+<tr class="codeline" data-linenumber="197"><td class="num" id="LN197">197</td><td class="line">metar_tok_cloud (gchar *tokp, WeatherInfo *info)</td></tr>
+<tr class="codeline" data-linenumber="198"><td class="num" id="LN198">198</td><td class="line">{</td></tr>
+<tr class="codeline" data-linenumber="199"><td class="num" id="LN199">199</td><td class="line"> gchar stype[4], salt[4];</td></tr>
+<tr class="codeline" data-linenumber="200"><td class="num" id="LN200">200</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="201"><td class="num" id="LN201">201</td><td class="line"> strncpy (stype, tokp, 3);</td></tr>
+<tr class="codeline" data-linenumber="202"><td class="num" id="LN202">202</td><td class="line"> stype[3] = 0;</td></tr>
+<tr class="codeline" data-linenumber="203"><td class="num" id="LN203">203</td><td class="line"> <span class='keyword'>if</span> (strlen (tokp) == 6) {</td></tr>
+<tr class="codeline" data-linenumber="204"><td class="num" id="LN204">204</td><td class="line"> strncpy (salt, tokp + 3, 3);</td></tr>
+<tr class="codeline" data-linenumber="205"><td class="num" id="LN205">205</td><td class="line"> salt[3] = 0;</td></tr>
+<tr class="codeline" data-linenumber="206"><td class="num" id="LN206">206</td><td class="line"> }</td></tr>
+<tr class="codeline" data-linenumber="207"><td class="num" id="LN207">207</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="208"><td class="num" id="LN208">208</td><td class="line"> <span class='keyword'>if</span> (!strcmp (stype, <span class='string_literal'>"CLR"</span>)) {</td></tr>
+<tr class="codeline" data-linenumber="209"><td class="num" id="LN209">209</td><td class="line"> info-&gt;sky = SKY_CLEAR;</td></tr>
+<tr class="codeline" data-linenumber="210"><td class="num" id="LN210">210</td><td class="line"> } <span class='keyword'>else</span> <span class='keyword'>if</span> (!strcmp (stype, <span class='string_literal'>"SKC"</span>)) {</td></tr>
+<tr class="codeline" data-linenumber="211"><td class="num" id="LN211">211</td><td class="line"> info-&gt;sky = SKY_CLEAR;</td></tr>
+<tr class="codeline" data-linenumber="212"><td class="num" id="LN212">212</td><td class="line"> } <span class='keyword'>else</span> <span class='keyword'>if</span> (!strcmp (stype, <span class='string_literal'>"NSC"</span>)) {</td></tr>
+<tr class="codeline" data-linenumber="213"><td class="num" id="LN213">213</td><td class="line"> info-&gt;sky = SKY_CLEAR;</td></tr>
+<tr class="codeline" data-linenumber="214"><td class="num" id="LN214">214</td><td class="line"> } <span class='keyword'>else</span> <span class='keyword'>if</span> (!strcmp (stype, <span class='string_literal'>"BKN"</span>)) {</td></tr>
+<tr class="codeline" data-linenumber="215"><td class="num" id="LN215">215</td><td class="line"> info-&gt;sky = SKY_BROKEN;</td></tr>
+<tr class="codeline" data-linenumber="216"><td class="num" id="LN216">216</td><td class="line"> } <span class='keyword'>else</span> <span class='keyword'>if</span> (!strcmp (stype, <span class='string_literal'>"SCT"</span>)) {</td></tr>
+<tr class="codeline" data-linenumber="217"><td class="num" id="LN217">217</td><td class="line"> info-&gt;sky = SKY_SCATTERED;</td></tr>
+<tr class="codeline" data-linenumber="218"><td class="num" id="LN218">218</td><td class="line"> } <span class='keyword'>else</span> <span class='keyword'>if</span> (!strcmp (stype, <span class='string_literal'>"FEW"</span>)) {</td></tr>
+<tr class="codeline" data-linenumber="219"><td class="num" id="LN219">219</td><td class="line"> info-&gt;sky = SKY_FEW;</td></tr>
+<tr class="codeline" data-linenumber="220"><td class="num" id="LN220">220</td><td class="line"> } <span class='keyword'>else</span> <span class='keyword'>if</span> (!strcmp (stype, <span class='string_literal'>"OVC"</span>)) {</td></tr>
+<tr class="codeline" data-linenumber="221"><td class="num" id="LN221">221</td><td class="line"> info-&gt;sky = SKY_OVERCAST;</td></tr>
+<tr class="codeline" data-linenumber="222"><td class="num" id="LN222">222</td><td class="line"> }</td></tr>
+<tr class="codeline" data-linenumber="223"><td class="num" id="LN223">223</td><td class="line">}</td></tr>
+<tr class="codeline" data-linenumber="224"><td class="num" id="LN224">224</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="225"><td class="num" id="LN225">225</td><td class="line"><span class='keyword'>static</span> <span class='keyword'>void</span></td></tr>
+<tr class="codeline" data-linenumber="226"><td class="num" id="LN226">226</td><td class="line">metar_tok_pres (gchar *tokp, WeatherInfo *info)</td></tr>
+<tr class="codeline" data-linenumber="227"><td class="num" id="LN227">227</td><td class="line">{</td></tr>
+<tr class="codeline" data-linenumber="228"><td class="num" id="LN228">228</td><td class="line"> <span class='keyword'>if</span> (*tokp == 'A') {</td></tr>
+<tr class="codeline" data-linenumber="229"><td class="num" id="LN229">229</td><td class="line"> gchar sintg[3], sfract[3];</td></tr>
+<tr class="codeline" data-linenumber="230"><td class="num" id="LN230">230</td><td class="line"> gint intg, fract;</td></tr>
+<tr class="codeline" data-linenumber="231"><td class="num" id="LN231">231</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="232"><td class="num" id="LN232">232</td><td class="line"> strncpy (sintg, tokp + 1, 2);</td></tr>
+<tr class="codeline" data-linenumber="233"><td class="num" id="LN233">233</td><td class="line"> sintg[2] = 0;</td></tr>
+<tr class="codeline" data-linenumber="234"><td class="num" id="LN234">234</td><td class="line"> intg = atoi (sintg);</td></tr>
+<tr class="codeline" data-linenumber="235"><td class="num" id="LN235">235</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="236"><td class="num" id="LN236">236</td><td class="line"> strncpy (sfract, tokp + 3, 2);</td></tr>
+<tr class="codeline" data-linenumber="237"><td class="num" id="LN237">237</td><td class="line"> sfract[2] = 0;</td></tr>
+<tr class="codeline" data-linenumber="238"><td class="num" id="LN238">238</td><td class="line"> fract = atoi (sfract);</td></tr>
+<tr class="codeline" data-linenumber="239"><td class="num" id="LN239">239</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="240"><td class="num" id="LN240">240</td><td class="line"> info-&gt;pressure = (WeatherPressure)intg + (((WeatherPressure)fract)/100.0);</td></tr>
+<tr class="codeline" data-linenumber="241"><td class="num" id="LN241">241</td><td class="line"> } <span class='keyword'>else</span> { <span class='comment'>/* *tokp == 'Q' */</span></td></tr>
+<tr class="codeline" data-linenumber="242"><td class="num" id="LN242">242</td><td class="line"> gchar spres[5];</td></tr>
+<tr class="codeline" data-linenumber="243"><td class="num" id="LN243">243</td><td class="line"> gint pres;</td></tr>
+<tr class="codeline" data-linenumber="244"><td class="num" id="LN244">244</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="245"><td class="num" id="LN245">245</td><td class="line"> strncpy (spres, tokp + 1, 4);</td></tr>
+<tr class="codeline" data-linenumber="246"><td class="num" id="LN246">246</td><td class="line"> spres[4] = 0;</td></tr>
+<tr class="codeline" data-linenumber="247"><td class="num" id="LN247">247</td><td class="line"> pres = atoi (spres);</td></tr>
+<tr class="codeline" data-linenumber="248"><td class="num" id="LN248">248</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="249"><td class="num" id="LN249">249</td><td class="line"> info-&gt;pressure = <span class='macro'>PRESSURE_MBAR_TO_INCH ((WeatherPressure)pres)<span class='macro_popup'>(((WeatherPressure)pres) * 0.029533373)</span></span>;</td></tr>
+<tr class="codeline" data-linenumber="250"><td class="num" id="LN250">250</td><td class="line"> }</td></tr>
+<tr class="codeline" data-linenumber="251"><td class="num" id="LN251">251</td><td class="line">}</td></tr>
+<tr class="codeline" data-linenumber="252"><td class="num" id="LN252">252</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="253"><td class="num" id="LN253">253</td><td class="line"><span class='keyword'>static</span> <span class='keyword'>void</span></td></tr>
+<tr class="codeline" data-linenumber="254"><td class="num" id="LN254">254</td><td class="line">metar_tok_temp (gchar *tokp, WeatherInfo *info)</td></tr>
+<tr class="codeline" data-linenumber="255"><td class="num" id="LN255">255</td><td class="line">{</td></tr>
+<tr class="codeline" data-linenumber="256"><td class="num" id="LN256">256</td><td class="line"> gchar *ptemp, *pdew, *psep;</td></tr>
+<tr class="codeline" data-linenumber="257"><td class="num" id="LN257">257</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="258"><td class="num" id="LN258">258</td><td class="line"> psep = strchr (tokp, '/');</td></tr>
+<tr class="codeline" data-linenumber="259"><td class="num" id="LN259">259</td><td class="line"> *psep = 0;</td></tr>
+<tr class="codeline" data-linenumber="260"><td class="num" id="LN260">260</td><td class="line"> ptemp = tokp;</td></tr>
+<tr class="codeline" data-linenumber="261"><td class="num" id="LN261">261</td><td class="line"> pdew = psep + 1;</td></tr>
+<tr class="codeline" data-linenumber="262"><td class="num" id="LN262">262</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="263"><td class="num" id="LN263">263</td><td class="line"> info-&gt;temp = (*ptemp == 'M') ? <span class='macro'>TEMP_C_TO_F (-atoi (ptemp + 1))<span class='macro_popup'>(((-atoi (ptemp + 1)) * (9.0/5.0)) + 32.0)</span></span></td></tr>
+<tr class="codeline" data-linenumber="264"><td class="num" id="LN264">264</td><td class="line"> : <span class='macro'>TEMP_C_TO_F (atoi (ptemp))<span class='macro_popup'>(((atoi (ptemp)) * (9.0/5.0)) + 32.0)</span></span>;</td></tr>
+<tr class="codeline" data-linenumber="265"><td class="num" id="LN265">265</td><td class="line"> <span class='keyword'>if</span> (*pdew) {</td></tr>
+<tr class="codeline" data-linenumber="266"><td class="num" id="LN266">266</td><td class="line"> info-&gt;dew = (*pdew == 'M') ? <span class='macro'>TEMP_C_TO_F (-atoi (pdew + 1))<span class='macro_popup'>(((-atoi (pdew + 1)) * (9.0/5.0)) + 32.0)</span></span></td></tr>
+<tr class="codeline" data-linenumber="267"><td class="num" id="LN267">267</td><td class="line"> : <span class='macro'>TEMP_C_TO_F (atoi (pdew))<span class='macro_popup'>(((atoi (pdew)) * (9.0/5.0)) + 32.0)</span></span>;</td></tr>
+<tr class="codeline" data-linenumber="268"><td class="num" id="LN268">268</td><td class="line"> } <span class='keyword'>else</span> {</td></tr>
+<tr class="codeline" data-linenumber="269"><td class="num" id="LN269">269</td><td class="line"> info-&gt;dew = -1000.0;</td></tr>
+<tr class="codeline" data-linenumber="270"><td class="num" id="LN270">270</td><td class="line"> }</td></tr>
+<tr class="codeline" data-linenumber="271"><td class="num" id="LN271">271</td><td class="line">}</td></tr>
+<tr class="codeline" data-linenumber="272"><td class="num" id="LN272">272</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="273"><td class="num" id="LN273">273</td><td class="line"><span class='keyword'>static</span> <span class='keyword'>void</span></td></tr>
+<tr class="codeline" data-linenumber="274"><td class="num" id="LN274">274</td><td class="line">metar_tok_cond (gchar *tokp, WeatherInfo *info)</td></tr>
+<tr class="codeline" data-linenumber="275"><td class="num" id="LN275">275</td><td class="line">{</td></tr>
+<tr class="codeline" data-linenumber="276"><td class="num" id="LN276">276</td><td class="line"> gchar squal[3], sphen[4];</td></tr>
+<tr class="codeline" data-linenumber="277"><td class="num" id="LN277">277</td><td class="line"> gchar *pphen;</td></tr>
+<tr class="codeline" data-linenumber="278"><td class="num" id="LN278">278</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="279"><td class="num" id="LN279">279</td><td class="line"> <span class='keyword'>if</span> ((strlen (tokp) &gt; 3) &amp;&amp; ((*tokp == '+') || (*tokp == '-')))</td></tr>
+<tr class="codeline" data-linenumber="280"><td class="num" id="LN280">280</td><td class="line"> ++tokp; <span class='comment'>/* FIX */</span></td></tr>
+<tr class="codeline" data-linenumber="281"><td class="num" id="LN281">281</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="282"><td class="num" id="LN282">282</td><td class="line"> <span class='keyword'>if</span> ((*tokp == '+') || (*tokp == '-'))</td></tr>
+<tr class="codeline" data-linenumber="283"><td class="num" id="LN283">283</td><td class="line"> pphen = tokp + 1;</td></tr>
+<tr class="codeline" data-linenumber="284"><td class="num" id="LN284">284</td><td class="line"> <span class='keyword'>else</span> <span class='keyword'>if</span> (strlen (tokp) &lt; 4)</td></tr>
+<tr class="codeline" data-linenumber="285"><td class="num" id="LN285">285</td><td class="line"> pphen = tokp;</td></tr>
+<tr class="codeline" data-linenumber="286"><td class="num" id="LN286">286</td><td class="line"> <span class='keyword'>else</span></td></tr>
+<tr class="codeline" data-linenumber="287"><td class="num" id="LN287">287</td><td class="line"> pphen = tokp + 2;</td></tr>
+<tr class="codeline" data-linenumber="288"><td class="num" id="LN288">288</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="289"><td class="num" id="LN289">289</td><td class="line"> memset (squal, 0, <span class='keyword'>sizeof</span> (squal));</td></tr>
+<tr class="codeline" data-linenumber="290"><td class="num" id="LN290">290</td><td class="line"> strncpy (squal, tokp, pphen - tokp);</td></tr>
+<tr class="codeline" data-linenumber="291"><td class="num" id="LN291">291</td><td class="line"> squal[pphen - tokp] = 0;</td></tr>
+<tr class="codeline" data-linenumber="292"><td class="num" id="LN292">292</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="293"><td class="num" id="LN293">293</td><td class="line"> memset (sphen, 0, <span class='keyword'>sizeof</span> (sphen));</td></tr>
+<tr class="codeline" data-linenumber="294"><td class="num" id="LN294">294</td><td class="line"> strncpy (sphen, pphen, <span class='keyword'>sizeof</span> (sphen));</td></tr>
+<tr class="codeline" data-linenumber="295"><td class="num" id="LN295">295</td><td class="line"> sphen[<span class='keyword'>sizeof</span> (sphen)-1] = '\0';</td></tr>
+<tr class="codeline" data-linenumber="296"><td class="num" id="LN296">296</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="297"><td class="num" id="LN297">297</td><td class="line"> <span class='comment'>/* Defaults */</span></td></tr>
+<tr class="codeline" data-linenumber="298"><td class="num" id="LN298">298</td><td class="line"> info-&gt;cond.qualifier = QUALIFIER_NONE;</td></tr>
+<tr class="codeline" data-linenumber="299"><td class="num" id="LN299">299</td><td class="line"> info-&gt;cond.phenomenon = PHENOMENON_NONE;</td></tr>
+<tr class="codeline" data-linenumber="300"><td class="num" id="LN300">300</td><td class="line"> info-&gt;cond.significant = <span class='macro'>FALSE<span class='macro_popup'>(0)</span></span>;</td></tr>
+<tr class="codeline" data-linenumber="301"><td class="num" id="LN301">301</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="302"><td class="num" id="LN302">302</td><td class="line"> <span class='keyword'>if</span> (!strcmp (squal, <span class='string_literal'>""</span>)) {</td></tr>
+<tr class="codeline" data-linenumber="303"><td class="num" id="LN303">303</td><td class="line"> info-&gt;cond.qualifier = QUALIFIER_MODERATE;</td></tr>
+<tr class="codeline" data-linenumber="304"><td class="num" id="LN304">304</td><td class="line"> } <span class='keyword'>else</span> <span class='keyword'>if</span> (!strcmp (squal, <span class='string_literal'>"-"</span>)) {</td></tr>
+<tr class="codeline" data-linenumber="305"><td class="num" id="LN305">305</td><td class="line"> info-&gt;cond.qualifier = QUALIFIER_LIGHT;</td></tr>
+<tr class="codeline" data-linenumber="306"><td class="num" id="LN306">306</td><td class="line"> } <span class='keyword'>else</span> <span class='keyword'>if</span> (!strcmp (squal, <span class='string_literal'>"+"</span>)) {</td></tr>
+<tr class="codeline" data-linenumber="307"><td class="num" id="LN307">307</td><td class="line"> info-&gt;cond.qualifier = QUALIFIER_HEAVY;</td></tr>
+<tr class="codeline" data-linenumber="308"><td class="num" id="LN308">308</td><td class="line"> } <span class='keyword'>else</span> <span class='keyword'>if</span> (!strcmp (squal, <span class='string_literal'>"VC"</span>)) {</td></tr>
+<tr class="codeline" data-linenumber="309"><td class="num" id="LN309">309</td><td class="line"> info-&gt;cond.qualifier = QUALIFIER_VICINITY;</td></tr>
+<tr class="codeline" data-linenumber="310"><td class="num" id="LN310">310</td><td class="line"> } <span class='keyword'>else</span> <span class='keyword'>if</span> (!strcmp (squal, <span class='string_literal'>"MI"</span>)) {</td></tr>
+<tr class="codeline" data-linenumber="311"><td class="num" id="LN311">311</td><td class="line"> info-&gt;cond.qualifier = QUALIFIER_SHALLOW;</td></tr>
+<tr class="codeline" data-linenumber="312"><td class="num" id="LN312">312</td><td class="line"> } <span class='keyword'>else</span> <span class='keyword'>if</span> (!strcmp (squal, <span class='string_literal'>"BC"</span>)) {</td></tr>
+<tr class="codeline" data-linenumber="313"><td class="num" id="LN313">313</td><td class="line"> info-&gt;cond.qualifier = QUALIFIER_PATCHES;</td></tr>
+<tr class="codeline" data-linenumber="314"><td class="num" id="LN314">314</td><td class="line"> } <span class='keyword'>else</span> <span class='keyword'>if</span> (!strcmp (squal, <span class='string_literal'>"PR"</span>)) {</td></tr>
+<tr class="codeline" data-linenumber="315"><td class="num" id="LN315">315</td><td class="line"> info-&gt;cond.qualifier = QUALIFIER_PARTIAL;</td></tr>
+<tr class="codeline" data-linenumber="316"><td class="num" id="LN316">316</td><td class="line"> } <span class='keyword'>else</span> <span class='keyword'>if</span> (!strcmp (squal, <span class='string_literal'>"TS"</span>)) {</td></tr>
+<tr class="codeline" data-linenumber="317"><td class="num" id="LN317">317</td><td class="line"> info-&gt;cond.qualifier = QUALIFIER_THUNDERSTORM;</td></tr>
+<tr class="codeline" data-linenumber="318"><td class="num" id="LN318">318</td><td class="line"> } <span class='keyword'>else</span> <span class='keyword'>if</span> (!strcmp (squal, <span class='string_literal'>"BL"</span>)) {</td></tr>
+<tr class="codeline" data-linenumber="319"><td class="num" id="LN319">319</td><td class="line"> info-&gt;cond.qualifier = QUALIFIER_BLOWING;</td></tr>
+<tr class="codeline" data-linenumber="320"><td class="num" id="LN320">320</td><td class="line"> } <span class='keyword'>else</span> <span class='keyword'>if</span> (!strcmp (squal, <span class='string_literal'>"SH"</span>)) {</td></tr>
+<tr class="codeline" data-linenumber="321"><td class="num" id="LN321">321</td><td class="line"> info-&gt;cond.qualifier = QUALIFIER_SHOWERS;</td></tr>
+<tr class="codeline" data-linenumber="322"><td class="num" id="LN322">322</td><td class="line"> } <span class='keyword'>else</span> <span class='keyword'>if</span> (!strcmp (squal, <span class='string_literal'>"DR"</span>)) {</td></tr>
+<tr class="codeline" data-linenumber="323"><td class="num" id="LN323">323</td><td class="line"> info-&gt;cond.qualifier = QUALIFIER_DRIFTING;</td></tr>
+<tr class="codeline" data-linenumber="324"><td class="num" id="LN324">324</td><td class="line"> } <span class='keyword'>else</span> <span class='keyword'>if</span> (!strcmp (squal, <span class='string_literal'>"FZ"</span>)) {</td></tr>
+<tr class="codeline" data-linenumber="325"><td class="num" id="LN325">325</td><td class="line"> info-&gt;cond.qualifier = QUALIFIER_FREEZING;</td></tr>
+<tr class="codeline" data-linenumber="326"><td class="num" id="LN326">326</td><td class="line"> } <span class='keyword'>else</span> {</td></tr>
+<tr class="codeline" data-linenumber="327"><td class="num" id="LN327">327</td><td class="line"> <span class='keyword'>return</span>;</td></tr>
+<tr class="codeline" data-linenumber="328"><td class="num" id="LN328">328</td><td class="line"> }</td></tr>
+<tr class="codeline" data-linenumber="329"><td class="num" id="LN329">329</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="330"><td class="num" id="LN330">330</td><td class="line"> <span class='keyword'>if</span> (!strcmp (sphen, <span class='string_literal'>"DZ"</span>)) {</td></tr>
+<tr class="codeline" data-linenumber="331"><td class="num" id="LN331">331</td><td class="line"> info-&gt;cond.phenomenon = PHENOMENON_DRIZZLE;</td></tr>
+<tr class="codeline" data-linenumber="332"><td class="num" id="LN332">332</td><td class="line"> } <span class='keyword'>else</span> <span class='keyword'>if</span> (!strcmp (sphen, <span class='string_literal'>"RA"</span>)) {</td></tr>
+<tr class="codeline" data-linenumber="333"><td class="num" id="LN333">333</td><td class="line"> info-&gt;cond.phenomenon = PHENOMENON_RAIN;</td></tr>
+<tr class="codeline" data-linenumber="334"><td class="num" id="LN334">334</td><td class="line"> } <span class='keyword'>else</span> <span class='keyword'>if</span> (!strcmp (sphen, <span class='string_literal'>"SN"</span>)) {</td></tr>
+<tr class="codeline" data-linenumber="335"><td class="num" id="LN335">335</td><td class="line"> info-&gt;cond.phenomenon = PHENOMENON_SNOW;</td></tr>
+<tr class="codeline" data-linenumber="336"><td class="num" id="LN336">336</td><td class="line"> } <span class='keyword'>else</span> <span class='keyword'>if</span> (!strcmp (sphen, <span class='string_literal'>"SG"</span>)) {</td></tr>
+<tr class="codeline" data-linenumber="337"><td class="num" id="LN337">337</td><td class="line"> info-&gt;cond.phenomenon = PHENOMENON_SNOW_GRAINS;</td></tr>
+<tr class="codeline" data-linenumber="338"><td class="num" id="LN338">338</td><td class="line"> } <span class='keyword'>else</span> <span class='keyword'>if</span> (!strcmp (sphen, <span class='string_literal'>"IC"</span>)) {</td></tr>
+<tr class="codeline" data-linenumber="339"><td class="num" id="LN339">339</td><td class="line"> info-&gt;cond.phenomenon = PHENOMENON_ICE_CRYSTALS;</td></tr>
+<tr class="codeline" data-linenumber="340"><td class="num" id="LN340">340</td><td class="line"> } <span class='keyword'>else</span> <span class='keyword'>if</span> (!strcmp (sphen, <span class='string_literal'>"PE"</span>)) {</td></tr>
+<tr class="codeline" data-linenumber="341"><td class="num" id="LN341">341</td><td class="line"> info-&gt;cond.phenomenon = PHENOMENON_ICE_PELLETS;</td></tr>
+<tr class="codeline" data-linenumber="342"><td class="num" id="LN342">342</td><td class="line"> } <span class='keyword'>else</span> <span class='keyword'>if</span> (!strcmp (sphen, <span class='string_literal'>"GR"</span>)) {</td></tr>
+<tr class="codeline" data-linenumber="343"><td class="num" id="LN343">343</td><td class="line"> info-&gt;cond.phenomenon = PHENOMENON_HAIL;</td></tr>
+<tr class="codeline" data-linenumber="344"><td class="num" id="LN344">344</td><td class="line"> } <span class='keyword'>else</span> <span class='keyword'>if</span> (!strcmp (sphen, <span class='string_literal'>"GS"</span>)) {</td></tr>
+<tr class="codeline" data-linenumber="345"><td class="num" id="LN345">345</td><td class="line"> info-&gt;cond.phenomenon = PHENOMENON_SMALL_HAIL;</td></tr>
+<tr class="codeline" data-linenumber="346"><td class="num" id="LN346">346</td><td class="line"> } <span class='keyword'>else</span> <span class='keyword'>if</span> (!strcmp (sphen, <span class='string_literal'>"UP"</span>)) {</td></tr>
+<tr class="codeline" data-linenumber="347"><td class="num" id="LN347">347</td><td class="line"> info-&gt;cond.phenomenon = PHENOMENON_UNKNOWN_PRECIPITATION;</td></tr>
+<tr class="codeline" data-linenumber="348"><td class="num" id="LN348">348</td><td class="line"> } <span class='keyword'>else</span> <span class='keyword'>if</span> (!strcmp (sphen, <span class='string_literal'>"BR"</span>)) {</td></tr>
+<tr class="codeline" data-linenumber="349"><td class="num" id="LN349">349</td><td class="line"> info-&gt;cond.phenomenon = PHENOMENON_MIST;</td></tr>
+<tr class="codeline" data-linenumber="350"><td class="num" id="LN350">350</td><td class="line"> } <span class='keyword'>else</span> <span class='keyword'>if</span> (!strcmp (sphen, <span class='string_literal'>"FG"</span>)) {</td></tr>
+<tr class="codeline" data-linenumber="351"><td class="num" id="LN351">351</td><td class="line"> info-&gt;cond.phenomenon = PHENOMENON_FOG;</td></tr>
+<tr class="codeline" data-linenumber="352"><td class="num" id="LN352">352</td><td class="line"> } <span class='keyword'>else</span> <span class='keyword'>if</span> (!strcmp (sphen, <span class='string_literal'>"FU"</span>)) {</td></tr>
+<tr class="codeline" data-linenumber="353"><td class="num" id="LN353">353</td><td class="line"> info-&gt;cond.phenomenon = PHENOMENON_SMOKE;</td></tr>
+<tr class="codeline" data-linenumber="354"><td class="num" id="LN354">354</td><td class="line"> } <span class='keyword'>else</span> <span class='keyword'>if</span> (!strcmp (sphen, <span class='string_literal'>"VA"</span>)) {</td></tr>
+<tr class="codeline" data-linenumber="355"><td class="num" id="LN355">355</td><td class="line"> info-&gt;cond.phenomenon = PHENOMENON_VOLCANIC_ASH;</td></tr>
+<tr class="codeline" data-linenumber="356"><td class="num" id="LN356">356</td><td class="line"> } <span class='keyword'>else</span> <span class='keyword'>if</span> (!strcmp (sphen, <span class='string_literal'>"SA"</span>)) {</td></tr>
+<tr class="codeline" data-linenumber="357"><td class="num" id="LN357">357</td><td class="line"> info-&gt;cond.phenomenon = PHENOMENON_SAND;</td></tr>
+<tr class="codeline" data-linenumber="358"><td class="num" id="LN358">358</td><td class="line"> } <span class='keyword'>else</span> <span class='keyword'>if</span> (!strcmp (sphen, <span class='string_literal'>"HZ"</span>)) {</td></tr>
+<tr class="codeline" data-linenumber="359"><td class="num" id="LN359">359</td><td class="line"> info-&gt;cond.phenomenon = PHENOMENON_HAZE;</td></tr>
+<tr class="codeline" data-linenumber="360"><td class="num" id="LN360">360</td><td class="line"> } <span class='keyword'>else</span> <span class='keyword'>if</span> (!strcmp (sphen, <span class='string_literal'>"PY"</span>)) {</td></tr>
+<tr class="codeline" data-linenumber="361"><td class="num" id="LN361">361</td><td class="line"> info-&gt;cond.phenomenon = PHENOMENON_SPRAY;</td></tr>
+<tr class="codeline" data-linenumber="362"><td class="num" id="LN362">362</td><td class="line"> } <span class='keyword'>else</span> <span class='keyword'>if</span> (!strcmp (sphen, <span class='string_literal'>"DU"</span>)) {</td></tr>
+<tr class="codeline" data-linenumber="363"><td class="num" id="LN363">363</td><td class="line"> info-&gt;cond.phenomenon = PHENOMENON_DUST;</td></tr>
+<tr class="codeline" data-linenumber="364"><td class="num" id="LN364">364</td><td class="line"> } <span class='keyword'>else</span> <span class='keyword'>if</span> (!strcmp (sphen, <span class='string_literal'>"SQ"</span>)) {</td></tr>
+<tr class="codeline" data-linenumber="365"><td class="num" id="LN365">365</td><td class="line"> info-&gt;cond.phenomenon = PHENOMENON_SQUALL;</td></tr>
+<tr class="codeline" data-linenumber="366"><td class="num" id="LN366">366</td><td class="line"> } <span class='keyword'>else</span> <span class='keyword'>if</span> (!strcmp (sphen, <span class='string_literal'>"SS"</span>)) {</td></tr>
+<tr class="codeline" data-linenumber="367"><td class="num" id="LN367">367</td><td class="line"> info-&gt;cond.phenomenon = PHENOMENON_SANDSTORM;</td></tr>
+<tr class="codeline" data-linenumber="368"><td class="num" id="LN368">368</td><td class="line"> } <span class='keyword'>else</span> <span class='keyword'>if</span> (!strcmp (sphen, <span class='string_literal'>"DS"</span>)) {</td></tr>
+<tr class="codeline" data-linenumber="369"><td class="num" id="LN369">369</td><td class="line"> info-&gt;cond.phenomenon = PHENOMENON_DUSTSTORM;</td></tr>
+<tr class="codeline" data-linenumber="370"><td class="num" id="LN370">370</td><td class="line"> } <span class='keyword'>else</span> <span class='keyword'>if</span> (!strcmp (sphen, <span class='string_literal'>"PO"</span>)) {</td></tr>
+<tr class="codeline" data-linenumber="371"><td class="num" id="LN371">371</td><td class="line"> info-&gt;cond.phenomenon = PHENOMENON_DUST_WHIRLS;</td></tr>
+<tr class="codeline" data-linenumber="372"><td class="num" id="LN372">372</td><td class="line"> } <span class='keyword'>else</span> <span class='keyword'>if</span> (!strcmp (sphen, <span class='string_literal'>"+FC"</span>)) {</td></tr>
+<tr class="codeline" data-linenumber="373"><td class="num" id="LN373">373</td><td class="line"> info-&gt;cond.phenomenon = PHENOMENON_TORNADO;</td></tr>
+<tr class="codeline" data-linenumber="374"><td class="num" id="LN374">374</td><td class="line"> } <span class='keyword'>else</span> <span class='keyword'>if</span> (!strcmp (sphen, <span class='string_literal'>"FC"</span>)) {</td></tr>
+<tr class="codeline" data-linenumber="375"><td class="num" id="LN375">375</td><td class="line"> info-&gt;cond.phenomenon = PHENOMENON_FUNNEL_CLOUD;</td></tr>
+<tr class="codeline" data-linenumber="376"><td class="num" id="LN376">376</td><td class="line"> } <span class='keyword'>else</span> {</td></tr>
+<tr class="codeline" data-linenumber="377"><td class="num" id="LN377">377</td><td class="line"> <span class='keyword'>return</span>;</td></tr>
+<tr class="codeline" data-linenumber="378"><td class="num" id="LN378">378</td><td class="line"> }</td></tr>
+<tr class="codeline" data-linenumber="379"><td class="num" id="LN379">379</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="380"><td class="num" id="LN380">380</td><td class="line"> <span class='keyword'>if</span> ((info-&gt;cond.qualifier != QUALIFIER_NONE) || (info-&gt;cond.phenomenon != PHENOMENON_NONE))</td></tr>
+<tr class="codeline" data-linenumber="381"><td class="num" id="LN381">381</td><td class="line"> info-&gt;cond.significant = <span class='macro'>TRUE<span class='macro_popup'>(!(0))</span></span>;</td></tr>
+<tr class="codeline" data-linenumber="382"><td class="num" id="LN382">382</td><td class="line">}</td></tr>
+<tr class="codeline" data-linenumber="383"><td class="num" id="LN383">383</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="384"><td class="num" id="LN384">384</td><td class="line"><span class='directive'>#define <span class='macro'>TIME_RE_STR<span class='macro_popup'>"([0-9]{6})Z"</span></span> "([0-9]{6})Z"</span></td></tr>
+<tr class="codeline" data-linenumber="385"><td class="num" id="LN385">385</td><td class="line"><span class='directive'>#define <span class='macro'>WIND_RE_STR<span class='macro_popup'>"(([0-9]{3})|VRB)([0-9]?[0-9]{2})(G[0-9]?[0-9]{2})?(KT|MPS)"</span></span> "(([0-9]{3})|VRB)([0-9]?[0-9]{2})(G[0-9]?[0-9]{2})?(KT|MPS)"</span></td></tr>
+<tr class="codeline" data-linenumber="386"><td class="num" id="LN386">386</td><td class="line"><span class='directive'>#define <span class='macro'>VIS_RE_STR<span class='macro_popup'>"((([0-9]?[0-9])|(M?([12] )?([1357]/1?[0-9])))SM)|" "([0-9]{4}(N|NE|E|SE|S|SW|W|NW( [0-9]{4}(N|NE|E|SE|S|SW|W|NW))?)?)|"<br> "CAVOK"</span></span> "((([0-9]?[0-9])|(M?([12] )?([1357]/1?[0-9])))SM)|" \</span></td></tr>
+<tr class="codeline" data-linenumber="387"><td class="num" id="LN387">387</td><td class="line"> <span class='directive'>"([0-9]{4}(N|NE|E|SE|S|SW|W|NW( [0-9]{4}(N|NE|E|SE|S|SW|W|NW))?)?)|" \</span></td></tr>
+<tr class="codeline" data-linenumber="388"><td class="num" id="LN388">388</td><td class="line"> <span class='directive'>"CAVOK"</span></td></tr>
+<tr class="codeline" data-linenumber="389"><td class="num" id="LN389">389</td><td class="line"><span class='directive'>#define <span class='macro'>COND_RE_STR<span class='macro_popup'>"(-|\\+)?(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)"</span></span> "(-|\\+)?(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)"</span></td></tr>
+<tr class="codeline" data-linenumber="390"><td class="num" id="LN390">390</td><td class="line"><span class='directive'>#define <span class='macro'>CLOUD_RE_STR<span class='macro_popup'>"((CLR|BKN|SCT|FEW|OVC|SKC|NSC)([0-9]{3}|///)?(CB|TCU|///)?)"</span></span> "((CLR|BKN|SCT|FEW|OVC|SKC|NSC)([0-9]{3}|///)?(CB|TCU|///)?)"</span></td></tr>
+<tr class="codeline" data-linenumber="391"><td class="num" id="LN391">391</td><td class="line"><span class='directive'>#define <span class='macro'>TEMP_RE_STR<span class='macro_popup'>"(M?[0-9][0-9])/(M?(//|[0-9][0-9])?)"</span></span> "(M?[0-9][0-9])/(M?(//|[0-9][0-9])?)"</span></td></tr>
+<tr class="codeline" data-linenumber="392"><td class="num" id="LN392">392</td><td class="line"><span class='directive'>#define <span class='macro'>PRES_RE_STR<span class='macro_popup'>"(A|Q)([0-9]{4})"</span></span> "(A|Q)([0-9]{4})"</span></td></tr>
+<tr class="codeline" data-linenumber="393"><td class="num" id="LN393">393</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="394"><td class="num" id="LN394">394</td><td class="line"><span class='comment'>/* POSIX regular expressions do not allow us to express "match whole words</span></td></tr>
+<tr class="codeline" data-linenumber="395"><td class="num" id="LN395">395</td><td class="line"> <span class='comment'>* only" in a simple way, so we have to wrap them all into</span></td></tr>
+<tr class="codeline" data-linenumber="396"><td class="num" id="LN396">396</td><td class="line"> <span class='comment'>* (^| )(...regex...)( |$)</span></td></tr>
+<tr class="codeline" data-linenumber="397"><td class="num" id="LN397">397</td><td class="line"> <span class='comment'>*/</span></td></tr>
+<tr class="codeline" data-linenumber="398"><td class="num" id="LN398">398</td><td class="line"><span class='directive'>#define <span class='macro'>RE_PREFIX<span class='macro_popup'>"(^| )("</span></span> "(^| )("</span></td></tr>
+<tr class="codeline" data-linenumber="399"><td class="num" id="LN399">399</td><td class="line"><span class='directive'>#define <span class='macro'>RE_SUFFIX<span class='macro_popup'>")( |$)"</span></span> ")( |$)"</span></td></tr>
+<tr class="codeline" data-linenumber="400"><td class="num" id="LN400">400</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="401"><td class="num" id="LN401">401</td><td class="line"><span class='keyword'>static</span> regex_t metar_re[RE_NUM];</td></tr>
+<tr class="codeline" data-linenumber="402"><td class="num" id="LN402">402</td><td class="line"><span class='keyword'>static</span> <span class='keyword'>void</span> (*metar_f[RE_NUM]) (gchar *tokp, WeatherInfo *info);</td></tr>
+<tr class="codeline" data-linenumber="403"><td class="num" id="LN403">403</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="404"><td class="num" id="LN404">404</td><td class="line"><span class='keyword'>static</span> <span class='keyword'>void</span></td></tr>
+<tr class="codeline" data-linenumber="405"><td class="num" id="LN405">405</td><td class="line">metar_init_re (<span class='keyword'>void</span>)</td></tr>
+<tr class="codeline" data-linenumber="406"><td class="num" id="LN406">406</td><td class="line">{</td></tr>
+<tr class="codeline" data-linenumber="407"><td class="num" id="LN407">407</td><td class="line"> <span class='keyword'>static</span> gboolean initialized = <span class='macro'>FALSE<span class='macro_popup'>(0)</span></span>;</td></tr>
+<tr class="codeline" data-linenumber="408"><td class="num" id="LN408">408</td><td class="line"> <span class='keyword'>if</span> (initialized)</td></tr>
+<tr class="codeline" data-linenumber="409"><td class="num" id="LN409">409</td><td class="line"> <span class='keyword'>return</span>;</td></tr>
+<tr class="codeline" data-linenumber="410"><td class="num" id="LN410">410</td><td class="line"> initialized = <span class='macro'>TRUE<span class='macro_popup'>(!(0))</span></span>;</td></tr>
+<tr class="codeline" data-linenumber="411"><td class="num" id="LN411">411</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="412"><td class="num" id="LN412">412</td><td class="line"> regcomp (&amp;metar_re[TIME_RE], <span class='macro'>RE_PREFIX<span class='macro_popup'>"(^| )("</span></span> <span class='macro'>TIME_RE_STR<span class='macro_popup'>"([0-9]{6})Z"</span></span> <span class='macro'>RE_SUFFIX<span class='macro_popup'>")( |$)"</span></span>, <span class='macro'>REG_EXTENDED<span class='macro_popup'>1</span></span>);</td></tr>
+<tr class="codeline" data-linenumber="413"><td class="num" id="LN413">413</td><td class="line"> regcomp (&amp;metar_re[WIND_RE], <span class='macro'>RE_PREFIX<span class='macro_popup'>"(^| )("</span></span> <span class='macro'>WIND_RE_STR<span class='macro_popup'>"(([0-9]{3})|VRB)([0-9]?[0-9]{2})(G[0-9]?[0-9]{2})?(KT|MPS)"</span></span> <span class='macro'>RE_SUFFIX<span class='macro_popup'>")( |$)"</span></span>, <span class='macro'>REG_EXTENDED<span class='macro_popup'>1</span></span>);</td></tr>
+<tr class="codeline" data-linenumber="414"><td class="num" id="LN414">414</td><td class="line"> regcomp (&amp;metar_re[VIS_RE], <span class='macro'>RE_PREFIX<span class='macro_popup'>"(^| )("</span></span> <span class='macro'>VIS_RE_STR<span class='macro_popup'>"((([0-9]?[0-9])|(M?([12] )?([1357]/1?[0-9])))SM)|" "([0-9]{4}(N|NE|E|SE|S|SW|W|NW( [0-9]{4}(N|NE|E|SE|S|SW|W|NW))?)?)|"<br> "CAVOK"</span></span> <span class='macro'>RE_SUFFIX<span class='macro_popup'>")( |$)"</span></span>, <span class='macro'>REG_EXTENDED<span class='macro_popup'>1</span></span>);</td></tr>
+<tr class="codeline" data-linenumber="415"><td class="num" id="LN415">415</td><td class="line"> regcomp (&amp;metar_re[COND_RE], <span class='macro'>RE_PREFIX<span class='macro_popup'>"(^| )("</span></span> <span class='macro'>COND_RE_STR<span class='macro_popup'>"(-|\\+)?(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)"</span></span> <span class='macro'>RE_SUFFIX<span class='macro_popup'>")( |$)"</span></span>, <span class='macro'>REG_EXTENDED<span class='macro_popup'>1</span></span>);</td></tr>
+<tr class="codeline" data-linenumber="416"><td class="num" id="LN416">416</td><td class="line"> regcomp (&amp;metar_re[CLOUD_RE], <span class='macro'>RE_PREFIX<span class='macro_popup'>"(^| )("</span></span> <span class='macro'>CLOUD_RE_STR<span class='macro_popup'>"((CLR|BKN|SCT|FEW|OVC|SKC|NSC)([0-9]{3}|///)?(CB|TCU|///)?)"</span></span> <span class='macro'>RE_SUFFIX<span class='macro_popup'>")( |$)"</span></span>, <span class='macro'>REG_EXTENDED<span class='macro_popup'>1</span></span>);</td></tr>
+<tr class="codeline" data-linenumber="417"><td class="num" id="LN417">417</td><td class="line"> regcomp (&amp;metar_re[TEMP_RE], <span class='macro'>RE_PREFIX<span class='macro_popup'>"(^| )("</span></span> <span class='macro'>TEMP_RE_STR<span class='macro_popup'>"(M?[0-9][0-9])/(M?(//|[0-9][0-9])?)"</span></span> <span class='macro'>RE_SUFFIX<span class='macro_popup'>")( |$)"</span></span>, <span class='macro'>REG_EXTENDED<span class='macro_popup'>1</span></span>);</td></tr>
+<tr class="codeline" data-linenumber="418"><td class="num" id="LN418">418</td><td class="line"> regcomp (&amp;metar_re[PRES_RE], <span class='macro'>RE_PREFIX<span class='macro_popup'>"(^| )("</span></span> <span class='macro'>PRES_RE_STR<span class='macro_popup'>"(A|Q)([0-9]{4})"</span></span> <span class='macro'>RE_SUFFIX<span class='macro_popup'>")( |$)"</span></span>, <span class='macro'>REG_EXTENDED<span class='macro_popup'>1</span></span>);</td></tr>
+<tr class="codeline" data-linenumber="419"><td class="num" id="LN419">419</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="420"><td class="num" id="LN420">420</td><td class="line"> metar_f[TIME_RE] = metar_tok_time;</td></tr>
+<tr class="codeline" data-linenumber="421"><td class="num" id="LN421">421</td><td class="line"> metar_f[WIND_RE] = metar_tok_wind;</td></tr>
+<tr class="codeline" data-linenumber="422"><td class="num" id="LN422">422</td><td class="line"> metar_f[VIS_RE] = metar_tok_vis;</td></tr>
+<tr class="codeline" data-linenumber="423"><td class="num" id="LN423">423</td><td class="line"> metar_f[COND_RE] = metar_tok_cond;</td></tr>
+<tr class="codeline" data-linenumber="424"><td class="num" id="LN424">424</td><td class="line"> metar_f[CLOUD_RE] = metar_tok_cloud;</td></tr>
+<tr class="codeline" data-linenumber="425"><td class="num" id="LN425">425</td><td class="line"> metar_f[TEMP_RE] = metar_tok_temp;</td></tr>
+<tr class="codeline" data-linenumber="426"><td class="num" id="LN426">426</td><td class="line"> metar_f[PRES_RE] = metar_tok_pres;</td></tr>
+<tr class="codeline" data-linenumber="427"><td class="num" id="LN427">427</td><td class="line">}</td></tr>
+<tr class="codeline" data-linenumber="428"><td class="num" id="LN428">428</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="429"><td class="num" id="LN429">429</td><td class="line">gboolean</td></tr>
+<tr class="codeline" data-linenumber="430"><td class="num" id="LN430">430</td><td class="line">metar_parse (gchar *metar, WeatherInfo *info)</td></tr>
+<tr class="codeline" data-linenumber="431"><td class="num" id="LN431">431</td><td class="line">{</td></tr>
+<tr class="codeline" data-linenumber="432"><td class="num" id="LN432">432</td><td class="line"> gchar *p;</td></tr>
+<tr class="codeline" data-linenumber="433"><td class="num" id="LN433">433</td><td class="line"> <span class='comment'>//gchar *rmk;</span></td></tr>
+<tr class="codeline" data-linenumber="434"><td class="num" id="LN434">434</td><td class="line"> gint i, i2;</td></tr>
+<tr class="codeline" data-linenumber="435"><td class="num" id="LN435">435</td><td class="line"> regmatch_t rm, rm2;</td></tr>
+<tr class="codeline" data-linenumber="436"><td class="num" id="LN436">436</td><td class="line"> gchar *tokp;</td></tr>
+<tr class="codeline" data-linenumber="437"><td class="num" id="LN437">437</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="438"><td class="num" id="LN438">438</td><td class="line"> <span class='macro'>g_return_val_if_fail (info != NULL, FALSE)<span class='macro_popup'>do { if ((__builtin_expect (__extension__ ({ int _g_boolean_var_<br>; if (info != ((void*)0)) _g_boolean_var_ = 1; else _g_boolean_var_<br> = 0; _g_boolean_var_; }), 1))) { } else { g_return_if_fail_warning<br> ("MateWeather", ((const char*) (__func__)), "info != NULL");<br> return ((0)); } } while (0)</span></span>;</td></tr>
+<tr class="codeline" data-linenumber="439"><td class="num" id="LN439">439</td><td class="line"> <span class='macro'>g_return_val_if_fail (metar != NULL, FALSE)<span class='macro_popup'>do { if ((__builtin_expect (__extension__ ({ int _g_boolean_var_<br>; if (metar != ((void*)0)) _g_boolean_var_ = 1; else _g_boolean_var_<br> = 0; _g_boolean_var_; }), 1))) { } else { g_return_if_fail_warning<br> ("MateWeather", ((const char*) (__func__)), "metar != NULL")<br>; return ((0)); } } while (0)</span></span>;</td></tr>
+<tr class="codeline" data-linenumber="440"><td class="num" id="LN440">440</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="441"><td class="num" id="LN441">441</td><td class="line"> metar_init_re ();</td></tr>
+<tr class="codeline" data-linenumber="442"><td class="num" id="LN442">442</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="443"><td class="num" id="LN443">443</td><td class="line"> <span class='comment'>/*</span></td></tr>
+<tr class="codeline" data-linenumber="444"><td class="num" id="LN444">444</td><td class="line"> <span class='comment'>* Force parsing to end at "RMK" field. This prevents a subtle</span></td></tr>
+<tr class="codeline" data-linenumber="445"><td class="num" id="LN445">445</td><td class="line"> <span class='comment'>* problem when info within the remark happens to match an earlier state</span></td></tr>
+<tr class="codeline" data-linenumber="446"><td class="num" id="LN446">446</td><td class="line"> <span class='comment'>* and, as a result, throws off all the remaining expression</span></td></tr>
+<tr class="codeline" data-linenumber="447"><td class="num" id="LN447">447</td><td class="line"> <span class='comment'>*/</span></td></tr>
+<tr class="codeline" data-linenumber="448"><td class="num" id="LN448">448</td><td class="line"> <span class='keyword'>if</span> (0 != (p = strstr (metar, <span class='string_literal'>" RMK "</span>))) {</td></tr>
+<tr class="codeline" data-linenumber="449"><td class="num" id="LN449">449</td><td class="line"> *p = '\0';</td></tr>
+<tr class="codeline" data-linenumber="450"><td class="num" id="LN450">450</td><td class="line"> <span class='comment'>//rmk = p + 5; // uncomment this if RMK data becomes useful</span></td></tr>
+<tr class="codeline" data-linenumber="451"><td class="num" id="LN451">451</td><td class="line"> }</td></tr>
+<tr class="codeline" data-linenumber="452"><td class="num" id="LN452">452</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="453"><td class="num" id="LN453">453</td><td class="line"> p = metar;</td></tr>
+<tr class="codeline" data-linenumber="454"><td class="num" id="LN454">454</td><td class="line"> i = <span class="mrange">TIME_RE</span>;</td></tr>
+<tr><td class="num"></td><td class="line"><div id="EndPath" class="msg msgEvent" style="margin-left:5ex">Value stored to 'i' is never read</div></td></tr>
+<tr class="codeline" data-linenumber="455"><td class="num" id="LN455">455</td><td class="line"> <span class='keyword'>while</span> (*p) {</td></tr>
+<tr class="codeline" data-linenumber="456"><td class="num" id="LN456">456</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="457"><td class="num" id="LN457">457</td><td class="line"> i2 = RE_NUM;</td></tr>
+<tr class="codeline" data-linenumber="458"><td class="num" id="LN458">458</td><td class="line"> rm2.rm_so = strlen (p);</td></tr>
+<tr class="codeline" data-linenumber="459"><td class="num" id="LN459">459</td><td class="line"> rm2.rm_eo = rm2.rm_so;</td></tr>
+<tr class="codeline" data-linenumber="460"><td class="num" id="LN460">460</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="461"><td class="num" id="LN461">461</td><td class="line"> <span class='keyword'>for</span> (i = 0; i &lt; RE_NUM &amp;&amp; rm2.rm_so &gt; 0; i++) {</td></tr>
+<tr class="codeline" data-linenumber="462"><td class="num" id="LN462">462</td><td class="line"> <span class='keyword'>if</span> (0 == regexec (&amp;metar_re[i], p, 1, &amp;rm, 0)</td></tr>
+<tr class="codeline" data-linenumber="463"><td class="num" id="LN463">463</td><td class="line"> &amp;&amp; rm.rm_so &lt; rm2.rm_so)</td></tr>
+<tr class="codeline" data-linenumber="464"><td class="num" id="LN464">464</td><td class="line"> {</td></tr>
+<tr class="codeline" data-linenumber="465"><td class="num" id="LN465">465</td><td class="line"> i2 = i;</td></tr>
+<tr class="codeline" data-linenumber="466"><td class="num" id="LN466">466</td><td class="line"> <span class='comment'>/* Skip leading and trailing space characters, if present.</span></td></tr>
+<tr class="codeline" data-linenumber="467"><td class="num" id="LN467">467</td><td class="line"> <span class='comment'>(the regular expressions include those characters to</span></td></tr>
+<tr class="codeline" data-linenumber="468"><td class="num" id="LN468">468</td><td class="line"> <span class='comment'>only get matches limited to whole words). */</span></td></tr>
+<tr class="codeline" data-linenumber="469"><td class="num" id="LN469">469</td><td class="line"> <span class='keyword'>if</span> (p[rm.rm_so] == ' ') rm.rm_so++;</td></tr>
+<tr class="codeline" data-linenumber="470"><td class="num" id="LN470">470</td><td class="line"> <span class='keyword'>if</span> (p[rm.rm_eo - 1] == ' ') rm.rm_eo--;</td></tr>
+<tr class="codeline" data-linenumber="471"><td class="num" id="LN471">471</td><td class="line"> rm2.rm_so = rm.rm_so;</td></tr>
+<tr class="codeline" data-linenumber="472"><td class="num" id="LN472">472</td><td class="line"> rm2.rm_eo = rm.rm_eo;</td></tr>
+<tr class="codeline" data-linenumber="473"><td class="num" id="LN473">473</td><td class="line"> }</td></tr>
+<tr class="codeline" data-linenumber="474"><td class="num" id="LN474">474</td><td class="line"> }</td></tr>
+<tr class="codeline" data-linenumber="475"><td class="num" id="LN475">475</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="476"><td class="num" id="LN476">476</td><td class="line"> <span class='keyword'>if</span> (i2 != RE_NUM) {</td></tr>
+<tr class="codeline" data-linenumber="477"><td class="num" id="LN477">477</td><td class="line"> tokp = g_strndup (p + rm2.rm_so, rm2.rm_eo - rm2.rm_so);</td></tr>
+<tr class="codeline" data-linenumber="478"><td class="num" id="LN478">478</td><td class="line"> metar_f[i2] (tokp, info);</td></tr>
+<tr class="codeline" data-linenumber="479"><td class="num" id="LN479">479</td><td class="line"> g_free (tokp);</td></tr>
+<tr class="codeline" data-linenumber="480"><td class="num" id="LN480">480</td><td class="line"> }</td></tr>
+<tr class="codeline" data-linenumber="481"><td class="num" id="LN481">481</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="482"><td class="num" id="LN482">482</td><td class="line"> p += rm2.rm_eo;</td></tr>
+<tr class="codeline" data-linenumber="483"><td class="num" id="LN483">483</td><td class="line"> p += strspn (p, <span class='string_literal'>" "</span>);</td></tr>
+<tr class="codeline" data-linenumber="484"><td class="num" id="LN484">484</td><td class="line"> }</td></tr>
+<tr class="codeline" data-linenumber="485"><td class="num" id="LN485">485</td><td class="line"> <span class='keyword'>return</span> <span class='macro'>TRUE<span class='macro_popup'>(!(0))</span></span>;</td></tr>
+<tr class="codeline" data-linenumber="486"><td class="num" id="LN486">486</td><td class="line">}</td></tr>
+<tr class="codeline" data-linenumber="487"><td class="num" id="LN487">487</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="488"><td class="num" id="LN488">488</td><td class="line"><span class='keyword'>static</span> <span class='keyword'>void</span></td></tr>
+<tr class="codeline" data-linenumber="489"><td class="num" id="LN489">489</td><td class="line">metar_finish (SoupSession *session, SoupMessage *msg, gpointer data)</td></tr>
+<tr class="codeline" data-linenumber="490"><td class="num" id="LN490">490</td><td class="line">{</td></tr>
+<tr class="codeline" data-linenumber="491"><td class="num" id="LN491">491</td><td class="line"> WeatherInfo *info = (WeatherInfo *)data;</td></tr>
+<tr class="codeline" data-linenumber="492"><td class="num" id="LN492">492</td><td class="line"> WeatherLocation *loc;</td></tr>
+<tr class="codeline" data-linenumber="493"><td class="num" id="LN493">493</td><td class="line"> <span class='keyword'>const</span> gchar *p, *endtag;</td></tr>
+<tr class="codeline" data-linenumber="494"><td class="num" id="LN494">494</td><td class="line"> gchar *searchkey, *metar;</td></tr>
+<tr class="codeline" data-linenumber="495"><td class="num" id="LN495">495</td><td class="line"> gboolean success = <span class='macro'>FALSE<span class='macro_popup'>(0)</span></span>;</td></tr>
+<tr class="codeline" data-linenumber="496"><td class="num" id="LN496">496</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="497"><td class="num" id="LN497">497</td><td class="line"> <span class='macro'>g_return_if_fail (info != NULL)<span class='macro_popup'>do { if ((__builtin_expect (__extension__ ({ int _g_boolean_var_<br>; if (info != ((void*)0)) _g_boolean_var_ = 1; else _g_boolean_var_<br> = 0; _g_boolean_var_; }), 1))) { } else { g_return_if_fail_warning<br> ("MateWeather", ((const char*) (__func__)), "info != NULL");<br> return; } } while (0)</span></span>;</td></tr>
+<tr class="codeline" data-linenumber="498"><td class="num" id="LN498">498</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="499"><td class="num" id="LN499">499</td><td class="line"> <span class='keyword'>if</span> (!<span class='macro'>SOUP_STATUS_IS_SUCCESSFUL (msg-&gt;status_code)<span class='macro_popup'>((msg-&gt;status_code) &gt;= 200 &amp;&amp; (msg-&gt;status_code<br>) &lt; 300)</span></span>) {</td></tr>
+<tr class="codeline" data-linenumber="500"><td class="num" id="LN500">500</td><td class="line"> <span class='keyword'>if</span> (<span class='macro'>SOUP_STATUS_IS_TRANSPORT_ERROR (msg-&gt;status_code)<span class='macro_popup'>((msg-&gt;status_code) &gt; 0 &amp;&amp; (msg-&gt;status_code<br>) &lt; 100)</span></span>)</td></tr>
+<tr class="codeline" data-linenumber="501"><td class="num" id="LN501">501</td><td class="line"> info-&gt;network_error = <span class='macro'>TRUE<span class='macro_popup'>(!(0))</span></span>;</td></tr>
+<tr class="codeline" data-linenumber="502"><td class="num" id="LN502">502</td><td class="line"> <span class='keyword'>else</span> {</td></tr>
+<tr class="codeline" data-linenumber="503"><td class="num" id="LN503">503</td><td class="line"> <span class='comment'>/* Translators: %d is an error code, and %s the error string */</span></td></tr>
+<tr class="codeline" data-linenumber="504"><td class="num" id="LN504">504</td><td class="line"> g_warning (<span class='macro'>_(<span class='string_literal'>"Failed to get METAR data: %d %s.\n"</span>)<span class='macro_popup'>(mateweather_gettext ("Failed to get METAR data: %d %s.\n"))</span></span>,</td></tr>
+<tr class="codeline" data-linenumber="505"><td class="num" id="LN505">505</td><td class="line"> msg-&gt;status_code, msg-&gt;reason_phrase);</td></tr>
+<tr class="codeline" data-linenumber="506"><td class="num" id="LN506">506</td><td class="line"> }</td></tr>
+<tr class="codeline" data-linenumber="507"><td class="num" id="LN507">507</td><td class="line"> request_done (info, <span class='macro'>FALSE<span class='macro_popup'>(0)</span></span>);</td></tr>
+<tr class="codeline" data-linenumber="508"><td class="num" id="LN508">508</td><td class="line"> <span class='keyword'>return</span>;</td></tr>
+<tr class="codeline" data-linenumber="509"><td class="num" id="LN509">509</td><td class="line"> }</td></tr>
+<tr class="codeline" data-linenumber="510"><td class="num" id="LN510">510</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="511"><td class="num" id="LN511">511</td><td class="line"> loc = info-&gt;location;</td></tr>
+<tr class="codeline" data-linenumber="512"><td class="num" id="LN512">512</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="513"><td class="num" id="LN513">513</td><td class="line"> searchkey = g_strdup_printf (<span class='string_literal'>"&lt;raw_text&gt;%s"</span>, loc-&gt;code);</td></tr>
+<tr class="codeline" data-linenumber="514"><td class="num" id="LN514">514</td><td class="line"> p = strstr (msg-&gt;response_body-&gt;data, searchkey);</td></tr>
+<tr class="codeline" data-linenumber="515"><td class="num" id="LN515">515</td><td class="line"> g_free (searchkey);</td></tr>
+<tr class="codeline" data-linenumber="516"><td class="num" id="LN516">516</td><td class="line"> <span class='keyword'>if</span> (p) {</td></tr>
+<tr class="codeline" data-linenumber="517"><td class="num" id="LN517">517</td><td class="line"> p += <span class='macro'>WEATHER_LOCATION_CODE_LEN<span class='macro_popup'>4</span></span> + 11;</td></tr>
+<tr class="codeline" data-linenumber="518"><td class="num" id="LN518">518</td><td class="line"> endtag = strstr (p, <span class='string_literal'>"&lt;/raw_text&gt;"</span>);</td></tr>
+<tr class="codeline" data-linenumber="519"><td class="num" id="LN519">519</td><td class="line"> <span class='keyword'>if</span> (endtag)</td></tr>
+<tr class="codeline" data-linenumber="520"><td class="num" id="LN520">520</td><td class="line"> metar = g_strndup (p, endtag - p);</td></tr>
+<tr class="codeline" data-linenumber="521"><td class="num" id="LN521">521</td><td class="line"> <span class='keyword'>else</span></td></tr>
+<tr class="codeline" data-linenumber="522"><td class="num" id="LN522">522</td><td class="line"> metar = g_strdup (p);</td></tr>
+<tr class="codeline" data-linenumber="523"><td class="num" id="LN523">523</td><td class="line"> success = metar_parse (metar, info);</td></tr>
+<tr class="codeline" data-linenumber="524"><td class="num" id="LN524">524</td><td class="line"> g_free (metar);</td></tr>
+<tr class="codeline" data-linenumber="525"><td class="num" id="LN525">525</td><td class="line"> } <span class='keyword'>else</span> <span class='keyword'>if</span> (!strstr (msg-&gt;response_body-&gt;data, <span class='string_literal'>"aviationweather.gov"</span>)) {</td></tr>
+<tr class="codeline" data-linenumber="526"><td class="num" id="LN526">526</td><td class="line"> <span class='comment'>/* The response doesn't even seem to have come from NOAA...</span></td></tr>
+<tr class="codeline" data-linenumber="527"><td class="num" id="LN527">527</td><td class="line"> <span class='comment'>* most likely it is a wifi hotspot login page. Call that a</span></td></tr>
+<tr class="codeline" data-linenumber="528"><td class="num" id="LN528">528</td><td class="line"> <span class='comment'>* network error.</span></td></tr>
+<tr class="codeline" data-linenumber="529"><td class="num" id="LN529">529</td><td class="line"> <span class='comment'>*/</span></td></tr>
+<tr class="codeline" data-linenumber="530"><td class="num" id="LN530">530</td><td class="line"> info-&gt;network_error = <span class='macro'>TRUE<span class='macro_popup'>(!(0))</span></span>;</td></tr>
+<tr class="codeline" data-linenumber="531"><td class="num" id="LN531">531</td><td class="line"> }</td></tr>
+<tr class="codeline" data-linenumber="532"><td class="num" id="LN532">532</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="533"><td class="num" id="LN533">533</td><td class="line"> info-&gt;valid = success;</td></tr>
+<tr class="codeline" data-linenumber="534"><td class="num" id="LN534">534</td><td class="line"> request_done (info, <span class='macro'>TRUE<span class='macro_popup'>(!(0))</span></span>);</td></tr>
+<tr class="codeline" data-linenumber="535"><td class="num" id="LN535">535</td><td class="line">}</td></tr>
+<tr class="codeline" data-linenumber="536"><td class="num" id="LN536">536</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="537"><td class="num" id="LN537">537</td><td class="line"><span class='comment'>/* Read current conditions and fill in info structure */</span></td></tr>
+<tr class="codeline" data-linenumber="538"><td class="num" id="LN538">538</td><td class="line"><span class='keyword'>void</span></td></tr>
+<tr class="codeline" data-linenumber="539"><td class="num" id="LN539">539</td><td class="line">metar_start_open (WeatherInfo *info)</td></tr>
+<tr class="codeline" data-linenumber="540"><td class="num" id="LN540">540</td><td class="line">{</td></tr>
+<tr class="codeline" data-linenumber="541"><td class="num" id="LN541">541</td><td class="line"> WeatherLocation *loc;</td></tr>
+<tr class="codeline" data-linenumber="542"><td class="num" id="LN542">542</td><td class="line"> SoupMessage *msg;</td></tr>
+<tr class="codeline" data-linenumber="543"><td class="num" id="LN543">543</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="544"><td class="num" id="LN544">544</td><td class="line"> <span class='macro'>g_return_if_fail (info != NULL)<span class='macro_popup'>do { if ((__builtin_expect (__extension__ ({ int _g_boolean_var_<br>; if (info != ((void*)0)) _g_boolean_var_ = 1; else _g_boolean_var_<br> = 0; _g_boolean_var_; }), 1))) { } else { g_return_if_fail_warning<br> ("MateWeather", ((const char*) (__func__)), "info != NULL");<br> return; } } while (0)</span></span>;</td></tr>
+<tr class="codeline" data-linenumber="545"><td class="num" id="LN545">545</td><td class="line"> info-&gt;valid = info-&gt;network_error = <span class='macro'>FALSE<span class='macro_popup'>(0)</span></span>;</td></tr>
+<tr class="codeline" data-linenumber="546"><td class="num" id="LN546">546</td><td class="line"> loc = info-&gt;location;</td></tr>
+<tr class="codeline" data-linenumber="547"><td class="num" id="LN547">547</td><td class="line"> <span class='keyword'>if</span> (loc == <span class='macro'>NULL<span class='macro_popup'>((void*)0)</span></span>) {</td></tr>
+<tr class="codeline" data-linenumber="548"><td class="num" id="LN548">548</td><td class="line"> g_warning (<span class='macro'>_(<span class='string_literal'>"WeatherInfo missing location"</span>)<span class='macro_popup'>(mateweather_gettext ("WeatherInfo missing location"))</span></span>);</td></tr>
+<tr class="codeline" data-linenumber="549"><td class="num" id="LN549">549</td><td class="line"> <span class='keyword'>return</span>;</td></tr>
+<tr class="codeline" data-linenumber="550"><td class="num" id="LN550">550</td><td class="line"> }</td></tr>
+<tr class="codeline" data-linenumber="551"><td class="num" id="LN551">551</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="552"><td class="num" id="LN552">552</td><td class="line"> msg = soup_form_request_new (</td></tr>
+<tr class="codeline" data-linenumber="553"><td class="num" id="LN553">553</td><td class="line"> <span class='string_literal'>"GET"</span>, <span class='string_literal'>"https://www.aviationweather.gov/adds/dataserver_current/httpparam"</span>,</td></tr>
+<tr class="codeline" data-linenumber="554"><td class="num" id="LN554">554</td><td class="line"> <span class='string_literal'>"dataSource"</span>, <span class='string_literal'>"metars"</span>,</td></tr>
+<tr class="codeline" data-linenumber="555"><td class="num" id="LN555">555</td><td class="line"> <span class='string_literal'>"requestType"</span>, <span class='string_literal'>"retrieve"</span>,</td></tr>
+<tr class="codeline" data-linenumber="556"><td class="num" id="LN556">556</td><td class="line"> <span class='string_literal'>"format"</span>, <span class='string_literal'>"xml"</span>,</td></tr>
+<tr class="codeline" data-linenumber="557"><td class="num" id="LN557">557</td><td class="line"> <span class='string_literal'>"hoursBeforeNow"</span>, <span class='string_literal'>"3"</span>,</td></tr>
+<tr class="codeline" data-linenumber="558"><td class="num" id="LN558">558</td><td class="line"> <span class='string_literal'>"mostRecent"</span>, <span class='string_literal'>"true"</span>,</td></tr>
+<tr class="codeline" data-linenumber="559"><td class="num" id="LN559">559</td><td class="line"> <span class='string_literal'>"fields"</span>, <span class='string_literal'>"raw_text"</span>,</td></tr>
+<tr class="codeline" data-linenumber="560"><td class="num" id="LN560">560</td><td class="line"> <span class='string_literal'>"stationString"</span>, loc-&gt;code,</td></tr>
+<tr class="codeline" data-linenumber="561"><td class="num" id="LN561">561</td><td class="line"> <span class='macro'>NULL<span class='macro_popup'>((void*)0)</span></span>);</td></tr>
+<tr class="codeline" data-linenumber="562"><td class="num" id="LN562">562</td><td class="line"> soup_session_queue_message (info-&gt;session, msg, metar_finish, info);</td></tr>
+<tr class="codeline" data-linenumber="563"><td class="num" id="LN563">563</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="564"><td class="num" id="LN564">564</td><td class="line"> info-&gt;requests_pending++;</td></tr>
+<tr class="codeline" data-linenumber="565"><td class="num" id="LN565">565</td><td class="line">}</td></tr>
+</table></body></html>
diff --git a/[email protected]_travis-ci/report-ab125a.html b/[email protected]_travis-ci/report-ab125a.html
new file mode 100644
index 0000000..bd637bf
--- /dev/null
+++ b/[email protected]_travis-ci/report-ab125a.html
@@ -0,0 +1,920 @@
+<!doctype html>
+<html>
+<head>
+<title>weather-metar.c</title>
+
+<style type="text/css">
+body { color:#000000; background-color:#ffffff }
+body { font-family:Helvetica, sans-serif; font-size:10pt }
+h1 { font-size:14pt }
+.FileName { margin-top: 5px; margin-bottom: 5px; display: inline; }
+.FileNav { margin-left: 5px; margin-right: 5px; display: inline; }
+.FileNav a { text-decoration:none; font-size: larger; }
+.divider { margin-top: 30px; margin-bottom: 30px; height: 15px; }
+.divider { background-color: gray; }
+.code { border-collapse:collapse; width:100%; }
+.code { font-family: "Monospace", monospace; font-size:10pt }
+.code { line-height: 1.2em }
+.comment { color: green; font-style: oblique }
+.keyword { color: blue }
+.string_literal { color: red }
+.directive { color: darkmagenta }
+
+/* Macros and variables could have pop-up notes hidden by default.
+ - Macro pop-up: expansion of the macro
+ - Variable pop-up: value (table) of the variable */
+.macro_popup, .variable_popup { display: none; }
+
+/* Pop-up appears on mouse-hover event. */
+.macro:hover .macro_popup, .variable:hover .variable_popup {
+ display: block;
+ padding: 2px;
+ -webkit-border-radius:5px;
+ -webkit-box-shadow:1px 1px 7px #000;
+ border-radius:5px;
+ box-shadow:1px 1px 7px #000;
+ position: absolute;
+ top: -1em;
+ left:10em;
+ z-index: 1
+}
+
+.macro_popup {
+ border: 2px solid red;
+ background-color:#FFF0F0;
+ font-weight: normal;
+}
+
+.variable_popup {
+ border: 2px solid blue;
+ background-color:#F0F0FF;
+ font-weight: bold;
+ font-family: Helvetica, sans-serif;
+ font-size: 9pt;
+}
+
+/* Pop-up notes needs a relative position as a base where they pops up. */
+.macro, .variable {
+ background-color: PaleGoldenRod;
+ position: relative;
+}
+.macro { color: DarkMagenta; }
+
+#tooltiphint {
+ position: fixed;
+ width: 50em;
+ margin-left: -25em;
+ left: 50%;
+ padding: 10px;
+ border: 1px solid #b0b0b0;
+ border-radius: 2px;
+ box-shadow: 1px 1px 7px black;
+ background-color: #c0c0c0;
+ z-index: 2;
+}
+
+.num { width:2.5em; padding-right:2ex; background-color:#eeeeee }
+.num { text-align:right; font-size:8pt }
+.num { color:#444444 }
+.line { padding-left: 1ex; border-left: 3px solid #ccc }
+.line { white-space: pre }
+.msg { -webkit-box-shadow:1px 1px 7px #000 }
+.msg { box-shadow:1px 1px 7px #000 }
+.msg { -webkit-border-radius:5px }
+.msg { border-radius:5px }
+.msg { font-family:Helvetica, sans-serif; font-size:8pt }
+.msg { float:left }
+.msg { padding:0.25em 1ex 0.25em 1ex }
+.msg { margin-top:10px; margin-bottom:10px }
+.msg { font-weight:bold }
+.msg { max-width:60em; word-wrap: break-word; white-space: pre-wrap }
+.msgT { padding:0x; spacing:0x }
+.msgEvent { background-color:#fff8b4; color:#000000 }
+.msgControl { background-color:#bbbbbb; color:#000000 }
+.msgNote { background-color:#ddeeff; color:#000000 }
+.mrange { background-color:#dfddf3 }
+.mrange { border-bottom:1px solid #6F9DBE }
+.PathIndex { font-weight: bold; padding:0px 5px; margin-right:5px; }
+.PathIndex { -webkit-border-radius:8px }
+.PathIndex { border-radius:8px }
+.PathIndexEvent { background-color:#bfba87 }
+.PathIndexControl { background-color:#8c8c8c }
+.PathIndexPopUp { background-color: #879abc; }
+.PathNav a { text-decoration:none; font-size: larger }
+.CodeInsertionHint { font-weight: bold; background-color: #10dd10 }
+.CodeRemovalHint { background-color:#de1010 }
+.CodeRemovalHint { border-bottom:1px solid #6F9DBE }
+.selected{ background-color:orange !important; }
+
+table.simpletable {
+ padding: 5px;
+ font-size:12pt;
+ margin:20px;
+ border-collapse: collapse; border-spacing: 0px;
+}
+td.rowname {
+ text-align: right;
+ vertical-align: top;
+ font-weight: bold;
+ color:#444444;
+ padding-right:2ex;
+}
+
+/* Hidden text. */
+input.spoilerhider + label {
+ cursor: pointer;
+ text-decoration: underline;
+ display: block;
+}
+input.spoilerhider {
+ display: none;
+}
+input.spoilerhider ~ .spoiler {
+ overflow: hidden;
+ margin: 10px auto 0;
+ height: 0;
+ opacity: 0;
+}
+input.spoilerhider:checked + label + .spoiler{
+ height: auto;
+ opacity: 1;
+}
+</style>
+</head>
+<body>
+<!-- BUGDESC Out of bound memory access (access exceeds upper limit of memory block) -->
+
+<!-- BUGTYPE Out-of-bound access -->
+
+<!-- BUGCATEGORY Logic error -->
+
+<!-- BUGFILE /rootdir/libmateweather/weather-metar.c -->
+
+<!-- FILENAME weather-metar.c -->
+
+<!-- FUNCTIONNAME metar_tok_vis -->
+
+<!-- ISSUEHASHCONTENTOFLINEINCONTEXT 9ba4ebf258edeab791a09e71980e85fd -->
+
+<!-- BUGLINE 169 -->
+
+<!-- BUGCOLUMN 24 -->
+
+<!-- BUGPATHLENGTH 9 -->
+
+<!-- BUGMETAEND -->
+<!-- REPORTHEADER -->
+<h3>Bug Summary</h3>
+<table class="simpletable">
+<tr><td class="rowname">File:</td><td>weather-metar.c</td></tr>
+<tr><td class="rowname">Warning:</td><td><a href="#EndPath">line 169, column 24</a><br />Out of bound memory access (access exceeds upper limit of memory block)</td></tr>
+
+</table>
+<!-- REPORTSUMMARYEXTRA -->
+<h3>Annotated Source Code</h3>
+<p>Press <a href="#" onclick="toggleHelp(); return false;">'?'</a>
+ to see keyboard shortcuts</p>
+<input type="checkbox" class="spoilerhider" id="showinvocation" />
+<label for="showinvocation" >Show analyzer invocation</label>
+<div class="spoiler">clang -cc1 -triple x86_64-unknown-linux-gnu -analyze -disable-free -disable-llvm-verifier -discard-value-names -main-file-name weather-metar.c -analyzer-store=region -analyzer-opt-analyze-nested-blocks -analyzer-checker=core -analyzer-checker=apiModeling -analyzer-checker=unix -analyzer-checker=deadcode -analyzer-checker=security.insecureAPI.UncheckedReturn -analyzer-checker=security.insecureAPI.getpw -analyzer-checker=security.insecureAPI.gets -analyzer-checker=security.insecureAPI.mktemp -analyzer-checker=security.insecureAPI.mkstemp -analyzer-checker=security.insecureAPI.vfork -analyzer-checker=nullability.NullPassedToNonnull -analyzer-checker=nullability.NullReturnedFromNonnull -analyzer-output plist -w -mrelocation-model pic -pic-level 2 -mthread-model posix -fmath-errno -masm-verbose -mconstructor-aliases -munwind-tables -fuse-init-array -target-cpu x86-64 -dwarf-column-info -debugger-tuning=gdb -momit-leaf-frame-pointer -resource-dir /usr/lib64/clang/9.0.1 -D HAVE_CONFIG_H -I . -I .. -I /usr/include/gtk-3.0 -I /usr/include/pango-1.0 -I /usr/include/glib-2.0 -I /usr/lib64/glib-2.0/include -I /usr/include/harfbuzz -I /usr/include/fribidi -I /usr/include/freetype2 -I /usr/include/libpng16 -I /usr/include/cairo -I /usr/include/pixman-1 -I /usr/include/gdk-pixbuf-2.0 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/gio-unix-2.0 -I /usr/include/libdrm -I /usr/include/atk-1.0 -I /usr/include/at-spi2-atk/2.0 -I /usr/include/dbus-1.0 -I /usr/lib64/dbus-1.0/include -I /usr/include/at-spi-2.0 -I .. -I . -I /usr/include/libxml2 -I /usr/include/libsoup-2.4 -I /usr/include/glib-2.0 -I /usr/lib64/glib-2.0/include -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/libxml2 -I /usr/include/glib-2.0 -I /usr/lib64/glib-2.0/include -I /usr/include/libmount -I /usr/include/blkid -D G_LOG_DOMAIN="MateWeather" -D MATELOCALEDIR="/usr/local/share/locale" -D MATEWEATHER_XML_LOCATION_DIR="/usr/local/share/libmateweather" -D PIC -internal-isystem /usr/local/include -internal-isystem /usr/lib64/clang/9.0.1/include -internal-externc-isystem /include -internal-externc-isystem /usr/include -O2 -Wno-unused-parameter -Wno-sign-compare -fdebug-compilation-dir /rootdir/libmateweather -ferror-limit 19 -fmessage-length 0 -fobjc-runtime=gcc -fdiagnostics-show-option -vectorize-loops -vectorize-slp -analyzer-checker deadcode.DeadStores -analyzer-checker alpha.deadcode.UnreachableCode -analyzer-checker alpha.core.CastSize -analyzer-checker alpha.core.CastToStruct -analyzer-checker alpha.core.IdenticalExpr -analyzer-checker alpha.core.SizeofPtr -analyzer-checker alpha.security.ArrayBoundV2 -analyzer-checker alpha.security.MallocOverflow -analyzer-checker alpha.security.ReturnPtrRange -analyzer-checker alpha.unix.SimpleStream -analyzer-checker alpha.unix.cstring.BufferOverlap -analyzer-checker alpha.unix.cstring.NotNullTerminated -analyzer-checker alpha.unix.cstring.OutOfBounds -analyzer-checker alpha.core.FixedAddr -analyzer-checker security.insecureAPI.strcpy -analyzer-output=html -faddrsig -o /rootdir/html-report/2020-06-22-141506-5642-1 -x c weather-metar.c
+</div>
+<div id='tooltiphint' hidden="true">
+ <p>Keyboard shortcuts: </p>
+ <ul>
+ <li>Use 'j/k' keys for keyboard navigation</li>
+ <li>Use 'Shift+S' to show/hide relevant lines</li>
+ <li>Use '?' to toggle this window</li>
+ </ul>
+ <a href="#" onclick="toggleHelp(); return false;">Close</a>
+</div>
+<script type='text/javascript'>
+var relevant_lines = {"1": {"149": 1, "150": 1, "151": 1, "152": 1, "153": 1, "154": 1, "156": 1, "158": 1, "162": 1, "164": 1, "165": 1, "166": 1, "169": 1}};
+
+var filterCounterexample = function (hide) {
+ var tables = document.getElementsByClassName("code");
+ for (var t=0; t<tables.length; t++) {
+ var table = tables[t];
+ var file_id = table.getAttribute("data-fileid");
+ var lines_in_fid = relevant_lines[file_id];
+ if (!lines_in_fid) {
+ lines_in_fid = {};
+ }
+ var lines = table.getElementsByClassName("codeline");
+ for (var i=0; i<lines.length; i++) {
+ var el = lines[i];
+ var lineNo = el.getAttribute("data-linenumber");
+ if (!lines_in_fid[lineNo]) {
+ if (hide) {
+ el.setAttribute("hidden", "");
+ } else {
+ el.removeAttribute("hidden");
+ }
+ }
+ }
+ }
+}
+
+window.addEventListener("keydown", function (event) {
+ if (event.defaultPrevented) {
+ return;
+ }
+ if (event.key == "S") {
+ var checked = document.getElementsByName("showCounterexample")[0].checked;
+ filterCounterexample(!checked);
+ document.getElementsByName("showCounterexample")[0].checked = !checked;
+ } else {
+ return;
+ }
+ event.preventDefault();
+}, true);
+
+document.addEventListener("DOMContentLoaded", function() {
+ document.querySelector('input[name="showCounterexample"]').onchange=
+ function (event) {
+ filterCounterexample(this.checked);
+ };
+});
+</script>
+
+<form>
+ <input type="checkbox" name="showCounterexample" id="showCounterexample" />
+ <label for="showCounterexample">
+ Show only relevant lines
+ </label>
+</form>
+
+<script type='text/javascript'>
+var digitMatcher = new RegExp("[0-9]+");
+
+document.addEventListener("DOMContentLoaded", function() {
+ document.querySelectorAll(".PathNav > a").forEach(
+ function(currentValue, currentIndex) {
+ var hrefValue = currentValue.getAttribute("href");
+ currentValue.onclick = function() {
+ scrollTo(document.querySelector(hrefValue));
+ return false;
+ };
+ });
+});
+
+var findNum = function() {
+ var s = document.querySelector(".selected");
+ if (!s || s.id == "EndPath") {
+ return 0;
+ }
+ var out = parseInt(digitMatcher.exec(s.id)[0]);
+ return out;
+};
+
+var scrollTo = function(el) {
+ document.querySelectorAll(".selected").forEach(function(s) {
+ s.classList.remove("selected");
+ });
+ el.classList.add("selected");
+ window.scrollBy(0, el.getBoundingClientRect().top -
+ (window.innerHeight / 2));
+}
+
+var move = function(num, up, numItems) {
+ if (num == 1 && up || num == numItems - 1 && !up) {
+ return 0;
+ } else if (num == 0 && up) {
+ return numItems - 1;
+ } else if (num == 0 && !up) {
+ return 1 % numItems;
+ }
+ return up ? num - 1 : num + 1;
+}
+
+var numToId = function(num) {
+ if (num == 0) {
+ return document.getElementById("EndPath")
+ }
+ return document.getElementById("Path" + num);
+};
+
+var navigateTo = function(up) {
+ var numItems = document.querySelectorAll(
+ ".line > .msgEvent, .line > .msgControl").length;
+ var currentSelected = findNum();
+ var newSelected = move(currentSelected, up, numItems);
+ var newEl = numToId(newSelected, numItems);
+
+ // Scroll element into center.
+ scrollTo(newEl);
+};
+
+window.addEventListener("keydown", function (event) {
+ if (event.defaultPrevented) {
+ return;
+ }
+ if (event.key == "j") {
+ navigateTo(/*up=*/false);
+ } else if (event.key == "k") {
+ navigateTo(/*up=*/true);
+ } else {
+ return;
+ }
+ event.preventDefault();
+}, true);
+</script>
+
+<script type='text/javascript'>
+
+var toggleHelp = function() {
+ var hint = document.querySelector("#tooltiphint");
+ var attributeName = "hidden";
+ if (hint.hasAttribute(attributeName)) {
+ hint.removeAttribute(attributeName);
+ } else {
+ hint.setAttribute("hidden", "true");
+ }
+};
+window.addEventListener("keydown", function (event) {
+ if (event.defaultPrevented) {
+ return;
+ }
+ if (event.key == "?") {
+ toggleHelp();
+ } else {
+ return;
+ }
+ event.preventDefault();
+});
+</script>
+<table class="code" data-fileid="1">
+<tr class="codeline" data-linenumber="1"><td class="num" id="LN1">1</td><td class="line"><span class='comment'>/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 4 -*- */</span></td></tr>
+<tr class="codeline" data-linenumber="2"><td class="num" id="LN2">2</td><td class="line"><span class='comment'>/* weather-metar.c - Weather server functions (METAR)</span></td></tr>
+<tr class="codeline" data-linenumber="3"><td class="num" id="LN3">3</td><td class="line"> <span class='comment'>*</span></td></tr>
+<tr class="codeline" data-linenumber="4"><td class="num" id="LN4">4</td><td class="line"> <span class='comment'>* This program is free software; you can redistribute it and/or</span></td></tr>
+<tr class="codeline" data-linenumber="5"><td class="num" id="LN5">5</td><td class="line"> <span class='comment'>* modify it under the terms of the GNU General Public License as</span></td></tr>
+<tr class="codeline" data-linenumber="6"><td class="num" id="LN6">6</td><td class="line"> <span class='comment'>* published by the Free Software Foundation; either version 2 of the</span></td></tr>
+<tr class="codeline" data-linenumber="7"><td class="num" id="LN7">7</td><td class="line"> <span class='comment'>* License, or (at your option) any later version.</span></td></tr>
+<tr class="codeline" data-linenumber="8"><td class="num" id="LN8">8</td><td class="line"> <span class='comment'>*</span></td></tr>
+<tr class="codeline" data-linenumber="9"><td class="num" id="LN9">9</td><td class="line"> <span class='comment'>* This program is distributed in the hope that it will be useful, but</span></td></tr>
+<tr class="codeline" data-linenumber="10"><td class="num" id="LN10">10</td><td class="line"> <span class='comment'>* WITHOUT ANY WARRANTY; without even the implied warranty of</span></td></tr>
+<tr class="codeline" data-linenumber="11"><td class="num" id="LN11">11</td><td class="line"> <span class='comment'>* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU</span></td></tr>
+<tr class="codeline" data-linenumber="12"><td class="num" id="LN12">12</td><td class="line"> <span class='comment'>* General Public License for more details.</span></td></tr>
+<tr class="codeline" data-linenumber="13"><td class="num" id="LN13">13</td><td class="line"> <span class='comment'>*</span></td></tr>
+<tr class="codeline" data-linenumber="14"><td class="num" id="LN14">14</td><td class="line"> <span class='comment'>* You should have received a copy of the GNU General Public License</span></td></tr>
+<tr class="codeline" data-linenumber="15"><td class="num" id="LN15">15</td><td class="line"> <span class='comment'>* along with this program; if not, see</span></td></tr>
+<tr class="codeline" data-linenumber="16"><td class="num" id="LN16">16</td><td class="line"> <span class='comment'>* &lt;http://www.gnu.org/licenses/&gt;.</span></td></tr>
+<tr class="codeline" data-linenumber="17"><td class="num" id="LN17">17</td><td class="line"> <span class='comment'>*/</span></td></tr>
+<tr class="codeline" data-linenumber="18"><td class="num" id="LN18">18</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="19"><td class="num" id="LN19">19</td><td class="line"><span class='directive'>#ifdef <span class='macro'>HAVE_CONFIG_H<span class='macro_popup'>1</span></span></span></td></tr>
+<tr class="codeline" data-linenumber="20"><td class="num" id="LN20">20</td><td class="line"><span class='directive'>#include &lt;config.h&gt;</span></td></tr>
+<tr class="codeline" data-linenumber="21"><td class="num" id="LN21">21</td><td class="line"><span class='directive'>#endif</span></td></tr>
+<tr class="codeline" data-linenumber="22"><td class="num" id="LN22">22</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="23"><td class="num" id="LN23">23</td><td class="line"><span class='directive'>#include &lt;stdlib.h&gt;</span></td></tr>
+<tr class="codeline" data-linenumber="24"><td class="num" id="LN24">24</td><td class="line"><span class='directive'>#include &lt;string.h&gt;</span></td></tr>
+<tr class="codeline" data-linenumber="25"><td class="num" id="LN25">25</td><td class="line"><span class='directive'>#include &lt;sys/types.h&gt;</span></td></tr>
+<tr class="codeline" data-linenumber="26"><td class="num" id="LN26">26</td><td class="line"><span class='directive'>#include &lt;regex.h&gt;</span></td></tr>
+<tr class="codeline" data-linenumber="27"><td class="num" id="LN27">27</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="28"><td class="num" id="LN28">28</td><td class="line"><span class='directive'>#define MATEWEATHER_I_KNOW_THIS_IS_UNSTABLE</span></td></tr>
+<tr class="codeline" data-linenumber="29"><td class="num" id="LN29">29</td><td class="line"><span class='directive'>#include "weather.h"</span></td></tr>
+<tr class="codeline" data-linenumber="30"><td class="num" id="LN30">30</td><td class="line"><span class='directive'>#include "weather-priv.h"</span></td></tr>
+<tr class="codeline" data-linenumber="31"><td class="num" id="LN31">31</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="32"><td class="num" id="LN32">32</td><td class="line"><span class='keyword'>enum</span> {</td></tr>
+<tr class="codeline" data-linenumber="33"><td class="num" id="LN33">33</td><td class="line"> TIME_RE,</td></tr>
+<tr class="codeline" data-linenumber="34"><td class="num" id="LN34">34</td><td class="line"> WIND_RE,</td></tr>
+<tr class="codeline" data-linenumber="35"><td class="num" id="LN35">35</td><td class="line"> VIS_RE,</td></tr>
+<tr class="codeline" data-linenumber="36"><td class="num" id="LN36">36</td><td class="line"> COND_RE,</td></tr>
+<tr class="codeline" data-linenumber="37"><td class="num" id="LN37">37</td><td class="line"> CLOUD_RE,</td></tr>
+<tr class="codeline" data-linenumber="38"><td class="num" id="LN38">38</td><td class="line"> TEMP_RE,</td></tr>
+<tr class="codeline" data-linenumber="39"><td class="num" id="LN39">39</td><td class="line"> PRES_RE,</td></tr>
+<tr class="codeline" data-linenumber="40"><td class="num" id="LN40">40</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="41"><td class="num" id="LN41">41</td><td class="line"> RE_NUM</td></tr>
+<tr class="codeline" data-linenumber="42"><td class="num" id="LN42">42</td><td class="line">};</td></tr>
+<tr class="codeline" data-linenumber="43"><td class="num" id="LN43">43</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="44"><td class="num" id="LN44">44</td><td class="line"><span class='comment'>/* Return time of weather report as secs since epoch UTC */</span></td></tr>
+<tr class="codeline" data-linenumber="45"><td class="num" id="LN45">45</td><td class="line"><span class='keyword'>static</span> time_t</td></tr>
+<tr class="codeline" data-linenumber="46"><td class="num" id="LN46">46</td><td class="line">make_time (gint utcDate, gint utcHour, gint utcMin)</td></tr>
+<tr class="codeline" data-linenumber="47"><td class="num" id="LN47">47</td><td class="line">{</td></tr>
+<tr class="codeline" data-linenumber="48"><td class="num" id="LN48">48</td><td class="line"> <span class='keyword'>const</span> time_t now = time (<span class='macro'>NULL<span class='macro_popup'>((void*)0)</span></span>);</td></tr>
+<tr class="codeline" data-linenumber="49"><td class="num" id="LN49">49</td><td class="line"> <span class='keyword'>struct</span> tm tm;</td></tr>
+<tr class="codeline" data-linenumber="50"><td class="num" id="LN50">50</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="51"><td class="num" id="LN51">51</td><td class="line"> localtime_r (&amp;now, &amp;tm);</td></tr>
+<tr class="codeline" data-linenumber="52"><td class="num" id="LN52">52</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="53"><td class="num" id="LN53">53</td><td class="line"> <span class='comment'>/* If last reading took place just before midnight UTC on the</span></td></tr>
+<tr class="codeline" data-linenumber="54"><td class="num" id="LN54">54</td><td class="line"> <span class='comment'>* first, adjust the date downward to allow for the month</span></td></tr>
+<tr class="codeline" data-linenumber="55"><td class="num" id="LN55">55</td><td class="line"> <span class='comment'>* change-over. This ASSUMES that the reading won't be more than</span></td></tr>
+<tr class="codeline" data-linenumber="56"><td class="num" id="LN56">56</td><td class="line"> <span class='comment'>* 24 hrs old! */</span></td></tr>
+<tr class="codeline" data-linenumber="57"><td class="num" id="LN57">57</td><td class="line"> <span class='keyword'>if</span> ((utcDate &gt; tm.tm_mday) &amp;&amp; (tm.tm_mday == 1)) {</td></tr>
+<tr class="codeline" data-linenumber="58"><td class="num" id="LN58">58</td><td class="line"> tm.tm_mday = 0; <span class='comment'>/* mktime knows this is the last day of the previous</span></td></tr>
+<tr class="codeline" data-linenumber="59"><td class="num" id="LN59">59</td><td class="line"> <span class='comment'>* month. */</span></td></tr>
+<tr class="codeline" data-linenumber="60"><td class="num" id="LN60">60</td><td class="line"> } <span class='keyword'>else</span> {</td></tr>
+<tr class="codeline" data-linenumber="61"><td class="num" id="LN61">61</td><td class="line"> tm.tm_mday = utcDate;</td></tr>
+<tr class="codeline" data-linenumber="62"><td class="num" id="LN62">62</td><td class="line"> }</td></tr>
+<tr class="codeline" data-linenumber="63"><td class="num" id="LN63">63</td><td class="line"> tm.tm_hour = utcHour;</td></tr>
+<tr class="codeline" data-linenumber="64"><td class="num" id="LN64">64</td><td class="line"> tm.tm_min = utcMin;</td></tr>
+<tr class="codeline" data-linenumber="65"><td class="num" id="LN65">65</td><td class="line"> tm.tm_sec = 0;</td></tr>
+<tr class="codeline" data-linenumber="66"><td class="num" id="LN66">66</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="67"><td class="num" id="LN67">67</td><td class="line"> <span class='comment'>/* mktime() assumes value is local, not UTC. Use tm_gmtoff to compensate */</span></td></tr>
+<tr class="codeline" data-linenumber="68"><td class="num" id="LN68">68</td><td class="line"><span class='directive'>#ifdef <span class='macro'>HAVE_TM_TM_GMOFF<span class='macro_popup'>1</span></span></span></td></tr>
+<tr class="codeline" data-linenumber="69"><td class="num" id="LN69">69</td><td class="line"> <span class='keyword'>return</span> tm.tm_gmtoff + mktime (&amp;tm);</td></tr>
+<tr class="codeline" data-linenumber="70"><td class="num" id="LN70">70</td><td class="line"><span class='directive'>#elif defined HAVE_TIMEZONE</span></td></tr>
+<tr class="codeline" data-linenumber="71"><td class="num" id="LN71">71</td><td class="line"> <span class='keyword'>return</span> timezone + mktime (&amp;tm);</td></tr>
+<tr class="codeline" data-linenumber="72"><td class="num" id="LN72">72</td><td class="line"><span class='directive'>#endif</span></td></tr>
+<tr class="codeline" data-linenumber="73"><td class="num" id="LN73">73</td><td class="line">}</td></tr>
+<tr class="codeline" data-linenumber="74"><td class="num" id="LN74">74</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="75"><td class="num" id="LN75">75</td><td class="line"><span class='keyword'>static</span> <span class='keyword'>void</span></td></tr>
+<tr class="codeline" data-linenumber="76"><td class="num" id="LN76">76</td><td class="line">metar_tok_time (gchar *tokp, WeatherInfo *info)</td></tr>
+<tr class="codeline" data-linenumber="77"><td class="num" id="LN77">77</td><td class="line">{</td></tr>
+<tr class="codeline" data-linenumber="78"><td class="num" id="LN78">78</td><td class="line"> gint day, hr, min;</td></tr>
+<tr class="codeline" data-linenumber="79"><td class="num" id="LN79">79</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="80"><td class="num" id="LN80">80</td><td class="line"> sscanf (tokp, <span class='string_literal'>"%2u%2u%2u"</span>, &amp;day, &amp;hr, &amp;min);</td></tr>
+<tr class="codeline" data-linenumber="81"><td class="num" id="LN81">81</td><td class="line"> info-&gt;update = make_time (day, hr, min);</td></tr>
+<tr class="codeline" data-linenumber="82"><td class="num" id="LN82">82</td><td class="line">}</td></tr>
+<tr class="codeline" data-linenumber="83"><td class="num" id="LN83">83</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="84"><td class="num" id="LN84">84</td><td class="line"><span class='keyword'>static</span> <span class='keyword'>void</span></td></tr>
+<tr class="codeline" data-linenumber="85"><td class="num" id="LN85">85</td><td class="line">metar_tok_wind (gchar *tokp, WeatherInfo *info)</td></tr>
+<tr class="codeline" data-linenumber="86"><td class="num" id="LN86">86</td><td class="line">{</td></tr>
+<tr class="codeline" data-linenumber="87"><td class="num" id="LN87">87</td><td class="line"> gchar sdir[4], sspd[4], sgust[4];</td></tr>
+<tr class="codeline" data-linenumber="88"><td class="num" id="LN88">88</td><td class="line"> gint dir, spd = -1;</td></tr>
+<tr class="codeline" data-linenumber="89"><td class="num" id="LN89">89</td><td class="line"> gchar *gustp;</td></tr>
+<tr class="codeline" data-linenumber="90"><td class="num" id="LN90">90</td><td class="line"> size_t glen;</td></tr>
+<tr class="codeline" data-linenumber="91"><td class="num" id="LN91">91</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="92"><td class="num" id="LN92">92</td><td class="line"> strncpy (sdir, tokp, 3);</td></tr>
+<tr class="codeline" data-linenumber="93"><td class="num" id="LN93">93</td><td class="line"> sdir[3] = 0;</td></tr>
+<tr class="codeline" data-linenumber="94"><td class="num" id="LN94">94</td><td class="line"> dir = (!strcmp (sdir, <span class='string_literal'>"VRB"</span>)) ? -1 : atoi (sdir);</td></tr>
+<tr class="codeline" data-linenumber="95"><td class="num" id="LN95">95</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="96"><td class="num" id="LN96">96</td><td class="line"> memset (sspd, 0, <span class='keyword'>sizeof</span> (sspd));</td></tr>
+<tr class="codeline" data-linenumber="97"><td class="num" id="LN97">97</td><td class="line"> glen = strspn (tokp + 3, <span class='macro'>CONST_DIGITS<span class='macro_popup'>"0123456789"</span></span>);</td></tr>
+<tr class="codeline" data-linenumber="98"><td class="num" id="LN98">98</td><td class="line"> strncpy (sspd, tokp + 3, glen);</td></tr>
+<tr class="codeline" data-linenumber="99"><td class="num" id="LN99">99</td><td class="line"> spd = atoi (sspd);</td></tr>
+<tr class="codeline" data-linenumber="100"><td class="num" id="LN100">100</td><td class="line"> tokp += glen + 3;</td></tr>
+<tr class="codeline" data-linenumber="101"><td class="num" id="LN101">101</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="102"><td class="num" id="LN102">102</td><td class="line"> gustp = strchr (tokp, 'G');</td></tr>
+<tr class="codeline" data-linenumber="103"><td class="num" id="LN103">103</td><td class="line"> <span class='keyword'>if</span> (gustp) {</td></tr>
+<tr class="codeline" data-linenumber="104"><td class="num" id="LN104">104</td><td class="line"> memset (sgust, 0, <span class='keyword'>sizeof</span> (sgust));</td></tr>
+<tr class="codeline" data-linenumber="105"><td class="num" id="LN105">105</td><td class="line"> glen = strspn (gustp + 1, <span class='macro'>CONST_DIGITS<span class='macro_popup'>"0123456789"</span></span>);</td></tr>
+<tr class="codeline" data-linenumber="106"><td class="num" id="LN106">106</td><td class="line"> strncpy (sgust, gustp + 1, glen);</td></tr>
+<tr class="codeline" data-linenumber="107"><td class="num" id="LN107">107</td><td class="line"> tokp = gustp + 1 + glen;</td></tr>
+<tr class="codeline" data-linenumber="108"><td class="num" id="LN108">108</td><td class="line"> }</td></tr>
+<tr class="codeline" data-linenumber="109"><td class="num" id="LN109">109</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="110"><td class="num" id="LN110">110</td><td class="line"> <span class='keyword'>if</span> (!strcmp (tokp, <span class='string_literal'>"MPS"</span>))</td></tr>
+<tr class="codeline" data-linenumber="111"><td class="num" id="LN111">111</td><td class="line"> info-&gt;windspeed = <span class='macro'>WINDSPEED_MS_TO_KNOTS ((WeatherWindSpeed)spd)<span class='macro_popup'>(((WeatherWindSpeed)spd) / 0.514444)</span></span>;</td></tr>
+<tr class="codeline" data-linenumber="112"><td class="num" id="LN112">112</td><td class="line"> <span class='keyword'>else</span></td></tr>
+<tr class="codeline" data-linenumber="113"><td class="num" id="LN113">113</td><td class="line"> info-&gt;windspeed = (WeatherWindSpeed)spd;</td></tr>
+<tr class="codeline" data-linenumber="114"><td class="num" id="LN114">114</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="115"><td class="num" id="LN115">115</td><td class="line"> <span class='keyword'>if</span> ((349 &lt;= dir) || (dir &lt;= 11))</td></tr>
+<tr class="codeline" data-linenumber="116"><td class="num" id="LN116">116</td><td class="line"> info-&gt;wind = WIND_N;</td></tr>
+<tr class="codeline" data-linenumber="117"><td class="num" id="LN117">117</td><td class="line"> <span class='keyword'>else</span> <span class='keyword'>if</span> ((12 &lt;= dir) &amp;&amp; (dir &lt;= 33))</td></tr>
+<tr class="codeline" data-linenumber="118"><td class="num" id="LN118">118</td><td class="line"> info-&gt;wind = WIND_NNE;</td></tr>
+<tr class="codeline" data-linenumber="119"><td class="num" id="LN119">119</td><td class="line"> <span class='keyword'>else</span> <span class='keyword'>if</span> ((34 &lt;= dir) &amp;&amp; (dir &lt;= 56))</td></tr>
+<tr class="codeline" data-linenumber="120"><td class="num" id="LN120">120</td><td class="line"> info-&gt;wind = WIND_NE;</td></tr>
+<tr class="codeline" data-linenumber="121"><td class="num" id="LN121">121</td><td class="line"> <span class='keyword'>else</span> <span class='keyword'>if</span> ((57 &lt;= dir) &amp;&amp; (dir &lt;= 78))</td></tr>
+<tr class="codeline" data-linenumber="122"><td class="num" id="LN122">122</td><td class="line"> info-&gt;wind = WIND_ENE;</td></tr>
+<tr class="codeline" data-linenumber="123"><td class="num" id="LN123">123</td><td class="line"> <span class='keyword'>else</span> <span class='keyword'>if</span> ((79 &lt;= dir) &amp;&amp; (dir &lt;= 101))</td></tr>
+<tr class="codeline" data-linenumber="124"><td class="num" id="LN124">124</td><td class="line"> info-&gt;wind = WIND_E;</td></tr>
+<tr class="codeline" data-linenumber="125"><td class="num" id="LN125">125</td><td class="line"> <span class='keyword'>else</span> <span class='keyword'>if</span> ((102 &lt;= dir) &amp;&amp; (dir &lt;= 123))</td></tr>
+<tr class="codeline" data-linenumber="126"><td class="num" id="LN126">126</td><td class="line"> info-&gt;wind = WIND_ESE;</td></tr>
+<tr class="codeline" data-linenumber="127"><td class="num" id="LN127">127</td><td class="line"> <span class='keyword'>else</span> <span class='keyword'>if</span> ((124 &lt;= dir) &amp;&amp; (dir &lt;= 146))</td></tr>
+<tr class="codeline" data-linenumber="128"><td class="num" id="LN128">128</td><td class="line"> info-&gt;wind = WIND_SE;</td></tr>
+<tr class="codeline" data-linenumber="129"><td class="num" id="LN129">129</td><td class="line"> <span class='keyword'>else</span> <span class='keyword'>if</span> ((147 &lt;= dir) &amp;&amp; (dir &lt;= 168))</td></tr>
+<tr class="codeline" data-linenumber="130"><td class="num" id="LN130">130</td><td class="line"> info-&gt;wind = WIND_SSE;</td></tr>
+<tr class="codeline" data-linenumber="131"><td class="num" id="LN131">131</td><td class="line"> <span class='keyword'>else</span> <span class='keyword'>if</span> ((169 &lt;= dir) &amp;&amp; (dir &lt;= 191))</td></tr>
+<tr class="codeline" data-linenumber="132"><td class="num" id="LN132">132</td><td class="line"> info-&gt;wind = WIND_S;</td></tr>
+<tr class="codeline" data-linenumber="133"><td class="num" id="LN133">133</td><td class="line"> <span class='keyword'>else</span> <span class='keyword'>if</span> ((192 &lt;= dir) &amp;&amp; (dir &lt;= 213))</td></tr>
+<tr class="codeline" data-linenumber="134"><td class="num" id="LN134">134</td><td class="line"> info-&gt;wind = WIND_SSW;</td></tr>
+<tr class="codeline" data-linenumber="135"><td class="num" id="LN135">135</td><td class="line"> <span class='keyword'>else</span> <span class='keyword'>if</span> ((214 &lt;= dir) &amp;&amp; (dir &lt;= 236))</td></tr>
+<tr class="codeline" data-linenumber="136"><td class="num" id="LN136">136</td><td class="line"> info-&gt;wind = WIND_SW;</td></tr>
+<tr class="codeline" data-linenumber="137"><td class="num" id="LN137">137</td><td class="line"> <span class='keyword'>else</span> <span class='keyword'>if</span> ((237 &lt;= dir) &amp;&amp; (dir &lt;= 258))</td></tr>
+<tr class="codeline" data-linenumber="138"><td class="num" id="LN138">138</td><td class="line"> info-&gt;wind = WIND_WSW;</td></tr>
+<tr class="codeline" data-linenumber="139"><td class="num" id="LN139">139</td><td class="line"> <span class='keyword'>else</span> <span class='keyword'>if</span> ((259 &lt;= dir) &amp;&amp; (dir &lt;= 281))</td></tr>
+<tr class="codeline" data-linenumber="140"><td class="num" id="LN140">140</td><td class="line"> info-&gt;wind = WIND_W;</td></tr>
+<tr class="codeline" data-linenumber="141"><td class="num" id="LN141">141</td><td class="line"> <span class='keyword'>else</span> <span class='keyword'>if</span> ((282 &lt;= dir) &amp;&amp; (dir &lt;= 303))</td></tr>
+<tr class="codeline" data-linenumber="142"><td class="num" id="LN142">142</td><td class="line"> info-&gt;wind = WIND_WNW;</td></tr>
+<tr class="codeline" data-linenumber="143"><td class="num" id="LN143">143</td><td class="line"> <span class='keyword'>else</span> <span class='keyword'>if</span> ((304 &lt;= dir) &amp;&amp; (dir &lt;= 326))</td></tr>
+<tr class="codeline" data-linenumber="144"><td class="num" id="LN144">144</td><td class="line"> info-&gt;wind = WIND_NW;</td></tr>
+<tr class="codeline" data-linenumber="145"><td class="num" id="LN145">145</td><td class="line"> <span class='keyword'>else</span> <span class='keyword'>if</span> ((327 &lt;= dir) &amp;&amp; (dir &lt;= 348))</td></tr>
+<tr class="codeline" data-linenumber="146"><td class="num" id="LN146">146</td><td class="line"> info-&gt;wind = WIND_NNW;</td></tr>
+<tr class="codeline" data-linenumber="147"><td class="num" id="LN147">147</td><td class="line">}</td></tr>
+<tr class="codeline" data-linenumber="148"><td class="num" id="LN148">148</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="149"><td class="num" id="LN149">149</td><td class="line"><span class='keyword'>static</span> <span class='keyword'>void</span></td></tr>
+<tr class="codeline" data-linenumber="150"><td class="num" id="LN150">150</td><td class="line">metar_tok_vis (gchar *tokp, WeatherInfo *info)</td></tr>
+<tr class="codeline" data-linenumber="151"><td class="num" id="LN151">151</td><td class="line">{</td></tr>
+<tr class="codeline" data-linenumber="152"><td class="num" id="LN152">152</td><td class="line"> gchar *pfrac, *pend, *psp;</td></tr>
+<tr class="codeline" data-linenumber="153"><td class="num" id="LN153">153</td><td class="line"> gchar sval[6];</td></tr>
+<tr class="codeline" data-linenumber="154"><td class="num" id="LN154">154</td><td class="line"> gint num, den, val;</td></tr>
+<tr class="codeline" data-linenumber="155"><td class="num" id="LN155">155</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="156"><td class="num" id="LN156">156</td><td class="line"> memset (sval, 0, <span class='keyword'>sizeof</span> (sval));</td></tr>
+<tr class="codeline" data-linenumber="157"><td class="num" id="LN157">157</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="158"><td class="num" id="LN158">158</td><td class="line"> <span class='keyword'>if</span> (<span class="mrange">!strcmp (tokp,<span class='string_literal'>"CAVOK"</span>)</span>) {</td></tr>
+<tr><td class="num"></td><td class="line"><div id="Path1" class="msg msgEvent" style="margin-left:9ex"><table class="msgT"><tr><td valign="top"><div class="PathIndex PathIndexEvent">1</div></td><td>Assuming the condition is false</td><td><div class="PathNav"><a href="#Path2" title="Next event (2)">&#x2192;</a></div></td></tr></table></div></td></tr>
+<tr><td class="num"></td><td class="line"><div id="Path2" class="msg msgControl" style="margin-left:5ex"><table class="msgT"><tr><td valign="top"><div class="PathIndex PathIndexControl">2</div></td><td><div class="PathNav"><a href="#Path1" title="Previous event (1)">&#x2190;</a></div></td></td><td>Taking false branch</td><td><div class="PathNav"><a href="#Path3" title="Next event (3)">&#x2192;</a></div></td></tr></table></div></td></tr>
+<tr class="codeline" data-linenumber="159"><td class="num" id="LN159">159</td><td class="line"> <span class='comment'>// "Ceiling And Visibility OK": visibility &gt;= 10 KM</span></td></tr>
+<tr class="codeline" data-linenumber="160"><td class="num" id="LN160">160</td><td class="line"> info-&gt;visibility=10000. / <span class='macro'>VISIBILITY_SM_TO_M (1.)<span class='macro_popup'>(((1.) * 1.609344) * 1000)</span></span>;</td></tr>
+<tr class="codeline" data-linenumber="161"><td class="num" id="LN161">161</td><td class="line"> info-&gt;sky = SKY_CLEAR;</td></tr>
+<tr class="codeline" data-linenumber="162"><td class="num" id="LN162">162</td><td class="line"> } <span class='keyword'>else</span> <span class='keyword'>if</span> (<span class="mrange">0 != (pend = strstr (tokp, <span class='string_literal'>"SM"</span>))</span>) {</td></tr>
+<tr><td class="num"></td><td class="line"><div id="Path3" class="msg msgEvent" style="margin-left:16ex"><table class="msgT"><tr><td valign="top"><div class="PathIndex PathIndexEvent">3</div></td><td><div class="PathNav"><a href="#Path2" title="Previous event (2)">&#x2190;</a></div></td></td><td>Assuming the condition is true</td><td><div class="PathNav"><a href="#Path4" title="Next event (4)">&#x2192;</a></div></td></tr></table></div></td></tr>
+<tr><td class="num"></td><td class="line"><div id="Path4" class="msg msgControl" style="margin-left:12ex"><table class="msgT"><tr><td valign="top"><div class="PathIndex PathIndexControl">4</div></td><td><div class="PathNav"><a href="#Path3" title="Previous event (3)">&#x2190;</a></div></td></td><td>Taking true branch</td><td><div class="PathNav"><a href="#Path5" title="Next event (5)">&#x2192;</a></div></td></tr></table></div></td></tr>
+<tr class="codeline" data-linenumber="163"><td class="num" id="LN163">163</td><td class="line"> <span class='comment'>// US observation: field ends with "SM"</span></td></tr>
+<tr class="codeline" data-linenumber="164"><td class="num" id="LN164">164</td><td class="line"> pfrac = strchr (tokp, '/');</td></tr>
+<tr class="codeline" data-linenumber="165"><td class="num" id="LN165">165</td><td class="line"> <span class='keyword'>if</span> (<span class="mrange">pfrac</span>) {</td></tr>
+<tr><td class="num"></td><td class="line"><div id="Path5" class="msg msgEvent" style="margin-left:13ex"><table class="msgT"><tr><td valign="top"><div class="PathIndex PathIndexEvent">5</div></td><td><div class="PathNav"><a href="#Path4" title="Previous event (4)">&#x2190;</a></div></td></td><td>Assuming 'pfrac' is non-null</td><td><div class="PathNav"><a href="#Path6" title="Next event (6)">&#x2192;</a></div></td></tr></table></div></td></tr>
+<tr><td class="num"></td><td class="line"><div id="Path6" class="msg msgControl" style="margin-left:9ex"><table class="msgT"><tr><td valign="top"><div class="PathIndex PathIndexControl">6</div></td><td><div class="PathNav"><a href="#Path5" title="Previous event (5)">&#x2190;</a></div></td></td><td>Taking true branch</td><td><div class="PathNav"><a href="#Path7" title="Next event (7)">&#x2192;</a></div></td></tr></table></div></td></tr>
+<tr class="codeline" data-linenumber="166"><td class="num" id="LN166">166</td><td class="line"> <span class='keyword'>if</span> (<span class="mrange">*tokp == 'M') {</td></tr></span>
+<tr><td class="num"></td><td class="line"><div id="Path7" class="msg msgEvent" style="margin-left:17ex"><table class="msgT"><tr><td valign="top"><div class="PathIndex PathIndexEvent">7</div></td><td><div class="PathNav"><a href="#Path6" title="Previous event (6)">&#x2190;</a></div></td></td><td>Assuming the condition is false</td><td><div class="PathNav"><a href="#Path8" title="Next event (8)">&#x2192;</a></div></td></tr></table></div></td></tr>
+<tr><td class="num"></td><td class="line"><div id="Path8" class="msg msgControl" style="margin-left:13ex"><table class="msgT"><tr><td valign="top"><div class="PathIndex PathIndexControl">8</div></td><td><div class="PathNav"><a href="#Path7" title="Previous event (7)">&#x2190;</a></div></td></td><td>Taking false branch</td><td><div class="PathNav"><a href="#EndPath" title="Next event (9)">&#x2192;</a></div></td></tr></table></div></td></tr>
+<tr class="codeline" data-linenumber="167"><td class="num" id="LN167">167</td><td class="line"> info-&gt;visibility = 0.001;</td></tr>
+<tr class="codeline" data-linenumber="168"><td class="num" id="LN168">168</td><td class="line"> } <span class='keyword'>else</span> {</td></tr>
+<tr class="codeline" data-linenumber="169"><td class="num" id="LN169">169</td><td class="line"> num = (<span class="mrange">*(pfrac - 1)</span> - '0');</td></tr>
+<tr><td class="num"></td><td class="line"><div id="EndPath" class="msg msgEvent" style="margin-left:24ex"><table class="msgT"><tr><td valign="top"><div class="PathIndex PathIndexEvent">9</div></td><td><div class="PathNav"><a href="#Path8" title="Previous event (8)">&#x2190;</a></div></td></td><td>Out of bound memory access (access exceeds upper limit of memory block)</td></tr></table></div></td></tr>
+<tr class="codeline" data-linenumber="170"><td class="num" id="LN170">170</td><td class="line"> strncpy (sval, pfrac + 1, pend - pfrac - 1);</td></tr>
+<tr class="codeline" data-linenumber="171"><td class="num" id="LN171">171</td><td class="line"> den = atoi (sval);</td></tr>
+<tr class="codeline" data-linenumber="172"><td class="num" id="LN172">172</td><td class="line"> info-&gt;visibility =</td></tr>
+<tr class="codeline" data-linenumber="173"><td class="num" id="LN173">173</td><td class="line"> ((WeatherVisibility)num / ((WeatherVisibility)den));</td></tr>
+<tr class="codeline" data-linenumber="174"><td class="num" id="LN174">174</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="175"><td class="num" id="LN175">175</td><td class="line"> psp = strchr (tokp, ' ');</td></tr>
+<tr class="codeline" data-linenumber="176"><td class="num" id="LN176">176</td><td class="line"> <span class='keyword'>if</span> (psp) {</td></tr>
+<tr class="codeline" data-linenumber="177"><td class="num" id="LN177">177</td><td class="line"> *psp = '\0';</td></tr>
+<tr class="codeline" data-linenumber="178"><td class="num" id="LN178">178</td><td class="line"> val = atoi (tokp);</td></tr>
+<tr class="codeline" data-linenumber="179"><td class="num" id="LN179">179</td><td class="line"> info-&gt;visibility += (WeatherVisibility)val;</td></tr>
+<tr class="codeline" data-linenumber="180"><td class="num" id="LN180">180</td><td class="line"> }</td></tr>
+<tr class="codeline" data-linenumber="181"><td class="num" id="LN181">181</td><td class="line"> }</td></tr>
+<tr class="codeline" data-linenumber="182"><td class="num" id="LN182">182</td><td class="line"> } <span class='keyword'>else</span> {</td></tr>
+<tr class="codeline" data-linenumber="183"><td class="num" id="LN183">183</td><td class="line"> strncpy (sval, tokp, pend - tokp);</td></tr>
+<tr class="codeline" data-linenumber="184"><td class="num" id="LN184">184</td><td class="line"> val = atoi (sval);</td></tr>
+<tr class="codeline" data-linenumber="185"><td class="num" id="LN185">185</td><td class="line"> info-&gt;visibility = (WeatherVisibility)val;</td></tr>
+<tr class="codeline" data-linenumber="186"><td class="num" id="LN186">186</td><td class="line"> }</td></tr>
+<tr class="codeline" data-linenumber="187"><td class="num" id="LN187">187</td><td class="line"> } <span class='keyword'>else</span> {</td></tr>
+<tr class="codeline" data-linenumber="188"><td class="num" id="LN188">188</td><td class="line"> <span class='comment'>// International observation: NNNN(DD NNNNDD)?</span></td></tr>
+<tr class="codeline" data-linenumber="189"><td class="num" id="LN189">189</td><td class="line"> <span class='comment'>// For now: use only the minimum visibility and ignore its direction</span></td></tr>
+<tr class="codeline" data-linenumber="190"><td class="num" id="LN190">190</td><td class="line"> strncpy (sval, tokp, strspn (tokp, <span class='macro'>CONST_DIGITS<span class='macro_popup'>"0123456789"</span></span>));</td></tr>
+<tr class="codeline" data-linenumber="191"><td class="num" id="LN191">191</td><td class="line"> val = atoi (sval);</td></tr>
+<tr class="codeline" data-linenumber="192"><td class="num" id="LN192">192</td><td class="line"> info-&gt;visibility = (WeatherVisibility)val / <span class='macro'>VISIBILITY_SM_TO_M (1.)<span class='macro_popup'>(((1.) * 1.609344) * 1000)</span></span>;</td></tr>
+<tr class="codeline" data-linenumber="193"><td class="num" id="LN193">193</td><td class="line"> }</td></tr>
+<tr class="codeline" data-linenumber="194"><td class="num" id="LN194">194</td><td class="line">}</td></tr>
+<tr class="codeline" data-linenumber="195"><td class="num" id="LN195">195</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="196"><td class="num" id="LN196">196</td><td class="line"><span class='keyword'>static</span> <span class='keyword'>void</span></td></tr>
+<tr class="codeline" data-linenumber="197"><td class="num" id="LN197">197</td><td class="line">metar_tok_cloud (gchar *tokp, WeatherInfo *info)</td></tr>
+<tr class="codeline" data-linenumber="198"><td class="num" id="LN198">198</td><td class="line">{</td></tr>
+<tr class="codeline" data-linenumber="199"><td class="num" id="LN199">199</td><td class="line"> gchar stype[4], salt[4];</td></tr>
+<tr class="codeline" data-linenumber="200"><td class="num" id="LN200">200</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="201"><td class="num" id="LN201">201</td><td class="line"> strncpy (stype, tokp, 3);</td></tr>
+<tr class="codeline" data-linenumber="202"><td class="num" id="LN202">202</td><td class="line"> stype[3] = 0;</td></tr>
+<tr class="codeline" data-linenumber="203"><td class="num" id="LN203">203</td><td class="line"> <span class='keyword'>if</span> (strlen (tokp) == 6) {</td></tr>
+<tr class="codeline" data-linenumber="204"><td class="num" id="LN204">204</td><td class="line"> strncpy (salt, tokp + 3, 3);</td></tr>
+<tr class="codeline" data-linenumber="205"><td class="num" id="LN205">205</td><td class="line"> salt[3] = 0;</td></tr>
+<tr class="codeline" data-linenumber="206"><td class="num" id="LN206">206</td><td class="line"> }</td></tr>
+<tr class="codeline" data-linenumber="207"><td class="num" id="LN207">207</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="208"><td class="num" id="LN208">208</td><td class="line"> <span class='keyword'>if</span> (!strcmp (stype, <span class='string_literal'>"CLR"</span>)) {</td></tr>
+<tr class="codeline" data-linenumber="209"><td class="num" id="LN209">209</td><td class="line"> info-&gt;sky = SKY_CLEAR;</td></tr>
+<tr class="codeline" data-linenumber="210"><td class="num" id="LN210">210</td><td class="line"> } <span class='keyword'>else</span> <span class='keyword'>if</span> (!strcmp (stype, <span class='string_literal'>"SKC"</span>)) {</td></tr>
+<tr class="codeline" data-linenumber="211"><td class="num" id="LN211">211</td><td class="line"> info-&gt;sky = SKY_CLEAR;</td></tr>
+<tr class="codeline" data-linenumber="212"><td class="num" id="LN212">212</td><td class="line"> } <span class='keyword'>else</span> <span class='keyword'>if</span> (!strcmp (stype, <span class='string_literal'>"NSC"</span>)) {</td></tr>
+<tr class="codeline" data-linenumber="213"><td class="num" id="LN213">213</td><td class="line"> info-&gt;sky = SKY_CLEAR;</td></tr>
+<tr class="codeline" data-linenumber="214"><td class="num" id="LN214">214</td><td class="line"> } <span class='keyword'>else</span> <span class='keyword'>if</span> (!strcmp (stype, <span class='string_literal'>"BKN"</span>)) {</td></tr>
+<tr class="codeline" data-linenumber="215"><td class="num" id="LN215">215</td><td class="line"> info-&gt;sky = SKY_BROKEN;</td></tr>
+<tr class="codeline" data-linenumber="216"><td class="num" id="LN216">216</td><td class="line"> } <span class='keyword'>else</span> <span class='keyword'>if</span> (!strcmp (stype, <span class='string_literal'>"SCT"</span>)) {</td></tr>
+<tr class="codeline" data-linenumber="217"><td class="num" id="LN217">217</td><td class="line"> info-&gt;sky = SKY_SCATTERED;</td></tr>
+<tr class="codeline" data-linenumber="218"><td class="num" id="LN218">218</td><td class="line"> } <span class='keyword'>else</span> <span class='keyword'>if</span> (!strcmp (stype, <span class='string_literal'>"FEW"</span>)) {</td></tr>
+<tr class="codeline" data-linenumber="219"><td class="num" id="LN219">219</td><td class="line"> info-&gt;sky = SKY_FEW;</td></tr>
+<tr class="codeline" data-linenumber="220"><td class="num" id="LN220">220</td><td class="line"> } <span class='keyword'>else</span> <span class='keyword'>if</span> (!strcmp (stype, <span class='string_literal'>"OVC"</span>)) {</td></tr>
+<tr class="codeline" data-linenumber="221"><td class="num" id="LN221">221</td><td class="line"> info-&gt;sky = SKY_OVERCAST;</td></tr>
+<tr class="codeline" data-linenumber="222"><td class="num" id="LN222">222</td><td class="line"> }</td></tr>
+<tr class="codeline" data-linenumber="223"><td class="num" id="LN223">223</td><td class="line">}</td></tr>
+<tr class="codeline" data-linenumber="224"><td class="num" id="LN224">224</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="225"><td class="num" id="LN225">225</td><td class="line"><span class='keyword'>static</span> <span class='keyword'>void</span></td></tr>
+<tr class="codeline" data-linenumber="226"><td class="num" id="LN226">226</td><td class="line">metar_tok_pres (gchar *tokp, WeatherInfo *info)</td></tr>
+<tr class="codeline" data-linenumber="227"><td class="num" id="LN227">227</td><td class="line">{</td></tr>
+<tr class="codeline" data-linenumber="228"><td class="num" id="LN228">228</td><td class="line"> <span class='keyword'>if</span> (*tokp == 'A') {</td></tr>
+<tr class="codeline" data-linenumber="229"><td class="num" id="LN229">229</td><td class="line"> gchar sintg[3], sfract[3];</td></tr>
+<tr class="codeline" data-linenumber="230"><td class="num" id="LN230">230</td><td class="line"> gint intg, fract;</td></tr>
+<tr class="codeline" data-linenumber="231"><td class="num" id="LN231">231</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="232"><td class="num" id="LN232">232</td><td class="line"> strncpy (sintg, tokp + 1, 2);</td></tr>
+<tr class="codeline" data-linenumber="233"><td class="num" id="LN233">233</td><td class="line"> sintg[2] = 0;</td></tr>
+<tr class="codeline" data-linenumber="234"><td class="num" id="LN234">234</td><td class="line"> intg = atoi (sintg);</td></tr>
+<tr class="codeline" data-linenumber="235"><td class="num" id="LN235">235</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="236"><td class="num" id="LN236">236</td><td class="line"> strncpy (sfract, tokp + 3, 2);</td></tr>
+<tr class="codeline" data-linenumber="237"><td class="num" id="LN237">237</td><td class="line"> sfract[2] = 0;</td></tr>
+<tr class="codeline" data-linenumber="238"><td class="num" id="LN238">238</td><td class="line"> fract = atoi (sfract);</td></tr>
+<tr class="codeline" data-linenumber="239"><td class="num" id="LN239">239</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="240"><td class="num" id="LN240">240</td><td class="line"> info-&gt;pressure = (WeatherPressure)intg + (((WeatherPressure)fract)/100.0);</td></tr>
+<tr class="codeline" data-linenumber="241"><td class="num" id="LN241">241</td><td class="line"> } <span class='keyword'>else</span> { <span class='comment'>/* *tokp == 'Q' */</span></td></tr>
+<tr class="codeline" data-linenumber="242"><td class="num" id="LN242">242</td><td class="line"> gchar spres[5];</td></tr>
+<tr class="codeline" data-linenumber="243"><td class="num" id="LN243">243</td><td class="line"> gint pres;</td></tr>
+<tr class="codeline" data-linenumber="244"><td class="num" id="LN244">244</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="245"><td class="num" id="LN245">245</td><td class="line"> strncpy (spres, tokp + 1, 4);</td></tr>
+<tr class="codeline" data-linenumber="246"><td class="num" id="LN246">246</td><td class="line"> spres[4] = 0;</td></tr>
+<tr class="codeline" data-linenumber="247"><td class="num" id="LN247">247</td><td class="line"> pres = atoi (spres);</td></tr>
+<tr class="codeline" data-linenumber="248"><td class="num" id="LN248">248</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="249"><td class="num" id="LN249">249</td><td class="line"> info-&gt;pressure = <span class='macro'>PRESSURE_MBAR_TO_INCH ((WeatherPressure)pres)<span class='macro_popup'>(((WeatherPressure)pres) * 0.029533373)</span></span>;</td></tr>
+<tr class="codeline" data-linenumber="250"><td class="num" id="LN250">250</td><td class="line"> }</td></tr>
+<tr class="codeline" data-linenumber="251"><td class="num" id="LN251">251</td><td class="line">}</td></tr>
+<tr class="codeline" data-linenumber="252"><td class="num" id="LN252">252</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="253"><td class="num" id="LN253">253</td><td class="line"><span class='keyword'>static</span> <span class='keyword'>void</span></td></tr>
+<tr class="codeline" data-linenumber="254"><td class="num" id="LN254">254</td><td class="line">metar_tok_temp (gchar *tokp, WeatherInfo *info)</td></tr>
+<tr class="codeline" data-linenumber="255"><td class="num" id="LN255">255</td><td class="line">{</td></tr>
+<tr class="codeline" data-linenumber="256"><td class="num" id="LN256">256</td><td class="line"> gchar *ptemp, *pdew, *psep;</td></tr>
+<tr class="codeline" data-linenumber="257"><td class="num" id="LN257">257</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="258"><td class="num" id="LN258">258</td><td class="line"> psep = strchr (tokp, '/');</td></tr>
+<tr class="codeline" data-linenumber="259"><td class="num" id="LN259">259</td><td class="line"> *psep = 0;</td></tr>
+<tr class="codeline" data-linenumber="260"><td class="num" id="LN260">260</td><td class="line"> ptemp = tokp;</td></tr>
+<tr class="codeline" data-linenumber="261"><td class="num" id="LN261">261</td><td class="line"> pdew = psep + 1;</td></tr>
+<tr class="codeline" data-linenumber="262"><td class="num" id="LN262">262</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="263"><td class="num" id="LN263">263</td><td class="line"> info-&gt;temp = (*ptemp == 'M') ? <span class='macro'>TEMP_C_TO_F (-atoi (ptemp + 1))<span class='macro_popup'>(((-atoi (ptemp + 1)) * (9.0/5.0)) + 32.0)</span></span></td></tr>
+<tr class="codeline" data-linenumber="264"><td class="num" id="LN264">264</td><td class="line"> : <span class='macro'>TEMP_C_TO_F (atoi (ptemp))<span class='macro_popup'>(((atoi (ptemp)) * (9.0/5.0)) + 32.0)</span></span>;</td></tr>
+<tr class="codeline" data-linenumber="265"><td class="num" id="LN265">265</td><td class="line"> <span class='keyword'>if</span> (*pdew) {</td></tr>
+<tr class="codeline" data-linenumber="266"><td class="num" id="LN266">266</td><td class="line"> info-&gt;dew = (*pdew == 'M') ? <span class='macro'>TEMP_C_TO_F (-atoi (pdew + 1))<span class='macro_popup'>(((-atoi (pdew + 1)) * (9.0/5.0)) + 32.0)</span></span></td></tr>
+<tr class="codeline" data-linenumber="267"><td class="num" id="LN267">267</td><td class="line"> : <span class='macro'>TEMP_C_TO_F (atoi (pdew))<span class='macro_popup'>(((atoi (pdew)) * (9.0/5.0)) + 32.0)</span></span>;</td></tr>
+<tr class="codeline" data-linenumber="268"><td class="num" id="LN268">268</td><td class="line"> } <span class='keyword'>else</span> {</td></tr>
+<tr class="codeline" data-linenumber="269"><td class="num" id="LN269">269</td><td class="line"> info-&gt;dew = -1000.0;</td></tr>
+<tr class="codeline" data-linenumber="270"><td class="num" id="LN270">270</td><td class="line"> }</td></tr>
+<tr class="codeline" data-linenumber="271"><td class="num" id="LN271">271</td><td class="line">}</td></tr>
+<tr class="codeline" data-linenumber="272"><td class="num" id="LN272">272</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="273"><td class="num" id="LN273">273</td><td class="line"><span class='keyword'>static</span> <span class='keyword'>void</span></td></tr>
+<tr class="codeline" data-linenumber="274"><td class="num" id="LN274">274</td><td class="line">metar_tok_cond (gchar *tokp, WeatherInfo *info)</td></tr>
+<tr class="codeline" data-linenumber="275"><td class="num" id="LN275">275</td><td class="line">{</td></tr>
+<tr class="codeline" data-linenumber="276"><td class="num" id="LN276">276</td><td class="line"> gchar squal[3], sphen[4];</td></tr>
+<tr class="codeline" data-linenumber="277"><td class="num" id="LN277">277</td><td class="line"> gchar *pphen;</td></tr>
+<tr class="codeline" data-linenumber="278"><td class="num" id="LN278">278</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="279"><td class="num" id="LN279">279</td><td class="line"> <span class='keyword'>if</span> ((strlen (tokp) &gt; 3) &amp;&amp; ((*tokp == '+') || (*tokp == '-')))</td></tr>
+<tr class="codeline" data-linenumber="280"><td class="num" id="LN280">280</td><td class="line"> ++tokp; <span class='comment'>/* FIX */</span></td></tr>
+<tr class="codeline" data-linenumber="281"><td class="num" id="LN281">281</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="282"><td class="num" id="LN282">282</td><td class="line"> <span class='keyword'>if</span> ((*tokp == '+') || (*tokp == '-'))</td></tr>
+<tr class="codeline" data-linenumber="283"><td class="num" id="LN283">283</td><td class="line"> pphen = tokp + 1;</td></tr>
+<tr class="codeline" data-linenumber="284"><td class="num" id="LN284">284</td><td class="line"> <span class='keyword'>else</span> <span class='keyword'>if</span> (strlen (tokp) &lt; 4)</td></tr>
+<tr class="codeline" data-linenumber="285"><td class="num" id="LN285">285</td><td class="line"> pphen = tokp;</td></tr>
+<tr class="codeline" data-linenumber="286"><td class="num" id="LN286">286</td><td class="line"> <span class='keyword'>else</span></td></tr>
+<tr class="codeline" data-linenumber="287"><td class="num" id="LN287">287</td><td class="line"> pphen = tokp + 2;</td></tr>
+<tr class="codeline" data-linenumber="288"><td class="num" id="LN288">288</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="289"><td class="num" id="LN289">289</td><td class="line"> memset (squal, 0, <span class='keyword'>sizeof</span> (squal));</td></tr>
+<tr class="codeline" data-linenumber="290"><td class="num" id="LN290">290</td><td class="line"> strncpy (squal, tokp, pphen - tokp);</td></tr>
+<tr class="codeline" data-linenumber="291"><td class="num" id="LN291">291</td><td class="line"> squal[pphen - tokp] = 0;</td></tr>
+<tr class="codeline" data-linenumber="292"><td class="num" id="LN292">292</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="293"><td class="num" id="LN293">293</td><td class="line"> memset (sphen, 0, <span class='keyword'>sizeof</span> (sphen));</td></tr>
+<tr class="codeline" data-linenumber="294"><td class="num" id="LN294">294</td><td class="line"> strncpy (sphen, pphen, <span class='keyword'>sizeof</span> (sphen));</td></tr>
+<tr class="codeline" data-linenumber="295"><td class="num" id="LN295">295</td><td class="line"> sphen[<span class='keyword'>sizeof</span> (sphen)-1] = '\0';</td></tr>
+<tr class="codeline" data-linenumber="296"><td class="num" id="LN296">296</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="297"><td class="num" id="LN297">297</td><td class="line"> <span class='comment'>/* Defaults */</span></td></tr>
+<tr class="codeline" data-linenumber="298"><td class="num" id="LN298">298</td><td class="line"> info-&gt;cond.qualifier = QUALIFIER_NONE;</td></tr>
+<tr class="codeline" data-linenumber="299"><td class="num" id="LN299">299</td><td class="line"> info-&gt;cond.phenomenon = PHENOMENON_NONE;</td></tr>
+<tr class="codeline" data-linenumber="300"><td class="num" id="LN300">300</td><td class="line"> info-&gt;cond.significant = <span class='macro'>FALSE<span class='macro_popup'>(0)</span></span>;</td></tr>
+<tr class="codeline" data-linenumber="301"><td class="num" id="LN301">301</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="302"><td class="num" id="LN302">302</td><td class="line"> <span class='keyword'>if</span> (!strcmp (squal, <span class='string_literal'>""</span>)) {</td></tr>
+<tr class="codeline" data-linenumber="303"><td class="num" id="LN303">303</td><td class="line"> info-&gt;cond.qualifier = QUALIFIER_MODERATE;</td></tr>
+<tr class="codeline" data-linenumber="304"><td class="num" id="LN304">304</td><td class="line"> } <span class='keyword'>else</span> <span class='keyword'>if</span> (!strcmp (squal, <span class='string_literal'>"-"</span>)) {</td></tr>
+<tr class="codeline" data-linenumber="305"><td class="num" id="LN305">305</td><td class="line"> info-&gt;cond.qualifier = QUALIFIER_LIGHT;</td></tr>
+<tr class="codeline" data-linenumber="306"><td class="num" id="LN306">306</td><td class="line"> } <span class='keyword'>else</span> <span class='keyword'>if</span> (!strcmp (squal, <span class='string_literal'>"+"</span>)) {</td></tr>
+<tr class="codeline" data-linenumber="307"><td class="num" id="LN307">307</td><td class="line"> info-&gt;cond.qualifier = QUALIFIER_HEAVY;</td></tr>
+<tr class="codeline" data-linenumber="308"><td class="num" id="LN308">308</td><td class="line"> } <span class='keyword'>else</span> <span class='keyword'>if</span> (!strcmp (squal, <span class='string_literal'>"VC"</span>)) {</td></tr>
+<tr class="codeline" data-linenumber="309"><td class="num" id="LN309">309</td><td class="line"> info-&gt;cond.qualifier = QUALIFIER_VICINITY;</td></tr>
+<tr class="codeline" data-linenumber="310"><td class="num" id="LN310">310</td><td class="line"> } <span class='keyword'>else</span> <span class='keyword'>if</span> (!strcmp (squal, <span class='string_literal'>"MI"</span>)) {</td></tr>
+<tr class="codeline" data-linenumber="311"><td class="num" id="LN311">311</td><td class="line"> info-&gt;cond.qualifier = QUALIFIER_SHALLOW;</td></tr>
+<tr class="codeline" data-linenumber="312"><td class="num" id="LN312">312</td><td class="line"> } <span class='keyword'>else</span> <span class='keyword'>if</span> (!strcmp (squal, <span class='string_literal'>"BC"</span>)) {</td></tr>
+<tr class="codeline" data-linenumber="313"><td class="num" id="LN313">313</td><td class="line"> info-&gt;cond.qualifier = QUALIFIER_PATCHES;</td></tr>
+<tr class="codeline" data-linenumber="314"><td class="num" id="LN314">314</td><td class="line"> } <span class='keyword'>else</span> <span class='keyword'>if</span> (!strcmp (squal, <span class='string_literal'>"PR"</span>)) {</td></tr>
+<tr class="codeline" data-linenumber="315"><td class="num" id="LN315">315</td><td class="line"> info-&gt;cond.qualifier = QUALIFIER_PARTIAL;</td></tr>
+<tr class="codeline" data-linenumber="316"><td class="num" id="LN316">316</td><td class="line"> } <span class='keyword'>else</span> <span class='keyword'>if</span> (!strcmp (squal, <span class='string_literal'>"TS"</span>)) {</td></tr>
+<tr class="codeline" data-linenumber="317"><td class="num" id="LN317">317</td><td class="line"> info-&gt;cond.qualifier = QUALIFIER_THUNDERSTORM;</td></tr>
+<tr class="codeline" data-linenumber="318"><td class="num" id="LN318">318</td><td class="line"> } <span class='keyword'>else</span> <span class='keyword'>if</span> (!strcmp (squal, <span class='string_literal'>"BL"</span>)) {</td></tr>
+<tr class="codeline" data-linenumber="319"><td class="num" id="LN319">319</td><td class="line"> info-&gt;cond.qualifier = QUALIFIER_BLOWING;</td></tr>
+<tr class="codeline" data-linenumber="320"><td class="num" id="LN320">320</td><td class="line"> } <span class='keyword'>else</span> <span class='keyword'>if</span> (!strcmp (squal, <span class='string_literal'>"SH"</span>)) {</td></tr>
+<tr class="codeline" data-linenumber="321"><td class="num" id="LN321">321</td><td class="line"> info-&gt;cond.qualifier = QUALIFIER_SHOWERS;</td></tr>
+<tr class="codeline" data-linenumber="322"><td class="num" id="LN322">322</td><td class="line"> } <span class='keyword'>else</span> <span class='keyword'>if</span> (!strcmp (squal, <span class='string_literal'>"DR"</span>)) {</td></tr>
+<tr class="codeline" data-linenumber="323"><td class="num" id="LN323">323</td><td class="line"> info-&gt;cond.qualifier = QUALIFIER_DRIFTING;</td></tr>
+<tr class="codeline" data-linenumber="324"><td class="num" id="LN324">324</td><td class="line"> } <span class='keyword'>else</span> <span class='keyword'>if</span> (!strcmp (squal, <span class='string_literal'>"FZ"</span>)) {</td></tr>
+<tr class="codeline" data-linenumber="325"><td class="num" id="LN325">325</td><td class="line"> info-&gt;cond.qualifier = QUALIFIER_FREEZING;</td></tr>
+<tr class="codeline" data-linenumber="326"><td class="num" id="LN326">326</td><td class="line"> } <span class='keyword'>else</span> {</td></tr>
+<tr class="codeline" data-linenumber="327"><td class="num" id="LN327">327</td><td class="line"> <span class='keyword'>return</span>;</td></tr>
+<tr class="codeline" data-linenumber="328"><td class="num" id="LN328">328</td><td class="line"> }</td></tr>
+<tr class="codeline" data-linenumber="329"><td class="num" id="LN329">329</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="330"><td class="num" id="LN330">330</td><td class="line"> <span class='keyword'>if</span> (!strcmp (sphen, <span class='string_literal'>"DZ"</span>)) {</td></tr>
+<tr class="codeline" data-linenumber="331"><td class="num" id="LN331">331</td><td class="line"> info-&gt;cond.phenomenon = PHENOMENON_DRIZZLE;</td></tr>
+<tr class="codeline" data-linenumber="332"><td class="num" id="LN332">332</td><td class="line"> } <span class='keyword'>else</span> <span class='keyword'>if</span> (!strcmp (sphen, <span class='string_literal'>"RA"</span>)) {</td></tr>
+<tr class="codeline" data-linenumber="333"><td class="num" id="LN333">333</td><td class="line"> info-&gt;cond.phenomenon = PHENOMENON_RAIN;</td></tr>
+<tr class="codeline" data-linenumber="334"><td class="num" id="LN334">334</td><td class="line"> } <span class='keyword'>else</span> <span class='keyword'>if</span> (!strcmp (sphen, <span class='string_literal'>"SN"</span>)) {</td></tr>
+<tr class="codeline" data-linenumber="335"><td class="num" id="LN335">335</td><td class="line"> info-&gt;cond.phenomenon = PHENOMENON_SNOW;</td></tr>
+<tr class="codeline" data-linenumber="336"><td class="num" id="LN336">336</td><td class="line"> } <span class='keyword'>else</span> <span class='keyword'>if</span> (!strcmp (sphen, <span class='string_literal'>"SG"</span>)) {</td></tr>
+<tr class="codeline" data-linenumber="337"><td class="num" id="LN337">337</td><td class="line"> info-&gt;cond.phenomenon = PHENOMENON_SNOW_GRAINS;</td></tr>
+<tr class="codeline" data-linenumber="338"><td class="num" id="LN338">338</td><td class="line"> } <span class='keyword'>else</span> <span class='keyword'>if</span> (!strcmp (sphen, <span class='string_literal'>"IC"</span>)) {</td></tr>
+<tr class="codeline" data-linenumber="339"><td class="num" id="LN339">339</td><td class="line"> info-&gt;cond.phenomenon = PHENOMENON_ICE_CRYSTALS;</td></tr>
+<tr class="codeline" data-linenumber="340"><td class="num" id="LN340">340</td><td class="line"> } <span class='keyword'>else</span> <span class='keyword'>if</span> (!strcmp (sphen, <span class='string_literal'>"PE"</span>)) {</td></tr>
+<tr class="codeline" data-linenumber="341"><td class="num" id="LN341">341</td><td class="line"> info-&gt;cond.phenomenon = PHENOMENON_ICE_PELLETS;</td></tr>
+<tr class="codeline" data-linenumber="342"><td class="num" id="LN342">342</td><td class="line"> } <span class='keyword'>else</span> <span class='keyword'>if</span> (!strcmp (sphen, <span class='string_literal'>"GR"</span>)) {</td></tr>
+<tr class="codeline" data-linenumber="343"><td class="num" id="LN343">343</td><td class="line"> info-&gt;cond.phenomenon = PHENOMENON_HAIL;</td></tr>
+<tr class="codeline" data-linenumber="344"><td class="num" id="LN344">344</td><td class="line"> } <span class='keyword'>else</span> <span class='keyword'>if</span> (!strcmp (sphen, <span class='string_literal'>"GS"</span>)) {</td></tr>
+<tr class="codeline" data-linenumber="345"><td class="num" id="LN345">345</td><td class="line"> info-&gt;cond.phenomenon = PHENOMENON_SMALL_HAIL;</td></tr>
+<tr class="codeline" data-linenumber="346"><td class="num" id="LN346">346</td><td class="line"> } <span class='keyword'>else</span> <span class='keyword'>if</span> (!strcmp (sphen, <span class='string_literal'>"UP"</span>)) {</td></tr>
+<tr class="codeline" data-linenumber="347"><td class="num" id="LN347">347</td><td class="line"> info-&gt;cond.phenomenon = PHENOMENON_UNKNOWN_PRECIPITATION;</td></tr>
+<tr class="codeline" data-linenumber="348"><td class="num" id="LN348">348</td><td class="line"> } <span class='keyword'>else</span> <span class='keyword'>if</span> (!strcmp (sphen, <span class='string_literal'>"BR"</span>)) {</td></tr>
+<tr class="codeline" data-linenumber="349"><td class="num" id="LN349">349</td><td class="line"> info-&gt;cond.phenomenon = PHENOMENON_MIST;</td></tr>
+<tr class="codeline" data-linenumber="350"><td class="num" id="LN350">350</td><td class="line"> } <span class='keyword'>else</span> <span class='keyword'>if</span> (!strcmp (sphen, <span class='string_literal'>"FG"</span>)) {</td></tr>
+<tr class="codeline" data-linenumber="351"><td class="num" id="LN351">351</td><td class="line"> info-&gt;cond.phenomenon = PHENOMENON_FOG;</td></tr>
+<tr class="codeline" data-linenumber="352"><td class="num" id="LN352">352</td><td class="line"> } <span class='keyword'>else</span> <span class='keyword'>if</span> (!strcmp (sphen, <span class='string_literal'>"FU"</span>)) {</td></tr>
+<tr class="codeline" data-linenumber="353"><td class="num" id="LN353">353</td><td class="line"> info-&gt;cond.phenomenon = PHENOMENON_SMOKE;</td></tr>
+<tr class="codeline" data-linenumber="354"><td class="num" id="LN354">354</td><td class="line"> } <span class='keyword'>else</span> <span class='keyword'>if</span> (!strcmp (sphen, <span class='string_literal'>"VA"</span>)) {</td></tr>
+<tr class="codeline" data-linenumber="355"><td class="num" id="LN355">355</td><td class="line"> info-&gt;cond.phenomenon = PHENOMENON_VOLCANIC_ASH;</td></tr>
+<tr class="codeline" data-linenumber="356"><td class="num" id="LN356">356</td><td class="line"> } <span class='keyword'>else</span> <span class='keyword'>if</span> (!strcmp (sphen, <span class='string_literal'>"SA"</span>)) {</td></tr>
+<tr class="codeline" data-linenumber="357"><td class="num" id="LN357">357</td><td class="line"> info-&gt;cond.phenomenon = PHENOMENON_SAND;</td></tr>
+<tr class="codeline" data-linenumber="358"><td class="num" id="LN358">358</td><td class="line"> } <span class='keyword'>else</span> <span class='keyword'>if</span> (!strcmp (sphen, <span class='string_literal'>"HZ"</span>)) {</td></tr>
+<tr class="codeline" data-linenumber="359"><td class="num" id="LN359">359</td><td class="line"> info-&gt;cond.phenomenon = PHENOMENON_HAZE;</td></tr>
+<tr class="codeline" data-linenumber="360"><td class="num" id="LN360">360</td><td class="line"> } <span class='keyword'>else</span> <span class='keyword'>if</span> (!strcmp (sphen, <span class='string_literal'>"PY"</span>)) {</td></tr>
+<tr class="codeline" data-linenumber="361"><td class="num" id="LN361">361</td><td class="line"> info-&gt;cond.phenomenon = PHENOMENON_SPRAY;</td></tr>
+<tr class="codeline" data-linenumber="362"><td class="num" id="LN362">362</td><td class="line"> } <span class='keyword'>else</span> <span class='keyword'>if</span> (!strcmp (sphen, <span class='string_literal'>"DU"</span>)) {</td></tr>
+<tr class="codeline" data-linenumber="363"><td class="num" id="LN363">363</td><td class="line"> info-&gt;cond.phenomenon = PHENOMENON_DUST;</td></tr>
+<tr class="codeline" data-linenumber="364"><td class="num" id="LN364">364</td><td class="line"> } <span class='keyword'>else</span> <span class='keyword'>if</span> (!strcmp (sphen, <span class='string_literal'>"SQ"</span>)) {</td></tr>
+<tr class="codeline" data-linenumber="365"><td class="num" id="LN365">365</td><td class="line"> info-&gt;cond.phenomenon = PHENOMENON_SQUALL;</td></tr>
+<tr class="codeline" data-linenumber="366"><td class="num" id="LN366">366</td><td class="line"> } <span class='keyword'>else</span> <span class='keyword'>if</span> (!strcmp (sphen, <span class='string_literal'>"SS"</span>)) {</td></tr>
+<tr class="codeline" data-linenumber="367"><td class="num" id="LN367">367</td><td class="line"> info-&gt;cond.phenomenon = PHENOMENON_SANDSTORM;</td></tr>
+<tr class="codeline" data-linenumber="368"><td class="num" id="LN368">368</td><td class="line"> } <span class='keyword'>else</span> <span class='keyword'>if</span> (!strcmp (sphen, <span class='string_literal'>"DS"</span>)) {</td></tr>
+<tr class="codeline" data-linenumber="369"><td class="num" id="LN369">369</td><td class="line"> info-&gt;cond.phenomenon = PHENOMENON_DUSTSTORM;</td></tr>
+<tr class="codeline" data-linenumber="370"><td class="num" id="LN370">370</td><td class="line"> } <span class='keyword'>else</span> <span class='keyword'>if</span> (!strcmp (sphen, <span class='string_literal'>"PO"</span>)) {</td></tr>
+<tr class="codeline" data-linenumber="371"><td class="num" id="LN371">371</td><td class="line"> info-&gt;cond.phenomenon = PHENOMENON_DUST_WHIRLS;</td></tr>
+<tr class="codeline" data-linenumber="372"><td class="num" id="LN372">372</td><td class="line"> } <span class='keyword'>else</span> <span class='keyword'>if</span> (!strcmp (sphen, <span class='string_literal'>"+FC"</span>)) {</td></tr>
+<tr class="codeline" data-linenumber="373"><td class="num" id="LN373">373</td><td class="line"> info-&gt;cond.phenomenon = PHENOMENON_TORNADO;</td></tr>
+<tr class="codeline" data-linenumber="374"><td class="num" id="LN374">374</td><td class="line"> } <span class='keyword'>else</span> <span class='keyword'>if</span> (!strcmp (sphen, <span class='string_literal'>"FC"</span>)) {</td></tr>
+<tr class="codeline" data-linenumber="375"><td class="num" id="LN375">375</td><td class="line"> info-&gt;cond.phenomenon = PHENOMENON_FUNNEL_CLOUD;</td></tr>
+<tr class="codeline" data-linenumber="376"><td class="num" id="LN376">376</td><td class="line"> } <span class='keyword'>else</span> {</td></tr>
+<tr class="codeline" data-linenumber="377"><td class="num" id="LN377">377</td><td class="line"> <span class='keyword'>return</span>;</td></tr>
+<tr class="codeline" data-linenumber="378"><td class="num" id="LN378">378</td><td class="line"> }</td></tr>
+<tr class="codeline" data-linenumber="379"><td class="num" id="LN379">379</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="380"><td class="num" id="LN380">380</td><td class="line"> <span class='keyword'>if</span> ((info-&gt;cond.qualifier != QUALIFIER_NONE) || (info-&gt;cond.phenomenon != PHENOMENON_NONE))</td></tr>
+<tr class="codeline" data-linenumber="381"><td class="num" id="LN381">381</td><td class="line"> info-&gt;cond.significant = <span class='macro'>TRUE<span class='macro_popup'>(!(0))</span></span>;</td></tr>
+<tr class="codeline" data-linenumber="382"><td class="num" id="LN382">382</td><td class="line">}</td></tr>
+<tr class="codeline" data-linenumber="383"><td class="num" id="LN383">383</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="384"><td class="num" id="LN384">384</td><td class="line"><span class='directive'>#define <span class='macro'>TIME_RE_STR<span class='macro_popup'>"([0-9]{6})Z"</span></span> "([0-9]{6})Z"</span></td></tr>
+<tr class="codeline" data-linenumber="385"><td class="num" id="LN385">385</td><td class="line"><span class='directive'>#define <span class='macro'>WIND_RE_STR<span class='macro_popup'>"(([0-9]{3})|VRB)([0-9]?[0-9]{2})(G[0-9]?[0-9]{2})?(KT|MPS)"</span></span> "(([0-9]{3})|VRB)([0-9]?[0-9]{2})(G[0-9]?[0-9]{2})?(KT|MPS)"</span></td></tr>
+<tr class="codeline" data-linenumber="386"><td class="num" id="LN386">386</td><td class="line"><span class='directive'>#define <span class='macro'>VIS_RE_STR<span class='macro_popup'>"((([0-9]?[0-9])|(M?([12] )?([1357]/1?[0-9])))SM)|" "([0-9]{4}(N|NE|E|SE|S|SW|W|NW( [0-9]{4}(N|NE|E|SE|S|SW|W|NW))?)?)|"<br> "CAVOK"</span></span> "((([0-9]?[0-9])|(M?([12] )?([1357]/1?[0-9])))SM)|" \</span></td></tr>
+<tr class="codeline" data-linenumber="387"><td class="num" id="LN387">387</td><td class="line"> <span class='directive'>"([0-9]{4}(N|NE|E|SE|S|SW|W|NW( [0-9]{4}(N|NE|E|SE|S|SW|W|NW))?)?)|" \</span></td></tr>
+<tr class="codeline" data-linenumber="388"><td class="num" id="LN388">388</td><td class="line"> <span class='directive'>"CAVOK"</span></td></tr>
+<tr class="codeline" data-linenumber="389"><td class="num" id="LN389">389</td><td class="line"><span class='directive'>#define <span class='macro'>COND_RE_STR<span class='macro_popup'>"(-|\\+)?(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)"</span></span> "(-|\\+)?(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)"</span></td></tr>
+<tr class="codeline" data-linenumber="390"><td class="num" id="LN390">390</td><td class="line"><span class='directive'>#define <span class='macro'>CLOUD_RE_STR<span class='macro_popup'>"((CLR|BKN|SCT|FEW|OVC|SKC|NSC)([0-9]{3}|///)?(CB|TCU|///)?)"</span></span> "((CLR|BKN|SCT|FEW|OVC|SKC|NSC)([0-9]{3}|///)?(CB|TCU|///)?)"</span></td></tr>
+<tr class="codeline" data-linenumber="391"><td class="num" id="LN391">391</td><td class="line"><span class='directive'>#define <span class='macro'>TEMP_RE_STR<span class='macro_popup'>"(M?[0-9][0-9])/(M?(//|[0-9][0-9])?)"</span></span> "(M?[0-9][0-9])/(M?(//|[0-9][0-9])?)"</span></td></tr>
+<tr class="codeline" data-linenumber="392"><td class="num" id="LN392">392</td><td class="line"><span class='directive'>#define <span class='macro'>PRES_RE_STR<span class='macro_popup'>"(A|Q)([0-9]{4})"</span></span> "(A|Q)([0-9]{4})"</span></td></tr>
+<tr class="codeline" data-linenumber="393"><td class="num" id="LN393">393</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="394"><td class="num" id="LN394">394</td><td class="line"><span class='comment'>/* POSIX regular expressions do not allow us to express "match whole words</span></td></tr>
+<tr class="codeline" data-linenumber="395"><td class="num" id="LN395">395</td><td class="line"> <span class='comment'>* only" in a simple way, so we have to wrap them all into</span></td></tr>
+<tr class="codeline" data-linenumber="396"><td class="num" id="LN396">396</td><td class="line"> <span class='comment'>* (^| )(...regex...)( |$)</span></td></tr>
+<tr class="codeline" data-linenumber="397"><td class="num" id="LN397">397</td><td class="line"> <span class='comment'>*/</span></td></tr>
+<tr class="codeline" data-linenumber="398"><td class="num" id="LN398">398</td><td class="line"><span class='directive'>#define <span class='macro'>RE_PREFIX<span class='macro_popup'>"(^| )("</span></span> "(^| )("</span></td></tr>
+<tr class="codeline" data-linenumber="399"><td class="num" id="LN399">399</td><td class="line"><span class='directive'>#define <span class='macro'>RE_SUFFIX<span class='macro_popup'>")( |$)"</span></span> ")( |$)"</span></td></tr>
+<tr class="codeline" data-linenumber="400"><td class="num" id="LN400">400</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="401"><td class="num" id="LN401">401</td><td class="line"><span class='keyword'>static</span> regex_t metar_re[RE_NUM];</td></tr>
+<tr class="codeline" data-linenumber="402"><td class="num" id="LN402">402</td><td class="line"><span class='keyword'>static</span> <span class='keyword'>void</span> (*metar_f[RE_NUM]) (gchar *tokp, WeatherInfo *info);</td></tr>
+<tr class="codeline" data-linenumber="403"><td class="num" id="LN403">403</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="404"><td class="num" id="LN404">404</td><td class="line"><span class='keyword'>static</span> <span class='keyword'>void</span></td></tr>
+<tr class="codeline" data-linenumber="405"><td class="num" id="LN405">405</td><td class="line">metar_init_re (<span class='keyword'>void</span>)</td></tr>
+<tr class="codeline" data-linenumber="406"><td class="num" id="LN406">406</td><td class="line">{</td></tr>
+<tr class="codeline" data-linenumber="407"><td class="num" id="LN407">407</td><td class="line"> <span class='keyword'>static</span> gboolean initialized = <span class='macro'>FALSE<span class='macro_popup'>(0)</span></span>;</td></tr>
+<tr class="codeline" data-linenumber="408"><td class="num" id="LN408">408</td><td class="line"> <span class='keyword'>if</span> (initialized)</td></tr>
+<tr class="codeline" data-linenumber="409"><td class="num" id="LN409">409</td><td class="line"> <span class='keyword'>return</span>;</td></tr>
+<tr class="codeline" data-linenumber="410"><td class="num" id="LN410">410</td><td class="line"> initialized = <span class='macro'>TRUE<span class='macro_popup'>(!(0))</span></span>;</td></tr>
+<tr class="codeline" data-linenumber="411"><td class="num" id="LN411">411</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="412"><td class="num" id="LN412">412</td><td class="line"> regcomp (&amp;metar_re[TIME_RE], <span class='macro'>RE_PREFIX<span class='macro_popup'>"(^| )("</span></span> <span class='macro'>TIME_RE_STR<span class='macro_popup'>"([0-9]{6})Z"</span></span> <span class='macro'>RE_SUFFIX<span class='macro_popup'>")( |$)"</span></span>, <span class='macro'>REG_EXTENDED<span class='macro_popup'>1</span></span>);</td></tr>
+<tr class="codeline" data-linenumber="413"><td class="num" id="LN413">413</td><td class="line"> regcomp (&amp;metar_re[WIND_RE], <span class='macro'>RE_PREFIX<span class='macro_popup'>"(^| )("</span></span> <span class='macro'>WIND_RE_STR<span class='macro_popup'>"(([0-9]{3})|VRB)([0-9]?[0-9]{2})(G[0-9]?[0-9]{2})?(KT|MPS)"</span></span> <span class='macro'>RE_SUFFIX<span class='macro_popup'>")( |$)"</span></span>, <span class='macro'>REG_EXTENDED<span class='macro_popup'>1</span></span>);</td></tr>
+<tr class="codeline" data-linenumber="414"><td class="num" id="LN414">414</td><td class="line"> regcomp (&amp;metar_re[VIS_RE], <span class='macro'>RE_PREFIX<span class='macro_popup'>"(^| )("</span></span> <span class='macro'>VIS_RE_STR<span class='macro_popup'>"((([0-9]?[0-9])|(M?([12] )?([1357]/1?[0-9])))SM)|" "([0-9]{4}(N|NE|E|SE|S|SW|W|NW( [0-9]{4}(N|NE|E|SE|S|SW|W|NW))?)?)|"<br> "CAVOK"</span></span> <span class='macro'>RE_SUFFIX<span class='macro_popup'>")( |$)"</span></span>, <span class='macro'>REG_EXTENDED<span class='macro_popup'>1</span></span>);</td></tr>
+<tr class="codeline" data-linenumber="415"><td class="num" id="LN415">415</td><td class="line"> regcomp (&amp;metar_re[COND_RE], <span class='macro'>RE_PREFIX<span class='macro_popup'>"(^| )("</span></span> <span class='macro'>COND_RE_STR<span class='macro_popup'>"(-|\\+)?(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)"</span></span> <span class='macro'>RE_SUFFIX<span class='macro_popup'>")( |$)"</span></span>, <span class='macro'>REG_EXTENDED<span class='macro_popup'>1</span></span>);</td></tr>
+<tr class="codeline" data-linenumber="416"><td class="num" id="LN416">416</td><td class="line"> regcomp (&amp;metar_re[CLOUD_RE], <span class='macro'>RE_PREFIX<span class='macro_popup'>"(^| )("</span></span> <span class='macro'>CLOUD_RE_STR<span class='macro_popup'>"((CLR|BKN|SCT|FEW|OVC|SKC|NSC)([0-9]{3}|///)?(CB|TCU|///)?)"</span></span> <span class='macro'>RE_SUFFIX<span class='macro_popup'>")( |$)"</span></span>, <span class='macro'>REG_EXTENDED<span class='macro_popup'>1</span></span>);</td></tr>
+<tr class="codeline" data-linenumber="417"><td class="num" id="LN417">417</td><td class="line"> regcomp (&amp;metar_re[TEMP_RE], <span class='macro'>RE_PREFIX<span class='macro_popup'>"(^| )("</span></span> <span class='macro'>TEMP_RE_STR<span class='macro_popup'>"(M?[0-9][0-9])/(M?(//|[0-9][0-9])?)"</span></span> <span class='macro'>RE_SUFFIX<span class='macro_popup'>")( |$)"</span></span>, <span class='macro'>REG_EXTENDED<span class='macro_popup'>1</span></span>);</td></tr>
+<tr class="codeline" data-linenumber="418"><td class="num" id="LN418">418</td><td class="line"> regcomp (&amp;metar_re[PRES_RE], <span class='macro'>RE_PREFIX<span class='macro_popup'>"(^| )("</span></span> <span class='macro'>PRES_RE_STR<span class='macro_popup'>"(A|Q)([0-9]{4})"</span></span> <span class='macro'>RE_SUFFIX<span class='macro_popup'>")( |$)"</span></span>, <span class='macro'>REG_EXTENDED<span class='macro_popup'>1</span></span>);</td></tr>
+<tr class="codeline" data-linenumber="419"><td class="num" id="LN419">419</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="420"><td class="num" id="LN420">420</td><td class="line"> metar_f[TIME_RE] = metar_tok_time;</td></tr>
+<tr class="codeline" data-linenumber="421"><td class="num" id="LN421">421</td><td class="line"> metar_f[WIND_RE] = metar_tok_wind;</td></tr>
+<tr class="codeline" data-linenumber="422"><td class="num" id="LN422">422</td><td class="line"> metar_f[VIS_RE] = metar_tok_vis;</td></tr>
+<tr class="codeline" data-linenumber="423"><td class="num" id="LN423">423</td><td class="line"> metar_f[COND_RE] = metar_tok_cond;</td></tr>
+<tr class="codeline" data-linenumber="424"><td class="num" id="LN424">424</td><td class="line"> metar_f[CLOUD_RE] = metar_tok_cloud;</td></tr>
+<tr class="codeline" data-linenumber="425"><td class="num" id="LN425">425</td><td class="line"> metar_f[TEMP_RE] = metar_tok_temp;</td></tr>
+<tr class="codeline" data-linenumber="426"><td class="num" id="LN426">426</td><td class="line"> metar_f[PRES_RE] = metar_tok_pres;</td></tr>
+<tr class="codeline" data-linenumber="427"><td class="num" id="LN427">427</td><td class="line">}</td></tr>
+<tr class="codeline" data-linenumber="428"><td class="num" id="LN428">428</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="429"><td class="num" id="LN429">429</td><td class="line">gboolean</td></tr>
+<tr class="codeline" data-linenumber="430"><td class="num" id="LN430">430</td><td class="line">metar_parse (gchar *metar, WeatherInfo *info)</td></tr>
+<tr class="codeline" data-linenumber="431"><td class="num" id="LN431">431</td><td class="line">{</td></tr>
+<tr class="codeline" data-linenumber="432"><td class="num" id="LN432">432</td><td class="line"> gchar *p;</td></tr>
+<tr class="codeline" data-linenumber="433"><td class="num" id="LN433">433</td><td class="line"> <span class='comment'>//gchar *rmk;</span></td></tr>
+<tr class="codeline" data-linenumber="434"><td class="num" id="LN434">434</td><td class="line"> gint i, i2;</td></tr>
+<tr class="codeline" data-linenumber="435"><td class="num" id="LN435">435</td><td class="line"> regmatch_t rm, rm2;</td></tr>
+<tr class="codeline" data-linenumber="436"><td class="num" id="LN436">436</td><td class="line"> gchar *tokp;</td></tr>
+<tr class="codeline" data-linenumber="437"><td class="num" id="LN437">437</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="438"><td class="num" id="LN438">438</td><td class="line"> <span class='macro'>g_return_val_if_fail (info != NULL, FALSE)<span class='macro_popup'>do { if ((__builtin_expect (__extension__ ({ int _g_boolean_var_<br>; if (info != ((void*)0)) _g_boolean_var_ = 1; else _g_boolean_var_<br> = 0; _g_boolean_var_; }), 1))) { } else { g_return_if_fail_warning<br> ("MateWeather", ((const char*) (__func__)), "info != NULL");<br> return ((0)); } } while (0)</span></span>;</td></tr>
+<tr class="codeline" data-linenumber="439"><td class="num" id="LN439">439</td><td class="line"> <span class='macro'>g_return_val_if_fail (metar != NULL, FALSE)<span class='macro_popup'>do { if ((__builtin_expect (__extension__ ({ int _g_boolean_var_<br>; if (metar != ((void*)0)) _g_boolean_var_ = 1; else _g_boolean_var_<br> = 0; _g_boolean_var_; }), 1))) { } else { g_return_if_fail_warning<br> ("MateWeather", ((const char*) (__func__)), "metar != NULL")<br>; return ((0)); } } while (0)</span></span>;</td></tr>
+<tr class="codeline" data-linenumber="440"><td class="num" id="LN440">440</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="441"><td class="num" id="LN441">441</td><td class="line"> metar_init_re ();</td></tr>
+<tr class="codeline" data-linenumber="442"><td class="num" id="LN442">442</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="443"><td class="num" id="LN443">443</td><td class="line"> <span class='comment'>/*</span></td></tr>
+<tr class="codeline" data-linenumber="444"><td class="num" id="LN444">444</td><td class="line"> <span class='comment'>* Force parsing to end at "RMK" field. This prevents a subtle</span></td></tr>
+<tr class="codeline" data-linenumber="445"><td class="num" id="LN445">445</td><td class="line"> <span class='comment'>* problem when info within the remark happens to match an earlier state</span></td></tr>
+<tr class="codeline" data-linenumber="446"><td class="num" id="LN446">446</td><td class="line"> <span class='comment'>* and, as a result, throws off all the remaining expression</span></td></tr>
+<tr class="codeline" data-linenumber="447"><td class="num" id="LN447">447</td><td class="line"> <span class='comment'>*/</span></td></tr>
+<tr class="codeline" data-linenumber="448"><td class="num" id="LN448">448</td><td class="line"> <span class='keyword'>if</span> (0 != (p = strstr (metar, <span class='string_literal'>" RMK "</span>))) {</td></tr>
+<tr class="codeline" data-linenumber="449"><td class="num" id="LN449">449</td><td class="line"> *p = '\0';</td></tr>
+<tr class="codeline" data-linenumber="450"><td class="num" id="LN450">450</td><td class="line"> <span class='comment'>//rmk = p + 5; // uncomment this if RMK data becomes useful</span></td></tr>
+<tr class="codeline" data-linenumber="451"><td class="num" id="LN451">451</td><td class="line"> }</td></tr>
+<tr class="codeline" data-linenumber="452"><td class="num" id="LN452">452</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="453"><td class="num" id="LN453">453</td><td class="line"> p = metar;</td></tr>
+<tr class="codeline" data-linenumber="454"><td class="num" id="LN454">454</td><td class="line"> i = TIME_RE;</td></tr>
+<tr class="codeline" data-linenumber="455"><td class="num" id="LN455">455</td><td class="line"> <span class='keyword'>while</span> (*p) {</td></tr>
+<tr class="codeline" data-linenumber="456"><td class="num" id="LN456">456</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="457"><td class="num" id="LN457">457</td><td class="line"> i2 = RE_NUM;</td></tr>
+<tr class="codeline" data-linenumber="458"><td class="num" id="LN458">458</td><td class="line"> rm2.rm_so = strlen (p);</td></tr>
+<tr class="codeline" data-linenumber="459"><td class="num" id="LN459">459</td><td class="line"> rm2.rm_eo = rm2.rm_so;</td></tr>
+<tr class="codeline" data-linenumber="460"><td class="num" id="LN460">460</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="461"><td class="num" id="LN461">461</td><td class="line"> <span class='keyword'>for</span> (i = 0; i &lt; RE_NUM &amp;&amp; rm2.rm_so &gt; 0; i++) {</td></tr>
+<tr class="codeline" data-linenumber="462"><td class="num" id="LN462">462</td><td class="line"> <span class='keyword'>if</span> (0 == regexec (&amp;metar_re[i], p, 1, &amp;rm, 0)</td></tr>
+<tr class="codeline" data-linenumber="463"><td class="num" id="LN463">463</td><td class="line"> &amp;&amp; rm.rm_so &lt; rm2.rm_so)</td></tr>
+<tr class="codeline" data-linenumber="464"><td class="num" id="LN464">464</td><td class="line"> {</td></tr>
+<tr class="codeline" data-linenumber="465"><td class="num" id="LN465">465</td><td class="line"> i2 = i;</td></tr>
+<tr class="codeline" data-linenumber="466"><td class="num" id="LN466">466</td><td class="line"> <span class='comment'>/* Skip leading and trailing space characters, if present.</span></td></tr>
+<tr class="codeline" data-linenumber="467"><td class="num" id="LN467">467</td><td class="line"> <span class='comment'>(the regular expressions include those characters to</span></td></tr>
+<tr class="codeline" data-linenumber="468"><td class="num" id="LN468">468</td><td class="line"> <span class='comment'>only get matches limited to whole words). */</span></td></tr>
+<tr class="codeline" data-linenumber="469"><td class="num" id="LN469">469</td><td class="line"> <span class='keyword'>if</span> (p[rm.rm_so] == ' ') rm.rm_so++;</td></tr>
+<tr class="codeline" data-linenumber="470"><td class="num" id="LN470">470</td><td class="line"> <span class='keyword'>if</span> (p[rm.rm_eo - 1] == ' ') rm.rm_eo--;</td></tr>
+<tr class="codeline" data-linenumber="471"><td class="num" id="LN471">471</td><td class="line"> rm2.rm_so = rm.rm_so;</td></tr>
+<tr class="codeline" data-linenumber="472"><td class="num" id="LN472">472</td><td class="line"> rm2.rm_eo = rm.rm_eo;</td></tr>
+<tr class="codeline" data-linenumber="473"><td class="num" id="LN473">473</td><td class="line"> }</td></tr>
+<tr class="codeline" data-linenumber="474"><td class="num" id="LN474">474</td><td class="line"> }</td></tr>
+<tr class="codeline" data-linenumber="475"><td class="num" id="LN475">475</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="476"><td class="num" id="LN476">476</td><td class="line"> <span class='keyword'>if</span> (i2 != RE_NUM) {</td></tr>
+<tr class="codeline" data-linenumber="477"><td class="num" id="LN477">477</td><td class="line"> tokp = g_strndup (p + rm2.rm_so, rm2.rm_eo - rm2.rm_so);</td></tr>
+<tr class="codeline" data-linenumber="478"><td class="num" id="LN478">478</td><td class="line"> metar_f[i2] (tokp, info);</td></tr>
+<tr class="codeline" data-linenumber="479"><td class="num" id="LN479">479</td><td class="line"> g_free (tokp);</td></tr>
+<tr class="codeline" data-linenumber="480"><td class="num" id="LN480">480</td><td class="line"> }</td></tr>
+<tr class="codeline" data-linenumber="481"><td class="num" id="LN481">481</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="482"><td class="num" id="LN482">482</td><td class="line"> p += rm2.rm_eo;</td></tr>
+<tr class="codeline" data-linenumber="483"><td class="num" id="LN483">483</td><td class="line"> p += strspn (p, <span class='string_literal'>" "</span>);</td></tr>
+<tr class="codeline" data-linenumber="484"><td class="num" id="LN484">484</td><td class="line"> }</td></tr>
+<tr class="codeline" data-linenumber="485"><td class="num" id="LN485">485</td><td class="line"> <span class='keyword'>return</span> <span class='macro'>TRUE<span class='macro_popup'>(!(0))</span></span>;</td></tr>
+<tr class="codeline" data-linenumber="486"><td class="num" id="LN486">486</td><td class="line">}</td></tr>
+<tr class="codeline" data-linenumber="487"><td class="num" id="LN487">487</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="488"><td class="num" id="LN488">488</td><td class="line"><span class='keyword'>static</span> <span class='keyword'>void</span></td></tr>
+<tr class="codeline" data-linenumber="489"><td class="num" id="LN489">489</td><td class="line">metar_finish (SoupSession *session, SoupMessage *msg, gpointer data)</td></tr>
+<tr class="codeline" data-linenumber="490"><td class="num" id="LN490">490</td><td class="line">{</td></tr>
+<tr class="codeline" data-linenumber="491"><td class="num" id="LN491">491</td><td class="line"> WeatherInfo *info = (WeatherInfo *)data;</td></tr>
+<tr class="codeline" data-linenumber="492"><td class="num" id="LN492">492</td><td class="line"> WeatherLocation *loc;</td></tr>
+<tr class="codeline" data-linenumber="493"><td class="num" id="LN493">493</td><td class="line"> <span class='keyword'>const</span> gchar *p, *endtag;</td></tr>
+<tr class="codeline" data-linenumber="494"><td class="num" id="LN494">494</td><td class="line"> gchar *searchkey, *metar;</td></tr>
+<tr class="codeline" data-linenumber="495"><td class="num" id="LN495">495</td><td class="line"> gboolean success = <span class='macro'>FALSE<span class='macro_popup'>(0)</span></span>;</td></tr>
+<tr class="codeline" data-linenumber="496"><td class="num" id="LN496">496</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="497"><td class="num" id="LN497">497</td><td class="line"> <span class='macro'>g_return_if_fail (info != NULL)<span class='macro_popup'>do { if ((__builtin_expect (__extension__ ({ int _g_boolean_var_<br>; if (info != ((void*)0)) _g_boolean_var_ = 1; else _g_boolean_var_<br> = 0; _g_boolean_var_; }), 1))) { } else { g_return_if_fail_warning<br> ("MateWeather", ((const char*) (__func__)), "info != NULL");<br> return; } } while (0)</span></span>;</td></tr>
+<tr class="codeline" data-linenumber="498"><td class="num" id="LN498">498</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="499"><td class="num" id="LN499">499</td><td class="line"> <span class='keyword'>if</span> (!<span class='macro'>SOUP_STATUS_IS_SUCCESSFUL (msg-&gt;status_code)<span class='macro_popup'>((msg-&gt;status_code) &gt;= 200 &amp;&amp; (msg-&gt;status_code<br>) &lt; 300)</span></span>) {</td></tr>
+<tr class="codeline" data-linenumber="500"><td class="num" id="LN500">500</td><td class="line"> <span class='keyword'>if</span> (<span class='macro'>SOUP_STATUS_IS_TRANSPORT_ERROR (msg-&gt;status_code)<span class='macro_popup'>((msg-&gt;status_code) &gt; 0 &amp;&amp; (msg-&gt;status_code<br>) &lt; 100)</span></span>)</td></tr>
+<tr class="codeline" data-linenumber="501"><td class="num" id="LN501">501</td><td class="line"> info-&gt;network_error = <span class='macro'>TRUE<span class='macro_popup'>(!(0))</span></span>;</td></tr>
+<tr class="codeline" data-linenumber="502"><td class="num" id="LN502">502</td><td class="line"> <span class='keyword'>else</span> {</td></tr>
+<tr class="codeline" data-linenumber="503"><td class="num" id="LN503">503</td><td class="line"> <span class='comment'>/* Translators: %d is an error code, and %s the error string */</span></td></tr>
+<tr class="codeline" data-linenumber="504"><td class="num" id="LN504">504</td><td class="line"> g_warning (<span class='macro'>_(<span class='string_literal'>"Failed to get METAR data: %d %s.\n"</span>)<span class='macro_popup'>(mateweather_gettext ("Failed to get METAR data: %d %s.\n"))</span></span>,</td></tr>
+<tr class="codeline" data-linenumber="505"><td class="num" id="LN505">505</td><td class="line"> msg-&gt;status_code, msg-&gt;reason_phrase);</td></tr>
+<tr class="codeline" data-linenumber="506"><td class="num" id="LN506">506</td><td class="line"> }</td></tr>
+<tr class="codeline" data-linenumber="507"><td class="num" id="LN507">507</td><td class="line"> request_done (info, <span class='macro'>FALSE<span class='macro_popup'>(0)</span></span>);</td></tr>
+<tr class="codeline" data-linenumber="508"><td class="num" id="LN508">508</td><td class="line"> <span class='keyword'>return</span>;</td></tr>
+<tr class="codeline" data-linenumber="509"><td class="num" id="LN509">509</td><td class="line"> }</td></tr>
+<tr class="codeline" data-linenumber="510"><td class="num" id="LN510">510</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="511"><td class="num" id="LN511">511</td><td class="line"> loc = info-&gt;location;</td></tr>
+<tr class="codeline" data-linenumber="512"><td class="num" id="LN512">512</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="513"><td class="num" id="LN513">513</td><td class="line"> searchkey = g_strdup_printf (<span class='string_literal'>"&lt;raw_text&gt;%s"</span>, loc-&gt;code);</td></tr>
+<tr class="codeline" data-linenumber="514"><td class="num" id="LN514">514</td><td class="line"> p = strstr (msg-&gt;response_body-&gt;data, searchkey);</td></tr>
+<tr class="codeline" data-linenumber="515"><td class="num" id="LN515">515</td><td class="line"> g_free (searchkey);</td></tr>
+<tr class="codeline" data-linenumber="516"><td class="num" id="LN516">516</td><td class="line"> <span class='keyword'>if</span> (p) {</td></tr>
+<tr class="codeline" data-linenumber="517"><td class="num" id="LN517">517</td><td class="line"> p += <span class='macro'>WEATHER_LOCATION_CODE_LEN<span class='macro_popup'>4</span></span> + 11;</td></tr>
+<tr class="codeline" data-linenumber="518"><td class="num" id="LN518">518</td><td class="line"> endtag = strstr (p, <span class='string_literal'>"&lt;/raw_text&gt;"</span>);</td></tr>
+<tr class="codeline" data-linenumber="519"><td class="num" id="LN519">519</td><td class="line"> <span class='keyword'>if</span> (endtag)</td></tr>
+<tr class="codeline" data-linenumber="520"><td class="num" id="LN520">520</td><td class="line"> metar = g_strndup (p, endtag - p);</td></tr>
+<tr class="codeline" data-linenumber="521"><td class="num" id="LN521">521</td><td class="line"> <span class='keyword'>else</span></td></tr>
+<tr class="codeline" data-linenumber="522"><td class="num" id="LN522">522</td><td class="line"> metar = g_strdup (p);</td></tr>
+<tr class="codeline" data-linenumber="523"><td class="num" id="LN523">523</td><td class="line"> success = metar_parse (metar, info);</td></tr>
+<tr class="codeline" data-linenumber="524"><td class="num" id="LN524">524</td><td class="line"> g_free (metar);</td></tr>
+<tr class="codeline" data-linenumber="525"><td class="num" id="LN525">525</td><td class="line"> } <span class='keyword'>else</span> <span class='keyword'>if</span> (!strstr (msg-&gt;response_body-&gt;data, <span class='string_literal'>"aviationweather.gov"</span>)) {</td></tr>
+<tr class="codeline" data-linenumber="526"><td class="num" id="LN526">526</td><td class="line"> <span class='comment'>/* The response doesn't even seem to have come from NOAA...</span></td></tr>
+<tr class="codeline" data-linenumber="527"><td class="num" id="LN527">527</td><td class="line"> <span class='comment'>* most likely it is a wifi hotspot login page. Call that a</span></td></tr>
+<tr class="codeline" data-linenumber="528"><td class="num" id="LN528">528</td><td class="line"> <span class='comment'>* network error.</span></td></tr>
+<tr class="codeline" data-linenumber="529"><td class="num" id="LN529">529</td><td class="line"> <span class='comment'>*/</span></td></tr>
+<tr class="codeline" data-linenumber="530"><td class="num" id="LN530">530</td><td class="line"> info-&gt;network_error = <span class='macro'>TRUE<span class='macro_popup'>(!(0))</span></span>;</td></tr>
+<tr class="codeline" data-linenumber="531"><td class="num" id="LN531">531</td><td class="line"> }</td></tr>
+<tr class="codeline" data-linenumber="532"><td class="num" id="LN532">532</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="533"><td class="num" id="LN533">533</td><td class="line"> info-&gt;valid = success;</td></tr>
+<tr class="codeline" data-linenumber="534"><td class="num" id="LN534">534</td><td class="line"> request_done (info, <span class='macro'>TRUE<span class='macro_popup'>(!(0))</span></span>);</td></tr>
+<tr class="codeline" data-linenumber="535"><td class="num" id="LN535">535</td><td class="line">}</td></tr>
+<tr class="codeline" data-linenumber="536"><td class="num" id="LN536">536</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="537"><td class="num" id="LN537">537</td><td class="line"><span class='comment'>/* Read current conditions and fill in info structure */</span></td></tr>
+<tr class="codeline" data-linenumber="538"><td class="num" id="LN538">538</td><td class="line"><span class='keyword'>void</span></td></tr>
+<tr class="codeline" data-linenumber="539"><td class="num" id="LN539">539</td><td class="line">metar_start_open (WeatherInfo *info)</td></tr>
+<tr class="codeline" data-linenumber="540"><td class="num" id="LN540">540</td><td class="line">{</td></tr>
+<tr class="codeline" data-linenumber="541"><td class="num" id="LN541">541</td><td class="line"> WeatherLocation *loc;</td></tr>
+<tr class="codeline" data-linenumber="542"><td class="num" id="LN542">542</td><td class="line"> SoupMessage *msg;</td></tr>
+<tr class="codeline" data-linenumber="543"><td class="num" id="LN543">543</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="544"><td class="num" id="LN544">544</td><td class="line"> <span class='macro'>g_return_if_fail (info != NULL)<span class='macro_popup'>do { if ((__builtin_expect (__extension__ ({ int _g_boolean_var_<br>; if (info != ((void*)0)) _g_boolean_var_ = 1; else _g_boolean_var_<br> = 0; _g_boolean_var_; }), 1))) { } else { g_return_if_fail_warning<br> ("MateWeather", ((const char*) (__func__)), "info != NULL");<br> return; } } while (0)</span></span>;</td></tr>
+<tr class="codeline" data-linenumber="545"><td class="num" id="LN545">545</td><td class="line"> info-&gt;valid = info-&gt;network_error = <span class='macro'>FALSE<span class='macro_popup'>(0)</span></span>;</td></tr>
+<tr class="codeline" data-linenumber="546"><td class="num" id="LN546">546</td><td class="line"> loc = info-&gt;location;</td></tr>
+<tr class="codeline" data-linenumber="547"><td class="num" id="LN547">547</td><td class="line"> <span class='keyword'>if</span> (loc == <span class='macro'>NULL<span class='macro_popup'>((void*)0)</span></span>) {</td></tr>
+<tr class="codeline" data-linenumber="548"><td class="num" id="LN548">548</td><td class="line"> g_warning (<span class='macro'>_(<span class='string_literal'>"WeatherInfo missing location"</span>)<span class='macro_popup'>(mateweather_gettext ("WeatherInfo missing location"))</span></span>);</td></tr>
+<tr class="codeline" data-linenumber="549"><td class="num" id="LN549">549</td><td class="line"> <span class='keyword'>return</span>;</td></tr>
+<tr class="codeline" data-linenumber="550"><td class="num" id="LN550">550</td><td class="line"> }</td></tr>
+<tr class="codeline" data-linenumber="551"><td class="num" id="LN551">551</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="552"><td class="num" id="LN552">552</td><td class="line"> msg = soup_form_request_new (</td></tr>
+<tr class="codeline" data-linenumber="553"><td class="num" id="LN553">553</td><td class="line"> <span class='string_literal'>"GET"</span>, <span class='string_literal'>"https://www.aviationweather.gov/adds/dataserver_current/httpparam"</span>,</td></tr>
+<tr class="codeline" data-linenumber="554"><td class="num" id="LN554">554</td><td class="line"> <span class='string_literal'>"dataSource"</span>, <span class='string_literal'>"metars"</span>,</td></tr>
+<tr class="codeline" data-linenumber="555"><td class="num" id="LN555">555</td><td class="line"> <span class='string_literal'>"requestType"</span>, <span class='string_literal'>"retrieve"</span>,</td></tr>
+<tr class="codeline" data-linenumber="556"><td class="num" id="LN556">556</td><td class="line"> <span class='string_literal'>"format"</span>, <span class='string_literal'>"xml"</span>,</td></tr>
+<tr class="codeline" data-linenumber="557"><td class="num" id="LN557">557</td><td class="line"> <span class='string_literal'>"hoursBeforeNow"</span>, <span class='string_literal'>"3"</span>,</td></tr>
+<tr class="codeline" data-linenumber="558"><td class="num" id="LN558">558</td><td class="line"> <span class='string_literal'>"mostRecent"</span>, <span class='string_literal'>"true"</span>,</td></tr>
+<tr class="codeline" data-linenumber="559"><td class="num" id="LN559">559</td><td class="line"> <span class='string_literal'>"fields"</span>, <span class='string_literal'>"raw_text"</span>,</td></tr>
+<tr class="codeline" data-linenumber="560"><td class="num" id="LN560">560</td><td class="line"> <span class='string_literal'>"stationString"</span>, loc-&gt;code,</td></tr>
+<tr class="codeline" data-linenumber="561"><td class="num" id="LN561">561</td><td class="line"> <span class='macro'>NULL<span class='macro_popup'>((void*)0)</span></span>);</td></tr>
+<tr class="codeline" data-linenumber="562"><td class="num" id="LN562">562</td><td class="line"> soup_session_queue_message (info-&gt;session, msg, metar_finish, info);</td></tr>
+<tr class="codeline" data-linenumber="563"><td class="num" id="LN563">563</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="564"><td class="num" id="LN564">564</td><td class="line"> info-&gt;requests_pending++;</td></tr>
+<tr class="codeline" data-linenumber="565"><td class="num" id="LN565">565</td><td class="line">}</td></tr>
+</table></body></html>
diff --git a/[email protected]_travis-ci/report-b400d5.html b/[email protected]_travis-ci/report-b400d5.html
new file mode 100644
index 0000000..e85e0b6
--- /dev/null
+++ b/[email protected]_travis-ci/report-b400d5.html
@@ -0,0 +1,2025 @@
+<!doctype html>
+<html>
+<head>
+<title>weather.c</title>
+
+<style type="text/css">
+body { color:#000000; background-color:#ffffff }
+body { font-family:Helvetica, sans-serif; font-size:10pt }
+h1 { font-size:14pt }
+.FileName { margin-top: 5px; margin-bottom: 5px; display: inline; }
+.FileNav { margin-left: 5px; margin-right: 5px; display: inline; }
+.FileNav a { text-decoration:none; font-size: larger; }
+.divider { margin-top: 30px; margin-bottom: 30px; height: 15px; }
+.divider { background-color: gray; }
+.code { border-collapse:collapse; width:100%; }
+.code { font-family: "Monospace", monospace; font-size:10pt }
+.code { line-height: 1.2em }
+.comment { color: green; font-style: oblique }
+.keyword { color: blue }
+.string_literal { color: red }
+.directive { color: darkmagenta }
+
+/* Macros and variables could have pop-up notes hidden by default.
+ - Macro pop-up: expansion of the macro
+ - Variable pop-up: value (table) of the variable */
+.macro_popup, .variable_popup { display: none; }
+
+/* Pop-up appears on mouse-hover event. */
+.macro:hover .macro_popup, .variable:hover .variable_popup {
+ display: block;
+ padding: 2px;
+ -webkit-border-radius:5px;
+ -webkit-box-shadow:1px 1px 7px #000;
+ border-radius:5px;
+ box-shadow:1px 1px 7px #000;
+ position: absolute;
+ top: -1em;
+ left:10em;
+ z-index: 1
+}
+
+.macro_popup {
+ border: 2px solid red;
+ background-color:#FFF0F0;
+ font-weight: normal;
+}
+
+.variable_popup {
+ border: 2px solid blue;
+ background-color:#F0F0FF;
+ font-weight: bold;
+ font-family: Helvetica, sans-serif;
+ font-size: 9pt;
+}
+
+/* Pop-up notes needs a relative position as a base where they pops up. */
+.macro, .variable {
+ background-color: PaleGoldenRod;
+ position: relative;
+}
+.macro { color: DarkMagenta; }
+
+#tooltiphint {
+ position: fixed;
+ width: 50em;
+ margin-left: -25em;
+ left: 50%;
+ padding: 10px;
+ border: 1px solid #b0b0b0;
+ border-radius: 2px;
+ box-shadow: 1px 1px 7px black;
+ background-color: #c0c0c0;
+ z-index: 2;
+}
+
+.num { width:2.5em; padding-right:2ex; background-color:#eeeeee }
+.num { text-align:right; font-size:8pt }
+.num { color:#444444 }
+.line { padding-left: 1ex; border-left: 3px solid #ccc }
+.line { white-space: pre }
+.msg { -webkit-box-shadow:1px 1px 7px #000 }
+.msg { box-shadow:1px 1px 7px #000 }
+.msg { -webkit-border-radius:5px }
+.msg { border-radius:5px }
+.msg { font-family:Helvetica, sans-serif; font-size:8pt }
+.msg { float:left }
+.msg { padding:0.25em 1ex 0.25em 1ex }
+.msg { margin-top:10px; margin-bottom:10px }
+.msg { font-weight:bold }
+.msg { max-width:60em; word-wrap: break-word; white-space: pre-wrap }
+.msgT { padding:0x; spacing:0x }
+.msgEvent { background-color:#fff8b4; color:#000000 }
+.msgControl { background-color:#bbbbbb; color:#000000 }
+.msgNote { background-color:#ddeeff; color:#000000 }
+.mrange { background-color:#dfddf3 }
+.mrange { border-bottom:1px solid #6F9DBE }
+.PathIndex { font-weight: bold; padding:0px 5px; margin-right:5px; }
+.PathIndex { -webkit-border-radius:8px }
+.PathIndex { border-radius:8px }
+.PathIndexEvent { background-color:#bfba87 }
+.PathIndexControl { background-color:#8c8c8c }
+.PathIndexPopUp { background-color: #879abc; }
+.PathNav a { text-decoration:none; font-size: larger }
+.CodeInsertionHint { font-weight: bold; background-color: #10dd10 }
+.CodeRemovalHint { background-color:#de1010 }
+.CodeRemovalHint { border-bottom:1px solid #6F9DBE }
+.selected{ background-color:orange !important; }
+
+table.simpletable {
+ padding: 5px;
+ font-size:12pt;
+ margin:20px;
+ border-collapse: collapse; border-spacing: 0px;
+}
+td.rowname {
+ text-align: right;
+ vertical-align: top;
+ font-weight: bold;
+ color:#444444;
+ padding-right:2ex;
+}
+
+/* Hidden text. */
+input.spoilerhider + label {
+ cursor: pointer;
+ text-decoration: underline;
+ display: block;
+}
+input.spoilerhider {
+ display: none;
+}
+input.spoilerhider ~ .spoiler {
+ overflow: hidden;
+ margin: 10px auto 0;
+ height: 0;
+ opacity: 0;
+}
+input.spoilerhider:checked + label + .spoiler{
+ height: auto;
+ opacity: 1;
+}
+</style>
+</head>
+<body>
+<!-- BUGDESC Value stored to 'location' is never read -->
+
+<!-- BUGTYPE Dead assignment -->
+
+<!-- BUGCATEGORY Dead store -->
+
+<!-- BUGFILE /rootdir/libmateweather/weather.c -->
+
+<!-- FILENAME weather.c -->
+
+<!-- FUNCTIONNAME _weather_info_fill -->
+
+<!-- ISSUEHASHCONTENTOFLINEINCONTEXT 72c2f8d42c1e38e4236e1a37bce64cdc -->
+
+<!-- BUGLINE 498 -->
+
+<!-- BUGCOLUMN 9 -->
+
+<!-- BUGPATHLENGTH 1 -->
+
+<!-- BUGMETAEND -->
+<!-- REPORTHEADER -->
+<h3>Bug Summary</h3>
+<table class="simpletable">
+<tr><td class="rowname">File:</td><td>weather.c</td></tr>
+<tr><td class="rowname">Warning:</td><td><a href="#EndPath">line 498, column 9</a><br />Value stored to 'location' is never read</td></tr>
+
+</table>
+<!-- REPORTSUMMARYEXTRA -->
+<h3>Annotated Source Code</h3>
+<p>Press <a href="#" onclick="toggleHelp(); return false;">'?'</a>
+ to see keyboard shortcuts</p>
+<input type="checkbox" class="spoilerhider" id="showinvocation" />
+<label for="showinvocation" >Show analyzer invocation</label>
+<div class="spoiler">clang -cc1 -triple x86_64-unknown-linux-gnu -analyze -disable-free -disable-llvm-verifier -discard-value-names -main-file-name weather.c -analyzer-store=region -analyzer-opt-analyze-nested-blocks -analyzer-checker=core -analyzer-checker=apiModeling -analyzer-checker=unix -analyzer-checker=deadcode -analyzer-checker=security.insecureAPI.UncheckedReturn -analyzer-checker=security.insecureAPI.getpw -analyzer-checker=security.insecureAPI.gets -analyzer-checker=security.insecureAPI.mktemp -analyzer-checker=security.insecureAPI.mkstemp -analyzer-checker=security.insecureAPI.vfork -analyzer-checker=nullability.NullPassedToNonnull -analyzer-checker=nullability.NullReturnedFromNonnull -analyzer-output plist -w -mrelocation-model pic -pic-level 2 -mthread-model posix -fmath-errno -masm-verbose -mconstructor-aliases -munwind-tables -fuse-init-array -target-cpu x86-64 -dwarf-column-info -debugger-tuning=gdb -momit-leaf-frame-pointer -resource-dir /usr/lib64/clang/9.0.1 -D HAVE_CONFIG_H -I . -I .. -I /usr/include/gtk-3.0 -I /usr/include/pango-1.0 -I /usr/include/glib-2.0 -I /usr/lib64/glib-2.0/include -I /usr/include/harfbuzz -I /usr/include/fribidi -I /usr/include/freetype2 -I /usr/include/libpng16 -I /usr/include/cairo -I /usr/include/pixman-1 -I /usr/include/gdk-pixbuf-2.0 -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/gio-unix-2.0 -I /usr/include/libdrm -I /usr/include/atk-1.0 -I /usr/include/at-spi2-atk/2.0 -I /usr/include/dbus-1.0 -I /usr/lib64/dbus-1.0/include -I /usr/include/at-spi-2.0 -I .. -I . -I /usr/include/libxml2 -I /usr/include/libsoup-2.4 -I /usr/include/glib-2.0 -I /usr/lib64/glib-2.0/include -I /usr/include/libmount -I /usr/include/blkid -I /usr/include/libxml2 -I /usr/include/glib-2.0 -I /usr/lib64/glib-2.0/include -I /usr/include/libmount -I /usr/include/blkid -D G_LOG_DOMAIN="MateWeather" -D MATELOCALEDIR="/usr/local/share/locale" -D MATEWEATHER_XML_LOCATION_DIR="/usr/local/share/libmateweather" -D PIC -internal-isystem /usr/local/include -internal-isystem /usr/lib64/clang/9.0.1/include -internal-externc-isystem /include -internal-externc-isystem /usr/include -O2 -Wno-unused-parameter -Wno-sign-compare -fdebug-compilation-dir /rootdir/libmateweather -ferror-limit 19 -fmessage-length 0 -fobjc-runtime=gcc -fdiagnostics-show-option -vectorize-loops -vectorize-slp -analyzer-checker deadcode.DeadStores -analyzer-checker alpha.deadcode.UnreachableCode -analyzer-checker alpha.core.CastSize -analyzer-checker alpha.core.CastToStruct -analyzer-checker alpha.core.IdenticalExpr -analyzer-checker alpha.core.SizeofPtr -analyzer-checker alpha.security.ArrayBoundV2 -analyzer-checker alpha.security.MallocOverflow -analyzer-checker alpha.security.ReturnPtrRange -analyzer-checker alpha.unix.SimpleStream -analyzer-checker alpha.unix.cstring.BufferOverlap -analyzer-checker alpha.unix.cstring.NotNullTerminated -analyzer-checker alpha.unix.cstring.OutOfBounds -analyzer-checker alpha.core.FixedAddr -analyzer-checker security.insecureAPI.strcpy -analyzer-output=html -faddrsig -o /rootdir/html-report/2020-06-22-141506-5642-1 -x c weather.c
+</div>
+<div id='tooltiphint' hidden="true">
+ <p>Keyboard shortcuts: </p>
+ <ul>
+ <li>Use 'j/k' keys for keyboard navigation</li>
+ <li>Use 'Shift+S' to show/hide relevant lines</li>
+ <li>Use '?' to toggle this window</li>
+ </ul>
+ <a href="#" onclick="toggleHelp(); return false;">Close</a>
+</div>
+<script type='text/javascript'>
+var relevant_lines = {"1": {"498": 1}};
+
+var filterCounterexample = function (hide) {
+ var tables = document.getElementsByClassName("code");
+ for (var t=0; t<tables.length; t++) {
+ var table = tables[t];
+ var file_id = table.getAttribute("data-fileid");
+ var lines_in_fid = relevant_lines[file_id];
+ if (!lines_in_fid) {
+ lines_in_fid = {};
+ }
+ var lines = table.getElementsByClassName("codeline");
+ for (var i=0; i<lines.length; i++) {
+ var el = lines[i];
+ var lineNo = el.getAttribute("data-linenumber");
+ if (!lines_in_fid[lineNo]) {
+ if (hide) {
+ el.setAttribute("hidden", "");
+ } else {
+ el.removeAttribute("hidden");
+ }
+ }
+ }
+ }
+}
+
+window.addEventListener("keydown", function (event) {
+ if (event.defaultPrevented) {
+ return;
+ }
+ if (event.key == "S") {
+ var checked = document.getElementsByName("showCounterexample")[0].checked;
+ filterCounterexample(!checked);
+ document.getElementsByName("showCounterexample")[0].checked = !checked;
+ } else {
+ return;
+ }
+ event.preventDefault();
+}, true);
+
+document.addEventListener("DOMContentLoaded", function() {
+ document.querySelector('input[name="showCounterexample"]').onchange=
+ function (event) {
+ filterCounterexample(this.checked);
+ };
+});
+</script>
+
+<form>
+ <input type="checkbox" name="showCounterexample" id="showCounterexample" />
+ <label for="showCounterexample">
+ Show only relevant lines
+ </label>
+</form>
+
+<script type='text/javascript'>
+var digitMatcher = new RegExp("[0-9]+");
+
+document.addEventListener("DOMContentLoaded", function() {
+ document.querySelectorAll(".PathNav > a").forEach(
+ function(currentValue, currentIndex) {
+ var hrefValue = currentValue.getAttribute("href");
+ currentValue.onclick = function() {
+ scrollTo(document.querySelector(hrefValue));
+ return false;
+ };
+ });
+});
+
+var findNum = function() {
+ var s = document.querySelector(".selected");
+ if (!s || s.id == "EndPath") {
+ return 0;
+ }
+ var out = parseInt(digitMatcher.exec(s.id)[0]);
+ return out;
+};
+
+var scrollTo = function(el) {
+ document.querySelectorAll(".selected").forEach(function(s) {
+ s.classList.remove("selected");
+ });
+ el.classList.add("selected");
+ window.scrollBy(0, el.getBoundingClientRect().top -
+ (window.innerHeight / 2));
+}
+
+var move = function(num, up, numItems) {
+ if (num == 1 && up || num == numItems - 1 && !up) {
+ return 0;
+ } else if (num == 0 && up) {
+ return numItems - 1;
+ } else if (num == 0 && !up) {
+ return 1 % numItems;
+ }
+ return up ? num - 1 : num + 1;
+}
+
+var numToId = function(num) {
+ if (num == 0) {
+ return document.getElementById("EndPath")
+ }
+ return document.getElementById("Path" + num);
+};
+
+var navigateTo = function(up) {
+ var numItems = document.querySelectorAll(
+ ".line > .msgEvent, .line > .msgControl").length;
+ var currentSelected = findNum();
+ var newSelected = move(currentSelected, up, numItems);
+ var newEl = numToId(newSelected, numItems);
+
+ // Scroll element into center.
+ scrollTo(newEl);
+};
+
+window.addEventListener("keydown", function (event) {
+ if (event.defaultPrevented) {
+ return;
+ }
+ if (event.key == "j") {
+ navigateTo(/*up=*/false);
+ } else if (event.key == "k") {
+ navigateTo(/*up=*/true);
+ } else {
+ return;
+ }
+ event.preventDefault();
+}, true);
+</script>
+
+<script type='text/javascript'>
+
+var toggleHelp = function() {
+ var hint = document.querySelector("#tooltiphint");
+ var attributeName = "hidden";
+ if (hint.hasAttribute(attributeName)) {
+ hint.removeAttribute(attributeName);
+ } else {
+ hint.setAttribute("hidden", "true");
+ }
+};
+window.addEventListener("keydown", function (event) {
+ if (event.defaultPrevented) {
+ return;
+ }
+ if (event.key == "?") {
+ toggleHelp();
+ } else {
+ return;
+ }
+ event.preventDefault();
+});
+</script>
+<table class="code" data-fileid="1">
+<tr class="codeline" data-linenumber="1"><td class="num" id="LN1">1</td><td class="line"><span class='comment'>/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 4 -*- */</span></td></tr>
+<tr class="codeline" data-linenumber="2"><td class="num" id="LN2">2</td><td class="line"><span class='comment'>/* weather.c - Overall weather server functions</span></td></tr>
+<tr class="codeline" data-linenumber="3"><td class="num" id="LN3">3</td><td class="line"> <span class='comment'>*</span></td></tr>
+<tr class="codeline" data-linenumber="4"><td class="num" id="LN4">4</td><td class="line"> <span class='comment'>* This program is free software; you can redistribute it and/or</span></td></tr>
+<tr class="codeline" data-linenumber="5"><td class="num" id="LN5">5</td><td class="line"> <span class='comment'>* modify it under the terms of the GNU General Public License as</span></td></tr>
+<tr class="codeline" data-linenumber="6"><td class="num" id="LN6">6</td><td class="line"> <span class='comment'>* published by the Free Software Foundation; either version 2 of the</span></td></tr>
+<tr class="codeline" data-linenumber="7"><td class="num" id="LN7">7</td><td class="line"> <span class='comment'>* License, or (at your option) any later version.</span></td></tr>
+<tr class="codeline" data-linenumber="8"><td class="num" id="LN8">8</td><td class="line"> <span class='comment'>*</span></td></tr>
+<tr class="codeline" data-linenumber="9"><td class="num" id="LN9">9</td><td class="line"> <span class='comment'>* This program is distributed in the hope that it will be useful, but</span></td></tr>
+<tr class="codeline" data-linenumber="10"><td class="num" id="LN10">10</td><td class="line"> <span class='comment'>* WITHOUT ANY WARRANTY; without even the implied warranty of</span></td></tr>
+<tr class="codeline" data-linenumber="11"><td class="num" id="LN11">11</td><td class="line"> <span class='comment'>* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU</span></td></tr>
+<tr class="codeline" data-linenumber="12"><td class="num" id="LN12">12</td><td class="line"> <span class='comment'>* General Public License for more details.</span></td></tr>
+<tr class="codeline" data-linenumber="13"><td class="num" id="LN13">13</td><td class="line"> <span class='comment'>*</span></td></tr>
+<tr class="codeline" data-linenumber="14"><td class="num" id="LN14">14</td><td class="line"> <span class='comment'>* You should have received a copy of the GNU General Public License</span></td></tr>
+<tr class="codeline" data-linenumber="15"><td class="num" id="LN15">15</td><td class="line"> <span class='comment'>* along with this program; if not, see</span></td></tr>
+<tr class="codeline" data-linenumber="16"><td class="num" id="LN16">16</td><td class="line"> <span class='comment'>* &lt;http://www.gnu.org/licenses/&gt;.</span></td></tr>
+<tr class="codeline" data-linenumber="17"><td class="num" id="LN17">17</td><td class="line"> <span class='comment'>*/</span></td></tr>
+<tr class="codeline" data-linenumber="18"><td class="num" id="LN18">18</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="19"><td class="num" id="LN19">19</td><td class="line"><span class='directive'>#ifdef <span class='macro'>HAVE_CONFIG_H<span class='macro_popup'>1</span></span></span></td></tr>
+<tr class="codeline" data-linenumber="20"><td class="num" id="LN20">20</td><td class="line"><span class='directive'>#include &lt;config.h&gt;</span></td></tr>
+<tr class="codeline" data-linenumber="21"><td class="num" id="LN21">21</td><td class="line"><span class='directive'>#endif</span></td></tr>
+<tr class="codeline" data-linenumber="22"><td class="num" id="LN22">22</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="23"><td class="num" id="LN23">23</td><td class="line"><span class='directive'>#include &lt;stdio.h&gt;</span></td></tr>
+<tr class="codeline" data-linenumber="24"><td class="num" id="LN24">24</td><td class="line"><span class='directive'>#include &lt;stdlib.h&gt;</span></td></tr>
+<tr class="codeline" data-linenumber="25"><td class="num" id="LN25">25</td><td class="line"><span class='directive'>#include &lt;assert.h&gt;</span></td></tr>
+<tr class="codeline" data-linenumber="26"><td class="num" id="LN26">26</td><td class="line"><span class='directive'>#include &lt;string.h&gt;</span></td></tr>
+<tr class="codeline" data-linenumber="27"><td class="num" id="LN27">27</td><td class="line"><span class='directive'>#include &lt;ctype.h&gt;</span></td></tr>
+<tr class="codeline" data-linenumber="28"><td class="num" id="LN28">28</td><td class="line"><span class='directive'>#include &lt;math.h&gt;</span></td></tr>
+<tr class="codeline" data-linenumber="29"><td class="num" id="LN29">29</td><td class="line"><span class='directive'>#include &lt;fenv.h&gt;</span></td></tr>
+<tr class="codeline" data-linenumber="30"><td class="num" id="LN30">30</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="31"><td class="num" id="LN31">31</td><td class="line"><span class='directive'>#ifdef HAVE_VALUES_H</span></td></tr>
+<tr class="codeline" data-linenumber="32"><td class="num" id="LN32">32</td><td class="line"><span class='directive'>#include &lt;values.h&gt;</span></td></tr>
+<tr class="codeline" data-linenumber="33"><td class="num" id="LN33">33</td><td class="line"><span class='directive'>#endif</span></td></tr>
+<tr class="codeline" data-linenumber="34"><td class="num" id="LN34">34</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="35"><td class="num" id="LN35">35</td><td class="line"><span class='directive'>#include &lt;time.h&gt;</span></td></tr>
+<tr class="codeline" data-linenumber="36"><td class="num" id="LN36">36</td><td class="line"><span class='directive'>#include &lt;unistd.h&gt;</span></td></tr>
+<tr class="codeline" data-linenumber="37"><td class="num" id="LN37">37</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="38"><td class="num" id="LN38">38</td><td class="line"><span class='directive'>#include &lt;gdk-pixbuf/gdk-pixbuf.h&gt;</span></td></tr>
+<tr class="codeline" data-linenumber="39"><td class="num" id="LN39">39</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="40"><td class="num" id="LN40">40</td><td class="line"><span class='directive'>#define MATEWEATHER_I_KNOW_THIS_IS_UNSTABLE</span></td></tr>
+<tr class="codeline" data-linenumber="41"><td class="num" id="LN41">41</td><td class="line"><span class='directive'>#include "weather.h"</span></td></tr>
+<tr class="codeline" data-linenumber="42"><td class="num" id="LN42">42</td><td class="line"><span class='directive'>#include "weather-priv.h"</span></td></tr>
+<tr class="codeline" data-linenumber="43"><td class="num" id="LN43">43</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="44"><td class="num" id="LN44">44</td><td class="line"><span class='directive'>#define <span class='macro'>MOON_PHASES<span class='macro_popup'>36</span></span> 36</span></td></tr>
+<tr class="codeline" data-linenumber="45"><td class="num" id="LN45">45</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="46"><td class="num" id="LN46">46</td><td class="line"><span class='comment'>/**</span></td></tr>
+<tr class="codeline" data-linenumber="47"><td class="num" id="LN47">47</td><td class="line"> <span class='comment'>* SECTION:weather</span></td></tr>
+<tr class="codeline" data-linenumber="48"><td class="num" id="LN48">48</td><td class="line"> <span class='comment'>* @Title: weather</span></td></tr>
+<tr class="codeline" data-linenumber="49"><td class="num" id="LN49">49</td><td class="line"> <span class='comment'>*/</span></td></tr>
+<tr class="codeline" data-linenumber="50"><td class="num" id="LN50">50</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="51"><td class="num" id="LN51">51</td><td class="line"><span class='keyword'>static</span> <span class='keyword'>void</span> _weather_internal_check (<span class='keyword'>void</span>);</td></tr>
+<tr class="codeline" data-linenumber="52"><td class="num" id="LN52">52</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="53"><td class="num" id="LN53">53</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="54"><td class="num" id="LN54">54</td><td class="line"><span class='keyword'>static</span> <span class='keyword'>inline</span> <span class='keyword'>void</span></td></tr>
+<tr class="codeline" data-linenumber="55"><td class="num" id="LN55">55</td><td class="line">mateweather_gettext_init (<span class='keyword'>void</span>)</td></tr>
+<tr class="codeline" data-linenumber="56"><td class="num" id="LN56">56</td><td class="line">{</td></tr>
+<tr class="codeline" data-linenumber="57"><td class="num" id="LN57">57</td><td class="line"> <span class='keyword'>static</span> gsize mateweather_gettext_initialized = <span class='macro'>FALSE<span class='macro_popup'>(0)</span></span>;</td></tr>
+<tr class="codeline" data-linenumber="58"><td class="num" id="LN58">58</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="59"><td class="num" id="LN59">59</td><td class="line"> <span class='keyword'>if</span> (<span class='macro'>G_UNLIKELY (g_once_init_enter (&amp;mateweather_gettext_initialized))<span class='macro_popup'>(__builtin_expect (__extension__ ({ int _g_boolean_var_; if (<br>(__extension__ ({ _Static_assert (sizeof *(&amp;mateweather_gettext_initialized<br>) == sizeof (gpointer), "Expression evaluates to false"); (void<br>) (0 ? (gpointer) *(&amp;mateweather_gettext_initialized) : 0<br>); (!(__extension__ ({ _Static_assert (sizeof *(&amp;mateweather_gettext_initialized<br>) == sizeof (gpointer), "Expression evaluates to false"); __sync_synchronize<br> (); (gpointer) *(&amp;mateweather_gettext_initialized); })) &amp;&amp;<br> g_once_init_enter (&amp;mateweather_gettext_initialized)); }<br>))) _g_boolean_var_ = 1; else _g_boolean_var_ = 0; _g_boolean_var_<br>; }), 0))</span></span>) {</td></tr>
+<tr class="codeline" data-linenumber="60"><td class="num" id="LN60">60</td><td class="line"> bindtextdomain (<span class='macro'>GETTEXT_PACKAGE<span class='macro_popup'>"libmateweather"</span></span>, <span class='macro'>MATELOCALEDIR<span class='macro_popup'>"/usr/local/share/locale"</span></span>);</td></tr>
+<tr class="codeline" data-linenumber="61"><td class="num" id="LN61">61</td><td class="line"><span class='directive'>#ifdef HAVE_BIND_TEXTDOMAIN_CODESET</span></td></tr>
+<tr class="codeline" data-linenumber="62"><td class="num" id="LN62">62</td><td class="line"> bind_textdomain_codeset (<span class='macro'>GETTEXT_PACKAGE<span class='macro_popup'>"libmateweather"</span></span>, <span class='string_literal'>"UTF-8"</span>);</td></tr>
+<tr class="codeline" data-linenumber="63"><td class="num" id="LN63">63</td><td class="line"><span class='directive'>#endif</span></td></tr>
+<tr class="codeline" data-linenumber="64"><td class="num" id="LN64">64</td><td class="line"> <span class='macro'>g_once_init_leave (&amp;mateweather_gettext_initialized, TRUE)<span class='macro_popup'>(__extension__ ({ _Static_assert (sizeof *(&amp;mateweather_gettext_initialized<br>) == sizeof (gpointer), "Expression evaluates to false"); (void<br>) (0 ? *(&amp;mateweather_gettext_initialized) = ((!(0))) : 0<br>); g_once_init_leave ((&amp;mateweather_gettext_initialized),<br> (gsize) ((!(0)))); }))</span></span>;</td></tr>
+<tr class="codeline" data-linenumber="65"><td class="num" id="LN65">65</td><td class="line"> }</td></tr>
+<tr class="codeline" data-linenumber="66"><td class="num" id="LN66">66</td><td class="line">}</td></tr>
+<tr class="codeline" data-linenumber="67"><td class="num" id="LN67">67</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="68"><td class="num" id="LN68">68</td><td class="line"><span class='keyword'>const</span> <span class='keyword'>char</span> *</td></tr>
+<tr class="codeline" data-linenumber="69"><td class="num" id="LN69">69</td><td class="line">mateweather_gettext (<span class='keyword'>const</span> <span class='keyword'>char</span> *str)</td></tr>
+<tr class="codeline" data-linenumber="70"><td class="num" id="LN70">70</td><td class="line">{</td></tr>
+<tr class="codeline" data-linenumber="71"><td class="num" id="LN71">71</td><td class="line"> mateweather_gettext_init ();</td></tr>
+<tr class="codeline" data-linenumber="72"><td class="num" id="LN72">72</td><td class="line"> <span class='keyword'>return</span> <span class='macro'>dgettext (GETTEXT_PACKAGE, str)<span class='macro_popup'>dcgettext ("libmateweather", str, 5)</span></span>;</td></tr>
+<tr class="codeline" data-linenumber="73"><td class="num" id="LN73">73</td><td class="line">}</td></tr>
+<tr class="codeline" data-linenumber="74"><td class="num" id="LN74">74</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="75"><td class="num" id="LN75">75</td><td class="line"><span class='keyword'>const</span> <span class='keyword'>char</span> *</td></tr>
+<tr class="codeline" data-linenumber="76"><td class="num" id="LN76">76</td><td class="line">mateweather_dpgettext (<span class='keyword'>const</span> <span class='keyword'>char</span> *context,</td></tr>
+<tr class="codeline" data-linenumber="77"><td class="num" id="LN77">77</td><td class="line"> <span class='keyword'>const</span> <span class='keyword'>char</span> *str)</td></tr>
+<tr class="codeline" data-linenumber="78"><td class="num" id="LN78">78</td><td class="line">{</td></tr>
+<tr class="codeline" data-linenumber="79"><td class="num" id="LN79">79</td><td class="line"> mateweather_gettext_init ();</td></tr>
+<tr class="codeline" data-linenumber="80"><td class="num" id="LN80">80</td><td class="line"> <span class='keyword'>return</span> g_dpgettext2 (<span class='macro'>GETTEXT_PACKAGE<span class='macro_popup'>"libmateweather"</span></span>, context, str);</td></tr>
+<tr class="codeline" data-linenumber="81"><td class="num" id="LN81">81</td><td class="line">}</td></tr>
+<tr class="codeline" data-linenumber="82"><td class="num" id="LN82">82</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="83"><td class="num" id="LN83">83</td><td class="line"><span class='comment'>/*</span></td></tr>
+<tr class="codeline" data-linenumber="84"><td class="num" id="LN84">84</td><td class="line"> <span class='comment'>* Convert string of the form "DD-MM-SSH" to radians</span></td></tr>
+<tr class="codeline" data-linenumber="85"><td class="num" id="LN85">85</td><td class="line"> <span class='comment'>* DD:degrees (to 3 digits), MM:minutes, SS:seconds H:hemisphere (NESW)</span></td></tr>
+<tr class="codeline" data-linenumber="86"><td class="num" id="LN86">86</td><td class="line"> <span class='comment'>* Return value is positive for N,E; negative for S,W.</span></td></tr>
+<tr class="codeline" data-linenumber="87"><td class="num" id="LN87">87</td><td class="line"> <span class='comment'>*/</span></td></tr>
+<tr class="codeline" data-linenumber="88"><td class="num" id="LN88">88</td><td class="line"><span class='keyword'>static</span> gdouble</td></tr>
+<tr class="codeline" data-linenumber="89"><td class="num" id="LN89">89</td><td class="line">dmsh2rad (<span class='keyword'>const</span> gchar *latlon)</td></tr>
+<tr class="codeline" data-linenumber="90"><td class="num" id="LN90">90</td><td class="line">{</td></tr>
+<tr class="codeline" data-linenumber="91"><td class="num" id="LN91">91</td><td class="line"> <span class='keyword'>char</span> *p1, *p2;</td></tr>
+<tr class="codeline" data-linenumber="92"><td class="num" id="LN92">92</td><td class="line"> <span class='keyword'>int</span> deg, min, sec, dir;</td></tr>
+<tr class="codeline" data-linenumber="93"><td class="num" id="LN93">93</td><td class="line"> gdouble value;</td></tr>
+<tr class="codeline" data-linenumber="94"><td class="num" id="LN94">94</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="95"><td class="num" id="LN95">95</td><td class="line"> <span class='keyword'>if</span> (latlon == <span class='macro'>NULL<span class='macro_popup'>((void*)0)</span></span>)</td></tr>
+<tr class="codeline" data-linenumber="96"><td class="num" id="LN96">96</td><td class="line"> <span class='keyword'>return</span> <span class='macro'>DBL_MAX<span class='macro_popup'>1.7976931348623157e+308</span></span>;</td></tr>
+<tr class="codeline" data-linenumber="97"><td class="num" id="LN97">97</td><td class="line"> p1 = strchr (latlon, '-');</td></tr>
+<tr class="codeline" data-linenumber="98"><td class="num" id="LN98">98</td><td class="line"> p2 = strrchr (latlon, '-');</td></tr>
+<tr class="codeline" data-linenumber="99"><td class="num" id="LN99">99</td><td class="line"> <span class='keyword'>if</span> (p1 == <span class='macro'>NULL<span class='macro_popup'>((void*)0)</span></span> || p1 == latlon) {</td></tr>
+<tr class="codeline" data-linenumber="100"><td class="num" id="LN100">100</td><td class="line"> <span class='keyword'>return</span> <span class='macro'>DBL_MAX<span class='macro_popup'>1.7976931348623157e+308</span></span>;</td></tr>
+<tr class="codeline" data-linenumber="101"><td class="num" id="LN101">101</td><td class="line"> } <span class='keyword'>else</span> <span class='keyword'>if</span> (p1 == p2) {</td></tr>
+<tr class="codeline" data-linenumber="102"><td class="num" id="LN102">102</td><td class="line"> sscanf (latlon, <span class='string_literal'>"%d-%d"</span>, &amp;deg, &amp;min);</td></tr>
+<tr class="codeline" data-linenumber="103"><td class="num" id="LN103">103</td><td class="line"> sec = 0;</td></tr>
+<tr class="codeline" data-linenumber="104"><td class="num" id="LN104">104</td><td class="line"> } <span class='keyword'>else</span> <span class='keyword'>if</span> (p2 == 1 + p1) {</td></tr>
+<tr class="codeline" data-linenumber="105"><td class="num" id="LN105">105</td><td class="line"> <span class='keyword'>return</span> <span class='macro'>DBL_MAX<span class='macro_popup'>1.7976931348623157e+308</span></span>;</td></tr>
+<tr class="codeline" data-linenumber="106"><td class="num" id="LN106">106</td><td class="line"> } <span class='keyword'>else</span> {</td></tr>
+<tr class="codeline" data-linenumber="107"><td class="num" id="LN107">107</td><td class="line"> sscanf (latlon, <span class='string_literal'>"%d-%d-%d"</span>, &amp;deg, &amp;min, &amp;sec);</td></tr>
+<tr class="codeline" data-linenumber="108"><td class="num" id="LN108">108</td><td class="line"> }</td></tr>
+<tr class="codeline" data-linenumber="109"><td class="num" id="LN109">109</td><td class="line"> <span class='keyword'>if</span> (deg &gt; 180 || min &gt;= 60 || sec &gt;= 60)</td></tr>
+<tr class="codeline" data-linenumber="110"><td class="num" id="LN110">110</td><td class="line"> <span class='keyword'>return</span> <span class='macro'>DBL_MAX<span class='macro_popup'>1.7976931348623157e+308</span></span>;</td></tr>
+<tr class="codeline" data-linenumber="111"><td class="num" id="LN111">111</td><td class="line"> value = (gdouble)((deg * 60 + min) * 60 + sec) * <span class='macro'>M_PI<span class='macro_popup'>3.14159265358979323846</span></span> / 648000.;</td></tr>
+<tr class="codeline" data-linenumber="112"><td class="num" id="LN112">112</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="113"><td class="num" id="LN113">113</td><td class="line"> dir = g_ascii_toupper (latlon[strlen (latlon) - 1]);</td></tr>
+<tr class="codeline" data-linenumber="114"><td class="num" id="LN114">114</td><td class="line"> <span class='keyword'>if</span> (dir == 'W' || dir == 'S')</td></tr>
+<tr class="codeline" data-linenumber="115"><td class="num" id="LN115">115</td><td class="line"> value = -value;</td></tr>
+<tr class="codeline" data-linenumber="116"><td class="num" id="LN116">116</td><td class="line"> <span class='keyword'>else</span> <span class='keyword'>if</span> (dir != 'E' &amp;&amp; dir != 'N' &amp;&amp; (value != 0.0 || dir != '0'))</td></tr>
+<tr class="codeline" data-linenumber="117"><td class="num" id="LN117">117</td><td class="line"> value = <span class='macro'>DBL_MAX<span class='macro_popup'>1.7976931348623157e+308</span></span>;</td></tr>
+<tr class="codeline" data-linenumber="118"><td class="num" id="LN118">118</td><td class="line"> <span class='keyword'>return</span> value;</td></tr>
+<tr class="codeline" data-linenumber="119"><td class="num" id="LN119">119</td><td class="line">}</td></tr>
+<tr class="codeline" data-linenumber="120"><td class="num" id="LN120">120</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="121"><td class="num" id="LN121">121</td><td class="line">WeatherLocation *</td></tr>
+<tr class="codeline" data-linenumber="122"><td class="num" id="LN122">122</td><td class="line">weather_location_new (<span class='keyword'>const</span> gchar *name, <span class='keyword'>const</span> gchar *code,</td></tr>
+<tr class="codeline" data-linenumber="123"><td class="num" id="LN123">123</td><td class="line"> <span class='keyword'>const</span> gchar *zone, <span class='keyword'>const</span> gchar *radar,</td></tr>
+<tr class="codeline" data-linenumber="124"><td class="num" id="LN124">124</td><td class="line"> <span class='keyword'>const</span> gchar *coordinates,</td></tr>
+<tr class="codeline" data-linenumber="125"><td class="num" id="LN125">125</td><td class="line"> <span class='keyword'>const</span> gchar *country_code,</td></tr>
+<tr class="codeline" data-linenumber="126"><td class="num" id="LN126">126</td><td class="line"> <span class='keyword'>const</span> gchar *tz_hint)</td></tr>
+<tr class="codeline" data-linenumber="127"><td class="num" id="LN127">127</td><td class="line">{</td></tr>
+<tr class="codeline" data-linenumber="128"><td class="num" id="LN128">128</td><td class="line"> WeatherLocation *location;</td></tr>
+<tr class="codeline" data-linenumber="129"><td class="num" id="LN129">129</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="130"><td class="num" id="LN130">130</td><td class="line"> _weather_internal_check ();</td></tr>
+<tr class="codeline" data-linenumber="131"><td class="num" id="LN131">131</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="132"><td class="num" id="LN132">132</td><td class="line"> location = <span class='macro'>g_new (WeatherLocation, 1)<span class='macro_popup'>(WeatherLocation *) (__extension__ ({ gsize __n = (gsize) (1)<br>; gsize __s = sizeof (WeatherLocation); gpointer __p; if (__s<br> == 1) __p = g_malloc (__n); else if (__builtin_constant_p (__n<br>) &amp;&amp; (__s == 0 || __n &lt;= (9223372036854775807L *2UL<br>+1UL) / __s)) __p = g_malloc (__n * __s); else __p = g_malloc_n<br> (__n, __s); __p; }))</span></span>;</td></tr>
+<tr class="codeline" data-linenumber="133"><td class="num" id="LN133">133</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="134"><td class="num" id="LN134">134</td><td class="line"> <span class='comment'>/* name and metar code must be set */</span></td></tr>
+<tr class="codeline" data-linenumber="135"><td class="num" id="LN135">135</td><td class="line"> location-&gt;name = g_strdup (name);</td></tr>
+<tr class="codeline" data-linenumber="136"><td class="num" id="LN136">136</td><td class="line"> location-&gt;code = g_strdup (code);</td></tr>
+<tr class="codeline" data-linenumber="137"><td class="num" id="LN137">137</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="138"><td class="num" id="LN138">138</td><td class="line"> <span class='keyword'>if</span> (zone) {</td></tr>
+<tr class="codeline" data-linenumber="139"><td class="num" id="LN139">139</td><td class="line"> location-&gt;zone = g_strdup (zone);</td></tr>
+<tr class="codeline" data-linenumber="140"><td class="num" id="LN140">140</td><td class="line"> } <span class='keyword'>else</span> {</td></tr>
+<tr class="codeline" data-linenumber="141"><td class="num" id="LN141">141</td><td class="line"> location-&gt;zone = g_strdup (<span class='string_literal'>"------"</span>);</td></tr>
+<tr class="codeline" data-linenumber="142"><td class="num" id="LN142">142</td><td class="line"> }</td></tr>
+<tr class="codeline" data-linenumber="143"><td class="num" id="LN143">143</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="144"><td class="num" id="LN144">144</td><td class="line"> <span class='keyword'>if</span> (radar) {</td></tr>
+<tr class="codeline" data-linenumber="145"><td class="num" id="LN145">145</td><td class="line"> location-&gt;radar = g_strdup (radar);</td></tr>
+<tr class="codeline" data-linenumber="146"><td class="num" id="LN146">146</td><td class="line"> } <span class='keyword'>else</span> {</td></tr>
+<tr class="codeline" data-linenumber="147"><td class="num" id="LN147">147</td><td class="line"> location-&gt;radar = g_strdup (<span class='string_literal'>"---"</span>);</td></tr>
+<tr class="codeline" data-linenumber="148"><td class="num" id="LN148">148</td><td class="line"> }</td></tr>
+<tr class="codeline" data-linenumber="149"><td class="num" id="LN149">149</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="150"><td class="num" id="LN150">150</td><td class="line"> <span class='keyword'>if</span> (location-&gt;zone[0] == '-') {</td></tr>
+<tr class="codeline" data-linenumber="151"><td class="num" id="LN151">151</td><td class="line"> location-&gt;zone_valid = <span class='macro'>FALSE<span class='macro_popup'>(0)</span></span>;</td></tr>
+<tr class="codeline" data-linenumber="152"><td class="num" id="LN152">152</td><td class="line"> } <span class='keyword'>else</span> {</td></tr>
+<tr class="codeline" data-linenumber="153"><td class="num" id="LN153">153</td><td class="line"> location-&gt;zone_valid = <span class='macro'>TRUE<span class='macro_popup'>(!(0))</span></span>;</td></tr>
+<tr class="codeline" data-linenumber="154"><td class="num" id="LN154">154</td><td class="line"> }</td></tr>
+<tr class="codeline" data-linenumber="155"><td class="num" id="LN155">155</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="156"><td class="num" id="LN156">156</td><td class="line"> location-&gt;coordinates = <span class='macro'>NULL<span class='macro_popup'>((void*)0)</span></span>;</td></tr>
+<tr class="codeline" data-linenumber="157"><td class="num" id="LN157">157</td><td class="line"> <span class='keyword'>if</span> (coordinates)</td></tr>
+<tr class="codeline" data-linenumber="158"><td class="num" id="LN158">158</td><td class="line"> {</td></tr>
+<tr class="codeline" data-linenumber="159"><td class="num" id="LN159">159</td><td class="line"> <span class='keyword'>char</span> **pieces;</td></tr>
+<tr class="codeline" data-linenumber="160"><td class="num" id="LN160">160</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="161"><td class="num" id="LN161">161</td><td class="line"> pieces = g_strsplit (coordinates, <span class='string_literal'>" "</span>, -1);</td></tr>
+<tr class="codeline" data-linenumber="162"><td class="num" id="LN162">162</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="163"><td class="num" id="LN163">163</td><td class="line"> <span class='keyword'>if</span> (g_strv_length (pieces) == 2)</td></tr>
+<tr class="codeline" data-linenumber="164"><td class="num" id="LN164">164</td><td class="line"> {</td></tr>
+<tr class="codeline" data-linenumber="165"><td class="num" id="LN165">165</td><td class="line"> location-&gt;coordinates = g_strdup (coordinates);</td></tr>
+<tr class="codeline" data-linenumber="166"><td class="num" id="LN166">166</td><td class="line"> location-&gt;latitude = dmsh2rad (pieces[0]);</td></tr>
+<tr class="codeline" data-linenumber="167"><td class="num" id="LN167">167</td><td class="line"> location-&gt;longitude = dmsh2rad (pieces[1]);</td></tr>
+<tr class="codeline" data-linenumber="168"><td class="num" id="LN168">168</td><td class="line"> }</td></tr>
+<tr class="codeline" data-linenumber="169"><td class="num" id="LN169">169</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="170"><td class="num" id="LN170">170</td><td class="line"> g_strfreev (pieces);</td></tr>
+<tr class="codeline" data-linenumber="171"><td class="num" id="LN171">171</td><td class="line"> }</td></tr>
+<tr class="codeline" data-linenumber="172"><td class="num" id="LN172">172</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="173"><td class="num" id="LN173">173</td><td class="line"> <span class='keyword'>if</span> (!location-&gt;coordinates)</td></tr>
+<tr class="codeline" data-linenumber="174"><td class="num" id="LN174">174</td><td class="line"> {</td></tr>
+<tr class="codeline" data-linenumber="175"><td class="num" id="LN175">175</td><td class="line"> location-&gt;coordinates = g_strdup (<span class='string_literal'>"---"</span>);</td></tr>
+<tr class="codeline" data-linenumber="176"><td class="num" id="LN176">176</td><td class="line"> location-&gt;latitude = <span class='macro'>DBL_MAX<span class='macro_popup'>1.7976931348623157e+308</span></span>;</td></tr>
+<tr class="codeline" data-linenumber="177"><td class="num" id="LN177">177</td><td class="line"> location-&gt;longitude = <span class='macro'>DBL_MAX<span class='macro_popup'>1.7976931348623157e+308</span></span>;</td></tr>
+<tr class="codeline" data-linenumber="178"><td class="num" id="LN178">178</td><td class="line"> }</td></tr>
+<tr class="codeline" data-linenumber="179"><td class="num" id="LN179">179</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="180"><td class="num" id="LN180">180</td><td class="line"> location-&gt;latlon_valid = (location-&gt;latitude &lt; <span class='macro'>DBL_MAX<span class='macro_popup'>1.7976931348623157e+308</span></span> &amp;&amp; location-&gt;longitude &lt; <span class='macro'>DBL_MAX<span class='macro_popup'>1.7976931348623157e+308</span></span>);</td></tr>
+<tr class="codeline" data-linenumber="181"><td class="num" id="LN181">181</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="182"><td class="num" id="LN182">182</td><td class="line"> location-&gt;country_code = g_strdup (country_code);</td></tr>
+<tr class="codeline" data-linenumber="183"><td class="num" id="LN183">183</td><td class="line"> location-&gt;tz_hint = g_strdup (tz_hint);</td></tr>
+<tr class="codeline" data-linenumber="184"><td class="num" id="LN184">184</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="185"><td class="num" id="LN185">185</td><td class="line"> <span class='keyword'>return</span> location;</td></tr>
+<tr class="codeline" data-linenumber="186"><td class="num" id="LN186">186</td><td class="line">}</td></tr>
+<tr class="codeline" data-linenumber="187"><td class="num" id="LN187">187</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="188"><td class="num" id="LN188">188</td><td class="line">WeatherLocation *</td></tr>
+<tr class="codeline" data-linenumber="189"><td class="num" id="LN189">189</td><td class="line">weather_location_clone (<span class='keyword'>const</span> WeatherLocation *location)</td></tr>
+<tr class="codeline" data-linenumber="190"><td class="num" id="LN190">190</td><td class="line">{</td></tr>
+<tr class="codeline" data-linenumber="191"><td class="num" id="LN191">191</td><td class="line"> WeatherLocation *clone;</td></tr>
+<tr class="codeline" data-linenumber="192"><td class="num" id="LN192">192</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="193"><td class="num" id="LN193">193</td><td class="line"> <span class='macro'>g_return_val_if_fail (location != NULL, NULL)<span class='macro_popup'>do { if ((__builtin_expect (__extension__ ({ int _g_boolean_var_<br>; if (location != ((void*)0)) _g_boolean_var_ = 1; else _g_boolean_var_<br> = 0; _g_boolean_var_; }), 1))) { } else { g_return_if_fail_warning<br> ("MateWeather", ((const char*) (__func__)), "location != NULL"<br>); return (((void*)0)); } } while (0)</span></span>;</td></tr>
+<tr class="codeline" data-linenumber="194"><td class="num" id="LN194">194</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="195"><td class="num" id="LN195">195</td><td class="line"> clone = weather_location_new (location-&gt;name,</td></tr>
+<tr class="codeline" data-linenumber="196"><td class="num" id="LN196">196</td><td class="line"> location-&gt;code, location-&gt;zone,</td></tr>
+<tr class="codeline" data-linenumber="197"><td class="num" id="LN197">197</td><td class="line"> location-&gt;radar, location-&gt;coordinates,</td></tr>
+<tr class="codeline" data-linenumber="198"><td class="num" id="LN198">198</td><td class="line"> location-&gt;country_code, location-&gt;tz_hint);</td></tr>
+<tr class="codeline" data-linenumber="199"><td class="num" id="LN199">199</td><td class="line"> clone-&gt;latitude = location-&gt;latitude;</td></tr>
+<tr class="codeline" data-linenumber="200"><td class="num" id="LN200">200</td><td class="line"> clone-&gt;longitude = location-&gt;longitude;</td></tr>
+<tr class="codeline" data-linenumber="201"><td class="num" id="LN201">201</td><td class="line"> clone-&gt;latlon_valid = location-&gt;latlon_valid;</td></tr>
+<tr class="codeline" data-linenumber="202"><td class="num" id="LN202">202</td><td class="line"> <span class='keyword'>return</span> clone;</td></tr>
+<tr class="codeline" data-linenumber="203"><td class="num" id="LN203">203</td><td class="line">}</td></tr>
+<tr class="codeline" data-linenumber="204"><td class="num" id="LN204">204</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="205"><td class="num" id="LN205">205</td><td class="line"><span class='keyword'>void</span></td></tr>
+<tr class="codeline" data-linenumber="206"><td class="num" id="LN206">206</td><td class="line">weather_location_free (WeatherLocation *location)</td></tr>
+<tr class="codeline" data-linenumber="207"><td class="num" id="LN207">207</td><td class="line">{</td></tr>
+<tr class="codeline" data-linenumber="208"><td class="num" id="LN208">208</td><td class="line"> <span class='keyword'>if</span> (location) {</td></tr>
+<tr class="codeline" data-linenumber="209"><td class="num" id="LN209">209</td><td class="line"> g_free (location-&gt;name);</td></tr>
+<tr class="codeline" data-linenumber="210"><td class="num" id="LN210">210</td><td class="line"> g_free (location-&gt;code);</td></tr>
+<tr class="codeline" data-linenumber="211"><td class="num" id="LN211">211</td><td class="line"> g_free (location-&gt;zone);</td></tr>
+<tr class="codeline" data-linenumber="212"><td class="num" id="LN212">212</td><td class="line"> g_free (location-&gt;radar);</td></tr>
+<tr class="codeline" data-linenumber="213"><td class="num" id="LN213">213</td><td class="line"> g_free (location-&gt;coordinates);</td></tr>
+<tr class="codeline" data-linenumber="214"><td class="num" id="LN214">214</td><td class="line"> g_free (location-&gt;country_code);</td></tr>
+<tr class="codeline" data-linenumber="215"><td class="num" id="LN215">215</td><td class="line"> g_free (location-&gt;tz_hint);</td></tr>
+<tr class="codeline" data-linenumber="216"><td class="num" id="LN216">216</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="217"><td class="num" id="LN217">217</td><td class="line"> g_free (location);</td></tr>
+<tr class="codeline" data-linenumber="218"><td class="num" id="LN218">218</td><td class="line"> }</td></tr>
+<tr class="codeline" data-linenumber="219"><td class="num" id="LN219">219</td><td class="line">}</td></tr>
+<tr class="codeline" data-linenumber="220"><td class="num" id="LN220">220</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="221"><td class="num" id="LN221">221</td><td class="line">gboolean</td></tr>
+<tr class="codeline" data-linenumber="222"><td class="num" id="LN222">222</td><td class="line">weather_location_equal (<span class='keyword'>const</span> WeatherLocation *location1, <span class='keyword'>const</span> WeatherLocation *location2)</td></tr>
+<tr class="codeline" data-linenumber="223"><td class="num" id="LN223">223</td><td class="line">{</td></tr>
+<tr class="codeline" data-linenumber="224"><td class="num" id="LN224">224</td><td class="line"> <span class='comment'>/* if something is NULL, then it's TRUE if and only if both are NULL) */</span></td></tr>
+<tr class="codeline" data-linenumber="225"><td class="num" id="LN225">225</td><td class="line"> <span class='keyword'>if</span> (location1 == <span class='macro'>NULL<span class='macro_popup'>((void*)0)</span></span> || location2 == <span class='macro'>NULL<span class='macro_popup'>((void*)0)</span></span>)</td></tr>
+<tr class="codeline" data-linenumber="226"><td class="num" id="LN226">226</td><td class="line"> <span class='keyword'>return</span> (location1 == location2);</td></tr>
+<tr class="codeline" data-linenumber="227"><td class="num" id="LN227">227</td><td class="line"> <span class='keyword'>if</span> (!location1-&gt;code || !location2-&gt;code)</td></tr>
+<tr class="codeline" data-linenumber="228"><td class="num" id="LN228">228</td><td class="line"> <span class='keyword'>return</span> (location1-&gt;code == location2-&gt;code);</td></tr>
+<tr class="codeline" data-linenumber="229"><td class="num" id="LN229">229</td><td class="line"> <span class='keyword'>if</span> (!location1-&gt;name || !location2-&gt;name)</td></tr>
+<tr class="codeline" data-linenumber="230"><td class="num" id="LN230">230</td><td class="line"> <span class='keyword'>return</span> (location1-&gt;name == location2-&gt;name);</td></tr>
+<tr class="codeline" data-linenumber="231"><td class="num" id="LN231">231</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="232"><td class="num" id="LN232">232</td><td class="line"> <span class='keyword'>return</span> ((strcmp (location1-&gt;code, location2-&gt;code) == 0) &amp;&amp;</td></tr>
+<tr class="codeline" data-linenumber="233"><td class="num" id="LN233">233</td><td class="line"> (strcmp (location1-&gt;name, location2-&gt;name) == 0));</td></tr>
+<tr class="codeline" data-linenumber="234"><td class="num" id="LN234">234</td><td class="line">}</td></tr>
+<tr class="codeline" data-linenumber="235"><td class="num" id="LN235">235</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="236"><td class="num" id="LN236">236</td><td class="line"><span class='keyword'>static</span> <span class='keyword'>const</span> gchar *wind_direction_str[] = {</td></tr>
+<tr class="codeline" data-linenumber="237"><td class="num" id="LN237">237</td><td class="line"> <span class='macro'>N_(<span class='string_literal'>"Variable"</span>)<span class='macro_popup'>("Variable")</span></span>,</td></tr>
+<tr class="codeline" data-linenumber="238"><td class="num" id="LN238">238</td><td class="line"> <span class='macro'>N_(<span class='string_literal'>"North"</span>)<span class='macro_popup'>("North")</span></span>, <span class='macro'>N_(<span class='string_literal'>"North - NorthEast"</span>)<span class='macro_popup'>("North - NorthEast")</span></span>, <span class='macro'>N_(<span class='string_literal'>"Northeast"</span>)<span class='macro_popup'>("Northeast")</span></span>, <span class='macro'>N_(<span class='string_literal'>"East - NorthEast"</span>)<span class='macro_popup'>("East - NorthEast")</span></span>,</td></tr>
+<tr class="codeline" data-linenumber="239"><td class="num" id="LN239">239</td><td class="line"> <span class='macro'>N_(<span class='string_literal'>"East"</span>)<span class='macro_popup'>("East")</span></span>, <span class='macro'>N_(<span class='string_literal'>"East - Southeast"</span>)<span class='macro_popup'>("East - Southeast")</span></span>, <span class='macro'>N_(<span class='string_literal'>"Southeast"</span>)<span class='macro_popup'>("Southeast")</span></span>, <span class='macro'>N_(<span class='string_literal'>"South - Southeast"</span>)<span class='macro_popup'>("South - Southeast")</span></span>,</td></tr>
+<tr class="codeline" data-linenumber="240"><td class="num" id="LN240">240</td><td class="line"> <span class='macro'>N_(<span class='string_literal'>"South"</span>)<span class='macro_popup'>("South")</span></span>, <span class='macro'>N_(<span class='string_literal'>"South - Southwest"</span>)<span class='macro_popup'>("South - Southwest")</span></span>, <span class='macro'>N_(<span class='string_literal'>"Southwest"</span>)<span class='macro_popup'>("Southwest")</span></span>, <span class='macro'>N_(<span class='string_literal'>"West - Southwest"</span>)<span class='macro_popup'>("West - Southwest")</span></span>,</td></tr>
+<tr class="codeline" data-linenumber="241"><td class="num" id="LN241">241</td><td class="line"> <span class='macro'>N_(<span class='string_literal'>"West"</span>)<span class='macro_popup'>("West")</span></span>, <span class='macro'>N_(<span class='string_literal'>"West - Northwest"</span>)<span class='macro_popup'>("West - Northwest")</span></span>, <span class='macro'>N_(<span class='string_literal'>"Northwest"</span>)<span class='macro_popup'>("Northwest")</span></span>, <span class='macro'>N_(<span class='string_literal'>"North - Northwest"</span>)<span class='macro_popup'>("North - Northwest")</span></span></td></tr>
+<tr class="codeline" data-linenumber="242"><td class="num" id="LN242">242</td><td class="line">};</td></tr>
+<tr class="codeline" data-linenumber="243"><td class="num" id="LN243">243</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="244"><td class="num" id="LN244">244</td><td class="line"><span class='keyword'>const</span> gchar *</td></tr>
+<tr class="codeline" data-linenumber="245"><td class="num" id="LN245">245</td><td class="line">weather_wind_direction_string (WeatherWindDirection wind)</td></tr>
+<tr class="codeline" data-linenumber="246"><td class="num" id="LN246">246</td><td class="line">{</td></tr>
+<tr class="codeline" data-linenumber="247"><td class="num" id="LN247">247</td><td class="line"> <span class='keyword'>if</span> (wind &lt;= WIND_INVALID || wind &gt;= WIND_LAST)</td></tr>
+<tr class="codeline" data-linenumber="248"><td class="num" id="LN248">248</td><td class="line"> <span class='keyword'>return</span> <span class='macro'>_(<span class='string_literal'>"Invalid"</span>)<span class='macro_popup'>(mateweather_gettext ("Invalid"))</span></span>;</td></tr>
+<tr class="codeline" data-linenumber="249"><td class="num" id="LN249">249</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="250"><td class="num" id="LN250">250</td><td class="line"> <span class='keyword'>return</span> <span class='macro'>_(wind_direction_str[(<span class='keyword'>int</span>)wind])<span class='macro_popup'>(mateweather_gettext (wind_direction_str[(int)wind]))</span></span>;</td></tr>
+<tr class="codeline" data-linenumber="251"><td class="num" id="LN251">251</td><td class="line">}</td></tr>
+<tr class="codeline" data-linenumber="252"><td class="num" id="LN252">252</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="253"><td class="num" id="LN253">253</td><td class="line"><span class='keyword'>static</span> <span class='keyword'>const</span> gchar *sky_str[] = {</td></tr>
+<tr class="codeline" data-linenumber="254"><td class="num" id="LN254">254</td><td class="line"> <span class='macro'>N_(<span class='string_literal'>"Clear Sky"</span>)<span class='macro_popup'>("Clear Sky")</span></span>,</td></tr>
+<tr class="codeline" data-linenumber="255"><td class="num" id="LN255">255</td><td class="line"> <span class='macro'>N_(<span class='string_literal'>"Broken clouds"</span>)<span class='macro_popup'>("Broken clouds")</span></span>,</td></tr>
+<tr class="codeline" data-linenumber="256"><td class="num" id="LN256">256</td><td class="line"> <span class='macro'>N_(<span class='string_literal'>"Scattered clouds"</span>)<span class='macro_popup'>("Scattered clouds")</span></span>,</td></tr>
+<tr class="codeline" data-linenumber="257"><td class="num" id="LN257">257</td><td class="line"> <span class='macro'>N_(<span class='string_literal'>"Few clouds"</span>)<span class='macro_popup'>("Few clouds")</span></span>,</td></tr>
+<tr class="codeline" data-linenumber="258"><td class="num" id="LN258">258</td><td class="line"> <span class='macro'>N_(<span class='string_literal'>"Overcast"</span>)<span class='macro_popup'>("Overcast")</span></span></td></tr>
+<tr class="codeline" data-linenumber="259"><td class="num" id="LN259">259</td><td class="line">};</td></tr>
+<tr class="codeline" data-linenumber="260"><td class="num" id="LN260">260</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="261"><td class="num" id="LN261">261</td><td class="line"><span class='keyword'>const</span> gchar *</td></tr>
+<tr class="codeline" data-linenumber="262"><td class="num" id="LN262">262</td><td class="line">weather_sky_string (WeatherSky sky)</td></tr>
+<tr class="codeline" data-linenumber="263"><td class="num" id="LN263">263</td><td class="line">{</td></tr>
+<tr class="codeline" data-linenumber="264"><td class="num" id="LN264">264</td><td class="line"> <span class='keyword'>if</span> (sky &lt;= SKY_INVALID || sky &gt;= SKY_LAST)</td></tr>
+<tr class="codeline" data-linenumber="265"><td class="num" id="LN265">265</td><td class="line"> <span class='keyword'>return</span> <span class='macro'>_(<span class='string_literal'>"Invalid"</span>)<span class='macro_popup'>(mateweather_gettext ("Invalid"))</span></span>;</td></tr>
+<tr class="codeline" data-linenumber="266"><td class="num" id="LN266">266</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="267"><td class="num" id="LN267">267</td><td class="line"> <span class='keyword'>return</span> <span class='macro'>_(sky_str[(<span class='keyword'>int</span>)sky])<span class='macro_popup'>(mateweather_gettext (sky_str[(int)sky]))</span></span>;</td></tr>
+<tr class="codeline" data-linenumber="268"><td class="num" id="LN268">268</td><td class="line">}</td></tr>
+<tr class="codeline" data-linenumber="269"><td class="num" id="LN269">269</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="270"><td class="num" id="LN270">270</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="271"><td class="num" id="LN271">271</td><td class="line"><span class='comment'>/*</span></td></tr>
+<tr class="codeline" data-linenumber="272"><td class="num" id="LN272">272</td><td class="line"> <span class='comment'>* Even though tedious, I switched to a 2D array for weather condition</span></td></tr>
+<tr class="codeline" data-linenumber="273"><td class="num" id="LN273">273</td><td class="line"> <span class='comment'>* strings, in order to facilitate internationalization, esp. for languages</span></td></tr>
+<tr class="codeline" data-linenumber="274"><td class="num" id="LN274">274</td><td class="line"> <span class='comment'>* with genders.</span></td></tr>
+<tr class="codeline" data-linenumber="275"><td class="num" id="LN275">275</td><td class="line"> <span class='comment'>*/</span></td></tr>
+<tr class="codeline" data-linenumber="276"><td class="num" id="LN276">276</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="277"><td class="num" id="LN277">277</td><td class="line"><span class='comment'>/*</span></td></tr>
+<tr class="codeline" data-linenumber="278"><td class="num" id="LN278">278</td><td class="line"> <span class='comment'>* Almost all reportable combinations listed in</span></td></tr>
+<tr class="codeline" data-linenumber="279"><td class="num" id="LN279">279</td><td class="line"> <span class='comment'>* http://www.crh.noaa.gov/arx/wx.tbl.php are entered below, except those</span></td></tr>
+<tr class="codeline" data-linenumber="280"><td class="num" id="LN280">280</td><td class="line"> <span class='comment'>* having 2 qualifiers mixed together [such as "Blowing snow in vicinity"</span></td></tr>
+<tr class="codeline" data-linenumber="281"><td class="num" id="LN281">281</td><td class="line"> <span class='comment'>* (VCBLSN), "Thunderstorm in vicinity" (VCTS), etc].</span></td></tr>
+<tr class="codeline" data-linenumber="282"><td class="num" id="LN282">282</td><td class="line"> <span class='comment'>* Combinations that are not possible are filled in with "??".</span></td></tr>
+<tr class="codeline" data-linenumber="283"><td class="num" id="LN283">283</td><td class="line"> <span class='comment'>* Some other exceptions not handled yet, such as "SN BLSN" which has</span></td></tr>
+<tr class="codeline" data-linenumber="284"><td class="num" id="LN284">284</td><td class="line"> <span class='comment'>* special meaning.</span></td></tr>
+<tr class="codeline" data-linenumber="285"><td class="num" id="LN285">285</td><td class="line"> <span class='comment'>*/</span></td></tr>
+<tr class="codeline" data-linenumber="286"><td class="num" id="LN286">286</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="287"><td class="num" id="LN287">287</td><td class="line"><span class='comment'>/*</span></td></tr>
+<tr class="codeline" data-linenumber="288"><td class="num" id="LN288">288</td><td class="line"> <span class='comment'>* Note, magic numbers, when you change the size here, make sure to change</span></td></tr>
+<tr class="codeline" data-linenumber="289"><td class="num" id="LN289">289</td><td class="line"> <span class='comment'>* the below function so that new values are recognized</span></td></tr>
+<tr class="codeline" data-linenumber="290"><td class="num" id="LN290">290</td><td class="line"> <span class='comment'>*/</span></td></tr>
+<tr class="codeline" data-linenumber="291"><td class="num" id="LN291">291</td><td class="line"><span class='comment'>/* NONE VICINITY LIGHT MODERATE HEAVY SHALLOW PATCHES PARTIAL THUNDERSTORM BLOWING SHOWERS DRIFTING FREEZING */</span></td></tr>
+<tr class="codeline" data-linenumber="292"><td class="num" id="LN292">292</td><td class="line"><span class='comment'>/* *******************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/</span></td></tr>
+<tr class="codeline" data-linenumber="293"><td class="num" id="LN293">293</td><td class="line"><span class='keyword'>static</span> <span class='keyword'>const</span> gchar *conditions_str[24][13] = {</td></tr>
+<tr class="codeline" data-linenumber="294"><td class="num" id="LN294">294</td><td class="line"><span class='comment'>/* Translators: If you want to know what "blowing" "shallow" "partial"</span></td></tr>
+<tr class="codeline" data-linenumber="295"><td class="num" id="LN295">295</td><td class="line"> <span class='comment'>* etc means, you can go to http://www.weather.com/glossary/ and</span></td></tr>
+<tr class="codeline" data-linenumber="296"><td class="num" id="LN296">296</td><td class="line"> <span class='comment'>* http://www.crh.noaa.gov/arx/wx.tbl.php */</span></td></tr>
+<tr class="codeline" data-linenumber="297"><td class="num" id="LN297">297</td><td class="line"> <span class='comment'>/* NONE */</span> {<span class='string_literal'>"??"</span>, <span class='string_literal'>"??"</span>, <span class='string_literal'>"??"</span>, <span class='string_literal'>"??"</span>, <span class='string_literal'>"??"</span>, <span class='string_literal'>"??"</span>, <span class='string_literal'>"??"</span>, <span class='string_literal'>"??"</span>, <span class='macro'>N_(<span class='string_literal'>"Thunderstorm"</span>)<span class='macro_popup'>("Thunderstorm")</span></span>, <span class='string_literal'>"??"</span>, <span class='string_literal'>"??"</span>, <span class='string_literal'>"??"</span>, <span class='string_literal'>"??"</span> },</td></tr>
+<tr class="codeline" data-linenumber="298"><td class="num" id="LN298">298</td><td class="line"> <span class='comment'>/* DRIZZLE */</span> {<span class='macro'>N_(<span class='string_literal'>"Drizzle"</span>)<span class='macro_popup'>("Drizzle")</span></span>, <span class='string_literal'>"??"</span>, <span class='macro'>N_(<span class='string_literal'>"Light drizzle"</span>)<span class='macro_popup'>("Light drizzle")</span></span>, <span class='macro'>N_(<span class='string_literal'>"Moderate drizzle"</span>)<span class='macro_popup'>("Moderate drizzle")</span></span>, <span class='macro'>N_(<span class='string_literal'>"Heavy drizzle"</span>)<span class='macro_popup'>("Heavy drizzle")</span></span>, <span class='string_literal'>"??"</span>, <span class='string_literal'>"??"</span>, <span class='string_literal'>"??"</span>, <span class='string_literal'>"??"</span>, <span class='string_literal'>"??"</span>, <span class='string_literal'>"??"</span>, <span class='string_literal'>"??"</span>, <span class='macro'>N_(<span class='string_literal'>"Freezing drizzle"</span>)<span class='macro_popup'>("Freezing drizzle")</span></span> },</td></tr>
+<tr class="codeline" data-linenumber="299"><td class="num" id="LN299">299</td><td class="line"> <span class='comment'>/* RAIN */</span> {<span class='macro'>N_(<span class='string_literal'>"Rain"</span>)<span class='macro_popup'>("Rain")</span></span>, <span class='string_literal'>"??"</span>, <span class='macro'>N_(<span class='string_literal'>"Light rain"</span>)<span class='macro_popup'>("Light rain")</span></span>, <span class='macro'>N_(<span class='string_literal'>"Moderate rain"</span>)<span class='macro_popup'>("Moderate rain")</span></span>, <span class='macro'>N_(<span class='string_literal'>"Heavy rain"</span>)<span class='macro_popup'>("Heavy rain")</span></span>, <span class='string_literal'>"??"</span>, <span class='string_literal'>"??"</span>, <span class='string_literal'>"??"</span>, <span class='macro'>N_(<span class='string_literal'>"Thunderstorm"</span>)<span class='macro_popup'>("Thunderstorm")</span></span>, <span class='string_literal'>"??"</span>, <span class='macro'>N_(<span class='string_literal'>"Rain showers"</span>)<span class='macro_popup'>("Rain showers")</span></span>, <span class='string_literal'>"??"</span>, <span class='macro'>N_(<span class='string_literal'>"Freezing rain"</span>)<span class='macro_popup'>("Freezing rain")</span></span> },</td></tr>
+<tr class="codeline" data-linenumber="300"><td class="num" id="LN300">300</td><td class="line"> <span class='comment'>/* SNOW */</span> {<span class='macro'>N_(<span class='string_literal'>"Snow"</span>)<span class='macro_popup'>("Snow")</span></span>, <span class='string_literal'>"??"</span>, <span class='macro'>N_(<span class='string_literal'>"Light snow"</span>)<span class='macro_popup'>("Light snow")</span></span>, <span class='macro'>N_(<span class='string_literal'>"Moderate snow"</span>)<span class='macro_popup'>("Moderate snow")</span></span>, <span class='macro'>N_(<span class='string_literal'>"Heavy snow"</span>)<span class='macro_popup'>("Heavy snow")</span></span>, <span class='string_literal'>"??"</span>, <span class='string_literal'>"??"</span>, <span class='string_literal'>"??"</span>, <span class='macro'>N_(<span class='string_literal'>"Snowstorm"</span>)<span class='macro_popup'>("Snowstorm")</span></span>, <span class='macro'>N_(<span class='string_literal'>"Blowing snowfall"</span>)<span class='macro_popup'>("Blowing snowfall")</span></span>, <span class='macro'>N_(<span class='string_literal'>"Snow showers"</span>)<span class='macro_popup'>("Snow showers")</span></span>, <span class='macro'>N_(<span class='string_literal'>"Drifting snow"</span>)<span class='macro_popup'>("Drifting snow")</span></span>, <span class='string_literal'>"??"</span> },</td></tr>
+<tr class="codeline" data-linenumber="301"><td class="num" id="LN301">301</td><td class="line"> <span class='comment'>/* SNOW_GRAINS */</span> {<span class='macro'>N_(<span class='string_literal'>"Snow grains"</span>)<span class='macro_popup'>("Snow grains")</span></span>, <span class='string_literal'>"??"</span>, <span class='macro'>N_(<span class='string_literal'>"Light snow grains"</span>)<span class='macro_popup'>("Light snow grains")</span></span>, <span class='macro'>N_(<span class='string_literal'>"Moderate snow grains"</span>)<span class='macro_popup'>("Moderate snow grains")</span></span>, <span class='macro'>N_(<span class='string_literal'>"Heavy snow grains"</span>)<span class='macro_popup'>("Heavy snow grains")</span></span>, <span class='string_literal'>"??"</span>, <span class='string_literal'>"??"</span>, <span class='string_literal'>"??"</span>, <span class='string_literal'>"??"</span>, <span class='string_literal'>"??"</span>, <span class='string_literal'>"??"</span>, <span class='string_literal'>"??"</span>, <span class='string_literal'>"??"</span> },</td></tr>
+<tr class="codeline" data-linenumber="302"><td class="num" id="LN302">302</td><td class="line"> <span class='comment'>/* ICE_CRYSTALS */</span> {<span class='macro'>N_(<span class='string_literal'>"Ice crystals"</span>)<span class='macro_popup'>("Ice crystals")</span></span>, <span class='string_literal'>"??"</span>, <span class='string_literal'>"??"</span>, <span class='macro'>N_(<span class='string_literal'>"Ice crystals"</span>)<span class='macro_popup'>("Ice crystals")</span></span>, <span class='string_literal'>"??"</span>, <span class='string_literal'>"??"</span>, <span class='string_literal'>"??"</span>, <span class='string_literal'>"??"</span>, <span class='string_literal'>"??"</span>, <span class='string_literal'>"??"</span>, <span class='string_literal'>"??"</span>, <span class='string_literal'>"??"</span>, <span class='string_literal'>"??"</span> },</td></tr>
+<tr class="codeline" data-linenumber="303"><td class="num" id="LN303">303</td><td class="line"> <span class='comment'>/* ICE_PELLETS */</span> {<span class='macro'>N_(<span class='string_literal'>"Ice pellets"</span>)<span class='macro_popup'>("Ice pellets")</span></span>, <span class='string_literal'>"??"</span>, <span class='macro'>N_(<span class='string_literal'>"Few ice pellets"</span>)<span class='macro_popup'>("Few ice pellets")</span></span>, <span class='macro'>N_(<span class='string_literal'>"Moderate ice pellets"</span>)<span class='macro_popup'>("Moderate ice pellets")</span></span>, <span class='macro'>N_(<span class='string_literal'>"Heavy ice pellets"</span>)<span class='macro_popup'>("Heavy ice pellets")</span></span>, <span class='string_literal'>"??"</span>, <span class='string_literal'>"??"</span>, <span class='string_literal'>"??"</span>, <span class='macro'>N_(<span class='string_literal'>"Ice pellet storm"</span>)<span class='macro_popup'>("Ice pellet storm")</span></span>, <span class='string_literal'>"??"</span>, <span class='macro'>N_(<span class='string_literal'>"Showers of ice pellets"</span>)<span class='macro_popup'>("Showers of ice pellets")</span></span>, <span class='string_literal'>"??"</span>, <span class='string_literal'>"??"</span> },</td></tr>
+<tr class="codeline" data-linenumber="304"><td class="num" id="LN304">304</td><td class="line"> <span class='comment'>/* HAIL */</span> {<span class='macro'>N_(<span class='string_literal'>"Hail"</span>)<span class='macro_popup'>("Hail")</span></span>, <span class='string_literal'>"??"</span>, <span class='string_literal'>"??"</span>, <span class='macro'>N_(<span class='string_literal'>"Hail"</span>)<span class='macro_popup'>("Hail")</span></span>, <span class='string_literal'>"??"</span>, <span class='string_literal'>"??"</span>, <span class='string_literal'>"??"</span>, <span class='string_literal'>"??"</span>, <span class='macro'>N_(<span class='string_literal'>"Hailstorm"</span>)<span class='macro_popup'>("Hailstorm")</span></span>, <span class='string_literal'>"??"</span>, <span class='macro'>N_(<span class='string_literal'>"Hail showers"</span>)<span class='macro_popup'>("Hail showers")</span></span>, <span class='string_literal'>"??"</span>, <span class='string_literal'>"??"</span>, },</td></tr>
+<tr class="codeline" data-linenumber="305"><td class="num" id="LN305">305</td><td class="line"> <span class='comment'>/* SMALL_HAIL */</span> {<span class='macro'>N_(<span class='string_literal'>"Small hail"</span>)<span class='macro_popup'>("Small hail")</span></span>, <span class='string_literal'>"??"</span>, <span class='string_literal'>"??"</span>, <span class='macro'>N_(<span class='string_literal'>"Small hail"</span>)<span class='macro_popup'>("Small hail")</span></span>, <span class='string_literal'>"??"</span>, <span class='string_literal'>"??"</span>, <span class='string_literal'>"??"</span>, <span class='string_literal'>"??"</span>, <span class='macro'>N_(<span class='string_literal'>"Small hailstorm"</span>)<span class='macro_popup'>("Small hailstorm")</span></span>, <span class='string_literal'>"??"</span>, <span class='macro'>N_(<span class='string_literal'>"Showers of small hail"</span>)<span class='macro_popup'>("Showers of small hail")</span></span>, <span class='string_literal'>"??"</span>, <span class='string_literal'>"??"</span> },</td></tr>
+<tr class="codeline" data-linenumber="306"><td class="num" id="LN306">306</td><td class="line"> <span class='comment'>/* PRECIPITATION */</span> {<span class='macro'>N_(<span class='string_literal'>"Unknown precipitation"</span>)<span class='macro_popup'>("Unknown precipitation")</span></span>, <span class='string_literal'>"??"</span>, <span class='string_literal'>"??"</span>, <span class='string_literal'>"??"</span>, <span class='string_literal'>"??"</span>, <span class='string_literal'>"??"</span>, <span class='string_literal'>"??"</span>, <span class='string_literal'>"??"</span>, <span class='string_literal'>"??"</span>, <span class='string_literal'>"??"</span>, <span class='string_literal'>"??"</span>, <span class='string_literal'>"??"</span>, <span class='string_literal'>"??"</span> },</td></tr>
+<tr class="codeline" data-linenumber="307"><td class="num" id="LN307">307</td><td class="line"> <span class='comment'>/* MIST */</span> {<span class='macro'>N_(<span class='string_literal'>"Mist"</span>)<span class='macro_popup'>("Mist")</span></span>, <span class='string_literal'>"??"</span>, <span class='string_literal'>"??"</span>, <span class='macro'>N_(<span class='string_literal'>"Mist"</span>)<span class='macro_popup'>("Mist")</span></span>, <span class='string_literal'>"??"</span>, <span class='string_literal'>"??"</span>, <span class='string_literal'>"??"</span>, <span class='string_literal'>"??"</span>, <span class='string_literal'>"??"</span>, <span class='string_literal'>"??"</span>, <span class='string_literal'>"??"</span>, <span class='string_literal'>"??"</span>, <span class='string_literal'>"??"</span> },</td></tr>
+<tr class="codeline" data-linenumber="308"><td class="num" id="LN308">308</td><td class="line"> <span class='comment'>/* FOG */</span> {<span class='macro'>N_(<span class='string_literal'>"Fog"</span>)<span class='macro_popup'>("Fog")</span></span>, <span class='macro'>N_(<span class='string_literal'>"Fog in the vicinity"</span>)<span class='macro_popup'>("Fog in the vicinity")</span></span> , <span class='string_literal'>"??"</span>, <span class='macro'>N_(<span class='string_literal'>"Fog"</span>)<span class='macro_popup'>("Fog")</span></span>, <span class='string_literal'>"??"</span>, <span class='macro'>N_(<span class='string_literal'>"Shallow fog"</span>)<span class='macro_popup'>("Shallow fog")</span></span>, <span class='macro'>N_(<span class='string_literal'>"Patches of fog"</span>)<span class='macro_popup'>("Patches of fog")</span></span>, <span class='macro'>N_(<span class='string_literal'>"Partial fog"</span>)<span class='macro_popup'>("Partial fog")</span></span>, <span class='string_literal'>"??"</span>, <span class='string_literal'>"??"</span>, <span class='string_literal'>"??"</span>, <span class='string_literal'>"??"</span>, <span class='macro'>N_(<span class='string_literal'>"Freezing fog"</span>)<span class='macro_popup'>("Freezing fog")</span></span> },</td></tr>
+<tr class="codeline" data-linenumber="309"><td class="num" id="LN309">309</td><td class="line"> <span class='comment'>/* SMOKE */</span> {<span class='macro'>N_(<span class='string_literal'>"Smoke"</span>)<span class='macro_popup'>("Smoke")</span></span>, <span class='string_literal'>"??"</span>, <span class='string_literal'>"??"</span>, <span class='macro'>N_(<span class='string_literal'>"Smoke"</span>)<span class='macro_popup'>("Smoke")</span></span>, <span class='string_literal'>"??"</span>, <span class='string_literal'>"??"</span>, <span class='string_literal'>"??"</span>, <span class='string_literal'>"??"</span>, <span class='string_literal'>"??"</span>, <span class='string_literal'>"??"</span>, <span class='string_literal'>"??"</span>, <span class='string_literal'>"??"</span>, <span class='string_literal'>"??"</span> },</td></tr>
+<tr class="codeline" data-linenumber="310"><td class="num" id="LN310">310</td><td class="line"> <span class='comment'>/* VOLCANIC_ASH */</span> {<span class='macro'>N_(<span class='string_literal'>"Volcanic ash"</span>)<span class='macro_popup'>("Volcanic ash")</span></span>, <span class='string_literal'>"??"</span>, <span class='string_literal'>"??"</span>, <span class='macro'>N_(<span class='string_literal'>"Volcanic ash"</span>)<span class='macro_popup'>("Volcanic ash")</span></span>, <span class='string_literal'>"??"</span>, <span class='string_literal'>"??"</span>, <span class='string_literal'>"??"</span>, <span class='string_literal'>"??"</span>, <span class='string_literal'>"??"</span>, <span class='string_literal'>"??"</span>, <span class='string_literal'>"??"</span>, <span class='string_literal'>"??"</span>, <span class='string_literal'>"??"</span> },</td></tr>
+<tr class="codeline" data-linenumber="311"><td class="num" id="LN311">311</td><td class="line"> <span class='comment'>/* SAND */</span> {<span class='macro'>N_(<span class='string_literal'>"Sand"</span>)<span class='macro_popup'>("Sand")</span></span>, <span class='string_literal'>"??"</span>, <span class='string_literal'>"??"</span>, <span class='macro'>N_(<span class='string_literal'>"Sand"</span>)<span class='macro_popup'>("Sand")</span></span>, <span class='string_literal'>"??"</span>, <span class='string_literal'>"??"</span>, <span class='string_literal'>"??"</span>, <span class='string_literal'>"??"</span>, <span class='string_literal'>"??"</span>, <span class='macro'>N_(<span class='string_literal'>"Blowing sand"</span>)<span class='macro_popup'>("Blowing sand")</span></span>, <span class='string_literal'>""</span>, <span class='macro'>N_(<span class='string_literal'>"Drifting sand"</span>)<span class='macro_popup'>("Drifting sand")</span></span>, <span class='string_literal'>"??"</span> },</td></tr>
+<tr class="codeline" data-linenumber="312"><td class="num" id="LN312">312</td><td class="line"> <span class='comment'>/* HAZE */</span> {<span class='macro'>N_(<span class='string_literal'>"Haze"</span>)<span class='macro_popup'>("Haze")</span></span>, <span class='string_literal'>"??"</span>, <span class='string_literal'>"??"</span>, <span class='macro'>N_(<span class='string_literal'>"Haze"</span>)<span class='macro_popup'>("Haze")</span></span>, <span class='string_literal'>"??"</span>, <span class='string_literal'>"??"</span>, <span class='string_literal'>"??"</span>, <span class='string_literal'>"??"</span>, <span class='string_literal'>"??"</span>, <span class='string_literal'>"??"</span>, <span class='string_literal'>"??"</span>, <span class='string_literal'>"??"</span>, <span class='string_literal'>"??"</span> },</td></tr>
+<tr class="codeline" data-linenumber="313"><td class="num" id="LN313">313</td><td class="line"> <span class='comment'>/* SPRAY */</span> {<span class='string_literal'>"??"</span>, <span class='string_literal'>"??"</span>, <span class='string_literal'>"??"</span>, <span class='string_literal'>"??"</span>, <span class='string_literal'>"??"</span>, <span class='string_literal'>"??"</span>, <span class='string_literal'>"??"</span>, <span class='string_literal'>"??"</span>, <span class='string_literal'>"??"</span>, <span class='macro'>N_(<span class='string_literal'>"Blowing sprays"</span>)<span class='macro_popup'>("Blowing sprays")</span></span>, <span class='string_literal'>"??"</span>, <span class='string_literal'>"??"</span>, <span class='string_literal'>"??"</span> },</td></tr>
+<tr class="codeline" data-linenumber="314"><td class="num" id="LN314">314</td><td class="line"> <span class='comment'>/* DUST */</span> {<span class='macro'>N_(<span class='string_literal'>"Dust"</span>)<span class='macro_popup'>("Dust")</span></span>, <span class='string_literal'>"??"</span>, <span class='string_literal'>"??"</span>, <span class='macro'>N_(<span class='string_literal'>"Dust"</span>)<span class='macro_popup'>("Dust")</span></span>, <span class='string_literal'>"??"</span>, <span class='string_literal'>"??"</span>, <span class='string_literal'>"??"</span>, <span class='string_literal'>"??"</span>, <span class='string_literal'>"??"</span>, <span class='macro'>N_(<span class='string_literal'>"Blowing dust"</span>)<span class='macro_popup'>("Blowing dust")</span></span>, <span class='string_literal'>"??"</span>, <span class='macro'>N_(<span class='string_literal'>"Drifting dust"</span>)<span class='macro_popup'>("Drifting dust")</span></span>, <span class='string_literal'>"??"</span> },</td></tr>
+<tr class="codeline" data-linenumber="315"><td class="num" id="LN315">315</td><td class="line"> <span class='comment'>/* SQUALL */</span> {<span class='macro'>N_(<span class='string_literal'>"Squall"</span>)<span class='macro_popup'>("Squall")</span></span>, <span class='string_literal'>"??"</span>, <span class='string_literal'>"??"</span>, <span class='macro'>N_(<span class='string_literal'>"Squall"</span>)<span class='macro_popup'>("Squall")</span></span>, <span class='string_literal'>"??"</span>, <span class='string_literal'>"??"</span>, <span class='string_literal'>"??"</span>, <span class='string_literal'>"??"</span>, <span class='string_literal'>"??"</span>, <span class='string_literal'>"??"</span>, <span class='string_literal'>"??"</span>, <span class='string_literal'>"??"</span>, <span class='string_literal'>"??"</span> },</td></tr>
+<tr class="codeline" data-linenumber="316"><td class="num" id="LN316">316</td><td class="line"> <span class='comment'>/* SANDSTORM */</span> {<span class='macro'>N_(<span class='string_literal'>"Sandstorm"</span>)<span class='macro_popup'>("Sandstorm")</span></span>, <span class='macro'>N_(<span class='string_literal'>"Sandstorm in the vicinity"</span>)<span class='macro_popup'>("Sandstorm in the vicinity")</span></span> , <span class='string_literal'>"??"</span>, <span class='macro'>N_(<span class='string_literal'>"Sandstorm"</span>)<span class='macro_popup'>("Sandstorm")</span></span>, <span class='macro'>N_(<span class='string_literal'>"Heavy sandstorm"</span>)<span class='macro_popup'>("Heavy sandstorm")</span></span>, <span class='string_literal'>"??"</span>, <span class='string_literal'>"??"</span>, <span class='string_literal'>"??"</span>, <span class='string_literal'>"??"</span>, <span class='string_literal'>"??"</span>, <span class='string_literal'>"??"</span>, <span class='string_literal'>"??"</span>, <span class='string_literal'>"??"</span> },</td></tr>
+<tr class="codeline" data-linenumber="317"><td class="num" id="LN317">317</td><td class="line"> <span class='comment'>/* DUSTSTORM */</span> {<span class='macro'>N_(<span class='string_literal'>"Duststorm"</span>)<span class='macro_popup'>("Duststorm")</span></span>, <span class='macro'>N_(<span class='string_literal'>"Duststorm in the vicinity"</span>)<span class='macro_popup'>("Duststorm in the vicinity")</span></span> , <span class='string_literal'>"??"</span>, <span class='macro'>N_(<span class='string_literal'>"Duststorm"</span>)<span class='macro_popup'>("Duststorm")</span></span>, <span class='macro'>N_(<span class='string_literal'>"Heavy duststorm"</span>)<span class='macro_popup'>("Heavy duststorm")</span></span>, <span class='string_literal'>"??"</span>, <span class='string_literal'>"??"</span>, <span class='string_literal'>"??"</span>, <span class='string_literal'>"??"</span>, <span class='string_literal'>"??"</span>, <span class='string_literal'>"??"</span>, <span class='string_literal'>"??"</span>, <span class='string_literal'>"??"</span> },</td></tr>
+<tr class="codeline" data-linenumber="318"><td class="num" id="LN318">318</td><td class="line"> <span class='comment'>/* FUNNEL_CLOUD */</span> {<span class='macro'>N_(<span class='string_literal'>"Funnel cloud"</span>)<span class='macro_popup'>("Funnel cloud")</span></span>, <span class='string_literal'>"??"</span>, <span class='string_literal'>"??"</span>, <span class='string_literal'>"??"</span>, <span class='string_literal'>"??"</span>, <span class='string_literal'>"??"</span>, <span class='string_literal'>"??"</span>, <span class='string_literal'>"??"</span>, <span class='string_literal'>"??"</span>, <span class='string_literal'>"??"</span>, <span class='string_literal'>"??"</span>, <span class='string_literal'>"??"</span>, <span class='string_literal'>"??"</span> },</td></tr>
+<tr class="codeline" data-linenumber="319"><td class="num" id="LN319">319</td><td class="line"> <span class='comment'>/* TORNADO */</span> {<span class='macro'>N_(<span class='string_literal'>"Tornado"</span>)<span class='macro_popup'>("Tornado")</span></span>, <span class='string_literal'>"??"</span>, <span class='string_literal'>"??"</span>, <span class='string_literal'>"??"</span>, <span class='string_literal'>"??"</span>, <span class='string_literal'>"??"</span>, <span class='string_literal'>"??"</span>, <span class='string_literal'>"??"</span>, <span class='string_literal'>"??"</span>, <span class='string_literal'>"??"</span>, <span class='string_literal'>"??"</span>, <span class='string_literal'>"??"</span>, <span class='string_literal'>"??"</span> },</td></tr>
+<tr class="codeline" data-linenumber="320"><td class="num" id="LN320">320</td><td class="line"> <span class='comment'>/* DUST_WHIRLS */</span> {<span class='macro'>N_(<span class='string_literal'>"Dust whirls"</span>)<span class='macro_popup'>("Dust whirls")</span></span>, <span class='macro'>N_(<span class='string_literal'>"Dust whirls in the vicinity"</span>)<span class='macro_popup'>("Dust whirls in the vicinity")</span></span> , <span class='string_literal'>"??"</span>, <span class='macro'>N_(<span class='string_literal'>"Dust whirls"</span>)<span class='macro_popup'>("Dust whirls")</span></span>, <span class='string_literal'>"??"</span>, <span class='string_literal'>"??"</span>, <span class='string_literal'>"??"</span>, <span class='string_literal'>"??"</span>, <span class='string_literal'>"??"</span>, <span class='string_literal'>"??"</span>, <span class='string_literal'>"??"</span>, <span class='string_literal'>"??"</span>, <span class='string_literal'>"??"</span> }</td></tr>
+<tr class="codeline" data-linenumber="321"><td class="num" id="LN321">321</td><td class="line">};</td></tr>
+<tr class="codeline" data-linenumber="322"><td class="num" id="LN322">322</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="323"><td class="num" id="LN323">323</td><td class="line"><span class='keyword'>const</span> gchar *</td></tr>
+<tr class="codeline" data-linenumber="324"><td class="num" id="LN324">324</td><td class="line">weather_conditions_string (WeatherConditions cond)</td></tr>
+<tr class="codeline" data-linenumber="325"><td class="num" id="LN325">325</td><td class="line">{</td></tr>
+<tr class="codeline" data-linenumber="326"><td class="num" id="LN326">326</td><td class="line"> <span class='keyword'>const</span> gchar *str;</td></tr>
+<tr class="codeline" data-linenumber="327"><td class="num" id="LN327">327</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="328"><td class="num" id="LN328">328</td><td class="line"> <span class='keyword'>if</span> (!cond.significant) {</td></tr>
+<tr class="codeline" data-linenumber="329"><td class="num" id="LN329">329</td><td class="line"> <span class='keyword'>return</span> <span class='string_literal'>"-"</span>;</td></tr>
+<tr class="codeline" data-linenumber="330"><td class="num" id="LN330">330</td><td class="line"> } <span class='keyword'>else</span> {</td></tr>
+<tr class="codeline" data-linenumber="331"><td class="num" id="LN331">331</td><td class="line"> <span class='keyword'>if</span> (cond.phenomenon &gt; PHENOMENON_INVALID &amp;&amp;</td></tr>
+<tr class="codeline" data-linenumber="332"><td class="num" id="LN332">332</td><td class="line"> cond.phenomenon &lt; PHENOMENON_LAST &amp;&amp;</td></tr>
+<tr class="codeline" data-linenumber="333"><td class="num" id="LN333">333</td><td class="line"> cond.qualifier &gt; QUALIFIER_INVALID &amp;&amp;</td></tr>
+<tr class="codeline" data-linenumber="334"><td class="num" id="LN334">334</td><td class="line"> cond.qualifier &lt; QUALIFIER_LAST)</td></tr>
+<tr class="codeline" data-linenumber="335"><td class="num" id="LN335">335</td><td class="line"> str = <span class='macro'>_(conditions_str[(<span class='keyword'>int</span>)cond.phenomenon][(<span class='keyword'>int</span>)cond.qualifier])<span class='macro_popup'>(mateweather_gettext (conditions_str[(int)cond.phenomenon][(int<br>)cond.qualifier]))</span></span>;</td></tr>
+<tr class="codeline" data-linenumber="336"><td class="num" id="LN336">336</td><td class="line"> <span class='keyword'>else</span></td></tr>
+<tr class="codeline" data-linenumber="337"><td class="num" id="LN337">337</td><td class="line"> str = <span class='macro'>_(<span class='string_literal'>"Invalid"</span>)<span class='macro_popup'>(mateweather_gettext ("Invalid"))</span></span>;</td></tr>
+<tr class="codeline" data-linenumber="338"><td class="num" id="LN338">338</td><td class="line"> <span class='keyword'>return</span> (strlen (str) &gt; 0) ? str : <span class='string_literal'>"-"</span>;</td></tr>
+<tr class="codeline" data-linenumber="339"><td class="num" id="LN339">339</td><td class="line"> }</td></tr>
+<tr class="codeline" data-linenumber="340"><td class="num" id="LN340">340</td><td class="line">}</td></tr>
+<tr class="codeline" data-linenumber="341"><td class="num" id="LN341">341</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="342"><td class="num" id="LN342">342</td><td class="line"><span class='comment'>/* Locals turned global to facilitate asynchronous HTTP requests */</span></td></tr>
+<tr class="codeline" data-linenumber="343"><td class="num" id="LN343">343</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="344"><td class="num" id="LN344">344</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="345"><td class="num" id="LN345">345</td><td class="line">gboolean</td></tr>
+<tr class="codeline" data-linenumber="346"><td class="num" id="LN346">346</td><td class="line">requests_init (WeatherInfo *info)</td></tr>
+<tr class="codeline" data-linenumber="347"><td class="num" id="LN347">347</td><td class="line">{</td></tr>
+<tr class="codeline" data-linenumber="348"><td class="num" id="LN348">348</td><td class="line"> <span class='keyword'>if</span> (info-&gt;requests_pending)</td></tr>
+<tr class="codeline" data-linenumber="349"><td class="num" id="LN349">349</td><td class="line"> <span class='keyword'>return</span> <span class='macro'>FALSE<span class='macro_popup'>(0)</span></span>;</td></tr>
+<tr class="codeline" data-linenumber="350"><td class="num" id="LN350">350</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="351"><td class="num" id="LN351">351</td><td class="line"> <span class='keyword'>return</span> <span class='macro'>TRUE<span class='macro_popup'>(!(0))</span></span>;</td></tr>
+<tr class="codeline" data-linenumber="352"><td class="num" id="LN352">352</td><td class="line">}</td></tr>
+<tr class="codeline" data-linenumber="353"><td class="num" id="LN353">353</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="354"><td class="num" id="LN354">354</td><td class="line"><span class='keyword'>void</span> request_done (WeatherInfo *info, gboolean ok)</td></tr>
+<tr class="codeline" data-linenumber="355"><td class="num" id="LN355">355</td><td class="line">{</td></tr>
+<tr class="codeline" data-linenumber="356"><td class="num" id="LN356">356</td><td class="line"> <span class='keyword'>if</span> (ok) {</td></tr>
+<tr class="codeline" data-linenumber="357"><td class="num" id="LN357">357</td><td class="line"> (<span class='keyword'>void</span>) calc_sun (info);</td></tr>
+<tr class="codeline" data-linenumber="358"><td class="num" id="LN358">358</td><td class="line"> info-&gt;moonValid = info-&gt;valid &amp;&amp; calc_moon (info);</td></tr>
+<tr class="codeline" data-linenumber="359"><td class="num" id="LN359">359</td><td class="line"> }</td></tr>
+<tr class="codeline" data-linenumber="360"><td class="num" id="LN360">360</td><td class="line"> <span class='keyword'>if</span> (!--info-&gt;requests_pending)</td></tr>
+<tr class="codeline" data-linenumber="361"><td class="num" id="LN361">361</td><td class="line"> info-&gt;finish_cb (info, info-&gt;cb_data);</td></tr>
+<tr class="codeline" data-linenumber="362"><td class="num" id="LN362">362</td><td class="line">}</td></tr>
+<tr class="codeline" data-linenumber="363"><td class="num" id="LN363">363</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="364"><td class="num" id="LN364">364</td><td class="line"><span class='comment'>/* it's OK to pass in NULL */</span></td></tr>
+<tr class="codeline" data-linenumber="365"><td class="num" id="LN365">365</td><td class="line"><span class='keyword'>void</span></td></tr>
+<tr class="codeline" data-linenumber="366"><td class="num" id="LN366">366</td><td class="line">free_forecast_list (WeatherInfo *info)</td></tr>
+<tr class="codeline" data-linenumber="367"><td class="num" id="LN367">367</td><td class="line">{</td></tr>
+<tr class="codeline" data-linenumber="368"><td class="num" id="LN368">368</td><td class="line"> GSList *p;</td></tr>
+<tr class="codeline" data-linenumber="369"><td class="num" id="LN369">369</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="370"><td class="num" id="LN370">370</td><td class="line"> <span class='keyword'>if</span> (!info)</td></tr>
+<tr class="codeline" data-linenumber="371"><td class="num" id="LN371">371</td><td class="line"> <span class='keyword'>return</span>;</td></tr>
+<tr class="codeline" data-linenumber="372"><td class="num" id="LN372">372</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="373"><td class="num" id="LN373">373</td><td class="line"> <span class='keyword'>for</span> (p = info-&gt;forecast_list; p; p = p-&gt;next)</td></tr>
+<tr class="codeline" data-linenumber="374"><td class="num" id="LN374">374</td><td class="line"> weather_info_free (p-&gt;data);</td></tr>
+<tr class="codeline" data-linenumber="375"><td class="num" id="LN375">375</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="376"><td class="num" id="LN376">376</td><td class="line"> <span class='keyword'>if</span> (info-&gt;forecast_list) {</td></tr>
+<tr class="codeline" data-linenumber="377"><td class="num" id="LN377">377</td><td class="line"> g_slist_free (info-&gt;forecast_list);</td></tr>
+<tr class="codeline" data-linenumber="378"><td class="num" id="LN378">378</td><td class="line"> info-&gt;forecast_list = <span class='macro'>NULL<span class='macro_popup'>((void*)0)</span></span>;</td></tr>
+<tr class="codeline" data-linenumber="379"><td class="num" id="LN379">379</td><td class="line"> }</td></tr>
+<tr class="codeline" data-linenumber="380"><td class="num" id="LN380">380</td><td class="line">}</td></tr>
+<tr class="codeline" data-linenumber="381"><td class="num" id="LN381">381</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="382"><td class="num" id="LN382">382</td><td class="line"><span class='comment'>/* Relative humidity computation - thanks to &lt;[email protected]&gt; */</span></td></tr>
+<tr class="codeline" data-linenumber="383"><td class="num" id="LN383">383</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="384"><td class="num" id="LN384">384</td><td class="line"><span class='keyword'>static</span> <span class='keyword'>inline</span> gdouble</td></tr>
+<tr class="codeline" data-linenumber="385"><td class="num" id="LN385">385</td><td class="line">calc_humidity (gdouble temp, gdouble dewp)</td></tr>
+<tr class="codeline" data-linenumber="386"><td class="num" id="LN386">386</td><td class="line">{</td></tr>
+<tr class="codeline" data-linenumber="387"><td class="num" id="LN387">387</td><td class="line"> gdouble esat, esurf;</td></tr>
+<tr class="codeline" data-linenumber="388"><td class="num" id="LN388">388</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="389"><td class="num" id="LN389">389</td><td class="line"> <span class='keyword'>if</span> (temp &gt; -500.0 &amp;&amp; dewp &gt; -500.0) {</td></tr>
+<tr class="codeline" data-linenumber="390"><td class="num" id="LN390">390</td><td class="line"> temp = <span class='macro'>TEMP_F_TO_C (temp)<span class='macro_popup'>(((temp) - 32.0) * (5.0/9.0))</span></span>;</td></tr>
+<tr class="codeline" data-linenumber="391"><td class="num" id="LN391">391</td><td class="line"> dewp = <span class='macro'>TEMP_F_TO_C (dewp)<span class='macro_popup'>(((dewp) - 32.0) * (5.0/9.0))</span></span>;</td></tr>
+<tr class="codeline" data-linenumber="392"><td class="num" id="LN392">392</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="393"><td class="num" id="LN393">393</td><td class="line"> esat = 6.11 * pow (10.0, (7.5 * temp) / (237.7 + temp));</td></tr>
+<tr class="codeline" data-linenumber="394"><td class="num" id="LN394">394</td><td class="line"> esurf = 6.11 * pow (10.0, (7.5 * dewp) / (237.7 + dewp));</td></tr>
+<tr class="codeline" data-linenumber="395"><td class="num" id="LN395">395</td><td class="line"> } <span class='keyword'>else</span> {</td></tr>
+<tr class="codeline" data-linenumber="396"><td class="num" id="LN396">396</td><td class="line"> esurf = -1.0;</td></tr>
+<tr class="codeline" data-linenumber="397"><td class="num" id="LN397">397</td><td class="line"> esat = 1.0;</td></tr>
+<tr class="codeline" data-linenumber="398"><td class="num" id="LN398">398</td><td class="line"> }</td></tr>
+<tr class="codeline" data-linenumber="399"><td class="num" id="LN399">399</td><td class="line"> <span class='keyword'>return</span> ((esurf/esat) * 100.0);</td></tr>
+<tr class="codeline" data-linenumber="400"><td class="num" id="LN400">400</td><td class="line">}</td></tr>
+<tr class="codeline" data-linenumber="401"><td class="num" id="LN401">401</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="402"><td class="num" id="LN402">402</td><td class="line"><span class='keyword'>static</span> <span class='keyword'>inline</span> gdouble</td></tr>
+<tr class="codeline" data-linenumber="403"><td class="num" id="LN403">403</td><td class="line">calc_apparent (WeatherInfo *info)</td></tr>
+<tr class="codeline" data-linenumber="404"><td class="num" id="LN404">404</td><td class="line">{</td></tr>
+<tr class="codeline" data-linenumber="405"><td class="num" id="LN405">405</td><td class="line"> gdouble temp = info-&gt;temp;</td></tr>
+<tr class="codeline" data-linenumber="406"><td class="num" id="LN406">406</td><td class="line"> gdouble wind = <span class='macro'>WINDSPEED_KNOTS_TO_MPH (info-&gt;windspeed)<span class='macro_popup'>((info-&gt;windspeed) * 1.150779)</span></span>;</td></tr>
+<tr class="codeline" data-linenumber="407"><td class="num" id="LN407">407</td><td class="line"> gdouble apparent = -1000.;</td></tr>
+<tr class="codeline" data-linenumber="408"><td class="num" id="LN408">408</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="409"><td class="num" id="LN409">409</td><td class="line"> <span class='comment'>/*</span></td></tr>
+<tr class="codeline" data-linenumber="410"><td class="num" id="LN410">410</td><td class="line"> <span class='comment'>* Wind chill calculations as of 01-Nov-2001</span></td></tr>
+<tr class="codeline" data-linenumber="411"><td class="num" id="LN411">411</td><td class="line"> <span class='comment'>* http://www.nws.noaa.gov/om/windchill/index.shtml</span></td></tr>
+<tr class="codeline" data-linenumber="412"><td class="num" id="LN412">412</td><td class="line"> <span class='comment'>* Some pages suggest that the formula will soon be adjusted</span></td></tr>
+<tr class="codeline" data-linenumber="413"><td class="num" id="LN413">413</td><td class="line"> <span class='comment'>* to account for solar radiation (bright sun vs cloudy sky)</span></td></tr>
+<tr class="codeline" data-linenumber="414"><td class="num" id="LN414">414</td><td class="line"> <span class='comment'>*/</span></td></tr>
+<tr class="codeline" data-linenumber="415"><td class="num" id="LN415">415</td><td class="line"> <span class='keyword'>if</span> (temp &lt;= 50.0) {</td></tr>
+<tr class="codeline" data-linenumber="416"><td class="num" id="LN416">416</td><td class="line"> <span class='keyword'>if</span> (wind &gt; 3.0) {</td></tr>
+<tr class="codeline" data-linenumber="417"><td class="num" id="LN417">417</td><td class="line"> gdouble v = pow (wind, 0.16);</td></tr>
+<tr class="codeline" data-linenumber="418"><td class="num" id="LN418">418</td><td class="line"> apparent = 35.74 + 0.6215 * temp - 35.75 * v + 0.4275 * temp * v;</td></tr>
+<tr class="codeline" data-linenumber="419"><td class="num" id="LN419">419</td><td class="line"> } <span class='keyword'>else</span> <span class='keyword'>if</span> (wind &gt;= 0.) {</td></tr>
+<tr class="codeline" data-linenumber="420"><td class="num" id="LN420">420</td><td class="line"> apparent = temp;</td></tr>
+<tr class="codeline" data-linenumber="421"><td class="num" id="LN421">421</td><td class="line"> }</td></tr>
+<tr class="codeline" data-linenumber="422"><td class="num" id="LN422">422</td><td class="line"> }</td></tr>
+<tr class="codeline" data-linenumber="423"><td class="num" id="LN423">423</td><td class="line"> <span class='comment'>/*</span></td></tr>
+<tr class="codeline" data-linenumber="424"><td class="num" id="LN424">424</td><td class="line"> <span class='comment'>* Heat index calculations:</span></td></tr>
+<tr class="codeline" data-linenumber="425"><td class="num" id="LN425">425</td><td class="line"> <span class='comment'>* http://www.srh.noaa.gov/fwd/heatindex/heat5.html</span></td></tr>
+<tr class="codeline" data-linenumber="426"><td class="num" id="LN426">426</td><td class="line"> <span class='comment'>*/</span></td></tr>
+<tr class="codeline" data-linenumber="427"><td class="num" id="LN427">427</td><td class="line"> <span class='keyword'>else</span> <span class='keyword'>if</span> (temp &gt;= 80.0) {</td></tr>
+<tr class="codeline" data-linenumber="428"><td class="num" id="LN428">428</td><td class="line"> <span class='keyword'>if</span> (info-&gt;temp &gt;= -500. &amp;&amp; info-&gt;dew &gt;= -500.) {</td></tr>
+<tr class="codeline" data-linenumber="429"><td class="num" id="LN429">429</td><td class="line"> gdouble humidity = calc_humidity (info-&gt;temp, info-&gt;dew);</td></tr>
+<tr class="codeline" data-linenumber="430"><td class="num" id="LN430">430</td><td class="line"> gdouble t2 = temp * temp;</td></tr>
+<tr class="codeline" data-linenumber="431"><td class="num" id="LN431">431</td><td class="line"> gdouble h2 = humidity * humidity;</td></tr>
+<tr class="codeline" data-linenumber="432"><td class="num" id="LN432">432</td><td class="line"> </td></tr>
+<tr class="codeline" data-linenumber="433"><td class="num" id="LN433">433</td><td class="line"><span class='directive'>#if 1</span></td></tr>
+<tr class="codeline" data-linenumber="434"><td class="num" id="LN434">434</td><td class="line"> <span class='comment'>/*</span></td></tr>
+<tr class="codeline" data-linenumber="435"><td class="num" id="LN435">435</td><td class="line"> <span class='comment'>* A really precise formula. Note that overall precision is</span></td></tr>
+<tr class="codeline" data-linenumber="436"><td class="num" id="LN436">436</td><td class="line"> <span class='comment'>* constrained by the accuracy of the instruments and that the</span></td></tr>
+<tr class="codeline" data-linenumber="437"><td class="num" id="LN437">437</td><td class="line"> <span class='comment'>* we receive the temperature and dewpoints as integers.</span></td></tr>
+<tr class="codeline" data-linenumber="438"><td class="num" id="LN438">438</td><td class="line"> <span class='comment'>*/</span></td></tr>
+<tr class="codeline" data-linenumber="439"><td class="num" id="LN439">439</td><td class="line"> gdouble t3 = t2 * temp;</td></tr>
+<tr class="codeline" data-linenumber="440"><td class="num" id="LN440">440</td><td class="line"> gdouble h3 = h2 * temp;</td></tr>
+<tr class="codeline" data-linenumbe