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

version» Context lines:

pike.git/src/modules/_Stdio/file.c:2395: Inside #if defined(SO_LINGER)
   */   static void file_linger(INT32 args)   {    int fd = FD;    int linger = -1;    struct linger li;       if(fd < 0)    Pike_error("File not open.\n");    -  get_all_args("Stdio.File->linger", args, ".%d", &linger); +  get_all_args("linger", args, ".%d", &linger);       if ((linger < -1) || (linger > 0xffff)) {    SIMPLE_BAD_ARG_ERROR("Stdio.File->linger()", 1, "int(-1..65535)");    }       if (linger == -1) {    li.l_onoff = 0;    li.l_linger = 15;    } else {    li.l_onoff = 1;
pike.git/src/modules/_Stdio/file.c:2847: Inside #if defined(HAVE_OPENAT)
  static void file_openat(INT32 args)   {    int flags, fd, dir_fd;    int access = 00666;    int err;    struct pike_string *str, *flag_str;       if((dir_fd = FD) < 0)    Pike_error("File not open.\n");    -  get_all_args("Stdio.File->openat", args, "%S%S.%d", -  &str, &flag_str, &access); +  get_all_args("openat", args, "%S%S.%d", &str, &flag_str, &access);       flags = parse(flag_str->str);       if (string_has_null(str)) {    /* Filenames with NUL are not supported. */    ERRNO = errno = ENOENT;    pop_n_elems(args);    push_int(0);    return;    }
pike.git/src/modules/_Stdio/file.c:4875:    push_int(1);   }      /*! @decl int(0..1) set_keepalive(int(0..1) on_off)    */   static void file_set_keepalive(INT32 args)   {    int tmp, i;    INT_TYPE t;    -  get_all_args("Stdio.File->set_keepalive", args, "%i", &t); +  get_all_args("set_keepalive", args, "%i", &t);       /* In case int and INT_TYPE have different sizes */    tmp = t;      #ifdef SO_KEEPALIVE    i = fd_setsockopt(FD,SOL_SOCKET, SO_KEEPALIVE, (char *)&tmp, sizeof(tmp));    if(i)    {    ERRNO=errno;    }else{
pike.git/src/modules/_Stdio/file.c:5021:    int addr_len;    struct pike_string *dest_addr = NULL;    struct pike_string *src_addr = NULL;    struct svalue *dest_port = NULL;    struct svalue *src_port = NULL;       int tmp, was_closed = FD < 0;    int tries;       if (args < 4) { -  get_all_args("Stdio.File->connect", args, "%S%*", &dest_addr, &dest_port); +  get_all_args("connect", args, "%S%*", &dest_addr, &dest_port);    } else { -  get_all_args("Stdio.File->connect", args, "%S%*%S%*", +  get_all_args("connect", args, "%S%*%S%*",    &dest_addr, &dest_port, &src_addr, &src_port);    }       if(TYPEOF(*dest_port) != PIKE_T_INT &&    (TYPEOF(*dest_port) != PIKE_T_STRING || dest_port->u.string->size_shift))    SIMPLE_BAD_ARG_ERROR("Stdio.File->connect", 2, "int|string (8bit)");       if(src_port && TYPEOF(*src_port) != PIKE_T_INT &&    (TYPEOF(*src_port) != PIKE_T_STRING || src_port->u.string->size_shift))    SIMPLE_BAD_ARG_ERROR("Stdio.File->connect", 4, "int|string (8bit)");