[Toybox] [PENDING] [fold.c] [Question]

haroon maqsood maqsood3525 at live.com
Wed Aug 29 17:55:40 PDT 2018


Hi,
fold -b -w10 generated/unstripped/toybox
fold -w10  generated/unstripped/toybox

fold  does operate on non text files, you can pipe it to less and see the quick difference, i know no one would use fold in this way
but still, lets focus on fixing the bugs 😊
Thanks
Haroon

________________________________
From: Samuel Holland <samuel at sholland.org>
Sent: Thursday, August 30, 2018 12:28 AM
To: haroon maqsood; toybox at lists.landley.net
Subject: Re: [Toybox] [PENDING] [fold.c] [Question]

On 08/29/18 19:11, haroon maqsood wrote:
> Test 1: Agreed (thanks for pointing out i missed it) i'll remove it.
> Test 2: IMO as adding d breaks the spec by not outputting the new line after
> space, gnu is wrong here.
> Test 3: then why not stat the files or check by any other way that they are only
> regular files? IMO this should be a normal case that it makes width  match so
> new line is due.

It *is* a regular file, but it's not a *text* file. Being a text file depends on
the contents of the file, such as it can't contain NUL characters and must end
with a newline character.

Samuel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.landley.net/pipermail/toybox-landley.net/attachments/20180830/cf94f0e0/attachment.html>


More information about the Toybox mailing list