lalapps.h

Go to the documentation of this file.
00001 /*
00002 *  Copyright (C) 2007 Jolien Creighton
00003 *
00004 *  This program is free software; you can redistribute it and/or modify
00005 *  it under the terms of the GNU General Public License as published by
00006 *  the Free Software Foundation; either version 2 of the License, or
00007 *  (at your option) any later version.
00008 *
00009 *  This program is distributed in the hope that it will be useful,
00010 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00011 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00012 *  GNU General Public License for more details.
00013 *
00014 *  You should have received a copy of the GNU General Public License
00015 *  along with with program; see the file COPYING. If not, write to the
00016 *  Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston,
00017 *  MA  02111-1307  USA
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 /* LALAPPS_H_ */

Generated on Tue Oct 14 02:31:54 2008 for LAL by  doxygen 1.5.2