mirror of https://github.com/Gnucash/gnucash
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@1123 57a11ea4-9604-0410-9ed3-97b8803252fdzzzoldfeatures/xacc-12-patch
parent
ad38af026c
commit
9386a4035e
@ -0,0 +1,54 @@
|
||||
#include <stdio.h>
|
||||
#include <readline.h>
|
||||
#include <history.h>
|
||||
#include <guile/gh.h>
|
||||
#include <FileIO.h>
|
||||
|
||||
static void
|
||||
guile_entry_point(int argc, char *argv[]) {
|
||||
char *input;
|
||||
gnucash_swig_init();
|
||||
|
||||
input = readline("gnucash> ");
|
||||
while(input) {
|
||||
SCM result = gh_eval_str(input);
|
||||
gh_display(result);
|
||||
gh_newline();
|
||||
add_history(input);
|
||||
free(input);
|
||||
input = readline("gnucash> ");
|
||||
}
|
||||
}
|
||||
|
||||
int
|
||||
main(int argc, char *argv[]) {
|
||||
gh_enter(argc, argv, guile_entry_point);
|
||||
return 0;
|
||||
}
|
||||
#include <stdio.h>
|
||||
#include <readline.h>
|
||||
#include <history.h>
|
||||
#include <guile/gh.h>
|
||||
#include <FileIO.h>
|
||||
|
||||
static void
|
||||
guile_entry_point(int argc, char *argv[]) {
|
||||
char *input;
|
||||
xacc();
|
||||
|
||||
input = readline("xacc> ");
|
||||
while(input) {
|
||||
SCM result = gh_eval_str(input);
|
||||
gh_display(result);
|
||||
gh_newline();
|
||||
add_history(input);
|
||||
free(input);
|
||||
input = readline("xacc> ");
|
||||
}
|
||||
}
|
||||
|
||||
int
|
||||
main(int argc, char *argv[]) {
|
||||
gh_enter(argc, argv, guile_entry_point);
|
||||
return 0;
|
||||
}
|
||||
@ -0,0 +1,6 @@
|
||||
|
||||
/* SWIG insists that the entry function to the module be gnucash(), so
|
||||
we redirect the name */
|
||||
|
||||
void
|
||||
gnucash_guile_init();
|
||||
Loading…
Reference in new issue