[BACK]Return to test-fts.c CVS log [TXT][DIR] Up to [cvsweb.bsd.lv] / mandoc

Diff for /mandoc/test-fts.c between version 1.3 and 1.4

version 1.3, 2015/10/06 18:32:20 version 1.4, 2016/10/18 16:06:44
Line 2 
Line 2 
 #include <sys/stat.h>  #include <sys/stat.h>
 #include <fts.h>  #include <fts.h>
 #include <stdio.h>  #include <stdio.h>
   #include <string.h>
   
   #ifdef FTS_COMPARE_CONST
   int fts_compare(const FTSENT *const *, const FTSENT *const *);
   #else
   int fts_compare(const FTSENT **, const FTSENT **);
   #endif
   
 int  int
 main(void)  main(void)
 {  {
Line 14  main(void)
Line 21  main(void)
         argv[1] = (char *)NULL;          argv[1] = (char *)NULL;
   
         ftsp = fts_open((char * const *)argv,          ftsp = fts_open((char * const *)argv,
             FTS_PHYSICAL | FTS_NOCHDIR, NULL);              FTS_PHYSICAL | FTS_NOCHDIR, fts_compare);
   
         if (ftsp == NULL) {          if (ftsp == NULL) {
                 perror("fts_open");                  perror("fts_open");
Line 39  main(void)
Line 46  main(void)
         }          }
   
         return 0;          return 0;
   }
   
   int
   #ifdef FTS_COMPARE_CONST
   fts_compare(const FTSENT *const *a, const FTSENT *const *b)
   #else
   fts_compare(const FTSENT **a, const FTSENT **b)
   #endif
   {
           return strcmp((*a)->fts_name, (*b)->fts_name);
 }  }

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

CVSweb