~ubuntu-branches/ubuntu/raring/ecasound2.2/raring

« back to all changes in this revision

Viewing changes to kvutils/kvu_dbc.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Junichi Uekawa
  • Date: 2009-11-02 18:22:35 UTC
  • mfrom: (5.1.2 sid)
  • Revision ID: james.westby@ubuntu.com-20091102182235-4ngh7699dmkgonyu
Tags: 2.7.0-1
* New upstream release.
* Depend on libreadline-dev instead of libreadline5-dev by request of
  Mattias Klose. It's now libreadline6-dev. (closes: #553748)
* Update menu file to use section Applications/ instead of Apps/.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/**************************************************************************
 
2
 * dbc.h: A barebones design-by-contract framework for C and C++
 
3
 * Copyright (C) 2009 Kai Vehmanen
 
4
 *
 
5
 * This program is free software; you can redistribute it and/or modify
 
6
 * it under the terms of the GNU General Public License as published by
 
7
 * the Free Software Foundation; either version 2 of the License, or
 
8
 * (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
 
13
 * GNU 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
 
18
 **************************************************************************/
 
19
 
 
20
#ifdef HAVE_CONFIG_H
 
21
#include <config.h>
 
22
#endif
 
23
 
 
24
#include "kvu_dbc.h"
 
25
#include "kvu_debug.h"
 
26
 
 
27
#ifdef ENABLE_DBC
 
28
 
 
29
#include <cstdio>
 
30
 
 
31
void kvu_dbc_report_failure(const char *action, const char* expr, const char* file, const char* func, int lineno)
 
32
{
 
33
 
 
34
#ifndef NDEBUG
 
35
  kvu_print_backtrace_stderr();
 
36
#endif
 
37
 
 
38
  std::fprintf(stderr, 
 
39
               "Warning: type %s soft-assert '%s' failed at\n -> %s:%d [%s]\n", action, expr, file, lineno, func);
 
40
}
 
41
 
 
42
#endif