Rename variables

also replace rsize_t with int, since it is not supported by VC6