Browse Source

Cleanup

tags/1.9.7
falkTX 10 years ago
parent
commit
8acbef90a2
1 changed files with 11 additions and 18 deletions
  1. +11
    -18
      source/utils/CarlaPipeUtils.cpp

+ 11
- 18
source/utils/CarlaPipeUtils.cpp View File

@@ -1028,28 +1028,21 @@ const char* CarlaPipeCommon::_readline() const noexcept
#endif
} CARLA_SAFE_EXCEPTION_BREAK("CarlaPipeCommon::readline() - read");

//if (ret == 0 || c == '\n')
// break;

if (ret == 1 && c != '\n')
{
if (c == '\r')
c = '\n';
if (ret != 1 || c == '\n')
break;

*ptr++ = c;
if (c == '\r')
c = '\n';

if (i+1 == 0xff)
{
i = 0;
*ptr = '\0';
pData->tmpStr += pData->tmpBuf;
ptr = pData->tmpBuf;
}
*ptr++ = c;

continue;
if (i+1 == 0xff)
{
i = 0;
*ptr = '\0';
pData->tmpStr += pData->tmpBuf;
ptr = pData->tmpBuf;
}

break;
}

if (ptr != pData->tmpBuf)


Loading…
Cancel
Save