Merge pull request #2779 from RaiKoHoff/Dev_RC1

TinyExpr corrections
This commit is contained in:
Rainer Kottenhoff 2020-09-11 17:14:33 +02:00 committed by GitHub
commit 60e941a359
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 4 deletions

View File

@ -1259,7 +1259,7 @@ void LoadSettings()
Defaults2.LineCommentPostfixStrg[0] = L'\0';
IniSectionGetString(IniSecSettings2, L"LineCommentPostfixStrg", Defaults2.LineCommentPostfixStrg,
Settings2.LineCommentPostfixStrg, COUNTOF(Settings2.LineCommentPostfixStrg));
StrTrimW(Settings2.LineCommentPostfixStrg, L"\"'");
StrTrim(Settings2.LineCommentPostfixStrg, L"\"'");
Defaults2.DateTimeFormat[0] = L'\0'; // empty to get <locale date-time format>
IniSectionGetString(IniSecSettings2, L"DateTimeFormat", Defaults2.DateTimeFormat, Settings2.DateTimeFormat, COUNTOF(Settings2.DateTimeFormat));

View File

@ -1394,7 +1394,7 @@ void Style_SetLexer(HWND hwnd, PEDITLEXER pLexNew)
SendMessage(hwnd,SCI_SETADDITIONALCARETFORE,rgb,0);
StrTrimW(wchSpecificStyle, L" ;");
StrTrim(wchSpecificStyle, L" ;");
StringCchCopy(pCurrentStandard->Styles[STY_CARET].szValue,
COUNTOF(pCurrentStandard->Styles[STY_CARET].szValue),wchSpecificStyle);
@ -3420,7 +3420,7 @@ bool Style_SelectFont(HWND hwnd,LPWSTR lpszStyle,int cchStyle, LPCWSTR sLexerNam
if (lf.lfWeight == iFontWeight) {
WCHAR check[64] = { L'\0' };
Style_AppendWeightStr(check, COUNTOF(check), lf.lfWeight);
StrTrimW(check, L" ;");
StrTrim(check, L" ;");
if (Style_StrGetAttribute(lpszStyle, check)) {
Style_AppendWeightStr(szNewStyle, COUNTOF(szNewStyle), lf.lfWeight);
}
@ -3434,7 +3434,7 @@ bool Style_SelectFont(HWND hwnd,LPWSTR lpszStyle,int cchStyle, LPCWSTR sLexerNam
if (lf.lfWidth == 0) {
WCHAR check[64] = { L'\0' };
Style_AppendStretchStr(check, COUNTOF(check), /*lf.lfWidth*/ iFontStretch);
StrTrimW(check, L" ;");
StrTrim(check, L" ;");
if (Style_StrGetAttribute(lpszStyle, check)) {
Style_AppendStretchStr(szNewStyle, COUNTOF(szNewStyle), /*lf.lfWidth*/ iFontStretch);
}

View File

@ -415,8 +415,10 @@ void next_token(state *s) {
case '+': s->type = TOK_INFIX; s->function = get_function_pointer_2d(add); break;
case '-': s->type = TOK_INFIX; s->function = get_function_pointer_2d(sub); break;
case '*': s->type = TOK_INFIX; s->function = get_function_pointer_2d(mul); break;
//~case '×': s->type = TOK_INFIX; s->function = get_function_pointer_2d(mul); break;
case '/': s->type = TOK_INFIX; s->function = get_function_pointer_2d(divide); break;
case ':': s->type = TOK_INFIX; s->function = get_function_pointer_2d(divide); break;
//~case '÷': s->type = TOK_INFIX; s->function = get_function_pointer_2d(divide); break;
case '^': s->type = TOK_INFIX; s->function = get_function_pointer_2d(pow); break;
case '%':
if (s->next++[0] == '%') {