+/**
+Extracts the basename from the given path. Same thing as Path::Path(p)[-1],
+but faster.
+*/
+string basename(const std::string &p);
+{
+ unsigned slash=p.rfind(DIRCHAR);
+ if(slash==string::npos)
+ return p;
+ else
+ return p.substr(slash+1);
+}
+