aboutsummaryrefslogtreecommitdiff
path: root/bpkg/manifest-utility.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'bpkg/manifest-utility.cxx')
-rw-r--r--bpkg/manifest-utility.cxx15
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)
{