From f509fd20ec4b8b9f1c5cd083e8e0e52a4c0a395a Mon Sep 17 00:00:00 2001 From: "Dirk-Jan C. Binnema" Date: Tue, 4 Jan 2011 23:37:01 +0200 Subject: [PATCH] * remove some garbage files --- src/mu-cmd-mkdir.h | 38 ----------------- src/mu-cmd-view.h | 28 ------------- src/mu-cmd.c | 101 --------------------------------------------- src/mu-error.h | 29 ------------- src/mu-result.h | 28 ------------- 5 files changed, 224 deletions(-) delete mode 100644 src/mu-cmd-mkdir.h delete mode 100644 src/mu-cmd-view.h delete mode 100644 src/mu-cmd.c delete mode 100644 src/mu-error.h delete mode 100644 src/mu-result.h diff --git a/src/mu-cmd-mkdir.h b/src/mu-cmd-mkdir.h deleted file mode 100644 index 0c5dfbf2..00000000 --- a/src/mu-cmd-mkdir.h +++ /dev/null @@ -1,38 +0,0 @@ -/* -** Copyright (C) 2008-2010 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. -** -*/ - -#ifndef __MU_CMD_MKDIR_H__ -#define __MU_CMD_MKDIR_H__ - -#include -#include "mu-config.h" - -#error "foo" - -/** - * execute the 'mkdir' command - * - * @param opts configuration options - * - * @return TRUE if the command succeede, FALSE otherwise - */ -gboolean mu_cmd_mkdir (MuConfigOptions *opts); - - -#endif /*__MU_CMD_VIEW_H__*/ diff --git a/src/mu-cmd-view.h b/src/mu-cmd-view.h deleted file mode 100644 index 41e7c829..00000000 --- a/src/mu-cmd-view.h +++ /dev/null @@ -1,28 +0,0 @@ -/* -** Copyright (C) 2008-2010 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. -** -*/ - -#ifndef __MU_CMD_VIEW_H__ -#define __MU_CMD_VIEW_H__ - -#include -#include "mu-config.h" - - - -#endif /*__MU_CMD_VIEW_H__*/ diff --git a/src/mu-cmd.c b/src/mu-cmd.c deleted file mode 100644 index ee029db9..00000000 --- a/src/mu-cmd.c +++ /dev/null @@ -1,101 +0,0 @@ -/* -** Copyright (C) 2008-2011 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 -#endif /*HAVE_CONFIG_H*/ - -#include -#include -#include -#include -#include - -#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 void -show_usage (gboolean noerror) -{ - const char* usage= - "usage: mu command [options] [parameters]\n" - "where command is one of index, find, view, mkdir, cleanup " - "or extract\n\n" - "see the mu, mu- or mu-easy manpages for " - "more information\n"; - - if (noerror) - g_print ("%s", usage); - else - g_printerr ("%s", usage); -} - -static void -show_version (void) -{ - g_print ("mu (mail indexer/searcher) " VERSION "\n" - "Copyright (C) 2008-2011 Dirk-Jan C. Binnema (GPLv3+)\n"); -} - - - -gboolean -mu_cmd_execute (MuConfigOptions *opts) -{ - if (opts->version) { - show_version (); - return TRUE; - } - - if (!opts->params||!opts->params[0]) {/* no command? */ - show_version (); - g_print ("\n"); - show_usage (TRUE); - return FALSE; - } - - switch (opts->cmd) { - - case MU_CONFIG_CMD_CLEANUP: return mu_cmd_cleanup (opts); - case MU_CONFIG_CMD_EXTRACT: return mu_cmd_extract (opts); - case MU_CONFIG_CMD_FIND: return mu_cmd_find (opts); - case MU_CONFIG_CMD_INDEX: return mu_cmd_index (opts); - case MU_CONFIG_CMD_MKDIR: return mu_cmd_mkdir (opts); - case MU_CONFIG_CMD_VIEW: return mu_cmd_view (opts); - - case MU_CONFIG_CMD_UNKNOWN: - g_printerr ("mu: unknown command '%s'\n\n", opts->cmdstr); - show_usage (FALSE); - return FALSE; - default: - g_return_val_if_reached (FALSE); - } -} diff --git a/src/mu-error.h b/src/mu-error.h deleted file mode 100644 index d547ecac..00000000 --- a/src/mu-error.h +++ /dev/null @@ -1,29 +0,0 @@ -/* -** Copyright (C) 2010 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. -** -*/ - - -#ifndef __MU_ERROR_H__ -#define __MU_ERROR_H__ - -G_BEGIN_DECLS - - -G_END_DECLS - -#endif /*__MU_ERROR_H__*/ diff --git a/src/mu-result.h b/src/mu-result.h deleted file mode 100644 index 0707a204..00000000 --- a/src/mu-result.h +++ /dev/null @@ -1,28 +0,0 @@ -/* -** Copyright (C) 2010 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. -** -*/ - -#ifndef __MU_RESULT_H__ -#define __MU_RESULT_H__ - -G_BEGIN_DECLS - - -G_END_DECLS - -#endif /*__MU_RESULT__*/