version 1.4, 1998/04/26 22:49:10 |
version 1.5, 2001/11/19 19:02:18 |
|
|
|
|
xxreset1() |
xxreset1() |
{ |
{ |
register struct xx *xp, *xq; |
struct xx *xp, *xq; |
|
|
for (xp = xx_head; xp != 0; xp = xq) { |
for (xp = xx_head; xp != 0; xp = xq) { |
xq = xp->link; |
xq = xp->link; |
|
|
struct xx * |
struct xx * |
xxalloc() |
xxalloc() |
{ |
{ |
register struct xx *xp; |
struct xx *xp; |
|
|
if (xxbufp > xxbufe) |
if (xxbufp > xxbufe) |
abort(); |
abort(); |
|
|
} |
} |
|
|
xxfree(xp) |
xxfree(xp) |
register struct xx *xp; |
struct xx *xp; |
{ |
{ |
xp->link = xx_freelist; |
xp->link = xx_freelist; |
xx_freelist = xp; |
xx_freelist = xp; |
|
|
|
|
xxmove(row, col) |
xxmove(row, col) |
{ |
{ |
register struct xx *xp = xx_tail; |
struct xx *xp = xx_tail; |
|
|
if (xp == 0 || xp->cmd != xc_move) { |
if (xp == 0 || xp->cmd != xc_move) { |
xp = xxalloc(); |
xp = xxalloc(); |
|
|
|
|
xxscroll(dir, top, bot) |
xxscroll(dir, top, bot) |
{ |
{ |
register struct xx *xp = xx_tail; |
struct xx *xp = xx_tail; |
|
|
if (xp != 0 && xp->cmd == xc_scroll && |
if (xp != 0 && xp->cmd == xc_scroll && |
xp->arg1 == top && xp->arg2 == bot && |
xp->arg1 == top && xp->arg2 == bot && |
|
|
|
|
xxinschar(row, col, c, m) |
xxinschar(row, col, c, m) |
{ |
{ |
register struct xx *xp; |
struct xx *xp; |
|
|
xp = xxalloc(); |
xp = xxalloc(); |
xp->cmd = xc_inschar; |
xp->cmd = xc_inschar; |
|
|
|
|
xxinsspace(row, col) |
xxinsspace(row, col) |
{ |
{ |
register struct xx *xp = xx_tail; |
struct xx *xp = xx_tail; |
|
|
if (xp != 0 && xp->cmd == xc_insspace && xp->arg0 == row && |
if (xp != 0 && xp->cmd == xc_insspace && xp->arg0 == row && |
col >= xp->arg1 && col <= xp->arg1 + xp->arg2) { |
col >= xp->arg1 && col <= xp->arg1 + xp->arg2) { |
|
|
|
|
xxdelchar(row, col) |
xxdelchar(row, col) |
{ |
{ |
register struct xx *xp = xx_tail; |
struct xx *xp = xx_tail; |
|
|
if (xp != 0 && xp->cmd == xc_delchar && |
if (xp != 0 && xp->cmd == xc_delchar && |
xp->arg0 == row && xp->arg1 == col) { |
xp->arg0 == row && xp->arg1 == col) { |
|
|
|
|
xxclear() |
xxclear() |
{ |
{ |
register struct xx *xp; |
struct xx *xp; |
|
|
xxreset1(); |
xxreset1(); |
xp = xxalloc(); |
xp = xxalloc(); |
|
|
|
|
xxclreos(row, col) |
xxclreos(row, col) |
{ |
{ |
register struct xx *xp = xxalloc(); |
struct xx *xp = xxalloc(); |
|
|
xp->cmd = xc_clreos; |
xp->cmd = xc_clreos; |
xp->arg0 = row; |
xp->arg0 = row; |
|
|
|
|
xxclreol(row, col) |
xxclreol(row, col) |
{ |
{ |
register struct xx *xp = xxalloc(); |
struct xx *xp = xxalloc(); |
|
|
xp->cmd = xc_clreol; |
xp->cmd = xc_clreol; |
xp->arg0 = row; |
xp->arg0 = row; |
|
|
xxwrite(row, col, p, n, m) |
xxwrite(row, col, p, n, m) |
char *p; |
char *p; |
{ |
{ |
register struct xx *xp; |
struct xx *xp; |
|
|
if (xxbufp + n + 1 > xxbufe) |
if (xxbufp + n + 1 > xxbufe) |
xxflush(0); |
xxflush(0); |