00001 #ifndef PORTABLE_NEW_INCLUDED 00002 #define PORTABLE_NEW_INCLUDED 00003 00004 00005 00006 // 00007 // Copyright 2002, Lowell Boggs Jr. 00008 // 00009 // This file or directory, containing source code for a computer program, 00010 // is Copyrighted by Lowell Boggs, Jr. 987 Regency Drive, Lewisville 00011 // TX (USA), 75067. You may use, copy, modify, and distribute this 00012 // source file without charge or obligation so long as you agree to 00013 // the following: 00014 // 00015 // 1. You must indemnify Lowell Boggs against any and all financial 00016 // obligations caused by its use, misuse, function, or malfunction. 00017 // Further, you acknowledge that there is no warranty of any kind, 00018 // whatsoever. 00019 // 00020 // 2. You agree not to attempt to patent any portion of this original 00021 // work -- though you may attempt to patent your own extensions to 00022 // it if you so choose. 00023 // 00024 // 3. You keep this copyright notice with the file and all copies 00025 // of the file and do not change it anyway except language translation. 00026 // 00027 // You are responsible for enforcing your own compliance with these 00028 // conditions and may not use this source file if you cannot agree to the 00029 // above terms and conditions. 00030 00036 00037 00038 #include <new> 00039 00040 #ifdef NEW_NO_EXCEPTIONS 00041 // specifically the older compilers that don't have an exception 00042 // specification on operator new 00043 #define THROW(x) 00044 #define BAD_ALLOC_EXCEPTION 00045 #define THROW_NOTHING 00046 #else 00047 #define THROW(x) throw(x) 00048 #define THROW_NOTHING throw() 00049 #define BAD_ALLOC_EXCEPTION std::bad_alloc 00050 #endif 00051 00052 #endif