00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef LALAPPS_H_
00021 #define LALAPPS_H_
00022
00023 #include <config.h>
00024 #include <stdio.h>
00025 #include <lal/LALDatatypes.h>
00026
00027 #ifdef __cplusplus
00028 extern "C" {
00029 #pragma }
00030 #endif
00031
00032 NRCSID( LALAPPSH, "$Id: lalapps.h,v 1.3 2008/03/01 19:43:22 kipp Exp $" );
00033
00034 extern const LALStatus blank_status;
00035
00036 typedef int ( *lal_errhandler_t )(
00037 LALStatus *,
00038 const char *func,
00039 const char *file,
00040 const int line,
00041 volatile const char *id
00042 );
00043
00044 #define LAL_ERR_DFLT LAL_ERR_ABRT
00045 extern lal_errhandler_t lal_errhandler;
00046
00047 extern int LAL_ERR_EXIT(
00048 LALStatus *,
00049 const char *func,
00050 const char *file,
00051 const int line,
00052 volatile const char *id
00053 );
00054 extern int LAL_ERR_ABRT(
00055 LALStatus *,
00056 const char *func,
00057 const char *file,
00058 const int line,
00059 volatile const char *id
00060 );
00061 extern int LAL_ERR_RTRN(
00062 LALStatus *,
00063 const char *func,
00064 const char *file,
00065 const int line,
00066 volatile const char *id
00067 );
00068 extern int clear_status( LALStatus * );
00069 extern int set_debug_level( const char *s );
00070
00071 #define LAL_CALL( function, statusptr ) \
00072 ((function),lal_errhandler(statusptr,#function,__FILE__,__LINE__,rcsid))
00073
00074 #define PRINT_VERSION( program ) \
00075 fprintf(stderr,PACKAGE " %s version " VERSION "\n%s\n",program,rcsid)
00076
00077 #ifdef __cplusplus
00078 #pragma {
00079 }
00080 #endif
00081
00082 #endif