diff options
author | Karen Arutyunov <karen@codesynthesis.com> | 2016-08-19 17:37:29 +0300 |
---|---|---|
committer | Karen Arutyunov <karen@codesynthesis.com> | 2016-08-29 18:20:03 +0300 |
commit | 53c2aa8e382dd50d09b385285bc3fa0b645ace0a (patch) | |
tree | 6d23d091bc57c0aa8d8a529e63ec2f2f22322a3a /bpkg/manifest-utility.cxx | |
parent | a4b29effed15b0a3e9309a4633a3ada37f3081e6 (diff) |
Support system packages
Diffstat (limited to 'bpkg/manifest-utility.cxx')
-rw-r--r-- | bpkg/manifest-utility.cxx | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/bpkg/manifest-utility.cxx b/bpkg/manifest-utility.cxx index 5aa90b9..41215cf 100644 --- a/bpkg/manifest-utility.cxx +++ b/bpkg/manifest-utility.cxx @@ -10,6 +10,21 @@ using namespace std; namespace bpkg { + package_scheme + parse_package_scheme (const char*& s) + { + // Ignore the character case for consistency with a case insensitivity of + // URI schemes some of which we may support in the future. + // + if (casecmp (s, "sys:", 4) == 0) + { + s += 4; + return package_scheme::sys; + } + + return package_scheme::none; + } + string parse_package_name (const char* s) { |