9 #ifdef LOCALE_SPECIFIC_TAX
12 #endif // LOCALE_SPECIFIC_TAX
16 #include "gnc-module.h"
17 #include "gnc-module-api.h"
19 GNC_MODULE_API_DECL(libgncmod_locale_reports_us)
22 int libgncmod_locale_reports_us_gnc_module_system_interface = 0;
25 int libgncmod_locale_reports_us_gnc_module_current = 0;
26 int libgncmod_locale_reports_us_gnc_module_revision = 0;
27 int libgncmod_locale_reports_us_gnc_module_age = 0;
31 libgncmod_locale_reports_us_gnc_module_path(
void)
37 return g_strdup(
"gnucash/report/locale-specific/us");
41 libgncmod_locale_reports_us_gnc_module_description(
void)
43 return g_strdup(
"US income tax reports and related material");
47 libgncmod_locale_reports_us_gnc_module_init(
int refcount)
49 const gchar *tax_module, *report_taxtxf, *report_locale;
51 #ifdef LOCALE_SPECIFIC_TAX
56 gchar *thislocale = g_win32_getlocale();
57 gboolean is_de_DE = (strncmp(thislocale,
"de_DE", 5) == 0);
60 const char *thislocale = setlocale(LC_ALL, NULL);
61 gboolean is_de_DE = (strncmp(thislocale,
"de_DE", 5) == 0);
64 gboolean is_de_DE = FALSE;
68 tax_module =
"gnucash/tax/de_DE";
69 report_taxtxf =
"(use-modules (gnucash report taxtxf-de_DE))";
70 report_locale =
"(use-modules (gnucash report locale-specific de_DE))";
74 tax_module =
"gnucash/tax/us";
75 report_taxtxf =
"(use-modules (gnucash report taxtxf))";
76 report_locale =
"(use-modules (gnucash report locale-specific us))";
81 if (!gnc_module_load((gchar*)tax_module, 0))
87 if (!gnc_module_load(
"gnucash/report/report-system", 0))
93 if (scm_c_eval_string(report_taxtxf)
96 g_warning(
"failed to load %s\n", report_taxtxf);
101 if (scm_c_eval_string(report_locale)
111 libgncmod_locale_reports_us_gnc_module_end(
int refcount)