src/ui-term.c
errr Term_addch(int a, wchar_t c)
{
	int w = Term->wid;

	/* Handle "unusable" cursor */
	if (Term->scr->cu) return (-1);

	/* Paranoia -- no illegal chars */
	if (!c) return (-2);

	/* Queue the given character for display */
	Term_queue_char(Term, Term->scr->cx, Term->scr->cy, a, c, 0, 0);

	/* Advance the cursor */
	Term->scr->cx++;

	/* Success */
	if (Term->scr->cx < w) return (0);

	/* Note "Useless" cursor */
	Term->scr->cu = 1;

	/* Note "Useless" cursor */
	return (1);
}
/**
 * Using the given attr, add the given char at the cursor.
 *
 * We return "-2" if the character is "illegal". XXX XXX
 *
 * We return "-1" if the cursor is currently unusable.
 *
 * We queue the given attr/char for display at the current
 * cursor location, and advance the cursor to the right,
 * marking it as unusable and returning "1" if it leaves
 * the screen, and otherwise returning "0".
 *
 * So when this function, or the following one, return a
 * positive value, future calls to either function will
 * return negative ones.
 */
Using the given attr, add the given char at the cursor.
We return "-2" if the character is "illegal".

We return "-1" if the cursor is currently unusable.

We queue the given attr/char for display at the current
cursor location, and advance the cursor to the right,
marking it as unusable and returning "1" if it leaves
the screen, and otherwise returning "0".

So when this function, or the following one, return a
positive value, future calls to either function will
return negative ones.
Using the given attr add the given char at the cursor . We return " - 2 " if the character is " illegal " . We return " - 1 " if the cursor is currently unusable . We queue the given attr / char for display at the current cursor location and advance the cursor to the right marking it as unusable and returning " 1 " if it leaves the screen and otherwise returning " 0 " . So when this function or the following one return a positive value future calls to either function will return negative ones .
errr Term_addch(int a, wchar_t c)
{
	int w = Term->wid;
	if (Term->scr->cu) return (-1);
	if (!c) return (-2);
	Term_queue_char(Term, Term->scr->cx, Term->scr->cy, a, c, 0, 0);
	Term->scr->cx++;
	if (Term->scr->cx < w) return (0);
	Term->scr->cu = 1;
	return (1);
}
errr Term_addch ( int a , wchar_t c ) { int w = Term -> wid ; if ( Term -> scr -> cu ) return ( -1 ) ; if ( ! c ) return ( -2 ) ; Term_queue_char ( Term , Term -> scr -> cx , Term -> scr -> cy , a , c , 0 , 0 ) ; Term -> scr -> cx ++ ; if ( Term -> scr -> cx < w ) return ( 0 ) ; Term -> scr -> cu = 1 ; return ( 1 ) ; }
Using the given attr, add the given char at the cursor.
Using the given attr add the given char at the cursor .
/* Handle "unusable" cursor */ /* Paranoia -- no illegal chars */ /* Queue the given character for display */ /* Advance the cursor */ /* Success */ /* Note "Useless" cursor */ /* Note "Useless" cursor */