Platon Technologies
not logged in Login Registration
EnglishSlovak
open source software development celebrating 10 years of open source development! Friday, October 16, 2026

Diff for games/3do-view/dir.c between version 1.3 and 1.4

version 1.3, 2003/05/20 19:11:48 version 1.4, 2003/05/20 23:37:29
Line 11 
Line 11 
  *   *
  */   */
   
 /* $Platon: games/3do-view/dir.c,v 1.2 2003/05/20 15:25:27 nepto Exp $ */  /* $Platon: games/3do-view/dir.c,v 1.3 2003/05/20 19:11:48 nepto Exp $ */
   
 #include <string.h>  #include <string.h>
 #include <stdlib.h>  #include <stdlib.h>
Line 40 
Line 40 
   
 #define DIR_REALLOC_STEP                        (10)  #define DIR_REALLOC_STEP                        (10)
   
   static int compare_function(const void *ptr1, const void *ptr2) /* {{{ */
   {
   #if 0
           fprintf(stderr, "comparing %s[%p]:%s[%p]\n",
                           *(char **) ptr1, ptr1, *(char **) ptr2, ptr2);
   #endif
           return strcmp(*(char **) ptr1, *(char **) ptr2);
   } /* }}} */
   
 void get_directories_and_files(char ***directories, char ***files) /* {{{ */  void get_directories_and_files(char ***directories, char ***files) /* {{{ */
 {  {
 #if PLATON_SYSTEM_LINUX  #if PLATON_SYSTEM_LINUX
Line 101  void get_directories_and_files(char ***d
Line 110  void get_directories_and_files(char ***d
 #if PLATON_SYSTEM_MSDOS  #if PLATON_SYSTEM_MSDOS
         } while (! findnext(&ffblk));          } while (! findnext(&ffblk));
 #endif  #endif
   
           if (*directories != NULL)
                   qsort(*directories, directories_size, sizeof(char *), compare_function);
           if (*files != NULL)
                   qsort(*files, files_size, sizeof(char *), compare_function);
 } /* }}} */  } /* }}} */
   
 void free_directories_or_files(char **ar) /* {{{ */  void free_directories_or_files(char **ar) /* {{{ */

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.4

Platon Group <platon@platon.org> http://platon.org/
Copyright © 2002-2006 Platon Group
Site powered by Metafox CMS
Go to Top