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
a1aadb8d
...
a1aadb8d1ed9ef07642d2a2f2711df171c096ef9
authored
2001-09-08 10:33:41 +0000
by
Sergey Poznyakoff
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
handle #f when printing message object
1 parent
ebf199fb
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
23 deletions
libmu_scm/mu_message.c
libmu_scm/mu_message.c
View file @
a1aadb8
...
...
@@ -77,32 +77,39 @@ mu_scm_message_print (SCM message_smob, SCM port, scm_print_state * pstate)
scm_puts
(
"#<message "
,
port
);
p
=
_get_envelope_sender
(
env
);
scm_puts
(
"
\"
"
,
port
);
if
(
p
)
if
(
message_smob
==
SCM_BOOL_F
)
{
scm_puts
(
p
,
port
);
free
((
void
*
)
p
);
/* several mu_message.* functions may return #f */
scm_puts
(
"#f"
,
port
);
}
else
scm_puts
(
"UNKNOWN"
,
port
);
envelope_date
(
env
,
buffer
,
sizeof
(
buffer
),
NULL
);
p
=
buffer
;
if
(
mu_parse_ctime_date_time
(
&
p
,
&
tm
,
&
tz
)
==
0
)
strftime
(
buffer
,
sizeof
(
buffer
),
"%a %b %e %H:%M"
,
&
tm
);
else
strcpy
(
buffer
,
"UNKNOWN"
);
scm_puts
(
"
\"
\"
"
,
port
);
scm_puts
(
buffer
,
port
);
scm_puts
(
"
\"
"
,
port
);
message_size
(
mum
->
msg
,
&
m_size
);
message_lines
(
mum
->
msg
,
&
m_lines
);
snprintf
(
buffer
,
sizeof
(
buffer
),
"%3ld %-5ld"
,
m_lines
,
m_size
);
scm_puts
(
buffer
,
port
);
{
p
=
_get_envelope_sender
(
env
);
scm_puts
(
"
\"
"
,
port
);
if
(
p
)
{
scm_puts
(
p
,
port
);
free
((
void
*
)
p
);
}
else
scm_puts
(
"UNKNOWN"
,
port
);
envelope_date
(
env
,
buffer
,
sizeof
(
buffer
),
NULL
);
p
=
buffer
;
if
(
mu_parse_ctime_date_time
(
&
p
,
&
tm
,
&
tz
)
==
0
)
strftime
(
buffer
,
sizeof
(
buffer
),
"%a %b %e %H:%M"
,
&
tm
);
else
strcpy
(
buffer
,
"UNKNOWN"
);
scm_puts
(
"
\"
\"
"
,
port
);
scm_puts
(
buffer
,
port
);
scm_puts
(
"
\"
"
,
port
);
message_size
(
mum
->
msg
,
&
m_size
);
message_lines
(
mum
->
msg
,
&
m_lines
);
snprintf
(
buffer
,
sizeof
(
buffer
),
"%3ld %-5ld"
,
m_lines
,
m_size
);
scm_puts
(
buffer
,
port
);
}
scm_puts
(
">"
,
port
);
return
1
;
}
...
...
Please
register
or
sign in
to post a comment