From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from duke.felloff.net ([216.126.196.34]) by ewsd; Fri Dec 6 21:10:36 EST 2019 Message-ID: <82FE20F5BBA449C72E44DC98A38C3F73@felloff.net> Date: Sat, 7 Dec 2019 03:10:27 +0100 From: cinap_lenrek@felloff.net To: 9front@9front.org Subject: Re: [9front] hgfs(4) loadrevinfo patch In-Reply-To: B6E80A0E7E51001263231F8A26EDC4FB@musolino.id.au MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit List-ID: <9front.9front.org> List-Help: X-Glyph: ➈ X-Bullshit: callback pipelining interface session extension-scale controller a good start, but why not just use Boffset() to get logoff/loglen? also, to find the "\n\n", just do a simple state machine: for(;;){ if((c = Bgetc(bio)) == -1) goto Error; if(c == '\n){ if((c = Bgetc(bio)) == -1) goto Error; if(c == '\n') break; // we'r at the end of the log. take Boffset() and subtract to get length } } -- cinap