projects
/
apps
/
madmutt.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
lot of restructurations. work in progress, *but* it does not seems to
[apps/madmutt.git]
/
rfc822.c
diff --git
a/rfc822.c
b/rfc822.c
index
25aa1c4
..
30f1379
100644
(file)
--- a/
rfc822.c
+++ b/
rfc822.c
@@
-17,10
+17,10
@@
#include <lib-lib/mem.h>
#include <lib-lib/str.h>
#include <lib-lib/mem.h>
#include <lib-lib/str.h>
+#include <lib-lib/ascii.h>
#include <lib-lib/macros.h>
#include "mutt.h"
#include <lib-lib/macros.h>
#include "mutt.h"
-#include "ascii.h"
#include "mutt_idna.h"
#include "mutt_idna.h"
@@
-165,7
+165,7
@@
static const char *parse_mailboxdomain (const char *s, const char *nonspecial,
const char *ps;
while (*s) {
const char *ps;
while (*s) {
-
SKIPWS
(s);
+
s = vskipspaces
(s);
if (strchr (nonspecial, *s) == NULL && is_special (*s))
return s;
if (strchr (nonspecial, *s) == NULL && is_special (*s))
return s;
@@
-224,7
+224,7
@@
static const char *parse_route_addr (const char *s,
char token[STRING];
size_t tokenlen = 0;
char token[STRING];
size_t tokenlen = 0;
-
SKIPWS
(s);
+
s = vskipspaces
(s);
/* find the end of the route */
if (*s == '@') {
/* find the end of the route */
if (*s == '@') {
@@
-313,8
+313,7
@@
ADDRESS *rfc822_parse_adrlist (ADDRESS * top, const char *s)
ws_pending = isspace ((unsigned char) *s);
ws_pending = isspace ((unsigned char) *s);
- SKIPWS (s);
- begin = s;
+ begin = s = vskipspaces(s);
while (*s) {
if (*s == ',') {
if (phraselen) {
while (*s) {
if (*s == ',') {
if (phraselen) {
@@
-330,8
+329,7
@@
ADDRESS *rfc822_parse_adrlist (ADDRESS * top, const char *s)
commentlen = 0;
phraselen = 0;
s++;
commentlen = 0;
phraselen = 0;
s++;
- begin = s;
- SKIPWS (begin);
+ begin = vskipspaces(s);
}
else if (*s == '(') {
if (commentlen && commentlen < sizeof (comment) - 1)
}
else if (*s == '(') {
if (commentlen && commentlen < sizeof (comment) - 1)
@@
-359,8
+357,7
@@
ADDRESS *rfc822_parse_adrlist (ADDRESS * top, const char *s)
phraselen = 0;
commentlen = 0;
s++;
phraselen = 0;
commentlen = 0;
s++;
- begin = s;
- SKIPWS (begin);
+ begin = vskipspaces(s);
}
else if (*s == ';') {
if (phraselen) {
}
else if (*s == ';') {
if (phraselen) {
@@
-383,8
+380,7
@@
ADDRESS *rfc822_parse_adrlist (ADDRESS * top, const char *s)
phraselen = 0;
commentlen = 0;
s++;
phraselen = 0;
commentlen = 0;
s++;
- begin = s;
- SKIPWS (begin);
+ begin = vskipspaces(s);
}
else if (*s == '<') {
terminate_buffer (phrase, phraselen);
}
else if (*s == '<') {
terminate_buffer (phrase, phraselen);
@@
-425,7
+421,7
@@
ADDRESS *rfc822_parse_adrlist (ADDRESS * top, const char *s)
s = ps;
}
ws_pending = isspace ((unsigned char) *s);
s = ps;
}
ws_pending = isspace ((unsigned char) *s);
-
SKIPWS
(s);
+
s = vskipspaces
(s);
}
if (phraselen) {
}
if (phraselen) {
@@
-473,10
+469,10
@@
rfc822_cat (char *buf, size_t buflen, const char *value, const char *specials)
}
*pc++ = '"';
*pc = 0;
}
*pc++ = '"';
*pc = 0;
-
strfcpy (buf, tmp, buflen
);
+
m_strcpy(buf, buflen, tmp
);
}
else
}
else
-
strfcpy (buf, value, buflen
);
+
m_strcpy(buf, buflen, value
);
}
void rfc822_write_address_single (char *buf, size_t buflen, ADDRESS * addr,
}
void rfc822_write_address_single (char *buf, size_t buflen, ADDRESS * addr,
@@
-517,7
+513,7
@@
void rfc822_write_address_single (char *buf, size_t buflen, ADDRESS * addr,
else {
if (!buflen)
goto done;
else {
if (!buflen)
goto done;
-
strfcpy (pbuf, addr->personal, buflen
);
+
m_strcpy(pbuf, buflen, addr->personal
);
len = m_strlen(pbuf);
pbuf += len;
buflen -= len;
len = m_strlen(pbuf);
pbuf += len;
buflen -= len;
@@
-540,11
+536,11
@@
void rfc822_write_address_single (char *buf, size_t buflen, ADDRESS * addr,
if (!buflen)
goto done;
if (ascii_strcmp (addr->mailbox, "@") && !display) {
if (!buflen)
goto done;
if (ascii_strcmp (addr->mailbox, "@") && !display) {
-
strfcpy (pbuf, addr->mailbox, buflen
);
+
m_strcpy(pbuf, buflen, addr->mailbox
);
len = m_strlen(pbuf);
}
else if (ascii_strcmp (addr->mailbox, "@") && display) {
len = m_strlen(pbuf);
}
else if (ascii_strcmp (addr->mailbox, "@") && display) {
-
strfcpy (pbuf, mutt_addr_for_display (addr), buflen
);
+
m_strcpy(pbuf, buflen, mutt_addr_for_display(addr)
);
len = m_strlen(pbuf);
}
else {
len = m_strlen(pbuf);
}
else {