author | terom@terom-desktop |
Thu, 24 Jul 2008 16:18:29 +0300 | |
changeset 11185 | 5036deb1fcaf |
parent 11180 | 982e9f814f97 |
permissions | -rw-r--r-- |
11061
f5806d84e7a9
(svn r13618) -Codechange: move tar-specific declarations to separate file
smatz
parents:
diff
changeset
|
1 |
/* $Id$ */ |
f5806d84e7a9
(svn r13618) -Codechange: move tar-specific declarations to separate file
smatz
parents:
diff
changeset
|
2 |
|
f5806d84e7a9
(svn r13618) -Codechange: move tar-specific declarations to separate file
smatz
parents:
diff
changeset
|
3 |
#ifndef TAR_TYPE_H |
11074
ec51c609170c
(svn r13631) -Fix (r13618): forgot #define avoiding multiple inclusions
smatz
parents:
11061
diff
changeset
|
4 |
#define TAR_TYPE_H |
11061
f5806d84e7a9
(svn r13618) -Codechange: move tar-specific declarations to separate file
smatz
parents:
diff
changeset
|
5 |
|
f5806d84e7a9
(svn r13618) -Codechange: move tar-specific declarations to separate file
smatz
parents:
diff
changeset
|
6 |
/** @file tar_type.h Structs, typedefs and macros used for TAR file handling. */ |
f5806d84e7a9
(svn r13618) -Codechange: move tar-specific declarations to separate file
smatz
parents:
diff
changeset
|
7 |
|
f5806d84e7a9
(svn r13618) -Codechange: move tar-specific declarations to separate file
smatz
parents:
diff
changeset
|
8 |
#include <map> |
f5806d84e7a9
(svn r13618) -Codechange: move tar-specific declarations to separate file
smatz
parents:
diff
changeset
|
9 |
#include <string> |
f5806d84e7a9
(svn r13618) -Codechange: move tar-specific declarations to separate file
smatz
parents:
diff
changeset
|
10 |
|
f5806d84e7a9
(svn r13618) -Codechange: move tar-specific declarations to separate file
smatz
parents:
diff
changeset
|
11 |
/** The define of a TarList. */ |
f5806d84e7a9
(svn r13618) -Codechange: move tar-specific declarations to separate file
smatz
parents:
diff
changeset
|
12 |
struct TarListEntry { |
f5806d84e7a9
(svn r13618) -Codechange: move tar-specific declarations to separate file
smatz
parents:
diff
changeset
|
13 |
const char *filename; |
11180
982e9f814f97
scan for tarfiles in CACHE_DIR, remember what Subdirectory a tar was found in, set the GCF_FLAG on GRFs loaded from there, and hide those in the NewGRF GUI
Tero Marttila <terom@fixme.fi>
parents:
11074
diff
changeset
|
14 |
Subdirectory subdir; |
11061
f5806d84e7a9
(svn r13618) -Codechange: move tar-specific declarations to separate file
smatz
parents:
diff
changeset
|
15 |
}; |
f5806d84e7a9
(svn r13618) -Codechange: move tar-specific declarations to separate file
smatz
parents:
diff
changeset
|
16 |
|
f5806d84e7a9
(svn r13618) -Codechange: move tar-specific declarations to separate file
smatz
parents:
diff
changeset
|
17 |
struct TarFileListEntry { |
f5806d84e7a9
(svn r13618) -Codechange: move tar-specific declarations to separate file
smatz
parents:
diff
changeset
|
18 |
TarListEntry *tar; |
f5806d84e7a9
(svn r13618) -Codechange: move tar-specific declarations to separate file
smatz
parents:
diff
changeset
|
19 |
size_t size; |
f5806d84e7a9
(svn r13618) -Codechange: move tar-specific declarations to separate file
smatz
parents:
diff
changeset
|
20 |
size_t position; |
f5806d84e7a9
(svn r13618) -Codechange: move tar-specific declarations to separate file
smatz
parents:
diff
changeset
|
21 |
}; |
f5806d84e7a9
(svn r13618) -Codechange: move tar-specific declarations to separate file
smatz
parents:
diff
changeset
|
22 |
|
f5806d84e7a9
(svn r13618) -Codechange: move tar-specific declarations to separate file
smatz
parents:
diff
changeset
|
23 |
typedef std::map<std::string, TarListEntry *> TarList; |
f5806d84e7a9
(svn r13618) -Codechange: move tar-specific declarations to separate file
smatz
parents:
diff
changeset
|
24 |
typedef std::map<std::string, TarFileListEntry> TarFileList; |
f5806d84e7a9
(svn r13618) -Codechange: move tar-specific declarations to separate file
smatz
parents:
diff
changeset
|
25 |
extern TarList _tar_list; |
f5806d84e7a9
(svn r13618) -Codechange: move tar-specific declarations to separate file
smatz
parents:
diff
changeset
|
26 |
extern TarFileList _tar_filelist; |
f5806d84e7a9
(svn r13618) -Codechange: move tar-specific declarations to separate file
smatz
parents:
diff
changeset
|
27 |
|
f5806d84e7a9
(svn r13618) -Codechange: move tar-specific declarations to separate file
smatz
parents:
diff
changeset
|
28 |
#define FOR_ALL_TARS(tar) for (tar = _tar_filelist.begin(); tar != _tar_filelist.end(); tar++) |
f5806d84e7a9
(svn r13618) -Codechange: move tar-specific declarations to separate file
smatz
parents:
diff
changeset
|
29 |
|
f5806d84e7a9
(svn r13618) -Codechange: move tar-specific declarations to separate file
smatz
parents:
diff
changeset
|
30 |
typedef bool FioTarFileListCallback(const char *filename, int size, void *userdata); |
f5806d84e7a9
(svn r13618) -Codechange: move tar-specific declarations to separate file
smatz
parents:
diff
changeset
|
31 |
FILE *FioTarFileList(const char *tar, const char *mode, size_t *filesize, FioTarFileListCallback *callback, void *userdata); |
f5806d84e7a9
(svn r13618) -Codechange: move tar-specific declarations to separate file
smatz
parents:
diff
changeset
|
32 |
|
f5806d84e7a9
(svn r13618) -Codechange: move tar-specific declarations to separate file
smatz
parents:
diff
changeset
|
33 |
#endif /* TAR_TYPE_H */ |