src/fgetln.c


Log

Author Commit Date CI Message
Guillem Jover 151bc71d 2015-09-22T16:22:56 Add compile and link-time deprecation warnings for fgetln() Although the current implementation in libbsd is probably one of the safest ones around, it still poses some problems when used with many file streams. This function has now a replacement, that is both more standard and portable. Ask users to switch to getline(3) instead.
Guillem Jover 0982dcd9 2015-09-23T07:10:18 Lock the file streams in fgetln() and fparseln() The fparseln() function had the NetBSD uppercase macros stubbed out, so replace them with the actual stdio ones. The fgetln() function was missing any locking at all.
Guillem Jover cb7bc0d8 2012-11-25T22:09:43 Add file buffer pool support to fgetln() This avoids buffer overwrites during concurrent or intermixed calls to fgetln() when using more than one different stream (currently 32), which the original interface supports natively by using an internal buffer from the FILE structure. Although this workaround is rudimentary, it should cover most of the theoretically problematic cases.
Guillem Jover e7f39760 2012-03-23T10:31:42 Add email address to my name
Guillem Jover f8e80630 2012-01-03T08:40:18 Base fgetln() implementation on getline presence instead of glibc
Guillem Jover b891772a 2011-05-29T02:49:14 Remove blank lines at EOF
Guillem Jover 94fe901e 2011-05-14T18:12:48 Abort compilation if fgetln cannot be wrapped
Guillem Jover abe0a4a7 2010-01-10T11:02:13 Reformat code to KNF
Thorsten Glaser c17c7e13 2009-12-10T18:07:25 Expand on API guarantee for fgetln OpenBSD has begun using the API guarantee that *len is not 0 if the fgetln(3) return value is not NULL; document this explicitly in the manpage and add a comment to the function implementation that this doesn’t need to be checked because getdelim/getline have similar guarantees. Signed-off-by: Thorsten Glaser <tg@mirbsd.org>
Guillem Jover 1f0b016e 2009-05-20T04:20:21 Use UTF-8 copyright symbols for non-imported files
Guillem Jover 74ae34e7 2009-05-15T21:26:09 Fix buffer leaks in fgetln Cache the size and the buffer allocated by getline as static variables.
Guillem Jover deb9f56c 2009-05-15T21:23:03 Change fgetln to return the correct length value Set len to 0 on error conditions to mimmic FreeBSD behaviour, and return the amount of read characters on success, instead of the allocated size by getline. Reported-by: Jief L. <jief1.l@gmail.com>
Guillem Jover fafffd1f 2008-07-09T08:26:07 fgetln: Fix coding style
Guillem Jover 47109e39 2008-07-09T08:22:30 fgetln: Fix function to make it actually work Reported by Thorsten Glaser.
Guillem Jover da92787d 2008-07-09T07:46:23 Ansify function arguments
Guillem Jover d699e4bc 2008-06-18T08:05:23 Add license header With Hector's agreement.
Guillem Jover 5372b736 2006-02-14T05:39:29 Move sources to src/