/*#include "/usr/sys/tty.h" /* pick up TECO-mode bit */
short TERMtype
= 0 ; /* for now ( very stupid variable) */
data pi
= 3.141592653589793238462643383;
setterm(1); /* turn off APL mode */
while((wfile
= open(a
, 2)) < 0) {
aprintf("cannot create apl_ws");
if((a
=open("continue",0)) < 0) {
/* this procedure is for trapping floating point exceptions, and */
/* then reset the program. added june 1979 */
printf("\t\nerror -- floating point exception\n");
stack
= alloc(sizeof(sp
)*STKS
); /* Set up internal stack */
staktop
= &stack
[STKS
-1];
case 016: /* cursor right */
case 033: /* escape - APL line feed */
for(cp
=dp
=line
; cp
<p
; cp
+= 2)
qsort(line
, (p
-line
)/2, 2, rlcmp
);
c
= 1; /* check for blank line */
for(p
=line
; p
[0] != -1; p
+=2) {
if(p
[2] != col
) continue;
if ((i
.c
[0] == chartab
[j
].a1
) && ( i
.c
[1]==chartab
[j
].a2
)) {
if (TERMtype
== 0)aputchar(')');
aplmod(0); /*turn off APL mode */
aprintf(" ;%d'\n", now_xeq
.line
);
now_xeq
.name
= now_xeq
.line
= 0;
if(c
>= 'A' && c
<= 'Z') {
/* procedure to catch control d and prevent it from logging out the user*/
aprintf("\nto exit type \"off\nto exit and save workspace type \"continue\n");
if(s
[0] == '%' && s
[1] == 'd') {
aputchar('@'); /* apl minus sign */
extern unsigned char changeoutput
[];
if(TERMtype
== 1) /* ascii terminal */
c
= changeoutput
[ (0377 & c
) ];
column
= (column
+8) & ~7;
i
= sizeof *p
+ rank
* SINT
;
p
->datap
= &p
->dim
[rank
];
copy(type
, from
, to
, size
)
return sp
[-1] = fetch(sp
[-1]);
return sp
[-1] = fetch(sp
[-1]);
register struct item
*p
, *q
;
for(i
=0; c
->c
[i
] != '\n'; i
++)
copy(CH
, c
, p
->datap
, i
);
error("> used before set\n");
q
= newdat(p
->type
, p
->rank
, p
->size
);
copy(IN
, p
->dim
, q
->dim
, p
->rank
);
copy(p
->type
, p
->datap
, q
->datap
, p
->size
);
if(p
->type
!= DA
|| p
->size
!= 1)
copy(IN
, p
->dim
, idx
.dim
, idx
.rank
);
for(i
=idx
.rank
-1; i
>=0; i
--) {
if(k
< 0 || k
>= idx
.rank
)
for(i
=k
; i
<idx
.rank
; i
++) {
idx
.del
[i
] = idx
.del
[i
+1];
idx
.dim
[i
] = idx
.dim
[i
+1];
while(++idx
.idx
[i
-1] >= idx
.dim
[i
-1])
for(i
=0; i
<idx
.rank
; i
++)
n
+= idx
.idx
[i
] * idx
.del
[i
];
static short old
[3], new[3];
if (xyz
== 1)new[1] = 'W'|'A'<<8; /* apl terminal */
else new[1] = '\b'|'\15'<<8; /* ascii terminal */
if (xyz
== 1)aprintf("erase%KWK kill%KAK\n\n");
else aprintf("erase ^H kill ^U\n\n");