* Copyright (c) 1985 Conrad C. Huang, Gregory S. Couch, Kenneth C.R.C. Arnold
* San Francisco, California
# define TERM_WIDTH 80 /* Assume terminals are 80-char wide */
* Move the cursor to the given position on the given player's
if (x
== pp
->p_curx
&& y
== pp
->p_cury
)
* Put out a single character.
if (++pp
->p_curx
>= TERM_WIDTH
) {
(void) putc(ch
, pp
->p_output
);
* Put out a string of the given length.
pp
->p_cury
+= (pp
->p_curx
/ TERM_WIDTH
);
pp
->p_curx
%= TERM_WIDTH
;
(void) putc(*str
++, pp
->p_output
);
* Clear the screen, and reset the current position on the screen.
* Clear to the end of the line
* Send a command to the given user
sendcom(pp
, command
, arg1
, arg2
)
(void) putc(command
, pp
->p_output
);
switch (command
& 0377) {
(void) putc(arg1
, pp
->p_output
);
(void) putc(arg2
, pp
->p_output
);
(void) putc(arg1
, pp
->p_output
);