|
GnuCash 2.4.99
|
00001 /********************************************************************* 00002 * gncmod-html.c 00003 * module definition/initialization for the html utilities 00004 * 00005 * Copyright (c) 2001 Linux Developers Group, Inc. 00006 *********************************************************************/ 00007 00008 #include "config.h" 00009 00010 #include <gmodule.h> 00011 #include <libguile.h> 00012 #include <gtk/gtk.h> 00013 00014 #include "gnc-module.h" 00015 #include "gnc-module-api.h" 00016 00017 #include "gnc-html.h" 00018 #include "qof.h" 00019 00020 GNC_MODULE_API_DECL(libgncmod_html) 00021 00022 /* version of the gnc module system interface we require */ 00023 int libgncmod_html_gnc_module_system_interface = 0; 00024 00025 /* module versioning uses libtool semantics. */ 00026 int libgncmod_html_gnc_module_current = 0; 00027 int libgncmod_html_gnc_module_revision = 0; 00028 int libgncmod_html_gnc_module_age = 0; 00029 00030 00031 char * 00032 libgncmod_html_gnc_module_path( void ) 00033 { 00034 return g_strdup( "gnucash/html" ); 00035 } 00036 00037 char * 00038 libgncmod_html_gnc_module_description( void ) 00039 { 00040 return g_strdup( "Utilities for using HTML with GnuCash" ); 00041 } 00042 00043 static void 00044 lmod( char* mn ) 00045 { 00046 char* form = g_strdup_printf( "(use-modules %s)\n", mn ); 00047 scm_c_eval_string( form ); 00048 g_free( form ); 00049 } 00050 00051 extern SCM scm_init_sw_gnc_html_module( void ); 00052 00053 int 00054 libgncmod_html_gnc_module_init( int refcount ) 00055 { 00056 /* load the engine (we depend on it) */ 00057 if ( !gnc_module_load( "gnucash/engine", 0 ) ) 00058 { 00059 return FALSE; 00060 } 00061 00062 if ( !gnc_module_load( "gnucash/app-utils", 0 ) ) 00063 { 00064 return FALSE; 00065 } 00066 00067 scm_init_sw_gnc_html_module(); 00068 gnc_html_initialize(); 00069 lmod( "(sw_gnc_html)" ); 00070 // lmod( "(gnucash gnc_html)" ); 00071 00072 return TRUE; 00073 } 00074 00075 int 00076 libgncmod_html_gnc_module_end( int refcount ) 00077 { 00078 return TRUE; 00079 }
1.7.4