Implement ostream_format.