00001 /* 00002 * Copyright (C) 2006 SRI International 00003 * 00004 * This library is free software; you can redistribute it and/or 00005 * modify it under the terms of the GNU Lesser General Public 00006 * License as published by the Free Software Foundation; either 00007 * version 2.1 of the License, or (at your option) any later version. 00008 * 00009 * This library is distributed in the hope that it will be useful, 00010 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00012 * Lesser General Public License for more details. 00013 * 00014 * You should have received a copy of the GNU Lesser General Public 00015 * License along with this library; if not, write to the Free Software 00016 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 00017 * 00018 * SRI International: 333 Ravenswood Ave, Menlo Park, CA 94025 00019 */ 00020 00021 #ifndef FILETERMREADER_H 00022 #define FILETERMREADER_H 00023 00024 #include "termreader.h" 00025 #include "glib.h" 00026 #include "stringbuffer.h" 00027 #include <stdio.h> 00028 00029 #ifdef __cplusplus 00030 extern "C" { 00031 #endif 00032 00033 struct FileTermReaderStruct; 00034 typedef struct FileTermReaderStruct FileTermReader; 00035 00036 EXTERN FileTermReader* fileTermReader_create(TermReader* t, FILE* fileHandle); 00037 EXTERN FileTermReader* fileTermReader_createWithFilter(TermReader* t, FILE* fileHandle, stringbuffer_filter_t filterFunction, void* filterState); 00038 00039 struct FilterPercentStateStruct; 00040 typedef struct FilterPercentStateStruct FilterPercentState; 00041 EXTERN int* filterPercent_filter(void* state, char toFilter, int* spaceForChar); 00042 EXTERN FilterPercentState* filterPercent_createState(); 00043 00044 #ifdef __cplusplus 00045 } 00046 #endif 00047 00048 #endif