From e7e58a98148a113858b95d87084bf9afbd3ea492 Mon Sep 17 00:00:00 2001 From: anders_k Date: Tue, 7 Jun 2016 18:51:09 +0000 Subject: [PATCH] Added LogicLib & operator git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@6754 212acab6-be3b-0410-9dea-997c60f758d6 --- Docs/src/history.but | 2 ++ Include/LogicLib.nsh | 8 +++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/Docs/src/history.but b/Docs/src/history.but index 67f519aa..19d6a3df 100644 --- a/Docs/src/history.but +++ b/Docs/src/history.but @@ -14,6 +14,8 @@ Released on ???? ?nd, 2016 \b Zip2Exe aborts if the zip file is encrypted (\W{http://sf.net/p/nsis/bugs/1141}{bug #1141}) +\b Added LogicLib & operator + \S2{} Translations \b Minor tweaks to Danish.nlf (scootergrisen) (\W{http://sf.net/p/nsis/bugs/1140}{bug #1140}) diff --git a/Include/LogicLib.nsh b/Include/LogicLib.nsh index fd021559..12092010 100644 --- a/Include/LogicLib.nsh +++ b/Include/LogicLib.nsh @@ -47,7 +47,7 @@ ; Case-sensitive string tests: ; a S== b; a S!= b ; Standard (built-in) signed integer tests: -; a = b; a <> b; a < b; a >= b; a > b; a <= b +; a = b; a <> b; a < b; a >= b; a > b; a <= b; a & b ; Standard (built-in) unsigned integer tests: ; a U< b; a U>= b; a U> b; a U<= b ; 64-bit integer tests (using System.dll): @@ -206,6 +206,12 @@ !insertmacro _> `${_a}` `${_b}` `${_f}` `${_t}` !macroend + !macro _& _a _b _t _f + !insertmacro _LOGICLIB_TEMP + IntOp $_LOGICLIB_TEMP `${_a}` & `${_b}` + !insertmacro _<> $_LOGICLIB_TEMP 0 `${_t}` `${_f}` + !macroend + ; Unsigned integer tests (NB: no need for extra equality tests) !macro _U< _a _b _t _f IntCmpU `${_a}` `${_b}` `${_f}` `${_t}` `${_f}`