pike.git / lib / modules / Stdio.pmod

version» Context lines:

pike.git/lib/modules/Stdio.pmod:1: - // $Id: Stdio.pmod,v 1.38 1999/04/21 06:55:40 js Exp $ + // $Id: Stdio.pmod,v 1.39 1999/06/29 16:02:58 mast Exp $      #include <string.h>      inherit files;      class File   {    inherit Fd_ref;       mixed ___read_callback;
pike.git/lib/modules/Stdio.pmod:16:    mixed ___write_oob_callback;   #endif    mixed ___id;      #ifdef __STDIO_DEBUG    string __closed_backtrace;   #define CHECK_OPEN() \    if(!_fd) \    { \    throw(({ \ -  "Stdio.File(): line "+__LINE__+" on closed file.\n"+ \ +  "Stdio.File(): line "+__LINE__+" on closed file.\n"+ \    (__closed_backtrace ? \    sprintf("File was closed from:\n %-=200s\n",__closed_backtrace) : \    "This file has never been open.\n" ), \    backtrace()})); \    \    }   #else   #define CHECK_OPEN()   #endif   
pike.git/lib/modules/Stdio.pmod:330:   #else    ::set_nonblocking();   #endif    ::_enable_callbacks();       }       void set_blocking()    {    CHECK_OPEN(); +  ::_disable_callbacks(); // Thread safing    SET(read_callback,0);    SET(write_callback,0);    ___close_callback=0;   #if constant(files.__HAVE_OOB__)    SET(read_oob_callback,0);    SET(write_oob_callback,0);   #endif    ::set_blocking(); -  +  ::_enable_callbacks();    }   };      class Port   {    inherit _port;    object(File) accept()    {    if(object x=::accept())    {