From 1a0c6a6c7cb053e220bb4025ba304a2ed507e312 Mon Sep 17 00:00:00 2001 From: djcb Date: Thu, 18 Oct 2012 12:24:14 +0300 Subject: [PATCH] * mu: add mu-cmd-guile (preparation) --- mu/mu-cmd-guile.c | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 mu/mu-cmd-guile.c diff --git a/mu/mu-cmd-guile.c b/mu/mu-cmd-guile.c new file mode 100644 index 00000000..0b0435cd --- /dev/null +++ b/mu/mu-cmd-guile.c @@ -0,0 +1,47 @@ +/* -*-mode: c; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-*/ + +/* +** Copyright (C) 2012 Dirk-Jan C. Binnema +** +** This program is free software; you can redistribute it and/or modify it +** under the terms of the GNU General Public License as published by the +** Free Software Foundation; either version 3, or (at your option) any +** later version. +** +** This program is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +** GNU General Public License for more details. +** +** You should have received a copy of the GNU General Public License +** along with this program; if not, write to the Free Software Foundation, +** Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +** +*/ + +#if HAVE_CONFIG_H +#include "config.h" +#endif /*HAVE_CONFIG_H*/ + +#include +#include + +#include "mu-cmd.h" +#include "mu-util.h" + + +MuError +mu_cmd_stats (MuConfig *opts, GError **err) +{ + g_return_val_if_fail (opts, MU_ERROR_INTERNAL); + g_return_val_if_fail (opts->cmd == MU_CONFIG_CMD_STATS, + MU_ERROR_INTERNAL); + + if (!mu_util_supports (MU_FEATURE_GUILE | MU_FEATURE_GNUPLOT)) { + mu_util_g_set_error (err, MU_ERROR_IN_PARAMETERS, + "the 'stats' command is not supported"); + return MU_ERROR_IN_PARAMETERS; + } + + return MU_OK; +}