Lines Matching refs:val
171 Bind_Var(v, t, hstream.val.all, hstream.tag.kernel); \
289 p_read_string(value vs, type ts, value vdel, type tdel, value vl, type tl, value val, type tag),
290 p_read_string5(value vs, type ts, value vdel, type tdel, value vpad, type tpad, value vsep, type tsep, value val, type tag),
292 p_get_char(value vs, type ts, value val, type tag),
293 p_get(value vs, type ts, value val, type tag),
294 p_get1(value val, type tag),
295 p_put_char(value vs, type ts, value val, type tag),
298 p_getw(value vs, type ts, value val, type tag),
580 nst = (stream_id) GetStreamProperty(d_.stdin0)->val.wptr;
582 nst = (stream_id) GetStreamProperty(d_.stdout0)->val.wptr;
596 nst = (stream_id) stream_prop->val.wptr;
614 hstream.val.all = v.all;
645 if ((*nst = get_stream_id(pw.val, pw.tag, 0, &err)) == NO_STREAM)
669 Return_Unify_Pw(v2, t2, hstream.val, hstream.tag);
687 nst = (stream_id) GetStreamProperty(d_.stdin0)->val.wptr;
695 nst = (stream_id) GetStreamProperty(d_.stdout0)->val.wptr;
731 hstream.val.all = vi.all; /* reuse old anchor */
736 Return_Unify_Pw(vs, ts, hstream.val, hstream.tag);
746 Succeed_If(nst == (stream_id) GetStreamProperty(d_.stdin0)->val.wptr);
750 Succeed_If(nst == (stream_id) GetStreamProperty(d_.stdout0)->val.wptr);
787 p_get_char(value vs, type ts, value val, type tag)
794 if(IsString(tag) && (*(StringStart(val)) == 0 || *(StringStart(val) + 1) != 0))
818 Return_Unify_String(val, tag, v.ptr);
827 p_put_char(value vs, type ts, value val, type tag)
838 len = DidLength(val.did);
839 s = DidName(val.did);
841 len = StringLength(val);
842 s = StringStart(val);
953 init_string_pw.val.all = vfile.all;
961 else if (IsStructure(tmode) && vmode.ptr->val.did == d_.string) /* obsolete */
964 size = vmode.ptr[1].val.nint;
998 if (vfile.ptr->val.did == d_.string)
1009 else if (vfile.ptr->val.did == d_queue1)
1016 else if (vfile.ptr->val.did == d_fd1 || vfile.ptr->val.did == d_dup1)
1021 fd = dup((int) pw->val.nint);
1041 size < StringLength(init_string->val))
1043 size = StringLength(init_string->val);
1090 Request_Unify_String(init_string->val, init_string->tag, empty_string);
1092 else if (StringLength(init_string->val) > 0)
1094 StreamLastWritten(nst) = StringStart(init_string->val)[StringLength(init_string->val)-1];
1095 StreamMethods(nst).outf(nst, StringStart(init_string->val), StringLength(init_string->val));
1117 Request_Unify_Pw(vstr, tstr, hstream.val, hstream.tag);
1152 car = car->val.ptr;
1153 if (car->val.did == d_force1) {
1155 if (car[1].val.did == d_.true0) close_options |= CLOSE_FORCE;
1156 else if (car[1].val.did == d_false) close_options &= ~CLOSE_FORCE;
1163 vopt = cdr->val;
1211 hstream.val.all = v.all;
1225 return p_close2(v, t, nil.val, nil.tag);
1419 Return_Unify_Pw(ov, ot, hstream.val, hstream.tag);
1470 if (IsStructure(pt) && pv.ptr->val.did == d_reprompt1)
1473 pv.all = pv.ptr[1].val.all;
1534 Make_Stack_String(inbuf, result.val, buf);
1545 if ((result.val.did = StreamName(nst)) == d_.nil)
1557 result.val.ptr = DidString(pr);
1564 result.val.did = d_.string0;
1566 result.val.did = d_queue;
1568 result.val.did = d_socket;
1570 result.val.did = modes[StreamMode(nst) & SMODEBITS];
1574 result.val.nint = StreamNref(nst);
1579 result.val.nint = StreamNr(nst);
1587 result.val.nint = StreamLine(nst);
1598 result.val.nint = offset;
1604 result.val.did = d_.on;
1606 result.val.did = d_.off;
1618 result.val.nint = StreamUnit(nst);
1634 result.val.nint = ntohs(name.sin_port);
1642 result.val.did = (dident) SocketConnection(nst);
1651 result.val.did = d_.on;
1653 result.val.did = d_.off;
1670 result.val.nint = StreamOffset(nst);
1679 result.val.nint = StreamSize(nst);
1687 (t_ext_ptr) heap_event_tid.copy(StreamEvent(nst).val.wptr));
1706 result.val.did = StreamMode(nst) & SYIELD ? d_.on : d_.off;
1745 result.val.did = StreamMode(nst) & SNOMACROEXP ? d_.off : d_.on;
1764 result.val.did = StreamMode(nst) & SCOMPRESS ? d_.on : d_.off;
1781 result.val.did =
1790 if ((result.val.did = StreamPath(nst)) == d_.nil)
1816 result.val.did =
1831 result.val.did =
1840 Return_Unify_Pw(v, t, result.val, result.tag);
1943 heap_event_tid.free(StreamEvent(nst).val.wptr);
1958 StreamEvent(nst).val.wptr = heap_event_tid.copy(event);
2205 p_get(value vs, type ts, value val, type tag)
2224 Return_Unify_Integer(val, tag, res);
2244 p_getw(value vs, type ts, value val, type tag)
2274 Return_Unify_Integer(val, tag, w);
2278 p_get1(value val, type tag)
2292 Return_Unify_Integer(val, tag, res);
2407 if (in_s.val.did == out_s.val.did) {
2425 Bind_Stream(in_s.val, in_s.tag, nr);
2426 Bind_Stream(out_s.val, out_s.tag, nw);
2439 p_read_string(value vs, type ts, value vdel, type tdel, value vl, type tl, value val, type tag)
2534 Request_Unify_String(val, tag, pw);
2564 value vpad, type tpad, value vsep, type tsep, value val, type tag)
2685 Request_Unify_String(val, tag, pw);
2774 Request_Unify_Pw(vfiles, tfiles, file_list.val, file_list.tag);
2775 Request_Unify_Pw(vsubdirs, tsubdirs, dir_list.val, dir_list.tag);
2829 dir_last->val.ptr = elem;
2837 file_last->val.ptr = elem;
2843 Cstring_To_Prolog(dent->d_name, elem->val);
2851 Request_Unify_Pw(vfiles, tfiles, file_list.val, file_list.tag);
2852 Request_Unify_Pw(vsubdirs, tsubdirs, dir_list.val, dir_list.tag);
2920 Bind_Stream(p.val, p.tag, onst);
2959 if (IsStructure(taddr) && vaddr.ptr->val.did == d_.quotient)
2963 Check_Output_Atom_Or_Nil(addr->val, addr->tag);
2986 host = gethostbyname(DidName(addr->val.did));
2990 hdid = addr->val.did;
2994 name.sin_port = htons((short) port->val.nint);
3012 pw[0].val.did = d_.quotient;
3013 pw[1].val.did = hdid;
3015 pw[2].val.nint = ntohs(name.sin_port);
3020 Request_Unify_Integer(port->val, port->tag, ntohs(name.sin_port));
3023 Request_Unify_Atom(addr->val, addr->tag, hdid);
3097 if (!IsStructure(taddr) || vaddr.ptr->val.did != d_.quotient)
3104 if (addr->val.nint != 0)
3107 haddr = addr->val.nint;
3113 hostname_did = Did(StringStart(addr->val),0);
3115 hostname_did = addr->val.did;
3126 name.sin_port = htons((short) port->val.nint);
3249 pw[0].val.did = d_.quotient;
3251 pw[1].val.did = wn = enter_dict(host->h_name, 0);
3255 pw[1].val.ptr = pw + 1;
3259 pw[2].val.nint = ntohs(name.sin_port);
3283 Bind_Stream(p.val, p.tag, onst);
3660 nst = get_stream_id(pw->val, pw->tag, 0, &res);
3711 pl = pl->val.ptr;
3759 nst = get_stream_id(pw->val, pw->tag, 0, &res);
3771 p->val.ptr = p + 1;
3777 pl = pl->val.ptr;
3951 len = tag_desc[TagType(car->tag)].string_size(car->val, car->tag, 0);
3952 Make_Stack_String(len, auxpw.val, argv[i]); /* maybe too long */
3953 len = tag_desc[TagType(car->tag)].to_string(car->val, car->tag, argv[i], 0);
3954 Trim_Buffer(auxpw.val.ptr, len+1); /* adjust length */
3963 s = DidName(car->val.did);
3964 len = DidLength(car->val.did);
3966 s = StringStart(car->val);
3967 len = StringLength(car->val);
3988 Get_Name(car->val, car->tag, argv[i]);
4004 cdr = cdr->val.ptr;
4014 _get_args(StringStart(copy.val), argv); /* parse the string */
4260 Bind_Stream(p->pw.val, p->pw.tag, id);
4367 Bind_Stream(p->pw.val, p->pw.tag, id);
4488 res = _check_stream(p->val, p->tag, &pipes[i].pw, io);
4503 l = l->val.ptr;
4542 else if (IsStructure(t) && v.ptr->val.did == d_sigio)
4546 if ((res = _check_stream(v.ptr->val, v.ptr->tag, s, io)) < 0)
4552 ((v.ptr->val.did == d_in && (where = EXEC_PIPE_IN)) ||
4553 (v.ptr->val.did == d_out && (where = EXEC_PIPE_OUT))))
4559 if ((res = _check_stream(v.ptr->val, v.ptr->tag, s, 0)) < 0)
4567 s->val = v;