7 {
register unsigned char *ip= (
unsigned char *)&i;
12 {
register unsigned int ival=0;
14 ival=(ival<<8)+
readch(con);
15 ival=(ival<<8)+
readch(con);
16 ival=(ival<<8)+
readch(con);
28 else error(
"argument to large");}
33 register int i,len, elmt;
34 register unsigned char *
bp;
41 if (isarray(p)) p=p->c.ary.entity;
43 len=vecsize(p); elmt=elmtypeof(p);
47 case ELM_BIT: len=(len+7)/8;
break;
48 case ELM_FOREIGN: bp=(
unsigned char *)p->c.ivec.iv[0];
break;
49 case ELM_CHAR:
case ELM_BYTE:
break;
50 case ELM_POINTER:
error(
"binary vector expected");
break;
51 case ELM_FLOAT:
case ELM_INT: len<<=2;
break;}
54 else error(
"invalid argument for VXW"); } }
60 {
int i=0, j,
argc=3, len, stat;
61 pointer con=argv[0], entry=argv[1], result=argv[2];
69 if (issymbol(entry)) entry=
Getstring(entry);
70 if (isstring(entry)) {
74 else if (isint(entry)) {
80 putarg(out, argv[argc++]);}
87 if (isarray(result)) result=result->c.ary.entity;
88 if (isvector(result)) {
91 if ((elmtypeof(result) == ELM_INT) || (elmtypeof(result) == ELM_FLOAT))
109 for (i=0; i<len; i++) result->c.str.chars[i]=
readch(in);
pointer prinx(context *, pointer, pointer)
static int putarg(pointer s, pointer p)
pointer cons(context *, pointer, pointer)
static unsigned long getlong(pointer con)
defun("ADR_TO_STRING", mod, ADR_TO_STRING)
vxwcom(context *ctx, int n, argv)
int writestr(pointer, byte *, int)
static putlength(pointer s, unsigned int len)
pointer error(enum errorcode ec,...) pointer error(va_alist) va_dcl
int writech(pointer, int)
static void putlong(pointer s, long i)
pointer CALL_VXW(context *ctx, int n, argv)