Fixed 64-bit integer truncation issues in shader translator.

This is an incompatible API change, but one which is necessary in
order to improve correctness of the code. The API version in
ShaderLang.h is updated and, unfortunately, the define renamed to
something less ambiguous due to conflicts on some Android buildbots.
Temporary patches in Chromium and WebKit will be landed separately to
support this upgrade.

BUG=403,404,405,406,407,408,409
Review URL: https://codereview.appspot.com/7300058


Conflicts:
	include/GLSLANG/ShaderLang.h

git-svn-id: https://angleproject.googlecode.com/svn/branches/dx11proto@1960 736b8ea6-26fd-11df-bfd4-992fa37f6226
diff --git a/src/compiler/preprocessor/Input.cpp b/src/compiler/preprocessor/Input.cpp
index 11868c1..b4d970a 100644
--- a/src/compiler/preprocessor/Input.cpp
+++ b/src/compiler/preprocessor/Input.cpp
@@ -17,25 +17,24 @@
 {
 }
 
-Input::Input(int count, const char* const string[], const int length[]) :
+Input::Input(size_t count, const char* const string[], const int length[]) :
     mCount(count),
     mString(string)
 {
-    assert(mCount >= 0);
     mLength.reserve(mCount);
-    for (int i = 0; i < mCount; ++i)
+    for (size_t i = 0; i < mCount; ++i)
     {
         int len = length ? length[i] : -1;
         mLength.push_back(len < 0 ? std::strlen(mString[i]) : len);
     }
 }
 
-int Input::read(char* buf, int maxSize)
+size_t Input::read(char* buf, size_t maxSize)
 {
-    int nRead = 0;
+    size_t nRead = 0;
     while ((nRead < maxSize) && (mReadLoc.sIndex < mCount))
     {
-        int size = mLength[mReadLoc.sIndex] - mReadLoc.cIndex;
+        size_t size = mLength[mReadLoc.sIndex] - mReadLoc.cIndex;
         size = std::min(size, maxSize);
         std::memcpy(buf + nRead, mString[mReadLoc.sIndex] + mReadLoc.cIndex, size);
         nRead += size;