[Toybox] ln implementation

Rob Landley rob at landley.net
Mon Feb 13 20:59:43 PST 2012


On 02/13/2012 04:23 PM, Andre Renaud wrote:
> Hi Elie,
>> If you change
>>
>> USE_LN(NEWTOY(ln, "fs", TOYFLAG_BIN))
>>
>> into
>>
>> USE_LN(NEWTOY(ln, "<2>2fs", TOYFLAG_BIN))
>>
>> Then this equals the same as stating that two arguments (other than f s)
>> are expected (see toys/link.c and lib/args.c for inspiration). Then you
>> can omit null-pointer checking and the usage printing. On my system it
>> then just behaves as follows:
> 
> Thanks for that - I haven't quite got to grips with the magic involved
> in the USE_xx macros.

I documented it, if that helps:

  http://landley.net/toybox/code.html#lib_args

Rob

 1329195583.0


More information about the Toybox mailing list