Commit ba978477 ba9784773b8e071ca8c956039cabef50a1a12298 by Sergey Poznyakoff

Rearranged functions to let implicit prototyping work.

1 parent 0d0cc4f4
......@@ -149,46 +149,6 @@ notify_uid (size_t uid)
}
static void
notify (void)
{
size_t total = 0;
int reset = 0;
mailbox_messages_count (mbox, &total);
if (!uid_table)
{
reset = 1;
reset_uids ();
}
if (uid_table)
{
size_t i;
size_t recent = 0;
for (i = 1; i <= total; i++)
{
message_t msg = NULL;
size_t uid = 0;
mailbox_get_message (mbox, i, &msg);
message_get_uid (msg, &uid);
if (!notify_uid (uid))
recent++;
}
notify_deleted ();
util_out (RESP_NONE, "%d EXISTS", total);
if (recent)
util_out (RESP_NONE, "%d RECENT", recent);
}
if (!reset)
reset_uids ();
else
reset_notify ();
}
static void
free_uids (void)
{
if (uid_table)
......@@ -241,6 +201,46 @@ reset_uids (void)
}
}
static void
notify (void)
{
size_t total = 0;
int reset = 0;
mailbox_messages_count (mbox, &total);
if (!uid_table)
{
reset = 1;
reset_uids ();
}
if (uid_table)
{
size_t i;
size_t recent = 0;
for (i = 1; i <= total; i++)
{
message_t msg = NULL;
size_t uid = 0;
mailbox_get_message (mbox, i, &msg);
message_get_uid (msg, &uid);
if (!notify_uid (uid))
recent++;
}
notify_deleted ();
util_out (RESP_NONE, "%d EXISTS", total);
if (recent)
util_out (RESP_NONE, "%d RECENT", recent);
}
if (!reset)
reset_uids ();
else
reset_notify ();
}
size_t
uid_to_msgno (size_t uid)
{
......