My Documents/Codes/MD++.svn/trunk/src/general.h File Reference

#include <string.h>
#include <strings.h>
#include <stdlib.h>
#include <fcntl.h>
#include <unistd.h>
#include <errno.h>
#include <signal.h>
#include <time.h>
#include <stdarg.h>
#include <sys/stat.h>
#include <math.h>

Go to the source code of this file.

Defines

#define M_SQRT2   (1.41421356237309504880168872420969807856967187537694807317668)
#define M_SQRT3   (1.73205080756887729352744634150587236694280525381038062805581)
#define M_SQRT5   (2.23606797749978969640917366873127623544061835961152572427090)
#define M_SQRT7   (2.64575131106459059050161575363926042571025918308245018036833)
#define M_CBRT2   (1.25992104989487316476721060727822835057025146470150798008198)
#define M_CBRT3   (1.44224957030740838232163831078010958839186925349935057754642)
#define M_CBRT5   (1.70997594667669698935310887254386010986805511054305492438286)
#define M_CBRT7   (1.91293118277238910119911683954876028286243905034587576621065)
#define M_E   (2.71828182845904523536028747135266249775724709369995957496697)
#define M_PI   (3.14159265358979323846264338327950288419716939937510582097494)
#define M_SQRTPI   1.77245385090551602729816748334114518279754945612238712821381
#define M_CBRTPI   1.46459188756152326302014252726379039173859685562793717435726
#define MIN_DOUBLE   (2.220446e-16)
#define DOUBLE_PRECISION_INFINITY   (1e308)
#define P_C   2.99792458e8
#define P_HBAR   1.0545919e-34
#define P_KB   1.380662e-23
#define P_E   1.6021892e-19
#define P_ME   9.109558e-31
#define P_G   6.6732e-11
#define P_NA   6.022169e23
#define P_U   1.660531e-27
#define P_MU0   (4*M_PI*1e-7)
#define P_EPSILON0   (1/P_MU0/P_C/P_C)
#define ESC   "\x1b"
#define BLK   ESC"[30m"
#define RED   ESC"[31m"
#define GRN   ESC"[32m"
#define YEL   ESC"[33m"
#define BLU   ESC"[34m"
#define MAG   ESC"[35m"
#define CYN   ESC"[36m"
#define WHT   ESC"[37m"
#define HIK   ESC"[1;30m"
#define HIR   ESC"[1;31m"
#define HIG   ESC"[1;32m"
#define HIY   ESC"[1;33m"
#define HIB   ESC"[1;34m"
#define HIM   ESC"[1;35m"
#define HIC   ESC"[1;36m"
#define HIW   ESC"[1;37m"
#define HBRED   ESC"[41;1m"
#define HBGRN   ESC"[42;1m"
#define HBYEL   ESC"[43;1m"
#define HBBLU   ESC"[44;1m"
#define HBMAG   ESC"[45;1m"
#define HBCYN   ESC"[46;1m"
#define HBWHT   ESC"[47;1m"
#define BBLK   ESC"[40m"
#define BRED   ESC"[41m"
#define BGRN   ESC"[42m"
#define BYEL   ESC"[43m"
#define BBLU   ESC"[44m"
#define BMAG   ESC"[45m"
#define BCYN   ESC"[46m"
#define BWHT   ESC"[47m"
#define NOR   ESC"[2;37;0m"
#define DUMP(d)   ((void)0)
#define ASSERT(p)   ((void)0)
#define ASSERTMSG   1?(void)0:(void)
#define NOTREACHED()   ((void)0)
#define NOTREACHEDMSG(d)   ((void)0)
#define VERIFY(p)   ((void)(p))

Functions

static void Warning (const char *fmt,...)
static void Error (const char *fmt,...)
void * MAlloc (size_t size)
void * Realloc (void *ptr, size_t size)
void Free (void *ptr)
char ** ArrAlloc2 (unsigned rsize, int dim1, int dim2)
char ** ReArrAlloc2 (void *ptr, unsigned rsize, int dim1, int dim2)
char * StrDup (const char *s)
bool Equal (double a, double b, double torlerate=1e-13)


Define Documentation

#define ASSERT (  )     ((void)0)

#define ASSERTMSG   1?(void)0:(void)

Definition at line 1187 of file general.h.

#define BBLK   ESC"[40m"

Definition at line 154 of file general.h.

#define BBLU   ESC"[44m"

Definition at line 158 of file general.h.

#define BCYN   ESC"[46m"

Definition at line 160 of file general.h.

#define BGRN   ESC"[42m"

Definition at line 156 of file general.h.

#define BLK   ESC"[30m"

Definition at line 122 of file general.h.

#define BLU   ESC"[34m"

Definition at line 126 of file general.h.

#define BMAG   ESC"[45m"

Definition at line 159 of file general.h.

#define BRED   ESC"[41m"

Definition at line 155 of file general.h.

Referenced by Error(), and Warning().

#define BWHT   ESC"[47m"

Definition at line 161 of file general.h.

#define BYEL   ESC"[43m"

Definition at line 157 of file general.h.

#define CYN   ESC"[36m"

Definition at line 128 of file general.h.

#define DOUBLE_PRECISION_INFINITY   (1e308)

Definition at line 80 of file general.h.

#define DUMP (  )     ((void)0)

#define ESC   "\x1b"

Definition at line 118 of file general.h.

#define GRN   ESC"[32m"

Definition at line 124 of file general.h.

#define HBBLU   ESC"[44;1m"

Definition at line 147 of file general.h.

#define HBCYN   ESC"[46;1m"

Definition at line 149 of file general.h.

#define HBGRN   ESC"[42;1m"

