Re: [CODE] Level-sorted do_who

From: Daniel A. Koepke (dkoepke@california.com)
Date: 04/07/99


On Wed, 7 Apr 1999, Daniel A. Koepke wrote:

>     CREATE(array, struct descriptor_data, num_connections);

Just an additional note: don't forget to free this at the end of the
do_who function...Oh, and a simple little alpha sort function for qsort()
use:

  int who_sort_alpha(const void * a, const void * b)
  {
    struct descriptor_data * aptr = (struct descriptor_data *) a;
    struct descriptor_data * bptr = (struct descriptor_data *) b;
    return str_cmp(GET_NAME(aptr->character), GET_NAME(bptr->character));
  }

which relies upon CircleMUD's str_cmp() function acting like the ANSI C
strcmp().

-dak


     +------------------------------------------------------------+
     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     |  http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html  |
     +------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 12/15/00 PST