FAUST compiler  0.9.9.6b8
enrobage.hh
Go to the documentation of this file.
1 /************************************************************************
2  ************************************************************************
3  FAUST compiler
4  Copyright (C) 2003-2004 GRAME, Centre National de Creation Musicale
5  ---------------------------------------------------------------------
6  This program is free software; you can redistribute it and/or modify
7  it under the terms of the GNU General Public License as published by
8  the Free Software Foundation; either version 2 of the License, or
9  (at your option) any later version.
10 
11  This program is distributed in the hope that it will be useful,
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  GNU General Public License for more details.
15 
16  You should have received a copy of the GNU General Public License
17  along with this program; if not, write to the Free Software
18  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
19  ************************************************************************
20  ************************************************************************/
21 
22 #include <stdio.h>
23 #include <string.h>
24 #include <string>
25 #include <fstream>
26 #include <iostream>
27 
28 using namespace std;
29 
30 void copyFirstHalf(FILE* file, FILE* dst);
31 void copySecondHalf(FILE* file, FILE* dst);
32 void copyZeroHalf(FILE* file, FILE* dst);
33 void copyFile(FILE* file, FILE* dst);
34 
35 void streamCopyLicense(istream& src, ostream& dst, const string& exceptiontag);
36 void streamCopyUntil(istream& src, ostream& dst, const string& until);
37 void streamCopyUntilEnd(istream& src, ostream& dst);
38 void streamCopy(istream& src, ostream& dst);
39 
40 ifstream* open_arch_stream (const char* filename);
41 
42 FILE* fopensearch(const char* filename, string& fullpath);
43 
44 const char* strip_start(const char* filename);
45 bool check_url(const char* filename);
46 
47 const char* filebasename(const char* name); // returns a pointer on the basename part of name
48 
49 string filedirname(const string& name); // allocate a string containing the dirname of name
void streamCopyLicense(istream &src, ostream &dst, const string &exceptiontag)
Copy or remove license header.
Definition: enrobage.cpp:87
ifstream * open_arch_stream(const char *filename)
Try to open an architecture file searching in various directories.
Definition: enrobage.cpp:220
void copyZeroHalf(FILE *file, FILE *dst)
const char * filebasename(const char *name)
returns a pointer on the basename part of name
Definition: enrobage.cpp:544
void streamCopy(istream &src, ostream &dst)
Copy src to dst.
Definition: enrobage.cpp:199
void copyFirstHalf(FILE *file, FILE *dst)
string filedirname(const string &name)
returns a string containing the dirname of name If no dirname, returns "."
Definition: enrobage.cpp:568
void streamCopyUntil(istream &src, ostream &dst, const string &until)
Copy src to dst until specific line.
Definition: enrobage.cpp:183
const char * name(Symbol *sym)
Returns the name of a symbol.
Definition: symbol.hh:98
void streamCopyUntilEnd(istream &src, ostream &dst)
Copy src to dst until end.
Definition: enrobage.cpp:207
void copySecondHalf(FILE *file, FILE *dst)
void copyFile(FILE *file, FILE *dst)
bool check_url(const char *filename)
Check if an URL exists.
Definition: enrobage.cpp:296
const char * strip_start(const char *filename)
Definition: enrobage.cpp:281
FILE * fopensearch(const char *filename, string &fullpath)
Try to open the file searching in various directories.
Definition: enrobage.cpp:458