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 00452 #ifndef BPMDEFS_H__ 00453 #define BPMDEFS_H__ 00454 00455 /* ----------------------------------------------------------------------------- 00456 includes 00457 -------------------------------------------------------------------------- */ 00458 00459 00460 /* ----------------------------------------------------------------------------- 00461 macro definitions 00462 -------------------------------------------------------------------------- */ 00463 00464 /* #define BUILD_DLL */ 00465 #if defined ( DLL_EXPORT ) && ( defined ( _WIN32 ) || defined ( __WIN32__ ) ) 00466 # if defined BUILD_DLL 00467 # define EXTERN __declspec( dllexport ) 00468 # else 00469 # define EXTERN __declspec( dllimport ) 00470 # endif 00471 #else 00472 # define EXTERN extern 00473 #endif 00474 00475 #ifndef _GNU_SOURCE 00476 #define _GNU_SOURCE /* needed for some functions (e.g. like 'round') */ 00477 #endif 00478 00479 #ifndef TRUE 00480 # define TRUE (1==1) 00481 #endif 00482 #ifndef FALSE 00483 # define FALSE (0==1) 00484 #endif 00485 00486 #define MIN(a,b) (a<=b?a:b) 00487 #define MAX(a,b) (a>=b?a:b) 00488 #define SQR( a ) ( (a) * (a) ) 00489 #define ABS( a ) ( (a) < 0 ? -(a) : (a) ) 00490 #define SWAP( a, b ) tempr=(a);(a)=(b);(b)=tempr 00491 00492 #ifdef PI 00493 # undef PI 00494 #endif 00495 #define PI 3.14159265358979323846264338328 /* echo "scale=100;4*a(1)"|bc -l ;) */ 00496 00497 #define BPM_SUCCESS 0 00498 #define BPM_FAILURE 1 00499 00500 #define Re 0 00501 #define Im 1 00502 00503 /* ----------------------------------------------------------------------------- 00504 typedefs, enums and other declarations 00505 -------------------------------------------------------------------------- */ 00506 00507 /* ----------------------------------------------------------------------------- 00508 function prototypes and declarations 00509 -------------------------------------------------------------------------- */ 00510 00511 #endif /* #ifndef BPMDEFS_H__ */ 00512 00513 /* ================================ end of file ============================= */ 00514