diff options
author | David Walter Seikel | 2013-01-13 18:54:10 +1000 |
---|---|---|
committer | David Walter Seikel | 2013-01-13 18:54:10 +1000 |
commit | 959831f4ef5a3e797f576c3de08cd65032c997ad (patch) | |
tree | e7351908be5995f0b325b2ebeaa02d5a34b82583 /libraries/irrlicht-1.8/source/Irrlicht/CTarReader.h | |
parent | Add info about changes to Irrlicht. (diff) | |
download | SledjHamr-959831f4ef5a3e797f576c3de08cd65032c997ad.zip SledjHamr-959831f4ef5a3e797f576c3de08cd65032c997ad.tar.gz SledjHamr-959831f4ef5a3e797f576c3de08cd65032c997ad.tar.bz2 SledjHamr-959831f4ef5a3e797f576c3de08cd65032c997ad.tar.xz |
Remove damned ancient DOS line endings from Irrlicht. Hopefully I did not go overboard.
Diffstat (limited to '')
-rw-r--r-- | libraries/irrlicht-1.8/source/Irrlicht/CTarReader.h | 266 |
1 files changed, 133 insertions, 133 deletions
diff --git a/libraries/irrlicht-1.8/source/Irrlicht/CTarReader.h b/libraries/irrlicht-1.8/source/Irrlicht/CTarReader.h index e2e59c7..5c3df0a 100644 --- a/libraries/irrlicht-1.8/source/Irrlicht/CTarReader.h +++ b/libraries/irrlicht-1.8/source/Irrlicht/CTarReader.h | |||
@@ -1,133 +1,133 @@ | |||
1 | // Copyright (C) 2009-2012 Gaz Davidson | 1 | // Copyright (C) 2009-2012 Gaz Davidson |
2 | // This file is part of the "Irrlicht Engine". | 2 | // This file is part of the "Irrlicht Engine". |
3 | // For conditions of distribution and use, see copyright notice in irrlicht.h | 3 | // For conditions of distribution and use, see copyright notice in irrlicht.h |
4 | 4 | ||
5 | #ifndef __C_TAR_READER_H_INCLUDED__ | 5 | #ifndef __C_TAR_READER_H_INCLUDED__ |
6 | #define __C_TAR_READER_H_INCLUDED__ | 6 | #define __C_TAR_READER_H_INCLUDED__ |
7 | 7 | ||
8 | #include "IrrCompileConfig.h" | 8 | #include "IrrCompileConfig.h" |
9 | 9 | ||
10 | #ifdef __IRR_COMPILE_WITH_TAR_ARCHIVE_LOADER_ | 10 | #ifdef __IRR_COMPILE_WITH_TAR_ARCHIVE_LOADER_ |
11 | 11 | ||
12 | #include "IReferenceCounted.h" | 12 | #include "IReferenceCounted.h" |
13 | #include "IReadFile.h" | 13 | #include "IReadFile.h" |
14 | #include "irrArray.h" | 14 | #include "irrArray.h" |
15 | #include "irrString.h" | 15 | #include "irrString.h" |
16 | #include "IFileSystem.h" | 16 | #include "IFileSystem.h" |
17 | #include "CFileList.h" | 17 | #include "CFileList.h" |
18 | 18 | ||
19 | namespace irr | 19 | namespace irr |
20 | { | 20 | { |
21 | namespace io | 21 | namespace io |
22 | { | 22 | { |
23 | 23 | ||
24 | enum E_TAR_LINK_INDICATOR | 24 | enum E_TAR_LINK_INDICATOR |
25 | { | 25 | { |
26 | ETLI_REGULAR_FILE_OLD = 0 , | 26 | ETLI_REGULAR_FILE_OLD = 0 , |
27 | ETLI_REGULAR_FILE = '0', | 27 | ETLI_REGULAR_FILE = '0', |
28 | ETLI_LINK_TO_ARCHIVED_FILE = '1', // Hard link | 28 | ETLI_LINK_TO_ARCHIVED_FILE = '1', // Hard link |
29 | ETLI_SYMBOLIC_LINK = '2', | 29 | ETLI_SYMBOLIC_LINK = '2', |
30 | ETLI_CHAR_SPECIAL_DEVICE = '3', | 30 | ETLI_CHAR_SPECIAL_DEVICE = '3', |
31 | ETLI_BLOCK_SPECIAL_DEVICE = '4', | 31 | ETLI_BLOCK_SPECIAL_DEVICE = '4', |
32 | ETLI_DIRECTORY = '5', | 32 | ETLI_DIRECTORY = '5', |
33 | ETLI_FIFO_SPECIAL_FILE = '6', | 33 | ETLI_FIFO_SPECIAL_FILE = '6', |
34 | ETLI_CONTIGUOUS_FILE = '7' | 34 | ETLI_CONTIGUOUS_FILE = '7' |
35 | }; | 35 | }; |
36 | 36 | ||
37 | // byte-align structures | 37 | // byte-align structures |
38 | #include "irrpack.h" | 38 | #include "irrpack.h" |
39 | 39 | ||
40 | struct STarHeader | 40 | struct STarHeader |
41 | { | 41 | { |
42 | c8 FileName[100]; | 42 | c8 FileName[100]; |
43 | c8 FileMode[8]; | 43 | c8 FileMode[8]; |
44 | c8 UserID[8]; | 44 | c8 UserID[8]; |
45 | c8 GroupID[8]; | 45 | c8 GroupID[8]; |
46 | c8 Size[12]; | 46 | c8 Size[12]; |
47 | c8 ModifiedTime[12]; | 47 | c8 ModifiedTime[12]; |
48 | c8 Checksum[8]; | 48 | c8 Checksum[8]; |
49 | c8 Link; | 49 | c8 Link; |
50 | c8 LinkName[100]; | 50 | c8 LinkName[100]; |
51 | c8 Magic[6]; | 51 | c8 Magic[6]; |
52 | c8 USTARVersion[2]; | 52 | c8 USTARVersion[2]; |
53 | c8 UserName[32]; | 53 | c8 UserName[32]; |
54 | c8 GroupName[32]; | 54 | c8 GroupName[32]; |
55 | c8 DeviceMajor[8]; | 55 | c8 DeviceMajor[8]; |
56 | c8 DeviceMinor[8]; | 56 | c8 DeviceMinor[8]; |
57 | c8 FileNamePrefix[155]; | 57 | c8 FileNamePrefix[155]; |
58 | } PACK_STRUCT; | 58 | } PACK_STRUCT; |
59 | 59 | ||
60 | // Default alignment | 60 | // Default alignment |
61 | #include "irrunpack.h" | 61 | #include "irrunpack.h" |
62 | 62 | ||
63 | //! Archiveloader capable of loading ZIP Archives | 63 | //! Archiveloader capable of loading ZIP Archives |
64 | class CArchiveLoaderTAR : public IArchiveLoader | 64 | class CArchiveLoaderTAR : public IArchiveLoader |
65 | { | 65 | { |
66 | public: | 66 | public: |
67 | 67 | ||
68 | //! Constructor | 68 | //! Constructor |
69 | CArchiveLoaderTAR(io::IFileSystem* fs); | 69 | CArchiveLoaderTAR(io::IFileSystem* fs); |
70 | 70 | ||
71 | //! returns true if the file maybe is able to be loaded by this class | 71 | //! returns true if the file maybe is able to be loaded by this class |
72 | //! based on the file extension (e.g. ".tar") | 72 | //! based on the file extension (e.g. ".tar") |
73 | virtual bool isALoadableFileFormat(const io::path& filename) const; | 73 | virtual bool isALoadableFileFormat(const io::path& filename) const; |
74 | 74 | ||
75 | //! Check if the file might be loaded by this class | 75 | //! Check if the file might be loaded by this class |
76 | /** Check might look into the file. | 76 | /** Check might look into the file. |
77 | \param file File handle to check. | 77 | \param file File handle to check. |
78 | \return True if file seems to be loadable. */ | 78 | \return True if file seems to be loadable. */ |
79 | virtual bool isALoadableFileFormat(io::IReadFile* file) const; | 79 | virtual bool isALoadableFileFormat(io::IReadFile* file) const; |
80 | 80 | ||
81 | //! Check to see if the loader can create archives of this type. | 81 | //! Check to see if the loader can create archives of this type. |
82 | /** Check based on the archive type. | 82 | /** Check based on the archive type. |
83 | \param fileType The archive type to check. | 83 | \param fileType The archive type to check. |
84 | \return True if the archile loader supports this type, false if not */ | 84 | \return True if the archile loader supports this type, false if not */ |
85 | virtual bool isALoadableFileFormat(E_FILE_ARCHIVE_TYPE fileType) const; | 85 | virtual bool isALoadableFileFormat(E_FILE_ARCHIVE_TYPE fileType) const; |
86 | 86 | ||
87 | //! Creates an archive from the filename | 87 | //! Creates an archive from the filename |
88 | /** \param file File handle to check. | 88 | /** \param file File handle to check. |
89 | \return Pointer to newly created archive, or 0 upon error. */ | 89 | \return Pointer to newly created archive, or 0 upon error. */ |
90 | virtual IFileArchive* createArchive(const io::path& filename, bool ignoreCase, bool ignorePaths) const; | 90 | virtual IFileArchive* createArchive(const io::path& filename, bool ignoreCase, bool ignorePaths) const; |
91 | 91 | ||
92 | //! creates/loads an archive from the file. | 92 | //! creates/loads an archive from the file. |
93 | //! \return Pointer to the created archive. Returns 0 if loading failed. | 93 | //! \return Pointer to the created archive. Returns 0 if loading failed. |
94 | virtual io::IFileArchive* createArchive(io::IReadFile* file, bool ignoreCase, bool ignorePaths) const; | 94 | virtual io::IFileArchive* createArchive(io::IReadFile* file, bool ignoreCase, bool ignorePaths) const; |
95 | 95 | ||
96 | private: | 96 | private: |
97 | io::IFileSystem* FileSystem; | 97 | io::IFileSystem* FileSystem; |
98 | }; | 98 | }; |
99 | 99 | ||
100 | 100 | ||
101 | 101 | ||
102 | class CTarReader : public virtual IFileArchive, virtual CFileList | 102 | class CTarReader : public virtual IFileArchive, virtual CFileList |
103 | { | 103 | { |
104 | public: | 104 | public: |
105 | 105 | ||
106 | CTarReader(IReadFile* file, bool ignoreCase, bool ignorePaths); | 106 | CTarReader(IReadFile* file, bool ignoreCase, bool ignorePaths); |
107 | 107 | ||
108 | virtual ~CTarReader(); | 108 | virtual ~CTarReader(); |
109 | 109 | ||
110 | //! opens a file by file name | 110 | //! opens a file by file name |
111 | virtual IReadFile* createAndOpenFile(const io::path& filename); | 111 | virtual IReadFile* createAndOpenFile(const io::path& filename); |
112 | 112 | ||
113 | //! opens a file by index | 113 | //! opens a file by index |
114 | virtual IReadFile* createAndOpenFile(u32 index); | 114 | virtual IReadFile* createAndOpenFile(u32 index); |
115 | 115 | ||
116 | //! returns the list of files | 116 | //! returns the list of files |
117 | virtual const IFileList* getFileList() const; | 117 | virtual const IFileList* getFileList() const; |
118 | 118 | ||
119 | //! get the class Type | 119 | //! get the class Type |
120 | virtual E_FILE_ARCHIVE_TYPE getType() const { return EFAT_TAR; } | 120 | virtual E_FILE_ARCHIVE_TYPE getType() const { return EFAT_TAR; } |
121 | 121 | ||
122 | private: | 122 | private: |
123 | 123 | ||
124 | u32 populateFileList(); | 124 | u32 populateFileList(); |
125 | 125 | ||
126 | IReadFile* File; | 126 | IReadFile* File; |
127 | }; | 127 | }; |
128 | 128 | ||
129 | } // end namespace io | 129 | } // end namespace io |
130 | } // end namespace irr | 130 | } // end namespace irr |
131 | 131 | ||
132 | #endif // __IRR_COMPILE_WITH_TAR_ARCHIVE_LOADER_ | 132 | #endif // __IRR_COMPILE_WITH_TAR_ARCHIVE_LOADER_ |
133 | #endif // __C_TAR_READER_H_INCLUDED__ | 133 | #endif // __C_TAR_READER_H_INCLUDED__ |