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

version» Context lines:

pike.git/src/modules/_Stdio/file.c:4005:    *! @seealso    *! @[open_socket()], @[accept()]    */   static void file_set_buffer(INT32 args)   {    INT32 bufsize;    int flags;       if(FD==-1)    Pike_error("Stdio.File->set_buffer() on closed file.\n"); -  if(args!=1) +  if(args<1)    SIMPLE_WRONG_NUM_ARGS_ERROR("set_buffer", 1); -  +  if(args>2) +  SIMPLE_WRONG_NUM_ARGS_ERROR("set_buffer", 2);    if(TYPEOF(Pike_sp[-args]) != PIKE_T_INT)    SIMPLE_ARG_TYPE_ERROR("set_buffer", 1, "int");       bufsize=Pike_sp[-args].u.integer;    if(bufsize < 0)    Pike_error("Bufsize must be larger than zero.\n");       if(args>1)    {    if(TYPEOF(Pike_sp[1-args]) != PIKE_T_STRING)