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

version» Context lines:

pike.git/src/modules/_Stdio/file.c:5728:    *! available, i.e. when @[__HAVE_OOB__] is 1.    */      /*! @decl constant __HAVE_OOB__    *! Exists and has the value 1 if OOB operations are available.    *!    *! @note    *! In Pike 7.5 and later OOB operations are always present.    */    - void exit_files_stat(void); - void exit_files_efuns(void); - void exit_sendfile(void); - void port_exit_program(void); -  +    PIKE_MODULE_EXIT   { -  exit_files_efuns(); -  exit_files_stat(); +  exit_stdio_efuns(); +  exit_stdio_stat();    -  exit_sendfile(); +  exit_stdio_udp(); +  exit_stdio_sendfile();       if(file_program)    {    free_program(file_program);    file_program=0;    }    if(file_ref_program)    {    free_program(file_ref_program);    file_ref_program=0;    }    exit_file_locking();   #ifndef HAVE_SOCKETPAIR    if (socketpair_fd >= 0) {    while (fd_close(socketpair_fd) && errno == EINTR) {}    socketpair_fd = -1;    }   #endif -  port_exit_program(); +  exit_stdio_port();   }      #define REF (*((struct svalue *)(Pike_fp->current_storage)))      #define FILE_FUNC(X,Y,Z) \    static ptrdiff_t PIKE_CONCAT(Y,_function_number); \    void PIKE_CONCAT(Y,_ref) (INT32 args) { \    struct object *o = REF.u.object; \    int fun = PIKE_CONCAT(Y,_function_number); \    struct program *prog; \
pike.git/src/modules/_Stdio/file.c:5824: Inside #if defined(HAVE_TERMIOS_H)
  void file_tcgetattr(INT32 args);   void file_tcsetattr(INT32 args);   void file_tcsendbreak(INT32 args);   void file_tcflush(INT32 args);   /* void file_tcdrain(INT32 args); */   /* void file_tcflow(INT32 args); */   /* void file_tcgetpgrp(INT32 args); */   /* void file_tcsetpgrp(INT32 args); */   #endif    - void init_files_efuns(void); - void init_files_stat(void); - void port_setup_program(void); - void init_sendfile(void); - void init_udp(void); -  +    /*! @decl string _sprintf(int type, void|mapping flags)    */   static void fd__sprintf(INT32 args)   {    INT_TYPE type;       if(args < 1)    SIMPLE_TOO_FEW_ARGS_ERROR("_sprintf",2);    if(TYPEOF(Pike_sp[-args]) != PIKE_T_INT)    SIMPLE_BAD_ARG_ERROR("_sprintf",0,"int");
pike.git/src/modules/_Stdio/file.c:5951:   }      #ifdef HAVE_OPENPTY   #include <pty.h>   #endif      PIKE_MODULE_INIT   {    struct object *o;    -  Pike_compiler->new_program->id = PROG_MODULE_FILES_ID; +  Pike_compiler->new_program->id = PROG_MODULE_STDIO_ID;    -  init_files_efuns(); -  init_files_stat(); +  init_stdio_efuns(); +  init_stdio_stat();       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("_read_callback",tMix,0,
pike.git/src/modules/_Stdio/file.c:6032:    set_init_callback(file___init_ref);      #define FILE_FUNC(X,Y,Z) \    ADD_FUNCTION(X, PIKE_CONCAT(Y,_ref), Z, 0);   #define FILE_OBJ tObjImpl_STDIO_FD_REF   #include "file_functions.h"       file_ref_program=end_program();    add_program_constant("Fd_ref",file_ref_program,0);    -  port_setup_program(); -  init_sendfile(); -  init_udp(); +  init_stdio_port(); +  init_stdio_sendfile(); +  init_stdio_udp();      #if defined(HAVE_FSETXATTR)    /*! @decl constant XATTR_CREATE    *! Used by @[setxattr] function and method to signify a pure    *! create, which will fail if the attribute already exists.    */    add_integer_constant("XATTR_CREATE", XATTR_CREATE, 0 );       /*! @decl constant XATTR_REPLACE    *! Used by @[setxattr] function and method to signify a replace,