> If lseek is external, that I would suggest a ksh builtin wrapper around it.
> Personally I would like to see an expansion of the use of call-by-name
> argument passing.
>
>
Here is an example of call by name argument passing:
================cut here=====================
function distance
{
nameref p=$1
print -- $(( sqrt(p.x*p.x + p.y*p.y) ))
}
p1=(float x=3 y=4)
p2=(float x=5 y=12)
distance p1
distance p2
================cut here=====================
The output is
5
13
I don't know what this has to do with lseek.
As I reported earlier, there is no need for an lseek builtin
since ksh93r has the ability to seek as part of the language.
The new redirection operators, <# and ># are used to seek.
For example,
<# (( EOF-36))
will seek to 36 bytes before the end-of-file. You can apply this
along with any redirection so that
cat < file <# ((80))
will cat the file starting from offset 80.
The value of $(n<#) is the current offset on file descriptor <n>.
The current syntax can be extended to add other seek options like
SEEK_HOLE, by using,
<# (( HOLE))
to seek to the next hole.
David Korn
dgk at research.att.com