Ejemplo n.º 1
0
Archivo: main.c Proyecto: chrippa/xmms2
gint
main (gint argc, gchar **argv)
{
	cli_infos_t *cli_infos;

	setlocale (LC_ALL, "");

	cli_infos = cli_infos_init (argc - 1, argv + 1);

	/* Execute command, if connection status is ok */
	if (cli_infos) {
		if (cli_infos->mode == CLI_EXECUTION_MODE_INLINE) {
			loop_once (cli_infos, argc - 1, argv + 1);
		} else {
			gchar *filename;

			filename = configuration_get_string (cli_infos->config,
			                                     "HISTORY_FILE");

			read_history (filename);
			using_history ();
			loop_run (cli_infos);
			write_history (filename);
		}
	}

	cli_infos_free (cli_infos);

	return 0;
}
Ejemplo n.º 2
0
gint
main (gint argc, gchar **argv)
{
	cli_infos_t *cli_infos;

	cli_infos = cli_infos_init (argc - 1, argv + 1);

	/* Execute command, if connection status is ok */
	if (cli_infos) {
		if (cli_infos->mode == CLI_EXECUTION_MODE_INLINE) {
			loop_once (cli_infos, argc - 1, argv + 1);
		} else {
			loop_run (cli_infos);
		}
	}

	cli_infos_free (cli_infos);

	return 0;
}