(history_put): unused. Removed.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
Andrew Borodin 2011-12-01 17:21:49 +03:00 committed by Slava Zanko
parent 5e129f6b03
commit d412b1ec8f
2 changed files with 0 additions and 44 deletions

View File

@ -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 * char *
history_show (GList ** history, Widget * widget) history_show (GList ** history, Widget * widget)
{ {

View File

@ -27,10 +27,6 @@ GList *history_get (const char *input_name);
GList *history_load (struct mc_config_t * cfg, const char *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 */ /* 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); 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 /* for repositioning of history dialog we should pass widget to this
* function, as position of history dialog depends on widget's position */ * function, as position of history dialog depends on widget's position */
char *history_show (GList ** history, Widget * widget); char *history_show (GList ** history, Widget * widget);