basix_doc 0.1
/Users/mourrain/Devel/mmx/basix/src/basix.cpp
Go to the documentation of this file.
00001 
00002 /******************************************************************************
00003 * MODULE     : basix.cpp
00004 * DESCRIPTION: Basic inclusions, definitions and routines
00005 * COPYRIGHT  : (C) 2003  Joris van der Hoeven
00006 *******************************************************************************
00007 * This software falls under the GNU general public license and comes WITHOUT
00008 * ANY WARRANTY WHATSOEVER. See the file $TEXMACS_PATH/LICENSE for more details.
00009 * If you don't have this file, write to the Free Software Foundation, Inc.,
00010 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
00011 ******************************************************************************/
00012 
00013 #include <basix/list.hpp>
00014 #include <basix/system.hpp>
00015 #include <basix/port.hpp>
00016 namespace mmx {
00017 
00018 /******************************************************************************
00019 * Some global variables and routines
00020 ******************************************************************************/
00021 
00022 int    mmx_argc;
00023 char** mmx_argv;
00024 void   noop () {}
00025 
00026 /******************************************************************************
00027 * Error management
00028 ******************************************************************************/
00029 
00030 volatile void
00031 fatal_error (char* message, char* routine, char* file) {
00032   mmout << "\nFatal error: " << message
00033         << "\n             in '" << routine
00034         << "' in file '" << file << "'\n";
00035   exit (1);
00036 }
00037 
00038 exception
00039 as_exception (const generic& x) {
00040   return exception (x);
00041 }
00042 
00043 exception
00044 error_message (const char* msg) {
00045   return exception (msg, generic ("C++ code"));
00046 }
00047 
00048 exception
00049 error_message (const string& msg) {
00050   return exception (msg, generic ("C++ code"));
00051 }
00052 
00053 } // namespace mmx
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines