Good point about the warning. I'll add that. With regards to search_stream() in search.c... all I can say is that I'm sorry:
https://github.com/ggreer/the_silver_searcher/blob/master/sr...
I built ag for myself; both as a tool and to improve my skills profiling, benchmarking, and optimizing. Had I known how popular it would become, I would have definitely held myself to a higher standard, or any standard. Most importantly, I'd have written tests. These days, I'm busy with a startup so progress on those fronts has been slow.