// My File Manager (MFM).
//
// Copyright 2005-2006 by Stefano Gatti.
//
// 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307
// USA.
//
//=====================================================================

#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <unistd.h>

#include <FL/Fl.H>
#include <FL/Fl_File_Chooser.H>
#include <FL/Fl_Output.H>

#define EXT_SIZE 6
#define TIMEOUT_RELOAD 5

extern char  *HOMEDIR, *LAUNCHDIR, *TRASHCANDIR, *EDITOR, *TERMINAL;

extern FILE *fifo;

void init();

void * xmalloc (size_t size);

void  xfree (char **p);
void load_config();
char* convert_names (char *string, bool slash_flag);
void start_timeout();

struct struct_ext_data {

  char *ext;
  char *prog;
  Fl_Color color;
  struct_ext_data *next;
  
};

extern struct_ext_data *ext_list;

extern Fl_Color exec_color, dir_color, link_color;

