"Fossies" - the Fresh Open Source Software Archive

Member "FunctionCheck-3.2.0/src/share/fc_tools.h" (26 May 2012, 2064 Bytes) of package /linux/privat/old/FunctionCheck-3.2.0.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file.

    1 /*
    2  * FunctionCheck profiler
    3  * (C) Copyright 2000-2012 Yannick Perret
    4  * 
    5  *  This program is free software; you can redistribute it and/or
    6  *  modify it under the terms of the GNU General Public License as
    7  *  published by the Free Software Foundation; either version 2 of the
    8  *  License, or (at your option) any later version.
    9  *
   10  *  This program is distributed in the hope that it will be useful,
   11  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
   12  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   13  *  General Public License for more details.
   14  *
   15  *  You should have received a copy of the GNU General Public License
   16  *  along with this program; if not, write to the Free Software
   17  *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
   18  */
   19 
   20 /* fc_tools: various tools for the lib part of functioncheck
   21              in particular for outputs
   22 */
   23 
   24 #ifndef __fc_tools_h_
   25 #define __fc_tools_h_
   26 
   27 /** includes **/
   28 #include <stdarg.h>
   29 #include <stdio.h>
   30 #include <stdlib.h>
   31 
   32 /** the FILE where to write messages/errors (default: stderr) **/
   33 extern FILE *fc_message_stream;
   34 
   35 /* allow to set the output stream */
   36 void fc_set_message_stream(FILE*f);
   37 
   38 /** strings for exit status **/
   39 char *fc_strerror(int err);
   40 
   41 /** flag to indicate if debug is available */
   42 extern int fc_allow_debug_hard;
   43 
   44 /** the name used for functioncheck itself (in messages) **/
   45 extern char *fc_lib_name;
   46 
   47 /* allow to set the lib name */
   48 void fc_set_message_name(char *name);
   49 
   50 /* mode==true: allow messages */
   51 void fc_set_message_mode(int mode);
   52 
   53 /* set debug mode */
   54 void fc_set_debug_mode(int mode);
   55 
   56 /** message functions **/
   57 void fc_message(char *format, ...);
   58 void fc_message_fatal(int ret, char *format, ...);
   59 void fc_rdebug(char *format, ...);
   60 
   61 #ifndef FC_NO_DEBUG
   62 #define fc_debug fc_rdebug
   63 #else
   64 #define fc_debug(args...)  {}
   65 #endif
   66 
   67 /** allocation functions **/
   68 #define fc_malloc(var, nbel) \
   69   ((var) = malloc((nbel)*(sizeof(*(var)))))
   70 #define fc_realloc(var, nbel) \
   71   ((var) = realloc((var),(nbel)*(sizeof(*(var)))))
   72 
   73 #endif // __fc_tools_h_