apcups branch: Remove `write_nbytes' and replace it with `swrite'.