Listing 1 DBG_RTRN.H — on include file that defines a macro replacement for the return keyword.

/****************************************************
             Name: DBG_RTRN.H
       Description: Macro wrapper for return keyword
       Portability: Standard C
****************************************************/
#if !defined ( DBG_RTRN_DEFINED )

   #if !defined ( NDEBUG )
      #define return( Arg ) \
      do \
         { \
         if ( Arg != EXIT_SUCCESS ) \
            fprintf( stderr, "\nRETURN VALUE: "\
                "%d\n\tFILE: %s\n\tLINE: %d\n", \
                Arg, __FILE__, __LINE__ ); \
         return ( Arg ); \
         } while ( 0 )
   #endif

   #define DBG_RTRN_DEFINED

#endif

/* End of File */