[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
linecut development
From: |
Steven Schubiger |
Subject: |
linecut development |
Date: |
Sat, 13 Oct 2007 16:33:59 +0200 |
User-agent: |
Mutt/1.5.13 (2006-08-11) |
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?
- linecut development,
Steven Schubiger <=