* This file is part of Jam - see jam.c for Copyright information.
*/
+/*
+Copyright 2020 René Ferdinand Rivera Morell
+Distributed under the Boost Software License, Version 1.0.
+(See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
+*/
+
+
/*
* pathsys.h - PATHNAME struct
*/
* same name - it never appears in the bound name of a target.
*
* (member) - archive member name: the syntax is arbitrary, but must agree in
- * path_parse(), path_build() and the Jambase.
+ * path_parse(), path_build().
*/
#ifndef PATHSYS_VP_20020211_H
#include "object.h"
#include "jam_strings.h"
+#include <string>
+
typedef struct _pathpart
{
void path_done( void );
+namespace b2
+{
+ namespace paths
+ {
+ inline bool is_rooted(const std::string &p)
+ {
+ #if NT
+ return
+ (p.size() >= 1 && (p[0] == '/' || p[0] == '\\')) ||
+ (p.size() >= 3 && p[1] == ':' && (p[2] == '/' || p[2] == '\\'));
+ #else
+ return
+ (p.size() >= 1 && (p[0] == '/' || p[0] == '\\'));
+ #endif
+ }
+ std::string normalize(const std::string &p);
+ }
+}
+
#endif