mirror of
https://github.com/lcn2/calc.git
synced 2025-08-19 01:13:27 +03:00
Release calc version 2.12.0
This commit is contained in:
34
help/fseek
34
help/fseek
@@ -30,28 +30,28 @@ DESCRIPTION
|
||||
filled by null ('\0') characters.
|
||||
|
||||
EXAMPLE
|
||||
> fd = fopen("/tmp/curds", "w")
|
||||
> fputs(fd, "0123456789abcdef")
|
||||
> freopen(fd, "r")
|
||||
> fsize(fd)
|
||||
; fd = fopen("/tmp/curds", "w")
|
||||
; fputs(fd, "0123456789abcdef")
|
||||
; freopen(fd, "r")
|
||||
; fsize(fd)
|
||||
16
|
||||
> fseek(fd, 5)
|
||||
> fgets(fd)
|
||||
; fseek(fd, 5)
|
||||
; fgets(fd)
|
||||
"56789abcdef"
|
||||
> fseek(fd, 0)
|
||||
> fscanf(fd, "%*5c")
|
||||
; fseek(fd, 0)
|
||||
; fscanf(fd, "%*5c")
|
||||
0
|
||||
> fseek(fd, 5, 1)
|
||||
> fgets(fd)
|
||||
; fseek(fd, 5, 1)
|
||||
; fgets(fd)
|
||||
"abcdef"
|
||||
> ftell(fd)
|
||||
; ftell(fd)
|
||||
16
|
||||
> fseek(fd, -5, 2)
|
||||
> fgets(fd)
|
||||
; fseek(fd, -5, 2)
|
||||
; fgets(fd)
|
||||
"bcdef"
|
||||
> fseek(fd, -2)
|
||||
; fseek(fd, -2)
|
||||
System error 22
|
||||
> ftell(fd)
|
||||
; ftell(fd)
|
||||
16
|
||||
|
||||
The results for the last four lines may be different for different systems.
|
||||
@@ -82,8 +82,8 @@ SEE ALSO
|
||||
## received a copy with calc; if not, write to Free Software Foundation, Inc.
|
||||
## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
|
||||
##
|
||||
## @(#) $Revision: 29.2 $
|
||||
## @(#) $Id: fseek,v 29.2 2000/06/07 14:02:33 chongo Exp $
|
||||
## @(#) $Revision: 29.3 $
|
||||
## @(#) $Id: fseek,v 29.3 2006/05/07 07:25:46 chongo Exp $
|
||||
## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/fseek,v $
|
||||
##
|
||||
## Under source code control: 1995/03/04 11:33:20
|
||||
|
Reference in New Issue
Block a user