On Mon, 19 May 2008, [EMAIL PROTECTED] wrote:
From what I can tell it seems to be down to the app to walk the results and make a count.

That's one way.  What is returned is a 0-terminated array.

      for (i = 0; sort_result[i] > 0; i++)

Note that message numbers are unsigned, so test for non-zero, not greater than zero.
      for (i = 0; sort_result[i]; i++)

There are two other ways to get the number of sorted messages.

If you arm a sortresults_t callback, the number of messages sorted is returned as the third argument to the callback.

Last, and certainly least, the number of sorted messages is returned in the nmsgs member of the sortpgm (assuming that you don't use SO_FREE). I won't count upon that however; it's intended to use against the progress member and not to size the return array.

So, either use the callback or count the members of the array.

-- Mark --

http://panda.com/mrc
Democracy is two wolves and a sheep deciding what to eat for lunch.
Liberty is a well-armed sheep contesting the vote.
_______________________________________________
Imap-uw mailing list
[email protected]
https://mailman1.u.washington.edu/mailman/listinfo/imap-uw

Reply via email to