Re: [hackers] [sbase][PATCH] cp: add -i flag

From: THIBAUT AUBIN <t.aubin20_AT_ejm.org>
Date: Thu, 17 Apr 2025 13:32:55 +0200

I respectfully disagree with Roberto Vargas.
NRK suggested approach is consistent with the behavior of GNU coreutils
8.30.
The first character from stdin should be obtained directly, without reading
any leading characters.
This allows all the remaining characters to be consumed within a single
loop.
Furthermore, it is also necessary to check for both newline and EOF from
the start to prevent an infinite loop.
All trailing characters must be consumed, using `isspace(3)` is incorrect.
Since the answer may be either `y` or `Y`, using `toupper(3)` is incorrect.
Unless there are issues with this implementation, it's time to apply patch
sbase-20250416-8f0fff4.diff.
Received on Thu Apr 17 2025 - 13:32:55 CEST

This archive was generated by hypermail 2.3.0 : Fri Apr 18 2025 - 05:48:40 CEST