const char **Error);
-int StrBufSipLine(StrBuf *LineBuf, StrBuf *Buf, const char **Ptr);
typedef enum _eReadState {
eReadFail,
eReadState StrBufChunkSipLine(StrBuf *LineBuf, IOBuffer *FB);
eReadState StrBufCheckBuffer(IOBuffer *FB);
-
+int StrBufSipLine(StrBuf *LineBuf, const StrBuf *Buf, const char **Ptr);
int StrBufReplaceToken(StrBuf *Buf, long where, long HowLong, const char *Repl, long ReplLen);
int StrBufExtract_token(StrBuf *dest, const StrBuf *Source, int parmnum, char separator);
int StrBufSub(StrBuf *dest, const StrBuf *Source, unsigned long Offset, size_t nChars);
StrBuf *EncBuf)
{
StrBuf *Target;
- int need_to_encode;
-
const char *pch, *pche;
const char *UserStart, *UserEnd, *EmailStart, *EmailEnd, *At;
if ((Recp == NULL) || (StrLength(Recp) == 0))
return NULL;
- need_to_encode = 0;
pch = ChrPtr(Recp);
pche = pch + StrLength(Recp);
while ((pch != NULL) && (pch < pche))
{
- int ColonOk = 0;
-
while (isspace(*pch)) pch++;
UserStart = UserEnd = EmailStart = EmailEnd = NULL;
if (EmailEnd == NULL)
EmailEnd = pche;
pch = EmailEnd + 1;
- ColonOk = 1;
}
else {
int gt = 0;
int StrBufReadBLOB(StrBuf *Buf, int *fd, int append, long nBytes, const char **Error)
{
int fdflags;
- int len, rlen, slen;
+ int rlen;
int nSuccessLess;
int nRead = 0;
char *ptr;
ptr = Buf->buf + Buf->BufUsed;
- slen = len = Buf->BufUsed;
-
fdflags = fcntl(*fd, F_GETFL);
IsNonBlock = (fdflags & O_NONBLOCK) == O_NONBLOCK;
nSuccessLess = 0;
int check,
const char **Error)
{
- const char *pche;
const char *pos;
int fdflags;
int len = 0;
- int rlen, slen;
+ int rlen;
int nRead = 0;
int nAlreadyRead = 0;
int IsNonBlock;
char *ptr;
fd_set rfds;
- const char *pch;
struct timeval tv;
int nSuccessLess = 0;
int MaxTries;
(pos != NULL) &&
(pos < IOBuf->buf + IOBuf->BufUsed))
{
- pche = IOBuf->buf + IOBuf->BufUsed;
- pch = pos;
-
if (rlen < nBytes) {
memcpy(Blob->buf + Blob->BufUsed, pos, rlen);
Blob->BufUsed += rlen;
IncreaseBuf(IOBuf, 0, nBytes - nRead);
ptr = IOBuf->buf;
- slen = len = Blob->BufUsed;
+ len = Blob->BufUsed;
fdflags = fcntl(*fd, F_GETFL);
IsNonBlock = (fdflags & O_NONBLOCK) == O_NONBLOCK;
* has to be &NULL on start; will be &NotNULL on end of buffer
* @returns size of remaining buffer
*/
-int StrBufSipLine(StrBuf *LineBuf, StrBuf *Buf, const char **Ptr)
+int StrBufSipLine(StrBuf *LineBuf, const StrBuf *Buf, const char **Ptr)
{
const char *aptr, *ptr, *eptr;
char *optr, *xptr;