Mercurial > dovecot > core-2.2
view src/imap/cmd-uid.c @ 903:fd8888f6f037 HEAD
Naming style changes, finally got tired of most of the typedefs. Also the
previous enum -> macro change reverted so that we don't use the highest bit
anymore, that's incompatible with old indexes so they will be rebuilt.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Sun, 05 Jan 2003 15:09:51 +0200 |
parents | 553f050c8313 |
children | 4f697dde0fca |
line wrap: on
line source
/* Copyright (C) 2002 Timo Sirainen */ #include "common.h" #include "commands.h" int cmd_uid(struct client *client) { const char *cmd; /* UID <command> <args> */ cmd = imap_parser_read_word(client->parser); if (cmd == NULL) return FALSE; client->cmd_func = NULL; switch (*cmd) { case 'c': case 'C': if (strcasecmp(cmd, "COPY") == 0) client->cmd_func = cmd_copy; break; case 'f': case 'F': if (strcasecmp(cmd, "FETCH") == 0) client->cmd_func = cmd_fetch; break; case 's': case 'S': if (strcasecmp(cmd, "STORE") == 0) client->cmd_func = cmd_store; else if (strcasecmp(cmd, "SEARCH") == 0) client->cmd_func = cmd_search; else if (strcasecmp(cmd, "SORT") == 0) client->cmd_func = cmd_sort; break; } if (client->cmd_func != NULL) { client->cmd_uid = TRUE; return client->cmd_func(client); } else { client_send_tagline(client, t_strconcat( "BAD Unknown UID command ", cmd, NULL)); return TRUE; } }