root/ompi/mca/topo/treematch/treematch/tm_verbose.c

/* [<][>][^][v][top][bottom][index][help] */

DEFINITIONS

This source file includes following definitions.
  1. tm_set_verbose_level
  2. tm_get_verbose_level
  3. tm_open_verbose_file
  4. tm_close_verbose_file
  5. tm_get_verbose_output

   1 #include "tm_verbose.h"
   2 #include <stdio.h>
   3 static unsigned int verbose_level = ERROR;
   4 static FILE *output = NULL;
   5 
   6 void tm_set_verbose_level(unsigned int level){
   7   verbose_level = level;
   8 }
   9 
  10 unsigned int tm_get_verbose_level(){
  11   return verbose_level;
  12 }
  13 
  14 int tm_open_verbose_file(char *filename){
  15   output = fopen(filename,"w");
  16   if(output == NULL)
  17     return 0;
  18   else
  19     return 1;
  20 }
  21 
  22 int tm_close_verbose_file(void){
  23   if(output != NULL)
  24     return fclose(output);
  25   
  26   return 0;
  27 }
  28 
  29 FILE *tm_get_verbose_output(){
  30   if(!output)
  31     return stdout;
  32   else
  33     return output;
  34 }

/* [<][>][^][v][top][bottom][index][help] */