/* Copyright (c) 2002-2018 Dovecot authors, see the included COPYING file */
#include "lib.h"
#include "imap-seqset.h"
{
num = 0;
while (**str != '\0') {
break;
(*str)++;
}
/* FIXME: ugly hack, we're using this number to mean the
last existing message. In reality UIDs should never get
this high, so we can quite safely just drop this one down. */
num--;
}
return num;
}
static int
{
if (**str == '*') {
/* last message */
*str += 1;
} else {
if (seq1 == 0)
return -1;
}
if (**str != ':')
else {
/* first:last range */
*str += 1;
if (**str == '*') {
*str += 1;
} else {
if (seq2 == 0)
return -1;
}
}
/* swap, as specified by RFC-3501 */
} else {
}
return 0;
}
{
while (*str != '\0') {
return -1;
if (*str == ',')
str++;
else if (*str != '\0')
return -1;
}
return 0;
}
{
return -1;
/* '*' used */
return -1;
}
return 0;
}
{
return -1;
}