home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / misc / volume1 / 8712 / mkmf / 2 / src / macro.h < prev    next >
Encoding:
Text File  |  1990-07-13  |  866 b   |  38 lines

  1. /* $Header: macro.h,v 1.2 85/03/19 09:18:02 nicklin Exp $ */
  2.  
  3. /*
  4.  * General macro function definitions
  5.  *
  6.  * Author: Peter J. Nicklin
  7.  */
  8.  
  9. int strcmp();                /* string comparison */
  10.  
  11. #undef CHDIR
  12. #define CHDIR(d) \
  13.     (chdir(d) == 0)            /* change directory */
  14.  
  15. #undef DOTDIR
  16. #define DOTDIR(dp) \
  17.     (dp->d_name[0] == '.' && dp->d_name[1] == '\0')
  18.                     /* current directory? */
  19. #undef DOTDOTDIR
  20. #define DOTDOTDIR(dp) \
  21.     (dp->d_name[0] == '.' && dp->d_name[1] == '.' && dp->d_name[2] == '\0')
  22.                     /* parent directory? */
  23. #undef EQUAL
  24. #define EQUAL(s1,s2) \
  25.     (strcmp(s1,s2) == 0)        /* string comparison */
  26.  
  27. #undef MIN
  28. #define MIN(a,b) \
  29.     (((a) < (b)) ? (a) : (b))    /* minimum of two values */
  30.  
  31. #undef MAX
  32. #define MAX(a,b) \
  33.     (((a) > (b)) ? (a) : (b))    /* maximum of two values */
  34.  
  35. #undef WHITESPACE
  36. #define WHITESPACE(c) \
  37.     (c == ' ' || c == '\t')        /* unseen space in a file */
  38.