GnuCash  2.6.99
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
gncmod-standard-reports.c
1 /*********************************************************************
2  * gncmod-standard-reports.c
3  * module definition/initialization for the standard reports
4  *
5  * Copyright (c) 2001 Linux Developers Group, Inc.
6  *********************************************************************/
7 
8 #include "config.h"
9 #include <gmodule.h>
10 #include <libguile.h>
11 
12 #include "gnc-module.h"
13 #include "gnc-module-api.h"
14 
15 GNC_MODULE_API_DECL(libgncmod_standard_reports)
16 
17 /* version of the gnc module system interface we require */
18 int libgncmod_standard_reports_gnc_module_system_interface = 0;
19 
20 /* module versioning uses libtool semantics. */
21 int libgncmod_standard_reports_gnc_module_current = 0;
22 int libgncmod_standard_reports_gnc_module_revision = 0;
23 int libgncmod_standard_reports_gnc_module_age = 0;
24 
25 
26 char *
27 libgncmod_standard_reports_gnc_module_path(void)
28 {
29  return g_strdup("gnucash/report/standard-reports");
30 }
31 
32 char *
33 libgncmod_standard_reports_gnc_module_description(void)
34 {
35  return g_strdup("Standard income, asset, balance sheet, etc. reports");
36 }
37 
38 int
39 libgncmod_standard_reports_gnc_module_init(int refcount)
40 {
41  /* load the report system */
42  if (!gnc_module_load("gnucash/report/report-system", 0))
43  {
44  return FALSE;
45  }
46 
47  /* load the report generation scheme code */
48  if (scm_c_eval_string("(use-modules (gnucash report standard-reports))") ==
49  SCM_BOOL_F)
50  {
51  return FALSE;
52  }
53  return TRUE;
54 }
55 
56 int
57 libgncmod_standard_reports_gnc_module_end(int refcount)
58 {
59  return TRUE;
60 }