I wrote:
> #define APPEND_CHAR(bufptr, end, newchar) \
> do \
> { \
> if (((bufptr) + 1) >= (end)) \
> return DTERR_BAD_FORMAT; \
> *(bufptr)++ = (newchar); \
> } while (0);
Oh BTW, there definitely should not be a semicolon at the end
of that macro ...
regards, tom lane