4383fa919ecc990822ddea82c59332804de09a09
[swftools.git] / lib / as3 / files.h
1 /* files.h
2
3    Extension module for the rfxswf library.
4    Part of the swftools package.
5
6    Copyright (c) 2008 Matthias Kramm <kramm@quiss.org>
7  
8    This program is free software; you can redistribute it and/or modify
9    it under the terms of the GNU General Public License as published by
10    the Free Software Foundation; either version 2 of the License, or
11    (at your option) any later version.
12
13    This program is distributed in the hope that it will be useful,
14    but WITHOUT ANY WARRANTY; without even the implied warranty of
15    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16    GNU General Public License for more details.
17
18    You should have received a copy of the GNU General Public License
19    along with this program; if not, write to the Free Software
20    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA */
21
22 #ifndef __avm2_files_h__
23 #define __avm2_files_h__
24
25 typedef struct _include_dir {
26     char*path;
27     struct _include_dir*next;
28 } include_dir_t;
29
30 extern int current_line;
31 extern int current_column;
32 extern char* current_filename;
33 extern char* current_filename_short;
34 extern char* current_filename_long;
35 extern include_dir_t* current_include_dirs;
36
37 void add_include_dir(char*dir);
38
39 char*find_file(const char*filename, char report_errors);
40 void enter_file(const char*name, const char*filename, void*state);
41 FILE* enter_file2(const char*name, const char*filename, void*state);
42 void* leave_file();
43
44 char* concat_paths(const char*base, const char*add);
45 char* normalize_path(const char*path);
46
47 #endif