Changeset View
Changeset View
Standalone View
Standalone View
ps/trunk/source/lib/regex.cpp
/* Copyright (C) 2010 Wildfire Games. | /* Copyright (C) 2020 Wildfire Games. | ||||
* | * | ||||
* Permission is hereby granted, free of charge, to any person obtaining | * Permission is hereby granted, free of charge, to any person obtaining | ||||
* a copy of this software and associated documentation files (the | * a copy of this software and associated documentation files (the | ||||
* "Software"), to deal in the Software without restriction, including | * "Software"), to deal in the Software without restriction, including | ||||
* without limitation the rights to use, copy, modify, merge, publish, | * without limitation the rights to use, copy, modify, merge, publish, | ||||
* distribute, sublicense, and/or sell copies of the Software, and to | * distribute, sublicense, and/or sell copies of the Software, and to | ||||
* permit persons to whom the Software is furnished to do so, subject to | * permit persons to whom the Software is furnished to do so, subject to | ||||
* the following conditions: | * the following conditions: | ||||
Show All 9 Lines | |||||
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE | ||||
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | ||||
*/ | */ | ||||
// minimal regex implementation | // minimal regex implementation | ||||
#include "precompiled.h" | #include "precompiled.h" | ||||
#include <cwctype> | |||||
int match_wildcard(const wchar_t* s, const wchar_t* w) | int match_wildcard(const wchar_t* s, const wchar_t* w) | ||||
{ | { | ||||
if(!w) | if(!w) | ||||
return 1; | return 1; | ||||
// saved position in both strings, used to expand '*': | // saved position in both strings, used to expand '*': | ||||
// s2 is advanced until match. | // s2 is advanced until match. | ||||
▲ Show 20 Lines • Show All 41 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator