[vlc-devel] [vlc-commits] playlist: m3u: use cctype

Remi Denis-Courmont remi at remlab.net
Thu Mar 12 18:57:36 CET 2020

Le 2020-03-12 19:40, Francois Cartegnie a écrit :
> Le 12/03/2020 à 18:26, Remi Denis-Courmont a écrit :
>> What do you want with them? It wouldn't change anything w.r.t. UB, 
>> even
>> if you could use them to force the C locale. And it's going to much
>> slower and more complicated than the previous code, or strspn().
> According to the spec, that "UB" means "returning non zero on undefined
> characters".


Because my copy of the ISO C spec says this:

| In all cases the argument is an int, the value of which shall be
| representable as an unsigned char or shall equal the value of the 
macro EOF.
| If the argument has any other value, the behavior is undefined.

And FWTW, the Linux manual pages say basically the same in shorter form.

Rémi Denis-Courmont

More information about the vlc-devel mailing list