00001 #ifndef UTIL_H
00002 #define UTIL_H
00003
00004 #include <complex>
00005 #include <string>
00006 #include "sha1.h"
00007
00008
00009 typedef double Real;
00010 typedef std::complex<double> Cmplx;
00011 typedef long double lReal;
00012 #define fftw(name) fftw_ ## name
00013 #define TYPE_STR ""
00014
00015 #ifndef _WIN32
00016 #define _stdcall
00017 #endif
00018
00019
00020
00021 int parseint(char *str, int& res);
00022
00023
00024 int parsepositiveint(char *str, int& res);
00025
00026
00027
00028 int parsedouble(char *str, double& res);
00029
00030
00031 int parsepositivedouble(char *str, double& res);
00032
00034 std::string sha1tostring(SHA1 &sha1);
00035
00037 bool tol_eq(double a, double b);
00038
00039 #endif