Since no one explicitly rejected the idea of adding linecut to coreutils,
I've re-implemented quite a bit of functionality to suit the requirements
of a coreutils tool (see previous mail for enlistment).

I'm currently struggling how to make pipe support work correctly, because
one needs to know beforehand how many lines of input are available (to
turn relative range line positions into their absolute counterparts), 
which implies reading through the entire STDIN stream. Once this is done,
I see no way to re-read the same stream again.

These are the solutions (that come to mind):

 a) allocate memory for each line and buffer accordingly
 b) disallow inverted (relative to EOF) line positions
 c) a sophisticated algorithm
 d) ... 

I haven't decided yet how to proceed and would like to collect some opinions.

What is the preferred way to continue with code review?



_______________________________________________
Bug-coreutils mailing list
Bug-coreutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-coreutils

Reply via email to