mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-11-13 23:22:34 -05:00
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
This commit is contained in:
parent
141774be48
commit
ca5bb76d2b
142 changed files with 33915 additions and 33915 deletions
104
utils/zenutils/libraries/pelib-0.9/pelib/buffer/InputBuffer.h
Executable file → Normal file
104
utils/zenutils/libraries/pelib-0.9/pelib/buffer/InputBuffer.h
Executable file → Normal file
|
|
@ -1,52 +1,52 @@
|
|||
/*
|
||||
* InputBuffer.h - Part of the PeLib library.
|
||||
*
|
||||
* Copyright (c) 2004 - 2005 Sebastian Porst (webmaster@the-interweb.com)
|
||||
* All rights reserved.
|
||||
*
|
||||
* This software is licensed under the zlib/libpng License.
|
||||
* For more details see http://www.opensource.org/licenses/zlib-license.php
|
||||
* or the license information file (license.htm) in the root directory
|
||||
* of PeLib.
|
||||
*/
|
||||
|
||||
#ifndef INPUTBUFFER_H
|
||||
#define INPUTBUFFER_H
|
||||
|
||||
#include <vector>
|
||||
#include <iterator>
|
||||
#include <cassert>
|
||||
|
||||
namespace PeLib
|
||||
{
|
||||
class InputBuffer
|
||||
{
|
||||
private:
|
||||
std::vector<unsigned char>& m_vBuffer;
|
||||
unsigned long ulIndex;
|
||||
|
||||
public:
|
||||
InputBuffer(std::vector<unsigned char>& vBuffer);
|
||||
|
||||
const unsigned char* data() const;
|
||||
unsigned long size();
|
||||
|
||||
template<typename T>
|
||||
InputBuffer& operator>>(T& value)
|
||||
{
|
||||
assert(ulIndex + sizeof(value) <= m_vBuffer.size());
|
||||
value = *(T*)(&m_vBuffer[ulIndex]);//reinterpret_cast<T*>(&m_vBuffer[ulIndex]);
|
||||
ulIndex += sizeof(T);
|
||||
return *this;
|
||||
}
|
||||
|
||||
void read(char* lpBuffer, unsigned long ulSize);
|
||||
void reset();
|
||||
void set(unsigned long ulIndex);
|
||||
unsigned long get();
|
||||
void setBuffer(std::vector<unsigned char>& vBuffer);
|
||||
// void updateData(unsigned long ulIndex,
|
||||
};
|
||||
}
|
||||
|
||||
#endif
|
||||
/*
|
||||
* InputBuffer.h - Part of the PeLib library.
|
||||
*
|
||||
* Copyright (c) 2004 - 2005 Sebastian Porst (webmaster@the-interweb.com)
|
||||
* All rights reserved.
|
||||
*
|
||||
* This software is licensed under the zlib/libpng License.
|
||||
* For more details see http://www.opensource.org/licenses/zlib-license.php
|
||||
* or the license information file (license.htm) in the root directory
|
||||
* of PeLib.
|
||||
*/
|
||||
|
||||
#ifndef INPUTBUFFER_H
|
||||
#define INPUTBUFFER_H
|
||||
|
||||
#include <vector>
|
||||
#include <iterator>
|
||||
#include <cassert>
|
||||
|
||||
namespace PeLib
|
||||
{
|
||||
class InputBuffer
|
||||
{
|
||||
private:
|
||||
std::vector<unsigned char>& m_vBuffer;
|
||||
unsigned long ulIndex;
|
||||
|
||||
public:
|
||||
InputBuffer(std::vector<unsigned char>& vBuffer);
|
||||
|
||||
const unsigned char* data() const;
|
||||
unsigned long size();
|
||||
|
||||
template<typename T>
|
||||
InputBuffer& operator>>(T& value)
|
||||
{
|
||||
assert(ulIndex + sizeof(value) <= m_vBuffer.size());
|
||||
value = *(T*)(&m_vBuffer[ulIndex]);//reinterpret_cast<T*>(&m_vBuffer[ulIndex]);
|
||||
ulIndex += sizeof(T);
|
||||
return *this;
|
||||
}
|
||||
|
||||
void read(char* lpBuffer, unsigned long ulSize);
|
||||
void reset();
|
||||
void set(unsigned long ulIndex);
|
||||
unsigned long get();
|
||||
void setBuffer(std::vector<unsigned char>& vBuffer);
|
||||
// void updateData(unsigned long ulIndex,
|
||||
};
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue