On Mon, Jan 07 2019 23:01:47 +0200, Lauri Tirkkonen wrote: > On Mon, Jan 07 2019 15:41:53 -0500, Ted Unangst wrote: > > Lauri Tirkkonen wrote: > > > On Sun, Jan 06 2019 14:02:16 -0500, Ted Unangst wrote: > > > > Lauri Tirkkonen wrote: > > > > > Hi, another simple diff converting fgetln usage to getline. > > > > > > > > > > I also considered converting grep_fgetln to grep_getline, but that > > > > > would > > > > > mean that for FILE_MMAP we'd have to copy the string. So this diff > > > > > keeps > > > > > the grep_fgetln interface as is, but avoids using fgetln from libc > > > > > (and > > > > > adds error handling for FILE_STDIO). > > > > > > > > this looks good and seems to work. thanks. > > > > > > actually, it doesn't work :) the added error handling catches that > > > directory fd's are being passed into grep_fgetln, causing an error exit > > > with grep -r (or just grep foo /etc/*). I'm working on a second diff to > > > refactor the file handling a bit. > > > > oh, interesting. that's sloppy. can you please fix that first, separately? > > Sure, here it is.
ping. -- Lauri Tirkkonen | lotheac @ IRCnet