diff options
| author | Jørgen P. Tjernø <[email protected]> | 2013-12-02 19:31:46 -0800 |
|---|---|---|
| committer | Jørgen P. Tjernø <[email protected]> | 2013-12-02 19:46:31 -0800 |
| commit | f56bb35301836e56582a575a75864392a0177875 (patch) | |
| tree | de61ddd39de3e7df52759711950b4c288592f0dc /sp/src/public/tier2/utlstreambuffer.h | |
| parent | Mark some more files as text. (diff) | |
| download | source-sdk-2013-f56bb35301836e56582a575a75864392a0177875.tar.xz source-sdk-2013-f56bb35301836e56582a575a75864392a0177875.zip | |
Fix line endings. WHAMMY.
Diffstat (limited to 'sp/src/public/tier2/utlstreambuffer.h')
| -rw-r--r-- | sp/src/public/tier2/utlstreambuffer.h | 142 |
1 files changed, 71 insertions, 71 deletions
diff --git a/sp/src/public/tier2/utlstreambuffer.h b/sp/src/public/tier2/utlstreambuffer.h index 5a62a7d8..d1d9c114 100644 --- a/sp/src/public/tier2/utlstreambuffer.h +++ b/sp/src/public/tier2/utlstreambuffer.h @@ -1,71 +1,71 @@ -//========= Copyright Valve Corporation, All rights reserved. ============//
-//
-// Purpose:
-//
-// $NoKeywords: $
-//
-// Serialization/unserialization buffer
-//=============================================================================//
-
-#ifndef UTLSTREAMBUFFER_H
-#define UTLSTREAMBUFFER_H
-
-#ifdef _WIN32
-#pragma once
-#endif
-
-#include "tier1/utlbuffer.h"
-#include "filesystem.h"
-
-
-//-----------------------------------------------------------------------------
-// Command parsing..
-//-----------------------------------------------------------------------------
-class CUtlStreamBuffer : public CUtlBuffer
-{
- typedef CUtlBuffer BaseClass;
-
-public:
- // See CUtlBuffer::BufferFlags_t for flags
- CUtlStreamBuffer( );
- CUtlStreamBuffer( const char *pFileName, const char *pPath, int nFlags = 0, bool bDelayOpen = false );
- ~CUtlStreamBuffer();
-
- // Open the file. normally done in constructor
- void Open( const char *pFileName, const char *pPath, int nFlags );
-
- // close the file. normally done in destructor
- void Close();
-
- // Is the file open?
- bool IsOpen() const;
-
-private:
- // error flags
- enum
- {
- FILE_OPEN_ERROR = MAX_ERROR_FLAG << 1,
- FILE_WRITE_ERROR = MAX_ERROR_FLAG << 2,
- };
-
- // Overflow functions
- bool StreamPutOverflow( int nSize );
- bool StreamGetOverflow( int nSize );
-
- // Grow allocation size to fit requested size
- void GrowAllocatedSize( int nSize );
-
- // Reads bytes from the file; fixes up maxput if necessary and null terminates
- int ReadBytesFromFile( int nBytesToRead, int nReadOffset );
-
- FileHandle_t OpenFile( const char *pFileName, const char *pPath );
-
- FileHandle_t m_hFileHandle;
-
- char *m_pFileName;
- char *m_pPath;
-};
-
-
-#endif // UTLSTREAMBUFFER_H
-
+//========= Copyright Valve Corporation, All rights reserved. ============// +// +// Purpose: +// +// $NoKeywords: $ +// +// Serialization/unserialization buffer +//=============================================================================// + +#ifndef UTLSTREAMBUFFER_H +#define UTLSTREAMBUFFER_H + +#ifdef _WIN32 +#pragma once +#endif + +#include "tier1/utlbuffer.h" +#include "filesystem.h" + + +//----------------------------------------------------------------------------- +// Command parsing.. +//----------------------------------------------------------------------------- +class CUtlStreamBuffer : public CUtlBuffer +{ + typedef CUtlBuffer BaseClass; + +public: + // See CUtlBuffer::BufferFlags_t for flags + CUtlStreamBuffer( ); + CUtlStreamBuffer( const char *pFileName, const char *pPath, int nFlags = 0, bool bDelayOpen = false ); + ~CUtlStreamBuffer(); + + // Open the file. normally done in constructor + void Open( const char *pFileName, const char *pPath, int nFlags ); + + // close the file. normally done in destructor + void Close(); + + // Is the file open? + bool IsOpen() const; + +private: + // error flags + enum + { + FILE_OPEN_ERROR = MAX_ERROR_FLAG << 1, + FILE_WRITE_ERROR = MAX_ERROR_FLAG << 2, + }; + + // Overflow functions + bool StreamPutOverflow( int nSize ); + bool StreamGetOverflow( int nSize ); + + // Grow allocation size to fit requested size + void GrowAllocatedSize( int nSize ); + + // Reads bytes from the file; fixes up maxput if necessary and null terminates + int ReadBytesFromFile( int nBytesToRead, int nReadOffset ); + + FileHandle_t OpenFile( const char *pFileName, const char *pPath ); + + FileHandle_t m_hFileHandle; + + char *m_pFileName; + char *m_pPath; +}; + + +#endif // UTLSTREAMBUFFER_H + |