Liste des Groupes | Revenir à cl c |
Meanwhile, saw someone in another group write:The design of strsep() is poor. The reasoning for not adding strdup()
char * something;
something = strdup("writable string etc.");
if( something == NULL ) { etc. }
But that won't work if --std=c99, does work for g99 and c2x.
The (Linux) man page says:
/* Since glibc 2.12: */ _POSIX_C_SOURCE >= 200809L
I asked Google about it being a POSIX extension
added at that late date, and it gave me an answer
about the C standard:
"C9X London meeting update"
https://groups.google.com/g/comp.std.c/c/pMaEU_8Rb7w
_ _ _ _ _
2. strsep and strdup are not being added. strsep() is out because
not enough people wanted it to vote it in; strdup() lost on the
grounds that it would be the *ONLY* function other than *alloc()
in the entire library whose return could be sanely passed to free(),
and this is surprising.
Les messages affichés proviennent d'usenet.