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
ba978477
...
ba9784773b8e071ca8c956039cabef50a1a12298
authored
2002-08-02 07:50:29 +0000
by
Sergey Poznyakoff
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Rearranged functions to let implicit prototyping work.
1 parent
0d0cc4f4
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
40 additions
and
40 deletions
imap4d/sync.c
imap4d/sync.c
View file @
ba97847
...
...
@@ -149,46 +149,6 @@ notify_uid (size_t uid)
}
static
void
notify
(
void
)
{
size_t
total
=
0
;
int
reset
=
0
;
mailbox_messages_count
(
mbox
,
&
total
);
if
(
!
uid_table
)
{
reset
=
1
;
reset_uids
();
}
if
(
uid_table
)
{
size_t
i
;
size_t
recent
=
0
;
for
(
i
=
1
;
i
<=
total
;
i
++
)
{
message_t
msg
=
NULL
;
size_t
uid
=
0
;
mailbox_get_message
(
mbox
,
i
,
&
msg
);
message_get_uid
(
msg
,
&
uid
);
if
(
!
notify_uid
(
uid
))
recent
++
;
}
notify_deleted
();
util_out
(
RESP_NONE
,
"%d EXISTS"
,
total
);
if
(
recent
)
util_out
(
RESP_NONE
,
"%d RECENT"
,
recent
);
}
if
(
!
reset
)
reset_uids
();
else
reset_notify
();
}
static
void
free_uids
(
void
)
{
if
(
uid_table
)
...
...
@@ -241,6 +201,46 @@ reset_uids (void)
}
}
static
void
notify
(
void
)
{
size_t
total
=
0
;
int
reset
=
0
;
mailbox_messages_count
(
mbox
,
&
total
);
if
(
!
uid_table
)
{
reset
=
1
;
reset_uids
();
}
if
(
uid_table
)
{
size_t
i
;
size_t
recent
=
0
;
for
(
i
=
1
;
i
<=
total
;
i
++
)
{
message_t
msg
=
NULL
;
size_t
uid
=
0
;
mailbox_get_message
(
mbox
,
i
,
&
msg
);
message_get_uid
(
msg
,
&
uid
);
if
(
!
notify_uid
(
uid
))
recent
++
;
}
notify_deleted
();
util_out
(
RESP_NONE
,
"%d EXISTS"
,
total
);
if
(
recent
)
util_out
(
RESP_NONE
,
"%d RECENT"
,
recent
);
}
if
(
!
reset
)
reset_uids
();
else
reset_notify
();
}
size_t
uid_to_msgno
(
size_t
uid
)
{
...
...
Please
register
or
sign in
to post a comment