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
f59b403a
...
f59b403aa3ef3bb13e992c1e69aa4976a2b7486d
authored
2002-08-15 12:56:36 +0000
by
Sergey Poznyakoff
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
For compatibility with older mails take a number alone to mean "print NUMBER"
1 parent
b7a7196b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
1 deletions
mail/util.c
mail/util.c
View file @
f59b403
...
...
@@ -87,7 +87,7 @@ util_do_command (const char *c, ...)
char
*
cmd
=
NULL
;
va_list
ap
;
static
const
char
*
delim
=
"="
;
va_start
(
ap
,
c
);
status
=
vasprintf
(
&
cmd
,
c
,
ap
);
va_end
(
ap
);
...
...
@@ -114,6 +114,16 @@ util_do_command (const char *c, ...)
if
(
argcv_get
(
cmd
,
delim
,
NULL
,
&
argc
,
&
argv
)
==
0
)
{
struct
mail_command_entry
entry
;
char
*
p
;
/* Special case: a number alone implies "print" */
if
(
argc
==
1
&&
strtoul
(
argv
[
0
],
&
p
,
10
)
>
0
&&
*
p
==
0
)
{
asprintf
(
&
p
,
"print %s"
,
argv
[
0
]);
argcv_free
(
argc
,
argv
);
argcv_get
(
p
,
delim
,
NULL
,
&
argc
,
&
argv
);
free
(
p
);
}
entry
=
util_find_entry
(
mail_command_table
,
argv
[
0
]);
command
=
entry
.
func
;
...
...
Please
register
or
sign in
to post a comment