(get_attribute_type): Removed. util_attribute_to_type() does the job; (imap4d_s…
…tore0): Use util_attribute_to_type().
Showing
1 changed file
with
1 additions
and
21 deletions
... | @@ -20,7 +20,6 @@ | ... | @@ -20,7 +20,6 @@ |
20 | /* | 20 | /* |
21 | * Now you're messing with a sumbitch | 21 | * Now you're messing with a sumbitch |
22 | */ | 22 | */ |
23 | static int get_attribute_type __P ((const char *, int *)); | ||
24 | 23 | ||
25 | int | 24 | int |
26 | imap4d_store (struct imap4d_command *command, char *arg) | 25 | imap4d_store (struct imap4d_command *command, char *arg) |
... | @@ -123,7 +122,7 @@ imap4d_store0 (char *arg, int isuid, char *resp, size_t resplen) | ... | @@ -123,7 +122,7 @@ imap4d_store0 (char *arg, int isuid, char *resp, size_t resplen) |
123 | int type = 0; | 122 | int type = 0; |
124 | char item[64] = ""; | 123 | char item[64] = ""; |
125 | util_token (item, sizeof (item), &items); | 124 | util_token (item, sizeof (item), &items); |
126 | if (get_attribute_type (item, &type)) | 125 | if (!util_attribute_to_type (item, &type)) |
127 | { | 126 | { |
128 | if (how == STORE_ADD ) | 127 | if (how == STORE_ADD ) |
129 | attribute_set_flags (attr, type); | 128 | attribute_set_flags (attr, type); |
... | @@ -157,22 +156,3 @@ imap4d_store0 (char *arg, int isuid, char *resp, size_t resplen) | ... | @@ -157,22 +156,3 @@ imap4d_store0 (char *arg, int isuid, char *resp, size_t resplen) |
157 | return RESP_OK; | 156 | return RESP_OK; |
158 | } | 157 | } |
159 | 158 | ||
160 | static int | ||
161 | get_attribute_type (const char *item, int *type) | ||
162 | { | ||
163 | if (strcasecmp (item, "\\Answered") == 0) | ||
164 | *type = MU_ATTRIBUTE_ANSWERED; | ||
165 | else if (strcasecmp (item, "\\Deleted") == 0) | ||
166 | *type = MU_ATTRIBUTE_DELETED; | ||
167 | else if (strcasecmp (item, "\\Draft") == 0) | ||
168 | *type = MU_ATTRIBUTE_DRAFT; | ||
169 | else if (strcasecmp (item, "\\Flagged") == 0) | ||
170 | *type = MU_ATTRIBUTE_FLAGGED; | ||
171 | else if (strcasecmp (item, "\\Recent") == 0) | ||
172 | *type = MU_ATTRIBUTE_RECENT; | ||
173 | else if (strcasecmp (item, "\\Seen") == 0) | ||
174 | *type = MU_ATTRIBUTE_SEEN; | ||
175 | else | ||
176 | return 0; | ||
177 | return 1; | ||
178 | } | ... | ... |
-
Please register or sign in to post a comment