JM プロジェクトは、主に Linux 関連のマニュアルページの日本語ページを翻訳・公開しています。
... ; 説明 lseek () repositions the file offset of the open file description associated with the file descriptor fd to the argument offset ... according to the directive whence as follows: SEEK_SET ファイルオフセットは offset バイトに設定される。 SEEK_CUR ファイルオフセットは現在位置に offset バイトを足した位置にな ... る。 SEEK_END ファイルオフセットはファイルのサイズに offset バイトを足した位置になる。 lseek () は、オフセットをファイルの末尾を越え ... ... の構造体は以下のように定義されている。 typedef struct { cookie_read_function_t *read; cookie_write_function_t *write; cookie_seek_function_t *seek; cookie_close_function_t *close; } cookie_io_functions_t; 4 つのフィールドの詳細は以下のとおりである。 co ... ストリームのオフセットを適切に更新すべきである。 *write がヌルポインターの場合、 このストリームへの出力は破棄される。 cookie_seek_function_t *seek この関数はストリームに対する seek 操作を実装する。 呼び出される際、 3 つの引数を受け取る。 int seek(void ... offset 引数は新しいファイルオフセットを指定する。 新しいオフセットは whence に以下の値のどれが指定されたかに応じて決まる。 SEEK_SET ストリームオフセットを、ストリームの先頭から *offset バイトの位置に設定する。 SEEK_CUR ストリームの現在のオフセットに ... ... ewind(FILE * stream ); int fgetpos(FILE * stream , fpos_t * pos ); int fsetpos(FILE * stream , const fpos_t * pos ); 説明 fseek () 関数は stream によって指定されたストリームにおいて、ファイル位置表示子 (file position indicator) をセットする。新たな位 ... 置 (バイト単位) は whence で指定された位置に offset バイトを加えることによって与えられる。 whence が SEEK_SET , SEEK_CUR , SEEK_END のどれかになっている場合は、それぞれファイルの先頭、現在の位置表示子、 ファイルの末尾からのオフセ ... ットが取られる。 fseek () 関数の呼び出しが成功すると、ストリームの end-of-file 表示子は クリアされ、それまでに ungetc (3) 関数で戻したデータはなか ... ... ewind(FILE * stream ); int fgetpos(FILE * stream , fpos_t * pos ); int fsetpos(FILE * stream , const fpos_t * pos ); 説明 fseek () 関数は stream によって指定されたストリームにおいて、ファイル位置表示子 (file position indicator) をセットする。新たな位 ... 置 (バイト単位) は whence で指定された位置に offset バイトを加えることによって与えられる。 whence が SEEK_SET , SEEK_CUR , SEEK_END のどれかになっている場合は、それぞれファイルの先頭、現在の位置表示子、 ファイルの末尾からのオフセ ... ットが取られる。 fseek () 関数の呼び出しが成功すると、ストリームの end-of-file 表示子は クリアされ、それまでに ungetc (3) 関数で戻したデータはなか ... ... ewind(FILE * stream ); int fgetpos(FILE * stream , fpos_t * pos ); int fsetpos(FILE * stream , const fpos_t * pos ); 説明 fseek () 関数は stream によって指定されたストリームにおいて、ファイル位置表示子 (file position indicator) をセットする。新たな位 ... 置 (バイト単位) は whence で指定された位置に offset バイトを加えることによって与えられる。 whence が SEEK_SET , SEEK_CUR , SEEK_END のどれかになっている場合は、それぞれファイルの先頭、現在の位置表示子、 ファイルの末尾からのオフセ ... ットが取られる。 fseek () 関数の呼び出しが成功すると、ストリームの end-of-file 表示子は クリアされ、それまでに ungetc (3) 関数で戻したデータはなか ... ... ewind(FILE * stream ); int fgetpos(FILE * stream , fpos_t * pos ); int fsetpos(FILE * stream , const fpos_t * pos ); 説明 fseek () 関数は stream によって指定されたストリームにおいて、ファイル位置表示子 (file position indicator) をセットする。新たな位 ... 置 (バイト単位) は whence で指定された位置に offset バイトを加えることによって与えられる。 whence が SEEK_SET , SEEK_CUR , SEEK_END のどれかになっている場合は、それぞれファイルの先頭、現在の位置表示子、 ファイルの末尾からのオフセ ... ットが取られる。 fseek () 関数の呼び出しが成功すると、ストリームの end-of-file 表示子は クリアされ、それまでに ungetc (3) 関数で戻したデータはなか ... ... ewind(FILE * stream ); int fgetpos(FILE * stream , fpos_t * pos ); int fsetpos(FILE * stream , const fpos_t * pos ); 説明 fseek () 関数は stream によって指定されたストリームにおいて、ファイル位置表示子 (file position indicator) をセットする。新たな位 ... 置 (バイト単位) は whence で指定された位置に offset バイトを加えることによって与えられる。 whence が SEEK_SET , SEEK_CUR , SEEK_END のどれかになっている場合は、それぞれファイルの先頭、現在の位置表示子、 ファイルの末尾からのオフセ ... ットが取られる。 fseek () 関数の呼び出しが成功すると、ストリームの end-of-file 表示子は クリアされ、それまでに ungetc (3) 関数で戻したデータはなか ... ... 注 : このシステムコールには glibc のラッパー関数は存在しない。「注意」の節を参照。 説明 Note: for information about the llseek (3) library function, see lseek64 (3). The _llseek () system call repositions the offset of the open file description asso ... set relative to the beginning of the file, the current file offset, or the end of the file, depending on whether whence is SEEK_SET , SEEK_CUR , or SEEK_END , respectively. The new file offset is returned in the argument result . The type loff_t is a ... 64-bit signed type. This system call exists on various 32-bit platforms to support seeking to large file offsets. 返り値 成功した場合は、 _llseek () は 0 を返す。 そうでなれば -1 という値が返り、エラーを示す er ... ... 注 : このシステムコールには glibc のラッパー関数は存在しない。「注意」の節を参照。 説明 Note: for information about the llseek (3) library function, see lseek64 (3). The _llseek () system call repositions the offset of the open file description asso ... set relative to the beginning of the file, the current file offset, or the end of the file, depending on whether whence is SEEK_SET , SEEK_CUR , or SEEK_END , respectively. The new file offset is returned in the argument result . The type loff_t is a ... 64-bit signed type. This system call exists on various 32-bit platforms to support seeking to large file offsets. 返り値 成功した場合は、 _llseek () は 0 を返す。 そうでなれば -1 という値が返り、エラーを示す er ... ... された出力に書き出す (フラッシュする)、 もしくはストリーム stream の下位にある書き込み関数を用いてこのストリームを更新する。 seek 可能なファイルに関連付けられた入力ストリーム (ディスクファイルは seek 可能だが、 パイプや端末は seek できない) に関しては、 ... 日本語の文書やマニュアルを配布している個人/プロジェクトへのリンクです。