static gboolean gitg_shell_run_sync_with_input_and_outputva (gboolean preserve_line_endings, const gchar *input, gchar ***output, va_list ap, GError **error) { GPtrArray *commands; GitgCommand *cmd; GitgCommand **cmds; gboolean ret; commands = g_ptr_array_new (); while ((cmd = va_arg (ap, GitgCommand *))) { g_ptr_array_add (commands, cmd); } g_ptr_array_add (commands, NULL); cmds = (GitgCommand **)g_ptr_array_free (commands, FALSE); ret = gitg_shell_run_sync_with_input_and_output_list (cmds, preserve_line_endings, input, output, error); g_free (cmds); return ret; }
gboolean gitg_shell_run_sync_with_input_list (GitgCommand **commands, const gchar *input, GError **error) { return gitg_shell_run_sync_with_input_and_output_list (commands, FALSE, input, NULL, error); }
gboolean gitg_shell_run_sync_with_output_list (GitgCommand **commands, gboolean preserve_line_endings, gchar ***output, GError **error) { return gitg_shell_run_sync_with_input_and_output_list (commands, preserve_line_endings, NULL, output, error); }
gboolean gitg_shell_run_sync_with_input_list (GitgCommand **commands, const gchar *input, GError **error) { gchar **ret; ret = gitg_shell_run_sync_with_input_and_output_list (commands, FALSE, input, error); if (ret) { g_strfreev (ret); return TRUE; } else { return FALSE; } }