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