projects
/
apps
/
madmutt.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
small fixes.
[apps/madmutt.git]
/
imap
/
imap.c
diff --git
a/imap/imap.c
b/imap/imap.c
index
2a4feca
..
4b004f1
100644
(file)
--- a/
imap/imap.c
+++ b/
imap/imap.c
@@
-493,8
+493,7
@@
static char *imap_get_flags (LIST ** hflags, char *s)
debug_print (1, ("not a FLAGS response: %s\n", s));
return NULL;
}
debug_print (1, ("not a FLAGS response: %s\n", s));
return NULL;
}
- s += 5;
- SKIPWS (s);
+ s = vskipspaces(s + 5);
if (*s != '(') {
debug_print (1, ("bogus FLAGS response: %s\n", s));
return NULL;
if (*s != '(') {
debug_print (1, ("bogus FLAGS response: %s\n", s));
return NULL;
@@
-505,8
+504,7
@@
static char *imap_get_flags (LIST ** hflags, char *s)
*hflags = flags;
while (*s && *s != ')') {
*hflags = flags;
while (*s && *s != ')') {
- s++;
- SKIPWS (s);
+ s = vskipspaces(s + 1);
flag_word = s;
while (*s && (*s != ')') && !ISSPACE (*s))
s++;
flag_word = s;
while (*s && (*s != ')') && !ISSPACE (*s))
s++;
@@
-1176,7
+1174,7
@@
int imap_mailbox_check (char *path, int new)
p_delete(&mx.mbox);
imap_munge_mbox_name (mbox, sizeof (mbox), buf);
p_delete(&mx.mbox);
imap_munge_mbox_name (mbox, sizeof (mbox), buf);
-
strfcpy (mbox_unquoted, buf, sizeof (mbox_unquoted)
);
+
m_strcpy(mbox_unquoted, sizeof(mbox_unquoted), buf
);
/* The draft IMAP implementor's guide warns againts using the STATUS
* command on a mailbox that you have selected
/* The draft IMAP implementor's guide warns againts using the STATUS
* command on a mailbox that you have selected
@@
-1184,8
+1182,8
@@
int imap_mailbox_check (char *path, int new)
if (m_strcmp(mbox_unquoted, idata->mailbox) == 0
|| (ascii_strcasecmp (mbox_unquoted, "INBOX") == 0
if (m_strcmp(mbox_unquoted, idata->mailbox) == 0
|| (ascii_strcasecmp (mbox_unquoted, "INBOX") == 0
- &&
str_casecmp
(mbox_unquoted, idata->mailbox) == 0)) {
-
strfcpy (buf, "NOOP", sizeof (buf)
);
+ &&
m_strcasecmp
(mbox_unquoted, idata->mailbox) == 0)) {
+
m_strcpy(buf, sizeof(buf), "NOOP"
);
}
else if (mutt_bit_isset (idata->capabilities, IMAP4REV1) ||
mutt_bit_isset (idata->capabilities, STATUS)) {
}
else if (mutt_bit_isset (idata->capabilities, IMAP4REV1) ||
mutt_bit_isset (idata->capabilities, STATUS)) {
@@
-1209,8
+1207,8
@@
int imap_mailbox_check (char *path, int new)
/* The mailbox name may or may not be quoted here. We could try to
* munge the server response and compare with quoted (or vise versa)
* but it is probably more efficient to just strncmp against both. */
/* The mailbox name may or may not be quoted here. We could try to
* munge the server response and compare with quoted (or vise versa)
* but it is probably more efficient to just strncmp against both. */
- if (
str_ncmp
(mbox_unquoted, s, m_strlen(mbox_unquoted)) == 0
- ||
str_ncmp
(mbox, s, m_strlen(mbox)) == 0) {
+ if (
m_strncmp
(mbox_unquoted, s, m_strlen(mbox_unquoted)) == 0
+ ||
m_strncmp
(mbox, s, m_strlen(mbox)) == 0) {
s = imap_next_word (s);
s = imap_next_word (s);
if (isdigit ((unsigned char) *s)) {
s = imap_next_word (s);
s = imap_next_word (s);
if (isdigit ((unsigned char) *s)) {
@@
-1311,9
+1309,8
@@
static int imap_compile_search (const pattern_t* pat, BUFFER* buf)
mutt_buffer_addch (buf, ' ');
/* and field */
mutt_buffer_addch (buf, ' ');
/* and field */
- *delim = ':';
- delim++;
- SKIPWS(delim);
+ *delim++ = ':';
+ delim = vskipspaces(delim);
imap_quote_string (term, sizeof (term), delim);
mutt_buffer_addstr (buf, term);
break;
imap_quote_string (term, sizeof (term), delim);
mutt_buffer_addstr (buf, term);
break;
@@
-1514,9
+1511,9
@@
static int imap_complete_hosts (char *dest, size_t len) {
return (-1);
for (i = 0; i < Incoming->length; i++) {
mailbox = (BUFFY*) Incoming->data[i];
return (-1);
for (i = 0; i < Incoming->length; i++) {
mailbox = (BUFFY*) Incoming->data[i];
- if (!
str_ncmp
(dest, mailbox->path, matchlen)) {
+ if (!
m_strncmp
(dest, mailbox->path, matchlen)) {
if (rc) {
if (rc) {
-
strfcpy (dest, mailbox->path, len
);
+
m_strcpy(dest, len, mailbox->path
);
rc = 0;
} else
longest_common_prefix (dest, mailbox->path, matchlen, len);
rc = 0;
} else
longest_common_prefix (dest, mailbox->path, matchlen, len);
@@
-1535,9
+1532,9
@@
static int imap_complete_hosts (char *dest, size_t len) {
url.user = NULL;
url.path = NULL;
url_ciss_tostring (&url, urlstr, sizeof (urlstr), 0);
url.user = NULL;
url.path = NULL;
url_ciss_tostring (&url, urlstr, sizeof (urlstr), 0);
- if (!
str_ncmp
(dest, urlstr, matchlen)) {
+ if (!
m_strncmp
(dest, urlstr, matchlen)) {
if (rc) {
if (rc) {
-
strfcpy (dest, urlstr, len
);
+
m_strcpy(dest, len, urlstr
);
rc = 0;
} else
longest_common_prefix (dest, urlstr, matchlen, len);
rc = 0;
} else
longest_common_prefix (dest, urlstr, matchlen, len);
@@
-1563,7
+1560,7
@@
int imap_complete (char *dest, size_t dlen, char *path) {
IMAP_MBOX mx;
if (imap_parse_path (path, &mx) || !mx.mbox) {
IMAP_MBOX mx;
if (imap_parse_path (path, &mx) || !mx.mbox) {
-
strfcpy (dest, path, dlen
);
+
m_strcpy(dest, dlen, path
);
return imap_complete_hosts (dest, dlen);
}
return imap_complete_hosts (dest, dlen);
}
@@
-1571,7
+1568,7
@@
int imap_complete (char *dest, size_t dlen, char *path) {
* known mailboxes/hooks/etc */
if (!(idata = imap_conn_find (&(mx.account), M_IMAP_CONN_NONEW))) {
p_delete(&mx.mbox);
* known mailboxes/hooks/etc */
if (!(idata = imap_conn_find (&(mx.account), M_IMAP_CONN_NONEW))) {
p_delete(&mx.mbox);
-
strfcpy (dest, path, dlen
);
+
m_strcpy(dest, dlen, path
);
return imap_complete_hosts (dest, dlen);
}
conn = idata->conn;
return imap_complete_hosts (dest, dlen);
}
conn = idata->conn;
@@
-1590,7
+1587,7
@@
int imap_complete (char *dest, size_t dlen, char *path) {
imap_cmd_start (idata, buf);
/* and see what the results are */
imap_cmd_start (idata, buf);
/* and see what the results are */
-
strfcpy (completion, NONULL (mx.mbox), sizeof (completion
));
+
m_strcpy(completion, sizeof(completion), NONULL(mx.mbox
));
do {
if (imap_parse_list_response (idata, &list_word, &noselect, &noinferiors,
&delim))
do {
if (imap_parse_list_response (idata, &list_word, &noselect, &noinferiors,
&delim))
@@
-1609,7
+1606,7
@@
int imap_complete (char *dest, size_t dlen, char *path) {
}
/* copy in first word */
if (!completions) {
}
/* copy in first word */
if (!completions) {
-
strfcpy (completion, list_word, sizeof (completion)
);
+
m_strcpy(completion, sizeof(completion), list_word
);
matchlen = m_strlen(completion);
completions++;
continue;
matchlen = m_strlen(completion);
completions++;
continue;