home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 15 / 15.iso / s / s053 / 26.ddi / root.3 / usr / ucbinclude / struct.h < prev    next >
Encoding:
C/C++ Source or Header  |  1990-12-08  |  1.4 KB  |  47 lines

  1. /*    Copyright (c) 1990 UNIX System Laboratories, Inc.    */
  2. /*    Copyright (c) 1984, 1986, 1987, 1988, 1989, 1990 AT&T    */
  3. /*      All Rights Reserved      */
  4.  
  5. /*    THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF         */
  6. /*    UNIX System Laboratories, Inc.                         */
  7. /*    The copyright notice above does not evidence any       */
  8. /*    actual or intended publication of such source code.    */
  9.  
  10.  
  11. #ident    "@(#)//usr/ucbinclude/struct.h.sl 1.1 4.0 12/08/90 4070 AT&T-USL"
  12.  
  13. /*******************************************************************
  14.  
  15.         PROPRIETARY NOTICE (Combined)
  16.  
  17. This source code is unpublished proprietary information
  18. constituting, or derived under license from AT&T's UNIX(r) System V.
  19. In addition, portions of such source code were derived from Berkeley
  20. 4.3 BSD under license from the Regents of the University of
  21. California.
  22.  
  23.  
  24.  
  25.         Copyright Notice 
  26.  
  27. Notice of copyright on this source code product does not indicate 
  28. publication.
  29.  
  30.     (c) 1986,1987,1988,1989  Sun Microsystems, Inc
  31.     (c) 1983,1984,1985,1986,1987,1988,1989  AT&T.
  32.               All rights reserved.
  33. ********************************************************************/ 
  34.  
  35. /*
  36.  * access to information relating to the fields of a structure
  37.  */
  38.  
  39. #ifndef _STRUCT_H
  40. #define _STRUCT_H
  41.  
  42. #define    fldoff(str, fld)    ((int)&(((struct str *)0)->fld))
  43. #define    fldsiz(str, fld)    (sizeof(((struct str *)0)->fld))
  44. #define    strbase(str, ptr, fld)    ((struct str *)((char *)(ptr)-fldoff(str, fld)))
  45.  
  46. #endif /*!_STRUCT_H*/
  47.