source: tags/ms_r17q1/CORE/arb_core.h

Last change on this file was 13744, checked in by westram, 9 years ago
  • store/restore global buffers when updating db-browser
    • if db-browser displays the property-db it receives callbacks on nearly every awar-change
    • due to heavy use of global buffers it invalidates them on refresh
    • because the property-db is transaction-free, the update occurs from "inside" the awar-change - ARB crashed if the awar-change itself depends on global-buffer contents
File size: 1.8 KB
Line 
1// ================================================================ //
2//                                                                  //
3//   File      : arb_core.h                                         //
4//   Purpose   :                                                    //
5//                                                                  //
6//   Coded by Ralf Westram (coder@reallysoft.de) in November 2010   //
7//   Institute of Microbiology (Technical University Munich)        //
8//   http://www.arb-home.de/                                        //
9//                                                                  //
10// ================================================================ //
11
12#ifndef ARB_CORE_H
13#define ARB_CORE_H
14
15#ifndef _GLIBCXX_CSTDIO
16#include <cstdio>
17#endif
18#ifndef DUPSTR_H
19#include <dupstr.h>
20#endif
21#ifndef ATTRIBUTES_H
22#include <attributes.h>
23#endif
24
25typedef const char *GB_ERROR; // memory managed by CORE
26
27struct GBS_regex;
28class GlobalStringBuffers;
29
30enum GB_CASE {
31    GB_IGNORE_CASE    = 0,
32    GB_MIND_CASE      = 1,
33    GB_CASE_UNDEFINED = 2
34};
35
36typedef void (*gb_error_handler_type)(const char *msg);
37typedef void (*gb_warning_func_type)(const char *msg);
38typedef void (*gb_information_func_type)(const char *msg);
39typedef int (*gb_status_gauge_func_type)(double val);
40typedef int (*gb_status_msg_func_type)(const char *val);
41
42
43bool GBK_running_on_valgrind(void);
44
45bool GBK_raises_SIGSEGV(void (*cb)(void));
46void GBK_install_SIGSEGV_handler(bool dump_backtrace);
47
48GB_ERROR GBK_assert_msg(const char *assertion, const char *file, int linenr);
49
50void GBK_dump_backtrace(FILE *out, const char *message);
51void GBK_terminate(const char *error) __ATTR__NORETURN;
52
53GB_ERROR GBK_system(const char *system_command);
54
55#else
56#error arb_core.h included twice
57#endif // ARB_CORE_H
Note: See TracBrowser for help on using the repository browser.