changed return type of strappend() from int to ssize_t