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

Diff for /mandoc/compat_fts.c between version 1.6 and 1.7

version 1.6, 2014/12/11 18:20:07 version 1.7, 2015/02/07 07:42:56
Line 38  int dummy;
Line 38  int dummy;
  * SUCH DAMAGE.   * SUCH DAMAGE.
  */   */
   
 #include <sys/param.h>  
 #include <sys/stat.h>  #include <sys/stat.h>
 #include <sys/types.h>  #include <sys/types.h>
   
Line 51  int dummy;
Line 50  int dummy;
 #include <unistd.h>  #include <unistd.h>
 #include "compat_fts.h"  #include "compat_fts.h"
   
   #define MAXIMUM(a, b)   (((a) > (b)) ? (a) : (b))
   
 static FTSENT   *fts_alloc(FTS *, const char *, size_t);  static FTSENT   *fts_alloc(FTS *, const char *, size_t);
 static FTSENT   *fts_build(FTS *);  static FTSENT   *fts_build(FTS *);
 static void      fts_lfree(FTSENT *);  static void      fts_lfree(FTSENT *);
Line 62  static unsigned short  fts_stat(FTS *, FTSENT *);
Line 63  static unsigned short  fts_stat(FTS *, FTSENT *);
 static int       fts_safe_changedir(FTS *, FTSENT *, int, const char *);  static int       fts_safe_changedir(FTS *, FTSENT *, int, const char *);
   
 #define ISDOT(a)        (a[0] == '.' && (!a[1] || (a[1] == '.' && !a[2])))  #define ISDOT(a)        (a[0] == '.' && (!a[1] || (a[1] == '.' && !a[2])))
 #define MAX(a,b)        (((a)>(b))?(a):(b))  
 #ifndef O_DIRECTORY  #ifndef O_DIRECTORY
 #define O_DIRECTORY     0  #define O_DIRECTORY     0
 #endif  #endif
Line 97  fts_open(char * const *argv, int options, void *dummy)
Line 97  fts_open(char * const *argv, int options, void *dummy)
          * Start out with 1K of path space, and enough, in any case,           * Start out with 1K of path space, and enough, in any case,
          * to hold the user's paths.           * to hold the user's paths.
          */           */
         if (fts_palloc(sp, MAX(fts_maxarglen(argv), PATH_MAX)))          if (fts_palloc(sp, MAXIMUM(fts_maxarglen(argv), PATH_MAX)))
                 goto mem1;                  goto mem1;
   
         /* Allocate/initialize root's parent. */          /* Allocate/initialize root's parent. */

Legend:
Removed from v.1.6  
changed lines
  Added in v.1.7

CVSweb