00001 /* 00002 libbpm - BPM signal processing/simulation library 00003 Copyright (C) 2006-07 Bino Maiheu (bino@hep.ucl.ac.uk) 00004 00005 This program is free software; you can redistribute it and/or modify 00006 it under the terms of the GNU General Public License as published by 00007 the Free Software Foundation; either version 2 of the License, or 00008 (at your option) any later version. 00009 00010 This program is distributed in the hope that it will be useful, 00011 but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00013 GNU General Public License for more details. 00014 00015 You should have received a copy of the GNU General Public License 00016 along with this program; if not, write to the Free Software 00017 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 00018 */ 00019 00451 #ifndef BPMDEFS_H__ 00452 #define BPMDEFS_H__ 00453 00454 /* ----------------------------------------------------------------------------- 00455 includes 00456 -------------------------------------------------------------------------- */ 00457 00458 00459 /* ----------------------------------------------------------------------------- 00460 macro definitions 00461 -------------------------------------------------------------------------- */ 00462 00463 /* #define BUILD_DLL */ 00464 #if defined ( DLL_EXPORT ) && ( defined ( _WIN32 ) || defined ( __WIN32__ ) ) 00465 # if defined BUILD_DLL 00466 # define EXTERN __declspec( dllexport ) 00467 # else 00468 # define EXTERN __declspec( dllimport ) 00469 # endif 00470 #else 00471 # define EXTERN extern 00472 #endif 00473 00474 #ifndef _GNU_SOURCE 00475 #define _GNU_SOURCE /* needed for some functions (e.g. like 'round') */ 00476 #endif 00477 00478 #ifndef TRUE 00479 # define TRUE (1==1) 00480 #endif 00481 #ifndef FALSE 00482 # define FALSE (0==1) 00483 #endif 00484 00485 #define MIN(a,b) (a<=b?a:b) 00486 #define MAX(a,b) (a>=b?a:b) 00487 #define SQR( a ) ( (a) * (a) ) 00488 #define ABS( a ) ( (a) < 0 ? -(a) : (a) ) 00489 #define SWAP( a, b ) tempr=(a);(a)=(b);(b)=tempr 00490 00491 #ifdef PI 00492 # undef PI 00493 #endif 00494 #define PI 3.14159265358979323846264338328 /* echo "scale=100;4*a(1)"|bc -l ;) */ 00495 00496 #define BPM_SUCCESS 0 00497 #define BPM_FAILURE 1 00498 00499 #define Re 0 00500 #define Im 1 00501 00502 /* ----------------------------------------------------------------------------- 00503 typedefs, enums and other declarations 00504 -------------------------------------------------------------------------- */ 00505 00506 /* ----------------------------------------------------------------------------- 00507 function prototypes and declarations 00508 -------------------------------------------------------------------------- */ 00509 00510 #endif /* #ifndef BPMDEFS_H__ */ 00511 00512 /* ================================ end of file ============================= */ 00513