00001 /************************************************************************ 00002 ************************************************************************ 00003 FAUST compiler 00004 Copyright (C) 2003-2004 GRAME, Centre National de Creation Musicale 00005 --------------------------------------------------------------------- 00006 This program is free software; you can redistribute it and/or modify 00007 it under the terms of the GNU General Public License as published by 00008 the Free Software Foundation; either version 2 of the License, or 00009 (at your option) any later version. 00010 00011 This program is distributed in the hope that it will be useful, 00012 but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00014 GNU General Public License for more details. 00015 00016 You should have received a copy of the GNU General Public License 00017 along with this program; if not, write to the Free Software 00018 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 00019 ************************************************************************ 00020 ************************************************************************/ 00021 00022 00023 00024 #include <stdio.h> 00025 #include <string.h> 00026 #include <fstream> 00027 #include <iostream> 00028 00029 00030 using namespace std; 00031 00032 void copyFirstHalf(FILE* file, FILE* dst); 00033 void copySecondHalf(FILE* file, FILE* dst); 00034 void copyZeroHalf(FILE* file, FILE* dst); 00035 void copyFile(FILE* file, FILE* dst); 00036 00037 00038 00039 void streamCopyUntil(istream& src, ostream& dst, const string& until); 00040 void streamCopyUntilEnd(istream& src, ostream& dst); 00041 00042 ifstream* open_arch_stream (const char* filename); 00043 ifstream* open_path_stream (const char* lofdir, const char* filename); 00044 ifstream* open_stream (const char* filename); 00045 00046 FILE* fopensearch(const char* filename); 00047 FILE* fopenpath(const char* lofdir, const char* filename); 00048 00049 bool check_file(const char* filename); 00050 00051