Date: Mon, 19 Feb 2001 12:44:27 -0800 (PST) From: Matt Dillon <dillon@earth.backplane.com> To: Mikko Tyolajarvi <mikko@dynas.se> Cc: hackers@freebsd.org Subject: Re: Staticaly allocated buffers in library. Is it correct? Message-ID: <200102192044.f1JKiRT38061@earth.backplane.com> References: <200102191723.f1JHNII37074@earth.backplane.com> <200102191907.f1JJ7KU66271@explorer.rsa.com>
next in thread | previous in thread | raw e-mail | index | archive | help
:>:> > hold one line from parsed file. Usually it is enough for one line, but :>:... : :> Yes. System libraries traditionally use statically allocated buffers :> because, even now, there is no dynamic equivalent for fgets(). The :> closest you can get is to mmap() the file and extract the lines that :> way. : :How about fgetln(3)? : : /Mikko :-- : Mikko Työläjärvi_______________________________________mikko@rsasecurity.com Sure, if all you want to do is compile your program on a *BSD box. But fgetln() is a stupid function... it doesn't return a nul-terminated string, for example. It's a bad hack. -Matt To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200102192044.f1JKiRT38061>