source: git/src/debug.h @ b6de07d

RELEASE/1.0RELEASE/1.1RELEASE/1.2debug-cidebug-ci-sanitisersfaster-cavernlogstereowalls-datawalls-data-hanging-as-warning
Last change on this file since b6de07d was 8937874, checked in by Olly Betts <olly@…>, 23 years ago

Cleaned up, removing debug options which no longer have any effect.

git-svn-id: file:///home/survex-svn/survex/trunk@1557 4b37db11-9a0c-4f06-9ece-9ab7cdaee568

  • Property mode set to 100644
File size: 2.2 KB
Line 
1/* debug.h
2 * SURVEX debugging info control macros
3 * Copyright (C) 1993-1996,2001 Olly Betts
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/*#define DEBUG_INVALID 1*/
21
22#ifndef DEBUG_H
23#define DEBUG_H
24#include "useful.h"
25
26/* turn periodic calls to validate() checks on/off */
27#ifndef VALIDATE
28# define VALIDATE 0
29#endif
30
31/* turn on dumping of network data structure (lots of output) */
32#ifndef DUMP_NETWORK
33# define DUMP_NETWORK 0
34#endif
35
36/* elaborate if data structure becomes invalid */
37#ifndef DEBUG_INVALID
38# define DEBUG_INVALID 0
39#endif
40
41/* macro to report detected bug */
42#ifdef DEBUG_INVALID
43# define BUG(M) BLK(fputsnl(__FILE__":"STRING(__LINE__)": "M, STDERR);\
44 fatalerror(/*Bug in program detected! Please report this to the authors*/11);)
45#else
46# define BUG(M) fatalerror(/*Bug in program detected! Please report this to the authors*/11)
47#endif
48
49/* assert macro, which calls BUG() if it fails */
50#define ASSERT(E) if (E) {} else BUG("assert("#E") failed")
51
52/* assert macro, which calls BUG() if it fails */
53#define ASSERT2(E, M) if (E) {} else BUG("assert("#E") failed - "M)
54
55/* datain.c */
56
57/* general debugging info */
58#define DEBUG_DATAIN 0
59/* more (older) debugging info */
60#define DEBUG_DATAIN_1 0
61
62/* network.c */
63
64/* print info generally useful for debugging */
65#define PRINT_NETBITS 0
66/* puts '+' for legs 'inside' big (>3) nodes */
67#define SHOW_INTERNAL_LEGS 0
68
69/* matrix.c */
70
71/* print out the matrices */
72#define PRINT_MATRICES 0
73/* display info about where we are in algorithm */
74#define DEBUG_MATRIX 0
75/* print out bumf as matrix is built from network */
76#define DEBUG_MATRIX_BUILD 0
77
78#endif
Note: See TracBrowser for help on using the repository browser.