home *** CD-ROM | disk | FTP | other *** search
/ Mac-Source 1994 July / Mac-Source_July_1994.iso / C and C++ / Entertainment / MacMud / Unix / sys⁄sysmacros.h < prev    next >
Encoding:
Text File  |  1989-11-06  |  366 b   |  19 lines  |  [TEXT/????]

  1. /*    @(#)sysmacros.h 1.3 88/02/08 SMI    */
  2.  
  3. /*
  4.  * Major/minor device constructing/busting macros.
  5.  */
  6. #ifndef _SYSMACROS_
  7. #define    _SYSMACROS_
  8.  
  9. /* major part of a device */
  10. #define    major(x)    ((int)(((unsigned)(x)>>8)&0377))
  11.  
  12. /* minor part of a device */
  13. #define    minor(x)    ((int)((x)&0377))
  14.  
  15. /* make a device number */
  16. #define    makedev(x,y)    ((dev_t)(((x)<<8) | (y)))
  17.  
  18. #endif
  19.