GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
FSEEK(3) FreeBSD Library Functions Manual FSEEK(3)

̾??

fgetpos, fseek, fseeko, fsetpos, ftell, ftello, rewind???ȥ꡼???ΰ????ѹ?

Standard C Library (libc, -lc)

<stdio.h> int (FILE *stream, long offset, int whence) long ftell(FILE *stream) void rewind(FILE *stream) int fgetpos(FILE *stream, fpos_t *pos) int fsetpos(FILE *stream, const fpos_t *pos) <sys/types.h> int fseeko(FILE *stream, off_t offset, int whence) off_t ftello(FILE *stream)

fseek() ?ؿ??ϡ? stream ???ؤ????ȥ꡼???Υե????????֥??󥸥??????? ???ꤷ?ޤ????????????֤ϥХ???ñ?̤Ƿ?¬???졢 whence ?ǻ??ꤵ?줿???֤? offset ?Х??Ȥ?­?????Ȥ????????ޤ??? whence ?? SEEK_SET, SEEK_CUR, SEEK_END ?????ꤵ???Ƥ??????硢???ե??åȤϡ????줾?졢?ե??????κǽ顢 ???󥸥??????θ??߰??֡??ե??????κǸ夫???????а??֤ˤʤ??ޤ??? fseek() ?ؿ??θƤӽФ??? ???꤬ȯ?????ʤ??????ϡ????ȥ꡼???? end-of-file ?ؼ??Ҥ????ꥢ???졢 ???Υ??ȥ꡼?????Ф??? ungetc(3) ?ؿ??θ??̤ϼ????ä????ޤ???

() ?ؿ??ϡ? stream ???ؤ????ȥ꡼???Υե????????֥??󥸥??????? ???ߤ??ͤ????ꤷ?ޤ???

() ?ؿ??ϡ? stream ???ؤ????ȥ꡼???Υե????????֥??󥸥??????? ?ե??????κǽ??????ꤷ?ޤ????????ϡ? ???ȥ꡼???Υ??顼???󥸥??????????ꥢ?????뤳?? ( clearerr(3) ?򻲾?) ???????С??ʲ???Ʊ?????̤ˤʤ??ޤ???

(void)fseek(stream, 0L, SEEK_SET)

() ?ؿ??? fseek() ??Ʊ?ͤǤ????? ?????ˤ? long ?????????? off_t ???Ȥ??ޤ??? Ʊ?ͤ? ftello() ?ؿ??? ftell() ??Ʊ???Ǥ????? off_t ???֤??ޤ???

() ?ؿ??? () ?ؿ??ϡ?( whence ?? SEEK_SET ?????ꤷ?? ) ftell() ?? fseek() ??Ʊ?????󥿥ե??????ǡ??ե????륪?ե??åȤθ??ߤ??ͤ? pos ?????Ȥ??륪?֥??????Ȥ??????ꤷ???ꡢ pos ?????Ȥ??륪?֥??????Ȥ???¸?????ꤷ?ޤ??? ?????? (UNIX ?ʳ???) ?????ƥ??Ǥϡ? “fpos_t” ???֥??????Ȥ?ʣ?祪?֥??????ȤǤ??뤫?⤷???ʤ??Τǡ? ?ܿ??????ݤ??ʤ????ƥ????ȥ??ȥ꡼???ΰ??֤? ?ѹ????뤿???ˤϡ????Υ롼?????˰ͤ뤷???ʤ????Ȥ⤢???ޤ???

rewind() ?ؿ????ͤ??֤??ޤ?????


The fgetpos(), fseek(), fseeko(), and fsetpos() functions return the value 0 if successful; otherwise the value -1 is returned and the global variable errno is set to indicate the error.

???????ƽ?λ?????ȡ? () ?????? () ?ϸ??ߤΥ??ե??åȤ??֤??ޤ????????ʳ??ξ????? -1 ???֤??졢 ???????Х??ѿ? errno ?????ꤵ???ƥ??顼?򼨤??ޤ???

[EBADF]
???ꤵ?줿 stream ???????????Ǥ??륹?ȥ꡼???ǤϤ????ޤ?????
[EINVAL]
fseek() ?? whence ???????? SEEK_SET, SEEK_END, SEEK_CUR ?Τɤ??Ǥ⤢???ޤ?????
[EOVERFLOW]
ftell() ???¹Ԥ??????̤Υե??????Υ??ե??åȤ? long ???Υ??֥??????ȤǤ???????ɽ???Ǥ??ʤ??ͤȤʤ??ޤ?????

(), fseek(), fseeko(), fsetpos(), ftell(), ftello() ?ؿ??????Ԥ??????ˤϡ? ?롼???? fflush(3), fstat(2), lseek(2), malloc(3) ?ˤĤ??Ƽ????Ƥ??륨?顼?? errno ?????ꤵ???Ƥ??뤳?Ȥ⤢???ޤ???

lseek(2)

fgetpos(), fsetpos(), fseek(), ftell(), rewind() ?ؿ??ϡ? ISO/IEC 9899:1990 (“ISO C90”) ??Ŭ?礷?Ƥ??ޤ???

() ?? () ?ؿ??ϡ? Version 2 of the Single UNIX Specification (“SUSv2”) ??Ŭ?礷?Ƥ??ޤ???

March 5, 1999 FreeBSD 14.3-RELEASE

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.