pike.git / src / modules / _Stdio / file.c

version» Context lines:

pike.git/src/modules/_Stdio/file.c:3241:    *! @returns    *! Upon successful completion, seek() returns the resulting offset    *! location as measured in bytes from the beginning of the file. On    *! error, the value (off_t) -1 is returned and @[errno] is set to    *! indicate the error.    *!    *! @seealso    *! @[tell()]    */    - /* -  * @decl deprecated variant int seek(int unit, int mult) -  * @decl deprecated variant int seek(int unit, int mult, int add) -  * -  * Seek to a specified offset in a file. -  * -  * If @[mult] or @[add] are specified, @[pos] is calculated as -  * @expr{@[pos] = @[unit]*@[mult] + @[add]@}. -  * -  * If @[pos] is negative then it is relative to the end of the file, -  * otherwise it's an absolute offset from the start of the file. -  * -  * @returns -  * Returns the new offset, or @expr{-1@} on failure. -  * -  * @note -  * The arguments @[mult] and @[add] are considered obsolete, and -  * should not be used. -  * -  * @seealso -  * @[tell()] + /*! @decl variant __deprecated__ int seek(int unit, int mult) +  *! @decl variant __deprecated__ int seek(int unit, int mult, int add) +  *! +  *! Seek to a specified offset in a file. +  *! +  *! If @[mult] or @[add] are specified, @[pos] is calculated as +  *! @expr{@[pos] = @[unit]*@[mult] + @[add]@}. +  *! +  *! If @[pos] is negative then it is relative to the end of the file, +  *! otherwise it's an absolute offset from the start of the file. +  *! +  *! @returns +  *! Returns the new offset, or @expr{-1@} on failure. +  *! +  *! @note +  *! The arguments @[mult] and @[add] are considered obsolete, and +  *! should not be used. +  *! +  *! @seealso +  *! @[tell()]    */   static void file_seek(INT32 args)   {   #ifdef SEEK64    INT64 to = 0;   #else    off_t to = 0;   #endif    int how = SEEK_SET;   
pike.git/src/modules/_Stdio/file.c:5924:    }    }    }    THREADS_DISALLOW();    Pike_sp = sp;    }    f_aggregate(fds);   }      /*! @decl constant NOTE_ATTRIB = 8 -  * -  * Used with @[Stdio.File()->set_fs_event_callback()] to monitor for attribute changes on a file. -  * -  * @note -  * Available on systems that use kqueue. +  *! +  *! Used with @[Stdio.File()->set_fs_event_callback()] to monitor +  *! for attribute changes on a file. +  *! +  *! @note +  *! Available on systems that use kqueue.    */      /*! @decl constant NOTE_WRITE = 2 -  * -  * Used with @[Stdio.File()->set_fs_event_callback()] to monitor for writes to a file. -  * -  * @note -  * Available on systems that use kqueue. +  *! +  *! Used with @[Stdio.File()->set_fs_event_callback()] to monitor +  *! for writes to a file. +  *! +  *! @note +  *! Available on systems that use kqueue.    */      /*! @decl constant NOTE_DELETE = 1 -  * -  * Used with @[Stdio.File()->set_fs_event_callback()] to monitor for deletion of a file. -  * -  * @note -  * Available on systems that use kqueue. +  *! +  *! Used with @[Stdio.File()->set_fs_event_callback()] to monitor +  *! for deletion of a file. +  *! +  *! @note +  *! Available on systems that use kqueue.    */      /*! @decl constant NOTE_EXTEND = 4 -  * -  * Used with @[Stdio.File()->set_fs_event_callback()] to monitor for extension events on a file. -  * -  * @note -  * Available on systems that use kqueue. +  *! +  *! Used with @[Stdio.File()->set_fs_event_callback()] to monitor +  *! for extension events on a file. +  *! +  *! @note +  *! Available on systems that use kqueue.    */      /*! @decl constant NOTE_LINK = 16 -  * -  * Used with @[Stdio.File()->set_fs_event_callback()] to monitor for changes to a file's link count. -  * -  * @note -  * Available on systems that use kqueue. +  *! +  *! Used with @[Stdio.File()->set_fs_event_callback()] to monitor +  *! for changes to a file's link count. +  *! +  *! @note +  *! Available on systems that use kqueue.    */      /*! @decl constant NOTE_RENAME = 32 -  * -  * Used with @[Stdio.File()->set_fs_event_callback()] to monitor for move or rename events on a file. -  * -  * @note -  * Available on systems that use kqueue. +  *! +  *! Used with @[Stdio.File()->set_fs_event_callback()] to monitor +  *! for move or rename events on a file. +  *! +  *! @note +  *! Available on systems that use kqueue.    */      /*! @decl constant NOTE_REVOKE = 64 -  * -  * Used with @[Stdio.File()->set_fs_event_callback()] to monitor for access revokation (unmount, etc). -  * -  * @note -  * Available on systems that use kqueue. +  *! +  *! Used with @[Stdio.File()->set_fs_event_callback()] to monitor +  *! for access revokation (unmount, etc). +  *! +  *! @note +  *! Available on systems that use kqueue.    */         /*! @decl constant PROP_TTY = 128    *!    *! The @[Stdio.File] object supports tty operations.    *!    *! @note    *! This constant is only present on platforms where pseudo tty    *! (aka pty) operations are available, and may thus be used to