home *** CD-ROM | disk | FTP | other *** search
/ NeXTSTEP 3.0 / NeXTSTEP3.0.iso / NextDeveloper / Headers / kernserv / macro_help.h < prev    next >
Text File  |  1992-07-29  |  1KB  |  65 lines

  1. /* 
  2.  * Mach Operating System
  3.  * Copyright (c) 1989 Carnegie-Mellon University
  4.  * Copyright (c) 1988 Carnegie5lon University
  5.  * All rights reserved.  The CMU software License Agreement specifies
  6.  * the terms and conditions for use and redistribution.
  7.  */
  8. /*
  9.  * HISTORY
  10.  * $Log:    macro_help.h,v $
  11.  * Revision 2.4  89/03/09  20:14:07  rpd
  12.  *     More cleanup.
  13.  * 
  14.  * Revision 2.3  89/02/25  18:06:34  gm0w
  15.  *     Kernel code cleanup.
  16.  *     Put entire file under #indef KERNEL.
  17.  *     [89/02/15            mrt]
  18.  * 
  19.  * Revision 2.2  88/10/18  03:36:20  mwyoung
  20.  *     Added a form of return that can be used within macros that
  21.  *     does not result in "statement not reached" noise.
  22.  *     [88/10/17            mwyoung]
  23.  *     
  24.  *     Add MACRO_BEGIN, MACRO_END.
  25.  *     [88/10/11            mwyoung]
  26.  *     
  27.  *     Created.
  28.  *     [88/10/08            mwyoung]
  29.  * 
  30.  */
  31. /*
  32.  *    File:    kernserv/macro_help.h
  33.  *
  34.  *    Provide help in making lint-free macro routines
  35.  *
  36.  */
  37.  
  38. #ifndef    _KERN_MACRO_HELP_H_
  39. #define _KERN_MACRO_HELP_H_
  40.  
  41. #import <mach/boolean.h>
  42.  
  43. #ifdef    lint
  44. boolean_t    NEVER;
  45. boolean_t    ALWAYS;
  46. #else    lint
  47. #define        NEVER        FALSE
  48. #define        ALWAYS        TRUE
  49. #endif    lint
  50.  
  51. #ifndef    MACRO_BEGIN
  52. # define        MACRO_BEGIN    do {
  53. #endif    MACRO_BEGIN
  54.  
  55. #ifndef    MACRO_END
  56. #define        MACRO_END    } while (NEVER)
  57. #endif    MACRO_END
  58.  
  59. #ifndef    MACRO_RETURN
  60. #define        MACRO_RETURN    if (ALWAYS) return
  61. #endif    MACRO_RETURN
  62.  
  63. #endif    _KERN_MACRO_HELP_H_
  64.  
  65.