[gnucash-commands] remove compatibility path

This commit is contained in:
Christopher Lam 2020-08-15 18:32:48 +08:00
parent 4de646b1c7
commit 469ef58026

View File

@ -193,8 +193,8 @@ scm_run_report (void *data,
auto type = !args->export_type.empty() ?
scm_from_locale_string (args->export_type.c_str()) : SCM_BOOL_F;
/* dry-run? is #t: try report, check validity of options */
if (scm_is_false (scm_call_3 (check_report_cmd, report, type, SCM_BOOL_F)))
/* dry-run? is #t: try report, check validity of options */
if (scm_is_false (scm_call_2 (check_report_cmd, report, type)))
scm_cleanup_and_exit_with_failure (nullptr);
PINFO ("Loading datafile %s...\n", datafile);
@ -215,7 +215,7 @@ scm_run_report (void *data,
if (!args->export_type.empty())
{
SCM retval = scm_call_3 (run_export_cmd, report, type, SCM_BOOL_F);
SCM retval = scm_call_2 (run_export_cmd, report, type);
SCM get_export_string = scm_c_eval_string ("gnc:html-document-export-string");
SCM get_export_error = scm_c_eval_string ("gnc:html-document-export-error");
SCM export_string = scm_call_1 (get_export_string, retval);
@ -223,7 +223,7 @@ scm_run_report (void *data,
if (scm_is_string (export_string))
{
output = scm_to_utf8_string (retval);
output = scm_to_utf8_string (export_string);
if (!args->output_file.empty())
{
write_report_file(output, args->output_file.c_str());
@ -239,12 +239,6 @@ scm_run_report (void *data,
std::cout << err << std::endl;
scm_cleanup_and_exit_with_failure (nullptr);
}
else
{
// compatibility path for old reports
auto file = scm_from_locale_string (args->output_file.c_str());
scm_call_3 (run_export_cmd, report, type, file);
}
}
else
{