00001 /* 00002 * filelist.h -- part of filesys.mod 00003 * header file for filelist.c 00004 * 00005 * Written by Fabian Knittel <fknittel@gmx.de> 00006 * 00007 * $Id: filelist.h,v 1.15 2011/02/13 14:19:33 simple Exp $ 00008 */ 00009 /* 00010 * Copyright (C) 1999 - 2011 Eggheads Development Team 00011 * 00012 * This program is free software; you can redistribute it and/or 00013 * modify it under the terms of the GNU General Public License 00014 * as published by the Free Software Foundation; either version 2 00015 * of the License, or (at your option) any later version. 00016 * 00017 * This program is distributed in the hope that it will be useful, 00018 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00019 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00020 * GNU General Public License for more details. 00021 * 00022 * You should have received a copy of the GNU General Public License 00023 * along with this program; if not, write to the Free Software 00024 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 00025 */ 00026 00027 #ifndef _EGG_MOD_FILESYS_FILELIST_H 00028 #define _EGG_MOD_FILESYS_FILELIST_H 00029 00030 typedef struct { 00031 char *fn; 00032 char *output; 00033 } filelist_element_t; 00034 00035 typedef struct { 00036 int tot; 00037 filelist_element_t *elements; 00038 } filelist_t; 00039 00040 /* Short-cut to access the last element in filelist */ 00041 #define FILELIST_LE(flist) ((flist)->elements[(flist)->tot - 1]) 00042 00043 static filelist_t *filelist_new(void); 00044 static void filelist_free(filelist_t *); 00045 static void filelist_add(filelist_t *, char *); 00046 static inline void filelist_addout(filelist_t *, char *); 00047 static inline void filelist_idxshow(filelist_t *, int); 00048 static void filelist_sort(filelist_t *); 00049 00050 #endif /* _EGG_MOD_FILESYS_FILELIST_H */