summaryrefslogtreecommitdiff
path: root/src/main.cc
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2012-05-19 19:32:40 -0500
committerJohn Wiegley <johnw@newartisans.com>2012-05-20 04:48:05 -0500
commit4681e58d7f3cda2a2ac6d05b6ec1a106f568e029 (patch)
tree488d6531d688c68713baa5c1d70fb37be198b861 /src/main.cc
parent303976e563608d8a1f4eb09ac5c9402ae5ce74fd (diff)
downloadfork-ledger-4681e58d7f3cda2a2ac6d05b6ec1a106f568e029.tar.gz
fork-ledger-4681e58d7f3cda2a2ac6d05b6ec1a106f568e029.tar.bz2
fork-ledger-4681e58d7f3cda2a2ac6d05b6ec1a106f568e029.zip
Converted the Ledger build system to use CMake
Diffstat (limited to 'src/main.cc')
-rw-r--r--src/main.cc20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/main.cc b/src/main.cc
index b309255b..99f7451e 100644
--- a/src/main.cc
+++ b/src/main.cc
@@ -37,7 +37,7 @@
using namespace ledger;
-#ifdef HAVE_BOOST_PYTHON
+#if HAVE_BOOST_PYTHON
namespace ledger {
extern char * argv0;
}
@@ -47,7 +47,7 @@ int main(int argc, char * argv[], char * envp[])
{
int status = 1;
-#ifdef HAVE_BOOST_PYTHON
+#if HAVE_BOOST_PYTHON
argv0 = argv[0];
#endif
@@ -60,7 +60,7 @@ int main(int argc, char * argv[], char * envp[])
// --trace LEVEL ; turns on trace logging
// --memory ; turns on memory usage tracing
handle_debug_options(argc, argv);
-#if defined(VERIFY_ON)
+#if VERIFY_ON
IF_VERIFY() initialize_memory_tracing();
#endif
@@ -77,7 +77,7 @@ int main(int argc, char * argv[], char * envp[])
std::signal(SIGPIPE, sigpipe_handler);
#endif
-#if defined(HAVE_GETTEXT)
+#if HAVE_GETTEXT
::textdomain("ledger");
#endif
@@ -127,7 +127,7 @@ int main(int argc, char * argv[], char * envp[])
bool exit_loop = false;
-#ifdef HAVE_LIBEDIT
+#ifdef HAVE_EDIT
rl_readline_name = const_cast<char *>("Ledger");
#if 0
@@ -152,7 +152,7 @@ int main(int argc, char * argv[], char * envp[])
add_history(expansion);
}
-#else // HAVE_LIBEDIT
+#else // HAVE_EDIT
while (! std::cin.eof()) {
std::cout << global_scope->prompt_string();
@@ -161,7 +161,7 @@ int main(int argc, char * argv[], char * envp[])
char * p = skip_ws(line);
-#endif // HAVE_LIBEDIT
+#endif // HAVE_EDIT
check_for_signal();
@@ -172,7 +172,7 @@ int main(int argc, char * argv[], char * envp[])
global_scope->execute_command_wrapper(split_arguments(p), true);
}
-#ifdef HAVE_LIBEDIT
+#if HAVE_EDIT
if (expansion)
std::free(expansion);
std::free(p);
@@ -202,12 +202,12 @@ int main(int argc, char * argv[], char * envp[])
// up everything by closing the session and deleting the session object, and
// then shutting down the memory tracing subsystem. Otherwise, let it all
// leak because we're about to exit anyway.
-#if defined(VERIFY_ON)
+#if VERIFY_ON
IF_VERIFY() {
checked_delete(global_scope);
INFO("Ledger ended (Boost/libstdc++ may still hold memory)");
-#if defined(VERIFY_ON)
+#if VERIFY_ON
shutdown_memory_tracing();
#endif
} else