static int find_annots(struct mailbox *mailbox, struct found_uids *annots)
{
    int r = 0;

    r = annotatemore_findall_mailbox(mailbox, ANNOTATE_ANY_UID, "*",
                             /*modseq*/0, addannot_uid, annots, /*flags*/0);
    if (r) return r;

    /* make sure UIDs are sorted for comparison */
    qsort(annots->found, annots->nused, sizeof(annots->found[0]), sort_found);

    return 0;
}
static int find_annots(struct mailbox *mailbox, struct found_uids *annots)
{
    int r = 0;

    r = annotatemore_findall_mailbox(mailbox, ANNOTATE_ANY_UID, "*",
                              0, addannot_uid, annots,  0);
    if (r) return r;

     
    qsort(annots->found, annots->nused, sizeof(annots->found[0]), sort_found);

    return 0;
}