* Copyright (C) 2011 xaizek.
*
* 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 2 of the License, 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 VIFM__DIR_STACK_H__
#define VIFM__DIR_STACK_H__
typedef struct
{
char *lpane_dir;
char *lpane_file;
char *rpane_dir;
char *rpane_file;
}
dir_stack_entry_t;
extern dir_stack_entry_t *dir_stack;
extern unsigned int dir_stack_top;
* -1 when not enough memory. */
int dir_stack_push_current(void);
* not enough memory. */
int dir_stack_push(const char ld[], const char lf[], const char rd[],
const char rf[]);
* success and -1 on underflow. */
int dir_stack_pop(void);
* success and -1 on error. */
int dir_stack_swap(void);
int dir_stack_rotate(int n);
void dir_stack_clear(void);
* is NULL. Returns NULL on error, otherwise caller should free the memory. */
char ** dir_stack_list(void);
* dir_stack_changed() function might be used to detect changes in the stack. */
void dir_stack_freeze(void);
* Returns non-zero if it was changed, otherwise zero is returned. */
int dir_stack_changed(void);
#endif