diff options
-rw-r--r-- | flake.lock | 22 | ||||
-rw-r--r-- | flake.nix | 1 | ||||
-rw-r--r-- | lib/libtmi8/src/kv1_parser.cpp | 2 | ||||
-rw-r--r-- | src/augmentkv6/main.cpp | 4 | ||||
-rw-r--r-- | src/bundleparquet/spliturl.cpp | 10 | ||||
-rw-r--r-- | src/querykv1/main.cpp | 4 | ||||
-rw-r--r-- | src/recvkv6/main.cpp | 28 |
7 files changed, 32 insertions, 39 deletions
@@ -5,12 +5,12 @@ | |||
5 | "systems": "systems" | 5 | "systems": "systems" |
6 | }, | 6 | }, |
7 | "locked": { | 7 | "locked": { |
8 | "lastModified": 1701680307, | 8 | "lastModified": 1710146030, |
9 | "narHash": "sha256-kAuep2h5ajznlPMD9rnQyffWG8EM/C73lejGofXvdM8=", | 9 | "narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=", |
10 | "rev": "4022d587cbbfd70fe950c1e2083a02621806a725", | 10 | "rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a", |
11 | "revCount": 88, | 11 | "revCount": 92, |
12 | "type": "tarball", | 12 | "type": "tarball", |
13 | "url": "https://api.flakehub.com/f/pinned/numtide/flake-utils/0.1.88%2Brev-4022d587cbbfd70fe950c1e2083a02621806a725/018c340d-3287-7c66-818b-f2f646a808e3/source.tar.gz" | 13 | "url": "https://api.flakehub.com/f/pinned/numtide/flake-utils/0.1.92%2Brev-b1d9ab70662946ef0850d488da1c9019f3a9752a/018e2ca5-e5a2-7f80-9261-445a8cecd4d7/source.tar.gz" |
14 | }, | 14 | }, |
15 | "original": { | 15 | "original": { |
16 | "type": "tarball", | 16 | "type": "tarball", |
@@ -28,7 +28,7 @@ | |||
28 | }, | 28 | }, |
29 | "locked": { | 29 | "locked": { |
30 | "lastModified": 1, | 30 | "lastModified": 1, |
31 | "narHash": "sha256-ST9E5LANnA7IV5cY0fbk+MSukaOczxnkXV1/IH7ps4U=", | 31 | "narHash": "sha256-G6OEDWGxSLDOcc5lNcYFyqRPaTu3GCdfiI3bT+40bo0=", |
32 | "path": "./lib/libtmi8", | 32 | "path": "./lib/libtmi8", |
33 | "type": "path" | 33 | "type": "path" |
34 | }, | 34 | }, |
@@ -39,12 +39,12 @@ | |||
39 | }, | 39 | }, |
40 | "nixpkgs": { | 40 | "nixpkgs": { |
41 | "locked": { | 41 | "locked": { |
42 | "lastModified": 1702346276, | 42 | "lastModified": 1722519197, |
43 | "narHash": "sha256-eAQgwIWApFQ40ipeOjVSoK4TEHVd6nbSd9fApiHIw5A=", | 43 | "narHash": "sha256-VEdJmVU2eLFtLqCjTYJd1J7+Go8idAcZoT11IewFiRg=", |
44 | "rev": "cf28ee258fd5f9a52de6b9865cdb93a1f96d09b7", | 44 | "rev": "05405724efa137a0b899cce5ab4dde463b4fd30b", |
45 | "revCount": 553141, | 45 | "revCount": 633655, |
46 | "type": "tarball", | 46 | "type": "tarball", |
47 | "url": "https://api.flakehub.com/f/pinned/NixOs/nixpkgs/0.2311.553141%2Brev-cf28ee258fd5f9a52de6b9865cdb93a1f96d09b7/018c652c-2ff2-777b-bade-dae9c2abe1e1/source.tar.gz" | 47 | "url": "https://api.flakehub.com/f/pinned/NixOs/nixpkgs/0.2405.633655%2Brev-05405724efa137a0b899cce5ab4dde463b4fd30b/0191155c-b6ad-7876-8d08-9db8408432d0/source.tar.gz" |
48 | }, | 48 | }, |
49 | "original": { | 49 | "original": { |
50 | "type": "tarball", | 50 | "type": "tarball", |
@@ -130,6 +130,7 @@ | |||
130 | 130 | ||
131 | devShells.default = pkgs.mkShell { | 131 | devShells.default = pkgs.mkShell { |
132 | inputsFrom = [ oeuf-bundleparquet oeuf-querykv1 oeuf-recvkv6 ]; | 132 | inputsFrom = [ oeuf-bundleparquet oeuf-querykv1 oeuf-recvkv6 ]; |
133 | buildInputs = with pkgs; [ xercesc xsd ]; | ||
133 | }; | 134 | }; |
134 | 135 | ||
135 | formatter = pkgs.nixpkgs-fmt; | 136 | formatter = pkgs.nixpkgs-fmt; |
diff --git a/lib/libtmi8/src/kv1_parser.cpp b/lib/libtmi8/src/kv1_parser.cpp index 78a45a6..3ea9137 100644 --- a/lib/libtmi8/src/kv1_parser.cpp +++ b/lib/libtmi8/src/kv1_parser.cpp | |||
@@ -374,7 +374,7 @@ static std::optional<std::chrono::sys_seconds> parseDateTime(std::string_view sr | |||
374 | size_t tzd_off = time_off + 9; | 374 | size_t tzd_off = time_off + 9; |
375 | // For clarity, TZD stands for Time Zone Designator. It often takes the form | 375 | // For clarity, TZD stands for Time Zone Designator. It often takes the form |
376 | // of Z (Zulu, UTC+00:00) or as an offset from UTC in hours and minutes, | 376 | // of Z (Zulu, UTC+00:00) or as an offset from UTC in hours and minutes, |
377 | // formatted as +|-HH:MM (e.g. +01:00, -12:00). | 377 | // formatted as ±HH:MM (e.g. +01:00, -12:00). |
378 | 378 | ||
379 | if (time_off + 8 >= src.size()) ERROR("bad format, not enough space for hh:mm:ss"); | 379 | if (time_off + 8 >= src.size()) ERROR("bad format, not enough space for hh:mm:ss"); |
380 | 380 | ||
diff --git a/src/augmentkv6/main.cpp b/src/augmentkv6/main.cpp index 303721f..ae8405a 100644 --- a/src/augmentkv6/main.cpp +++ b/src/augmentkv6/main.cpp | |||
@@ -90,10 +90,10 @@ bool parse(Kv1Records &into) { | |||
90 | parser.parse(); | 90 | parser.parse(); |
91 | 91 | ||
92 | bool ok = true; | 92 | bool ok = true; |
93 | if (!parser.gerrors.empty()) { | 93 | if (!parser.global_errors.empty()) { |
94 | ok = false; | 94 | ok = false; |
95 | fputs("Parser reported errors:\n", stderr); | 95 | fputs("Parser reported errors:\n", stderr); |
96 | for (const auto &error : parser.gerrors) | 96 | for (const auto &error : parser.global_errors) |
97 | fprintf(stderr, "- %s\n", error.c_str()); | 97 | fprintf(stderr, "- %s\n", error.c_str()); |
98 | } | 98 | } |
99 | if (!parser.warns.empty()) { | 99 | if (!parser.warns.empty()) { |
diff --git a/src/bundleparquet/spliturl.cpp b/src/bundleparquet/spliturl.cpp index 91f897d..2b35d4c 100644 --- a/src/bundleparquet/spliturl.cpp +++ b/src/bundleparquet/spliturl.cpp | |||
@@ -122,16 +122,6 @@ std::optional<SplitUrl> splitUrl(const std::string &url, std::string *error) { | |||
122 | 122 | ||
123 | schemehost = curl_url_dup(parsed); | 123 | schemehost = curl_url_dup(parsed); |
124 | 124 | ||
125 | // CURL BUG WORKAROUND: CURLUPART_ZONEID is NOT copied by curl_url_dup! | ||
126 | // ^ fixed in CURL 8.3.0 after https://curl.se/mail/lib-2023-07/0047.html | ||
127 | rc = curl_url_get(parsed, CURLUPART_ZONEID, &zoneid, 0); | ||
128 | if (rc == CURLUE_OK) { | ||
129 | rc = curl_url_set(schemehost, CURLUPART_ZONEID, zoneid, 0); | ||
130 | if (rc != CURLUE_OK) { | ||
131 | errs << "Could not copy zone ID to duplicated URL: " << curl_url_strerror(rc); | ||
132 | goto Exit; | ||
133 | } | ||
134 | } | ||
135 | rc = curl_url_set(schemehost, CURLUPART_PORT, nullptr, 0); | 125 | rc = curl_url_set(schemehost, CURLUPART_PORT, nullptr, 0); |
136 | if (rc != CURLUE_OK) { | 126 | if (rc != CURLUE_OK) { |
137 | errs << "Could not unset port in duplicated URL: " << curl_url_strerror(rc); | 127 | errs << "Could not unset port in duplicated URL: " << curl_url_strerror(rc); |
diff --git a/src/querykv1/main.cpp b/src/querykv1/main.cpp index 9580328..11437f4 100644 --- a/src/querykv1/main.cpp +++ b/src/querykv1/main.cpp | |||
@@ -90,10 +90,10 @@ bool parse(const char *path, Kv1Records &into) { | |||
90 | parser.parse(); | 90 | parser.parse(); |
91 | 91 | ||
92 | bool ok = true; | 92 | bool ok = true; |
93 | if (!parser.gerrors.empty()) { | 93 | if (!parser.global_errors.empty()) { |
94 | ok = false; | 94 | ok = false; |
95 | fputs("Parser reported errors:\n", stderr); | 95 | fputs("Parser reported errors:\n", stderr); |
96 | for (const auto &error : parser.gerrors) | 96 | for (const auto &error : parser.global_errors) |
97 | fprintf(stderr, "- %s\n", error.c_str()); | 97 | fprintf(stderr, "- %s\n", error.c_str()); |
98 | } | 98 | } |
99 | if (!parser.warns.empty()) { | 99 | if (!parser.warns.empty()) { |
diff --git a/src/recvkv6/main.cpp b/src/recvkv6/main.cpp index 3a3338b..e8b0ba3 100644 --- a/src/recvkv6/main.cpp +++ b/src/recvkv6/main.cpp | |||
@@ -922,20 +922,22 @@ struct Kv6Parser { | |||
922 | 922 | ||
923 | std::optional<Tmi8VvTmPushInfo> parse(const rapidxml::xml_document<> &doc) { | 923 | std::optional<Tmi8VvTmPushInfo> parse(const rapidxml::xml_document<> &doc) { |
924 | std::optional<Tmi8VvTmPushInfo> msg; | 924 | std::optional<Tmi8VvTmPushInfo> msg; |
925 | for (const rapidxml::xml_node<> *node = doc.first_node(); node; node = node->next_sibling()) { | 925 | withXmlnss(doc.first_attribute(), nullptr /* nss */, [&](const Xmlns *nss) { |
926 | ifTmi8Element(*node, nullptr /* nss */, [&](std::string_view name, const Xmlns *nss) { | 926 | for (const rapidxml::xml_node<> *node = doc.first_node(); node; node = node->next_sibling()) { |
927 | if (name == "VV_TM_PUSH") { | 927 | ifTmi8Element(*node, nss, [&](std::string_view name, const Xmlns *node_nss) { |
928 | if (msg) { | 928 | if (name == "VV_TM_PUSH") { |
929 | error("Duplicated VV_TM_PUSH"); | 929 | if (msg) { |
930 | return; | 930 | error("Duplicated VV_TM_PUSH"); |
931 | } | 931 | return; |
932 | msg = parseVvTmPush(*node, nss); | 932 | } |
933 | if (!msg) { | 933 | msg = parseVvTmPush(*node, node_nss); |
934 | error("Invalid VV_TM_PUSH"); | 934 | if (!msg) { |
935 | error("Invalid VV_TM_PUSH"); | ||
936 | } | ||
935 | } | 937 | } |
936 | } | 938 | }); |
937 | }); | 939 | } |
938 | } | 940 | }); |
939 | if (!msg) | 941 | if (!msg) |
940 | error("Expected to find VV_TM_PUSH"); | 942 | error("Expected to find VV_TM_PUSH"); |
941 | return msg; | 943 | return msg; |