Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members  

defs.h

Go to the documentation of this file.
00001 /***************************************************************************
00002     defs.h  -  System-wide definitions.
00003                              -------------------
00004     begin                : June 21 2002
00005     copyright            : (C) 2003 by Vojtìch Toman
00006     email                : vtoman@lit.cz
00007  ***************************************************************************/
00008 
00009 /***************************************************************************
00010  *                                                                         *
00011  *   This program is free software; you can redistribute it and/or modify  *
00012  *   it under the terms of the GNU General Public License as published by  *
00013  *   the Free Software Foundation; either version 2 of the License, or     *
00014  *   (at your option) any later version.                                   *
00015  *                                                                         *
00016  ***************************************************************************/
00017 
00026 #ifndef DEFS_H
00027 #define DEFS_H
00028 
00029 
00030 #ifdef __WIN32__
00031 # include "winconfig.h"
00032 #else
00033 # ifdef HAVE_CONFIG_H
00034 #  include <config.h>
00035 # endif
00036 #endif
00037 
00038 #include <iostream>
00039 #include <iomanip>
00040 
00041 #include "debug.h"
00042 
00043 
00044 
00046 #define DEFAULT_FILE_SUFFIX     ".e"
00047 
00048 
00049 
00055 #define FILE_STAMP              "EX"
00056 
00057 
00058 
00059 
00063 //#define MULT_DIV 
00064 
00065 
00066 
00070 #define B_BITS          32
00071 
00072 
00073 
00077 #define F_BITS          27
00078 
00079 #if B_BITS < F_BITS + 2
00080 #error : Code bits must be at least freq bits + 2
00081 #endif
00082 
00083 
00084 
00094 #define FRUGAL_BITS 1
00095 
00096 
00097 
00101 #define SEQUENTIAL_ALGORITHM
00102 
00103 
00104 
00105 
00106 
00112 enum UserAction
00113 {
00119   Compress,
00120   
00126   Decompress,
00127   
00133   WellFormed,
00134 };
00135 
00136 
00137 
00139 
00140 
00141 
00149 #define OUTPUT(x)               std::cout << x
00150 
00151 
00152 
00160 #define OUTPUTNL(x)             OUTPUT(x << std::endl)
00161 
00162 
00163 
00169 #define OUTPUTENDLINE           std::cout  << std::endl
00170 
00171 
00172 
00180 #define OUTPUTE(x)              std::cerr << x
00181 
00182 
00183 
00191 #define OUTPUTENL(x)            OUTPUTE(x << std::endl)
00192 
00193 
00194 
00202 #define OUTPUTEENDLINE          std::cerr  << std::endl
00203 
00204 
00205 
00213 #define WRN(x)                  std::cerr << "[WARNING] " << x << std::endl
00214 
00215 
00216 
00224 #define ERR(x)                  std::cerr << "[ERROR] " << x << std::endl
00225 
00226 
00227 
00235 #define FATAL(x)                                        \
00236 {                                                       \
00237   PRINT_SOURCE_POSITION;                                \
00238   std::cerr << "[FATAL ERROR] " << x << std::endl       \
00239             << "Aborting." << std::endl;                \
00240   throw ExaltFatalErrorException();                     \
00241 }
00242 
00243 
00244 
00252 #define PARSERERR(x)            std::cerr << std::endl << "[PARSE ERROR] " << x << std::endl
00253 
00254 
00256 #define AMP_REPLACEMENT 6
00257 
00259 
00260 
00261 /*
00262   \mainpage Exalt API Documentation
00263   
00264   \section intro Introduction
00265   
00266   This is the introduction.
00267   
00268   \section install Installation
00269   
00270   \subsection step1 Step 1: Opening the box
00271   
00272   etc...
00273 */
00274 
00275 
00276 
00277 #endif //DEFS_H

Generated on Wed Feb 5 10:43:01 2003 for Exalt by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002