John Wiegley
9f9381db64
Restored the py_amount and py_balance mappings
2009-02-24 12:41:52 -04:00
John Wiegley
944c63e6f2
The Great Renaming, Part II
...
The last commit did not contain the majority of changes because of a
slight mishap. This contains the real changeset.
2009-02-23 19:07:30 -04:00
John Wiegley
9e0d66610c
Renamed acconf.h to config.h, for included gettext
2009-02-22 16:21:22 -04:00
John Wiegley
b902894284
Added support for using GNU gettext
2009-02-21 20:21:13 -04:00
John Wiegley
66c5cd4427
Use a "format accumulator" for error strings
...
This makes it possible to internationalize strings while still using
I/O streams. For example:
std::cout << ACCUM(_("Hello to %1 and %2!") << "me" << "you")
<< std::endl;
2009-02-21 20:20:57 -04:00
John Wiegley
1f39d4148e
Create a new interactive_t helper class
...
The purpose of this class is much like Emacs' (interactive) form: it
allows a value expression function to declare exactly how many
arguments, and of what type, it intends to receive. It then offers
type-safe access to theese arguments in a consistent manner.
An example value expression function definition in C++:
value_t fn_foo(call_scope_t& scope) {
// We expect a string, an integer, and an optional date
interactive_t args(scope, "sl&d");
std::cout << "String = " << args.get<string>(0)
<< "Integer = " << args.get<long>(1) << std::endl;
if (args.has(2)) // was a date provided?
std::cout << "Date = " << args.get<date_t>(2) << std::endl;
return NULL_VALUE;
}
There is also an in_context_t<T> template, which finds the context type
T in the current scope hierarchy. The in_context_t then also acts as a
smart pointer to reference this context object, in addition to serving
the same duty as interactive_t. This combination of intent is solely
for the sake of brevity.
value_t fn_bar(call_scope_t& scope) {
in_context_t<account_t> env(scope, "sl&d");
std::cout << "Account name = " << env->fullname()
<< "String arg = " << env.get<string>(0)
<< std::endl;
return NULL_VALUE;
}
As you can see here, 'env' acts as a smart pointer to the required
context, and an object to extract the typed arguments.
2009-02-21 18:49:43 -04:00
John Wiegley
067f512e94
The --help (-h, -H) options now visit the man page
2009-02-21 16:24:10 -04:00
John Wiegley
37097e6008
Added an automake rule for installing the man page
2009-02-21 14:34:48 -04:00
John Wiegley
740cd8e8f1
Added feature baseline tests
...
These are like regression tests to confirm the basic functionality of
every Ledger feature. Also, made the release-distcheck target less
sensitive.
2009-02-20 13:31:01 -04:00
John Wiegley
4365d9e3fc
Moved around some functions for clarity
2009-02-16 04:10:22 -04:00
John Wiegley
6f2e3b8864
Properly handle UTF-8 characters in commodity strings.
2009-02-12 02:34:39 -04:00
John Wiegley
9c9320bc58
make clean should remove system.hh.gch from the source tree.
2009-02-12 02:05:01 -04:00
John Wiegley
44518bc640
Wired up the "entry" command from 2.x, though it still needs to be ported.
2009-02-10 22:37:05 -04:00
John Wiegley
3f7104e9be
Removed the balance_pair_t type, since it's now an unneeded abstraction.
...
This type was a holdback from the days before the amount_expr was used
everywhere to determine a transaction's value.
2009-02-09 14:54:42 -04:00
John Wiegley
57b2fc463a
Corrected libraries dependencies for some of the unit tests.
2009-02-09 00:27:35 -04:00
John Wiegley
e0b108ff3a
Attribute lookup on a Value object which is a Scope now searches the scope.
2009-02-08 21:17:23 -04:00
John Wiegley
ef30354387
Temporarily stub out the Python unit tests.
2009-02-08 19:05:35 -04:00
John Wiegley
cb0faac58d
Removed a great many unnecessary Boost.Python files.
2009-02-07 22:49:53 -04:00
John Wiegley
589eabd8e6
Threw away the "multiple parser" infrastructure.
2009-02-07 17:45:48 -04:00
John Wiegley
eb98e0da8b
More revision to the way options are handled; reworked CSV command.
2009-02-07 04:26:30 -04:00
John Wiegley
b4ae22b237
Removed an unnecessary variable setting in the Makefile.
2009-02-07 00:04:07 -04:00
John Wiegley
e8d2409430
Removed --reconcile and --reconcile-date.
2009-02-07 00:03:58 -04:00
John Wiegley
ff2f3d23d4
Added stubs for all the Python integration classes.
2009-02-06 14:26:51 -04:00
John Wiegley
54d5d8ada4
Removed the now unused pushvar.h file.
2009-02-06 13:45:26 -04:00
John Wiegley
6aedbf4743
Removed use of sudo in the Makefile.
2009-02-06 00:46:41 -04:00
John Wiegley
7b24e8f8e3
Moved some files around.
2009-02-05 21:18:25 -04:00
John Wiegley
29814cfa7c
Removed debugging code from the Makefile.
2009-02-05 04:36:26 -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
87cfef221a
Quiet down the python module build.
2009-02-05 04:20:31 -04:00
John Wiegley
7f5f53de82
Quiet the make output when rebuilding TAGS.
2009-02-05 03:48:56 -04:00
John Wiegley
b9603a1512
Moved ptristream into its own file.
2009-02-04 03:54:29 -04:00
John Wiegley
d53f7d1409
Removed README.textile when building the distribution tarball.
2009-02-03 15:48:53 -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
9bdcbffb15
Removed explicit boost suffix from Makefile.am.
2009-02-03 02:23:28 -04:00
John Wiegley
40c02b7bf9
Another fix to the link order.
2009-02-03 01:38:32 -04:00
John Wiegley
f74247d15a
For systems without cppunit, make fullcheck just does a make check.
2009-02-03 01:08:50 -04:00
John Wiegley
b52e9cf41b
Moved libextra into libreport.
2009-02-03 00:42:02 -04:00
John Wiegley
3339d69d17
Made use of the all_files macros in Makefile.am.
2009-02-02 20:21:10 -04:00
John Wiegley
9261f56639
Reversed link order of Ledger's own libraries.
2009-02-02 20:20:45 -04:00
John Wiegley
33ce1cbc4a
Moved 'fullcheck' script into tools/ directory.
2009-02-02 17:47:27 -04:00
John Wiegley
ef3943c604
Added missing header file reference to Makefile.am.
2009-02-02 00:23:11 -04:00
John Wiegley
5d9015a3c1
Moved error code into error.h.
2009-02-02 00:23:02 -04:00
John Wiegley
d0644ac24d
Whitespace fix.
2009-02-01 22:08:52 -04:00
John Wiegley
e391ca5e95
Fixed an extraneous backslash.
2009-02-01 22:08:46 -04:00
John Wiegley
ae65e8ae05
Moved the pre-commands to their own file, and created new "args" command.
2009-02-01 18:36:28 -04:00
John Wiegley
9f579902fb
Whitespace changes.
2009-02-01 18:29:46 -04:00
John Wiegley
e61696a91b
Moved chain_xact_handlers into its own file, chain.h and chain.cc.
2009-02-01 18:29:30 -04:00
John Wiegley
eaccff2932
Added a 'sloc' build target, for showing total lines of code.
2009-02-01 02:30:19 -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
28cbb669f7
Fixes for release-distcheck.
2009-01-31 16:04:35 -04:00