Check the sacred codebase /* blatant ad */ for sorted skills and the command, a FASTER qsort to do so.
heh. ----- Original Message ----- From: "Dale Kingston" <[EMAIL PROTECTED]> To: "Michael Barton" <[EMAIL PROTECTED]>; <[email protected]> Sent: Tuesday, April 29, 2003 8:17 PM Subject: Re: Sorting skills Alphabeticly > *grabs mike and bigs him a big hung* > > That has been an all day head ache thank you so much for that help. > > ----- Original Message ----- > From: "Michael Barton" <[EMAIL PROTECTED]> > To: "Dale Kingston" <[EMAIL PROTECTED]>; <[email protected]> > Sent: Tuesday, April 29, 2003 6:04 PM > Subject: Re: Sorting skills Alphabeticly > > > > > qsort(skill_table, MAX_SKILL, sizeof(skill_table), compare); > > > > qsort(skill_table, MAX_SKILL, sizeof(skill_type), compare); > > > > int compare(const void *a, const void *b) > > { > > struct skill_type *skill1, *skill2; > > skill1 = (struct skill_type *)a; > > skill2 = (struct skill_type *)b; > > return strcmp(skill1->name, skill2->name); > > // not 100% sure on the order of those > > } > > > > > > -- > > ROM mailing list > > [email protected] > > http://www.rom.org/cgi-bin/mailman/listinfo/rom > > > > -- > ROM mailing list > [email protected] > http://www.rom.org/cgi-bin/mailman/listinfo/rom > >

