diff options
author | John Wiegley <johnw@newartisans.com> | 2009-11-11 02:01:34 -0500 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2009-11-11 02:01:34 -0500 |
commit | ed9209cc2794eeef2a363947ab9b89be83aefe6b (patch) | |
tree | 7a2834e89138a16e792400c20da1d11e1603cab1 /src/textual.cc | |
parent | a4b1e7c5ab70fc846b0ec4762f2e9f8ee242ca11 (diff) | |
download | fork-ledger-ed9209cc2794eeef2a363947ab9b89be83aefe6b.tar.gz fork-ledger-ed9209cc2794eeef2a363947ab9b89be83aefe6b.tar.bz2 fork-ledger-ed9209cc2794eeef2a363947ab9b89be83aefe6b.zip |
Timeclock events now record their file position
Diffstat (limited to 'src/textual.cc')
-rw-r--r-- | src/textual.cc | 30 |
1 files changed, 25 insertions, 5 deletions
diff --git a/src/textual.cc b/src/textual.cc index 844edad3..f5d0635c 100644 --- a/src/textual.cc +++ b/src/textual.cc @@ -422,9 +422,19 @@ void instance_t::clock_in_directive(char * line, else end = NULL; - timelog.clock_in(parse_datetime(datetime, current_year), - account_stack.front()->find_account(p), - n ? n : "", end ? end : ""); + position_t position; + position.pathname = pathname; + position.beg_pos = line_beg_pos; + position.beg_line = linenum; + position.end_pos = curr_pos; + position.end_line = linenum; + + time_xact_t event(position, parse_datetime(datetime, current_year), + p ? account_stack.front()->find_account(p) : NULL, + n ? n : "", + end ? end : ""); + + timelog.clock_in(event); } void instance_t::clock_out_directive(char * line, @@ -441,9 +451,19 @@ void instance_t::clock_out_directive(char * line, else end = NULL; - timelog.clock_out(parse_datetime(datetime, current_year), + position_t position; + position.pathname = pathname; + position.beg_pos = line_beg_pos; + position.beg_line = linenum; + position.end_pos = curr_pos; + position.end_line = linenum; + + time_xact_t event(position, parse_datetime(datetime, current_year), p ? account_stack.front()->find_account(p) : NULL, - n ? n : "", end ? end : ""); + n ? n : "", + end ? end : ""); + + timelog.clock_out(event); count++; } |