diff options
Diffstat (limited to 'other-licenses/7zstub/src/Common/StdInStream.h')
-rw-r--r-- | other-licenses/7zstub/src/Common/StdInStream.h | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/other-licenses/7zstub/src/Common/StdInStream.h b/other-licenses/7zstub/src/Common/StdInStream.h new file mode 100644 index 0000000000..4e81cef7a4 --- /dev/null +++ b/other-licenses/7zstub/src/Common/StdInStream.h @@ -0,0 +1,31 @@ +// Common/StdInStream.h
+
+#ifndef __COMMON_STDINSTREAM_H
+#define __COMMON_STDINSTREAM_H
+
+#include <stdio.h>
+
+#include "Common/String.h"
+#include "Types.h"
+
+class CStdInStream
+{
+ bool _streamIsOpen;
+ FILE *_stream;
+public:
+ CStdInStream(): _streamIsOpen(false) {};
+ CStdInStream(FILE *stream): _streamIsOpen(false), _stream(stream) {};
+ ~CStdInStream();
+ bool Open(LPCTSTR fileName);
+ bool Close();
+
+ AString ScanStringUntilNewLine();
+ void ReadToString(AString &resultString);
+
+ bool Eof();
+ int GetChar();
+};
+
+extern CStdInStream g_StdIn;
+
+#endif
|