source: vendor/synergy/current/lib/common/stdistream.h

Last change on this file was 2749, checked in by bird, 19 years ago

synergy v1.3.1 sources (zip).

File size: 1.3 KB
Line 
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
25inline
26std::istream& operator>>(std::istream& s, SInt8& i)
27{ return s >> (signed char&)i; }
28inline
29std::istream& operator>>(std::istream& s, SInt16& i)
30{ return s >> (short&)i; }
31inline
32std::istream& operator>>(std::istream& s, SInt32& i)
33{ return s >> (int&)i; }
34inline
35std::istream& operator>>(std::istream& s, UInt8& i)
36{ return s >> (unsigned char&)i; }
37inline
38std::istream& operator>>(std::istream& s, UInt16& i)
39{ return s >> (unsigned short&)i; }
40inline
41std::istream& operator>>(std::istream& s, UInt32& i)
42{ return s >> (unsigned int&)i; }
43#endif
Note: See TracBrowser for help on using the repository browser.