## tests/er/test_er.c

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

## FUNCTIONS

This source file includes following functions.

1. main

       1 #include <erroutines.h>
       2 #include "bitmask.h"
       3
       4 /*-----------------------------------------------------------------------*/
       5
       6 void main (int argc, char **argv)
         /* [<][>][^][v][top][bottom][index][help] */
       7 {
       8   er_path_t path;
       9   er_filter_t filter;
      10
      11   /* this is to set the program name in global variable used in error reporting */
      12   ER_init(argc, argv);
      13
      14
      15   /* path */
      16   memset( &path, sizeof(path), 0);
      17   pthread_mutex_init( &(path.mutex), NULL );
      18   path.active = 1;
      19   path.format = ER_M_SEVCHAR | ER_M_TEXTLONG;
      20   path.type   = ER_PATH_NAME;
      21   strcpy(path.descr.name.filename, "hithere");
      22
      23   /* filter */
      24   memset( &filter, sizeof(filter), 0);
      25   filter.fac_mask = MA_new(FAC_ER, MA_END);
      26   filter.asp_mask = ASP_RX_NODCRE_GEN | ASP_RX_NODCRE_DET | ASP_RX_SRCH_GEN;
      27   filter.sev_min  = ER_SEV_D;
      28   filter.sev_max  = ER_SEV_F;
      29
      30   er_add_filter( &path, &filter );
      31   er_register_path( &path, "Marek");
      32
      33   er_print_paths();
      34
      35   ER_dbg_eq(FAC_ER, ASP_RX_NODCRE_GEN, "%u", time(NULL)  );
      36   ER_dbg_va(FAC_ER, 2, "burumburum %d %d %d",
      37             getpid(), geteuid(), getuid() );
      38
      39 }
      40
      41

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