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
0afaf751
...
0afaf751acae5094328080656dd294206aba38e8
authored
2001-03-19 06:52:38 +0000
by
Alain Magloire
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
header.c mbx_mbox.c : bug fixes.
1 parent
e9cbb752
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
6 deletions
mailbox/header.c
mailbox/mbx_mbox.c
mailbox/header.c
View file @
0afaf75
...
...
@@ -679,7 +679,15 @@ header_size (header_t header, size_t *psize)
}
if
(
psize
)
{
*
psize
=
header
->
blurb_len
;
if
(
property_is_set
(
header
->
property
,
"RFC822"
))
{
size_t
lines
=
0
;
header_lines
(
header
,
&
lines
);
*
psize
+=
lines
;
}
}
return
0
;
}
...
...
@@ -896,7 +904,7 @@ header_read (stream_t is, char *buf, size_t buflen, off_t off, size_t *pnread)
char
*
s
=
header
->
blurb
;
char
*
e
=
header
->
blurb
+
header
->
blurb_len
;
/* Get to the offset. */
for
(
j
=
0
;
j
<
(
size_t
)
off
&&
s
<
=
e
;
j
++
,
s
++
)
for
(
j
=
0
;
j
<
(
size_t
)
off
&&
s
<
e
;
j
++
,
s
++
)
{
if
(
*
s
==
'\n'
)
{
...
...
@@ -910,7 +918,7 @@ header_read (stream_t is, char *buf, size_t buflen, off_t off, size_t *pnread)
if
(
residue
)
buf
[
0
]
=
'\r'
;
/* Copy. */
for
(
j
=
residue
;
j
<
buflen
&&
s
<
=
e
;
j
++
,
s
++
)
for
(
j
=
residue
;
j
<
buflen
&&
s
<
e
;
j
++
,
s
++
)
{
if
(
*
s
==
'\n'
)
{
...
...
mailbox/mbx_mbox.c
View file @
0afaf75
...
...
@@ -1164,10 +1164,6 @@ mbox_header_fill (header_t header, char *buffer, size_t len,
mum
->
fhdr
[
j
]
=
NULL
;
}
}
if
(
mum
->
mud
->
mailbox
->
properties
[
PROP_RFC822
].
value
)
return
mbox_readstream_rfc822
(
mum
,
buffer
,
len
,
off
,
pnread
,
0
,
mum
->
header_from_end
,
mum
->
body
);
else
return
mbox_readstream
(
mum
,
buffer
,
len
,
off
,
pnread
,
0
,
mum
->
header_from_end
,
mum
->
body
);
}
...
...
@@ -1238,8 +1234,10 @@ mbox_header_size (header_t header, size_t *psize)
if
(
psize
)
{
*
psize
=
mum
->
body
-
mum
->
header_from_end
;
#if 1
if
(
mum
->
mud
->
mailbox
->
properties
[
PROP_RFC822
].
value
)
*
psize
+=
mum
->
header_lines
;
#endif
}
return
0
;
}
...
...
@@ -1266,8 +1264,10 @@ mbox_body_size (body_t body, size_t *psize)
if
(
psize
)
{
*
psize
=
mum
->
body_end
-
mum
->
body
+
1
;
#if 1
if
(
mum
->
mud
->
mailbox
->
properties
[
PROP_RFC822
].
value
)
*
psize
+=
mum
->
body_lines
;
#endif
}
return
0
;
}
...
...
Please
register
or
sign in
to post a comment