From 286b63e93d5ee9d79b91bb66d5ae43a7c3f33251 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9F=D0=B5=D0=BB=D0=B8=D0=BF=D0=B5=D0=BD=D0=BA=D0=BE=20?= =?UTF-8?q?=D0=98=D0=B2=D0=B0=D0=BD?= Date: Fri, 10 Mar 2017 20:18:04 +0000 Subject: [PATCH] git-svn-id: svn://db.shs.com.ru/pip@317 12ceb7fc-bf1f-11e4-8940-5bc7170c53b5 --- src/math/pievaluator.cpp | 25 +++++++++++++++---------- src/system/piprocess.cpp | 9 +++++++-- 2 files changed, 22 insertions(+), 12 deletions(-) diff --git a/src/math/pievaluator.cpp b/src/math/pievaluator.cpp index f694486d..f116ea24 100755 --- a/src/math/pievaluator.cpp +++ b/src/math/pievaluator.cpp @@ -309,15 +309,20 @@ void PIEvaluator::replaceOperators() { currentString.replaceAll("<=", "{"); currentString.replaceAll("&&", "&"); currentString.replaceAll("||", "|"); + currentString.replaceAll(PIString::fromUTF8("≠"), ":"); + currentString.replaceAll(PIString::fromUTF8("≥"), "}"); + currentString.replaceAll(PIString::fromUTF8("≤"), "{"); + currentString.replaceAll(PIString::fromUTF8("⋀"), "&"); + currentString.replaceAll(PIString::fromUTF8("⋁"), "|"); } void PIEvaluator::makeOutput(PIString & string) { - string.replaceAll(":", "≠"); - string.replaceAll("}", "≥"); - string.replaceAll("{", "≤"); - string.replaceAll("&", "⋀"); - string.replaceAll("|", "⋁"); + string.replaceAll(":", PIString::fromUTF8("≠")); + string.replaceAll("}", PIString::fromUTF8("≥")); + string.replaceAll("{", PIString::fromUTF8("≤")); + string.replaceAll("&", PIString::fromUTF8("⋀")); + string.replaceAll("|", PIString::fromUTF8("⋁")); } @@ -984,13 +989,13 @@ PIString PIEvaluator::operationChar(const PIEvaluatorTypes::Operation & operatio case PIEvaluatorTypes::oPower: return "^"; case PIEvaluatorTypes::oResidue: return "%"; case PIEvaluatorTypes::oEqual: return "="; - case PIEvaluatorTypes::oNotEqual: return ("≠"); - case PIEvaluatorTypes::oGreaterEqual: return ("≥"); - case PIEvaluatorTypes::oSmallerEqual: return ("≤"); + case PIEvaluatorTypes::oNotEqual: return PIString::fromUTF8("≠"); + case PIEvaluatorTypes::oGreaterEqual: return PIString::fromUTF8("≥"); + case PIEvaluatorTypes::oSmallerEqual: return PIString::fromUTF8("≤"); case PIEvaluatorTypes::oGreater: return ">"; case PIEvaluatorTypes::oSmaller: return "<"; - case PIEvaluatorTypes::oAnd: return ("⋀"); - case PIEvaluatorTypes::oOr: return ("⋁"); + case PIEvaluatorTypes::oAnd: return PIString::fromUTF8("⋀"); + case PIEvaluatorTypes::oOr: return PIString::fromUTF8("⋁"); default: return "???"; } } diff --git a/src/system/piprocess.cpp b/src/system/piprocess.cpp index 277bd6b5..6dd3f265 100755 --- a/src/system/piprocess.cpp +++ b/src/system/piprocess.cpp @@ -193,9 +193,14 @@ void PIProcess::startProc(bool detached) { void PIProcess::terminate() { #ifdef WINDOWS - if (is_exec) if (!TerminateProcess(pi.hProcess, 0)) return; pi.dwProcessId = 0; + if (is_exec) + if (!TerminateProcess(pi.hProcess, 0)) + return; + pi.dwProcessId = 0; #else - if (is_exec) kill(pid, SIGKILL); pid = 0; + if (is_exec) + kill(pid, SIGKILL); + pid = 0; #endif }