istream-crlf.c revision 14175321ddb88619015866978c05a27786ca4814
/* Copyright (c) 2007 Dovecot authors, see the included COPYING file */
#include "lib.h"
#include "istream-internal.h"
#include "istream-crlf.h"
struct crlf_istream {
struct istream_private istream;
char last_char;
unsigned int crlf:1;
};
{
}
static void
{
}
{
const unsigned char *data;
return ret;
}
}
return -2;
/* @UNSAFE */
if (data[0] == '\n')
i = 0;
else {
/* CR without LF */
return 1;
}
}
if (data[0] != '\r')
i = 1;
}
if (data[i] <= '\r') {
if (data[i] == '\n') {
break;
}
continue;
}
continue;
}
/* CR without LF */
break;
}
if (data[i] == '\r')
continue;
}
}
return ret;
}
static void ATTR_NORETURN
{
i_panic("crlf-istream: seeking unsupported currently");
}
static const struct stat *
{
}
static struct istream *
{
struct crlf_istream *cstream;
}
{
}
{
}