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
0325bb6e
...
0325bb6e97212f49c52e80fefa62ed324e6bc382
authored
2002-09-01 22:05:48 +0000
by
Sergey Poznyakoff
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Use mu_tempname
1 parent
42ad4962
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
11 deletions
examples/mimetest.c
mail/edit.c
mail/visual.c
examples/mimetest.c
View file @
0325bb6
...
...
@@ -222,7 +222,8 @@ message_display_parts (message_t msg, int indent)
}
if
((
ret
=
message_get_header
(
part
,
&
hdr
))
!=
0
)
{
fprintf
(
stderr
,
"message_get_header - %s
\n
"
,
mu_errstring
(
ret
));
fprintf
(
stderr
,
"message_get_header - %s
\n
"
,
mu_errstring
(
ret
));
exit
(
2
);
}
header_get_value
(
hdr
,
MU_HEADER_FROM
,
from
,
sizeof
(
from
),
NULL
);
...
...
@@ -233,7 +234,8 @@ message_display_parts (message_t msg, int indent)
printf
(
"%*.*sBegin
\n
"
,
indent
,
indent
,
""
);
if
((
ret
=
message_get_num_parts
(
part
,
&
nsubparts
))
!=
0
)
{
fprintf
(
stderr
,
"mime_get_num_parts - %s
\n
"
,
mu_errstring
(
ret
));
fprintf
(
stderr
,
"mime_get_num_parts - %s
\n
"
,
mu_errstring
(
ret
));
exit
(
2
);
}
message_display_parts
(
part
,
indent
+
indent_level
);
...
...
@@ -265,11 +267,10 @@ message_display_parts (message_t msg, int indent)
char
*
fname
=
NULL
;
message_aget_attachment_name
(
part
,
&
fname
);
if
(
fname
==
NULL
)
{
char
buffer
[
PATH_MAX
+
1
];
fname
=
tempnam
(
getcwd
(
buffer
,
PATH_MAX
),
"msg-"
);
}
printf
(
"%*.*sAttachment - saving [%s]
\n
"
,
indent
,
indent
,
""
,
fname
);
fname
=
mu_tempname
(
NULL
);
printf
(
"%*.*sAttachment - saving [%s]
\n
"
,
indent
,
indent
,
""
,
fname
);
printf
(
"%*.*sBegin
\n
"
,
indent
,
indent
,
""
);
/*FIXME: What is the 'data' argument for? */
message_save_attachment
(
part
,
NULL
,
NULL
);
...
...
mail/edit.c
View file @
0325bb6
...
...
@@ -28,9 +28,9 @@ mail_edit (int argc, char **argv)
return
util_msglist_command
(
mail_edit
,
argc
,
argv
,
1
);
else
{
char
*
file
=
tempnam
(
getenv
(
"TMPDIR"
),
"mu"
);
char
*
file
=
mu_tempname
(
NULL
);
util_do_command
(
"copy %s"
,
file
);
util_do_command
(
"shell %s %s"
,
getenv
(
"EDITOR"
),
file
);
util_do_command
(
"shell %s %s"
,
getenv
(
"EDITOR"
),
file
);
remove
(
file
);
free
(
file
);
return
0
;
...
...
mail/visual.c
View file @
0325bb6
...
...
@@ -30,9 +30,9 @@ mail_visual (int argc, char **argv)
{
message_t
msg
=
NULL
;
attribute_t
attr
=
NULL
;
char
*
file
=
tempnam
(
getenv
(
"TMPDIR"
),
"mu"
);
char
*
file
=
mu_tempname
(
NULL
);
util_do_command
(
"copy %s"
,
file
);
/* NOTE: copy does not set flags */
util_do_command
(
"copy %s"
,
file
);
util_do_command
(
"shell %s %s"
,
getenv
(
"VISUAL"
),
file
);
remove
(
file
);
...
...
Please
register
or
sign in
to post a comment