iOS/buildlibs/armv7/allegro-4.4.2/demos/skater/source/credits.c
/* sorts a list of credit strings */
sorts a list of credit strings
sorts a list of credit strings
void sort_credit_list(void)
{
   CREDIT_NAME **prev, *p;
   int n, done;
   do {
      done = TRUE;
      prev = &credits;
      p = credits;
      while ((p) && (p->next)) {
         n = 0;
         if (n == 0) {
            n = stricmp(p->name, p->next->name);
         }
         if (n > 0) {
            *prev = p->next;
            p->next = p->next->next;
            (*prev)->next = p;
            p = *prev;
            done = FALSE;
         }
         prev = &p->next;
         p = p->next;
      }
   } while (!done);
}
void sort_credit_list ( void ) { CREDIT_NAME * * prev , * p ; int n , done ; do { done = TRUE ; prev = & credits ; p = credits ; while ( ( p ) && ( p -> next ) ) { n = 0 ; if ( n == 0 ) { n = stricmp ( p -> name , p -> next -> name ) ; } if ( n > 0 ) { * prev = p -> next ; p -> next = p -> next -> next ; ( * prev ) -> next = p ; p = * prev ; done = FALSE ; } prev = & p -> next ; p = p -> next ; } } while ( ! done ) ; }
sorts a list of credit strings
sorts a list of credit strings