#endif
int BaseStrBufSize = 64;
+const char *StrBufNOTNULL = ((char*) NULL) - 1;
+
/**
* Private Structure for the Stringbuffer
*/
*/
int StrBufHaveNextToken(const StrBuf *Source, const char **pStart)
{
- const char *Null = NULL;
- Null --;
if ((Source == NULL) ||
- (*pStart == Null) ||
+ (*pStart == StrBufNOTNULL) ||
(Source->BufUsed == 0))
{
return 0;
if ((Source == NULL) ||
(Source->BufUsed == 0) )
{
- *pStart = NULL;
- (*pStart) --; /* move it to the end of all being via underflow */
+ *pStart = StrBufNOTNULL;
return -1;
}
/* did we reach the end? */
if ((s > EndBuffer)) {
- EndBuffer = NULL;
- EndBuffer --;
+ EndBuffer = StrBufNOTNULL;
*pStart = EndBuffer;
}
else {