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
4977fe38
...
4977fe384dce72518526dfec8d6f9a009c8a78a0
authored
2001-06-25 08:16:52 +0000
by
Sergey Poznyakoff
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Removed if (num) clause: util_expand_msglist() returns 1/msglist[0]=cursor
if argc == 1
1 parent
a1cdcb3d
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
22 deletions
mail/headers.c
mail/pipe.c
mail/headers.c
View file @
4977fe3
...
...
@@ -34,13 +34,6 @@ mail_headers (int argc, char **argv)
int
lines
=
util_getlines
();
int
num
=
util_expand_msglist
(
argc
,
argv
,
&
list
);
if
(
num
==
0
)
{
list
=
malloc
(
sizeof
(
int
));
*
list
=
cursor
;
num
=
1
;
}
lines
=
(
lines
/
num
)
-
2
;
for
(
i
=
0
;
i
<
num
;
i
++
)
...
...
mail/pipe.c
View file @
4977fe3
...
...
@@ -33,6 +33,7 @@ mail_pipe (int argc, char **argv)
char
buffer
[
512
];
off_t
off
=
0
;
size_t
n
=
0
;
int
i
;
if
(
argc
>
1
)
cmd
=
argv
[
--
argc
];
...
...
@@ -42,9 +43,8 @@ mail_pipe (int argc, char **argv)
return
1
;
pipe
=
popen
(
cmd
,
"w"
);
if
((
num
=
util_expand_msglist
(
argc
,
argv
,
&
list
))
>
0
)
{
int
i
=
0
;
num
=
util_expand_msglist
(
argc
,
argv
,
&
list
);
for
(
i
=
0
;
i
<
num
;
i
++
)
{
if
(
mailbox_get_message
(
mbox
,
list
[
i
],
&
msg
)
==
0
)
...
...
@@ -62,18 +62,6 @@ mail_pipe (int argc, char **argv)
fprintf
(
pipe
,
"
\f\n
"
);
}
}
}
else
if
(
mailbox_get_message
(
mbox
,
cursor
,
&
msg
)
==
0
)
{
message_get_stream
(
msg
,
&
stream
);
while
(
stream_read
(
stream
,
buffer
,
sizeof
(
buffer
)
-
1
,
off
,
&
n
)
==
0
&&
n
!=
0
)
{
buffer
[
n
]
=
'\0'
;
fprintf
(
pipe
,
"%s"
,
buffer
);
off
+=
n
;
}
}
free
(
list
);
pclose
(
pipe
);
...
...
Please
register
or
sign in
to post a comment