From be058abdefc5eafac6623d3c7f241c952bd317ab Mon Sep 17 00:00:00 2001 From: Mark Koennecke Date: Tue, 21 Oct 2014 16:28:06 +0200 Subject: [PATCH] Fixed a sget bug from POLDI. Returns OK instead of number --- script.c | 7 +++++++ sicsget.c | 2 +- sicshipadaba.c | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/script.c b/script.c index 20497fe8..73a5303a 100644 --- a/script.c +++ b/script.c @@ -172,6 +172,13 @@ int SetSICSStatus(SConnection * pCon, SicsInterp * pSics, void *pData, return 0; } + SCWrite(pCon,"Status is calculated, cannot be set manually any longer", eValue); + return 1; + + /* + The code below is defunct and just here for documentary reasons + */ + /* is there a value ? */ if (argc < 2) { SCWrite(pCon, "ERROR: missing parameter for SetStatus", eError); diff --git a/sicsget.c b/sicsget.c index 931cabbf..c764d107 100644 --- a/sicsget.c +++ b/sicsget.c @@ -81,7 +81,7 @@ static int SICSGetCommand(SConnection * pCon, SicsInterp * pSics, void *pData, if(status){ data = formatValue(v,NULL); if(data != NULL){ - SCWrite(pCon,GetCharArray(data),eValue); + SCWrite(pCon,trim(GetCharArray(data)),eValue); DeleteDynString(data); } else { SCPrintf(pCon,eError,"ERROR: formatting value for %s failed", argv[1]); diff --git a/sicshipadaba.c b/sicshipadaba.c index 365bddae..aed792d1 100644 --- a/sicshipadaba.c +++ b/sicshipadaba.c @@ -2524,7 +2524,7 @@ static int UpdateHdbNode(SConnection * pCon, SicsInterp * pSics, } status = UpdateHipadabaPar(targetNode, newValue, pCon); ReleaseHdbValue(&newValue); - if (status == 1) { + if (status == 1 && SCinMacro(pCon) == 0) { SCSendOK(pCon); } return status;