mirror of
https://github.com/ksherlock/mpw.git
synced 2025-02-16 12:30:53 +00:00
text-match m16.xxx and e16.xxx
This commit is contained in:
parent
9564f13d85
commit
c2f23c8f5e
@ -74,7 +74,14 @@ namespace {
|
|||||||
);
|
);
|
||||||
|
|
||||||
return tmp;
|
return tmp;
|
||||||
|
}
|
||||||
|
|
||||||
|
std::string basename(const std::string &s)
|
||||||
|
{
|
||||||
|
int pos = s.find_last_of("/:");
|
||||||
|
if (pos == s.npos) return s;
|
||||||
|
|
||||||
|
return s.substr(pos + 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -131,6 +138,22 @@ namespace OS
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// check for e16.xxxx or m16.xxxx
|
||||||
|
ext = basename(s);
|
||||||
|
if (ext.length() > 4)
|
||||||
|
{
|
||||||
|
switch (ext[0])
|
||||||
|
{
|
||||||
|
case 'm':
|
||||||
|
case 'M':
|
||||||
|
case 'e':
|
||||||
|
case 'E':
|
||||||
|
if (!strncmp("16.", ext.c_str() + 1, 3))
|
||||||
|
return true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user