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
130aee6d
...
130aee6dd712fd699e5b4596ef6744ebcbab292e
authored
2001-07-01 04:44:46 +0000
by
Sergey Poznyakoff
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
set MU_ATTRIBUTE_MODIFIED bit in the underlying structure when setting the flags.
1 parent
1ea0765b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
8 deletions
mailbox/attribute.c
mailbox/attribute.c
View file @
130aee6
...
...
@@ -73,8 +73,11 @@ attribute_is_modified (attribute_t attr)
int
attribute_clear_modified
(
attribute_t
attr
)
{
if
(
attr
)
attr
->
flags
&=
~
MU_ATTRIBUTE_MODIFIED
;
if
(
!
attr
)
return
0
;
if
(
attr
->
_unset_flags
)
attr
->
_unset_flags
(
attr
,
MU_ATTRIBUTE_MODIFIED
);
attr
->
flags
&=
~
MU_ATTRIBUTE_MODIFIED
;
return
0
;
}
...
...
@@ -166,7 +169,7 @@ attribute_set_seen (attribute_t attr)
if
(
attr
==
NULL
)
return
EINVAL
;
if
(
attr
->
_set_flags
)
status
=
attr
->
_set_flags
(
attr
,
MU_ATTRIBUTE_SEEN
);
status
=
attr
->
_set_flags
(
attr
,
MU_ATTRIBUTE_SEEN
|
MU_ATTRIBUTE_MODIFIED
);
attr
->
flags
|=
MU_ATTRIBUTE_SEEN
|
MU_ATTRIBUTE_MODIFIED
;
return
status
;
}
...
...
@@ -178,7 +181,7 @@ attribute_set_answered (attribute_t attr)
if
(
attr
==
NULL
)
return
EINVAL
;
if
(
attr
->
_set_flags
)
status
=
attr
->
_set_flags
(
attr
,
MU_ATTRIBUTE_ANSWERED
);
status
=
attr
->
_set_flags
(
attr
,
MU_ATTRIBUTE_ANSWERED
|
MU_ATTRIBUTE_MODIFIED
);
attr
->
flags
|=
MU_ATTRIBUTE_ANSWERED
|
MU_ATTRIBUTE_MODIFIED
;
return
status
;
}
...
...
@@ -190,7 +193,7 @@ attribute_set_flagged (attribute_t attr)
if
(
attr
==
NULL
)
return
EINVAL
;
if
(
attr
->
_set_flags
)
status
=
attr
->
_set_flags
(
attr
,
MU_ATTRIBUTE_FLAGGED
);
status
=
attr
->
_set_flags
(
attr
,
MU_ATTRIBUTE_FLAGGED
|
MU_ATTRIBUTE_MODIFIED
);
attr
->
flags
|=
MU_ATTRIBUTE_FLAGGED
|
MU_ATTRIBUTE_MODIFIED
;
return
status
;
}
...
...
@@ -202,7 +205,7 @@ attribute_set_read (attribute_t attr)
if
(
attr
==
NULL
)
return
EINVAL
;
if
(
attr
->
_set_flags
)
status
=
attr
->
_set_flags
(
attr
,
MU_ATTRIBUTE_READ
);
status
=
attr
->
_set_flags
(
attr
,
MU_ATTRIBUTE_READ
|
MU_ATTRIBUTE_MODIFIED
);
attr
->
flags
|=
MU_ATTRIBUTE_READ
|
MU_ATTRIBUTE_MODIFIED
;
return
status
;
}
...
...
@@ -214,7 +217,7 @@ attribute_set_deleted (attribute_t attr)
if
(
attr
==
NULL
)
return
EINVAL
;
if
(
attr
->
_set_flags
)
status
=
attr
->
_set_flags
(
attr
,
MU_ATTRIBUTE_DELETED
);
status
=
attr
->
_set_flags
(
attr
,
MU_ATTRIBUTE_DELETED
|
MU_ATTRIBUTE_MODIFIED
);
attr
->
flags
|=
MU_ATTRIBUTE_DELETED
|
MU_ATTRIBUTE_MODIFIED
;
return
0
;
}
...
...
@@ -226,7 +229,7 @@ attribute_set_draft (attribute_t attr)
if
(
attr
==
NULL
)
return
EINVAL
;
if
(
attr
->
_set_flags
)
status
=
attr
->
_set_flags
(
attr
,
MU_ATTRIBUTE_DRAFT
);
status
=
attr
->
_set_flags
(
attr
,
MU_ATTRIBUTE_DRAFT
|
MU_ATTRIBUTE_MODIFIED
);
attr
->
flags
|=
MU_ATTRIBUTE_DRAFT
|
MU_ATTRIBUTE_MODIFIED
;
return
status
;
}
...
...
@@ -432,6 +435,8 @@ attribute_is_equal (attribute_t attr, attribute_t attr2)
return
0
;
if
(
attr
->
_get_flags
)
status
=
attr
->
_get_flags
(
attr
,
&
(
attr
->
flags
));
if
(
attr2
->
_get_flags
)
status
=
attr2
->
_get_flags
(
attr2
,
&
(
attr2
->
flags
));
return
attr
->
flags
==
attr2
->
flags
;
}
...
...
Please
register
or
sign in
to post a comment