Example #1
0
 int32_t expect_type(wchar_t const*&ct, std::wstring &type) {
   auto o = ct;
   while (*ct != 0 && (__iswcsym(*ct) || *ct == L'-')) ++ct;
   if (*ct == 0)
     return -1;
   type = std::wstring(o, ct);
   return 0;
 }
Example #2
0
BOOL IsValidSymbol(const TCHAR* psz)
{
#ifdef UNICODE
	if (!__iswcsymf(*psz))
#else
	if (!__iscsymf(*psz))
#endif
		return FALSE;

	ASSERT(*psz != 0);
	++psz;
	while (*psz)
	{
#ifdef UNICODE
		if (!__iswcsym(*psz))
#else
		if (!__iscsym(*psz))
#endif
			return FALSE;
		++psz;
	}
	return TRUE;
}