| 1 | /* | 
|---|
| 2 | * synergy -- mouse and keyboard sharing utility | 
|---|
| 3 | * Copyright (C) 2002 Chris Schoeneman | 
|---|
| 4 | * | 
|---|
| 5 | * This package is free software; you can redistribute it and/or | 
|---|
| 6 | * modify it under the terms of the GNU General Public License | 
|---|
| 7 | * found in the file COPYING that should have accompanied this file. | 
|---|
| 8 | * | 
|---|
| 9 | * This package is distributed in the hope that it will be useful, | 
|---|
| 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 
|---|
| 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | 
|---|
| 12 | * GNU General Public License for more details. | 
|---|
| 13 | */ | 
|---|
| 14 |  | 
|---|
| 15 | #include "stdpre.h" | 
|---|
| 16 | #if HAVE_ISTREAM | 
|---|
| 17 | #include <istream> | 
|---|
| 18 | #else | 
|---|
| 19 | #include <iostream> | 
|---|
| 20 | #endif | 
|---|
| 21 | #include "stdpost.h" | 
|---|
| 22 |  | 
|---|
| 23 | #if defined(_MSC_VER) && _MSC_VER <= 1200 | 
|---|
| 24 | // VC++6 istream has no overloads for __int* types, .NET does | 
|---|
| 25 | inline | 
|---|
| 26 | std::istream& operator>>(std::istream& s, SInt8& i) | 
|---|
| 27 | { return s >> (signed char&)i; } | 
|---|
| 28 | inline | 
|---|
| 29 | std::istream& operator>>(std::istream& s, SInt16& i) | 
|---|
| 30 | { return s >> (short&)i; } | 
|---|
| 31 | inline | 
|---|
| 32 | std::istream& operator>>(std::istream& s, SInt32& i) | 
|---|
| 33 | { return s >> (int&)i; } | 
|---|
| 34 | inline | 
|---|
| 35 | std::istream& operator>>(std::istream& s, UInt8& i) | 
|---|
| 36 | { return s >> (unsigned char&)i; } | 
|---|
| 37 | inline | 
|---|
| 38 | std::istream& operator>>(std::istream& s, UInt16& i) | 
|---|
| 39 | { return s >> (unsigned short&)i; } | 
|---|
| 40 | inline | 
|---|
| 41 | std::istream& operator>>(std::istream& s, UInt32& i) | 
|---|
| 42 | { return s >> (unsigned int&)i; } | 
|---|
| 43 | #endif | 
|---|