Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members

BInternal.h

00001 //
00002 // Copyright (c) 2000 by Tech Soft America, LLC.
00003 // The information contained herein is confidential and proprietary to
00004 // Tech Soft America, LLC., and considered a trade secret as defined under
00005 // civil and criminal statutes.  Tech Soft America shall pursue its civil
00006 // and criminal remedies in the event of unauthorized use or misappropriation
00007 // of its trade secrets.  Use of this information by anyone other than
00008 // authorized employees of Tech Soft America, LLC. is granted only under a
00009 // written non-disclosure agreement, expressly prescribing the scope and
00010 // manner of such use.
00011 //
00012 // $Header: /NewRoot/DWF Toolkit/v6/develop/global/src/dwf/w3dtk/BInternal.h 1     9/12/04 8:47p Evansg $
00013 //
00014 
00015 
00016 
00017 
00018 #ifndef BSTREAM_INTERNALS
00019 #define BSTREAM_INTERNALS
00020 
00021 
00022 #ifndef null
00023 #   define null         0
00024 #endif
00025 #ifndef nobreak
00026 #   define nobreak      
00027 #endif
00028 #ifndef countof
00029 #   define countof(x)   (int)(sizeof(x) / sizeof(x[0]))
00030 #endif
00031 #ifndef forever
00032 #   define forever      while (1)
00033 #endif
00034 #ifndef until
00035 #   define until(x)     while (!(x))
00036 #endif
00037 
00038 
00039 #define streq(a,b)      (!strcmp(a,b))
00040 #define streqn(a,b,n)   (!strncmp(a,b,n))
00041 
00042 #ifdef _M_IA64
00043 #   define POINTER_SIZED_INT __int64
00044 #   define POINTER_SIZED_UINT unsigned __int64
00045 #else
00046 #   define POINTER_SIZED_INT long
00047 #   define POINTER_SIZED_UINT unsigned long
00048 #endif
00049 
00050 #define UL2VP(x) (void*)(POINTER_SIZED_UINT)x
00051 #define SL2VP(x) (void*)(POINTER_SIZED_INT)x
00052 #define VP2UL(x) (unsigned long)(POINTER_SIZED_UINT)x
00053 #define VP2SL(x) (long)(POINTER_SIZED_INT)x
00054 
00055 #ifndef UNREFERENCED
00056 #define UNREFERENCED(x) ((void)(x))
00057 #endif
00058 
00059 
00060 
00061 #ifdef _DEBUG
00062     #ifdef _MSC_VER
00063         #include <windows.h>
00064     #endif
00065     #include <stdio.h>
00066     #include <stdarg.h>
00067     inline void dprintf (char const * format, ...) {
00068         auto        char        buffer[1024];
00069         auto        va_list     arguments;
00070 
00071         va_start (arguments, format);  
00072         vsprintf (buffer, format, arguments);
00073         va_end (arguments);  
00074         #ifdef _MSC_VER
00075 #ifndef _WIN32_WCE
00076             OutputDebugStringA (buffer);
00077 #endif
00078         #else
00079             fprintf (stderr, buffer);
00080         #endif
00081     }
00082 #else
00083     inline void dprintf (char const * format, ...) {
00084         UNREFERENCED(format);
00085     }
00086 #endif
00087 
00088 #endif  

Generated on Tue May 17 12:05:59 2005 for Autodesk DWF 3D Toolkit by  doxygen 1.4.1