|
GnuCash 2.4.99
|
00001 /********************************************************************* 00002 * gncmod-report-system.c 00003 * module definition/initialization for the report infrastructure 00004 * 00005 * Copyright (c) 2001 Linux Developers Group, Inc. 00006 *********************************************************************/ 00007 00008 #include "config.h" 00009 #include <gmodule.h> 00010 #include <libguile.h> 00011 00012 #include "gnc-module.h" 00013 #include "gnc-module-api.h" 00014 00015 GNC_MODULE_API_DECL(libgncmod_report_system) 00016 00017 /* version of the gnc module system interface we require */ 00018 int libgncmod_report_system_gnc_module_system_interface = 0; 00019 00020 /* module versioning uses libtool semantics. */ 00021 int libgncmod_report_system_gnc_module_current = 0; 00022 int libgncmod_report_system_gnc_module_revision = 0; 00023 int libgncmod_report_system_gnc_module_age = 0; 00024 00025 00026 char * 00027 libgncmod_report_system_gnc_module_path(void) 00028 { 00029 return g_strdup("gnucash/report/report-system"); 00030 } 00031 00032 char * 00033 libgncmod_report_system_gnc_module_description(void) 00034 { 00035 return g_strdup("Core components of GnuCash report generation system"); 00036 } 00037 00038 extern SCM scm_init_sw_report_system_module(void); 00039 00040 int 00041 libgncmod_report_system_gnc_module_init(int refcount) 00042 { 00043 /* load the engine (we depend on it) */ 00044 if (!gnc_module_load("gnucash/engine", 0)) 00045 { 00046 return FALSE; 00047 } 00048 00049 if (!gnc_module_load("gnucash/app-utils", 0)) 00050 { 00051 return FALSE; 00052 } 00053 scm_init_sw_report_system_module(); 00054 00055 scm_c_eval_string("(use-modules (gnucash report report-system))"); 00056 00057 /* if this is the first time the module's being loaded, initialize 00058 * the relative date system */ 00059 if (refcount == 0) 00060 { 00061 scm_c_eval_string("(gnc:reldate-initialize)"); 00062 } 00063 00064 return TRUE; 00065 } 00066 00067 int 00068 libgncmod_report_system_gnc_module_end(int refcount) 00069 { 00070 return TRUE; 00071 }
1.7.4