Implicit type casts to help pas2c
Even more explicit type conversions and other stuff to help pas2c use ansistrings
fix misleading indentation