コード例 #1
0
ファイル: cmdnames.c プロジェクト: kfihihc/xmms2-devel
void
cmdnames_free (GList *list)
{
	GList *it;
	command_name_t *cmd;

	for (it = g_list_first (list); it != NULL; it = g_list_next (it)) {
		cmd = it->data;
		cmdnames_free (cmd->subcommands);
		g_free (cmd->name);
		g_free (cmd);
	}

	g_list_free (list);
}
コード例 #2
0
ファイル: cli_context.c プロジェクト: randalboyle/xmms2-devel
void
cli_context_free (cli_context_t *ctx)
{
	if (ctx->conn) {
		xmmsc_unref (ctx->conn);
	}
	if (ctx->mode == CLI_EXECUTION_MODE_SHELL) {
		readline_free ();
	}

	command_trie_free (ctx->commands);
	cli_cache_free (ctx->cache);
	configuration_free (ctx->config);
	cmdnames_free (ctx->cmdnames);

	g_free (ctx);
}