projects
/
apps
/
madmutt.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Rocco Rutte:
[apps/madmutt.git]
/
muttlib.c
diff --git
a/muttlib.c
b/muttlib.c
index
27b73f2
..
234efd2
100644
(file)
--- a/
muttlib.c
+++ b/
muttlib.c
@@
-86,7
+86,7
@@
void mutt_adv_mktemp (char *s, size_t l)
mktemp (s);
if (period != NULL) {
*period = '.';
mktemp (s);
if (period != NULL) {
*period = '.';
- sl =
safe
_strlen (s);
+ sl =
mutt
_strlen (s);
strfcpy (s + sl, period, l - sl);
}
}
strfcpy (s + sl, period, l - sl);
}
}
@@
-276,7
+276,7
@@
void mutt_free_header (HEADER ** h)
int mutt_matches_ignore (const char *s, LIST * t)
{
for (; t; t = t->next) {
int mutt_matches_ignore (const char *s, LIST * t)
{
for (; t; t = t->next) {
- if (!ascii_strncasecmp (s, t->data,
safe
_strlen (t->data))
+ if (!ascii_strncasecmp (s, t->data,
mutt
_strlen (t->data))
|| *t->data == '*')
return 1;
}
|| *t->data == '*')
return 1;
}
@@
-362,10
+362,9
@@
char *_mutt_expand_path (char *s, size_t slen, int rx)
case '+':
{
#ifdef USE_IMAP
case '+':
{
#ifdef USE_IMAP
- /* if folder = {host} or imap[s]://host/: don't append slash */
- if (imap_is_magic (NONULL (Maildir), NULL) == M_IMAP &&
- (Maildir[safe_strlen (Maildir) - 1] == '}' ||
- Maildir[safe_strlen (Maildir) - 1] == '/'))
+ /* if folder = imap[s]://host/: don't append slash */
+ if (imap_is_magic (NONULL (Maildir), NULL) == M_IMAP &&
+ Maildir[mutt_strlen (Maildir) - 1] == '/')
strfcpy (p, NONULL (Maildir), sizeof (p));
else
#endif
strfcpy (p, NONULL (Maildir), sizeof (p));
else
#endif
@@
-457,13
+456,6
@@
char *_mutt_expand_path (char *s, size_t slen, int rx)
}
while (recurse);
}
while (recurse);
-#ifdef USE_IMAP
- /* Rewrite IMAP path in canonical form - aids in string comparisons of
- * folders. May possibly fail, in which case s should be the same. */
- if (imap_is_magic (s, NULL) == M_IMAP)
- imap_expand_path (s, slen);
-#endif
-
return (s);
}
return (s);
}
@@
-497,7
+489,7
@@
char *mutt_gecos_name (char *dest, size_t destlen, struct passwd *pw)
else
strfcpy (dest, pw->pw_gecos, destlen);
else
strfcpy (dest, pw->pw_gecos, destlen);
- pwnl =
safe
_strlen (pw->pw_name);
+ pwnl =
mutt
_strlen (pw->pw_name);
for (idx = 0; dest[idx]; idx++) {
if (dest[idx] == '&') {
for (idx = 0; dest[idx]; idx++) {
if (dest[idx] == '&') {
@@
-709,15
+701,15
@@
void mutt_pretty_mailbox (char *s)
}
*q = 0;
}
*q = 0;
- if (safe_strncmp (s, Maildir, (len =
safe
_strlen (Maildir))) == 0 &&
+ if (safe_strncmp (s, Maildir, (len =
mutt
_strlen (Maildir))) == 0 &&
s[len] == '/') {
*s++ = '=';
s[len] == '/') {
*s++ = '=';
- memmove (s, s + len,
safe
_strlen (s + len) + 1);
+ memmove (s, s + len,
mutt
_strlen (s + len) + 1);
}
}
- else if (safe_strncmp (s, Homedir, (len =
safe
_strlen (Homedir))) == 0 &&
+ else if (safe_strncmp (s, Homedir, (len =
mutt
_strlen (Homedir))) == 0 &&
s[len] == '/') {
*s++ = '~';
s[len] == '/') {
*s++ = '~';
- memmove (s, s + len - 1,
safe
_strlen (s + len - 1) + 1);
+ memmove (s, s + len - 1,
mutt
_strlen (s + len - 1) + 1);
}
}
}
}
@@
-757,7
+749,7
@@
void mutt_expand_fmt (char *dest, size_t destlen, const char *fmt,
size_t slen;
int found = 0;
size_t slen;
int found = 0;
- slen =
safe
_strlen (src);
+ slen =
mutt
_strlen (src);
destlen--;
for (p = fmt, d = dest; destlen && *p; p++) {
destlen--;
for (p = fmt, d = dest; destlen && *p; p++) {
@@
-909,7
+901,7
@@
int mutt_skipchars (const char *s, const char *c)
ret++;
s++;
}
ret++;
s++;
}
- return (
safe
_strlen (p));
+ return (
mutt
_strlen (p));
}
void mutt_FormatString (char *dest, /* output buffer */
}
void mutt_FormatString (char *dest, /* output buffer */
@@
-1009,7
+1001,7
@@
void mutt_FormatString (char *dest, /* output buffer */
if (count > col) {
count -= col; /* how many columns left on this line */
mutt_FormatString (buf, sizeof (buf), src, callback, data, flags);
if (count > col) {
count -= col; /* how many columns left on this line */
mutt_FormatString (buf, sizeof (buf), src, callback, data, flags);
- wid =
safe
_strlen (buf);
+ wid =
mutt
_strlen (buf);
if (count > wid) {
count -= wid; /* how many chars to pad */
memset (wptr, ch, count);
if (count > wid) {
count -= wid; /* how many chars to pad */
memset (wptr, ch, count);
@@
-1067,7
+1059,7
@@
void mutt_FormatString (char *dest, /* output buffer */
*p = '_';
}
*p = '_';
}
- if ((len =
safe
_strlen (buf)) + wlen > destlen)
+ if ((len =
mutt
_strlen (buf)) + wlen > destlen)
len = (destlen - wlen > 0) ? (destlen - wlen) : 0;
memcpy (wptr, buf, len);
len = (destlen - wlen > 0) ? (destlen - wlen) : 0;
memcpy (wptr, buf, len);
@@
-1138,7
+1130,7
@@
FILE *mutt_open_read (const char *path, pid_t * thepid)
FILE *f;
struct stat s;
FILE *f;
struct stat s;
- int len =
safe
_strlen (path);
+ int len =
mutt
_strlen (path);
if (path[len - 1] == '|') {
/* read from a pipe */
if (path[len - 1] == '|') {
/* read from a pipe */
@@
-1196,7
+1188,7
@@
int mutt_save_confirm (const char *s, struct stat *st)
}
if (option (OPTCONFIRMAPPEND) &&
}
if (option (OPTCONFIRMAPPEND) &&
- (!TrashPath || (
safe
_strcmp (s, TrashPath) != 0)))
+ (!TrashPath || (
mutt
_strcmp (s, TrashPath) != 0)))
/* if we're appending to the trash, there's no point in asking */
{
snprintf (tmp, sizeof (tmp), _("Append messages to %s?"), s);
/* if we're appending to the trash, there's no point in asking */
{
snprintf (tmp, sizeof (tmp), _("Append messages to %s?"), s);
@@
-1239,7
+1231,7
@@
void state_prefix_putc (char c, STATE * s)
if (s->flags & M_PENDINGPREFIX) {
int i;
if (s->flags & M_PENDINGPREFIX) {
int i;
- i =
safe
_strlen (Quotebuf);
+ i =
mutt
_strlen (Quotebuf);
Quotebuf[i++] = c;
Quotebuf[i] = '\0';
if (i == sizeof (Quotebuf) - 1 || c == '\n') {
Quotebuf[i++] = c;
Quotebuf[i] = '\0';
if (i == sizeof (Quotebuf) - 1 || c == '\n') {
@@
-1293,7
+1285,7
@@
int state_printf (STATE * s, const char *fmt, ...)
void state_mark_attach (STATE * s)
{
void state_mark_attach (STATE * s)
{
- if ((s->flags & M_DISPLAY) && !
safe
_strcmp (Pager, "builtin"))
+ if ((s->flags & M_DISPLAY) && !
mutt
_strcmp (Pager, "builtin"))
state_puts (AttachmentMarker, s);
}
state_puts (AttachmentMarker, s);
}
@@
-1361,14
+1353,14
@@
BUFFER *mutt_buffer_from (BUFFER * b, char *seed)
b = mutt_buffer_init (b);
b->data = safe_strdup (seed);
b = mutt_buffer_init (b);
b->data = safe_strdup (seed);
- b->dsize =
safe
_strlen (seed);
+ b->dsize =
mutt
_strlen (seed);
b->dptr = (char *) b->data + b->dsize;
return b;
}
void mutt_buffer_addstr (BUFFER * buf, const char *s)
{
b->dptr = (char *) b->data + b->dsize;
return b;
}
void mutt_buffer_addstr (BUFFER * buf, const char *s)
{
- mutt_buffer_add (buf, s,
safe
_strlen (s));
+ mutt_buffer_add (buf, s,
mutt
_strlen (s));
}
void mutt_buffer_addch (BUFFER * buf, char c)
}
void mutt_buffer_addch (BUFFER * buf, char c)