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
8f4238c4
...
8f4238c44d3efcf56d66b5f9c9786f6d68abfb97
authored
2001-06-30 09:20:29 +0000
by
Sergey Poznyakoff
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Modified to use new argcv_get() syntax.
1 parent
3f0e9e7a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
13 deletions
mail/set.c
mail/set.c
View file @
8f4238c
...
...
@@ -35,7 +35,7 @@ mail_set (int argc, char **argv)
else
{
int
i
=
0
;
char
*
va
r
=
NULL
,
*
va
lue
=
NULL
;
char
*
value
=
NULL
;
struct
mail_env_entry
*
entry
=
NULL
;
for
(
i
=
1
;
i
<
argc
;
i
++
)
{
...
...
@@ -48,21 +48,15 @@ mail_set (int argc, char **argv)
if
(
entry
->
value
)
free
(
entry
->
value
);
}
else
if
(
strchr
(
argv
[
i
],
'='
)
!=
NULL
)
else
if
(
i
+
1
<
argc
&&
argv
[
i
+
1
][
0
]
==
'='
)
{
int
j
=
0
;
var
=
strdup
(
argv
[
i
]);
for
(
j
=
0
;
j
<
strlen
(
var
);
j
++
)
if
(
var
[
j
]
==
'='
)
{
var
[
j
]
=
'\0'
;
break
;
}
value
=
strdup
(
&
var
[
j
+
1
]);
entry
=
util_find_env
(
var
);
free
(
var
);
entry
=
util_find_env
(
argv
[
i
]);
if
(
entry
==
NULL
)
return
1
;
i
+=
2
;
if
(
i
>
argc
)
break
;
value
=
strdup
(
argv
[
i
]);
entry
->
set
=
1
;
if
(
entry
->
value
)
free
(
entry
->
value
);
...
...
Please
register
or
sign in
to post a comment