Pádraig Brady wrote:
...
>>> - /* If we're ignoring leading blanks when computing the End
>>> - of the field, don't start counting bytes until after skipping
>>> - past any leading blanks. */
>>> - if (key->skipeblanks)
>>> - while (ptr < lim && blanks[to_uchar (*ptr)])
>>> - ++ptr;
>>> + if (echar != 0) /* We need to skip over a portion of the end field. */
>>> + {
>>> + if (key->skipeblanks) /* blanks not counted in echar. */
>>
>> Was something wrong with the comment you're removing, above?
>
> I thought it was too verbose. It's replaced with:
> /* blanks not counted in echar. */
> which should be obvious in along with the code?
In that case, please stick with the longer comment.
Not only is it a complete sentence (which we prefer),
but I find it more readable/descriptive.
>>> + while (ptr < lim && blanks[to_uchar (*ptr)])
>>> + ++ptr;
>>>
>>> - /* Advance PTR by ECHAR (if possible), but no further than LIM. */
>>> - remaining_bytes = lim - ptr;
>>> - if (echar < remaining_bytes)
>>> - ptr += echar;
>>> - else
>>> - ptr = lim;
>>> + ptr = MIN (lim, ptr + echar);
>>> + }
>
> Same here. I removed the comment as the code is (now) obvious I think.
Removing that one is ok, I suppose.
But in general, please try to add rather than remove comments.
_______________________________________________
Bug-coreutils mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-coreutils