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
a923b221
...
a923b221dc3a620dd5507ad935774cc70c9c28ec
authored
2016-12-12 13:19:24 +0200
by
Sergey Poznyakoff
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
mhn: allow for whitespace in edit commands
1 parent
d8896b0e
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
4 deletions
mh/mhn.c
mh/mhn.c
View file @
a923b22
...
...
@@ -1744,7 +1744,7 @@ parse_brace (char **pval, char **cmd, int c, struct compose_env *env)
return
0
;
}
#define isdelim(c) (mu_isspace (c) || strchr (";<[(", c))
#define isdelim(c) (
c == 0 ||
mu_isspace (c) || strchr (";<[(", c))
#define skipws(ptr) (ptr) = mu_str_skip_class (ptr, MU_CTYPE_SPACE)
int
...
...
@@ -1823,12 +1823,29 @@ parse_content_type (struct compose_env *env,
rest
++
;
mu_opool_append_char
(
pool
,
'='
);
skipws
(
rest
);
for
(;
*
rest
;
rest
++
)
if
(
*
rest
==
'"'
)
{
if
(
isdelim
(
*
rest
))
mu_opool_append_char
(
pool
,
*
rest
);
rest
++
;
while
(
*
rest
!=
'"'
)
{
if
(
*
rest
==
'\\'
)
{
mu_opool_append_char
(
pool
,
*
rest
);
if
(
rest
[
1
])
rest
++
;
else
break
;
}
mu_opool_append_char
(
pool
,
*
rest
);
rest
++
;
}
mu_opool_append_char
(
pool
,
*
rest
);
rest
++
;
}
else
for
(;
!
isdelim
(
*
rest
);
rest
++
)
mu_opool_append_char
(
pool
,
*
rest
);
break
;
default:
...
...
@@ -1867,7 +1884,7 @@ parse_type_command (char **pcmd, struct compose_env *env, mu_header_t hdr)
char
*
rest
=
*
pcmd
;
skipws
(
rest
);
for
(
sp
=
rest
;
*
sp
&&
!
isdelim
(
*
sp
);
sp
++
)
for
(
sp
=
rest
;
!
isdelim
(
*
sp
);
sp
++
)
;
c
=
*
sp
;
*
sp
=
0
;
...
...
Please
register
or
sign in
to post a comment