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]
/
handler.c
diff --git
a/handler.c
b/handler.c
index
505fb38
..
a30ecd4
100644
(file)
--- a/
handler.c
+++ b/
handler.c
@@
-242,7
+242,7
@@
void mutt_decode_quoted (STATE * s, long len, int istext, iconv_t cd)
if (fgets (line, MIN ((ssize_t) sizeof (line), len + 1), s->fpin) == NULL)
break;
if (fgets (line, MIN ((ssize_t) sizeof (line), len + 1), s->fpin) == NULL)
break;
- linelen =
mutt_str
len (line);
+ linelen =
str_
len (line);
len -= linelen;
/*
len -= linelen;
/*
@@
-369,15
+369,15
@@
void mutt_decode_uuencoded (STATE * s, long len, int istext, iconv_t cd)
while (len > 0) {
if ((fgets (tmps, sizeof (tmps), s->fpin)) == NULL)
return;
while (len > 0) {
if ((fgets (tmps, sizeof (tmps), s->fpin)) == NULL)
return;
- len -=
mutt_str
len (tmps);
- if ((!s
afe_str
ncmp (tmps, "begin", 5)) && ISSPACE (tmps[5]))
+ len -=
str_
len (tmps);
+ if ((!s
tr_
ncmp (tmps, "begin", 5)) && ISSPACE (tmps[5]))
break;
}
while (len > 0) {
if ((fgets (tmps, sizeof (tmps), s->fpin)) == NULL)
return;
break;
}
while (len > 0) {
if ((fgets (tmps, sizeof (tmps), s->fpin)) == NULL)
return;
- len -=
mutt_str
len (tmps);
- if (!s
afe_str
ncmp (tmps, "end", 3))
+ len -=
str_
len (tmps);
+ if (!s
tr_
ncmp (tmps, "end", 3))
break;
pt = tmps;
linelen = decode_byte (*pt);
break;
pt = tmps;
linelen = decode_byte (*pt);
@@
-517,7
+517,7
@@
static void enriched_wrap (struct enriched_state *stte)
stte->indent_len = 0;
if (stte->s->prefix) {
state_puts (stte->s->prefix, stte->s);
stte->indent_len = 0;
if (stte->s->prefix) {
state_puts (stte->s->prefix, stte->s);
- stte->indent_len +=
mutt_str
len (stte->s->prefix);
+ stte->indent_len +=
str_
len (stte->s->prefix);
}
if (stte->tag_level[RICH_EXCERPT]) {
}
if (stte->tag_level[RICH_EXCERPT]) {
@@
-525,11
+525,11
@@
static void enriched_wrap (struct enriched_state *stte)
while (x) {
if (stte->s->prefix) {
state_puts (stte->s->prefix, stte->s);
while (x) {
if (stte->s->prefix) {
state_puts (stte->s->prefix, stte->s);
- stte->indent_len +=
mutt_str
len (stte->s->prefix);
+ stte->indent_len +=
str_
len (stte->s->prefix);
}
else {
state_puts ("> ", stte->s);
}
else {
state_puts ("> ", stte->s);
- stte->indent_len +=
mutt_str
len ("> ");
+ stte->indent_len +=
str_
len ("> ");
}
x--;
}
}
x--;
}
@@
-631,7
+631,7
@@
static void enriched_puts (char *s, struct enriched_state *stte)
{
char *c;
{
char *c;
- if (stte->buff_len < stte->buff_used +
mutt_str
len (s)) {
+ if (stte->buff_len < stte->buff_used +
str_
len (s)) {
stte->buff_len += LONG_STRING;
safe_realloc (&stte->buffer, stte->buff_len + 1);
}
stte->buff_len += LONG_STRING;
safe_realloc (&stte->buffer, stte->buff_len + 1);
}
@@
-735,7
+735,7
@@
void text_enriched_handler (BODY * a, STATE * s)
if (s->prefix) {
state_puts (s->prefix, s);
if (s->prefix) {
state_puts (s->prefix, s);
- stte.indent_len +=
mutt_str
len (s->prefix);
+ stte.indent_len +=
str_
len (s->prefix);
}
while (state != DONE) {
}
while (state != DONE) {
@@
-845,7
+845,7
@@
static void print_flowed_line (char *line, STATE * s, int ql)
{
int width;
char *pos, *oldpos;
{
int width;
char *pos, *oldpos;
- int len =
mutt_str
len (line);
+ int len =
str_
len (line);
int i;
if (MaxLineLength > 0) {
int i;
if (MaxLineLength > 0) {
@@
-869,7
+869,7
@@
static void print_flowed_line (char *line, STATE * s, int ql)
/* fprintf(stderr,"print_flowed_line will print `%s' with ql = %d\n",line,ql); */
/* fprintf(stderr,"print_flowed_line will print `%s' with ql = %d\n",line,ql); */
- if (
mutt_str
len (line) == 0) {
+ if (
str_
len (line) == 0) {
if (option (OPTQUOTEEMPTY)) {
if (s->prefix)
state_puts(s->prefix,s);
if (option (OPTQUOTEEMPTY)) {
if (s->prefix)
state_puts(s->prefix,s);
@@
-950,24
+950,24
@@
static void text_plain_flowed_handler (BODY * a, STATE * s)
while (bytes > 0 && fgets (buf, sizeof (buf), s->fpin)) {
while (bytes > 0 && fgets (buf, sizeof (buf), s->fpin)) {
- bytes -=
mutt_str
len (buf);
+ bytes -=
str_
len (buf);
newql = get_quote_level (buf);
if ((t = strrchr (buf, '\n')) || (t = strrchr (buf, '\r'))) {
*t = '\0';
newql = get_quote_level (buf);
if ((t = strrchr (buf, '\n')) || (t = strrchr (buf, '\r'))) {
*t = '\0';
- if (
mutt_strlen (curline) > 0 && curline[mutt_str
len (curline) - 1] == ' '
+ if (
str_len (curline) > 0 && curline[str_
len (curline) - 1] == ' '
&& newql == quotelevel
&& strcmp (curline + quotelevel, "-- ") != 0) {
if (buf[newql] == ' ')
&& newql == quotelevel
&& strcmp (curline + quotelevel, "-- ") != 0) {
if (buf[newql] == ' ')
- curline[
mutt_str
len (curline) - 1] = '\0';
+ curline[
str_
len (curline) - 1] = '\0';
- curline = realloc (curline, curline_len +
mutt_str
len (buf));
+ curline = realloc (curline, curline_len +
str_
len (buf));
if (curline_len == 1)
*curline = '\0';
if (curline_len == 1)
*curline = '\0';
- curline_len +=
mutt_str
len (buf);
- s
afe_str
ncat (curline, curline_len, buf + newql,
-
mutt_str
len (buf + newql));
+ curline_len +=
str_
len (buf);
+ s
tr_
ncat (curline, curline_len, buf + newql,
+
str_
len (buf + newql));
}
else {
if (first_line) {
}
else {
if (first_line) {
@@
-978,11
+978,11
@@
static void text_plain_flowed_handler (BODY * a, STATE * s)
}
FREE (&curline);
curline_len = 1;
}
FREE (&curline);
curline_len = 1;
- curline = realloc (curline, curline_len +
mutt_str
len (buf));
+ curline = realloc (curline, curline_len +
str_
len (buf));
if (curline_len == 1)
*curline = '\0';
if (curline_len == 1)
*curline = '\0';
- curline_len +=
mutt_str
len (buf);
- s
afe_strncat (curline, curline_len, buf, mutt_str
len (buf));
+ curline_len +=
str_
len (buf);
+ s
tr_ncat (curline, curline_len, buf, str_
len (buf));
quotelevel = newql;
}
}
quotelevel = newql;
}
}
@@
-990,13
+990,13
@@
static void text_plain_flowed_handler (BODY * a, STATE * s)
/* in case there's no line end it's likely the last line
* so append to current (if any) */
if (buf[newql] == ' ')
/* in case there's no line end it's likely the last line
* so append to current (if any) */
if (buf[newql] == ' ')
- curline[
mutt_str
len (curline) - 1] = '\0';
- curline = realloc (curline, curline_len +
mutt_str
len (buf));
+ curline[
str_
len (curline) - 1] = '\0';
+ curline = realloc (curline, curline_len +
str_
len (buf));
if (curline_len == 1)
*curline = '\0';
if (curline_len == 1)
*curline = '\0';
- curline_len +=
mutt_str
len (buf);
- s
afe_str
ncat (curline, curline_len, buf + newql,
-
mutt_str
len (buf + newql));
+ curline_len +=
str_
len (buf);
+ s
tr_
ncat (curline, curline_len, buf + newql,
+
str_
len (buf + newql));
break;
}
}
break;
}
}
@@
-1053,7
+1053,7
@@
static void alternative_handler (BODY * a, STATE * s)
}
else {
wild = 1;
}
else {
wild = 1;
- btlen =
mutt_str
len (t->data);
+ btlen =
str_
len (t->data);
}
if (a && a->parts)
}
if (a && a->parts)
@@
-1310,7
+1310,7
@@
void autoview_handler (BODY * a, STATE * s)
snprintf (type, sizeof (type), "%s/%s", TYPE (a), a->subtype);
rfc1524_mailcap_lookup (a, type, entry, M_AUTOVIEW);
snprintf (type, sizeof (type), "%s/%s", TYPE (a), a->subtype);
rfc1524_mailcap_lookup (a, type, entry, M_AUTOVIEW);
- fname = s
afe_str
dup (a->filename);
+ fname = s
tr_
dup (a->filename);
mutt_sanitize_filename (fname, 1);
rfc1524_expand_filename (entry->nametemplate, fname, tempfile,
sizeof (tempfile));
mutt_sanitize_filename (fname, 1);
rfc1524_expand_filename (entry->nametemplate, fname, tempfile,
sizeof (tempfile));
@@
-1602,7
+1602,7
@@
void mutt_body_handler (BODY * b, STATE * s)
handler = mutt_signed_handler;
}
else if ((WithCrypto & APPLICATION_PGP)
handler = mutt_signed_handler;
}
else if ((WithCrypto & APPLICATION_PGP)
- && s
afe_str
casecmp ("encrypted", b->subtype) == 0) {
+ && s
tr_
casecmp ("encrypted", b->subtype) == 0) {
p = mutt_get_parameter ("protocol", b->parameter);
if (!p)
p = mutt_get_parameter ("protocol", b->parameter);
if (!p)