Definition at line 145 of file general.h.

#define HBMAG   ESC"[45;1m"

Definition at line 148 of file general.h.

#define HBRED   ESC"[41;1m"

Definition at line 144 of file general.h.

#define HBWHT   ESC"[47;1m"

Definition at line 150 of file general.h.

#define HBYEL   ESC"[43;1m"

Definition at line 146 of file general.h.

#define HIB   ESC"[1;34m"

Definition at line 137 of file general.h.

Referenced by FSParam::print().

#define HIC   ESC"[1;36m"

Definition at line 139 of file general.h.

Referenced by FSParam::exec(), and Organizer::quit().

#define HIG   ESC"[1;32m"

#define HIK   ESC"[1;30m"

Definition at line 133 of file general.h.

#define HIM   ESC"[1;35m"

#define HIR   ESC"[1;31m"

Definition at line 134 of file general.h.

Referenced by cn2pdb(), and SCParser::parse_buffer().

#define HIW   ESC"[1;37m"

Definition at line 140 of file general.h.

Referenced by Error(), and Warning().

#define HIY   ESC"[1;33m"

Definition at line 136 of file general.h.

#define M_CBRT2   (1.25992104989487316476721060727822835057025146470150798008198)

Definition at line 49 of file general.h.

#define M_CBRT3   (1.44224957030740838232163831078010958839186925349935057754642)

Definition at line 52 of file general.h.

#define M_CBRT5   (1.70997594667669698935310887254386010986805511054305492438286)

Definition at line 55 of file general.h.

#define M_CBRT7   (1.91293118277238910119911683954876028286243905034587576621065)

Definition at line 58 of file general.h.

#define M_CBRTPI   1.46459188756152326302014252726379039173859685562793717435726

Definition at line 71 of file general.h.

#define M_E   (2.71828182845904523536028747135266249775724709369995957496697)

Definition at line 62 of file general.h.

#define M_PI   (3.14159265358979323846264338327950288419716939937510582097494)

#define M_SQRT2   (1.41421356237309504880168872420969807856967187537694807317668)

Definition at line 36 of file general.h.

#define M_SQRT3   (1.73205080756887729352744634150587236694280525381038062805581)

Definition at line 39 of file general.h.

Referenced by SYWindow::newGraph().

#define M_SQRT5   (2.23606797749978969640917366873127623544061835961152572427090)

Definition at line 42 of file general.h.

#define M_SQRT7   (2.64575131106459059050161575363926042571025918308245018036833)

Definition at line 45 of file general.h.

#define M_SQRTPI   1.77245385090551602729816748334114518279754945612238712821381

Definition at line 68 of file general.h.

#define MAG   ESC"[35m"

Definition at line 127 of file general.h.

#define MIN_DOUBLE   (2.220446e-16)

Definition at line 76 of file general.h.

#define NOR   ESC"[2;37;0m"

 
#define NOTREACHED (  )     ((void)0)

Definition at line 1188 of file general.h.

Referenced by LFile::LoadToString().

#define NOTREACHEDMSG (  )     ((void)0)

Definition at line 1189 of file general.h.

#define P_C   2.99792458e8

Definition at line 85 of file general.h.

#define P_E   1.6021892e-19

Definition at line 88 of file general.h.

#define P_EPSILON0   (1/P_MU0/P_C/P_C)

Definition at line 94 of file general.h.

#define P_G   6.6732e-11

Definition at line 90 of file general.h.

#define P_HBAR   1.0545919e-34

Definition at line 86 of file general.h.

#define P_KB   1.380662e-23

Definition at line 87 of file general.h.

#define P_ME   9.109558e-31

Definition at line 89 of file general.h.

#define P_MU0   (4*M_PI*1e-7)

Definition at line 93 of file general.h.

#define P_NA   6.022169e23

Definition at line 91 of file general.h.

#define P_U   1.660531e-27

Definition at line 92 of file general.h.

#define RED   ESC"[31m"

Definition at line 123 of file general.h.

#define VERIFY (  )     ((void)(p))

Definition at line 1190 of file general.h.

#define WHT   ESC"[37m"

Definition at line 129 of file general.h.

#define YEL   ESC"[33m"

Definition at line 125 of file general.h.

Referenced by LFile::LoadToString().


Function Documentation

char** ArrAlloc2 ( unsigned  rsize,
int  dim1,
int  dim2 
) [inline]

Definition at line 1243 of file general.h.

References MAlloc().

bool Equal ( double  a,
double  b,
double  torlerate = 1e-13 
) [inline]

Definition at line 1270 of file general.h.

static void Error ( const char *  fmt,
  ... 
) [static]

Definition at line 1142 of file general.h.

References BRED, HIW, and NOR.

void Free ( void *  ptr  )  [inline]

Definition at line 1216 of file general.h.

void* MAlloc ( size_t  size  )  [inline]

Definition at line 1199 of file general.h.

Referenced by ArrAlloc2(), LFile::LoadToString(), and StrDup().

void* Realloc ( void *  ptr,
size_t  size 
) [inline]

Definition at line 1207 of file general.h.

char** ReArrAlloc2 ( void *  ptr,
unsigned  rsize,
int  dim1,
int  dim2 
) [inline]

Definition at line 1253 of file general.h.

References Realloc.

char* StrDup ( const char *  s  )  [inline]

Definition at line 1263 of file general.h.

References MAlloc().

static void Warning ( const char *  fmt,
  ... 
) [static]

Definition at line 1133 of file general.h.

References BRED, HIW, and NOR.


Generated on Tue Oct 28 15:21:10 2008 for MD++ by  doxygen 1.5.7.1