Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
| From | ruben safir <ruben@mrbrklyn.com> |
|---|---|
| Newsgroups | comp.lang.c |
| Subject | Re: what the fork is wrong with strtok_r |
| Date | 2015-03-29 03:39 -0400 |
| Organization | PANIX Public Access Internet and UNIX, NYC |
| Message-ID | <mf8a6q$7j0$1@reader1.panix.com> (permalink) |
| References | <mf6eja$cls$1@reader1.panix.com> <mf6ffi$jqa$1@dont-email.me> <87384omybp.fsf@kst-u.example.com> |
On 03/28/2015 08:39 PM, Keith Thompson wrote: > James Kuyper <jameskuyper@verizon.net> writes: > [...] >> Note: if you're using gets() to read the text string, '\n' characters >> will be replaced with '\0', which would make tokenizing on '\n' a little >> difficult. If that fact is completely irrelevant to your problem, that >> demonstrates the need for item 1. > > If you're using gets(), that's your first problem. gets() is inherently > unsafe, and has been removed from the language as of the 2011 standard. > you have to LOVE this line Another example program using strtok() can be found in getaddrinfo_a(3).
Back to comp.lang.c | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
what the fork is wrong with strtok_r what <ceo@iran.gov> - 2015-03-28 14:41 +0000
Re: what the fork is wrong with strtok_r James Kuyper <jameskuyper@verizon.net> - 2015-03-28 10:57 -0400
Re: what the fork is wrong with strtok_r Keith Thompson <kst-u@mib.org> - 2015-03-28 17:39 -0700
Re: what the fork is wrong with strtok_r James Kuyper <jameskuyper@verizon.net> - 2015-03-28 21:33 -0400
Re: what the fork is wrong with strtok_r ruben safir <ruben@mrbrklyn.com> - 2015-03-29 03:36 -0400
Re: what the fork is wrong with strtok_r ruben safir <ruben@mrbrklyn.com> - 2015-03-29 03:39 -0400
Re: what the fork is wrong with strtok_r Lőrinczy Zsigmond <nospam@for.me> - 2015-03-29 08:28 +0200
csiph-web