commands.c revision 04d0cb8d447c468c6128f03c90a5f4b43c644d42
/* Copyright (C) 2002 Timo Sirainen */
#include "common.h"
#include "istream.h"
#include "ostream.h"
#include "str.h"
#include "message-size.h"
#include "mail-storage.h"
#include "mail-search.h"
#include "capability.h"
#include "commands.h"
#define MSGS_BITMASK_SIZE(client) \
unsigned int *msgnum)
{
num = 0;
"-ERR Invalid message number: %s", args);
return NULL;
}
"-ERR Message number too large: %s", args);
return NULL;
}
args++;
}
"-ERR There's no message %u.", num);
return NULL;
}
num--;
return NULL;
}
}
return args;
}
{
num = 0;
args);
return NULL;
}
args);
return NULL;
}
args++;
}
return args;
}
{
return TRUE;
}
{
unsigned int msgnum;
return FALSE;
}
client->deleted_count++;
return TRUE;
}
{
unsigned int i;
if (*args == '\0') {
for (i = 0; i < client->messages_count; i++) {
(1 << (i % CHAR_BIT)))
continue;
}
}
} else {
unsigned int msgnum;
return FALSE;
}
return TRUE;
}
{
return TRUE;
}
{
struct mail_search_arg search_arg;
struct mailbox_transaction_context *t;
struct mail_search_context *ctx;
uint32_t i;
return FALSE;
}
(1 << (i % CHAR_BIT))) != 0) {
break;
}
}
}
if (mailbox_search_deinit(ctx) < 0)
return FALSE;
return !failed;
}
{
else
return TRUE;
}
{
const unsigned char *data;
int cr_skipped, in_header;
body_lines++; /* internally we count the empty line too */
while ((body_lines > 0 || in_header) &&
add = '\0';
for (i = 0; i < size; i++) {
}
if (data[i] == '\n') {
if ((i == 0 && last != '\r') ||
/* missing CR */
add = '\r';
break;
}
if (!in_header) {
if (--body_lines == 0) {
i++;
break;
}
}
} else if (data[i] == '.' &&
((i == 0 && last == '\n') ||
/* escape the dot */
add = '.';
i++;
break;
}
}
return;
if (add != '\0') {
return;
} else {
}
i_stream_skip(input, i);
}
if (last != '\n') {
/* didn't end with CRLF */
}
}
{
struct mail_search_arg search_arg;
struct mail_search_seqset seqset;
struct mailbox_transaction_context *t;
struct mail_search_context *ctx;
return;
}
else {
} else {
}
}
(void)mailbox_search_deinit(ctx);
(void)mailbox_transaction_commit(t);
}
{
unsigned int msgnum;
return FALSE;
return TRUE;
}
{
client->deleted_count = 0;
client->deleted_size = 0;
}
return TRUE;
}
{
return TRUE;
}
{
unsigned int msgnum;
return FALSE;
return FALSE;
return TRUE;
}
{
struct mail_search_arg search_arg;
struct mail_search_seqset seqset;
struct mailbox_transaction_context *t;
struct mail_search_context *ctx;
return;
if (message == 0)
else {
}
return;
}
continue;
}
"%u %u.%u" : "+OK %u %u.%u",
}
(void)mailbox_search_deinit(ctx);
(void)mailbox_transaction_commit(t);
}
{
if (*args == '\0') {
} else {
unsigned int msgnum;
return FALSE;
}
return TRUE;
}
{
/* keep the command uppercased */
switch (*name) {
case 'C':
break;
case 'D':
break;
case 'L':
break;
case 'N':
break;
case 'Q':
break;
case 'R':
break;
case 'S':
break;
case 'T':
break;
case 'U':
break;
}
return FALSE;
}