Renamed truncate() in parwv.c to parwv_truncate() because of clash with system function on OS X.