This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH][BZ #12986] Clarify that scanf does not use character classes.


> 	[BZ #12986]
> 	* manual/stdio.texi: Clarify documentation.

Such a vague log entry is wholly inadequate.  Log entries for Texinfo
files should cite the node in the same way log entries for C files
cite the function.  That alone is still insufficiently specific.
Say what you're clarifying.

> diff --git a/manual/stdio.texi b/manual/stdio.texi
> index 30630ca..1be5fd9 100644
> --- a/manual/stdio.texi
> +++ b/manual/stdio.texi
> @@ -3671,8 +3671,8 @@ of the width or precision by @code{MB_CUR_MAX}.
>  
>  To read in characters that belong to an arbitrary set of your choice,
>  use the @samp{%[} conversion.  You specify the set between the @samp{[}
> -character and a following @samp{]} character, using the same syntax used
> -in regular expressions.  As special cases:
> +character and a following @samp{]} character, using similar syntax an one 
> +used in regular expressions.  As special cases:

I'd say, "... using the same syntax used in regular expressions for
explicit sets of characters."

> +Note that character classes are not supported.

The term "character class" is not defined anywhere in this manual
(unsurprising since it does not document regexp syntax).  You could
use a cross-reference to another manual that does document regexp
syntax and define the term (there is surely a good node to refer to in
the grep manual).  But it's also nice to make it clear without looking
up the reference, e.g.

Note that the @dfn{character class} syntax available in character sets
that appear inside regular expressions (such as @samp{[:alpha:]}) is
@emph{not} available in the @samp{%[} conversion.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]