Minor reverts of "[Cruft Reduction] Remove unused functions from src/engine"

Those two functions are in use in the C++ code.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@21581 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Christian Stimming 2011-11-18 21:53:28 +00:00
parent 0214098fdc
commit c1381f5ca4
4 changed files with 33 additions and 0 deletions

View File

@ -1415,6 +1415,22 @@ get_corr_account_split(const Split *sa, const Split **retval)
}
/* TODO: these static consts can be shared. */
const char *
xaccSplitGetCorrAccountName(const Split *sa)
{
static const char *split_const = NULL;
const Split *other_split;
if (!get_corr_account_split(sa, &other_split))
{
if (!split_const)
split_const = _("-- Split Transaction --");
return split_const;
}
return xaccAccountGetName(other_split->acc);
}
char *
xaccSplitGetCorrAccountFullName(const Split *sa)

View File

@ -417,6 +417,8 @@ int xaccSplitCompareOtherAccountCodes(const Split *sa, const Split *sb);
char * xaccSplitGetCorrAccountFullName(const Split *sa);
/** document me */
const char * xaccSplitGetCorrAccountName(const Split *sa);
/** document me */
const char * xaccSplitGetCorrAccountCode(const Split *sa);
#ifdef DUMP_FUNCTIONS

View File

@ -124,6 +124,14 @@ gnc_engine_init(int argc, char ** argv)
gnc_engine_init_part3(argc, argv);
}
void
gnc_engine_init_static(int argc, char ** argv)
{
gnc_engine_init_part1();
gnc_engine_init_part3(argc, argv);
}
/********************************************************************
* gnc_engine_shutdown
* shutdown backend, destroy any global data, etc.

View File

@ -225,6 +225,13 @@ typedef void (* gnc_engine_init_hook_t)(int, char **);
* method that does not require Guile. */
void gnc_engine_init(int argc, char ** argv);
/** This is the statically linked-in version of gnc_engine_init. It is
* identically to that function except that it doesn't load the
* loadable shared module, which means this function will not load the
* "(gnucash engine)" scheme module.
*/
void gnc_engine_init_static(int argc, char ** argv);
/** Called to shutdown the engine, see also ::qof_close
* for use without Guile. */
void gnc_engine_shutdown (void);