From 53c2aa8e382dd50d09b385285bc3fa0b645ace0a Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Fri, 19 Aug 2016 17:37:29 +0300 Subject: Support system packages --- bpkg/manifest-utility.cxx | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'bpkg/manifest-utility.cxx') 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) { -- cgit v1.1