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

version» Context lines:

pike.git/src/modules/_Stdio/file.c:229:    *! Getter for the Fd object.    */   static void fd_backtick__fd(INT32 args)   {    pop_n_elems(args);    ref_push_object_inherit(Pike_fp->current_object,    Pike_fp->context -    Pike_fp->current_program->inherits);   }    - /*! @endclass + /*! @decl protected int(0..) _errno +  *! +  *! Variable containing the internal value returned by @[errno()]. +  *! +  *! @seealso +  *! @[errno()]    */    - /* The class below is not accurate, but it's the lowest exposed API -  * interface, which make the functions appear where users actually -  * look for them. /mast */ -  - /*! @class File + /*! @decl mixed _read_callback +  *! @decl mixed _write_callback +  *! @decl mixed _read_oob_callback +  *! @decl mixed _write_oob_callback +  *! @decl mixed _fs_event_callback +  *! +  *! Callback functions installed by @[Stdio.File()->set_callbacks()] et al.    */      static struct my_file *get_file_storage(struct object *o)   {    struct my_file *f;    struct svalue *sval;    struct object *ob;    if(o->prog == file_program)    return ((struct my_file *)    (o->storage + file_program->inherits->storage_offset));
pike.git/src/modules/_Stdio/file.c:666:    if(flags & FILE_EXCLUSIVE) ret|=fd_EXCL;    ret |= fd_LARGEFILE;    return ret;   }      static void free_dynamic_buffer(dynamic_buffer *b) { free(b->s.str); }      static struct pike_string *do_read(int fd,    INT32 r,    int all, -  int *err) +  INT_TYPE *err)   {    ONERROR ebuf;    ptrdiff_t bytes_read, i;    INT32 try_read;    bytes_read=0;    *err=0;       if(r <= DIRECT_BUFSIZE ||    (all && !INT32_MUL_OVERFLOW(r, 2) && (((r<<1)-1)&(r<<1)))) /* r<<1 != power of two */    {
pike.git/src/modules/_Stdio/file.c:1235:    errno = e;   #endif    return retval;   }      #endif /* HAVE_PIKE_SEND_FD */      static struct pike_string *do_read_oob(int UNUSED(fd),    INT32 r,    int all, -  int *err) +  INT_TYPE *err)   {    ONERROR ebuf;    INT32 bytes_read,i;    struct pike_string *str;       bytes_read=0;    *err=0;       str=begin_shared_string(r);   
pike.git/src/modules/_Stdio/file.c:6115:    init_stdio_stat();    init_stdio_buffer();    START_NEW_PROGRAM_ID(STDIO_FD);    ADD_STORAGE(struct my_file);      #define FILE_FUNC(X,Y,Z) \    PIKE_CONCAT(Y,_function_number) = ADD_FUNCTION(X,Y,Z,0);   #define FILE_OBJ tObjImpl_STDIO_FD   #include "file_functions.h"    +  MAP_VARIABLE("_errno", tIntPos, ID_PROTECTED, +  OFFSETOF(my_file, my_errno), PIKE_T_INT);    MAP_VARIABLE("_read_callback",tMix,0,    OFFSETOF(my_file, event_cbs[PIKE_FD_READ]),PIKE_T_MIXED);    MAP_VARIABLE("_write_callback",tMix,0,    OFFSETOF(my_file, event_cbs[PIKE_FD_WRITE]),PIKE_T_MIXED);    MAP_VARIABLE("_read_oob_callback",tMix,0,    OFFSETOF(my_file, event_cbs[PIKE_FD_READ_OOB]),PIKE_T_MIXED);    MAP_VARIABLE("_write_oob_callback",tMix,0,    OFFSETOF(my_file, event_cbs[PIKE_FD_WRITE_OOB]),PIKE_T_MIXED);    MAP_VARIABLE("_fs_event_callback",tMix,0,    OFFSETOF(my_file, event_cbs[PIKE_FD_FS_EVENT]),PIKE_T_MIXED);