diff options
author | Nicolas Pennequin <nicolas.pennequin@free.fr> | 2008-07-11 16:51:25 +0000 |
---|---|---|
committer | Nicolas Pennequin <nicolas.pennequin@free.fr> | 2008-07-11 16:51:25 +0000 |
commit | ca5bb76d2b8f65aa97e50b633f828c1deb241526 (patch) | |
tree | 453a1b2de3a0dc0d0b2f7080d10d033bf8fbcdf1 /utils/zenutils/libraries/pelib-0.9/pelib/RelocationsDirectory.h | |
parent | 141774be48940d56e3ad4dbf451d245b61d4f8b2 (diff) | |
download | rockbox-ca5bb76d2b8f65aa97e50b633f828c1deb241526.tar.gz rockbox-ca5bb76d2b8f65aa97e50b633f828c1deb241526.zip |
Delete the svn:executable property and set svn:eol-style to native for all those text files.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18012 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'utils/zenutils/libraries/pelib-0.9/pelib/RelocationsDirectory.h')
-rw-r--r--[-rwxr-xr-x] | utils/zenutils/libraries/pelib-0.9/pelib/RelocationsDirectory.h | 140 |
1 files changed, 70 insertions, 70 deletions
diff --git a/utils/zenutils/libraries/pelib-0.9/pelib/RelocationsDirectory.h b/utils/zenutils/libraries/pelib-0.9/pelib/RelocationsDirectory.h index 60383381a3..0fc10500e0 100755..100644 --- a/utils/zenutils/libraries/pelib-0.9/pelib/RelocationsDirectory.h +++ b/utils/zenutils/libraries/pelib-0.9/pelib/RelocationsDirectory.h | |||
@@ -1,70 +1,70 @@ | |||
1 | /* | 1 | /* |
2 | * Relocations.h - Part of the PeLib library. | 2 | * Relocations.h - Part of the PeLib library. |
3 | * | 3 | * |
4 | * Copyright (c) 2004 - 2005 Sebastian Porst (webmaster@the-interweb.com) | 4 | * Copyright (c) 2004 - 2005 Sebastian Porst (webmaster@the-interweb.com) |
5 | * All rights reserved. | 5 | * All rights reserved. |
6 | * | 6 | * |
7 | * This software is licensed under the zlib/libpng License. | 7 | * This software is licensed under the zlib/libpng License. |
8 | * For more details see http://www.opensource.org/licenses/zlib-license.php | 8 | * For more details see http://www.opensource.org/licenses/zlib-license.php |
9 | * or the license information file (license.htm) in the root directory | 9 | * or the license information file (license.htm) in the root directory |
10 | * of PeLib. | 10 | * of PeLib. |
11 | */ | 11 | */ |
12 | 12 | ||
13 | #ifndef RELOCATIONSDIRECTORY_H | 13 | #ifndef RELOCATIONSDIRECTORY_H |
14 | #define RELOCATIONSDIRECTORY_H | 14 | #define RELOCATIONSDIRECTORY_H |
15 | 15 | ||
16 | namespace PeLib | 16 | namespace PeLib |
17 | { | 17 | { |
18 | /// Class that handles the relocations directory. | 18 | /// Class that handles the relocations directory. |
19 | /** | 19 | /** |
20 | * This class handles the relocations directory. | 20 | * This class handles the relocations directory. |
21 | **/ | 21 | **/ |
22 | class RelocationsDirectory | 22 | class RelocationsDirectory |
23 | { | 23 | { |
24 | private: | 24 | private: |
25 | std::vector<IMG_BASE_RELOC> m_vRelocations; ///< Used to store the relocation data. | 25 | std::vector<IMG_BASE_RELOC> m_vRelocations; ///< Used to store the relocation data. |
26 | 26 | ||
27 | void read(InputBuffer& inputbuffer, unsigned int uiSize); | 27 | void read(InputBuffer& inputbuffer, unsigned int uiSize); |
28 | 28 | ||
29 | public: | 29 | public: |
30 | /// Returns the number of relocations in the relocations directory. | 30 | /// Returns the number of relocations in the relocations directory. |
31 | unsigned int calcNumberOfRelocations() const; // EXPORT | 31 | unsigned int calcNumberOfRelocations() const; // EXPORT |
32 | /// Returns the number of relocation data entries of a specific relocation. | 32 | /// Returns the number of relocation data entries of a specific relocation. |
33 | unsigned int calcNumberOfRelocationData(unsigned int ulRelocation) const; // EXPORT | 33 | unsigned int calcNumberOfRelocationData(unsigned int ulRelocation) const; // EXPORT |
34 | 34 | ||
35 | /// Read a file's relocations directory. | 35 | /// Read a file's relocations directory. |
36 | int read(const std::string& strFilename, unsigned int uiOffset, unsigned int uiSize); // EXPORT | 36 | int read(const std::string& strFilename, unsigned int uiOffset, unsigned int uiSize); // EXPORT |
37 | int read(const unsigned char* buffer, unsigned int buffersize); // EXPORT | 37 | int read(const unsigned char* buffer, unsigned int buffersize); // EXPORT |
38 | /// Rebuilds the relocations directory. | 38 | /// Rebuilds the relocations directory. |
39 | void rebuild(std::vector<byte>& vBuffer) const; // EXPORT | 39 | void rebuild(std::vector<byte>& vBuffer) const; // EXPORT |
40 | /// Returns the size of the relocations directory. | 40 | /// Returns the size of the relocations directory. |
41 | unsigned int size() const; // EXPORT | 41 | unsigned int size() const; // EXPORT |
42 | /// Writes the relocations directory to a file. | 42 | /// Writes the relocations directory to a file. |
43 | int write(const std::string& strFilename, unsigned int dwOffset) const; // EXPORT | 43 | int write(const std::string& strFilename, unsigned int dwOffset) const; // EXPORT |
44 | 44 | ||
45 | /// Returns the VA of a relocation. | 45 | /// Returns the VA of a relocation. |
46 | dword getVirtualAddress(unsigned int ulRelocation) const; // EXPORT | 46 | dword getVirtualAddress(unsigned int ulRelocation) const; // EXPORT |
47 | /// Returns the SizeOfBlock value of a relocation. | 47 | /// Returns the SizeOfBlock value of a relocation. |
48 | dword getSizeOfBlock(unsigned int ulRelocation) const; // EXPORT | 48 | dword getSizeOfBlock(unsigned int ulRelocation) const; // EXPORT |
49 | /// Returns the RelocationData of a relocation. | 49 | /// Returns the RelocationData of a relocation. |
50 | word getRelocationData(unsigned int ulRelocation, unsigned int ulDataNumber) const; // EXPORT | 50 | word getRelocationData(unsigned int ulRelocation, unsigned int ulDataNumber) const; // EXPORT |
51 | 51 | ||
52 | /// Changes the relocation data of a relocation. | 52 | /// Changes the relocation data of a relocation. |
53 | void setRelocationData(unsigned int ulRelocation, unsigned int ulDataNumber, word wData); // EXPORT | 53 | void setRelocationData(unsigned int ulRelocation, unsigned int ulDataNumber, word wData); // EXPORT |
54 | 54 | ||
55 | /// Changes the VirtualAddress of a relocation. | 55 | /// Changes the VirtualAddress of a relocation. |
56 | void setVirtualAddress(unsigned int ulRelocation, dword dwValue); // EXPORT | 56 | void setVirtualAddress(unsigned int ulRelocation, dword dwValue); // EXPORT |
57 | /// Changes the SizeOfBlock of a relocation. | 57 | /// Changes the SizeOfBlock of a relocation. |
58 | void setSizeOfBlock(unsigned int ulRelocation, dword dwValue); // EXPORT | 58 | void setSizeOfBlock(unsigned int ulRelocation, dword dwValue); // EXPORT |
59 | 59 | ||
60 | void addRelocation(); // EXPORT | 60 | void addRelocation(); // EXPORT |
61 | /// Adds new data to a relocation. | 61 | /// Adds new data to a relocation. |
62 | void addRelocationData(unsigned int ulRelocation, word wValue); // EXPORT | 62 | void addRelocationData(unsigned int ulRelocation, word wValue); // EXPORT |
63 | /// Removes data from a relocation. | 63 | /// Removes data from a relocation. |
64 | // void removeRelocationData(unsigned int ulRelocation, word wValue); // EXPORT | 64 | // void removeRelocationData(unsigned int ulRelocation, word wValue); // EXPORT |
65 | void removeRelocation(unsigned int index); // EXPORT | 65 | void removeRelocation(unsigned int index); // EXPORT |
66 | void removeRelocationData(unsigned int relocindex, unsigned int dataindex); // EXPORT | 66 | void removeRelocationData(unsigned int relocindex, unsigned int dataindex); // EXPORT |
67 | }; | 67 | }; |
68 | } | 68 | } |
69 | 69 | ||
70 | #endif | 70 | #endif |