home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 5 / 05.iso / a / a120 / 1.ddi / WATCOM_C / WAT140.C < prev    next >
Encoding:
C/C++ Source or Header  |  1992-06-09  |  861 b   |  32 lines

  1. /*------------------------------------------------------------------*/
  2. /* ╡{ªí└╔ªW║┘: wat140.c                                             */
  3. /*------------------------------------------------------------------*/
  4. #include <stdio.h>
  5. #include <stdlib.h>
  6. #include <string.h>
  7.  
  8. int udf_sort( const void *elem1, const void *elem2);
  9.  
  10. char string[8][7] = { "▒i│╙╖╕", "─¼⌐·⌐·", "╕¡ñl┤A", "«}Ñ≥┴¿",
  11.                       "ñΦ¬┌¬┌", "╕│ª▄ª¿", "▒i╡ß", "╢OÑ╔▓M"};
  12.  
  13.  
  14. void main()
  15. {
  16.    int  i;
  17.    int count;
  18.  
  19.    /* ¡p║Γ░}ªC string ¬║ñ╕»└¡╙╝╞ */
  20.    count = sizeof(string)/sizeof(string[0]);
  21.  
  22.    /* ▒╞º╟░}ªC¿├¿╠º╟ªCÑ▄ÑXªUñ╕»└ */
  23.    qsort((void *)string, count, sizeof(string[0]), udf_sort);
  24.    for (i = 0; i < count; i++)
  25.       printf("%s\n", string[i]);
  26. }
  27.  
  28. int udf_sort( const void *elem1, const void *elem2)
  29. {
  30.    return( strcmp(elem1,elem2) );
  31. }
  32.