On Sat, Sep 26, 2015 at 10:42 AM, Pádraig Brady <[email protected]> wrote: > On 26/09/15 15:43, Richard Russon wrote: >> I'd like to add an option to both head and tail, >> to allow them to work with NUL-terminated lines of text >> -z, --zero-terminated >> >> Thus allowing: >> >> find dir -type f -print0 | head -z -n 10 | xargs -0 command >> ... >> +/* Character to split lines by. */ >> +static char line_end; ... >> @@ -2210,6 +2219,7 @@ main (int argc, char **argv) >> >> count_lines = true; >> forever = from_start = print_headers = false; >> + line_end = '\n'; >> obsolete_option = parse_obsolete_option (argc, argv, &n_units); >> argc -= obsolete_option; >> argv += obsolete_option;
Thanks for the patch. Please hoist each of those default initializations of "line_end" to the point of declaration.
