On 17.01.2011 16:52, Uwe Bonnes wrote:
>>>>>> "Oliver" == Oliver Hartkopp <[email protected]> writes:
>
>
> Oliver> generally a reasonable idea. But your patch breaks the number of
> Oliver> items a shell script might expect to read when parsing a line.
>
> What about an optional field width after -td, like
> ./candump -td2 any
> ( 0.000000) can0 7042000 [8] 03 03 00 00 02 01 00 80
> ( 2.742890) can0 7042000 [8] 03 03 00 00 02 01 00 80
>
Hello Uwe,
there's still a space between '(' and '0.000000)' which breaks the number of
elements. For me it looks a bit over-engineered to add a field width to '-td'
and i would prefer
printf("(%03ld.%06ld) ", diff.tv_sec, diff.tv_usec);
instead if the current
printf("(%ld.%06ld) ", diff.tv_sec, diff.tv_usec);
to fix the ragged output for the differential timestamp output.
Any other opinions out there?
Oliver
_______________________________________________
Socketcan-core mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/socketcan-core