summaryrefslogtreecommitdiff
path: root/src/textual.cc
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2007-05-02 03:04:20 +0000
committerJohn Wiegley <johnw@newartisans.com>2008-04-13 03:38:35 -0400
commit230e03166f061387e7e25591bd2df6acad4195ee (patch)
tree34d80727f5efa12714f592e1010b51efbc9ba587 /src/textual.cc
parente70b80d6fe1ed6da6812eb3f4c77570a18eb2bf3 (diff)
downloadledger-230e03166f061387e7e25591bd2df6acad4195ee.tar.gz
ledger-230e03166f061387e7e25591bd2df6acad4195ee.tar.bz2
ledger-230e03166f061387e7e25591bd2df6acad4195ee.zip
In the middle of switching to using boost/operators.hpp
Diffstat (limited to 'src/textual.cc')
-rw-r--r--src/textual.cc12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/textual.cc b/src/textual.cc
index 9c9c931f..e464f9c3 100644
--- a/src/textual.cc
+++ b/src/textual.cc
@@ -1,8 +1,6 @@
#include "textual.h"
#include "session.h"
-#define TIMELOG_SUPPORT 1
-
namespace ledger {
#define MAX_LINE 1024
@@ -14,14 +12,18 @@ static accounts_map account_aliases;
static std::list<std::pair<path, int> > include_stack;
+#define TIMELOG_SUPPORT 1
#ifdef TIMELOG_SUPPORT
+
struct time_entry_t {
- moment_t checkin;
+ moment_t checkin;
account_t * account;
string desc;
};
+
std::list<time_entry_t> time_entries;
-#endif
+
+#endif // TIMELOG_SUPPORT
inline char * next_element(char * buf, bool variable = false)
{
@@ -248,7 +250,7 @@ transaction_t * parse_transaction(char * line,
POP_CONTEXT(context("While parsing transaction cost"));
- if (*xact->cost < 0)
+ if (xact->cost->sign() < 0)
throw_(parse_error, "A transaction's cost may not be negative");
assert(xact->amount);