Pointer comparisons and difference match the C standard.

Fixed issue with pointer operations.
C11 6.5.6.9: Pointer subtractions have type ptrdiff_t.
C11 6.5.8.6, 6.5.9.3: Pointer comparisons have type int.