[Toybox] - Add DD

Ashwini Sharma ak.ashwini at gmail.com
Fri Nov 1 04:11:28 PDT 2013


Hi Rob,

In du.c the human readable string for the size was printed in place. To
make a common function
for both du and dd, I compiled this into pending.c. To return the reabable
string
static char[] is used. This could be done with xmalloc and free, but that
will require the user
of function to keep track of the returned pointer and free it.

Other approach could have been to accept and char buffer as _out_ parameter
for holding the string.

your inputs are welcome.

regards,
Ashwini

On Tue, Oct 29, 2013 at 6:32 AM, Rob Landley <rob at landley.net> wrote:

> This one was deferred due to the common infrastructure changes. Applying
> it also modified a previously "done" command to use a lib/pending.c
> function, and a quick glance at that new function showed it adding a new
> static/global variable after I finally got rid of the itoa/utoa one. (I
> also need a lib/pending.h to go with lib/pending.c.)
>
> I appreciate the heads up and I'll try to carve out some time this week to
> at least catch up on the pending merges. (The time I've had recently went
> to build infrastructure fixes, cleaning up nl, and reading about 6000 of my
> 16,000 back emails. I'm less than 10,000 emails behind now! Woo!)
>
> Rob
>
>
> On 10/16/2013 01:09:29 AM, Ashwini Sharma wrote:
>
>> Hi Rob,
>> incase you missed this mail, just to bring it on the top of ur list.
>>
>> regards,
>> Ashwini
>> On Tue, Sep 3, 2013 at 2:53 PM, Ashwini Sharma <ak.ashwini at gmail.com>
>> wrote:
>>
>> > Hi Rob,
>> >
>> > Attached is the patch for DD.
>> >
>> > I have also modified _du.c_, _pending.c_ and _lib.h_ to make a common
>> > function for converting _size_ into human readable string.
>> >
>> > Like to hear from you.
>> >
>> > regards,
>> > Ashwini
>> >
>>
>>
> ------quoted attachment------
>
>> ______________________________**_________________
>> Toybox mailing list
>> Toybox at lists.landley.net
>> http://lists.landley.net/**listinfo.cgi/toybox-landley.**net<http://lists.landley.net/listinfo.cgi/toybox-landley.net>
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.landley.net/pipermail/toybox-landley.net/attachments/20131101/872d01a3/attachment-0003.htm>


More information about the Toybox mailing list