Fixing the issue where file size exceeds size of an integer

Here is an initial patch to enable larger file support.   Several functions and structures had fields that were of type 'int', so going of 0x7fffffff resulted in an overflow condition. Some of the issues have been resolved.