Permalink
Browse files

Merge branch 'refactor/tokenizer' into autobuild/tokenizer

  • Loading branch information...
c-lipka committed May 23, 2018
2 parents 1ea91bd + af7e2a8 commit ae2ae6a88e42d5e917125d7f740bd600b3a9ae57
@@ -511,37 +511,35 @@ POV_OFF_T IMemStream::tellg() const
bool IMemStream::seekg(POV_OFF_T posi, unsigned int whence)
{
if(!fail)
{
// Any seek operation renders the unget buffer's content obsolete.
mUngetBuffer = EOF;
// Any seek operation renders the end-of-file status and unget buffer's content obsolete.
fail = false;
mUngetBuffer = EOF;
switch(whence)
{
case seek_set:
if (posi < formalStart)
fail = true;
else if (posi - formalStart <= size)
pos = posi - formalStart;
else
fail = true;
break;
case seek_cur:
if ((posi <= size) && (pos <= size-posi))
pos += posi;
else
fail = true;
break;
case seek_end:
if (posi <= size)
pos = size - posi;
else
fail = true;
break;
default:
POV_ASSERT(false);
break;
}
switch(whence)
{
case seek_set:
if (posi < formalStart)
fail = true;
else if (posi - formalStart <= size)
pos = posi - formalStart;
else
fail = true;
break;
case seek_cur:
if ((posi <= size) && (pos <= size-posi))
pos += posi;
else
fail = true;
break;
case seek_end:
if (posi <= size)
pos = size - posi;
else
fail = true;
break;
default:
POV_ASSERT(false);
break;
}
return !fail;
}
View
@@ -100,7 +100,7 @@
/// where `N` is a serial number starting at 1 in each phase, `TIME` is the number of minutes
/// since 2000-01-01 00:00, and `FEATURE` is an arbitrary alphanumeric moniker for a particular
/// experimental feature.
#define POV_RAY_PRERELEASE "x.tokenizer.9999"
#define POV_RAY_PRERELEASE "x.tokenizer.9673626"
#if defined(DOXYGEN) && !defined(POV_RAY_PRERELEASE)
// Work around doxygen being unable to document undefined macros.
Oops, something went wrong.

0 comments on commit ae2ae6a

Please sign in to comment.