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
c8ae6507
...
c8ae650738984896d1893bb570868f717410444d
authored
2016-11-05 12:07:24 +0200
by
Sergey Poznyakoff
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Minor changes
1 parent
af202127
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
21 additions
and
12 deletions
libmu_scm/mu_mailbox.c
libmu_scm/mu_scm.c
mail/send.c
scheme/guimb.scmi
libmu_scm/mu_mailbox.c
View file @
c8ae650
...
...
@@ -220,7 +220,7 @@ SCM_DEFINE_PUBLIC (scm_mu_mailbox_open, "mu-mailbox-open", 2, 0, 0,
int
status
;
SCM
ret
;
SCM_ASSERT
(
scm_is_string
(
url
),
url
,
SCM_ARG1
,
FUNC_NAME
);
SCM_ASSERT
(
scm_is_
bool
(
url
)
||
scm_is_
string
(
url
),
url
,
SCM_ARG1
,
FUNC_NAME
);
SCM_ASSERT
(
scm_is_string
(
mode
),
mode
,
SCM_ARG2
,
FUNC_NAME
);
scm_dynwind_begin
(
0
);
...
...
@@ -247,8 +247,20 @@ SCM_DEFINE_PUBLIC (scm_mu_mailbox_open, "mu-mailbox-open", 2, 0, 0,
if
(
mode_bits
&
MU_STREAM_READ
&&
mode_bits
&
MU_STREAM_WRITE
)
mode_bits
=
(
mode_bits
&
~
(
MU_STREAM_READ
|
MU_STREAM_WRITE
))
|
MU_STREAM_RDWR
;
if
(
scm_is_bool
(
url
))
{
if
(
url
==
SCM_BOOL_F
)
mode_str
=
NULL
;
else
mu_scm_error
(
FUNC_NAME
,
EINVAL
,
"value #t for URL is reserved for future use"
,
scm_list_1
(
url
));
}
else
{
mode_str
=
scm_to_locale_string
(
url
);
scm_dynwind_free
(
mode_str
);
}
status
=
mu_mailbox_create_default
(
&
mbox
,
mode_str
);
if
(
status
)
...
...
libmu_scm/mu_scm.c
View file @
c8ae650
...
...
@@ -111,6 +111,7 @@ SCM_DEFINE_PUBLIC (scm_mu_register_format, "mu-register-format", 0, 0, 1,
{
int
status
;
SCM_VALIDATE_REST_ARGUMENT
(
rest
);
if
(
scm_is_null
(
rest
))
{
status
=
register_format
(
NULL
);
...
...
mail/send.c
View file @
c8ae650
...
...
@@ -513,7 +513,7 @@ mail_send (int argc, char **argv)
mode
=
hp
->
mode
;
if
(
mu_header_sget_value
(
env
.
header
,
hp
->
name
,
NULL
)
==
0
)
mode
=
COMPOSE_REPLACE
;
compose_header_set
(
&
env
,
hp
->
name
,
hp
->
value
,
hp
->
mode
);
compose_header_set
(
&
env
,
hp
->
name
,
hp
->
value
,
mode
);
}
mu_iterator_destroy
(
&
itr
);
}
...
...
scheme/guimb.scmi
View file @
c8ae650
...
...
@@ -27,6 +27,7 @@ exec ${GUILE-guile} -l $0 -c "(apply $main (list (command-line)))" "$@"
(
use-modules
(
ice-9
getopt-long
)
(
ice-9
rdelim
)
(
ice-9
eval-string
)
(
srfi
srfi-1
)
(
mailutils
mailutils
))
...
...
@@ -190,7 +191,7 @@ for any corresponding short options.
guimb-module
)
(
define-macro
(
bound?
name
)
`
(
and
(
module-defined?
guimb-module
',name
)
`
(
and
(
module-defined?
(
get-module
)
',name
)
(
procedure?
,
name
)))
(
define
(
guimb-parse-command-line
cmdline
)
...
...
@@ -219,17 +220,12 @@ for any corresponding short options.
(
if
(
not
output-mailbox-mode
)
(
set!
output-mailbox-mode
(
if
(
null?
input-mailbox-names
)
"wr"
"a"
)))
(
cond
(
user-name
(
set!
output-mailbox
(
mu-mailbox-open
(
if
(
string?
user-name
)
(
if
(
and
(
not
output-mailbox-name
)
user-name
)
(
set!
output-mailbox-name
(
if
(
string?
user-name
)
(
string-append
"%"
user-name
)
""
)
output-mailbox-mode
)))
(
output-mailbox-name
#f
)))
(
set!
output-mailbox
(
mu-mailbox-open
output-mailbox-name
output-mailbox-mode
))
))
output-mailbox-mode
))
; (write output-mailbox)(newline)
(
if
source-file-name
...
...
Please
register
or
sign in
to post a comment