John Wiegley
bc2983928d
Compilation verification code only with debugging
...
Previously, --verify would work even if the sources were built with
default options. However, in the interests of performance, --verify is
now only available if --enable-debug was passed to configure.
2009-02-16 17:15:52 -04:00
John Wiegley
d0a664d102
Fixed several unused value and param warnings
2009-02-16 16:55:18 -04:00
John Wiegley
70344b82e7
Added a "reload" command, for use at the REPL
...
Created a new function, session_t::reread_journal_files, which throws
away all previous state data and reads in the same files again. This is
needed to allow Emacs to communicate with Ledger via the REPL, so that
it tell Ledger when it has made changes to the user's data file.
2009-02-13 05:24:28 -04:00
John Wiegley
4f5799c216
If a ledger file is specified in .ledgerrc, ignore the environment.
2009-02-08 19:54:39 -04:00
John Wiegley
cf6babcf90
Restored all the option handlers from 2.6.2, but not the options themselves.
2009-02-06 03:31:41 -04:00
John Wiegley
408b819c6e
Greatly simplified the way option and command handlers are defined.
2009-02-05 21:20:09 -04:00
John Wiegley
edb9cff4a2
Moved work.cc and global_scope_t into a new global.cc file.
2009-02-05 04:20:49 -04:00
John Wiegley
0e2a3a9c00
Moved much of the main.cc code into a new global_scope_t class.
2009-02-05 04:06:58 -04:00
John Wiegley
37006741d6
Support using Ledger as a script interpretor.
...
The file must begin with '#!/usr/bin/env ledger --script'. You can add a -f
option to the options, but it must come before --script.
2009-02-05 03:49:49 -04:00
John Wiegley
c58cd88299
Reworked how the REPL is handled.
2009-02-05 02:45:26 -04:00
John Wiegley
863b5d8144
Added proper handling of SIGINT (C-c) and SIGPIPE (pager quits).
2009-02-04 20:46:08 -04:00
John Wiegley
796feb2634
Added code to quit more gracefully. Ctrl-C still needs work.
2009-02-04 20:11:27 -04:00
John Wiegley
ea1e898eec
Minor fixes to the REPL when using libedit.
2009-02-04 19:58:56 -04:00
John Wiegley
73cf3b01fb
Added structural support in main() for using a REPL.
2009-02-04 19:55:08 -04:00
John Wiegley
43c4636d9d
Removed the global references to session->report.
2009-02-03 13:03:10 -04:00
John Wiegley
3434650848
Removed the binary caching code, and the XML, QIF and Gnucash parsers.
2009-02-03 12:22:10 -04:00
John Wiegley
177b5adc98
Added a comment.
2009-02-03 00:48:01 -04:00
John Wiegley
ad34a71646
Corrected a display error when showing error context.
2009-02-03 00:45:14 -04:00
John Wiegley
c1cb06e009
Updated some internal documentation.
2009-02-02 15:54:28 -04:00
John Wiegley
cf9b4a3873
Removed report_error() function and reordered context for parsing errors.
2009-02-02 15:16:18 -04:00
John Wiegley
9540406af1
Simplified error context handling.
2009-02-02 00:24:26 -04:00
John Wiegley
559a76ac2b
Fixed the way the pager process was being handled.
2009-02-01 01:47:06 -04:00
John Wiegley
9d267fa133
Inspired by Omari Norman, I've rewritten main.cc so it's easy to approach.
2009-01-31 18:52:34 -04:00
John Wiegley
b027961b96
Removed unnecessary #ifdef block. pyinterp.h now guards itself.
2009-01-31 16:04:21 -04:00
John Wiegley
cdb123974c
Created a new stream.h file for dealing with output streaming.
2009-01-30 00:40:46 -04:00
John Wiegley
a69649fb7f
Switched over to using irrxml for parsing XML, rather than expat.
2009-01-24 04:49:58 -04:00
John Wiegley
59a71e7d74
Changed grammatical tense in two tracing statements.
2009-01-23 15:45:17 -04:00
John Wiegley
617dd0c261
When Python support is present, use a session_t object which is derived from
...
python_interpreter_t, so that Python can provide value expression definitions.
2009-01-23 01:53:19 -04:00
John Wiegley
c2761f4e90
Moved the occurance of "Error:" when reporting context.
2009-01-22 21:17:16 -04:00
John Wiegley
6fbf5c551e
Made the output from parse/compile commands more consistent.
2009-01-22 21:16:57 -04:00
John Wiegley
2332896810
Changed some debug strings when parsing/compiling valexprs.
2009-01-22 18:51:33 -04:00
John Wiegley
0b9f22b4d2
Redid the way command-line arguments are processed. Before, Ledger used - and
...
-- to mean special things after the command verb was seen. But now, what used
to be specified as this:
ledger -n reg cash -payable -- shell
Is now specified as this:
ledger reg -n cash not payable @shell
It could also be specified as:
ledger -n reg \(cash and not payable\) and @shell
2009-01-22 16:27:24 -04:00
John Wiegley
4e64364d3a
Removed an extra call to session.read_init().
2009-01-22 16:15:12 -04:00
John Wiegley
eb04b8be85
Changed the order in which options are processed, to provide for the correct
...
overrides.
1. Global defaults
2. Environment variable settings
3. Initialization file
4. Command-line arguments
Whatever is later in the list overrides what is earlier.
2009-01-21 18:54:06 -04:00
John Wiegley
887828a40c
Increased copyright range to include 2009.
2009-01-20 01:53:31 -04:00
John Wiegley
1fcf7b5fc1
Move handling of all commands to the value expression subsystem, rather than
...
handling them explicitly in main.cc.
2008-09-18 11:42:17 -04:00
John Wiegley
1b083919c0
Restored the 'print' command.
2008-09-17 21:09:15 -04:00
John Wiegley
53c6e826f1
Restored --format, --date-format (-y), and --input-date-format options.
2008-09-14 19:44:30 -04:00
John Wiegley
08488d4cd7
Removed more dead code and todo comments, and made it possible to stream
...
compiled value expressions.
2008-08-17 04:41:02 -04:00
John Wiegley
6432d7c594
Added back a lot of hacktastic logic from 2.6.1 that made the "bal" command
...
somewhat smart about how it interpreted certain options. Beware, code, for
your days are not long-lived.
2008-08-14 04:14:48 -04:00
John Wiegley
3231e380bb
The balance output now includes the final total.
2008-08-13 05:48:32 -04:00
John Wiegley
5f0b25ab9a
The -f flag now works again.
2008-08-13 03:55:16 -04:00
John Wiegley
548a03e725
Regular expressions supplied after 'reg' or 'bal' are working again.
2008-08-10 02:54:36 -04:00
John Wiegley
ba02f0a450
Fixed a memory leak that would show up if --verify --verbose was running and
...
an error or exception occurred.
2008-08-10 01:41:59 -04:00
John Wiegley
f6f4a46cf5
Moved around most of the files so that source code is in src/, documentation
...
is in doc/, etc.
2008-08-05 18:05:49 -04:00