From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <1a22bd77975b0037bb99c22b0ff96f76@terzarima.net> From: Charles Forsyth Date: Thu, 19 Oct 2006 09:29:41 +0100 To: 9fans@cse.psu.edu Subject: Re: [9fans] csipinfo In-Reply-To: <99c53c1560bbfb05dd10f07176bb441a@terzarima.net> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Topicbox-Message-UUID: cd360aa4-ead1-11e9-9d60-3106f5b1d025 >sorry, i meant: see getfields, tokenize, etc. instead of strtok i ought to have included an explanation, but i was short of time. the biggest problem is that strtok keeps some hidden state between calls, so it's a nuisance in concurrent programming. i usually find having the result as an array of strings more helpful than having to make several calls, as well. probably POSIX has fixed the concurrency problem by implying thread-local storage for strtok's state (thus creating a different problem elsewhere) tokenize is often useful because it handles quoting, which is useful for space-separated fields that need to be able to contain white space.