From 97d5c458cfa039d857301e1ca7d5af3beb37131d Mon Sep 17 00:00:00 2001 From: Jacob McDonnell Date: Sun, 26 Apr 2026 16:38:00 -0400 Subject: build: Better Build System --- static/inferno/man2/sys-seek.2 | 48 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 static/inferno/man2/sys-seek.2 (limited to 'static/inferno/man2/sys-seek.2') diff --git a/static/inferno/man2/sys-seek.2 b/static/inferno/man2/sys-seek.2 new file mode 100644 index 00000000..15124007 --- /dev/null +++ b/static/inferno/man2/sys-seek.2 @@ -0,0 +1,48 @@ +.TH SYS-SEEK 2 +.SH NAME +seek \- change file offset +.SH SYNOPSIS +.EX +include "sys.m"; +sys := load Sys Sys->PATH; + +seek: fn(fd: ref FD, off: big, start: int): big; +.EE +.SH DESCRIPTION +.B Seek +sets the 64-bit offset for the file +associated with +.I fd +as follows: +.IP +If +.I start +is +.BR Sys->SEEKSTART , +the offset is set to +.I off +bytes. +.IP +If +.I start +is +.BR Sys->SEEKRELA , +the pointer is set to its current location plus +.IR off . +.IP +If +.I start +is +.BR Sys->SEEKEND , +the pointer is set to the size of the +file plus +.IR off . +.PP +The new file offset value is returned. +.PP +Seeking in a pipe is not allowed. +Seeking in a directory is allowed only if the new offset is zero. +.SH SEE ALSO +.IR sys-intro (2), +.IR sys-open (2), +.IR bufio (2), -- cgit v1.2.3