* add some extra error checking for the right command

This commit is contained in:
Dirk-Jan C. Binnema
2010-08-29 16:39:27 +03:00
parent d5329d3696
commit a7a08dde7f
6 changed files with 34 additions and 8 deletions

View File

@ -1,5 +1,5 @@
/*
** Copyright (C) 2010 Dirk-Jan C. Binnema <djcb@djcbsoftware.nl>
** Copyright (C) 2008-2010 Dirk-Jan C. Binnema <djcb@djcbsoftware.nl>
**
** 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
@ -28,6 +28,19 @@
#include "mu-maildir.h"
#include "mu-cmd.h"
gboolean
mu_cmd_equals (MuConfigOptions *config, const gchar *cmd)
{
g_return_val_if_fail (config, FALSE);
g_return_val_if_fail (cmd, FALSE);
if (!config->params || !config->params[0])
return FALSE;
return (strcmp (config->params[0], cmd) == 0);
}
static MuCmd
cmd_from_string (const char* cmd)
{