BSD 4_3 release
[unix-history] / usr / man / man2 / lseek.2
index ac1c8ab..7fae976 100644 (file)
@@ -1,19 +1,31 @@
-.TH LSEEK 2 "7 July 1983"
+.\" Copyright (c) 1980 Regents of the University of California.
+.\" All rights reserved.  The Berkeley software License Agreement
+.\" specifies the terms and conditions for redistribution.
+.\"
+.\"    @(#)lseek.2     6.3 (Berkeley) 2/24/86
+.\"
+.TH LSEEK 2 "February 24, 1986"
 .UC 4
 .SH NAME
 lseek \- move read/write pointer
 .SH SYNOPSIS
 .nf
 .ft B
 .UC 4
 .SH NAME
 lseek \- move read/write pointer
 .SH SYNOPSIS
 .nf
 .ft B
-.ta 1.25i 1.6i
+#include <sys/file.h>
+.PP
+.nf
+.ft B
+.ta 1.25i 1.6i 1.8i
 #define L_SET  0       /* set the seek pointer */
 #define L_INCR 1       /* increment the seek pointer */
 #define L_XTND 2       /* extend the file size */
 .PP
 .ft B
 pos = lseek(d, offset, whence)
 #define L_SET  0       /* set the seek pointer */
 #define L_INCR 1       /* increment the seek pointer */
 #define L_XTND 2       /* extend the file size */
 .PP
 .ft B
 pos = lseek(d, offset, whence)
-int pos;
-int d, offset, whence;
+off_t pos;
+int d;
+off_t offset;
+int whence;
 .fi
 .ft R
 .SH DESCRIPTION
 .fi
 .ft R
 .SH DESCRIPTION
@@ -51,8 +63,9 @@ Seeking far beyond the end of a file, then writing,
 creates a gap or \*(lqhole\*(rq, which occupies no
 physical space and reads as zeros.
 .SH "RETURN VALUE
 creates a gap or \*(lqhole\*(rq, which occupies no
 physical space and reads as zeros.
 .SH "RETURN VALUE
-Upon successful completion, a non-negative integer,
-the current file pointer value, is returned.  Otherwise,
+Upon successful completion,
+the current file pointer value is returned.
+Otherwise,
 a value of \-1 is returned and \fIerrno\fP is set to indicate
 the error.
 .SH "ERRORS
 a value of \-1 is returned and \fIerrno\fP is set to indicate
 the error.
 .SH "ERRORS
@@ -70,9 +83,6 @@ is associated with a pipe or a socket.
 [EINVAL]
 .I Whence
 is not a proper value.
 [EINVAL]
 .I Whence
 is not a proper value.
-.TP 15
-[EINVAL]
-The resulting file pointer would be negative.
 .SH "SEE ALSO"
 dup(2), open(2)
 .SH BUGS
 .SH "SEE ALSO"
 dup(2), open(2)
 .SH BUGS