From mboxrd@z Thu Jan 1 00:00:00 1970 To: 9fans@9fans.net Date: Mon, 9 Jan 2012 09:47:57 +0000 From: faif Message-ID: <19066037.1659.1326018719041.JavaMail.geo-discussion-forums@vbdz6> Content-Type: text/plain; charset=ISO-8859-1 Subject: [9fans] C library function that reads up to a newline Topicbox-Message-UUID: 566f73a0-ead7-11e9-9d60-3106f5b1d025 read(2) reads up to N bytes but doesn't stop on newlines. Brdline(2) looks like a good candidate for that. Are there any functions outside Bio that behave similarly? From mboxrd@z Thu Jan 1 00:00:00 1970 MIME-Version: 1.0 In-Reply-To: <19066037.1659.1326018719041.JavaMail.geo-discussion-forums@vbdz6> References: <19066037.1659.1326018719041.JavaMail.geo-discussion-forums@vbdz6> Date: Mon, 9 Jan 2012 13:11:36 +0200 Message-ID: From: Jani Lahtinen To: comp.os.plan9@googlegroups.com, Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> Content-Type: multipart/alternative; boundary=f46d04426ac0416f2d04b616766c Subject: Re: [9fans] C library function that reads up to a newline Topicbox-Message-UUID: 56776268-ead7-11e9-9d60-3106f5b1d025 --f46d04426ac0416f2d04b616766c Content-Type: text/plain; charset=ISO-8859-1 Dont' think so, as you need a buffer to keep the line. On Mon, Jan 9, 2012 at 11:47 AM, faif wrote: > read(2) reads up to N bytes but doesn't stop on newlines. Brdline(2) > looks like a good candidate for that. Are there any functions > outside Bio that behave similarly? > > --f46d04426ac0416f2d04b616766c Content-Type: text/html; charset=ISO-8859-1 Dont' think so, as you need a buffer to keep the line.

On Mon, Jan 9, 2012 at 11:47 AM, faif <faifgnu@gmail.com> wrote:
read(2) reads up to N bytes but doesn't stop on newlines. Brdline(2)
looks like a good candidate for that. Are there any functions
outside Bio that behave similarly?


--f46d04426ac0416f2d04b616766c-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: erik quanstrom Date: Mon, 9 Jan 2012 09:18:42 -0500 To: comp.os.plan9@googlegroups.com, 9fans@9fans.net Message-ID: <0695a9ec118ac6f2b701ffdb42f92c77@coraid.com> In-Reply-To: <19066037.1659.1326018719041.JavaMail.geo-discussion-forums@vbdz6> References: <19066037.1659.1326018719041.JavaMail.geo-discussion-forums@vbdz6> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Subject: Re: [9fans] C library function that reads up to a newline Topicbox-Message-UUID: 56854f36-ead7-11e9-9d60-3106f5b1d025 On Mon Jan 9 04:57:17 EST 2012, faifgnu@gmail.com wrote: > read(2) reads up to N bytes but doesn't stop on newlines. Brdline(2) > looks like a good candidate for that. Are there any functions > outside Bio that behave similarly? if you're application is one where the producer is producing a line at a time, then read(2) will read a line at a time; plan 9 doesn't coalesce writes. (raw tcp connections notwithstanding.) - erik