summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2004-08-21 05:45:33 -0400
committerJohn Wiegley <johnw@newartisans.com>2004-08-21 05:45:33 -0400
commit47cb7891c8012af2e6c03619f6b5ecaa32794126 (patch)
treeac8b1d4cd06d29af291ce3337c3f01401829af50
parent86ac953379adc270ff1c9f5bc45256d29f0c41cd (diff)
downloadfork-ledger-47cb7891c8012af2e6c03619f6b5ecaa32794126.tar.gz
fork-ledger-47cb7891c8012af2e6c03619f6b5ecaa32794126.tar.bz2
fork-ledger-47cb7891c8012af2e6c03619f6b5ecaa32794126.zip
changed RELEASE_LEVEL to DEBUG_LEVEL
-rw-r--r--Makefile8
-rw-r--r--binary.cc4
-rw-r--r--debug.h24
-rw-r--r--ledger.h6
4 files changed, 21 insertions, 21 deletions
diff --git a/Makefile b/Makefile
index 677dc4dc..72dceaf1 100644
--- a/Makefile
+++ b/Makefile
@@ -22,9 +22,9 @@ OBJS = $(patsubst %.cc,%.o,$(CODE))
CXX = g++
CFLAGS = -Wall -ansi -pedantic
-#DFLAGS = -O3 -fomit-frame-pointer -DRELEASE_LEVEL=0
-DFLAGS = -g -DRELEASE_LEVEL=4
-#DFLAGS = -g -DRELEASE_LEVEL=2 -pg
+#DFLAGS = -O3 -fomit-frame-pointer -DDEBUG_LEVEL=0
+DFLAGS = -g -DDEBUG_LEVEL=4
+#DFLAGS = -g -DDEBUG_LEVEL=2 -pg
INCS = -I/sw/include \
-I/usr/include/gcc/darwin/3.3/c++ \
@@ -84,7 +84,7 @@ include make.deps
install:
make clean
- make DFLAGS="-O3 -fomit-frame-pointer -DRELEASE_LEVEL=0"
+ make DFLAGS="-O3 -fomit-frame-pointer -DDEBUG_LEVEL=0"
cp ledger $(HOME)/bin
strip $(HOME)/bin/ledger
diff --git a/binary.cc b/binary.cc
index ea98eb2b..3d665244 100644
--- a/binary.cc
+++ b/binary.cc
@@ -26,7 +26,7 @@ static std::deque<commodity_t *> commodities;
static commodity_t::ident_t c_ident;
std::deque<amount_t::bigint_t *> bigints;
-#if RELEASE_LEVEL >= ALPHA
+#if DEBUG_LEVEL >= ALPHA
#define read_binary_guard(in, id) { \
unsigned short guard; \
in.read((char *)&guard, sizeof(guard)); \
@@ -267,7 +267,7 @@ unsigned int binary_parser_t::parse(std::istream& in,
journal, master);
}
-#if RELEASE_LEVEL >= ALPHA
+#if DEBUG_LEVEL >= ALPHA
#define write_binary_guard(in, id) { \
unsigned short guard = id; \
out.write((char *)&guard, sizeof(guard)); \
diff --git a/debug.h b/debug.h
index 2873ef7a..2c483cca 100644
--- a/debug.h
+++ b/debug.h
@@ -7,20 +7,20 @@
#define RELEASE 1
#define NO_SEATBELT 0
-#ifndef RELEASE_LEVEL
-#define RELEASE_LEVEL RELEASE
+#ifndef DEBUG_LEVEL
+#define DEBUG_LEVEL RELEASE
#endif
-#if RELEASE_LEVEL >= ALPHA
+#if DEBUG_LEVEL >= ALPHA
#include <cstdlib> // for `getenv'
#include <cstring> // for `strcmp'
#endif
-#if RELEASE_LEVEL >= BETA
+#if DEBUG_LEVEL >= BETA
#include <cassert>
#endif
-#if RELEASE_LEVEL >= RELEASE
+#if DEBUG_LEVEL >= RELEASE
#include <iostream>
#endif
@@ -57,7 +57,7 @@ namespace ledger {
throw exc(s.str().c_str()); \
}
-#if RELEASE_LEVEL >= ALPHA
+#if DEBUG_LEVEL >= ALPHA
#include <pcre.h>
#include <cstring>
@@ -91,13 +91,13 @@ bool _debug_active(const char * const cls);
#define CONFIRM(x) assert(x)
-#if RELEASE_LEVEL == DEVELOPER
+#if DEBUG_LEVEL == DEVELOPER
#define VALIDATE(x) assert(x)
#else
#define VALIDATE(x)
#endif
-#else // RELEASE_LEVEL
+#else // DEBUG_LEVEL
#define DEBUG_CLASS(cls)
#define DEBUG(cls) 0
@@ -107,24 +107,24 @@ bool _debug_active(const char * const cls);
#define VALIDATE(x)
-#if RELEASE_LEVEL == NO_SEATBELT
+#if DEBUG_LEVEL == NO_SEATBELT
#undef assert
#define assert(x)
#define CONFIRM(x)
-#elif RELEASE_LEVEL >= RELEASE
+#elif DEBUG_LEVEL >= RELEASE
extern std::ostream * warning_stream;
#define CONFIRM(x)
-#elif RELEASE_LEVEL >= BETA
+#elif DEBUG_LEVEL >= BETA
#define CONFIRM(x) assert(x)
#endif
-#endif // RELEASE_LEVEL
+#endif // DEBUG_LEVEL
} // namespace ledger
diff --git a/ledger.h b/ledger.h
index 97f0afe4..99886389 100644
--- a/ledger.h
+++ b/ledger.h
@@ -16,10 +16,10 @@
#include <ctime>
#include <iostream>
-#ifdef RELEASE_LEVEL
-#if RELEASE_LEVEL >= 2
+#ifdef DEBUG_LEVEL
+#if DEBUG_LEVEL >= 2
#include "debug.h"
-#elif RELEASE_LEVEL == 0
+#elif DEBUG_LEVEL == 0
#define NO_CLEANUP 1
#endif
#endif