/* * Turbo Vision - Version 2.0 * * Copyright (c) 1994 by Borland International * All Rights Reserved. * Modified by Robert H”hne to be used for RHIDE. Modified by Salvador E. Tropea to avoid macros collisions and make easier to use. */ #if !defined( __UTIL_H ) #define __UTIL_H // SET: Used by names, they only include this file. #ifdef Uses_n #include #endif #undef __CM #undef __HC #undef __BASE #define __BASE 128 #define __CM(x,y) const unsigned short cm##x = __BASE+y; #define __HC(x,y) const unsigned short hc##x = __BASE+y; #ifndef CLY_DONT_DEFINE_MIN_MAX #ifdef min #undef min #endif #ifdef max #undef max #endif inline int min( const int &a, const int &b ) { return (a>b) ? b : a; } inline int max( const int &a, const int &b ) { return (a inline T min( const T &a, const T &b ) { return (a>b) ? b : a; } template inline T max( const T &a, const T &b ) { return (a complained about conflicts between a class member in your code and this macro */ #ifdef Uses_n /* The following macro is a little hack to decrease the compile time for the TV lib when compiling all the n*.cc files */ #define n(CLASS) \ class CLASS \ { \ public: \ static const char * const name; \ }; \ \ const char * const CLASS::name = #CLASS; #endif #endif // __UTIL_H