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
5995a882
...
5995a882dd62f07f5563487fedc74968cd8b7d8b
authored
2002-08-07 15:30:30 +0000
by
Sergey Poznyakoff
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
(mail_expand_name): Use util_getenv() and util_folder_path().
1 parent
909d29b0
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
29 deletions
mail/file.c
mail/file.c
View file @
5995a88
...
...
@@ -32,8 +32,6 @@ static char *prev_name;
char
*
mail_expand_name
(
const
char
*
name
)
{
struct
mail_env_entry
*
env
;
switch
(
name
[
0
])
{
case
'#'
:
...
...
@@ -52,32 +50,7 @@ mail_expand_name (const char *name)
break
;
case
'+'
:
env
=
util_find_env
(
"folder"
);
if
(
!
env
->
set
)
{
util_error
(
"No value set for
\"
folder
\"
"
);
return
NULL
;
}
else
{
char
*
tmp
;
if
(
env
->
value
[
0
]
!=
'/'
&&
env
->
value
[
1
]
!=
'~'
)
{
char
*
home
=
mu_get_homedir
();
tmp
=
xmalloc
(
strlen
(
home
)
+
1
+
strlen
(
env
->
value
)
+
1
+
strlen
(
name
+
1
)
+
1
);
sprintf
(
tmp
,
"%s/%s/%s"
,
home
,
env
->
value
,
name
+
1
);
}
else
{
tmp
=
xmalloc
(
strlen
(
env
->
value
)
+
1
+
strlen
(
name
+
1
)
+
1
);
sprintf
(
tmp
,
"%s/%s"
,
env
->
value
,
name
+
1
);
}
name
=
tmp
;
}
name
=
util_folder_path
(
name
);
break
;
default:
...
...
@@ -139,7 +112,7 @@ mail_file (int argc, char **argv)
mbox
=
newbox
;
mailbox_messages_count
(
mbox
,
&
total
);
cursor
=
realcursor
=
1
;
if
(
(
util_find_env
(
"header"
))
->
set
)
if
(
util_getenv
(
NULL
,
"header"
,
Mail_env_boolean
,
0
)
==
0
)
{
util_do_command
(
"summary"
);
util_do_command
(
"z."
);
...
...
Please
register
or
sign in
to post a comment