From d412b1ec8f0e5503226ea4f959826a85d9cdb529 Mon Sep 17 00:00:00 2001 From: Andrew Borodin Date: Thu, 1 Dec 2011 17:21:49 +0300 Subject: [PATCH] (history_put): unused. Removed. Signed-off-by: Andrew Borodin --- lib/widget/history.c | 40 ---------------------------------------- lib/widget/history.h | 4 ---- 2 files changed, 44 deletions(-) diff --git a/lib/widget/history.c b/lib/widget/history.c index f5b6db4f8..db571634b 100644 --- a/lib/widget/history.c +++ b/lib/widget/history.c @@ -286,46 +286,6 @@ history_save (struct mc_config_t *cfg, const char *name, GList * h) /* --------------------------------------------------------------------------------------------- */ -#if 0 -/** - * Write the history to the ${XDG_CACHE_HOME}/mc/history file. - */ -void -history_put (const char *input_name, GList * h) -{ - char *profile; - int i; - - if (num_history_items_recorded == 0) /* this is how to disable */ - return; - if ((input_name == NULL) || (*input_name == '\0')) - return; - if (h == NULL) - return; - - profile = mc_config_get_full_path (MC_HISTORY_FILE); - - i = open (profile, O_CREAT | O_EXCL, S_IRUSR | S_IWUSR); - if (i != -1) - close (i); - - /* Make sure the history is only readable by the user */ - if (chmod (profile, S_IRUSR | S_IWUSR) != -1 || errno == ENOENT) - { - mc_config_t *cfg; - - cfg = mc_config_init (profile); - history_save (cfg, input_name, h); - mc_config_save_file (cfg, NULL); - mc_config_deinit (cfg); - } - - g_free (profile); -} -#endif - -/* --------------------------------------------------------------------------------------------- */ - char * history_show (GList ** history, Widget * widget) { diff --git a/lib/widget/history.h b/lib/widget/history.h index a7f2a64e7..f1b3f4cac 100644 --- a/lib/widget/history.h +++ b/lib/widget/history.h @@ -27,10 +27,6 @@ GList *history_get (const char *input_name); GList *history_load (struct mc_config_t * cfg, const char *name); /* save history to the mc_config, but don't save config to file */ void history_save (struct mc_config_t * cfg, const char *name, GList * h); -#if 0 -/* write history to the ${XDG_CACHE_HOME}/mc/history file */ -void history_put (const char *input_name, GList * h); -#endif /* for repositioning of history dialog we should pass widget to this * function, as position of history dialog depends on widget's position */ char *history_show (GList ** history, Widget * widget);