On Tue, Nov 22, 2016 at 03:47:37AM +0100, Vincent Lefevre wrote: > NUL means the ASCII or EBCDIC character \0 (the special characters > in US-ASCII and EBCDIC typically have names with at most 3 letters, > hence this abbreviation).
I think technically "abbreviation" is not even correct--it is the symbolic representation of the character. By custom and convention, it is mainly used to literally represent occurances of the normally unprintable ASCII null character in a text document, and where possible is usually represented as a single trigraph with the letters drawn in a single character cell, diagonally from top to bottom, left to right (i.e.'␀'), intstead of the string "NUL". It is typically only written out as a string of characters when the former is not possible for the source document (or the author is unable or unwilling to figure out how to produce the trigraph :-)), such as ASCII text documents. In written English sentences, including code comments, you should always instead write "null" (and in this case "null-terminated"). > In C, the byte 0 is called the "null character". NUL is definitely > wrong in this context, as C may be based on a character set other > than ASCII or EBCDIC, while the null character is charset independent. Well, in principle, maybe (though I'm not even sure of that)... In practice, there's no such character set, and unlikely ever will be. The word "null" MEANS zero (or "having no value, nothing," and similar related ideas). It's zero everywhere. > > > + /* Note that X509_NAME_oneline will NUL-terminate buf, even when it > > Should be: > > /* Note that X509_NAME_oneline will null-terminate buf, even when it Yes. -- Derek D. Martin http://www.pizzashack.org/ GPG Key ID: 0xDFBEAD02 -=-=-=-=- This message is posted from an invalid address. Replying to it will result in undeliverable mail due to spam prevention. Sorry for the inconvenience.
pgpYauoXSiLKu.pgp
Description: PGP signature
