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
c77752c0
...
c77752c0d745b87789118aee9b5601cd2aa7e89d
authored
2000-05-02 02:41:15 +0000
by
Alain Magloire
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
attribute.c mbx_unix.c
bug in *_unset_attributes and mailbox_expunge.
1 parent
90780cf7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
11 deletions
mailbox/attribute.c
mailbox/mbx_unix.c
mailbox/attribute.c
View file @
c77752c
...
...
@@ -63,7 +63,7 @@ attribute_set_answered (attribute_t attr)
{
if
(
attr
==
NULL
)
return
EINVAL
;
attr
->
flag
|=
MU_ATTRIBUTE_ANSWERED
;
attr
->
flag
|=
MU_ATTRIBUTE_ANSWERED
;
return
0
;
}
...
...
@@ -173,7 +173,7 @@ attribute_unset_seen (attribute_t attr)
{
if
(
attr
==
NULL
)
return
0
;
attr
->
flag
^=
MU_ATTRIBUTE_SEEN
;
attr
->
flag
&=
~
MU_ATTRIBUTE_SEEN
;
return
0
;
}
...
...
@@ -182,7 +182,7 @@ attribute_unset_answered (attribute_t attr)
{
if
(
attr
==
NULL
)
return
0
;
attr
->
flag
^=
MU_ATTRIBUTE_ANSWERED
;
attr
->
flag
&=
~
MU_ATTRIBUTE_ANSWERED
;
return
0
;
}
...
...
@@ -191,7 +191,7 @@ attribute_unset_flagged (attribute_t attr)
{
if
(
attr
==
NULL
)
return
0
;
attr
->
flag
^=
MU_ATTRIBUTE_FLAGGED
;
attr
->
flag
&=
~
MU_ATTRIBUTE_FLAGGED
;
return
0
;
}
...
...
@@ -200,7 +200,7 @@ attribute_unset_read (attribute_t attr)
{
if
(
attr
==
NULL
)
return
0
;
attr
->
flag
^=
MU_ATTRIBUTE_READ
;
attr
->
flag
&=
~
MU_ATTRIBUTE_READ
;
return
0
;
}
...
...
@@ -209,7 +209,7 @@ attribute_unset_deleted (attribute_t attr)
{
if
(
attr
==
NULL
)
return
0
;
attr
->
flag
^=
MU_ATTRIBUTE_DELETED
;
attr
->
flag
&=
~
MU_ATTRIBUTE_DELETED
;
return
0
;
}
...
...
@@ -218,7 +218,7 @@ attribute_unset_draft (attribute_t attr)
{
if
(
attr
==
NULL
)
return
0
;
attr
->
flag
^=
MU_ATTRIBUTE_DRAFT
;
attr
->
flag
&=
~
MU_ATTRIBUTE_DRAFT
;
return
0
;
}
...
...
@@ -227,7 +227,7 @@ attribute_unset_recent (attribute_t attr)
{
if
(
attr
==
NULL
)
return
0
;
attr
->
flag
^=
MU_ATTRIBUTE_RECENT
;
attr
->
flag
&=
~
MU_ATTRIBUTE_RECENT
;
return
0
;
}
...
...
mailbox/mbx_unix.c
View file @
c77752c
...
...
@@ -584,8 +584,8 @@ mailbox_unix_readhdr (mailbox_t mbox, char *buf, size_t len,
/* Set the attribute */
else
if
(
strncmp
(
buf
,
"Status:"
,
7
)
==
0
)
{
mum
->
hdr_status
=
ftell
(
mud
->
file
);
mum
->
hdr_status
_end
=
mum
->
hdr_status
+
strlen
(
buf
);
mum
->
hdr_status
_end
=
ftell
(
mud
->
file
);
mum
->
hdr_status
=
mum
->
hdr_status_end
-
strlen
(
buf
);
sep
=
strchr
(
buf
,
':'
);
/* pass the ':' */
if
(
strchr
(
sep
,
'R'
)
!=
NULL
)
attribute_set_read
(
mum
->
old_attr
);
...
...
@@ -976,7 +976,7 @@ mailbox_unix_expunge (mailbox_t mbox)
if
(
attribute_is_deleted
(
mum
->
new_attr
))
continue
;
/* add a NL separtor between messages */
/* add a NL separ
a
tor between messages */
if
(
first
)
first
=
0
;
else
...
...
@@ -1036,6 +1036,12 @@ mailbox_unix_expunge (mailbox_t mbox)
fputc
(
'\n'
,
tmpfile
);
total
++
;
}
/* skip the status field */
if
(
fseek
(
mud
->
file
,
current
,
SEEK_SET
)
==
-
1
)
{
status
=
errno
;
goto
bailout
;
}
}
else
/* attribute did not change */
{
...
...
Please
register
or
sign in
to post a comment