/alps/pcitool

To get this branch, use:
bzr branch http://suren.me/webbzr/alps/pcitool

« back to all changes in this revision

Viewing changes to error.c

  • Committer: Suren A. Chilingaryan
  • Date: 2015-04-20 20:01:04 UTC
  • Revision ID: csa@suren.me-20150420200104-b5xny65io8lvoz3w
Big redign of model structures

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#define _PCILIB_ERROR_C
2
 
 
3
1
#include <stdio.h>
4
2
#include <stdarg.h>
5
3
 
 
4
#include "config.h"
6
5
#include "error.h"
7
6
 
8
 
static void pcilib_print_error(const char *msg, ...) {
 
7
void pcilib_print_error(const char *msg, ...) {
9
8
    va_list va;
10
9
    
11
10
    va_start(va, msg);
14
13
    printf("\n");
15
14
}
16
15
 
17
 
void (*pcilib_error)(const char *msg, ...) = pcilib_print_error;
18
 
void (*pcilib_warning)(const char *msg, ...) = pcilib_print_error;
19
16
 
20
17
int pcilib_set_error_handler(void (*err)(const char *msg, ...), void (*warn)(const char *msg, ...)) {
21
18
    if (err) pcilib_error = err;