[libguile] use scm_list_N instead of SCM_LISTN

This commit is contained in:
Christopher Lam 2020-07-14 00:58:27 +08:00
parent 30843a0d07
commit 888f77f9ad
2 changed files with 34 additions and 30 deletions

View File

@ -490,7 +490,9 @@ gnc_column_view_edit_add_cb(GtkButton * button, gpointer user_data)
oldlist = SCM_CDR(oldlist); oldlist = SCM_CDR(oldlist);
} }
newlist = scm_append newlist = scm_append
(scm_list_n (scm_reverse(scm_cons(SCM_LIST4(new_report, (scm_list_n (scm_reverse
(scm_cons
(scm_list_4 (new_report,
scm_from_int (1), scm_from_int (1),
scm_from_int (1), scm_from_int (1),
SCM_BOOL_F), SCM_BOOL_F),
@ -502,7 +504,8 @@ gnc_column_view_edit_add_cb(GtkButton * button, gpointer user_data)
{ {
newlist = scm_append newlist = scm_append
(scm_list_n (oldlist, (scm_list_n (oldlist,
SCM_LIST1(SCM_LIST4(new_report, scm_list_1
(scm_list_4 (new_report,
scm_from_int (1), scm_from_int (1),
scm_from_int (1), scm_from_int (1),
SCM_BOOL_F)), SCM_BOOL_F)),
@ -680,7 +683,7 @@ gnc_column_view_edit_size_cb(GtkButton * button, gpointer user_data)
if (dlg_ret == GTK_RESPONSE_OK) if (dlg_ret == GTK_RESPONSE_OK)
{ {
current = SCM_LIST4(SCM_CAR(current), current = scm_list_4 (SCM_CAR (current),
scm_from_int (gtk_spin_button_get_value_as_int scm_from_int (gtk_spin_button_get_value_as_int
(GTK_SPIN_BUTTON(colspin))), (GTK_SPIN_BUTTON(colspin))),
scm_from_int (gtk_spin_button_get_value_as_int scm_from_int (gtk_spin_button_get_value_as_int

View File

@ -1422,7 +1422,7 @@ gnc_ui_qif_import_close_cb (GtkAssistant *gtkassistant, gpointer user_data)
SCM SCM
gnc_ui_qif_import_assistant_get_mappings (QIFImportWindow * w) gnc_ui_qif_import_assistant_get_mappings (QIFImportWindow * w)
{ {
return SCM_LIST3(w->acct_map_info, return scm_list_3 (w->acct_map_info,
w->cat_map_info, w->cat_map_info,
w->memo_map_info); w->memo_map_info);
} }
@ -3038,14 +3038,15 @@ gnc_ui_qif_import_convert_progress_start_cb (GtkButton * button,
/* This step will fill 70% of the bar. */ /* This step will fill 70% of the bar. */
gnc_progress_dialog_push (wind->convert_progress, 0.7); gnc_progress_dialog_push (wind->convert_progress, 0.7);
retval = scm_apply (qif_to_gnc, retval = scm_apply (qif_to_gnc,
SCM_LIST8(wind->imported_files, scm_list_n (wind->imported_files,
wind->acct_map_info, wind->acct_map_info,
wind->cat_map_info, wind->cat_map_info,
wind->memo_map_info, wind->memo_map_info,
wind->security_hash, wind->security_hash,
scm_from_utf8_string (currname ? currname : ""), scm_from_utf8_string (currname ? currname : ""),
wind->transaction_status, wind->transaction_status,
progress), progress,
SCM_UNDEFINED),
SCM_EOL); SCM_EOL);
gnc_progress_dialog_pop (wind->convert_progress); gnc_progress_dialog_pop (wind->convert_progress);
@ -3403,7 +3404,7 @@ gnc_ui_qif_import_finish_cb (GtkAssistant *assistant,
/* Save the user's mapping preferences. */ /* Save the user's mapping preferences. */
scm_result = scm_apply (save_map_prefs, scm_result = scm_apply (save_map_prefs,
SCM_LIST5 (wind->acct_map_info, wind->cat_map_info, scm_list_5 (wind->acct_map_info, wind->cat_map_info,
wind->memo_map_info, wind->security_hash, wind->memo_map_info, wind->security_hash,
wind->security_prefs), wind->security_prefs),
SCM_EOL); SCM_EOL);