Re: *printf and zero size

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: *printf and zero size
Date: 2005-12-05 21:40:57
Message-ID: 2745.1133818857@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> writes:
> Upon successful completion snprintf() and vsnprintf() return the number
> of characters that would have been written to a sufficiently sized str,
> excluding the terminating NUL character.

> but it seems this is some BSD'ism that we don't need to support if the
> standard doesn't say so.

Yeah, that is a BSD-ism. You have a point though, we ought to document
which return convention the code follows. I'll add something.

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Qingqing Zhou 2005-12-05 21:44:27 About varlena2
Previous Message Bruce Momjian 2005-12-05 21:35:31 Re: *printf and zero size