comparison src/os_mswin.c @ 2217:120502692d82 vim73

Improve the MS-Windows installer.
author Bram Moolenaar <bram@vim.org>
date Mon, 24 May 2010 21:34:22 +0200
parents cccb71c2c5c1
children ccda151dde4e
comparison
equal deleted inserted replaced
2216:ef150ab31dda 2217:120502692d82
785 long_u strPage = dwStr - (dwStr - dwBaseAddress) % si.dwPageSize; 785 long_u strPage = dwStr - (dwStr - dwBaseAddress) % si.dwPageSize;
786 786
787 /* get length from str to end of page */ 787 /* get length from str to end of page */
788 long_u pageLength = si.dwPageSize - (dwStr - strPage); 788 long_u pageLength = si.dwPageSize - (dwStr - strPage);
789 789
790 for (p = str; !IsBadReadPtr(p, pageLength); 790 for (p = str; !IsBadReadPtr(p, (UINT)pageLength);
791 p += pageLength, pageLength = si.dwPageSize) 791 p += pageLength, pageLength = si.dwPageSize)
792 for (i = 0; i < pageLength; ++i, ++length) 792 for (i = 0; i < pageLength; ++i, ++length)
793 if (p[i] == NUL) 793 if (p[i] == NUL)
794 return length + 1; 794 return length + 1;
795 } 795 }
1777 *(ptr + 2) = temp; 1777 *(ptr + 2) = temp;
1778 return colorref; 1778 return colorref;
1779 } 1779 }
1780 1780
1781 /* Attempt to make this work for old and new compilers */ 1781 /* Attempt to make this work for old and new compilers */
1782 #if _MSC_VER < 1300 1782 #if !defined(_MSC_VER) || (_MSC_VER < 1300) || !defined(INT_PTR)
1783 # define PDP_RETVAL BOOL 1783 # define PDP_RETVAL BOOL
1784 #else 1784 #else
1785 # define PDP_RETVAL INT_PTR 1785 # define PDP_RETVAL INT_PTR
1786 #endif 1786 #endif
1787 1787