Minor changes.
* include/mailutils/cstr.h (mu_str_skip_class_comp) (mu_str_skip_cset_comp): New prototypes. * mailbox/strskip.c (mu_str_skip_class_comp) (mu_str_skip_cset_comp): New functions. * libmu_auth/ldap.c (find_pwcheck): Fix typo in function call. * libproto/pop/mbox.c: Fix typos in diagnostic messages.
Showing
4 changed files
with
24 additions
and
13 deletions
... | @@ -36,6 +36,9 @@ size_t mu_ltrim_cset (char *str, const char *cset); | ... | @@ -36,6 +36,9 @@ size_t mu_ltrim_cset (char *str, const char *cset); |
36 | char *mu_str_skip_class (const char *str, int class); | 36 | char *mu_str_skip_class (const char *str, int class); |
37 | char *mu_str_skip_cset (const char *str, const char *cset); | 37 | char *mu_str_skip_cset (const char *str, const char *cset); |
38 | 38 | ||
39 | char *mu_str_skip_class_comp (const char *str, int class); | ||
40 | char *mu_str_skip_cset_comp (const char *str, const char *cset); | ||
41 | |||
39 | 42 | ||
40 | #ifdef __cplusplus | 43 | #ifdef __cplusplus |
41 | } | 44 | } | ... | ... |
... | @@ -745,7 +745,7 @@ find_pwcheck (const char *algo, int len) | ... | @@ -745,7 +745,7 @@ find_pwcheck (const char *algo, int len) |
745 | { | 745 | { |
746 | struct passwd_algo *p; | 746 | struct passwd_algo *p; |
747 | for (p = pwtab; p->algo; p++) | 747 | for (p = pwtab; p->algo; p++) |
748 | if (len == p->len && mu_strncasecmp (p->algo, algo, len) == 0) | 748 | if (len == p->len && mu_c_strncasecmp (p->algo, algo, len) == 0) |
749 | return p->pwcheck; | 749 | return p->pwcheck; |
750 | return NULL; | 750 | return NULL; |
751 | } | 751 | } | ... | ... |
... | @@ -458,7 +458,7 @@ pop_parse_capa (pop_data_t mpd) | ... | @@ -458,7 +458,7 @@ pop_parse_capa (pop_data_t mpd) |
458 | } | 458 | } |
459 | else | 459 | else |
460 | { | 460 | { |
461 | /* mu_error ("CAPA not implemented\n"); */ /* FIXME */ | 461 | /* mu_error ("CAPA not implemented"); */ /* FIXME */ |
462 | return -1; | 462 | return -1; |
463 | } | 463 | } |
464 | } | 464 | } |
... | @@ -864,7 +864,7 @@ pop_open (mu_mailbox_t mbox, int flags) | ... | @@ -864,7 +864,7 @@ pop_open (mu_mailbox_t mbox, int flags) |
864 | 864 | ||
865 | default: | 865 | default: |
866 | /* | 866 | /* |
867 | mu_error ("pop_open unknown state\n"); | 867 | mu_error ("pop_open: unknown state"); |
868 | */ | 868 | */ |
869 | break; | 869 | break; |
870 | }/* End AUTHORISATION state. */ | 870 | }/* End AUTHORISATION state. */ |
... | @@ -920,13 +920,13 @@ pop_close (mu_mailbox_t mbox) | ... | @@ -920,13 +920,13 @@ pop_close (mu_mailbox_t mbox) |
920 | lets just be verbose about the error but close the connection | 920 | lets just be verbose about the error but close the connection |
921 | anyway. */ | 921 | anyway. */ |
922 | if (mu_c_strncasecmp (mpd->buffer, "+OK", 3) != 0) | 922 | if (mu_c_strncasecmp (mpd->buffer, "+OK", 3) != 0) |
923 | mu_error ("pop_close: %s\n", mpd->buffer); | 923 | mu_error ("pop_close: %s", mpd->buffer); |
924 | mu_stream_close (mbox->stream); | 924 | mu_stream_close (mbox->stream); |
925 | break; | 925 | break; |
926 | 926 | ||
927 | default: | 927 | default: |
928 | /* | 928 | /* |
929 | mu_error ("pop_close unknown state"); | 929 | mu_error ("pop_close: unknown state"); |
930 | */ | 930 | */ |
931 | break; | 931 | break; |
932 | } /* UPDATE state. */ | 932 | } /* UPDATE state. */ |
... | @@ -1209,7 +1209,7 @@ pop_messages_count (mu_mailbox_t mbox, size_t *pcount) | ... | @@ -1209,7 +1209,7 @@ pop_messages_count (mu_mailbox_t mbox, size_t *pcount) |
1209 | 1209 | ||
1210 | default: | 1210 | default: |
1211 | /* | 1211 | /* |
1212 | mu_error ("pop_messages_count: unknow state\n"); | 1212 | mu_error ("pop_messages_count: unknown state"); |
1213 | */ | 1213 | */ |
1214 | break; | 1214 | break; |
1215 | } | 1215 | } |
... | @@ -1327,7 +1327,7 @@ pop_expunge (mu_mailbox_t mbox) | ... | @@ -1327,7 +1327,7 @@ pop_expunge (mu_mailbox_t mbox) |
1327 | break; | 1327 | break; |
1328 | 1328 | ||
1329 | default: | 1329 | default: |
1330 | /* mu_error ("pop_expunge: unknow state\n"); */ | 1330 | /* mu_error ("pop_expunge: unknown state); */ |
1331 | break; | 1331 | break; |
1332 | } /* switch (state) */ | 1332 | } /* switch (state) */ |
1333 | } /* if mu_attribute_is_deleted() */ | 1333 | } /* if mu_attribute_is_deleted() */ |
... | @@ -1417,7 +1417,7 @@ pop_message_size (mu_message_t msg, size_t *psize) | ... | @@ -1417,7 +1417,7 @@ pop_message_size (mu_message_t msg, size_t *psize) |
1417 | 1417 | ||
1418 | default: | 1418 | default: |
1419 | /* | 1419 | /* |
1420 | mu_error ("pop_message_size state\n"); | 1420 | mu_error ("pop_message_size: unknown state"); |
1421 | */ | 1421 | */ |
1422 | break; | 1422 | break; |
1423 | } | 1423 | } |
... | @@ -1636,7 +1636,7 @@ pop_uidl (mu_message_t msg, char *buffer, size_t buflen, size_t *pnwriten) | ... | @@ -1636,7 +1636,7 @@ pop_uidl (mu_message_t msg, char *buffer, size_t buflen, size_t *pnwriten) |
1636 | 1636 | ||
1637 | default: | 1637 | default: |
1638 | /* | 1638 | /* |
1639 | mu_error ("pop_uidl state\n"); | 1639 | mu_error ("pop_uidl: unknown state"); |
1640 | */ | 1640 | */ |
1641 | break; | 1641 | break; |
1642 | } | 1642 | } |
... | @@ -1737,7 +1737,7 @@ pop_top (mu_header_t header, char *buffer, size_t buflen, | ... | @@ -1737,7 +1737,7 @@ pop_top (mu_header_t header, char *buffer, size_t buflen, |
1737 | CHECK_EAGAIN (mpd, status); | 1737 | CHECK_EAGAIN (mpd, status); |
1738 | MU_DEBUG (mpd->mbox->debug, MU_DEBUG_PROT, mpd->buffer); | 1738 | MU_DEBUG (mpd->mbox->debug, MU_DEBUG_PROT, mpd->buffer); |
1739 | /* if (mu_c_strncasecmp (mpd->buffer, "+OK", 3) != 0) | 1739 | /* if (mu_c_strncasecmp (mpd->buffer, "+OK", 3) != 0) |
1740 | mu_error ("TOP not implemented\n"); */ /* FIXME */ | 1740 | mu_error ("TOP not implemented"); */ /* FIXME */ |
1741 | mpd->state = POP_TOP_RX; | 1741 | mpd->state = POP_TOP_RX; |
1742 | 1742 | ||
1743 | case POP_TOP_RX: | 1743 | case POP_TOP_RX: |
... | @@ -2089,7 +2089,7 @@ pop_retr (pop_message_t mpm, char *buffer, size_t buflen, | ... | @@ -2089,7 +2089,7 @@ pop_retr (pop_message_t mpm, char *buffer, size_t buflen, |
2089 | /* A convenient break, this is here we can return 0, we're done. */ | 2089 | /* A convenient break, this is here we can return 0, we're done. */ |
2090 | 2090 | ||
2091 | default: | 2091 | default: |
2092 | /* mu_error ("pop_retr unknow state\n"); */ | 2092 | /* mu_error ("pop_retr: unknown state"); */ |
2093 | break; | 2093 | break; |
2094 | } /* Switch state. */ | 2094 | } /* Switch state. */ |
2095 | 2095 | ... | ... |
... | @@ -33,9 +33,17 @@ mu_str_skip_class (const char *str, int class) | ... | @@ -33,9 +33,17 @@ mu_str_skip_class (const char *str, int class) |
33 | } | 33 | } |
34 | 34 | ||
35 | char * | 35 | char * |
36 | mu_str_skip_cset (const char *str, const char *cset) | 36 | mu_str_skip_class_comp (const char *str, int class) |
37 | { | 37 | { |
38 | for (; *str && strchr (cset, *str) != NULL; str++) | 38 | for (; *str && !mu_c_is_class (*str, class); str++) |
39 | ; | ||
40 | return (char*) str; | ||
41 | } | ||
42 | |||
43 | char * | ||
44 | mu_str_skip_cset_comp (const char *str, const char *cset) | ||
45 | { | ||
46 | for (; *str && strchr (cset, *str) == NULL; str++) | ||
39 | ; | 47 | ; |
40 | return (char*) str; | 48 | return (char*) str; |
41 | } | 49 | } | ... | ... |
-
Please register or sign in to post a comment