Thanks for starting on this. Here's a quick reaction. We should be implementing something upward-compatible with BSD look(1). Visit <http://www.freebsd.org/cgi/man.cgi>, type "look", and see the resulting man page.
You don't need to create a man page. They are created automatically, from --help output. However, you do need to modify doc/coreutils.texi. There's a lot of code duplication between bsearch and source. The common stuff should be factored out. Always check for failure from every system call. E.g., fstat might fail. Please use the same coding style (e.g., indenting) that coreutils already uses. Why not use binary_search if the file is seekable? Some files are not regular files, but are still seekable. You should use an interpolating search rather than a straight binary search. That is much faster for the common case of looking something up in /usr/dict/words. _______________________________________________ Bug-coreutils mailing list Bug-coreutils@gnu.org http://lists.gnu.org/mailman/listinfo/bug-coreutils