Doxygen Documentation |
||||||
Package: |
PBI |
|||||
Version: |
V0-0-4 |
Marked: |
(not marked) |
|||
Constituent: |
doc_gather |
Tag: |
sun-gcc |
This graph shows which files directly or indirectly include this file:
CVS $Id: Inline.h,v 1.3 2004/02/17 01:30:08 russell Exp $
INLINE_IMP_EXT_PROTO - Declares prototypes, inlines with public interfaces. INLINE_IMP_EXT_FNC - Declares public inline functions. INLINE_IMP_EXP_PROTO - Declares prototypes, inlines with public interfaces. INLINE_IMP_EXP_FNC - Declares public inline functions. INLINE_IMP_LCL_PROTO - Declares prototypes, inlines with private interfaces. INLINE_IMP_LCL_FNC - Declares private inline functions.
INLINE_USR_EXT_PROTO - Declares prototypes, inlines with public interfaces. INLINE_USR_EXT_FNC - Declares public inline functions. INLINE_USR_EXP_PROTO - Declares prototypes, inlines with public interfaces. INLINE_USR_EXP_FNC - Declares public inline functions. INLINE_USR_LCL_PROTO - Declares prototypes, inlines with private interfaces. INLINE_USR_LCL_FNC - Declares private inline functions.
#ifndef MTH_IH #define MTH_IH . #include "PBS/inline.h"
#ifdef MTH__IMPLEMENTATION_FILE #define MTH__EXT_PROTO INLINE_IMP_EXT_PROTO #define MTH__EXT_FNC INLINE_IMP_EXT_FNC #define MTH__LCL_PROTO INLINE_IMP_LCL_PROTO #define MTH__LCL_FNC INLINE_IMP_LCL_FNC #else #define MTH__EXT_PROTO INLINE_USR_EXT_PROTO #define MTH__EXT_FNC INLINE_USR_EXT_FNC #define MTH__LCL_PROTO INLINE_USR_LCL_PROTO #define MTH__LCL_FNC INLINE_USR_LCL_FNC #endif / * Declare the prototypes * / MTH__EXT_PROTO int MTH__add (int a, int b); MTH__EXT_PROTO int MTH__sub (int a, int b); MTH__LCL_PROTO int mth__add (int a, int b); / * Drop the implementations * / MTH__EXT_FNC int MTH_add (int a, int b) { return mth__add (a, b); } MTH__EXT_FNC int MTH_sub (int a, int b) { return mth__add (a, -b); } MTH__LCL_FNC int mth__add (int a, int b) { return a + b; }
#include MTH.ih int myTest (a, b) { printf ("The sum of %d + %d = %d\n", a, b, MTH__add (a, b)); printf ("The dif of %d - %d = %d\n", a, b, MTH__sub (a, b)); }
#ifndef MTH_H #define MTH_H / * Define the prototypes * / int MTH_add (int a, int b); int MTH_sub (int a, int b); #endif
#include "PBS/alias.h" #include "PBS/inline.h" #define MTH__IMPLEMENTATION_FILE -- This is the implementation file #include "PBS/MTH.ih" -- Makes callable versions of -- MTH__add and MTH__sub ALIAS_BEG (MTH) -- This aliases ... ALIAS_FNC (MTH__add, MTH_add) -- ... MTH_add with MTH__add ALIAS_FNC (MTH__sub, MTH_sub) -- ... MTH_sub with MTH__sub ALIAS_END (MTH)
#include "PBI/Inline.h" #define MTH__IMPLEMENTATION_FILE #define MTH__add MTH_add #define MTH__sub MTH_sub # include "MTH.ih #endif