Rebuild binary when our libraries have changed.
[mediadatabase.git] / libfrontend / error.c
blobac90293606e2a1c4241dfa6c6eac68a20255d3e5
1 /* -*- Mode: C ; c-basic-offset: 2 -*- */
2 /*****************************************************************************
4 * $Id: error.c,v 1.2 2004/05/21 23:42:49 nedko Exp $
6 * DESCRIPTION:
7 * Mediadatabase error handling.
9 * AUTHOR:
10 * Nedko Arnaudov <nedko@users.sourceforge.net>
12 * LICENSE:
13 * GNU GENERAL PUBLIC LICENSE version 2
15 *****************************************************************************/
17 #include <stdlib.h>
18 #include <stdio.h>
19 #include <stdarg.h>
21 #include "../result.h"
22 #include "error.h"
24 #define FORMATTING_BUFFER_SIZE 8*1024
26 void
27 mediadb_error_printf(
28 unsigned int nCritical,
29 const char *pszFormat,
30 ...)
32 va_list argList;
33 char Buffer[FORMATTING_BUFFER_SIZE];
35 va_start(argList, pszFormat);
36 vsnprintf(Buffer, FORMATTING_BUFFER_SIZE-1, pszFormat, argList);
37 va_end(argList);
39 Buffer[FORMATTING_BUFFER_SIZE-1] = 0;
41 mediadb_error_callback(nCritical, Buffer);
44 /*****************************************************************************
46 * Modifications log:
48 * !!! WARNING !!! Following lines are automatically updated by the CVS system.
50 * $Log: error.c,v $
51 * Revision 1.2 2004/05/21 23:42:49 nedko
52 * mediadb_error_callback() now tells if error is critical.
54 * Revision 1.1 2004/05/16 19:01:17 nedko
55 * libfrontend holds code common to frontends but not in libdb.
57 *****************************************************************************/