Re: Possible spelling fixes

From: Piotr Stefaniak <postgres(at)piotr-stefaniak(dot)me>
To: Heikki Linnakangas <hlinnaka(at)iki(dot)fi>, Josh Soref <jsoref(at)gmail(dot)com>, Andres Freund <andres(at)anarazel(dot)de>
Cc: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Possible spelling fixes
Date: 2017-02-06 15:53:02
Message-ID: AM4PR03MB158672FBA73ED918A4531B04F2400@AM4PR03MB1586.eurprd03.prod.outlook.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2017-02-06 10:40, Heikki Linnakangas wrote:
> On 02/06/2017 04:50 AM, Josh Soref wrote:
>> NUL-terminated -> NULL-terminated
>
> When we're talking about NUL-terminated strings, NUL refers to the NUL
> ASCII character. NULL usually refers to a NULL pointer. We're probably
> not consistent about this, but in this context, NUL-terminated isn't
> wrong, so let's leave them as they are.

The C standard talks about how "a byte with all bits set to 0, called
the null character" is used to "terminate a character string"; it
mentions '\0' as "commonly used to represent the null character"; and it
also talks about when snprintf() produces "null-terminated output".

It never mentions ASCII in this context; quite intentionally it avoids
assuming ASCII at all, so that a standard-compliant C implementation may
co-exist with other encodings (like EBCDIC).

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Fujii Masao 2017-02-06 15:54:54 Re: Provide list of subscriptions and publications in psql's completion
Previous Message Alvaro Herrera 2017-02-06 15:52:11 Re: SCRAM authentication, take three