this patch adds the -0 flag to slocate that will force slocate's output to be null terminated rather than newline terminated in a manner similar to find -print0, and compatible with xargs -0. Reproducible: Always Steps to Reproduce: slocate doesn't have this option by default.
Created attachment 149086 [details] patch for null terminated output
Created attachment 149089 [details] patch that actually works printf("%s\0", foo); doesn't do what you want it to do. Also made the --help output fit into an 80 character terminal
Your latest patch has some extra cruft in it that makes it tough to read. Remove all your files ending in ~ and redo it. Thanks.
Created attachment 149243 [details, diff] cruft removed patch
that still has whitespace noise, but it's easier to fix now did you send this upstream ? patch looks fine (havent tested it myself)
(In reply to comment #5) > that still has whitespace noise, but it's easier to fix now > > did you send this upstream ? patch looks fine (havent tested it myself) > Sent it upstream when I made the patch(and when I fixed it). Haven't heard back from them yet.
thanks, added to slocate-3.1-r2 http://sources.gentoo.org/sys-apps/slocate/files/slocate-3.1-NUL.patch?rev=1.1