Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
John McEleney
/
mailutils
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
Commit
e7336cfd
...
e7336cfdb3181269b9ffdfd371c031af99c4c9ae
authored
2002-11-05 13:38:01 +0000
by
Sergey Poznyakoff
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
(var_quote): Output prefix sequence before each line of multiline headers.
1 parent
5bc9461d
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
4 deletions
mail/var.c
mail/var.c
View file @
e7336cf
...
...
@@ -452,7 +452,7 @@ var_quote (int argc, char **argv, compose_env_t *env)
size_t
n
=
0
;
char
*
prefix
=
"
\t
"
;
if
(
util_get_message
(
mbox
,
cursor
,
&
mesg
,
1
))
if
(
util_get_message
(
mbox
,
cursor
,
&
mesg
,
MSG_NODELETED
))
return
1
;
fprintf
(
stdout
,
"Interpolating: %d
\n
"
,
cursor
);
...
...
@@ -472,12 +472,26 @@ var_quote (int argc, char **argv, compose_env_t *env)
header_get_field_name
(
hdr
,
i
,
buf
,
sizeof
buf
,
NULL
);
if
(
mail_header_is_visible
(
buf
))
{
char
*
value
;
fprintf
(
ofile
,
"%s%s: "
,
prefix
,
buf
);
header_get_field_value
(
hdr
,
i
,
buf
,
sizeof
buf
,
NULL
);
fprintf
(
ofile
,
"%s
\n
"
,
buf
);
if
(
header_aget_value
(
hdr
,
buf
,
&
value
)
==
0
)
{
int
i
;
char
*
p
,
*
s
;
for
(
i
=
0
,
p
=
strtok_r
(
value
,
"
\n
"
,
&
s
);
p
;
p
=
strtok_r
(
NULL
,
"
\n
"
,
&
s
),
i
++
)
{
if
(
i
)
fprintf
(
ofile
,
"%s"
,
prefix
);
fprintf
(
ofile
,
"%s
\n
"
,
p
);
}
free
(
value
);
}
}
}
fprintf
(
ofile
,
"
\n
"
);
fprintf
(
ofile
,
"
%s
\n
"
,
prefix
);
message_get_body
(
mesg
,
&
body
);
body_get_stream
(
body
,
&
stream
);
}
...
...
Please
register
or
sign in
to post a comment